/* ========== TOKENS ========== */
:root {
  --bg: #FAF8F5;
  --bg-soft: #F1EDE7;
  --bg-card: #F5F1EB;
  --accent: #111111;
  --text: #16130F;
  --text-dim: #6B645B;
  --line: rgba(22,19,15,.16);

  --r-card: 18px;
  --r-sm: 10px;

  --step-0: clamp(.95rem, .9rem + .2vw, 1.05rem);
  --step-1: clamp(1.15rem, 1rem + .6vw, 1.4rem);
  --step-2: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  --step-3: clamp(2.4rem, 1.8rem + 3vw, 4.5rem);
  --step-4: clamp(3.4rem, 2rem + 7vw, 9rem);

  --gap: clamp(1rem, .6rem + 1.6vw, 2rem);
  --section-y: clamp(5rem, 3rem + 8vw, 10rem);
  --pad-x: clamp(1.25rem, .5rem + 3vw, 4rem);
  --maxw: 1400px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: var(--step-0);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--bg); }

/* ========== TYPO ========== */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.02em;
  text-transform: none;
}
.cond {
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  font-weight: 600;
  line-height: .95;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
h1 em, h2 em, .display { font-style: italic; font-weight: 400; }
h1 { font-size: var(--step-4); max-width: 12ch; }
h2 { font-size: var(--step-3); max-width: 18ch; }
h3 { font-size: var(--step-2); }
.lead { font-size: var(--step-1); font-weight: 300; line-height: 1.5; }
.quote {
  font-size: var(--step-2);
  font-weight: 400;
  font-style: italic;
  line-height: 1.32;
  letter-spacing: -.015em;
  text-transform: none;
  font-family: 'Playfair Display', Georgia, serif;
}
.dim { color: var(--text-dim); }
.accent { color: var(--accent); }

.eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--accent);
}
.num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: var(--step-2);
  font-weight: 400;
  font-style: italic;
  color: var(--text-dim);
  line-height: 1;
}

/* ========== LAYOUT ========== */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad-x); }
section { padding-block: var(--section-y); }
.stack > * + * { margin-top: var(--gap); }
.grid { display: grid; gap: var(--gap); }
.rule { height: 1px; background: var(--line); border: 0; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .split { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2.5rem, 6vw, 7rem); align-items: center; }
  .split--flip { grid-template-columns: .85fr 1.15fr; }
  .split > .media { margin-block: clamp(-3rem, -4vw, -1.5rem); }
}

/* ========== CARDS ========== */
.card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--text);
  border-radius: 0;
  padding: clamp(1.4rem, 1rem + 1.5vw, 2rem) 0 0;
  translate: 0 0;
  transition: border-color .4s var(--ease), background .4s var(--ease), translate .4s var(--ease);
}
.card:hover { border-top-color: var(--accent); background: transparent; translate: 0 -3px; }

.media { border-radius: 0; overflow: hidden; background: var(--bg-soft); }
.media img { width: 100%; object-fit: cover; }

/* ========== BOUTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.9rem;
  border-radius: 100px;
  border: 1px solid var(--accent);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  translate: 0 0;
  transition: background .35s var(--ease), color .35s var(--ease), translate .35s var(--ease);
}
.btn--solid { background: var(--accent); color: var(--bg); }
.btn--ghost { color: var(--accent); }
.btn:hover { background: var(--accent); color: var(--bg); translate: 0 -2px; }

.link-u {
  position: relative;
  padding-bottom: 3px;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .45s var(--ease), color .3s var(--ease);
}
.link-u:hover { background-size: 100% 1px; color: var(--accent); }

/* ========== REVEAL ========== */
.reveal { opacity: 0; translate: 0 28px; transition: opacity .9s var(--ease), translate .9s var(--ease); }
.reveal.is-in { opacity: 1; translate: 0 0; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; translate: 0 0; }
}

