/* ============================================================
   SmatchRoom — Siège du groupe
   Système 2.5D cinématique · zéro WebGL · visuels 100% génératifs
   Techniques (catalogue epic-design) :
   - Depth system 6 niveaux (0→5) avec parallaxe/blur/scale
   - Cascading card stack (sticky) pour les 4 filiales
   - Clip-path birth reveals (top-down, iris, curtain)
   - Word-by-word scroll lighting (manifeste)
   - Split converge + masked line reveal (h1)
   - Float loops (orbit / breathe / drift)
   - Magnetic hover + tilt sur les cartes
   ============================================================ */

/* ---------- 1. Fonts (auto-hébergées) ---------- */
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/instrument-serif.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/instrument-serif-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('fonts/geist-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/geist-mono-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- 2. Tokens ---------- */
:root {
  /* Base — nuit d'atelier, jamais du noir pur */
  --ink-900: #05070c;
  --ink-800: #080b12;
  --ink-700: #0d1119;
  --ink-600: #141a25;
  --line: rgba(197, 212, 240, 0.12);
  --line-strong: rgba(197, 212, 240, 0.28);

  /* Texte */
  --paper: #f2f5fb;
  --paper-dim: #c3cbdb;
  --muted: #93a0b8;

  /* Signature du siège */
  --siege: #93b4ff;
  --siege-deep: #2f5bff;

  /* Filiales */
  --app: #59c0bc;
  --pro: #e0a84a;
  --emargeo: #f97415;
  --pulse: #a855f7;
  --aideetfeu: #f04438;

  /* Accent actif (surchargé par chapitre) */
  --accent: var(--siege);

  /* Profondeurs — facteurs de parallaxe */
  --d0: 0.10;
  --d1: 0.25;
  --d2: 0.50;
  --d3: 0.80;
  --d4: 1.00;
  --d5: 1.20;

  /* Rythme typographique */
  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.85rem);
  --step-0: clamp(0.95rem, 0.9rem + 0.25vw, 1.06rem);
  --step-1: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.5rem + 2.4vw, 3.4rem);
  --step-4: clamp(2.4rem, 1.5rem + 4vw, 5rem);
  --step-5: clamp(2.9rem, 1.5rem + 5.2vw, 6.4rem);

  --gutter: clamp(1.25rem, 4vw, 5rem);
  --maxw: 1560px;

  /* Grain génératif (SVG turbulence, tuilé) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ---------- 3. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ink-900);
  color: var(--paper);
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--step-0);
  font-weight: 350;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: color-mix(in oklab, var(--accent) 40%, transparent); color: #fff; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: var(--gutter);
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--paper);
  color: var(--ink-900);
  font-size: var(--step--1);
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. Utilitaires typographiques ---------- */
.serif {
  font-family: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
}
.serif em { font-style: italic; }
.mono {
  font-family: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: var(--step--1);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.dim { color: var(--muted); }

/* ---------- 5. Architecture des scènes ---------- */
.scene {
  position: relative;
  isolation: isolate;
  overflow: clip;
}
.layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-origin: center center;
}
.layer > * { pointer-events: none; }
.depth-0 { z-index: 0; filter: blur(3px); }
.depth-1 { z-index: 1; mix-blend-mode: screen; }
.depth-2 { z-index: 2; }
.depth-3 { z-index: 3; }
.depth-4 { z-index: 4; position: relative; pointer-events: auto; }
.depth-4 > * { pointer-events: auto; }
.depth-5 { z-index: 5; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 6. Fonds génératifs ---------- */
.mesh {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(38% 44% at 18% 22%, rgba(47, 91, 255, 0.30), transparent 68%),
    radial-gradient(32% 38% at 82% 12%, rgba(147, 180, 255, 0.16), transparent 70%),
    radial-gradient(46% 52% at 62% 88%, rgba(88, 60, 190, 0.24), transparent 72%),
    radial-gradient(30% 30% at 8% 82%, rgba(89, 192, 188, 0.12), transparent 70%);
  animation: mesh-drift 34s ease-in-out infinite alternate;
}
@keyframes mesh-drift {
  0% { transform: scale(1) translate3d(0, 0, 0); }
  50% { transform: scale(1.08) translate3d(-2%, 1.5%, 0); }
  100% { transform: scale(1.03) translate3d(1.5%, -1%, 0); }
}

.grain {
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  background-size: 180px 180px;
  opacity: 0.05;
  mix-blend-mode: overlay;
}

/* Grille « plan d'architecte » */
.blueprint {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: clamp(48px, 6vw, 96px) clamp(48px, 6vw, 96px);
  mask-image: radial-gradient(80% 70% at 50% 45%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 45%, #000 25%, transparent 78%);
  opacity: 0.7;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.5;
  contain: paint;
}
.glow--a {
  width: min(58vw, 720px); aspect-ratio: 1;
  left: -8%; top: 4%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 70%, transparent), transparent 68%);
  animation: breathe 15s ease-in-out infinite;
}
.glow--b {
  width: min(48vw, 620px); aspect-ratio: 1;
  right: -6%; bottom: -10%;
  background: radial-gradient(circle, rgba(47, 91, 255, 0.55), transparent 68%);
  animation: breathe 19s ease-in-out infinite reverse;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.42; }
  50% { transform: scale(1.14); opacity: 0.62; }
}

