/* POSTNIGHT — styles des composants (logo, boutons, galerie, lecteur du showreel, formulaire…).
   Fichier généré par tools/build_theme.py à partir de la maquette index.html : modifier la maquette, puis régénérer. */

/* ══════════════════════════════════════════════════════════════════════
   0. BASE & TOKENS
   ══════════════════════════════════════════════════════════════════════ */
:root {
  --ink: #050505;
  --coal: #0a0a0a;
  --bone: #f3f2ee;
  --smoke: #8e8e89;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .24);
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* marge latérale : jamais sous 20px, et dégagée des encoches / barres système */
  --gutter: max(clamp(1.25rem, 4vw, 4rem), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 72px;
  color-scheme: dark;
}
@media (min-width: 1024px) { :root { --header-h: 88px; } }

html { background: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.is-locked { overflow: hidden; }
body {
  background: var(--ink); color: var(--bone);
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 300;
  font-size: 1rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; overflow-x: clip;
}
[hidden] { display: none !important; }
::selection { background: var(--bone); color: var(--ink); }
section[id] { scroll-margin-top: calc(var(--header-h) - 1px); }
:focus-visible { outline: 1px solid var(--bone); outline-offset: 4px; }
* { scrollbar-width: thin; scrollbar-color: #2a2a2a var(--ink); }

/* Typographie utilitaire */
.label {
  font-family: Inter, sans-serif; font-size: .6875rem; line-height: 1.5; font-weight: 400;
  letter-spacing: .3em; text-transform: uppercase; color: var(--smoke);
}
.h2 {
  font-family: "Inter Tight", Inter, sans-serif; font-weight: 200;
  font-size: clamp(2.1rem, 4.9vw, 4.9rem); line-height: 1.05; letter-spacing: -.022em;
}

/* ══════════════════════════════════════════════════════════════════════
   1. COMPOSANT — LOGO « POST+ NIGHT » (cadre rectangulaire)
   ══════════════════════════════════════════════════════════════════════ */
.logo { display: inline-flex; align-items: center; color: var(--bone); --logo-fill: transparent; --logo-ink: currentColor; }
.logo svg { display: block; width: auto; height: 2.125rem; overflow: visible; }
@media (min-width: 1024px) { .logo svg { height: 2.5rem; } }
.logo--lg svg { height: 4.5rem; }

/* Slogan « IA + SAVOIR-FAIRE » : accolé au logo dans le header (≥ 1024 px),
   sous le logo à l’écran d’intro, en grand dans le footer. */
.tagline {
  font-family: "Inter Tight", Inter, sans-serif; font-weight: 500; font-size: .6875rem; line-height: 1;
  letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: var(--bone);
}
.logo__slogan { display: none; margin-left: .95rem; padding: .6rem 0 .6rem .95rem; border-left: 1px solid var(--line-strong); }
@media (min-width: 1024px) { .logo__slogan { display: block; } }
.slogan {
  font-family: "Inter Tight", Inter, sans-serif; font-weight: 500; font-size: clamp(1.75rem, 4.6vw, 4rem); line-height: 1;
  letter-spacing: -.01em; text-transform: uppercase; white-space: nowrap; color: var(--bone);
}
a.logo:hover, a.logo:focus-visible { --logo-fill: var(--bone); --logo-ink: var(--ink); }
/* Tracés du symbole #logo-postnight (défini au début du corps de page) */
.logo-frame { fill: var(--logo-fill, transparent); stroke: currentColor; stroke-width: 4.5; transition: fill .6s var(--ease); }
.logo-ink {
  fill: var(--logo-ink, currentColor); transition: fill .6s var(--ease);
  font-family: Montserrat, "Inter Tight", "Helvetica Neue", Arial, sans-serif; font-weight: 600; font-size: 57px;
}

/* ══════════════════════════════════════════════════════════════════════
   2. COMPOSANTS — BOUTONS & LIENS
   ══════════════════════════════════════════════════════════════════════ */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: .95rem;
  padding: 1.1rem 1.75rem; border: 1px solid var(--line-strong);
  font-size: .6875rem; font-weight: 400; letter-spacing: .28em; text-transform: uppercase;
  color: var(--bone); white-space: nowrap; cursor: pointer;
  transition: color .6s var(--ease), border-color .6s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bone);
  transform: translateY(101%); transition: transform .7s var(--ease);
}
.btn:hover, .btn:focus-visible { color: var(--ink); border-color: var(--bone); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn--solid { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.btn--solid::before { background: var(--ink); }
.btn--solid:hover, .btn--solid:focus-visible { color: var(--bone); }
.btn--sm { padding: .8rem 1.25rem; font-size: .625rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }
/* Bouton Contact du header : masqué sous 1024 px (le menu mobile prend le relais).
   Géré ici plutôt qu’avec des utilitaires Tailwind, pour ne pas dépendre de l’ordre des feuilles de style. */
.header-cta { display: none; }
@media (min-width: 1024px) { .header-cta { display: inline-flex; } }
.btn__arrow { position: relative; width: 18px; height: 1px; background: currentColor; transition: width .6s var(--ease); }
.btn__arrow::after {
  content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px;
  border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg);
}
.btn:hover .btn__arrow { width: 30px; }

.link { position: relative; display: inline-block; }
.link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease);
}
.link:hover::after, .link:focus-visible::after, .link[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.link--on::after { transform: scaleX(1); }
.link--on:hover::after { transform: scaleX(0); transform-origin: right; }

/* ══════════════════════════════════════════════════════════════════════
   3. ANIMATIONS D’ENTRÉE (pilotées par IntersectionObserver)
   ══════════════════════════════════════════════════════════════════════ */
.js [data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Titres découpés mot à mot (data-split) : montée sous masque */
.split .w {
  display: inline-block; overflow: hidden; vertical-align: top;
  padding: .14em .04em .18em; margin: -.14em -.04em -.18em;
}
.split .w > span {
  display: inline-block; transform: translateY(118%);
  transition: transform 1.35s var(--ease);
  transition-delay: calc(var(--d, 0ms) + var(--wi, 0) * 42ms);
}
.split.is-in .w > span { transform: none; }

/* ══════════════════════════════════════════════════════════════════════
   4. PRELOADER · GRAIN · CURSEUR
   ══════════════════════════════════════════════════════════════════════ */
.preloader { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: var(--ink); }
.js .preloader { display: grid; animation: preloader-out 1s var(--ease) 1.55s forwards; }
.preloader__inner { display: flex; flex-direction: column; align-items: center; opacity: 0; animation: fade-in .9s ease .1s forwards; }
.preloader__bar { width: 132px; height: 1px; margin-top: 30px; background: var(--line); overflow: hidden; }
.preloader__bar i { display: block; height: 100%; background: var(--bone); transform: scaleX(0); transform-origin: left; animation: bar 1.3s var(--ease) .2s forwards; }
@keyframes preloader-out { to { transform: translateY(-100%); visibility: hidden; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes bar { to { transform: scaleX(1); } }

/* Grain argentique global, très léger */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Curseur de la galerie : le monogramme « + » remplace le pointeur au survol des visuels.
   Le fond sombre translucide le garde lisible sur les images claires comme sur les sombres.
   .has-cursor est posé par JS, uniquement sur les appareils à souris. */
.cursor { position: fixed; top: 0; left: 0; z-index: 70; pointer-events: none; will-change: transform; color: var(--bone); }
.cursor__mark {
  width: 4.5rem; height: 4.5rem; margin: -2.25rem 0 0 -2.25rem;
  background: rgba(5, 5, 5, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transform: scale(0) rotate(-90deg); transition: transform .6s var(--ease);
}
.cursor__mark svg { display: block; width: 100%; height: 100%; }
.cursor.is-on .cursor__mark { transform: none; }
.has-cursor .work__open { cursor: none; }

/* ══════════════════════════════════════════════════════════════════════
   5. HEADER & MENU MOBILE
   ══════════════════════════════════════════════════════════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding-top: var(--safe-top);
  border-bottom: 1px solid transparent;
  transition: background-color .6s var(--ease), border-color .6s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(5, 5, 5, .72); border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(120%); backdrop-filter: blur(18px) saturate(120%);
}
.menu-open .site-header { background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.nav-link { font-size: .6875rem; font-weight: 400; letter-spacing: .28em; text-transform: uppercase; color: var(--smoke); transition: color .5s var(--ease); }
.nav-link:hover, .nav-link[aria-current="true"] { color: var(--bone); }

.menu-toggle { position: relative; width: 44px; height: 44px; margin-right: -10px; }
.menu-toggle span { position: absolute; left: 10px; right: 10px; height: 1px; background: var(--bone); transition: transform .6s var(--ease), top .6s var(--ease); }
.menu-toggle span:nth-child(1) { top: 18px; }
.menu-toggle span:nth-child(2) { top: 26px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column;
  padding: calc(var(--header-h) + 3rem + var(--safe-top)) var(--gutter) calc(2.5rem + var(--safe-bottom)); background: var(--ink);
  opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s .6s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transition: opacity .6s var(--ease), visibility 0s; }
.mobile-menu__link {
  display: flex; align-items: baseline; gap: 1.25rem; padding: .55rem 0;
  font-family: "Inter Tight", sans-serif; font-weight: 200; font-size: clamp(2.5rem, 12vw, 4rem); line-height: 1.1; letter-spacing: -.02em;
  opacity: 0; transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i) * 70ms + 120ms);
}
.mobile-menu.is-open .mobile-menu__link { opacity: 1; transform: none; }

/* ══════════════════════════════════════════════════════════════════════
   6. LECTEUR DU SHOWREEL
   La vidéo porte déjà ses propres titres et sa ligne de temps : les
   commandes du lecteur sont donc placées sous l’image, jamais dessus.
   ══════════════════════════════════════════════════════════════════════ */
.reel {
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
  /* largeur du lecteur : toute la colonne, mais jamais plus haut que l’écran
     (image 16:9 + commandes + chapitres restent visibles ensemble) */
  --reel-w: min(100%, max(20rem, calc((100vh - var(--header-h) - 14rem) * 16 / 9)));
}
.reel > * { width: var(--reel-w); max-width: 100%; margin-inline: auto; }
/* Téléphone tenu à la verticale : le reel 9:16 occupe la hauteur de l’écran */
.reel.is-portrait { --reel-w: min(100%, max(14rem, calc((100vh - var(--header-h) - 12.5rem) * 9 / 16))); }
.reel.is-portrait .reel__stage { aspect-ratio: 9 / 16; }
.reel__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.reel__stage { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
/* Deux lecteurs empilés : seul celui marqué .is-front est visible */
.reel__video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.reel__video.is-front { opacity: 1; }
.reel__stage:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; }
.reel__stage:fullscreen .reel__video { object-fit: contain; }
.reel__toggle { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.reel__toggle:focus-visible { outline-offset: -6px; }
.reel__disc {
  display: grid; place-items: center; width: 6rem; height: 6rem; border-radius: 50%;
  background: var(--bone); color: var(--ink);
  font-size: .5625rem; font-weight: 500; letter-spacing: .28em; text-indent: .28em; text-transform: uppercase;
  transition: transform .6s var(--ease), opacity .4s ease;
}
.reel__toggle:hover .reel__disc { transform: scale(1.08); }
/* Pendant la lecture, rien ne recouvre l’image (y compris en plein écran) :
   la pastille « Lire » ne revient que lorsque la vidéo est en pause. */
.reel.is-playing .reel__disc { opacity: 0; transform: scale(.6); }

.reel__bar { display: flex; align-items: center; gap: 1.25rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.reel__play {
  position: relative; flex: none; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer;
  transition: background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease);
}
.reel__play:hover { background: var(--bone); border-color: var(--bone); color: var(--ink); }
.reel__play::before {   /* triangle « lecture » */
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%);
  border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor;
}
.reel.is-playing .reel__play::before {   /* deux barres « pause » */
  width: 10px; height: 12px; transform: translate(-50%, -50%);
  border-width: 0 3px; border-color: currentColor;
}
.reel__time { flex: none; font-size: .6875rem; letter-spacing: .18em; color: var(--mist, #c9c8c3); font-variant-numeric: tabular-nums; }
.reel__progress { position: relative; flex: 1; min-width: 0; height: 2.75rem; cursor: pointer; touch-action: none; }
.reel__progress::before, .reel__fill { content: ""; position: absolute; left: 0; right: 0; top: 50%; }
.reel__progress::before { height: 1px; background: rgba(255, 255, 255, .22); }
.reel__fill { height: 2px; margin-top: -.5px; background: var(--bone); transform: scaleX(0); transform-origin: left; }
.reel__tick { position: absolute; top: calc(50% - 5px); width: 1px; height: 11px; background: rgba(255, 255, 255, .5); }
.reel__fs { flex: none; padding: .75rem 0; cursor: pointer; transition: color .5s var(--ease); }
.reel__fs:hover { color: var(--bone); }

@media (max-width: 639px) {   /* mobile : la ligne de temps passe sur sa propre ligne */
  .reel__bar { flex-wrap: wrap; row-gap: 0; }
  .reel__progress { order: 3; flex-basis: 100%; }
  .reel__fs { margin-left: auto; }
}

/* Chapitres : colonnes égales si la place le permet, sinon défilement horizontal */
.reel__chapters { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(max-content, 1fr); overflow-x: auto; scrollbar-width: none; }
.reel__chapters::-webkit-scrollbar { display: none; }
.reel__chapter {
  display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; align-items: baseline; width: 100%;
  padding: 1.1rem 2rem 1.2rem 0; text-align: left; cursor: pointer; color: var(--smoke);
  border-bottom: 1px solid var(--line); transition: color .5s var(--ease), border-color .5s var(--ease);
}
.reel__chapter b { font-size: .625rem; font-weight: 400; letter-spacing: .26em; }
.reel__chapter span { font-family: "Inter Tight", sans-serif; font-weight: 300; font-size: 1.0625rem; letter-spacing: -.005em; white-space: nowrap; }
.reel__chapter time { grid-column: 2; font-size: .625rem; letter-spacing: .22em; font-variant-numeric: tabular-nums; opacity: .7; }
.reel__chapter:hover, .reel__chapter.is-active { color: var(--bone); }
.reel__chapter.is-active { border-bottom-color: var(--bone); }
.reel.is-unavailable .reel__toggle, .reel.is-unavailable .reel__bar, .reel.is-unavailable .reel__chapters { display: none; }

.play-ico { width: 0; height: 0; border-style: solid; border-width: 4px 0 4px 7px; border-color: transparent transparent transparent currentColor; }

/* ══════════════════════════════════════════════════════════════════════
   7. HERO
   ══════════════════════════════════════════════════════════════════════ */
.hero__stage { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #070707; }
.hero__scene {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%);
  opacity: 0; transform: scale(1.1);
  transition: opacity 2.4s ease, transform 10s linear;
}
.hero__scene.is-active { opacity: 1; transform: scale(1); }
.hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(5,5,5,.95) 0%, rgba(5,5,5,.7) 40%, rgba(5,5,5,.18) 70%, rgba(5,5,5,.6) 100%),
    linear-gradient(to right, rgba(5,5,5,.6), rgba(5,5,5,0) 66%);
}
.hero__title {
  font-family: "Inter Tight", Inter, sans-serif; font-weight: 200;
  font-size: clamp(3.5rem, 10.5vw, 10.5rem); line-height: .95; letter-spacing: -.04em;
}
.hero__caption { transition: opacity .4s ease; }
.hero__caption.is-swapping { opacity: 0; }

.hero__tick { position: relative; width: clamp(28px, 4vw, 56px); height: 24px; cursor: pointer; }
.hero__tick::before, .hero__tick i { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; }
.hero__tick::before { background: rgba(255, 255, 255, .22); }
.hero__tick i { background: var(--bone); transform: scaleX(0); transform-origin: left; }
.hero__tick.is-active i { animation: tick var(--dur, 7s) linear forwards; }
@keyframes tick { to { transform: scaleX(1); } }

.scroll-line { position: relative; width: 48px; height: 1px; overflow: hidden; background: rgba(255, 255, 255, .22); }
.scroll-line::after { content: ""; position: absolute; inset: 0; background: var(--bone); transform: translateX(-100%); animation: scroll-line 2.6s var(--ease) infinite; }
@keyframes scroll-line { 60%, 100% { transform: translateX(100%); } }

/* ══════════════════════════════════════════════════════════════════════
   8. BANDEAU EXPERTISES (marquee)
   ══════════════════════════════════════════════════════════════════════ */
.marquee { overflow: hidden; }
.marquee__track { display: flex; width: max-content; animation: marquee 56s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; flex-shrink: 0; align-items: center; }
.marquee__group span {
  font-family: "Inter Tight", sans-serif; font-weight: 200; font-size: clamp(1.6rem, 3.4vw, 3.1rem);
  letter-spacing: -.01em; white-space: nowrap; color: var(--bone);
}
.marquee__group i { margin: 0 clamp(1.5rem, 3vw, 3rem); font-style: normal; font-weight: 200; font-size: clamp(1.2rem, 2.4vw, 2rem); color: var(--smoke); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ══════════════════════════════════════════════════════════════════════
   8 bis. FILIGRANE « + » — frise de croix (grasse, moyenne, fine) posée à
   cheval sur la jonction entre deux sections. Sa hauteur est nulle : elle
   ne décale aucun contenu et reste dans les marges des sections.
   Le module JS « Filigrane » tire au hasard, à chaque chargement, les
   jonctions qui l’affichent, le nombre de rangs et le décalage du motif.
   ══════════════════════════════════════════════════════════════════════ */
.plus-rule { position: relative; z-index: 3; height: 0; pointer-events: none; }
.plus-rule__band {
  --row: clamp(2.5rem, 4.4vw, 4rem);   /* hauteur d’un rang de croix */
  position: absolute; left: 0; right: 0; top: 0; height: calc(var(--row) * var(--rows, 3)); transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 336 372' fill='%23fff'%3E%3Cpath d='M20 51h72v22h-72zM45 26h22v72h-22zM132 55h72v14h-72zM161 26h14v72h-14zM244 60h72v4h-72zM278 26h4v72h-4zM20 184h72v4h-72zM54 150h4v72h-4zM132 179h72v14h-72zM161 150h14v72h-14zM244 175h72v22h-72zM269 150h22v72h-22zM20 299h72v22h-72zM45 274h22v72h-22zM132 303h72v14h-72zM161 274h14v72h-14zM244 308h72v4h-72zM278 274h4v72h-4z'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-size: auto calc(var(--row) * 3);
  background-position: var(--shift, 0px) calc(var(--row) * var(--from, 0) * -1);
  opacity: .12;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

/* ══════════════════════════════════════════════════════════════════════
   9. GALERIE — filtres, grille asymétrique, cartes projet
   ══════════════════════════════════════════════════════════════════════ */
.filter {
  position: relative; padding: .35rem 0; cursor: pointer;
  font-size: .6875rem; font-weight: 400; letter-spacing: .28em; text-transform: uppercase;
  color: var(--smoke); transition: color .5s var(--ease);
}
.filter::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--bone);
  transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease);
}
.filter:hover, .filter.is-active { color: var(--bone); }
.filter.is-active::after { transform: scaleX(1); transform-origin: left; }
.filter sup { top: -.9em; margin-left: .45em; font-size: .5rem; letter-spacing: .1em; opacity: .65; }

/* Grille des travaux
   < 1024 px : maçonnerie en colonnes, chaque visuel à son format natif (--ratio).
   ≥ 1024 px : grille 12 colonnes art-dirigée. Le gabarit vient de data-slot
   (1 → 10), attribué par JS aux cartes visibles, dans l’ordre : la
   composition reste maîtrisée quel que soit le filtre actif. */
.works { column-count: 1; column-gap: clamp(1.25rem, 2.4vw, 2.5rem); }
.work {
  position: relative; overflow: hidden; break-inside: avoid; background: #0b0b0b;
  max-width: 100%; aspect-ratio: var(--ratio, 4 / 5); margin-bottom: clamp(1.25rem, 2.4vw, 2.5rem);
  min-height: 15.5rem;   /* les formats très larges gardent la place de leur légende */
  transition: opacity .9s var(--ease), transform 1.2s var(--ease);
  transition-delay: calc(var(--stagger, 0) * 1ms);
}
.reel { column-span: all; margin-bottom: clamp(2.25rem, 5vw, 4.5rem); }
.js .work:not(.is-in) { opacity: 0; transform: translateY(48px); }
.works.is-switching .work, .works.is-switching .reel { opacity: 0; transform: translateY(16px); transition-duration: .32s; transition-delay: 0ms; }

@media (min-width: 640px) { .works { column-count: 2; } }
@media (min-width: 1024px) {
  .works { display: grid; grid-template-columns: repeat(12, 1fr); row-gap: clamp(2.5rem, 5.5vw, 6rem); }
  .work { grid-column: span 4; align-self: start; margin-bottom: 0; min-height: 0; }
  .reel { grid-column: 1 / -1; margin-bottom: 0; }
  .work[data-slot="1"]  { grid-column: 1 / span 7;  aspect-ratio: 7 / 5; }
  .work[data-slot="2"]  { grid-column: 9 / span 4;  aspect-ratio: 4 / 5; margin-top: clamp(4rem, 9vw, 9rem); }
  .work[data-slot="3"]  { grid-column: 1 / span 4;  aspect-ratio: 4 / 5; }
  .work[data-slot="4"]  { grid-column: 5 / span 4;  aspect-ratio: 4 / 5; margin-top: clamp(3rem, 7vw, 7rem); }
  .work[data-slot="5"]  { grid-column: 9 / span 4;  aspect-ratio: 4 / 5; }
  .work[data-slot="6"]  { grid-column: 2 / span 4;  aspect-ratio: 4 / 5; }
  .work[data-slot="7"]  { grid-column: 7 / span 6;  aspect-ratio: 3 / 2; align-self: end; }
  .work[data-slot="8"]  { grid-column: 1 / -1;      aspect-ratio: 21 / 9; }
  .work[data-slot="9"]  { grid-column: 1 / span 6;  aspect-ratio: 3 / 2; }
  .work[data-slot="10"] { grid-column: 7 / span 6;  aspect-ratio: 3 / 2; margin-top: clamp(3rem, 7vw, 7rem); }
}

.work__media { position: absolute; inset: 0; }
.work__media > * {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%);
  transform: scale(1.015); transition: transform 1.9s var(--ease);
}
.work__shade {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .7s var(--ease);
  background: linear-gradient(to top, rgba(5,5,5,.9) 0%, rgba(5,5,5,.28) 42%, rgba(5,5,5,0) 66%);
}
/* Repères de cadrage « + » aux quatre angles (clin d’œil au logo) */
.work__marks {
  --c: rgba(255, 255, 255, .85);
  position: absolute; inset: 10px; pointer-events: none; opacity: 0;
  transition: opacity .6s var(--ease), inset .9s var(--ease);
  background:
    linear-gradient(var(--c), var(--c)) left 0 top 5px / 11px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left 5px top 0 / 1px 11px no-repeat,
    linear-gradient(var(--c), var(--c)) right 0 top 5px / 11px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right 5px top 0 / 1px 11px no-repeat,
    linear-gradient(var(--c), var(--c)) left 0 bottom 5px / 11px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left 5px bottom 0 / 1px 11px no-repeat,
    linear-gradient(var(--c), var(--c)) right 0 bottom 5px / 11px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right 5px bottom 0 / 1px 11px no-repeat;
}
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--bone); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.work__caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.9rem; pointer-events: none; }
.work__title { overflow: hidden; font-family: "Inter Tight", sans-serif; font-weight: 300; font-size: clamp(1.4rem, 2.1vw, 2.1rem); line-height: 1.12; letter-spacing: -.012em; }
.work__title span { display: block; transform: translateY(112%); transition: transform .95s var(--ease); }
.work__meta, .work__tags { opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease), transform .9s var(--ease); }
.work__meta { margin-top: .45rem; font-size: .8125rem; color: rgba(243, 242, 238, .7); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li { padding: .4rem .6rem .38rem; border: 1px solid rgba(255, 255, 255, .3); font-size: .5625rem; font-weight: 400; letter-spacing: .24em; text-transform: uppercase; color: var(--bone); }
.work__tags { margin-top: 1rem; }
.work__open { position: absolute; inset: 0; z-index: 2; cursor: pointer; }
.work__open:focus-visible { outline-offset: -6px; }

/* États survol / focus clavier */
.work:hover .work__media > *, .work:focus-within .work__media > * { transform: scale(1.07); }
.work:hover .work__shade, .work:focus-within .work__shade { opacity: 1; }
.work:hover .work__marks, .work:focus-within .work__marks { opacity: 1; inset: 16px; }
.work:hover .work__title span, .work:focus-within .work__title span { transform: none; }
.work:hover .work__meta, .work:focus-within .work__meta { opacity: 1; transform: none; transition-delay: .08s; }
.work:hover .work__tags, .work:focus-within .work__tags { opacity: 1; transform: none; transition-delay: .16s; }
/* Écrans tactiles : légendes toujours visibles */
@media (hover: none) {
  .work__shade { opacity: 1; }
  .work__title span { transform: none; }
  .work__meta, .work__tags { opacity: 1; transform: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   10. VISIONNEUSE (lightbox)
   ══════════════════════════════════════════════════════════════════════ */
.lightbox { position: fixed; inset: 0; z-index: 80; overflow-y: auto; background: rgba(5, 5, 5, .985); opacity: 0; transition: opacity .5s var(--ease); }
.lightbox.is-open { opacity: 1; }
.lightbox__inner {
  --lb-h: 54vh;
  display: grid; align-items: center; gap: 2.5rem; min-height: 100%;
  padding: calc(5.5rem + var(--safe-top)) var(--gutter) calc(2.5rem + var(--safe-bottom)); transition: opacity .25s ease;
}
.lightbox__inner.is-swapping { opacity: 0; }
@media (min-width: 1024px) {
  .lightbox__inner { --lb-h: calc(100vh - 9rem); grid-template-columns: minmax(0, 1fr) 340px; gap: 4.5rem; padding-top: calc(4.5rem + var(--safe-top)); padding-bottom: calc(4.5rem + var(--safe-bottom)); }
}
.lightbox__media {
  position: relative; justify-self: center; overflow: hidden; background: #0b0b0b;
  width: min(100%, calc(var(--lb-h) * var(--r, 1))); aspect-ratio: var(--r, 1);
  opacity: 0; transform: scale(.97); transition: transform 1.1s var(--ease), opacity .7s ease;
}
.lightbox.is-open .lightbox__media { opacity: 1; transform: none; }
.lightbox__media > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lightbox__close { position: absolute; top: calc(1.25rem + var(--safe-top)); right: var(--gutter); z-index: 3; display: inline-flex; align-items: center; gap: .9rem; padding: .75rem 0; cursor: pointer; }
.lightbox__close i { position: relative; width: 18px; height: 18px; }
.lightbox__close i::before, .lightbox__close i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--bone); transform: rotate(45deg); transition: transform .6s var(--ease); }
.lightbox__close i::after { transform: rotate(-45deg); }
.lightbox__close:hover i::before { transform: rotate(135deg); }
.lightbox__close:hover i::after { transform: rotate(45deg); }

/* ══════════════════════════════════════════════════════════════════════
   11. MANIFESTE
   ══════════════════════════════════════════════════════════════════════ */
.statement__text { font-family: "Inter Tight", sans-serif; font-weight: 200; font-size: clamp(2.7rem, 8.6vw, 8.75rem); line-height: 1; letter-spacing: -.035em; }

/* ══════════════════════════════════════════════════════════════════════
   12. APPROCHE — 3 colonnes
   ══════════════════════════════════════════════════════════════════════ */
.step { position: relative; display: flex; flex-direction: column; padding: 2.75rem 0 3.25rem; border-top: 1px solid var(--line); }
.step::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 1px; background: var(--bone);
  transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease);
}
.step:hover::before { transform: scaleX(1); }
@media (min-width: 1024px) {
  .step { padding: 3.25rem 3rem 3.5rem; border-left: 1px solid var(--line); }
  .step:first-child { padding-left: 0; border-left: 0; }
  .step:last-child { padding-right: 0; }
}
.step__num {
  font-family: "Inter Tight", sans-serif; font-weight: 200; font-size: clamp(3.75rem, 6.2vw, 5.75rem); line-height: .9; letter-spacing: -.03em;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .42);
  transition: color .9s var(--ease), -webkit-text-stroke-color .9s var(--ease);
}
.step:hover .step__num { color: var(--bone); -webkit-text-stroke-color: var(--bone); }
.step__title { margin-top: 2.5rem; font-family: "Inter Tight", sans-serif; font-weight: 300; font-size: clamp(1.4rem, 1.9vw, 1.75rem); line-height: 1.2; letter-spacing: -.012em; }
.step__text { margin-top: 1.25rem; font-size: .9375rem; line-height: 1.75; color: var(--smoke); }
.step__text + .step__list { margin-top: auto; padding-top: 2rem; }   /* listes alignées en pied de colonne */
.step__list li { display: flex; gap: .9rem; padding: .7rem 0; border-top: 1px solid var(--line); font-size: .6563rem; letter-spacing: .22em; text-transform: uppercase; color: var(--mist, #c9c8c3); }
.step__list li::before { content: "+"; color: var(--smoke); }

/* ══════════════════════════════════════════════════════════════════════
   13. SECTEURS — quatre cartes illustrées. Le visuel reste en retrait et
   s’éclaire au survol (toujours visible sur écran tactile).
   ══════════════════════════════════════════════════════════════════════ */
.sector { position: relative; display: flex; align-items: flex-end; overflow: hidden; max-width: 100%; aspect-ratio: 3 / 4; background: #0b0b0b; }
.sector img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5;
  transform: scale(1.03); transition: opacity .9s var(--ease), transform 2s var(--ease);
}
.sector::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,5,5,.92) 0%, rgba(5,5,5,.35) 45%, rgba(5,5,5,.1) 100%); }
.sector__body { position: relative; z-index: 1; min-width: 0; padding: clamp(1rem, 2vw, 1.75rem); }
.sector h3 { margin-top: .9rem; font-family: "Inter Tight", sans-serif; font-weight: 200; font-size: clamp(1.6rem, 3vw, 3rem); line-height: 1; letter-spacing: -.025em; }
.sector__body p:last-child { margin-top: .7rem; font-size: clamp(.75rem, 1vw, .875rem); line-height: 1.5; color: var(--mist, #c9c8c3); }
@media (hover: hover) {
  .sector:hover img { opacity: .95; transform: scale(1.09); }
  .sectors:hover .sector:not(:hover) img { opacity: .28; }
}
@media (hover: none) { .sector img { opacity: .7; } }

/* ══════════════════════════════════════════════════════════════════════
   13 bis. RUBAN — frise d’images en défilement lent
   ══════════════════════════════════════════════════════════════════════ */
.ribbon { --gap: clamp(.6rem, 1.2vw, 1.25rem); overflow: hidden; border-top: 1px solid var(--line); padding: var(--gap) 0; background: var(--ink); }
.ribbon__track { display: flex; width: max-content; animation: marquee 90s linear infinite; }
.ribbon:hover .ribbon__track { animation-play-state: paused; }
.ribbon__group { display: flex; flex-shrink: 0; gap: var(--gap); padding-right: var(--gap); }
.ribbon img { display: block; width: auto; max-width: none; height: clamp(10rem, 21vw, 19rem); background: #0e0e0e; }

/* ══════════════════════════════════════════════════════════════════════
   14. FORMULAIRE DE CONTACT
   ══════════════════════════════════════════════════════════════════════ */
.field { position: relative; padding-top: 1.5rem; }
.field input, .field textarea {
  display: block; width: 100%; padding: .7rem 0 .95rem; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  background: transparent; color: var(--bone); font: 300 1.0625rem/1.5 Inter, sans-serif; outline: none; resize: none;
  transition: border-color .5s var(--ease);
}
.field input:focus, .field textarea:focus { border-bottom-color: var(--bone); }
.field label {
  position: absolute; left: 0; top: 2.3rem; pointer-events: none; transform-origin: left top;
  font-size: .6875rem; letter-spacing: .3em; text-transform: uppercase; color: var(--smoke);
  transition: transform .5s var(--ease), color .5s var(--ease);
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-1.9rem) scale(.86); color: var(--bone); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--bone); box-shadow: 0 0 0 100px var(--coal) inset; caret-color: var(--bone); }
.field__error { display: none; margin-top: .55rem; font-size: .75rem; color: #dcaea3; }
.field.has-error input, .field.has-error textarea { border-bottom-color: #dcaea3; }
.field.has-error .field__error { display: block; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }   /* champ piège anti-robots, invisible */
.form-error { font-size: .8125rem; line-height: 1.6; color: #dcaea3; }

.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; padding: .72rem 1.1rem .7rem; border: 1px solid var(--line-strong); cursor: pointer;
  font-size: .625rem; letter-spacing: .26em; text-transform: uppercase; color: var(--smoke);
  transition: color .5s var(--ease), border-color .5s var(--ease), background-color .5s var(--ease);
}
.chip:hover span { color: var(--bone); border-color: var(--bone); }
.chip input:checked + span { background: var(--bone); border-color: var(--bone); color: var(--ink); }
.chip input:focus-visible + span { outline: 1px solid var(--bone); outline-offset: 3px; }

/* ══════════════════════════════════════════════════════════════════════
   15. FOOTER
   ══════════════════════════════════════════════════════════════════════ */
.footer-logo svg { width: clamp(6.5rem, 13vw, 10.5rem); height: auto; }

/* ══════════════════════════════════════════════════════════════════════
   16. ACCESSIBILITÉ — mouvement réduit
   ══════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .marquee__track { animation: none !important; }
}