/* ========== NAV ========== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--pad-x);
  transition: background .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(250,248,245,.88); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.nav__logo { font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; font-weight: 500; letter-spacing: -.01em; text-transform: none; }
.nav__links { display: none; gap: 2rem; font-family: 'Barlow Condensed', sans-serif; font-size: 1rem; letter-spacing: .16em; text-transform: uppercase; }
.nav__burger { display: flex; flex-direction: column; gap: 5px; padding: .5rem; }
.nav__burger span { display: block; width: 26px; height: 1.5px; background: var(--text); transition: opacity .3s var(--ease), translate .3s var(--ease); }
.nav.is-open .nav__burger span:nth-child(1) { translate: 0 6.5px; }
.nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__burger span:nth-child(3) { translate: 0 -6.5px; }

.menu {
  position: fixed; inset: 0; z-index: 99;
  display: flex; flex-direction: column; justify-content: center; gap: 1rem;
  padding: var(--pad-x);
  background: var(--bg);
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s var(--ease);
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu a { font-family: 'Barlow Condensed', sans-serif; font-size: clamp(2rem, 8vw, 3.5rem); font-weight: 600; text-transform: uppercase; line-height: 1.1; translate: 0 0; transition: color .3s var(--ease), translate .3s var(--ease); }
.menu a:hover { color: var(--accent); translate: 12px 0; }

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__burger, .menu { display: none; }
}

/* ========== FOOTER ========== */
.footer { border-top: 1px solid var(--line); padding-block: clamp(3rem, 6vw, 5rem); }
.footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr; } }

/* ========== HERO ========== */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding-block: clamp(6rem, 12vh, 9rem) clamp(4rem, 10vh, 8rem); overflow: hidden; }
.hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0; transition: opacity 1.1s var(--ease); }
.hero.is-intro .hero__media { opacity: 1; }
.hero__cover { position: absolute; inset: 0; z-index: 1; background: var(--bg); opacity: 1; transition: opacity 1.1s var(--ease); pointer-events: none; }
.hero.is-intro .hero__cover { opacity: 0; }
.hero__inner { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 1.4rem; align-items: flex-start; opacity: 1; translate: 0 0; transition: opacity 1s var(--ease) .25s, translate 1s var(--ease) .25s; }
.hero.is-intro .hero__inner { opacity: 0; translate: 0 24px; }
.hero.is-intro .hero__scroll { opacity: 0; }
.hero__inner h1 { text-shadow: none; }
.hero__scroll { position: absolute; z-index: 2; bottom: 1.5rem; left: 50%; translate: -50% 0; font-size: 1.3rem; color: var(--text-dim); opacity: 1; transition: opacity .8s var(--ease); animation: bob 2.4s var(--ease) infinite; }
@keyframes bob { 0%,100% { translate: -50% 0; } 50% { translate: -50% 10px; } }

/* ========== APPROCHE ========== */
.approche { margin-top: var(--gap); border-top: 1px solid var(--line); }
.approche__item { display: grid; grid-template-columns: auto 1fr; gap: clamp(1rem, 4vw, 3rem); align-items: start; padding-block: clamp(1.5rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); translate: 0 0; transition: translate .45s var(--ease); }
.approche__item:hover { translate: 8px 0; }
.approche__item p { color: var(--text-dim); max-width: 62ch; }
.approche__item:hover p { color: var(--text); }

/* ========== TERRITOIRES ========== */
.territoires { margin-top: var(--gap); border-top: 1px solid var(--line); }
.territoires li { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(1.7rem, 1rem + 4.5vw, 4.6rem); font-weight: 400; text-transform: none; letter-spacing: -.02em; line-height: 1.15; padding-block: clamp(.6rem, 1.5vw, 1.1rem); border-bottom: 1px solid var(--line); color: var(--text-dim); translate: 0 0; transition: color .4s var(--ease), translate .4s var(--ease); }
.territoires li:hover { color: var(--accent); translate: 14px 0; }

/* ========== FORM ========== */
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-family: 'Barlow Condensed', sans-serif; font-size: .9rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-dim); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem 1rem;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font: inherit; resize: vertical;
  transition: border-color .3s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field select { appearance: none; cursor: pointer; }
.form .btn { align-self: flex-start; margin-top: .4rem; }
.form__status { font-size: .9rem; min-height: 1.3em; }
.form__status.is-ok { color: var(--accent); }
.form__status.is-err { color: #B3261E; }

/* ========== PAGE HEAD ========== */
.page-head { padding-block: clamp(8rem, 16vh, 12rem) clamp(2rem, 5vw, 4rem); }

/* ========== REEL (videos 9:16) ========== */
.reel { display: grid; gap: var(--gap); margin-top: var(--gap); grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); justify-content: center; }
.reel__item { border-radius: 0; overflow: hidden; background: var(--bg-soft); border: 1px solid var(--line); max-width: 540px; width: 100%; margin-inline: auto; }
.reel__item video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: var(--bg-soft); }