/* ---------- 7. Rideau d'ouverture ---------- */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  background: var(--ink-900);
  clip-path: inset(0 0 0 0);
}
.curtain__inner { text-align: center; }
.curtain__mark { width: 62px; margin-inline: auto; opacity: 0.9; }
.curtain__label {
  margin-top: 1.4rem;
  color: var(--muted);
  overflow: hidden;
}
.curtain__label span { display: inline-block; }
.curtain__bar {
  width: min(46vw, 260px);
  height: 1px;
  margin: 1.6rem auto 0;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}
.curtain__bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--siege), transparent);
  transform: translateX(-100%);
  animation: sweep 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes sweep { to { transform: translateX(100%); } }

/* ---------- 8. Header ---------- */
.head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.9rem, 1.6vw, 1.5rem) var(--gutter);
  mix-blend-mode: difference;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
/* Dès qu'on quitte le hall, la barre prend un fond : plus aucune collision de texte */
.head.is-stuck {
  mix-blend-mode: normal;
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.head__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  mix-blend-mode: normal;
}
.head__mark { width: 26px; flex: none; }
.head__name { letter-spacing: 0.2em; font-weight: 500; }
.head__name b { font-weight: 500; }
.head__name span { color: var(--muted); }
.head__meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}
.head__chapter {
  color: var(--paper-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(46vw, 420px);
}
.head__cta {
  flex: none;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.head__cta:hover { background: var(--paper); color: var(--ink-900); border-color: var(--paper); }

/* Progression du scroll */
.progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 101;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--siege), var(--accent));
}

/* Navigation par points */
.dots {
  position: fixed;
  right: clamp(0.5rem, 1vw, 1rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: grid;
  gap: 0.85rem;
}
.dots a {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-items: end;
  gap: 0.6rem;
}
.dots__label {
  font-family: 'Geist Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
}
.dots__dot {
  width: 22px; height: 1px;
  background: var(--line-strong);
  transition: background 0.3s, width 0.3s;
}
.dots a:hover .dots__label,
.dots a:focus-visible .dots__label { opacity: 1; transform: translateX(0); }
.dots a.is-active .dots__dot { background: var(--accent); width: 34px; }
.dots__label { background: rgba(5, 7, 12, 0.72); padding: 2px 6px; border-radius: 3px; }

/* ---------- 9. Hall (hero) ---------- */
.hall { min-height: 100svh; display: grid; }
.hall__inner {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-content: end;
  align-items: end;
  column-gap: clamp(2rem, 5vw, 5.5rem);
  row-gap: clamp(1.6rem, 4vh, 3rem);
  min-height: 100svh;
  padding: clamp(6rem, 13vh, 9rem) var(--gutter) clamp(3.5rem, 8vh, 5rem);
  max-width: var(--maxw);
  margin-inline: auto;
  width: 100%;
}
.hall__lead { display: grid; align-content: end; gap: clamp(1rem, 2.2vh, 1.9rem); }
.hall__eyebrow { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; color: var(--muted); }
.hall__title {
  font-size: clamp(2.6rem, 1.1rem + 3.6vw, 4.6rem);
  line-height: 1.04;
  max-width: 22ch;
}
/* Le masque du reveal doit laisser passer les jambages : sans cette réserve,
   overflow hidden coupe le g de siège et le q de cinq. */
.hall__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.2em;
  margin-bottom: -0.2em;
}
.hall__title .line > span { display: block; will-change: transform; }
.hall__title em { color: var(--siege); }
.hall__lede {
  max-width: 46ch;
  font-size: var(--step-1);
  color: var(--paper-dim);
  font-weight: 300;
}
.hall__actions { display: flex; flex-wrap: wrap; gap: 0.8rem 1rem; align-items: center; }
.hall__foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  padding-top: clamp(1.2rem, 3vh, 2rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* Boutons */
.btn {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink-900);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.02em;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.btn svg { flex: none; transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(4px); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--paper); }
.btn--accent { --btn-bg: var(--accent); --btn-fg: #06080d; }

/* Le standard — index des cinq destinations du groupe.
   Même grammaire que les chapitres : index mono, nom serif, métier mono, couleur du produit. */
.board {
  align-self: end;
  justify-self: end;
  width: 100%;
  max-width: 32rem;
  display: grid;
  gap: clamp(0.9rem, 2vh, 1.4rem);
}
.board__head { display: flex; align-items: center; gap: 0.9rem; color: var(--muted); }
.board__head::after {
  content: '';
  height: 1px; flex: 1;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
.board__list { border-top: 1px solid var(--line); }
.board__row { border-bottom: 1px solid var(--line); }
.board__row a {
  position: relative;
  display: grid;
  grid-template-columns: 2rem auto minmax(0, 1fr) 1rem;
  align-items: baseline;
  gap: 0 clamp(0.7rem, 1.2vw, 1.2rem);
  padding: clamp(0.8rem, 2.1vh, 1.45rem) 0.6rem;
  transition: padding-left 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
}
/* La ligne du produit se trace dans sa couleur au survol */
.board__row a::before {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  height: 1px; width: 0;
  background: var(--c);
  transition: width 0.55s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.board__row a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, color-mix(in oklab, var(--c) 14%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.board__row a:hover, .board__row a:focus-visible { padding-left: 1.1rem; }
.board__row a:focus-visible { outline-color: var(--c); }
.board__row a:hover::before, .board__row a:focus-visible::before { width: 100%; }
.board__row a:hover::after, .board__row a:focus-visible::after { opacity: 1; }
.board__idx { position: relative; color: var(--muted); transition: color 0.35s; }
.board__row a:hover .board__idx, .board__row a:focus-visible .board__idx { color: var(--c); }
.board__name { position: relative; font-size: var(--step-2); line-height: 1; white-space: nowrap; }
.board__job { position: relative; color: var(--muted); text-align: right; white-space: nowrap; }
.board__job b {
  margin-left: 0.6rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid color-mix(in oklab, var(--c) 45%, transparent);
  border-radius: 2px;
  color: var(--c);
  font-weight: 400;
}
.board__arrow {
  position: relative;
  align-self: center;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.35s, transform 0.35s, color 0.35s;
}
.board__row a:hover .board__arrow, .board__row a:focus-visible .board__arrow {
  opacity: 1;
  transform: none;
  color: var(--c);
}
@keyframes dash { to { stroke-dashoffset: -180; } }

/* Particules (canvas 2D génératif) */
.particles { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }

/* ---------- 10. Manifeste ---------- */
.manifeste { padding: clamp(4rem, 10vh, 8rem) 0; }
.manifeste__sticky {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: grid;
  align-content: center;
  gap: clamp(1.6rem, 4vh, 3rem);
  padding: clamp(4rem, 9vh, 6rem) 0;
}
.section-label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  color: var(--muted);
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.section-label b { color: var(--paper); font-weight: 500; }
.statement {
  font-size: var(--step-3);
  max-width: 32ch;
  line-height: 1.05;
}
/* Word-by-word scroll lighting */
.lit { display: inline-block; color: rgba(242, 245, 251, 0.16); transition: color 0.45s ease; }
.lit.is-on { color: var(--paper); }
.lit.is-key.is-on { color: var(--siege); }

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: clamp(1rem, 2vw, 1.8rem);
}
.pillar {
  position: relative;
  padding: clamp(1.4rem, 2.4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0));
  overflow: hidden;
  transition: border-color 0.4s, transform 0.4s cubic-bezier(0.2,0.9,0.2,1);
}
.pillar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at var(--mx, 50%) var(--my, 0%), color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}
.pillar:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.pillar:hover::before { opacity: 1; }
.pillar__num { color: var(--siege); }
.pillar h3 { position: relative; font-size: var(--step-2); margin: 1.6rem 0 0.8rem; }
.pillar p { position: relative; color: var(--muted); }

/* ---------- 11. Filiales — cascading card stack ---------- */
/* padding-block seulement : le raccourci padding écraserait la gouttière de .wrap */
.filiales__intro { padding-block: clamp(4rem, 12vh, 9rem) clamp(2rem, 6vh, 4rem); }
.filiales__intro .statement { max-width: 40ch; }

.stack { position: relative; }
/* Piste de scroll : donne au chapitre le temps d'être lu avant d'être enterré */
.chapter-track { position: relative; height: 150vh; }
.chapter-track:nth-of-type(1) { z-index: 11; }
.chapter-track:nth-of-type(2) { z-index: 12; }
.chapter-track:nth-of-type(3) { z-index: 13; }
.chapter-track:nth-of-type(4) { z-index: 14; }
.chapter {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  align-content: center;
  overflow: clip;
  border-top: 1px solid var(--line);
  background: var(--ink-900);
  will-change: transform;
  contain: layout paint;
}

.chapter__inner {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(5.5rem, 12vh, 8rem) var(--gutter) clamp(3rem, 8vh, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.chapter__head { display: grid; gap: clamp(1rem, 2.4vh, 1.6rem); align-content: center; }
.chapter__eyebrow { display: flex; align-items: center; gap: 0.9rem; color: var(--accent); }
.chapter__eyebrow::after {
  content: '';
  height: 1px; flex: 1;
  background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 55%, transparent), transparent);
}
.chapter__title { font-size: var(--step-4); }
.chapter__audience { color: var(--muted); }
.chapter__pitch { font-size: var(--step-1); color: var(--paper-dim); max-width: 46ch; font-weight: 300; }
.chapter__list { display: grid; gap: 0.75rem; max-width: 52ch; }
.chapter__list li {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.85rem;
  align-items: start;
  color: var(--paper-dim);
  font-size: var(--step-0);
}
.chapter__list svg { margin-top: 0.42em; color: var(--accent); }
.chapter__cta { margin-top: 0.6rem; justify-self: start; }
.chapter__url { color: var(--muted); }

/* Visuel signature génératif */
.signature {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 620px;
  justify-self: center;
  color: var(--accent);
}
.signature svg { width: 100%; height: 100%; overflow: visible; }
/* Dans un SVG, les unités du viewBox commandent : on neutralise .mono venu du CSS */
.signature text.mono { font-size: 8px; letter-spacing: 0.16em; }
.signature .frame { fill: none; stroke: var(--line); }
.signature .stroke { fill: none; stroke: currentColor; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.signature .stroke--soft { stroke: var(--line-strong); }
.signature .fill { fill: currentColor; }
.signature .glowdot { filter: drop-shadow(0 0 10px currentColor); }
.signature .drift { animation: drift 7s ease-in-out infinite; transform-origin: 50% 50%; }
.signature .drift--2 { animation-duration: 9s; animation-delay: -2s; }
.signature .drift--3 { animation-duration: 11s; animation-delay: -4s; }
@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.signature .flow { stroke-dasharray: 6 10; animation: dash 9s linear infinite; }
.signature .scanline { animation: scan 5s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
@keyframes scan {
  0%, 100% { transform: translateY(-30%); opacity: 0; }
  20%, 80% { opacity: 1; }
  50% { transform: translateY(30%); }
}
.signature .pulsebar { animation: pulsebar 1.8s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes pulsebar {
  0%, 100% { transform: scaleY(0.35); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}
.signature .halo {
  animation: haloPulse 4s ease-in-out infinite;
  transform-origin: 50% 50%;
}
@keyframes haloPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.25; }
  50% { transform: scale(1.06); opacity: 0.6; }
}

/* ---------- 12. Le siège (organisation) ---------- */
.siege { padding: clamp(6rem, 16vh, 12rem) 0 clamp(4rem, 10vh, 8rem); position: relative; }
.siege__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: start;
}
.siege__lead { display: grid; gap: 1.6rem; align-content: start; }
.functions { display: grid; gap: 0; border-top: 1px solid var(--line); }
.functions li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 1rem;
  padding: clamp(1rem, 2vh, 1.5rem) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.4s, padding-left 0.4s;
}
.functions li:hover { background: rgba(255,255,255,0.02); padding-left: 0.6rem; }
.functions h3 { font-size: var(--step-1); margin-bottom: 0.3rem; }
.functions p { color: var(--muted); font-size: var(--step--1); line-height: 1.55; }
.functions .mono { color: var(--siege); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 1px;
  margin-top: clamp(3rem, 8vh, 6rem);
  background: var(--line);
  border: 1px solid var(--line);
}
.facts div { background: var(--ink-900); padding: clamp(1.2rem, 2.5vw, 2rem); }
.facts dt { color: var(--muted); font-family: 'Geist Mono', monospace; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; }
.facts dd { margin: 0.7rem 0 0; font-family: 'Instrument Serif', Georgia, serif; font-size: var(--step-2); line-height: 1; }

/* ---------- 13. Contact ---------- */
.contact { position: relative; padding: clamp(6rem, 18vh, 14rem) 0 clamp(5rem, 12vh, 9rem); }
.contact__inner { display: grid; gap: clamp(2rem, 5vh, 3.5rem); }
.contact__title { font-size: var(--step-4); max-width: 24ch; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.contact__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1.5rem;
  padding-top: clamp(1.5rem, 4vh, 2.5rem);
  border-top: 1px solid var(--line);
}
.contact__meta dt { color: var(--muted); font-family: 'Geist Mono', monospace; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 0.5rem; }
.contact__meta dd { margin: 0; }
.contact__meta a:hover { color: var(--siege); }

/* ---------- 14. Footer ---------- */
.foot {
  position: relative;
  z-index: 20;
  background: var(--ink-800);
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 8vh, 5rem) 0 clamp(1.5rem, 4vh, 2.5rem);
}
.foot__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(1.8rem, 4vw, 3.5rem);
}
.foot h2, .foot h3 {
  font-size: var(--step--1);
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 1rem;
}
.foot ul { display: grid; gap: 0.6rem; }
.foot a:hover { color: var(--siege); }
.foot__legal { color: var(--muted); font-size: var(--step--1); line-height: 1.7; }
.foot__legal b { color: var(--paper-dim); font-weight: 500; }
.foot__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 2rem;
  margin-top: clamp(2.5rem, 6vh, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--step--1);
}
.foot__dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: 0;
}