/* ========== GALLERY (masonry) ========== */
.gallery { margin-top: var(--gap); columns: 1; column-gap: var(--gap); }
.gallery__item { break-inside: avoid; margin-bottom: var(--gap); border-radius: 0; overflow: hidden; background: var(--bg-soft); }
.gallery__item img { width: 100%; translate: 0 0; transition: opacity .5s var(--ease), translate .5s var(--ease); }
.gallery__item:hover img { translate: 0 -3px; }
@media (min-width: 640px)  { .gallery { columns: 2; } }
@media (min-width: 1024px) { .gallery { columns: 3; } }
.reel__cap { padding: .7rem 1rem 1rem; font-family: 'Barlow Condensed', sans-serif; font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; }

/* Plein ecran : format natif, pas de rognage */
.reel__item video:fullscreen,
.reel__item video:-webkit-full-screen {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  background: #000;
}

/* ========== RYTHME EDITORIAL ========== */
.wrap > .eyebrow { margin-bottom: .8rem; }
section > .wrap, section.wrap { position: relative; }
.approche__item p { max-width: 54ch; font-size: var(--step-1); font-weight: 200; }
.territoires li { padding-block: clamp(.5rem, 1.2vw, .9rem); }
.grid-3 { row-gap: clamp(2rem, 4vw, 3.5rem); }
.lead { max-width: 46ch; }

/* ========== DEBORDEMENTS ========== */
@media (min-width: 900px) {
  .media--bleed-l { margin-left: calc(var(--pad-x) * -1 - 3vw); }
  .media--bleed-r { margin-right: calc(var(--pad-x) * -1 - 3vw); }
  .split--flip > .stack { padding-left: clamp(0rem, 3vw, 3rem); }
}

/* ========== GALERIE : RYTHME CASSE ========== */
@media (min-width: 1024px) {
  .gallery__item--wide { column-span: all; max-width: 66%; margin-inline: auto; }
  .gallery__item--drop { margin-top: clamp(2rem, 5vw, 5rem); }
}
.media video { display: block; width: 100%; height: auto; }

/* ========== LIGHTBOX ========== */
.gallery__item { cursor: zoom-in; }
.lb {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(22,19,15,.94);
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s var(--ease);
}
.lb.is-open { opacity: 1; visibility: visible; }
.lb__img { max-width: 88vw; max-height: 86svh; width: auto; height: auto; object-fit: contain; }
.lb__close, .lb__nav {
  position: absolute; z-index: 2;
  color: #FAF8F5; line-height: 1;
  padding: .6rem 1rem;
  opacity: .65; transition: opacity .3s var(--ease);
}
.lb__close:hover, .lb__nav:hover { opacity: 1; }
.lb__close { top: 1rem; right: 1.4rem; font-size: 2.4rem; }
.lb__nav { top: 50%; translate: 0 -50%; font-size: 3.5rem; }
.lb__nav--prev { left: .5rem; }
.lb__nav--next { right: .5rem; }
.lb__count {
  position: absolute; bottom: 1.5rem; left: 50%; translate: -50% 0;
  color: #FAF8F5; opacity: .55; font-size: .85rem; letter-spacing: .1em;
}
@media (max-width: 640px) { .lb__nav { font-size: 2.4rem; } }

/* ========== RESPIRATIONS ========== */
.bleed { width: 100%; margin-block: clamp(3rem, 8vw, 7rem); background: var(--bg-soft); }
.bleed img { width: 100%; height: clamp(340px, 68svh, 720px); object-fit: cover; }
.bleed img, .media img, .media video { transition: none; }
.bleed, .media { overflow: hidden; }

/* Ressources : 2 colonnes max */
@media (min-width: 1024px) {
  body.page-ressources .gallery,
  body.page-portfolio .gallery { columns: 2; }
}