/* ---------- 15. Pages légales ---------- */
.doc { padding: clamp(7rem, 16vh, 10rem) 0 clamp(4rem, 10vh, 7rem); }
.doc__inner { max-width: 76ch; display: grid; gap: 2rem; }
.doc h1 { font-size: var(--step-4); }
.doc h2 { font-size: var(--step-2); margin-top: 1.5rem; font-family: 'Instrument Serif', Georgia, serif; }
.doc p, .doc li { color: var(--paper-dim); }
.doc ul { display: grid; gap: 0.5rem; padding-left: 1.2rem; list-style: disc; }
.doc a { color: var(--siege); text-decoration: underline; text-underline-offset: 3px; }
.doc dl { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.5rem; }
.doc dt { color: var(--muted); font-family: 'Geist Mono', monospace; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 0.25em; }
.doc dd { margin: 0; color: var(--paper); }
.doc__back { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted) !important; text-decoration: none !important; }
.doc__back:hover { color: var(--paper) !important; }

/* ---------- 16. Reveals (état initial, retiré par JS) ---------- */
[data-reveal] { will-change: transform, opacity; }
.js [data-reveal="up"] { opacity: 0; transform: translateY(38px); }
.js [data-reveal="fade"] { opacity: 0; }
.js [data-reveal="drop"] { clip-path: inset(0 0 100% 0); }
.js [data-reveal="wipe"] { clip-path: inset(0 100% 0 0); }
.js [data-reveal="iris"] { clip-path: circle(0% at 50% 50%); }
.js .hall__title .line > span { transform: translateY(110%); }

/* ---------- 17. Responsive ---------- */
@media (max-width: 1080px) {
  .chapter__inner { grid-template-columns: 1fr; align-content: center; gap: clamp(1.8rem, 4vh, 3rem); }
  .signature { max-width: 400px; order: -1; }
  .dots { display: none; }
}
/* Sous 1200px, la ligne « Aide et Feu · gratuit » ne tient plus à côté du titre :
   le standard passe sous le texte, pleine largeur. */
@media (max-width: 1200px) {
  .hall__inner { grid-template-columns: 1fr; align-content: end; }
  .board { justify-self: stretch; max-width: none; }
  .hall__title { max-width: 26ch; }
  .hall__lede { max-width: 60ch; }
}
@media (max-width: 720px) {
  .head__chapter { display: none; }
  .hall__title { font-size: clamp(2.3rem, 9.6vw, 3.4rem); max-width: none; }
  .hall__lede { font-size: var(--step-0); }
  .hall__inner { padding-top: clamp(5rem, 11vh, 7rem); }
  .hall__actions .btn { padding: 0.85rem 1.15rem; }
  .board__row a { grid-template-columns: 1.9rem auto minmax(0, 1fr); padding-inline: 0.2rem; padding-block: 0.62rem; }
  .board__arrow { display: none; }
  .board__name { font-size: var(--step-1); }
  /* Le cadre du badge est de trop à cette taille : l'information reste, la boîte part */
  .board__job b { border: 0; padding: 0; margin-left: 0.45rem; }
  .board__job b::before { content: '· '; }
  .signature { max-width: 300px; }
  .chapter { min-height: auto; padding-block: 1rem; }
  .chapter__inner { padding-block: clamp(4.5rem, 12vh, 6rem) clamp(2.5rem, 6vh, 4rem); }
  .facts dd { font-size: var(--step-1); }
  .depth-0 { filter: none; }
  .grain { display: none; }
  .signature text { display: none; }
}