/* Ressources : 2 colonnes max */
@media (min-width: 1024px) {
  body.page-ressources .gallery,
  body.page-portfolio .gallery { columns: 2; }
}

.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ========== APPEL GRATUIT ========== */
.appel__head { max-width: 60ch; }
.appel .calendly-inline-widget { margin-top: clamp(2rem, 4vw, 3.5rem); border: 1px solid var(--line); }

/* ========== BARRE CTA ========== */
.cta-bar {
  position: fixed; z-index: 150; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem clamp(1rem, 3vw, 2rem);
  background: var(--text); color: var(--bg);
  translate: 0 100%;
  transition: translate .55s var(--ease);
}
.cta-bar.is-in { translate: 0 0; }
.cta-bar.is-off { display: none; }
.cta-bar__txt { flex: 1; font-size: .95rem; line-height: 1.35; }
.cta-bar__btn { flex: none; padding: .55rem 1.3rem; font-size: .95rem; background: var(--bg); color: var(--text); border-color: var(--bg); }
.cta-bar__btn:hover { background: transparent; color: var(--bg); border-color: var(--bg); translate: 0 0; }
.cta-bar__close { flex: none; font-size: 1.6rem; line-height: 1; opacity: .6; padding: 0 .3rem; }
.cta-bar__close:hover { opacity: 1; }
@media (max-width: 640px) {
  .cta-bar { flex-wrap: wrap; }
  .cta-bar__txt { flex: 1 1 100%; font-size: .88rem; }
}

/* ========== VIDEOS EDITORIALES ========== */
.bleed--video video { width: 100%; height: clamp(340px, 68svh, 720px); object-fit: cover; display: block; }
.enzo { padding-block: clamp(3rem, 7vw, 6rem) 0; }
.enzo__fig { max-width: 540px; width: 100%; margin-inline: auto; background: var(--bg-soft); }
.enzo__fig video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; display: block; }
.enzo__fig video:fullscreen, .enzo__fig video:-webkit-full-screen { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; background: #000; }

/* ========== HERO PORTFOLIO ========== */
.phero { position: relative; display: flex; align-items: center; padding-block: clamp(7rem, 14vh, 10rem) clamp(3rem, 6vh, 5rem); }
.phero__grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; width: 100%; }
.phero__txt { display: flex; flex-direction: column; gap: 1.2rem; align-items: flex-start; }
.phero__fig { max-width: 460px; width: 100%; margin-inline: auto; background: var(--bg-soft); }
.phero__fig video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }
@media (min-width: 900px) {
  .phero { min-height: 92svh; }
  .phero__grid { grid-template-columns: 1fr .8fr; }
  .phero__fig { margin-inline: 0 auto; max-width: 520px; }
}

/* Reel : tailles variables en puzzle */
@media (min-width: 900px) {
  .reel { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .reel__item { max-width: none; margin-inline: 0; }
}

/* Galerie portfolio : grille, horizontales en pleine largeur */
@media (min-width: 1024px) {
  body.page-portfolio .gallery {
    columns: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 4px;
    gap: 0;
    align-items: start;
  }
  body.page-portfolio .gallery__item { margin-bottom: 0; padding-bottom: 0; background: transparent; }
  body.page-portfolio .gallery__item--full { grid-column: 1 / -1; }
  body.page-portfolio .gallery__item img { display: block; }
}
@media (max-width: 1023px) {
  body.page-portfolio .gallery { column-gap: 0; }
  body.page-portfolio .gallery__item { margin-bottom: 0; }
}
.gallery__cap { padding-top: .5rem; font-size: .78rem; line-height: 1.4; }

/* Bouton de lecture quand l'autoplay est bloque (mode eco iOS) */
.has-play { position: relative; }
.vplay {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-items: center;
  background: rgba(22,19,15,.22);
}
.vplay::before {
  content: ''; width: 0; height: 0;
  border-left: 22px solid var(--bg);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,.35));
  translate: 3px 0;
}

/* Mobile : dans Univers, le texte passe au-dessus du visuel */
@media (max-width: 767px) {
  #univers .split { display: flex; flex-direction: column; gap: var(--gap); }
  #univers .split > .stack { order: 1; }
  #univers .split > .media { order: 2; }
}
.hero__pitch { max-width: 52ch; }