/* Sur mobile, le stack sticky est allégé (pas d'empilement) */
@media (max-width: 720px), (pointer: coarse) {
  .chapter { position: relative; height: auto; }
  .chapter-track { height: auto; }
  .manifeste__sticky { position: relative; min-height: auto; }
}

/* ---------- 18. Accessibilité — mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .curtain { display: none; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .js .hall__title .line > span { transform: none !important; }
  .lit { color: var(--paper); }
  .chapter { position: relative; height: auto; }
  .chapter-track { height: auto; }
  .manifeste__sticky { position: relative; min-height: auto; }
  .particles { display: none; }
}


/* ---------- 19. Motif génératif en fond de chapitre ---------- */
.motif {
  position: absolute;
  right: 4%;
  top: 50%;
  translate: 0 -50%;
  width: min(46vw, 620px);
  aspect-ratio: 1;
  color: var(--accent);
  opacity: 0.28;
}
.motif svg { width: 100%; height: 100%; overflow: visible; }
.motif { opacity: 0.34; }
.motif .stroke { fill: none; stroke: currentColor; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.motif .stroke--soft { stroke: var(--line-strong); }
.motif .fill { fill: currentColor; }
.motif .glowdot { filter: drop-shadow(0 0 10px currentColor); }
.motif .flow { stroke-dasharray: 6 10; animation: dash 9s linear infinite; }
.motif .drift { animation: drift 7s ease-in-out infinite; transform-origin: 50% 50%; }
.motif .drift--2 { animation-duration: 9s; animation-delay: -2s; }
.motif .halo { animation: haloPulse 4s ease-in-out infinite; transform-origin: 50% 50%; }
.motif .scanline { animation: scan 5s cubic-bezier(0.45, 0, 0.55, 1) infinite; }

/* ---------- 20. Visuel produit : photo de métier + capture en incrustation ---------- */
.showcase {
  position: relative;
  width: 100%;
  max-width: 680px;
  justify-self: center;
  padding: 0 0 9% 0;
  perspective: 1500px;
}
.showcase__photo {
  position: relative;
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow:
    0 50px 90px -30px rgba(0, 0, 0, 0.9),
    0 0 70px -24px color-mix(in oklab, var(--accent) 42%, transparent);
  transform: rotateY(-5deg) rotateX(2deg);
  transform-style: preserve-3d;
}
.showcase__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, transparent 55%, rgba(5, 7, 12, 0.35));
  pointer-events: none;
}
.showcase__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  display: block;
}
/* La capture du produit, posée devant la photo */
.showcase__inset {
  position: absolute;
  right: 5%;
  bottom: -5%;
  width: 46%;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #0a0e15;
  border: 1px solid var(--line-strong);
  box-shadow: 0 34px 60px -18px rgba(0, 0, 0, 0.95);
  transform: rotateY(-5deg) rotateX(2deg) translateZ(70px);
  transform-style: preserve-3d;
}
.showcase__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  background: linear-gradient(180deg, #141a25, #0d121b);
  border-bottom: 1px solid var(--line);
}
.showcase__bar i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}
.showcase__bar i:first-child { background: color-mix(in oklab, var(--accent) 70%, transparent); }
.showcase__bar em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.55rem;
  color: var(--muted);
  letter-spacing: 0.12em;
}
.showcase__inset img { width: 100%; height: auto; display: block; }
.float-slow { animation: float-y 11s ease-in-out infinite; }
.float-slower { animation: float-y 14s ease-in-out infinite -3s; }
@keyframes float-y {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

.chapter__note {
  max-width: 46ch;
  padding-left: 0.9rem;
  border-left: 1px solid color-mix(in oklab, var(--accent) 60%, transparent);
  color: var(--muted);
  font-size: var(--step--1);
  line-height: 1.6;
}

/* ---------- 21. Questions fréquentes (lisible par les moteurs et les IA) ---------- */
.faq { padding: clamp(4rem, 12vh, 9rem) 0 clamp(2rem, 6vh, 4rem); position: relative; }
.faq__list {
  display: grid;
  gap: 0;
  margin-top: clamp(2rem, 5vh, 3rem);
  border-top: 1px solid var(--line);
}
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  padding: clamp(1.1rem, 2.4vh, 1.7rem) 0;
  cursor: pointer;
  list-style: none;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: var(--step-2);
  line-height: 1.15;
  transition: color 0.3s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+';
  margin-left: auto;
  font-family: 'Geist Mono', monospace;
  font-size: var(--step-1);
  color: var(--siege);
  transition: rotate 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.faq__item[open] summary::after { rotate: 45deg; }
.faq__item summary:hover { color: var(--siege); }
.faq__item .faq__num { font-family: 'Geist Mono', monospace; font-size: 0.7rem; letter-spacing: 0.16em; color: var(--muted); flex: none; }
.faq__answer { padding: 0 0 clamp(1.2rem, 3vh, 2rem) calc(0.7rem + 4ch); max-width: 78ch; color: var(--paper-dim); }
.faq__answer p + p { margin-top: 0.8rem; }
.faq__answer a { color: var(--siege); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1080px) {
  .motif { right: -6%; width: min(70vw, 460px); opacity: 0.2; }
  .showcase { max-width: 520px; padding-bottom: 12%; }
}
@media (max-width: 720px) {
  .showcase { max-width: 100%; padding: 0 0 16% 0; }
  .showcase__photo { transform: none; }
  .showcase__photo img { aspect-ratio: 3 / 2; }
  .showcase__inset { width: 62%; right: 0; transform: none; }
  .motif { display: none; }
  .faq__answer { padding-left: 0; }
  .faq__item summary { font-size: var(--step-1); }
}
@media (prefers-reduced-motion: reduce) {
  .float-slow, .float-slower { animation: none; }
}


/* ---------- 22. Journal du siège ---------- */
.doc__lede { font-size: var(--step-1); color: var(--paper-dim); font-weight: 300; max-width: 60ch; }
.doc__body { display: grid; gap: 1.1rem; max-width: 72ch; }
.doc__body h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: var(--step-2);
  margin-top: 1.8rem;
  line-height: 1.1;
}
.doc__body p { color: var(--paper-dim); line-height: 1.75; }
.doc__body strong { color: var(--paper); font-weight: 500; }
.doc__body a { color: var(--siege); text-decoration: underline; text-underline-offset: 3px; }
.doc__related {
  margin-top: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.doc__related h2 { color: var(--muted); margin-bottom: 0.9rem; }
.doc__related ul { display: grid; gap: 0.5rem; list-style: none; padding: 0; }
.doc__related a { color: var(--paper) !important; text-decoration: none !important; }
.doc__related a:hover { color: var(--siege) !important; }

.doc .postlist, .postlist { display: grid; gap: 0; margin: clamp(2rem, 6vh, 4rem) 0; border-top: 1px solid var(--line); list-style: none; padding-left: 0; }
.postlist__item { border-bottom: 1px solid var(--line); }
.postlist__item a {
  display: grid;
  gap: 0.6rem;
  padding: clamp(1.6rem, 4vh, 2.6rem) 0;
  transition: padding-left 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
  text-decoration: none !important;
}
.postlist__item a:hover { padding-left: 0.8rem; }
.postlist__meta { color: var(--muted); }
.postlist__title { font-size: var(--step-3); max-width: 30ch; color: var(--paper) !important; }
.postlist__desc { color: var(--muted); max-width: 72ch; }
.postlist__more { color: var(--siege); }
.postlist__item a:hover .postlist__title { color: var(--siege) !important; }
