/* ==========================================================================
   AeroLabs — landing v3
   Typo : Inter (équiv. libre neutre d'Alliance No.1/2, la fonte Palantir)
   + Space Mono pour les codes. Auto-hébergées, aucune requête externe.
   Direction : dossier technique. Blanc, noir, filets 1 px, un accent.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+2039-203A;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk-var-ext.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+1E00-1EFF, U+2020, U+20A0-20C0;
}
@font-face {
  font-family: "Space Mono";
  src: url("/fonts/SpaceMono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("/fonts/SpaceMono-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #101010;
  --ink-soft: #52504c;
  --ink-faint: #8c8984;
  --paper: #ffffff;
  --paper-alt: #f4f3f0;
  --line: #101010;
  --line-soft: #dcdad5;
  --accent: #b5371c;
  --term-bg: #0d0d0c;
  --term-ink: #e8e6e1;
  --term-dim: #7e7c76;
  --font-sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", "Helvetica Neue", sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --nav-h: 58px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.mono { font-family: var(--font-mono); }

h1, h2, h3 {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.18;
}

/* Tag Research (AERO-COVER, programme R&D) */
.tag-research {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font: 9px var(--font-mono);
  font-style: normal;
  font-weight: 400;
  letter-spacing: .16em;
  vertical-align: middle;
  transform: translateY(-2px);
}
h1 .tag-research { padding: 5px 12px; font-size: 12px; transform: translateY(-8px); }

a { color: inherit; }

/* ---------- Reveal au scroll ---------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 650ms ease, transform 650ms ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-h);
}

.brand {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.brand span { color: var(--ink-faint); }

.nav-links { display: flex; align-items: center; gap: 22px; }

.nav-links > a, .nav-drop-btn {
  font-family: var(--font-sans);
  font-size: 13px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 0;
}
.nav-links > a:hover, .nav-drop-btn:hover { color: var(--accent); }

.nav-cta {
  border: 1px solid var(--line) !important;
  padding: 8px 15px !important;
}
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; }

/* Dropdown Solutions */

.nav-drop { position: relative; }

.nav-drop-btn::after {
  content: "";
  display: inline-block;
  margin-left: 7px;
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 17px);
  left: -18px;
  min-width: 400px;
  background: var(--paper);
  border: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}

.nav-drop.open .nav-drop-menu,
.nav-drop:hover .nav-drop-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav-drop-menu a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 4px 14px;
  padding: 15px 18px;
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
  transition: background 140ms ease;
}
.nav-drop-menu a:last-child { border-bottom: none; }
.nav-drop-menu a:hover { background: var(--paper-alt); }

.nav-drop-menu .code {
  grid-row: span 2;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  padding-top: 3px;
}
.nav-drop-menu .name { font-size: 13px; }
.nav-drop-menu .desc { font-size: 12.5px; color: var(--ink-soft); }

/* ---------- Boutons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 13px 26px;
  border: 1px solid var(--line);
  cursor: pointer;
  background: none;
  color: var(--ink);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-lg { padding: 16px 34px; font-size: 15px; }

/* ---------- Sections ---------- */

section { padding: 92px 0; border-bottom: 1px solid var(--line-soft); }

.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(20px, 2.6vw, 28px); }

.code-chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  border: 1px solid var(--line);
  padding: 3px 9px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* ---------- Hero ---------- */

.hero { padding: 84px 0 76px; border-bottom: 1px solid var(--line); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  gap: 56px;
  align-items: start;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

/* Noms produits AERO-XX — même registre que l’eyebrow */
.nav-drop-menu .name,
.index-item .name,
.card-head h3,
.p-hero h1,
.acc-scene-head b,
.flow-workshops strong {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(30px, 3.6vw, 46px);
  margin-bottom: 22px;
}

/* Segment rotatif du hero — boucle CSS autonome */
.rotator {
  display: block;
  overflow: hidden;
  height: 1.18em;
}
.rot-track {
  display: block;
  animation: hero-rot 16s cubic-bezier(.6, 0, .2, 1) infinite;
}
.rot-track > span {
  display: block;
  height: 1.18em;
  line-height: 1.18;
  white-space: nowrap;
}
@keyframes hero-rot {
  0%, 21% { transform: translateY(0); }
  25%, 46% { transform: translateY(-1.18em); }
  50%, 71% { transform: translateY(-2.36em); }
  75%, 96% { transform: translateY(-3.54em); }
  100% { transform: translateY(-4.72em); }
}

@media (prefers-reduced-motion: reduce) {
  .rot-track { animation: none; }
}

/* ---------- Hero centré + flux numérique ---------- */

.hero-center {
  padding-bottom: 0;
  text-align: center;
  /* Grille technique qui s'estompe vers le haut */
  background:
    linear-gradient(180deg, var(--paper) 8%, rgba(255, 255, 255, .55) 42%, rgba(255, 255, 255, 0) 80%),
    repeating-linear-gradient(0deg, #efeeea 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, #efeeea 0 1px, transparent 1px 44px);
}
.hero-center .container { max-width: 1000px; }
.hero-center h1 {
  font-family: var(--font-mono);
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-center h1 > span:first-child { display: block; line-height: 1.18; color: var(--ink); }
.hero-center .rot-track > span { color: var(--ink-soft); }
.hero-center .lead { margin: 0 auto 36px; }
.hero-center .hero-actions { justify-content: center; }

/* Chips de confiance sous les CTA */
.hero-trust {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}
.hero-trust li {
  padding: 8px 14px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font: 9px var(--font-mono);
  letter-spacing: .18em;
}

.hero-flux {
  position: relative;
  height: 192px;
  margin-top: 64px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

/* Ligne de flux : pointillés en défilement continu */
.hf-track {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: repeating-linear-gradient(90deg, #cfccc5 0 7px, transparent 7px 16px);
  animation: hf-dash .8s linear infinite;
}
@keyframes hf-dash { from { background-position: 0 0; } to { background-position: 16px 0; } }

/* Portique central : là où l'artefact se construit */
.hf-gate {
  position: absolute;
  z-index: 3;
  top: 0; bottom: 0; left: 50%;
  width: 188px;
  transform: translateX(-50%);
  border-left: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  background: rgba(255, 255, 255, .86);
  animation: hf-glow 4s linear infinite;
}
.hf-gate span {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  color: var(--ink);
  font: 9.5px var(--font-mono);
  letter-spacing: .26em;
}
/* Nom du produit actif — change à chaque passage d'artefact */
.hf-gate b {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: var(--accent);
  font: 10px var(--font-mono);
  font-weight: 700;
  letter-spacing: .14em;
  opacity: 0;
}
.hf-gate .p1 { animation: hf-p1 16s infinite; }
.hf-gate .p2 { animation: hf-p2 16s infinite; }
.hf-gate .p3 { animation: hf-p3 16s infinite; }
.hf-gate .p4 { animation: hf-p4 16s infinite; }
@keyframes hf-p1 { 0%, 1% { opacity: 0; } 3%, 22% { opacity: 1; } 25%, 100% { opacity: 0; } }
@keyframes hf-p2 { 0%, 26% { opacity: 0; } 28%, 47% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes hf-p3 { 0%, 51% { opacity: 0; } 53%, 72% { opacity: 1; } 75%, 100% { opacity: 0; } }
@keyframes hf-p4 { 0%, 76% { opacity: 0; } 78%, 97% { opacity: 1; } 100% { opacity: 0; } }
/* Lueur rouge qui respire pendant le scan (un artefact à quai par cycle de 4 s) */
@keyframes hf-glow {
  0% { border-color: var(--ink); box-shadow: 0 0 0 rgba(200, 45, 22, 0); }
  18%, 82% { border-color: var(--accent); box-shadow: 0 0 46px rgba(200, 45, 22, .28), inset 0 0 30px rgba(200, 45, 22, .06); }
  100% { border-color: var(--ink); box-shadow: 0 0 0 rgba(200, 45, 22, 0); }
}
.hf-gate i {
  position: absolute;
  top: 0; bottom: 0; left: 12px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  animation: hf-scan 1.5s ease-in-out infinite alternate;
}
@keyframes hf-scan { from { left: 12px; } to { left: calc(100% - 12px); } }

/* Artefacts voyageurs : bruts avant le portique, construits après.
   Délais calés pour croiser le portique à t = 0, 4, 8, 12 s,
   en phase avec le titre rotatif (16 s) :
   t0 reprise → a1 · t4 conformité → a2 · t8 essais → a4 · t12 documentation → a3 */
.hf-art {
  position: absolute;
  z-index: 2;
  top: 50%; left: -12%;
  width: 196px;
  transform: translate(-50%, -50%);
  animation: hf-travel 16s linear infinite;
}
/* Délais calés pour que chaque artefact soit À QUAI (38–62 % de son cycle)
   au centre de son segment de titre : a1 → t2, a2 → t6, a4 → t10, a3 → t14 */
.hero-flux .hf-art.a1, .hero-flux .hf-art.a1 .hf-raw, .hero-flux .hf-art.a1 .hf-fin { animation-delay: -6s; }
.hero-flux .hf-art.a2, .hero-flux .hf-art.a2 .hf-raw, .hero-flux .hf-art.a2 .hf-fin { animation-delay: -2s; }
.hero-flux .hf-art.a3, .hero-flux .hf-art.a3 .hf-raw, .hero-flux .hf-art.a3 .hf-fin { animation-delay: -10s; }
.hero-flux .hf-art.a4, .hero-flux .hf-art.a4 .hf-raw, .hero-flux .hf-art.a4 .hf-fin { animation-delay: -14s; }
.hf-art.a2, .hf-art.a2 .hf-raw, .hf-art.a2 .hf-fin { animation-delay: -4s; }
.hf-art.a3, .hf-art.a3 .hf-raw, .hf-art.a3 .hf-fin { animation-delay: -8s; }
.hf-art.a4, .hf-art.a4 .hf-raw, .hf-art.a4 .hf-fin { animation-delay: -12s; }
/* L'artefact s'arrête au centre du portique (38 % → 62 %) le temps du scan, puis repart */
@keyframes hf-travel {
  0% { left: -12%; animation-timing-function: cubic-bezier(.25, .6, .3, 1); }
  38% { left: 50%; }
  62% { left: 50%; animation-timing-function: cubic-bezier(.6, 0, .75, .4); }
  100% { left: 112%; }
}

.hf-raw, .hf-fin {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 13px;
  font: 9.5px var(--font-mono);
  letter-spacing: .04em;
  white-space: nowrap;
}
.hf-raw {
  border: 1px dashed #b4b1aa;
  color: #8f8c84;
  animation: hf-raw 16s linear infinite;
}
.hf-fin {
  position: absolute;
  inset: 0;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(17, 18, 19, .1);
  opacity: 0;
  animation: hf-fin 16s linear infinite;
}
.hf-art b { color: var(--accent); font-weight: 400; }
/* Coche verte de confirmation, posée sur l'étiquette sortante */
.hf-fin em {
  position: absolute;
  top: -9px; right: -9px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: #2f9e63;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  box-shadow: 0 4px 12px rgba(47, 158, 99, .4);
}
@keyframes hf-raw { 0%, 47% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes hf-fin { 0%, 49% { opacity: 0; } 53%, 100% { opacity: 1; } }

/* Flux continu : la comète part du portique AEROLABS, descend, fait le tour
   de la boîte du produit utilisé et remonte vers la ligne — puis l'étiquette sort.
   Les chemins SVG sont construits par main.js selon la géométrie réelle.
   t0 AERO-COVER (4e) · t4 AERO-PLIANCE (1re) · t8 AERO-CHECK (2e) · t12 AERO-TRAIN (3e) */
.hero-index { position: relative; }
.px-flux {
  position: absolute;
  top: -96px; left: 0;
  z-index: 4;
  overflow: visible;
  pointer-events: none;
}
.pxf {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(200, 45, 22, .55));
  opacity: 0;
}
.pxf-1 { animation: pxf-1 16s linear infinite; }
.pxf-2 { animation: pxf-2 16s linear infinite; }
.pxf-3 { animation: pxf-3 16s linear infinite; }
.pxf-4 { animation: pxf-4 16s linear infinite; }

/* Fond de la boîte : dégradé rouge qui pulse le temps du passage du flux */
.hero-index .index-item { position: relative; isolation: isolate; }
.hero-index .index-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(130% 100% at 50% 15%,
    rgba(200, 45, 22, .16),
    rgba(200, 45, 22, .06) 55%,
    rgba(200, 45, 22, .015) 85%);
  opacity: 0;
}
.hero-index .index-item:nth-child(1)::before { animation: hbg-1 16s linear infinite; }
.hero-index .index-item:nth-child(2)::before { animation: hbg-2 16s linear infinite; }
.hero-index .index-item:nth-child(3)::before { animation: hbg-3 16s linear infinite; }
.hero-index .index-item:nth-child(4)::before { animation: hbg-4 16s linear infinite; }
@keyframes hbg-1 {
  0%, 26% { opacity: 0; }
  30% { opacity: 1; }
  36% { opacity: .4; }
  42% { opacity: 1; }
  47% { opacity: .9; }
  49%, 100% { opacity: 0; }
}
@keyframes hbg-2 {
  0%, 51% { opacity: 0; }
  55% { opacity: 1; }
  61% { opacity: .4; }
  67% { opacity: 1; }
  72% { opacity: .9; }
  74%, 100% { opacity: 0; }
}
@keyframes hbg-3 {
  0%, 76% { opacity: 0; }
  80% { opacity: 1; }
  86% { opacity: .4; }
  92% { opacity: 1; }
  97% { opacity: .9; }
  99%, 100% { opacity: 0; }
}
@keyframes hbg-4 {
  0%, 1% { opacity: 0; }
  5% { opacity: 1; }
  11% { opacity: .4; }
  17% { opacity: 1; }
  22% { opacity: .9; }
  24%, 100% { opacity: 0; }
}
@keyframes pxf-1 {
  0%, 26% { stroke-dashoffset: 130px; opacity: 0; }
  27% { opacity: 1; }
  48% { opacity: 1; }
  49%, 100% { stroke-dashoffset: calc(-1 * var(--pxlen, 2000px)); opacity: 0; }
}
@keyframes pxf-2 {
  0%, 51% { stroke-dashoffset: 130px; opacity: 0; }
  52% { opacity: 1; }
  73% { opacity: 1; }
  74%, 100% { stroke-dashoffset: calc(-1 * var(--pxlen, 2000px)); opacity: 0; }
}
@keyframes pxf-3 {
  0%, 76% { stroke-dashoffset: 130px; opacity: 0; }
  77% { opacity: 1; }
  98% { opacity: 1; }
  99%, 100% { stroke-dashoffset: calc(-1 * var(--pxlen, 2000px)); opacity: 0; }
}
@keyframes pxf-4 {
  0%, 1% { stroke-dashoffset: 130px; opacity: 0; }
  2% { opacity: 1; }
  23% { opacity: 1; }
  24%, 100% { stroke-dashoffset: calc(-1 * var(--pxlen, 2000px)); opacity: 0; }
}

/* Colonne sélectionnée dans la suite : passe en noir pendant son parcours */
.card {
  cursor: pointer;
  transition: background .55s ease, border-color .55s ease;
}
.card.active { background: var(--ink); }
.card.active h3, .card.active .card-job, .card.active dd, .card.active .card-more { color: #fff; }
.card.active dt { color: #98958e; }
.card.active dl div { border-top-color: #35363a; }
.card.active .card-more:hover { color: var(--accent); }

/* Bandes de flux par section — déclinaison blanche du flux du hero */
.flux-stack { margin-top: 36px; }

/* Mode cyclé : une seule bande visible, synchronisée avec la carte active */
.flux-cycle .flux-strip { display: none; }
.flux-cycle .flux-strip.active { display: block; }
.flux-cycle .hf-gate { width: 168px; }
.flux-cycle .hf-gate span { letter-spacing: .14em; }
/* Cycle plus court : un passage complet pendant la sélection de la colonne */
.flux-cycle .hf-art,
.flux-cycle .hf-raw,
.flux-cycle .hf-fin { animation-duration: 9s; }
.flux-cycle .hf-art.a2, .flux-cycle .hf-art.a2 .hf-raw, .flux-cycle .hf-art.a2 .hf-fin { animation-delay: -3s; }
.flux-cycle .hf-art.a3, .flux-cycle .hf-art.a3 .hf-raw, .flux-cycle .hf-art.a3 .hf-fin { animation-delay: -6s; }
.flux-strip {
  position: relative;
  height: 116px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}
.flux-strip + .flux-strip { border-top: 0; }
.fx-caption {
  position: absolute;
  z-index: 4;
  top: 12px; left: 14px;
  color: var(--ink-faint);
  font: 8.5px var(--font-mono);
  letter-spacing: .14em;
}
.flux-strip .hf-gate { width: 150px; background: rgba(255, 255, 255, .88); }
.flux-strip .hf-gate.wide { width: 196px; }
.flux-strip .hf-gate span { top: 12px; }
.flux-strip .hf-art { width: 190px; }

/* Variante sombre de la bande dans la section LABS */
.recover .flux-strip { background: #151616; border-color: #3a3b39; }
.recover .fx-caption { color: #8b8984; }
.recover .hf-track { background: repeating-linear-gradient(90deg, #4a4b48 0 7px, transparent 7px 16px); }
.recover .hf-gate { border-color: #e5e4df; background: rgba(21, 22, 22, .85); }
.recover .hf-gate span { color: #ecebe7; }
.recover .hf-raw { border-color: #55564f; color: #8f8c84; background: rgba(21, 22, 22, .9); }
.recover .hf-fin {
  border-color: #ecebe7;
  background: #1b1c1b;
  color: #ecebe7;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .5);
}
.recover .hf-fin em { color: #8fc4a3; }

/* ---------- Cas d'usage : accordéon + scène animée ---------- */

.acc {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  border: 1px solid var(--line);
  background: var(--paper);
}
.acc-list { border-right: 1px solid var(--line); }
.acc-item {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .4s ease, box-shadow .4s ease;
}
.acc-item:last-child { border-bottom: 0; }
.acc-item:hover { background: #faf9f7; }
.acc-title { display: block; font-family: var(--font-mono); font-size: 13px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; }
.acc-sub {
  display: block;
  margin-top: 6px;
  color: var(--accent);
  font: 8.5px var(--font-mono);
  letter-spacing: .1em;
}
.acc-body {
  max-height: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.6;
  transition: max-height .5s ease, opacity .5s ease, margin .5s ease;
}
.acc-item.active {
  background: #faf9f7;
  box-shadow: inset 3px 0 var(--accent);
}
.acc-item.active .acc-body { max-height: 130px; margin-top: 10px; opacity: 1; }

.acc-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px;
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
}
.acc-scene { display: none; }
.acc-scene.active { display: block; animation: acc-fade .45s ease both; }
@keyframes acc-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.acc-scene-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  font: 9px var(--font-mono);
  letter-spacing: .12em;
  color: var(--ink-faint);
}
.acc-scene-head b { color: var(--ink); font-size: 13px; font-weight: 400; letter-spacing: .16em; }
/* La scène rejoue son parcours plus vite que les bandes de section */
.acc-stage .flux-strip { border: 1px solid var(--line); }
.acc-stage .hf-art,
.acc-stage .hf-raw,
.acc-stage .hf-fin { animation-duration: 7s; }
.acc-stage .hf-art.a3, .acc-stage .hf-art.a3 .hf-raw, .acc-stage .hf-art.a3 .hf-fin { animation-delay: -3.5s; }
.acc-stage .hf-gate { width: 132px; }
.acc-stage .hf-gate span { letter-spacing: .1em; }
.acc-score {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #70a180;
  color: #3f7a58;
  font: 9.5px var(--font-mono);
  letter-spacing: .1em;
  text-align: center;
  opacity: 0;
  animation: acc-score 7s linear infinite;
}
@keyframes acc-score {
  0%, 50% { opacity: 0; transform: scale(.97); }
  56%, 100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 900px) {
  .acc { grid-template-columns: 1fr; }
  .acc-list { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .acc-stage * { animation: none !important; }
  .acc-score { opacity: 1; }
}

/* ---------- Hero produit : position sur le cycle en V + flux ---------- */

.p-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
  gap: 56px;
  align-items: center;
  margin-bottom: 38px;
}
.vhero {
  position: relative;
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
}
.vh-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--ink-faint);
  font: 8.5px var(--font-mono);
  letter-spacing: .14em;
}
.vh-top b { color: var(--accent); font-weight: 400; }
.vhero svg { display: block; width: 100%; height: auto; }

.vh-v { fill: none; stroke: #c9c6bf; stroke-width: 1.4; }
/* Comète : un trait lumineux parcourt le V en continu */
.vh-flow {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-dasharray: 46 500;
  animation: vh-flow 3.4s linear infinite;
}
@keyframes vh-flow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -546; } }

/* Lien de traçabilité entre les deux branches */
.vh-link {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 4 5;
  opacity: .85;
  animation: vh-link 1.1s linear infinite;
}
@keyframes vh-link { to { stroke-dashoffset: -18; } }

.vh-labels text { fill: #8f8c84; font: 8.5px var(--font-mono); letter-spacing: .08em; }
.vh-packet { fill: var(--accent); filter: drop-shadow(0 0 4px rgba(185, 67, 48, .6)); }
.vh-node {
  fill: var(--accent);
  stroke: #fff;
  stroke-width: 2;
  animation: vh-node 1.6s ease-in-out infinite;
}
@keyframes vh-node { 0%, 100% { r: 6; } 50% { r: 8.5; } }
.vh-ring {
  fill: none;
  stroke: var(--accent);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: vh-ring 2.4s ease-out infinite;
}
.vh-ring.r2 { animation-delay: 1.2s; }
@keyframes vh-ring {
  0% { opacity: .8; transform: scale(.5); }
  100% { opacity: 0; transform: scale(3.2); }
}
.vh-mirror { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.vh-check { fill: #4d8a67; font: 11px var(--font-mono); opacity: 0; animation: vh-check 5s ease infinite; }
.vh-check.c2 { animation-delay: .5s; }
.vh-check.c3 { animation-delay: 1s; }
@keyframes vh-check { 0%, 18% { opacity: 0; } 28%, 82% { opacity: 1; } 92%, 100% { opacity: 0; } }
.vh-exit { fill: none; stroke: var(--ink); stroke-width: 1.4; }

/* Livrables générés par le produit : pop en cascade, en boucle */
.vh-out { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.vh-out span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  font: 8.5px var(--font-mono);
  opacity: 0;
  transform: translateY(4px);
  animation: vh-out 6s ease infinite;
}
.vh-out span:nth-child(2) { animation-delay: .45s; }
.vh-out span:nth-child(3) { animation-delay: .9s; }
.vh-out b { margin-right: 6px; color: var(--accent); font-weight: 400; }
@keyframes vh-out {
  0%, 12% { opacity: 0; transform: translateY(4px); }
  22%, 86% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: translateY(4px); }
}
.vh-caption { margin-top: 12px; color: var(--ink-faint); font: 9px/1.6 var(--font-mono); letter-spacing: .04em; }

@media (max-width: 980px) {
  .p-hero-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .vhero * { animation: none !important; }
  .vh-out span, .vh-check { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .hero-flux { height: 128px; margin-top: 52px; }
  .hf-art { width: 160px; }
  .hf-raw, .hf-fin { padding: 9px 10px; font-size: 8px; }
  .hf-gate { width: 118px; }
  .hf-gate b { font-size: 7.5px; letter-spacing: .08em; }
  .hero-trust { flex-wrap: wrap; }
  .flux-strip { height: 96px; }
  .flux-strip .hf-art { width: 150px; }
  .flux-strip .hf-gate { width: 92px; }
  .flux-strip .hf-gate.wide { width: 120px; }
  .fx-caption { letter-spacing: .08em; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-flux *, .flux-strip * { animation: none !important; }
  .hf-art { left: 26%; }
  .hf-art.a2, .hf-art.a3 { left: 74%; }
  .hf-art.a2 .hf-raw, .hf-art.a3 .hf-raw { opacity: 0; }
  .hf-art.a2 .hf-fin, .hf-art.a3 .hf-fin { opacity: 1; }
  .hf-art.a4 { display: none; }
  .hero-flux .hf-art.a3 { display: none; }
  .hf-gate b { opacity: 0; }
  .hf-gate .p2 { opacity: 1; }
  .px-flux { display: none; }
  .hero-index .index-item::before { animation: none !important; }
}

.lead { font-size: 18px; color: var(--ink-soft); max-width: 46ch; margin-bottom: 34px; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Fenêtre logicielle (AeroLabs Studio) ---------- */

.app { border: 1px solid var(--line); background: var(--paper); }

.app-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 14px;
}
.app-bar .dim { color: #8c8a85; }

.app-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.app-tab {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 6px;
  background: var(--paper);
  color: var(--ink-soft);
  border: none;
  border-right: 1px solid var(--line);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.app-tab:last-child { border-right: none; }
.app-tab:hover { color: var(--ink); }
.app-tab.active { background: var(--ink); color: var(--paper); }

.app-view { display: none; }
.app-view.active { display: block; }

/* Rail de steps (vignettes) */
.app-steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border-bottom: 1px solid var(--line);
  background: var(--paper-alt);
}
.app-step { padding: 10px 12px 8px; border-right: 1px solid var(--line-soft); }
.app-step:last-child { border-right: none; }
.app-step .t {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 7px;
  white-space: nowrap;
}
.app-step .thumb {
  display: block;
  border: 1px solid var(--line-soft);
  background: var(--paper);
  padding: 6px 0 2px;
}
.app-step .thumb b { display: block; height: 3px; background: var(--line-soft); margin: 0 8px 4px; }
.app-step.done .t { color: var(--ink-soft); }
.app-step.done .thumb b { background: #b8b5af; }
.app-step.active .t { color: var(--accent); }
.app-step.active .thumb { border-color: var(--accent); }
.app-step.active .thumb b { background: var(--ink); }

/* Corps : panneaux */
.app-body { display: grid; grid-template-columns: 1fr 1fr; min-height: 270px; }
.pane { padding: 14px 16px; border-right: 1px solid var(--line-soft); overflow: hidden; position: relative; }
.pane:last-child { border-right: none; }
.pane-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.cl { font-family: var(--font-mono); font-size: 11.5px; line-height: 1.95; white-space: pre; color: var(--ink); }
.cl.cm { color: var(--ink-soft); }
.cl.dim { color: var(--ink-faint); }

.hexrow {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 2.05;
  color: var(--ink-faint);
  padding: 0 6px;
}
.hexrow[data-on].s-on { background: #f0e4e0; color: var(--ink-soft); transform: none; }

.sk { height: 7px; background: var(--line-soft); margin: 9px 0; }

.row-t {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 2.15;
}
.tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: var(--paper);
  background: var(--ink);
  padding: 1px 7px;
}
.tag.ko, .tag.hot { background: var(--accent); }
.tag.ghost { background: none; color: var(--ink-faint); border: 1px solid var(--line-soft); }

.badge-final {
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 6px 10px;
  display: inline-block;
  margin-top: 10px;
}

/* IHM mock (VERIFY) */
.ihm-field {
  border: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 10px;
  margin: 6px 0 10px;
  color: var(--ink-soft);
}
.ihm-label { font-size: 11.5px; color: var(--ink-soft); }
.ihm-btns { display: flex; gap: 8px; margin-top: 4px; }
.ihm-btn {
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 6px 12px;
}
.cursor-dot {
  position: absolute;
  width: 14px; height: 14px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  transition: transform 650ms cubic-bezier(.5, 0, .3, 1);
  z-index: 2;
}
.cursor-dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--accent);
  border-radius: 50%;
}

/* Barre d'état */
.app-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
}
.app-state { color: var(--accent); letter-spacing: 0.08em; white-space: nowrap; }

/* Éléments animés */
.app [data-on] { opacity: 0; transform: translateY(5px); transition: opacity 420ms ease, transform 420ms ease; }
.app [data-on].s-on { opacity: 1; transform: none; }

/* ---------- Index produits ---------- */

.prod-index { padding: 0; border-bottom: 1px solid var(--line); }

.hero-index { display: grid; grid-template-columns: repeat(4, 1fr); }

.index-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  text-decoration: none;
  border-right: 1px solid var(--line);
  transition: background 150ms ease;
}
.index-item:last-child { border-right: none; }
.index-item:hover { background: var(--paper-alt); }
.index-item .code { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); letter-spacing: 0.08em; }
.index-item .name { font-size: 13.5px; }
.index-item .desc { font-size: 13px; color: var(--ink-soft); }
.index-item .ver,
.card-ver,
.ver-line {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.index-item .ver { margin-top: auto; padding-top: 14px; }
.index-item .go { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-top: 4px; }
.index-item:hover .go { color: var(--accent); }
.card-ver { display: block; margin-top: 16px; }
.card-more { margin-top: 6px; }
.ver-line { margin: -8px 0 18px; }

/* ---------- RECOVER (section inversée) ---------- */

.recover { background: var(--ink); color: var(--paper); border-bottom: none; }
.recover .section-head h2 { color: var(--paper); }
.recover .code-chip { border-color: #4a4946; color: #cfcdc8; }

.recover-lead { font-size: 18px; max-width: 62ch; color: #c9c7c2; margin-bottom: 40px; }

.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #3c3b38; margin-bottom: 32px; }
.spec { padding: 18px; border-right: 1px solid #3c3b38; }
.spec:last-child { border-right: none; }
.spec-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8c8a85;
  margin-bottom: 8px;
}
.spec p { font-size: 14px; color: #e4e2dd; }

.recover-note {
  font-size: 14px;
  color: #a3a19c;
  max-width: 66ch;
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  margin-bottom: 30px;
}

/* ---------- Suite ---------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }

.card { padding: 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.card:last-child { border-right: none; }

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 16px;
}
.card-head .code { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); letter-spacing: 0.08em; }
.card-head h3 { font-size: 16px; }

.card-job { font-size: 15px; font-weight: 500; margin-bottom: 18px; }

.card dl { flex: 1; }
.card dl div { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.card dt {
  flex: 0 0 76px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  padding-top: 3px;
}
.card dd { font-size: 13.5px; color: var(--ink-soft); }

.card-more {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0.06em;
}
.card-more:hover { color: var(--accent); }

/* ---------- Cas d'usage ---------- */

.cas-grid { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); }

.cas-grid article { padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cas-grid article:nth-child(2n) { border-right: none; }
.cas-grid article:nth-child(n+3) { border-bottom: none; }

.cas-num { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); letter-spacing: 0.1em; }
.cas-grid h3 { font-size: 20px; margin: 8px 0 10px; }
.cas-grid p { font-size: 14.5px; color: var(--ink-soft); }
.cas-grid .cas-link {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-decoration: none;
  letter-spacing: 0.06em;
}
.cas-grid .cas-link:hover { color: var(--accent); }

/* ---------- Engagements ---------- */

.engagements { background: var(--paper-alt); }

.eng-list { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--paper); }
.eng-list li { padding: 22px; border-right: 1px solid var(--line); }
.eng-list li:last-child { border-right: none; }
.eng-list .mono { display: block; font-size: 11.5px; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 10px; }
.eng-list p { font-size: 14px; color: var(--ink-soft); }

/* ---------- Contact ---------- */

.contact { text-align: center; padding: 112px 0; }
.contact h2 { font-size: clamp(22px, 2.8vw, 32px); margin-bottom: 16px; }
.contact p { font-size: 17px; color: var(--ink-soft); max-width: 52ch; margin: 0 auto 36px; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); padding: 26px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
}

/* ==========================================================================
   Pages produit
   ========================================================================== */

.crumb {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 22px 0 0;
}
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.crumb .sep { margin: 0 8px; }
.crumb .here { color: var(--accent); }

.p-hero { padding: 44px 0 64px; border-bottom: 1px solid var(--line); }
.p-hero h1 { font-size: clamp(26px, 3.8vw, 42px); margin: 10px 0 18px; }
.p-hero .p-job { font-size: 19px; color: var(--ink-soft); max-width: 56ch; margin-bottom: 32px; }

.p-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  margin-top: 44px;
}
.p-strip > div { padding: 16px 18px; border-right: 1px solid var(--line); }
.p-strip > div:last-child { border-right: none; }
.p-strip .k {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.p-strip .v { font-size: 14px; color: var(--ink-soft); }

/* Démonstration produit : fenêtre .app pleine largeur */
.p-demo .app-body { min-height: 340px; }

/* Session TRAIN : mini-écrans */
.mini-screen {
  display: inline-block;
  vertical-align: top;
  width: 44%;
  border: 1px solid var(--line-soft);
  margin: 0 4% 12px 0;
}
.mini-screen .ms-bar { height: 10px; background: var(--paper-alt); border-bottom: 1px solid var(--line-soft); }
.mini-screen .ms-body { padding: 8px; }
.mini-screen .ms-body i { display: block; height: 4px; background: var(--line-soft); margin-bottom: 5px; }
.mini-screen .ms-cap {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-faint);
  padding: 4px 8px;
  border-top: 1px solid var(--line-soft);
}

/* Processus */

.steps { counter-reset: none; }
.steps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line); }
.step {
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.step:nth-child(2n) { border-right: none; }
.step:nth-last-child(-n+2) { border-bottom: none; }
.step .n { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.1em; }
.step h3 { font-size: 19px; margin: 10px 0 10px; }
.step p { font-size: 14.5px; color: var(--ink-soft); }

/* Livrables */

.deliv { display: flex; flex-wrap: wrap; gap: 10px; }
.deliv span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  border: 1px solid var(--line);
  padding: 8px 14px;
}
.deliv span b { color: var(--accent); font-weight: 400; margin-right: 8px; }

/* CTA bas de page produit */

.p-cta { text-align: center; }
.p-cta h2 { font-size: clamp(20px, 2.6vw, 28px); margin-bottom: 14px; }
.p-cta p { color: var(--ink-soft); max-width: 52ch; margin: 0 auto 32px; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: 1fr; }
  .card { border-right: none; border-bottom: 1px solid var(--line); }
  .card:last-child { border-bottom: none; }
  .hero-index, .spec-grid, .eng-list { grid-template-columns: repeat(2, 1fr); }
  .px-flux { display: none; }
  .hero-index .index-item::before { animation: none !important; }
  .index-item:nth-child(2n), .spec:nth-child(2n), .eng-list li:nth-child(2n) { border-right: none; }
  .index-item:nth-child(-n+2), .spec:nth-child(-n+2), .eng-list li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .spec:nth-child(-n+2) { border-bottom-color: #3c3b38; }
  .p-strip { grid-template-columns: 1fr; }
  .p-strip > div { border-right: none; border-bottom: 1px solid var(--line); }
  .p-strip > div:last-child { border-bottom: none; }
}

@media (max-width: 640px) {
  section { padding: 60px 0; }
  .hero { padding: 56px 0; }
  .nav-links { gap: 14px; }
  .nav-links > a:not(.nav-cta) { display: none; }
  .hero-index, .spec-grid, .eng-list, .cas-grid, .steps-grid { grid-template-columns: 1fr; }
  .index-item, .spec, .eng-list li, .cas-grid article, .step {
    border-right: none !important;
    border-bottom: 1px solid var(--line);
  }
  .index-item:last-child, .spec:last-child, .eng-list li:last-child,
  .cas-grid article:last-child, .step:last-child { border-bottom: none; }
  .spec { border-bottom-color: #3c3b38; }
  .app-tabs { grid-template-columns: repeat(2, 1fr); }
  .app-tab { border-bottom: 1px solid var(--line); }
  .app-step .t { font-size: 8.5px; }
  .app-body { grid-template-columns: 1fr; }
  .pane { border-right: none; border-bottom: 1px solid var(--line-soft); }
  .pane:last-child { border-bottom: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .app [data-on] { transition: none; }
  .cursor-dot { transition: none; }
}

/* ==========================================================================
   Mise en scène drag & drop (style Stripe) :
   un artefact sur "votre poste", un curseur le saisit, le dépose dans
   l'atelier, le traitement se joue, les livrables reviennent sur le poste.
   ========================================================================== */

.scene .scene-stage {
  position: relative;
  height: 340px;
  overflow: hidden;
  background: var(--paper);
}
.p-demo .scene .scene-stage { height: 400px; }

/* --- Votre poste (zone source, à gauche) --- */
.desk {
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  border-right: 1px dashed var(--line-soft);
}
.desk-label {
  position: absolute;
  top: 10px; left: 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

/* Carte fichier (l'artefact) */
.file-card {
  position: absolute;
  left: 6%; top: 16%;
  width: 128px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 10px;
  z-index: 3;
  transition:
    left 950ms cubic-bezier(.5, 0, .25, 1),
    top 950ms cubic-bezier(.5, 0, .25, 1),
    transform 350ms ease,
    box-shadow 350ms ease,
    opacity 350ms ease;
}
.file-card .fi, .dlv .fi {
  display: block;
  width: 26px; height: 32px;
  border: 1px solid var(--ink);
  position: relative;
  margin-bottom: 8px;
  background: var(--paper);
}
.file-card .fi::after, .dlv .fi::after {
  content: "";
  position: absolute;
  top: -1px; right: -1px;
  width: 9px; height: 9px;
  background: var(--paper);
  border-left: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.fi.doc::before {
  content: "";
  position: absolute;
  left: 5px; right: 5px; top: 12px;
  height: 2px;
  background: var(--line);
  box-shadow: 0 5px 0 var(--line), 0 10px 0 var(--line);
}
.file-card .fn, .dlv .fn {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink);
  white-space: nowrap;
}
.file-card .fm {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-faint);
  margin-top: 3px;
  white-space: nowrap;
}

/* Livrables qui reviennent sur le poste */
.dlv {
  position: absolute;
  left: 6%;
  width: 132px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  z-index: 2;
}
.dlv .fi { width: 18px; height: 23px; margin: 0; flex: none; }
.dlv .fn { font-size: 9.5px; }

/* --- Zone de dépôt / atelier (à droite) --- */
.dz {
  position: absolute;
  right: 3%; top: 7%; bottom: 7%;
  width: 55%;
  border: 1.5px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  transition: border-color 300ms ease, background 300ms ease;
}
.dz-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-align: center;
  padding: 0 18px;
}
.dz-proc { display: none; width: 100%; height: 100%; padding: 12px 14px; overflow: hidden; }
.dz-proc.cols { display: none; gap: 14px; }
.dz-proc .col { flex: 1; min-width: 0; }

/* --- Curseur (flèche) --- */
.ptr {
  position: absolute;
  left: 92%; top: 86%;
  width: 17px; height: 17px;
  z-index: 6;
  transition:
    left 950ms cubic-bezier(.5, 0, .25, 1),
    top 950ms cubic-bezier(.5, 0, .25, 1);
}

/* --- Chorégraphie commune (pilotée par phases nommées) --- */
/* grab1 : le curseur rejoint le 1er artefact ; drag1 : il le glisse ;
   post-drop : déposé, l'atelier travaille ; grab2/drag2/drop2 : 2e artefact */

.scene.grab1:not(.drag1) .ptr { left: 16%; top: 30%; }
.scene.grab1:not(.drag1) .file-card.f1 { transform: scale(1.02); box-shadow: 0 6px 18px rgba(17, 18, 19, 0.10); }

.scene.drag1:not(.post-drop) .ptr { left: 62%; top: 46%; }
.scene.drag1:not(.post-drop) .file-card.f1 {
  left: 52%; top: 34%;
  transform: scale(0.97) rotate(1.2deg);
  box-shadow: 0 16px 32px rgba(17, 18, 19, 0.14);
}
.scene.drag1:not(.post-drop) .dz { border-color: var(--accent); background: #fbf6f4; }

.scene.post-drop .file-card.f1 { left: 60%; top: 40%; transform: scale(0.4); opacity: 0; }
.scene.post-drop .dz { border-style: solid; border-color: var(--line); }
.scene.post-drop .dz-hint { display: none; }
.scene.post-drop .dz-proc { display: block; }
.scene.post-drop .dz-proc.cols { display: flex; }
.scene.post-drop .ptr { left: 90%; top: 84%; }

/* Deuxième artefact (TRACE : la spec puis le logiciel) */
.scene.grab2:not(.drag2) .ptr { left: 16%; top: 58%; }
.scene.grab2:not(.drag2) .file-card.f2 { transform: scale(1.02); box-shadow: 0 6px 18px rgba(17, 18, 19, 0.10); }

.scene.drag2:not(.drop2) .ptr { left: 62%; top: 46%; }
.scene.drag2:not(.drop2) .file-card.f2 {
  left: 52%; top: 34%;
  transform: scale(0.97) rotate(1.2deg);
  box-shadow: 0 16px 32px rgba(17, 18, 19, 0.14);
}
.scene.drag2:not(.drop2) .dz { border-color: var(--accent); background: #fbf6f4; }
.scene.drop2 .file-card.f2 { left: 60%; top: 40%; transform: scale(0.4); opacity: 0; }
.scene.drop2 .ptr { left: 90%; top: 84%; }

/* Invite au 2e dépôt, masquée une fois le dépôt fait */
.dz-hint2 {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-top: 10px;
}
.scene.drop2 .dz-hint2 { display: none; }

/* ---------- IHM simulée (le logiciel client) ---------- */

.sim-ihm { border: 1px solid var(--line); background: var(--paper); }
.si-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: var(--paper-alt);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  padding: 5px 9px;
  white-space: nowrap;
}
.si-led { width: 7px; height: 7px; border-radius: 50%; background: var(--line); flex: none; }
.si-body { padding: 10px; }
.ihm-label { font-size: 10.5px; color: var(--ink-soft); margin-bottom: 4px; }
.ihm-field {
  border: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 8px;
  min-height: 27px;
  color: var(--ink);
}
.si-gauge { height: 6px; border: 1px solid var(--line-soft); background: var(--paper-alt); margin: 9px 0; }
.si-gauge i { display: block; height: 100%; width: 0; background: var(--ink); transition: width 800ms ease; }
.app .si-gauge i[data-on] { opacity: 1; transform: none; }
.app .si-gauge i[data-on].s-on { width: 64%; }
.ihm-btns { display: flex; gap: 7px; }
.ihm-btn {
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 5px 9px;
  white-space: nowrap;
  transition: border-color 300ms ease, color 300ms ease;
}

/* Résultat RECOVER : le logiciel relancé, par-dessus l'atelier */
.result {
  position: absolute;
  left: 34%; bottom: 9%;
  width: 190px;
  z-index: 4;
  box-shadow: 0 18px 40px rgba(17, 18, 19, 0.16);
}
.app .result[data-on] { transform: translateY(10px) scale(0.92); }
.app .result[data-on].s-on { transform: none; }
.view-rc.post-drop .result .si-led { background: var(--accent); }

/* Saisie qui se "tape" dans le champ (VERIFY) */
.type {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  font-family: var(--font-mono);
  width: 0;
}
.app .type[data-on] { opacity: 1; transform: none; }
.app .type[data-on].s-on { width: 7ch; transition: width 700ms steps(7); }

/* VERIFY : modes REC / REJEU */
.m-rec, .m-replay { display: none; color: var(--accent); letter-spacing: 0.08em; white-space: nowrap; }
.m-rec { animation: rec-blink 1.1s steps(1) infinite; }
@keyframes rec-blink { 50% { opacity: 0.25; } }
.view-vf[data-step="3"] .m-rec,
.view-vf[data-step="4"] .m-rec,
.view-vf[data-step="5"] .m-rec { display: inline; }
.view-vf[data-step="6"] .m-replay,
.view-vf[data-step="7"] .m-replay,
.view-vf[data-step="8"] .m-replay { display: inline; }

/* VERIFY : trajectoire du curseur dans l'IHM ouverte (record puis rejeu) */
.view-vf.post-drop[data-step="3"] .ptr { left: 52%; top: 30%; }
.view-vf.post-drop[data-step="4"] .ptr { left: 54%; top: 44%; }
.view-vf.post-drop[data-step="5"] .ptr { left: 50%; top: 66%; }
.view-vf.post-drop[data-step="6"] .ptr { left: 54%; top: 44%; }
.view-vf.post-drop[data-step="7"] .ptr { left: 61%; top: 66%; }

/* Écart détecté : l'alarme ne s'acquitte pas */
.view-vf[data-step="7"] .ihm-btn.al,
.view-vf[data-step="8"] .ihm-btn.al { border-color: var(--accent); color: var(--accent); }

/* Rangées d'atelier */
.dz-proc .pane-head { margin-bottom: 8px; }
.dz-proc .hexrow { padding: 0 2px; }

@media (max-width: 640px) {
  .scene .scene-stage { height: 320px; }
  .file-card { width: 106px; }
  .dlv { width: 112px; }
  .dz { width: 52%; }
  .result { width: 160px; left: 30%; }
}

/* ---------- RECOVER : lancement de l'ancien logiciel + comparaison ---------- */

/* L'ancien logiciel lancé sur le poste (phase "run") */
.old-ihm {
  position: absolute;
  left: 5%; top: 44%;
  width: 158px;
  z-index: 2;
  opacity: 0;
  transform: translateY(8px) scale(0.94);
  transition: opacity 400ms ease, transform 400ms ease;
  box-shadow: 0 14px 30px rgba(17, 18, 19, 0.12);
}
.scene.run .old-ihm { opacity: 1; transform: none; }
.scene.compare .old-ihm { opacity: 0; transform: scale(0.94); }

/* Pendant le lancement, le curseur est sur le fichier (double-clic) */
.view-rc.run:not(.grab1) .ptr { left: 16%; top: 26%; }

/* Panneau avant / après, par-dessus l'atelier */
.compare-panel {
  position: absolute;
  left: 7%; right: 3%; top: 8%; bottom: 8%;
  background: var(--paper);
  border: 1px solid var(--line);
  z-index: 5;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cmp-cols { display: flex; gap: 14px; flex: 1; min-height: 0; }
.cmp-col { flex: 1; min-width: 0; }
.cmp-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: 7px;
}
.cmp-col.new .cmp-label { color: var(--accent); }
.compare-panel .badge-final { margin-top: 0; align-self: flex-start; }

/* ---------- Flux d'étapes (rubrique Déroulé) ---------- */

[data-flow] .step { position: relative; opacity: 0.45; transition: opacity 450ms ease; }
[data-flow] .step::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 1100ms ease;
}
[data-flow] .step.flow-on,
[data-flow] .step.flow-active { opacity: 1; }
[data-flow] .step.flow-on::before,
[data-flow] .step.flow-active::before { width: 100%; }
[data-flow] .step .n { color: var(--ink-faint); transition: color 300ms ease; }
[data-flow] .step.flow-active .n { color: var(--accent); }
[data-flow] .step.flow-on .n { color: var(--ink); }

/* ---------- Apparition en cascade des grilles ---------- */

[data-stagger] > * {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 520ms ease, transform 520ms ease;
}
[data-stagger].in > * { opacity: 1; transform: none; }
[data-stagger] > *:nth-child(2) { transition-delay: 110ms; }
[data-stagger] > *:nth-child(3) { transition-delay: 220ms; }
[data-stagger] > *:nth-child(4) { transition-delay: 330ms; }
[data-stagger] > *:nth-child(5) { transition-delay: 440ms; }
[data-stagger] > *:nth-child(6) { transition-delay: 550ms; }
[data-stagger] > *:nth-child(7) { transition-delay: 660ms; }
[data-stagger] > *:nth-child(8) { transition-delay: 770ms; }

@media (prefers-reduced-motion: reduce) {
  [data-flow] .step { opacity: 1; }
  [data-stagger] > * { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Parcours produit — une rubrique et un widget animé par étape
   ========================================================================== */

.process-story { background: var(--paper-alt); }
.process-story .section-head { margin-bottom: 72px; }
.process-row {
  display: grid;
  grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(42px, 7vw, 100px);
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
.process-row.reverse { grid-template-columns: minmax(0, 1.28fr) minmax(240px, .72fr); }
.process-row.reverse .process-copy { order: 2; }
.process-row.reverse .process-widget { order: 1; }
.process-copy { max-width: 430px; }
.process-num {
  display: block;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--accent);
}
.process-copy h3 { margin-bottom: 16px; font-size: clamp(18px, 2.4vw, 26px); }
.process-copy p { color: var(--ink-soft); font-size: 16px; line-height: 1.65; }

.process-widget {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
}
.process-widget small,
.process-widget label { font-family: var(--font-mono); }

/* Primitives communes */
.pw-window {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 18px 40px rgba(17, 18, 19, .12);
}
.pw-bar {
  display: flex;
  justify-content: space-between;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-alt);
  font: 9.5px var(--font-mono);
  letter-spacing: .07em;
}
.pw-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pw-bar em { color: var(--accent); font-style: normal; }
.pw-screen { padding: 15px; font: 10px var(--font-mono); }
.pw-screen label { display: block; margin-bottom: 6px; color: var(--ink-soft); }
.pw-screen button,
.pw-run button {
  margin-top: 12px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  font: 9px var(--font-mono);
}
.pw-gauge { height: 7px; margin-top: 12px; border: 1px solid var(--line-soft); }
.pw-gauge b { display: block; width: 0; height: 100%; background: var(--ink); }
.pw-input { padding: 7px 9px; border: 1px solid var(--line-soft); background: var(--paper); }
.pw-file {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--paper);
  font: 11px var(--font-mono);
  box-shadow: 0 12px 28px rgba(17, 18, 19, .1);
}
.pw-file::before {
  content: "";
  display: block;
  width: 28px; height: 34px;
  margin-bottom: 10px;
  border: 1px solid var(--ink);
}
.pw-file small { display: block; margin-top: 4px; color: var(--ink-faint); }

/* RECOVER — 01 lancer et observer */
.pw-run .pw-window { position: absolute; width: 58%; left: 8%; top: 36px; }
.pw-run .pw-event {
  position: absolute;
  right: 6%;
  width: 31%;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  font: 9.5px var(--font-mono);
  opacity: 0;
  transform: translateX(14px);
}
.pw-run .pw-event:nth-of-type(2) { top: 80px; }
.pw-run .pw-event:nth-of-type(3) { top: 132px; }
.pw-event b { margin-right: 7px; color: var(--accent); }
.pw-run.reveal.in .pw-gauge b { animation: pw-fill 1s .7s forwards; }
.pw-run.reveal.in .pw-event:nth-of-type(2) { animation: pw-pop .45s 1.3s forwards; }
.pw-run.reveal.in .pw-event:nth-of-type(3) { animation: pw-pop .45s 2s forwards; }
.process-row.in .pw-run .pw-gauge b { animation: pw-fill 1s .7s forwards; }
.process-row.in .pw-run .pw-event:nth-of-type(2) { animation: pw-pop .45s 1.3s forwards; }
.process-row.in .pw-run .pw-event:nth-of-type(3) { animation: pw-pop .45s 2s forwards; }

/* RECOVER — 02 décompiler */
.pw-decompile .pw-file { position: absolute; left: 6%; top: 84px; width: 27%; }
.pw-flow { position: absolute; left: 34%; right: 52%; top: 145px; height: 1px; background: var(--line); }
.pw-flow i { position: absolute; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: 0; }
.pw-modules { position: absolute; right: 6%; top: 48px; width: 44%; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pw-modules span { padding: 19px 8px; border: 1px solid var(--line); background: var(--paper); font: 9px var(--font-mono); opacity: 0; }
.pw-scan { position: absolute; right: 6%; top: 40px; width: 44%; height: 2px; background: var(--accent); opacity: 0; }
.process-row.in .pw-flow i:nth-child(1) { animation: pw-packet 1.2s .4s infinite; }
.process-row.in .pw-flow i:nth-child(2) { animation: pw-packet 1.2s .8s infinite; }
.process-row.in .pw-flow i:nth-child(3) { animation: pw-packet 1.2s 1.2s infinite; }
.process-row.in .pw-modules span { animation: pw-pop .45s forwards; }
.process-row.in .pw-modules span:nth-child(1) { animation-delay: .7s; }
.process-row.in .pw-modules span:nth-child(2) { animation-delay: 1s; }
.process-row.in .pw-modules span:nth-child(3) { animation-delay: 1.3s; }
.process-row.in .pw-modules span:nth-child(4) { animation-delay: 1.6s; }
.process-row.in .pw-scan { animation: pw-scan 1.8s .5s ease-in-out forwards; }

/* RECOVER — 03 source + documentation */
.pw-code { position: absolute; left: 5%; top: 48px; width: 51%; padding: 18px; border: 1px solid var(--line); background: #111213; color: #ecebe7; }
.pw-code i, .pw-code b { display: block; font: 10px/2 var(--font-mono); white-space: nowrap; overflow: hidden; width: 0; }
.pw-code i { color: #888781; }
.pw-link-line { position: absolute; left: 56%; right: 36%; top: 150px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.pw-doc { position: absolute; right: 5%; top: 58px; width: 31%; padding: 18px; border: 1px solid var(--line); background: var(--paper); opacity: 0; }
.pw-doc strong { display: block; margin-bottom: 18px; font: 10px var(--font-mono); }
.pw-doc i, .pw-reqdoc .pw-page i { display: block; height: 5px; margin: 9px 0; background: var(--line-soft); }
.process-row.in .pw-code i, .process-row.in .pw-code b { animation: pw-type 1s steps(28) forwards; }
.process-row.in .pw-code b:nth-child(2) { animation-delay: .5s; }
.process-row.in .pw-code b:nth-child(3) { animation-delay: 1s; }
.process-row.in .pw-code b:nth-child(4) { animation-delay: 1.5s; }
.process-row.in .pw-link-line { animation: pw-grow .5s 1.8s forwards; }
.process-row.in .pw-doc { animation: pw-pop .45s 2.1s forwards; }

/* RECOVER — 04 comparaison */
.pw-compare { display: flex; align-items: center; justify-content: center; gap: 15px; padding: 40px 28px 70px; }
.pw-mini { width: 38%; padding: 20px; border: 1px solid var(--line); background: var(--paper); opacity: 0; transform: translateX(-15px); }
.pw-mini.new { transform: translateX(15px); }
.pw-mini small, .pw-mini span { display: block; font: 9px var(--font-mono); }
.pw-mini span { margin-top: 14px; }
.pw-equal { font: 24px var(--font-mono); opacity: 0; }
.pw-verdict { position: absolute; bottom: 25px; padding: 7px 12px; border: 1px solid var(--accent); color: var(--accent); font: 10px var(--font-mono); opacity: 0; }
.process-row.in .pw-mini { animation: pw-slide-right .5s .4s forwards; }
.process-row.in .pw-mini.new { animation: pw-slide-left .5s .4s forwards; }
.process-row.in .pw-equal { animation: pw-pop .35s 1s forwards; }
.process-row.in .pw-mini .pw-gauge b { animation: pw-fill 1s 1.2s forwards; }
.process-row.in .pw-verdict { animation: pw-pop .4s 2.3s forwards; }

/* TRACE — 01 ingestion */
.pw-ingest .pw-file { position: absolute; left: 7%; top: 76px; width: 29%; }
.pw-arrow { position: absolute; left: 39%; top: 148px; width: 12%; height: 1px; background: var(--line); }
.pw-arrow::after { content: ""; position: absolute; right: 0; top: -4px; border: 4px solid transparent; border-left-color: var(--accent); }
.pw-reqs { position: absolute; right: 6%; top: 47px; width: 41%; }
.pw-reqs span { display: block; margin-bottom: 9px; padding: 13px; border: 1px solid var(--line); background: var(--paper); font: 9px var(--font-mono); opacity: 0; transform: translateX(12px); }
.pw-reqs b { color: var(--accent); margin-right: 7px; }
.process-row.in .pw-arrow::before { content: ""; position: absolute; inset: -3px auto auto 0; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pw-packet 1.2s infinite; }
.process-row.in .pw-reqs span { animation: pw-pop .4s forwards; }
.process-row.in .pw-reqs span:nth-child(1) { animation-delay: .7s; }
.process-row.in .pw-reqs span:nth-child(2) { animation-delay: 1.1s; }
.process-row.in .pw-reqs span:nth-child(3) { animation-delay: 1.5s; }

/* TRACE — 02 document d'exigences */
.pw-reqdoc { display: grid; grid-template-columns: 34% 66%; padding: 34px; }
.pw-tree, .pw-reqdoc .pw-page { border: 1px solid var(--line); background: var(--paper); padding: 16px; }
.pw-tree { border-right: none; }
.pw-tree span { display: block; padding: 9px; font: 9px var(--font-mono); opacity: .55; }
.pw-tree span.on { color: var(--accent); background: var(--paper-alt); opacity: 1; }
.pw-reqdoc .pw-page { opacity: 0; }
.pw-reqdoc .pw-page strong, .pw-reqdoc .pw-page em { display: block; font: 10px var(--font-mono); }
.pw-reqdoc .pw-page em { margin-top: 20px; color: var(--accent); font-style: normal; }
.process-row.in .pw-reqdoc .pw-page { animation: pw-pop .5s .5s forwards; }
.process-row.in .pw-reqdoc .pw-page i { transform: scaleX(0); transform-origin: left; animation: pw-grow .6s forwards; }
.process-row.in .pw-reqdoc .pw-page i:nth-of-type(1) { animation-delay: 1s; }
.process-row.in .pw-reqdoc .pw-page i:nth-of-type(2) { animation-delay: 1.3s; }
.process-row.in .pw-reqdoc .pw-page i:nth-of-type(3) { animation-delay: 1.6s; }

/* TRACE — 03 mapping spec/code */
.pw-map { display: grid; grid-template-columns: 31% 38% 31%; align-items: center; padding: 38px 28px; }
.pw-map-col { display: grid; gap: 13px; }
.pw-map-col small { margin-bottom: 7px; color: var(--ink-faint); }
.pw-map-col span { padding: 10px; border: 1px solid var(--line); background: var(--paper); font: 9px var(--font-mono); }
.pw-map svg { width: 100%; overflow: visible; }
.pw-map path { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 220; stroke-dashoffset: 220; }
.pw-map path.miss { stroke: var(--accent); stroke-dasharray: 6 5; }
.pw-map-col .missing { color: var(--accent); border-color: var(--accent); opacity: 0; }
.process-row.in .pw-map path { animation: pw-draw 1s .6s forwards; }
.process-row.in .pw-map path:nth-child(2) { animation-delay: 1s; }
.process-row.in .pw-map path:nth-child(3) { animation-delay: 1.4s; }
.process-row.in .pw-map-col .missing { animation: pw-pop .4s 2.2s forwards; }

/* TRACE — 04 matrice */
.pw-matrix { padding: 35px; }
.pw-matrix > div { display: grid; grid-template-columns: 1fr 1.2fr .8fr; padding: 12px; border: 1px solid var(--line-soft); border-top: none; background: var(--paper); font: 9.5px var(--font-mono); opacity: 0; }
.pw-matrix > .pw-matrix-head { border-top: 1px solid var(--line-soft); color: var(--ink-faint); opacity: 1; }
.pw-matrix b { color: var(--ink); }
.pw-matrix .ko b { color: var(--accent); }
.pw-score { display: inline-block; margin-top: 18px; color: var(--accent); font: 11px var(--font-mono); opacity: 0; }
.process-row.in .pw-matrix > div:not(.pw-matrix-head) { animation: pw-pop .4s forwards; }
.process-row.in .pw-matrix > div:nth-child(2) { animation-delay: .5s; }
.process-row.in .pw-matrix > div:nth-child(3) { animation-delay: .9s; }
.process-row.in .pw-matrix > div:nth-child(4) { animation-delay: 1.3s; }
.process-row.in .pw-score { animation: pw-pop .4s 1.9s forwards; }

/* VERIFY — 01 plan */
.pw-testplan { padding: 37px; }
.pw-plan-line { display: grid; grid-template-columns: 78px 1fr 12px; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--line-soft); border-bottom: none; background: var(--paper); font: 9.5px var(--font-mono); opacity: 0; }
.pw-plan-line:last-child { border-bottom: 1px solid var(--line-soft); }
.pw-plan-line b { color: var(--accent); }
.pw-plan-line i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--line); }
.process-row.in .pw-plan-line { animation: pw-pop .4s forwards; }
.process-row.in .pw-plan-line:nth-child(1) { animation-delay: .3s; }
.process-row.in .pw-plan-line:nth-child(2) { animation-delay: .7s; }
.process-row.in .pw-plan-line:nth-child(3) { animation-delay: 1.1s; }
.process-row.in .pw-plan-line:nth-child(4) { animation-delay: 1.5s; }
.process-row.in .pw-plan-line i { animation: pw-dot .3s forwards; animation-delay: inherit; }

/* VERIFY — 02 record / 03 replay */
.pw-record .pw-window, .pw-replay .pw-window { position: absolute; left: 7%; top: 38px; width: 56%; }
.pw-mouse { position: absolute; width: 18px; left: 23%; top: 85px; z-index: 3; transition: none; }
.pw-mouse path { fill: var(--ink); stroke: var(--paper); stroke-width: 1.2; }
.pw-record-log, .pw-verdicts { position: absolute; right: 5%; top: 67px; width: 28%; }
.pw-record-log span, .pw-verdicts b { display: block; margin-bottom: 10px; padding: 9px; border: 1px solid var(--line); background: var(--paper); font: 9px var(--font-mono); opacity: 0; }
.pw-verdicts b.ko { color: var(--accent); border-color: var(--accent); }
.process-row.in .pw-record .pw-mouse { animation: pw-cursor-record 2.4s .4s ease-in-out forwards; }
.process-row.in .pw-record-log span:first-child { animation: pw-pop .35s 1.4s forwards; }
.process-row.in .pw-record-log span:last-child { animation: pw-pop .35s 2.3s forwards; }
.process-row.in .pw-replay .pw-mouse { animation: pw-cursor-replay 2.8s .4s ease-in-out forwards; }
.process-row.in .pw-verdicts b { animation: pw-pop .3s forwards; }
.process-row.in .pw-verdicts b:nth-child(1) { animation-delay: 1s; }
.process-row.in .pw-verdicts b:nth-child(2) { animation-delay: 1.5s; }
.process-row.in .pw-verdicts b:nth-child(3) { animation-delay: 2s; }
.process-row.in .pw-verdicts b:nth-child(4) { animation-delay: 2.7s; }
.process-row.in .pw-replay .alarm { animation: pw-alarm .35s 2.4s forwards; }

/* VERIFY — 04 preuve */
.pw-proof { display: flex; align-items: center; gap: 32px; padding: 38px; }
.pw-proof-card { width: 44%; padding: 24px; border: 1px solid var(--line); background: var(--paper); transform: scale(.94); opacity: 0; }
.pw-proof-card small, .pw-proof-card span { display: block; color: var(--ink-faint); font: 9px var(--font-mono); }
.pw-proof-card strong { display: block; margin: 15px 0 2px; font: 42px var(--font-mono); }
.pw-proof-bar { height: 7px; margin-top: 20px; background: var(--line-soft); }
.pw-proof-bar i { display: block; width: 0; height: 100%; background: var(--accent); }
.pw-proof-files { display: grid; gap: 10px; width: 46%; }
.pw-proof-files span { padding: 12px; border: 1px solid var(--line); background: var(--paper); font: 9px var(--font-mono); opacity: 0; transform: translateX(12px); }
.process-row.in .pw-proof-card { animation: pw-pop .45s .3s forwards; }
.process-row.in .pw-proof-bar i { animation: pw-proof-fill 1s 1s forwards; }
.process-row.in .pw-proof-files span { animation: pw-pop .35s forwards; }
.process-row.in .pw-proof-files span:nth-child(1) { animation-delay: 1.4s; }
.process-row.in .pw-proof-files span:nth-child(2) { animation-delay: 1.7s; }
.process-row.in .pw-proof-files span:nth-child(3) { animation-delay: 2s; }

/* TRAIN — 01 observation */
.pw-observe .pw-window { position: absolute; left: 7%; top: 35px; width: 55%; }
.pw-timeline { position: absolute; left: 7%; right: 7%; bottom: 42px; display: flex; justify-content: space-between; padding-top: 17px; }
.pw-timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: var(--line); }
.pw-timeline i { position: absolute; top: 0; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.pw-timeline b { font: 8.5px var(--font-mono); color: var(--ink-faint); }
.process-row.in .pw-timeline i { animation: pw-timeline 2.8s .5s ease-in-out forwards; }

/* TRAIN — 02 procédures */
.pw-procedures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-content: center; padding: 42px 24px; }
.pw-shot { position: relative; z-index: 2; border: 1px solid var(--line); background: var(--paper); opacity: 0; }
.pw-shot i { display: block; height: 65px; margin: 8px; background: linear-gradient(135deg, var(--paper-alt), var(--line-soft)); }
.pw-shot span { display: block; padding: 7px; border-top: 1px solid var(--line-soft); font: 8px var(--font-mono); }
.pw-procedures svg { position: absolute; left: 8%; right: 8%; top: 117px; width: 84%; }
.pw-procedures path { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 420; stroke-dashoffset: 420; }
.process-row.in .pw-shot { animation: pw-pop .35s forwards; }
.process-row.in .pw-shot:nth-child(1) { animation-delay: .3s; }
.process-row.in .pw-shot:nth-child(2) { animation-delay: .7s; }
.process-row.in .pw-shot:nth-child(3) { animation-delay: 1.1s; }
.process-row.in .pw-shot:nth-child(4) { animation-delay: 1.5s; }
.process-row.in .pw-procedures path { animation: pw-draw 1.5s .5s forwards; }

/* TRAIN — 03 manuel */
.pw-manual { display: grid; grid-template-columns: 34% 66%; padding: 35px; }
.pw-manual-nav, .pw-manual-page { padding: 15px; border: 1px solid var(--line); background: var(--paper); }
.pw-manual-nav { border-right: none; }
.pw-manual-nav span { display: block; padding: 9px; font: 9px var(--font-mono); opacity: .55; }
.pw-manual-nav span.on { opacity: 1; color: var(--accent); background: var(--paper-alt); }
.pw-manual-page strong { font: 9px var(--font-mono); }
.pw-manual-shot { height: 70px; margin: 15px 0; background: var(--paper-alt); border: 1px solid var(--line-soft); opacity: 0; }
.pw-manual-page i { display: block; height: 5px; margin: 8px 0; background: var(--line-soft); transform: scaleX(0); transform-origin: left; }
.process-row.in .pw-manual-shot { animation: pw-pop .4s .5s forwards; }
.process-row.in .pw-manual-page i { animation: pw-grow .6s forwards; }
.process-row.in .pw-manual-page i:nth-of-type(1) { animation-delay: 1s; }
.process-row.in .pw-manual-page i:nth-of-type(2) { animation-delay: 1.3s; }
.process-row.in .pw-manual-page i:nth-of-type(3) { animation-delay: 1.6s; }

/* TRAIN — 04 modules */
.pw-courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-content: center; padding: 40px 30px 75px; }
.pw-course { padding: 17px; border: 1px solid var(--line); background: var(--paper); opacity: 0; transform: translateY(12px); }
.pw-course small, .pw-course b { display: block; font-family: var(--font-mono); }
.pw-course small { color: var(--ink-faint); font-size: 8px; }
.pw-course b { margin: 10px 0 16px; font-size: 11px; }
.pw-course > i { display: block; height: 5px; background: var(--line-soft); }
.pw-course em { display: block; width: 0; height: 100%; background: var(--accent); }
.pw-updated { position: absolute; left: 30px; bottom: 31px; color: var(--accent); font: 9px var(--font-mono); opacity: 0; }
.process-row.in .pw-course { animation: pw-pop .4s forwards; }
.process-row.in .pw-course:nth-child(1) { animation-delay: .3s; }
.process-row.in .pw-course:nth-child(2) { animation-delay: .7s; }
.process-row.in .pw-course:nth-child(3) { animation-delay: 1.1s; }
.process-row.in .pw-course em { animation: pw-course-fill .8s 1.4s forwards; }
.process-row.in .pw-updated { animation: pw-pop .4s 2.3s forwards; }

/* Mouvements */
@keyframes pw-fill { to { width: 64%; } }
@keyframes pw-proof-fill { to { width: 97.6%; } }
@keyframes pw-course-fill { to { width: var(--target, 75%); } }
@keyframes pw-pop { to { opacity: 1; transform: none; } }
@keyframes pw-grow { to { transform: scaleX(1); } }
@keyframes pw-type { to { width: 100%; } }
@keyframes pw-draw { to { stroke-dashoffset: 0; } }
@keyframes pw-dot { to { background: var(--accent); border-color: var(--accent); } }
@keyframes pw-slide-right { to { opacity: 1; transform: translateX(0); } }
@keyframes pw-slide-left { to { opacity: 1; transform: translateX(0); } }
@keyframes pw-packet { 0% { left: 0; opacity: 0; } 20%,80% { opacity: 1; } 100% { left: calc(100% - 7px); opacity: 0; } }
@keyframes pw-scan { 0% { top: 40px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 250px; opacity: 0; } }
@keyframes pw-cursor-record {
  0% { left: 23%; top: 85px; } 45% { left: 26%; top: 145px; }
  60% { left: 26%; top: 145px; } 100% { left: 21%; top: 205px; }
}
@keyframes pw-cursor-replay {
  0% { left: 23%; top: 85px; } 35% { left: 26%; top: 145px; }
  55% { left: 21%; top: 205px; } 75% { left: 21%; top: 205px; }
  100% { left: 43%; top: 205px; }
}
@keyframes pw-alarm { to { color: var(--accent); border-color: var(--accent); } }
@keyframes pw-timeline { to { left: calc(100% - 9px); } }

@media (max-width: 900px) {
  .process-row, .process-row.reverse { grid-template-columns: 1fr; gap: 32px; padding: 56px 0; }
  .process-row.reverse .process-copy, .process-row.reverse .process-widget { order: initial; }
  .process-copy { max-width: 600px; }
}

@media (max-width: 560px) {
  .process-widget { min-height: 285px; }
  .pw-code { width: 57%; left: 3%; }
  .pw-doc { width: 34%; right: 3%; }
  .pw-compare { padding-inline: 12px; gap: 8px; }
  .pw-mini { width: 43%; padding: 12px; }
  .pw-map { padding-inline: 12px; }
  .pw-map-col span { padding: 8px 4px; font-size: 8px; }
  .pw-courses { padding-inline: 12px; gap: 6px; }
  .pw-course { padding: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .process-widget * { animation-duration: .001ms !important; animation-delay: 0s !important; }
}

/* ==========================================================================
   Landing — scènes globales en boucle continue
   ========================================================================== */

.global-flow { overflow: hidden; background: var(--ink); color: var(--paper); }
.global-flow .code-chip { border-color: #4b4a47; color: #d0cec8; }
.global-flow-head {
  display: grid;
  grid-template-columns: 1fr .7fr;
  align-items: end;
  gap: 60px;
  margin-bottom: 60px;
}
.global-flow-head h2 { margin-top: 18px; font-size: clamp(22px, 3.2vw, 36px); }
.global-flow-head p { max-width: 48ch; color: #aaa8a2; font-size: 16px; line-height: 1.65; }

.flow-machine {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid #41403d;
  background:
    linear-gradient(#292927 1px, transparent 1px),
    linear-gradient(90deg, #292927 1px, transparent 1px),
    #151616;
  background-size: 40px 40px;
}
.flow-inputs, .flow-outputs {
  position: absolute;
  top: 50%;
  width: 21%;
  display: grid;
  gap: 12px;
  transform: translateY(-50%);
}
.flow-inputs { left: 3%; }
.flow-outputs { right: 3%; }
.flow-inputs > small, .flow-outputs > small {
  margin-bottom: 3px;
  color: #777671;
  font: 9px var(--font-mono);
  letter-spacing: .14em;
}
/* Onglets de parcours au-dessus de la machine — cliquables, avance auto */
.flow-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 14px;
  border: 1px solid #3a3b39;
  background: #151616;
}
.flow-tab {
  position: relative;
  padding: 13px 14px 16px;
  border: 0;
  border-right: 1px solid #2c2d2c;
  background: transparent;
  color: #8b8984;
  font: 9.5px var(--font-mono);
  letter-spacing: .06em;
  text-align: left;
  cursor: pointer;
  transition: color .3s ease, background .3s ease;
}
.flow-tab:last-child { border-right: 0; }
.flow-tab:hover { color: #d7d5d0; }
.flow-tab.active { color: #fff; background: #1d1e1d; }
.flow-tab b { display: block; margin-bottom: 6px; color: var(--accent); font-size: 8px; font-weight: 400; letter-spacing: .14em; }
.flow-tab .fs-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: transparent;
}
.flow-tab.active .fs-progress { background: #2c2d2c; }
.fs-progress i { display: block; height: 100%; width: 0; background: var(--accent); }
.fs-progress.run i { animation: fs-fill var(--fs-duration, 8s) linear forwards; }
@keyframes fs-fill { from { width: 0; } to { width: 100%; } }

@media (max-width: 900px) {
  .flow-tabs { grid-template-columns: repeat(2, 1fr); }
  .flow-tab { border-bottom: 1px solid #2c2d2c; }
}

.flow-inputs span, .flow-outputs span {
  padding: 13px 14px;
  border: 1px solid #474643;
  background: #1b1c1c;
  color: #d4d2cc;
  font: 10px var(--font-mono);
  opacity: .38;
  transition: opacity .45s ease, border-color .45s ease, transform .45s ease;
}
.flow-inputs b, .flow-outputs b { margin-right: 9px; color: var(--accent); font-weight: 400; }
.flow-outputs i { font-style: normal; }

/* Entrées activées par le parcours : pulsation */
.flow-inputs span.on {
  opacity: 1;
  border-color: var(--accent);
  animation: fm-pulse 1.1s ease-in-out infinite;
}

/* Livrables : cachés tant que le parcours n'a pas produit */
.flow-outputs .fo { opacity: 0; transform: translateX(-10px); }
.flow-outputs .fo.on { opacity: 1; transform: translateX(0); }
.flow-outputs .fo.off { display: none; }
.flow-score {
  display: none;
  border-color: #70a180 !important;
  color: #8fc4a3;
  letter-spacing: .08em;
}
.flow-score.on { display: block; opacity: 1; animation: fm-score .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes fm-score {
  from { opacity: 0; transform: scale(.85); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes fm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(185, 67, 48, 0); }
  50% { box-shadow: 0 0 0 5px rgba(185, 67, 48, .18), 0 0 22px rgba(185, 67, 48, .35); }
}

.flow-platform {
  position: absolute;
  left: 50%; top: 50%;
  width: 39%;
  border: 1px solid #5a5955;
  background: #181919;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.flow-platform-head {
  display: flex;
  justify-content: space-between;
  padding: 13px 15px;
  border-bottom: 1px solid #41403d;
  color: #777671;
  font: 8.5px var(--font-mono);
  letter-spacing: .1em;
}
.flow-platform-head strong { color: #ecebe7; font-weight: 400; }
.flow-workshops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
}
.flow-workshops span {
  min-width: 0;
  padding: 15px 13px;
  border: 1px solid #474643;
  opacity: .38;
  transition: opacity .45s ease, border-color .45s ease;
  background: #1b1c1c;
  color: #d4d2cc;
  font: 9px var(--font-mono);
}
.flow-workshops span.on {
  opacity: 1;
  border-color: var(--accent);
  background: #201d1c;
  animation: fm-pulse 1.1s ease-in-out infinite;
}
.flow-workshops b, .flow-workshops strong, .flow-workshops em { display: block; }
.flow-workshops b { margin-bottom: 8px; color: var(--accent); font-weight: 400; }
.flow-workshops strong { font-size: 10px; font-weight: 400; }
.flow-workshops em { margin-top: 5px; color: #777671; font-size: 8px; font-style: normal; }

.flow-ingress, .flow-egress {
  position: absolute;
  top: 50%;
  height: 1px;
  background: #4a4946;
  z-index: 1;
}
.flow-ingress { left: 24%; right: 69.5%; }
.flow-egress { left: 69.5%; right: 24%; }
.flow-ingress > span, .flow-egress > span {
  position: absolute;
  top: 12px;
  width: 100%;
  color: #777671;
  text-align: center;
  font: 7.5px var(--font-mono);
  letter-spacing: .08em;
}
.flow-packet {
  position: absolute;
  top: -4px; left: 0;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 15px rgba(185, 67, 48, .75);
  opacity: 0;
  animation: gf-packet 2.4s linear infinite paused;
  transition: opacity .3s ease;
}
.flow-packet.p2 { animation-delay: -.8s; }
.flow-packet.p3 { animation-delay: -1.6s; }

/* Les paquets ne circulent que pendant les phases de transfert du parcours */
[data-fphase="move"] .flow-ingress .flow-packet,
[data-fphase="proc"] .flow-ingress .flow-packet,
[data-fphase="out"] .flow-egress .flow-packet {
  opacity: 1;
  animation-play-state: running;
}

/* Synchronisation version ↔ livrables */
.sync-section { overflow: hidden; }
.sync-grid { display: grid; grid-template-columns: .72fr 1.28fr; align-items: center; gap: 70px; }
.sync-copy h2 { margin: 20px 0; font-size: clamp(22px, 3.2vw, 34px); }
.sync-copy p { max-width: 45ch; color: var(--ink-soft); line-height: 1.65; }
.sync-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; font: 9px var(--font-mono); color: var(--ink-soft); }
.sync-legend i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--accent); }
.sync-legend span:last-child i { background: var(--ink); }

/* Flux de synchronisation : la livraison traverse, la documentation suit */
.sync-flux {
  --gx: 44%;
  position: relative;
  min-height: 460px;
  padding: 34px 0 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    var(--paper);
  background-size: 36px 36px;
}

/* Portique vertical, traversé par toutes les voies */
.sfx-gate {
  position: absolute;
  z-index: 3;
  top: 0; bottom: 0;
  left: var(--gx);
  width: 118px;
  transform: translateX(-50%);
  border-left: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  background: rgba(255, 255, 255, .82);
}
.sfx-gate span {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  color: var(--ink);
  font: 9px var(--font-mono);
  letter-spacing: .22em;
}
/* Faisceau : descend sur les voies documentaires au passage de la livraison */
.sfx-beam {
  position: absolute;
  top: 0; left: 50%;
  width: 1px; height: 100%;
  transform: scaleY(0);
  transform-origin: top;
  background: linear-gradient(180deg, var(--accent), rgba(185, 67, 48, .3));
  animation: sfx-beam 14s linear infinite;
}
@keyframes sfx-beam {
  0%, 43% { transform: scaleY(0); opacity: 0; }
  46% { transform: scaleY(1); opacity: 1; }
  58% { transform: scaleY(1); opacity: 1; }
  64%, 100% { transform: scaleY(1); opacity: 0; }
}

/* Voies */
.sfx-lane { position: relative; height: 62px; }
.sfx-soft { height: 88px; margin-bottom: 18px; }
.sfx-lane small {
  position: absolute;
  z-index: 2;
  top: 6px; left: 14px;
  color: var(--ink-faint);
  font: 8px var(--font-mono);
  letter-spacing: .16em;
}
.sfx-line {
  position: absolute;
  left: 0; right: 0; top: 60%;
  height: 1px;
  background: repeating-linear-gradient(90deg, #d6d3cc 0 7px, transparent 7px 16px);
  animation: hf-dash .8s linear infinite;
}

/* La livraison : brute avant le portique, qualifiée après */
.sfx-rel {
  position: absolute;
  z-index: 2;
  top: 60%; left: -14%;
  width: 216px;
  transform: translate(-50%, -50%);
  animation: sfx-travel 14s linear infinite;
}
@keyframes sfx-travel {
  0% { left: -14%; }
  38% { left: var(--gx, 44%); }
  56% { left: var(--gx, 44%); }
  100% { left: 114%; }
}
.sfx-raw, .sfx-fin {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 13px;
  font: 9.5px var(--font-mono);
  letter-spacing: .04em;
  white-space: nowrap;
}
.sfx-raw {
  border: 1px dashed #b4b1aa;
  color: #8f8c84;
  background: rgba(255, 255, 255, .9);
  animation: sfx-raw 14s linear infinite;
}
.sfx-fin {
  position: absolute;
  inset: 0;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(17, 18, 19, .1);
  opacity: 0;
  animation: sfx-fin 14s linear infinite;
}
.sfx-rel b { color: var(--accent); font-weight: 400; }
.sfx-fin em { margin-left: auto; color: #4d8a67; font-style: normal; }
@keyframes sfx-raw { 0%, 47% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes sfx-fin { 0%, 49% { opacity: 0; } 53%, 100% { opacity: 1; } }

/* Les documents : se régénèrent après le faisceau, puis republient */
.sfx-chip {
  position: absolute;
  z-index: 2;
  top: 60%;
  left: calc(var(--gx) + 76px);
  transform: translateY(-50%);
  display: grid;
  padding: 10px 13px;
  border: 1px solid var(--line);
  background: var(--paper);
  font: 9px var(--font-mono);
  white-space: nowrap;
  animation: sfx-chip 14s linear infinite;
}
/* Les deux états occupent la même cellule : la fiche prend la largeur du plus long */
.sfx-chip .old, .sfx-chip .new { grid-area: 1 / 1; }
.sfx-chip .old { color: var(--ink-faint); animation: sfx-old 14s linear infinite; }
.sfx-chip .new {
  color: #4d8a67;
  opacity: 0;
  animation: sfx-new 14s linear infinite;
}
@keyframes sfx-chip {
  0%, 51% { border-color: var(--line); box-shadow: none; }
  55%, 90% { border-color: #70a180; box-shadow: 0 10px 24px rgba(77, 138, 103, .14); }
  96%, 100% { border-color: var(--line); box-shadow: none; }
}
@keyframes sfx-old { 0%, 51% { opacity: 1; } 54%, 93% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes sfx-new { 0%, 52% { opacity: 0; } 55%, 92% { opacity: 1; } 96%, 100% { opacity: 0; } }

/* Paquet de republication vers le référentiel */
.sfx-packet {
  position: absolute;
  z-index: 1;
  top: calc(60% - 4px);
  left: calc(var(--gx) + 60px);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0;
  animation: sfx-packet 14s linear infinite;
}
@keyframes sfx-packet {
  0%, 56% { left: calc(var(--gx, 44%) + 60px); opacity: 0; }
  59% { opacity: 1; }
  86% { opacity: 1; }
  92%, 100% { left: 106%; opacity: 0; }
}

/* Cascade : chaque voie documentaire réagit avec un léger décalage */
.sfx-doc.d2 .sfx-chip, .sfx-doc.d2 .sfx-chip .old, .sfx-doc.d2 .sfx-chip .new, .sfx-doc.d2 .sfx-packet { animation-delay: .3s; }
.sfx-doc.d3 .sfx-chip, .sfx-doc.d3 .sfx-chip .old, .sfx-doc.d3 .sfx-chip .new, .sfx-doc.d3 .sfx-packet { animation-delay: .6s; }
.sfx-doc.d4 .sfx-chip, .sfx-doc.d4 .sfx-chip .old, .sfx-doc.d4 .sfx-chip .new, .sfx-doc.d4 .sfx-packet { animation-delay: .9s; }

@keyframes gf-rotate { to { transform: rotate(360deg); } }
@keyframes gf-packet { from { left: 0; } to { left: calc(100% - 9px); } }
@keyframes gf-card { 0%, 70%, 100% { border-color: #474643; } 12%, 30% { border-color: var(--accent); } }
@keyframes gf-workshop { 0%, 75%, 100% { border-color: #474643; color: #d4d2cc; } 12%, 32% { border-color: var(--accent); color: #fff; } }

@media (max-width: 900px) {
  .global-flow-head, .sync-grid { grid-template-columns: 1fr; gap: 36px; }
  .flow-machine { min-height: 650px; }
  .flow-platform { top: 33%; width: 64%; }
  .flow-inputs, .flow-outputs { top: auto; bottom: 30px; width: 43%; transform: none; }
  .flow-inputs { left: 4%; }
  .flow-outputs { right: 4%; }
  .flow-ingress, .flow-egress { top: 68%; }
  .flow-ingress { left: 25%; right: 50%; }
  .flow-egress { left: 50%; right: 25%; }
}

@media (max-width: 600px) {
  .flow-machine { min-height: 700px; }
  .flow-platform { top: 30%; width: 88%; }
  .flow-inputs, .flow-outputs { width: 44%; }
  .flow-inputs span, .flow-outputs span { padding: 10px 8px; font-size: 8px; }
  .flow-ingress, .flow-egress { top: 65%; }
  .sync-flux { --gx: 36%; min-height: 420px; }
  .sfx-gate { width: 84px; }
  .sfx-rel { width: 170px; }
  .sfx-raw, .sfx-fin { padding: 9px 10px; font-size: 8px; }
  .sfx-chip { left: calc(var(--gx) + 54px); padding: 8px 10px; font-size: 8px; }
  .sfx-packet { left: calc(var(--gx) + 46px); }
}

@media (prefers-reduced-motion: reduce) {
  .flow-machine *, .sync-flux * { animation: none !important; }
}

/* ==========================================================================
   Hero premium — démonstration lisible, locale et sécurisée
   ========================================================================== */

.hero-demo {
  overflow: hidden;
  border: 1px solid #303231;
  border-radius: 2px;
  color: #e9ebe8;
  background:
    radial-gradient(circle at 70% 10%, rgba(185, 67, 48, .1), transparent 34%),
    #0f1111;
  box-shadow:
    0 28px 70px rgba(17, 18, 19, .16),
    0 2px 8px rgba(17, 18, 19, .08);
}
.hd-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 11px 14px;
  border-bottom: 1px solid #2c2e2d;
  background: rgba(23, 25, 24, .9);
}
.hd-brand, .hd-security { display: flex; align-items: center; gap: 10px; }
.hd-brand > i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #6fbd8a;
  box-shadow: 0 0 12px rgba(111, 189, 138, .65);
}
.hd-brand span { font: 10px var(--font-mono); letter-spacing: .11em; }
.hd-brand small { color: #696e6b; font: 8px var(--font-mono); }
.hd-security span {
  padding: 4px 7px;
  border: 1px solid #333635;
  color: #8e9691;
  font: 7.5px var(--font-mono);
  letter-spacing: .06em;
}
.hd-security span:first-child { color: #80bd95; border-color: #35513f; }

.hd-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #2c2e2d;
}
.hd-tabs button {
  padding: 10px 5px;
  border: 0;
  border-right: 1px solid #2c2e2d;
  color: #6e7370;
  background: #131515;
  font: 8px var(--font-mono);
  letter-spacing: .08em;
  cursor: pointer;
  transition: color .25s ease, background .25s ease;
}
.hd-tabs button:last-child { border-right: 0; }
.hd-tabs button.active { color: #fff; background: #1c1e1d; box-shadow: inset 0 -2px var(--accent); }

.hd-boundary {
  position: relative;
  min-height: 386px;
  margin: 12px;
  overflow: hidden;
  border: 1px dashed #3b3f3d;
  background:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 24px 24px;
}
.hd-boundary::before {
  content: "◆";
  position: absolute;
  top: 10px; right: 12px;
  color: #5d625f;
  font-size: 10px;
}
.hd-boundary-label {
  position: absolute;
  left: 12px; right: 30px; top: 10px;
  display: flex;
  justify-content: space-between;
  color: #626865;
  font: 7.5px var(--font-mono);
  letter-spacing: .1em;
}
.hd-boundary-label strong { color: #72917e; font-weight: 400; }

.hd-source {
  position: absolute;
  left: 4%; top: 28%;
  width: 26%;
}
.hd-source > small, .hd-output > small {
  display: block;
  margin-bottom: 9px;
  color: #626865;
  font: 7.5px var(--font-mono);
  letter-spacing: .11em;
}
.hd-file {
  padding: 14px;
  border: 1px solid #3c403e;
  background: rgba(25, 28, 27, .95);
  transition: border-color .4s ease, box-shadow .4s ease, transform .5s ease;
}
.hd-file-icon {
  position: relative;
  display: block;
  width: 24px; height: 29px;
  margin-bottom: 10px;
  border: 1px solid #7b817d;
}
.hd-file-icon::after {
  content: "";
  position: absolute;
  top: -1px; right: -1px;
  width: 8px; height: 8px;
  border-left: 1px solid #7b817d;
  border-bottom: 1px solid #7b817d;
  background: #191c1b;
}
.hd-file span, .hd-file em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-file span { color: #e2e4e1; font: 9px var(--font-mono); }
.hd-file em { margin-top: 4px; color: #6e7470; font: 7.5px var(--font-mono); font-style: normal; }

.hd-transfer {
  position: absolute;
  left: 31%; top: 45%;
  width: 10%;
  color: #5f6561;
  text-align: center;
  font: 6.5px var(--font-mono);
}
.hd-transfer > div { position: relative; height: 1px; margin-top: 10px; background: #3f4341; }
.hd-transfer > div::after {
  content: "";
  position: absolute;
  right: -1px; top: -3px;
  border: 3px solid transparent;
  border-left-color: #606662;
}
.hd-transfer i {
  position: absolute;
  left: 0; top: -3px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 13px rgba(185, 67, 48, .75);
  opacity: 0;
}

.hd-drag-ghost {
  position: absolute;
  left: 8%; top: 37%;
  z-index: 8;
  width: 106px;
  padding: 9px;
  border: 1px solid var(--accent);
  background: rgba(25, 28, 27, .96);
  box-shadow: 0 15px 35px rgba(0,0,0,.32);
  opacity: 0;
  pointer-events: none;
}
.hd-drag-ghost .hd-file-icon { width: 16px; height: 20px; margin-bottom: 6px; }
.hd-drag-ghost span { display: block; overflow: hidden; color: #fff; font: 6.5px var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }

.hd-pointer {
  position: absolute;
  right: 4%; bottom: 6%;
  z-index: 10;
  width: 18px;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.45));
}
.hd-pointer path { fill: #f4f4f0; stroke: #111; stroke-width: 1.2; }

.hd-engine {
  position: absolute;
  left: 41%; top: 18%;
  width: 34%;
  border: 1px solid #464a47;
  background: rgba(19, 21, 21, .97);
  box-shadow: 0 18px 40px rgba(0,0,0,.2);
}
.hd-engine::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform .45s ease;
}
.hd-engine-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #343735;
  font: 7.5px var(--font-mono);
}
.hd-engine-head span { color: #fff; }
.hd-engine-head em { color: #70a180; font-style: normal; }
.hd-engine-body { padding: 7px 10px; }
.hd-stage {
  display: grid;
  grid-template-columns: 24px 1fr 9px;
  align-items: center;
  gap: 7px;
  padding: 10px 2px;
  border-bottom: 1px solid #2c2f2e;
  color: #656b67;
  font: 7.5px var(--font-mono);
  transition: color .35s ease, padding-left .35s ease;
}
.hd-stage:last-child { border-bottom: 0; }
.hd-stage b { color: #555a57; font-weight: 400; }
.hd-stage i { width: 7px; height: 7px; border: 1px solid #555a57; border-radius: 50%; }
.hd-stage.active { padding-left: 5px; color: #fff; }
.hd-stage.active b { color: var(--accent); }
.hd-stage.active i { border-color: var(--accent); animation: hd-pulse .8s ease-in-out infinite; }
.hd-stage.done { color: #aeb3b0; }
.hd-stage.done i { border-color: #70a180; background: #70a180; }
.hd-engine-foot {
  display: flex;
  justify-content: space-between;
  padding: 9px 10px;
  border-top: 1px solid #343735;
  color: #777d79;
  font: 7px var(--font-mono);
}
.hd-scan {
  position: absolute;
  left: 0; right: 0; top: 41px;
  z-index: 3;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 10px rgba(185, 67, 48, .7);
  opacity: 0;
  pointer-events: none;
}
.hd-code-stream {
  position: absolute;
  inset: 41px 0 33px;
  z-index: 2;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.hd-code-stream i {
  position: absolute;
  left: -50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185,67,48,.8), transparent);
}
.hd-code-stream i:nth-child(1) { top: 16%; width: 72%; }
.hd-code-stream i:nth-child(2) { top: 33%; width: 54%; }
.hd-code-stream i:nth-child(3) { top: 50%; width: 83%; }
.hd-code-stream i:nth-child(4) { top: 67%; width: 62%; }
.hd-code-stream i:nth-child(5) { top: 84%; width: 76%; }
.hd-live i { display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--accent); }
.hd-percent { color: #fff; font-weight: 400; }

.hd-output {
  position: absolute;
  right: 3%; top: 25%;
  width: 19%;
}
.hd-output-files { display: grid; gap: 8px; }
.hd-output-files span {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  min-width: 0;
  padding: 9px;
  border: 1px solid #383c3a;
  color: #777d79;
  background: #171918;
  opacity: .2;
  transform: translateX(9px);
  transition: opacity .4s ease, transform .4s ease, border-color .4s ease;
}
.hd-output-files b { color: var(--accent); font: 7px var(--font-mono); font-weight: 400; }
.hd-output-files em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 7px var(--font-mono); font-style: normal; }
.hd-output-stream {
  position: absolute;
  left: 75%; right: 22%; top: 45%;
  height: 1px;
  background: #3f4341;
  opacity: 0;
}
.hd-output-stream i {
  position: absolute;
  top: -3px; left: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hd-footer {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-top: 1px solid #2c2e2d;
  color: #777d79;
  background: #131515;
  font: 7.5px var(--font-mono);
}
.hd-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.hd-progress i { height: 2px; background: #333735; transition: background .3s ease; }
.hd-state { color: var(--accent); letter-spacing: .08em; }

/* Phases de la démonstration */
.hero-demo[data-step="1"] .hd-file,
.hero-demo[data-step="2"] .hd-file,
.hero-demo[data-step="3"] .hd-file,
.hero-demo[data-step="4"] .hd-file {
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(185, 67, 48, .12);
}
.hero-demo:not([data-step="0"]) .hd-engine::after { transform: scaleX(1); }
.hero-demo[data-step="1"] .hd-transfer i,
.hero-demo[data-step="2"] .hd-transfer i { opacity: 1; animation: hd-transfer 1s linear infinite; }
.hero-demo[data-step="1"] .hd-drag-ghost {
  animation: hd-drag-file 1.15s cubic-bezier(.55, 0, .2, 1) forwards;
}
.hero-demo[data-step="1"] .hd-pointer {
  animation: hd-pointer-drag 1.15s cubic-bezier(.55, 0, .2, 1) forwards;
}
.hero-demo[data-step="2"] .hd-scan { opacity: 1; animation: hd-engine-scan 1.15s linear infinite; }
.hero-demo[data-step="3"] .hd-code-stream { opacity: 1; }
.hero-demo[data-step="3"] .hd-code-stream i { animation: hd-code-flow 1.2s linear infinite; }
.hero-demo[data-step="3"] .hd-code-stream i:nth-child(2) { animation-delay: -.25s; }
.hero-demo[data-step="3"] .hd-code-stream i:nth-child(3) { animation-delay: -.5s; }
.hero-demo[data-step="3"] .hd-code-stream i:nth-child(4) { animation-delay: -.75s; }
.hero-demo[data-step="3"] .hd-code-stream i:nth-child(5) { animation-delay: -1s; }
.hero-demo[data-step="4"] .hd-output-stream,
.hero-demo[data-step="5"] .hd-output-stream { opacity: 1; }
.hero-demo[data-step="4"] .hd-output-stream i,
.hero-demo[data-step="5"] .hd-output-stream i { animation: hd-output-packet .9s linear infinite; }
.hero-demo[data-step="4"] .hd-output-stream i:nth-child(2),
.hero-demo[data-step="5"] .hd-output-stream i:nth-child(2) { animation-delay: -.3s; }
.hero-demo[data-step="4"] .hd-output-stream i:nth-child(3),
.hero-demo[data-step="5"] .hd-output-stream i:nth-child(3) { animation-delay: -.6s; }
.hero-demo[data-step="1"] .hd-stage[data-stage="1"],
.hero-demo[data-step="2"] .hd-stage[data-stage="2"],
.hero-demo[data-step="3"] .hd-stage[data-stage="3"],
.hero-demo[data-step="4"] .hd-stage[data-stage="4"] { color: #fff; padding-left: 5px; }
.hero-demo[data-step="1"] .hd-stage[data-stage="1"] b,
.hero-demo[data-step="2"] .hd-stage[data-stage="2"] b,
.hero-demo[data-step="3"] .hd-stage[data-stage="3"] b,
.hero-demo[data-step="4"] .hd-stage[data-stage="4"] b { color: var(--accent); }
.hero-demo[data-step="1"] .hd-stage[data-stage="1"] i,
.hero-demo[data-step="2"] .hd-stage[data-stage="2"] i,
.hero-demo[data-step="3"] .hd-stage[data-stage="3"] i,
.hero-demo[data-step="4"] .hd-stage[data-stage="4"] i {
  border-color: var(--accent);
  animation: hd-pulse .8s ease-in-out infinite;
}
.hero-demo[data-step="2"] .hd-stage[data-stage="1"],
.hero-demo[data-step="3"] .hd-stage:nth-child(-n+2),
.hero-demo[data-step="4"] .hd-stage:nth-child(-n+3),
.hero-demo[data-step="5"] .hd-stage { color: #aeb3b0; }
.hero-demo[data-step="2"] .hd-stage[data-stage="1"] i,
.hero-demo[data-step="3"] .hd-stage:nth-child(-n+2) i,
.hero-demo[data-step="4"] .hd-stage:nth-child(-n+3) i,
.hero-demo[data-step="5"] .hd-stage i {
  border-color: #70a180;
  background: #70a180;
  animation: none;
}
.hero-demo[data-step="4"] .hd-output-files span:nth-child(1),
.hero-demo[data-step="5"] .hd-output-files span {
  opacity: 1;
  transform: none;
  border-color: #4a4e4b;
}
.hero-demo[data-step="5"] .hd-output-files span:nth-child(2) { transition-delay: .15s; }
.hero-demo[data-step="5"] .hd-output-files span:nth-child(3) { transition-delay: .3s; }
.hero-demo[data-step="5"] .hd-live { color: #70a180; }
.hero-demo[data-step="5"] .hd-live i { background: #70a180; }
.hero-demo[data-step="1"] .hd-progress i:nth-child(1),
.hero-demo[data-step="2"] .hd-progress i:nth-child(-n+2),
.hero-demo[data-step="3"] .hd-progress i:nth-child(-n+3),
.hero-demo[data-step="4"] .hd-progress i:nth-child(-n+4),
.hero-demo[data-step="5"] .hd-progress i { background: var(--accent); }

@keyframes hd-transfer {
  from { left: 0; opacity: 0; }
  20%, 80% { opacity: 1; }
  to { left: calc(100% - 7px); opacity: 0; }
}
@keyframes hd-drag-file {
  0% { left: 8%; top: 37%; opacity: 0; transform: scale(.92); }
  15% { opacity: 1; transform: scale(1); }
  80% { left: 43%; top: 38%; opacity: 1; transform: scale(.82); }
  100% { left: 46%; top: 38%; opacity: 0; transform: scale(.35); }
}
@keyframes hd-pointer-drag {
  0% { right: 4%; bottom: 6%; }
  25% { right: 78%; bottom: 55%; }
  80% { right: 43%; bottom: 48%; }
  100% { right: 40%; bottom: 46%; }
}
@keyframes hd-engine-scan {
  from { top: 41px; opacity: 0; }
  15%, 85% { opacity: 1; }
  to { top: calc(100% - 34px); opacity: 0; }
}
@keyframes hd-code-flow {
  from { left: -70%; opacity: 0; }
  20%, 80% { opacity: 1; }
  to { left: 100%; opacity: 0; }
}
@keyframes hd-output-packet {
  from { left: 0; opacity: 0; }
  20%, 80% { opacity: 1; }
  to { left: calc(100% - 7px); opacity: 0; }
}
@keyframes hd-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(185, 67, 48, .45); }
  50% { box-shadow: 0 0 0 4px rgba(185, 67, 48, 0); }
}

@media (max-width: 980px) {
  .hero-demo { max-width: 720px; }
}

@media (max-width: 580px) {
  .hd-security span:last-child, .hd-brand small { display: none; }
  .hd-boundary { min-height: 530px; }
  .hd-boundary-label strong { display: none; }
  .hd-source { left: 5%; top: 13%; width: 40%; }
  .hd-transfer { left: 46%; top: 25%; width: 16%; }
  .hd-engine { left: auto; right: 4%; top: 9%; width: 34%; }
  .hd-output { left: 5%; right: 5%; top: auto; bottom: 7%; width: auto; }
  .hd-output-files { grid-template-columns: repeat(3, 1fr); }
  .hd-output-files span { grid-template-columns: 1fr; gap: 4px; }
  .hd-footer { grid-template-columns: 70px 1fr; }
  .hd-state { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-demo * { animation: none !important; }
}

/* ==========================================================================
   Page Cas d’usage — architectures sectorielles filaires
   ========================================================================== */

.nav-labs .nav-drop-menu { min-width: 360px; }
.uc-hero { padding: 72px 0 84px; text-align: center; }
.uc-hero h1 { max-width: 900px; margin: 0 auto 24px; font-size: clamp(26px, 3.8vw, 40px); }
.uc-hero .eyebrow { margin-bottom: 18px; }
.uc-hero .lead { max-width: 560px; margin: 0 auto; }

.uc-hero-rot h1 {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.uc-hero-rot h1 > span:first-child { display: block; line-height: 1.18; }
.uc-hero-rot .rot-track > span { color: var(--ink-soft); }
.uc-explore-section { padding-top: 74px; background: var(--ink); color: var(--paper); }
.uc-explore-section .code-chip { border-color: #484744; }

.uc-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #484744; border-bottom: 0; }
.uc-tabs button {
  padding: 14px 10px;
  border: 0;
  border-right: 1px solid #484744;
  color: #85837e;
  background: #151616;
  font: 10px var(--font-mono);
  letter-spacing: .08em;
  cursor: pointer;
}
.uc-tabs button:last-child { border-right: 0; }
.uc-tabs button.active { color: #fff; background: #242423; box-shadow: inset 0 -2px var(--accent); }

.uc-explorer { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr); min-height: 600px; border: 1px solid #484744; }
.uc-canvas { position: relative; overflow: hidden; border-right: 1px solid #484744; background: #111212; }
.uc-canvas-top {
  display: flex;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid #333432;
  color: #6e6d69;
  font: 8px var(--font-mono);
  letter-spacing: .09em;
}
.uc-sector-code { color: #b0ada7; }
.uc-map { display: block; width: 100%; height: auto; color: #292a29; }
.uc-grid-bg { color: #292a29; }
.uc-sector { display: none; }
.uc-sector.active { display: block; }
.uc-wire, .uc-wire-circle, .uc-wheel {
  fill: none;
  stroke: #797a76;
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1800;
  stroke-dashoffset: 1800;
  animation: uc-draw 2s .2s ease forwards;
}
.uc-wire.faint { stroke: #3d3f3d; stroke-dasharray: 8 6; animation-delay: .8s; }
.uc-wheel, .uc-wire-circle { stroke-dasharray: 400; }
.uc-sector text { fill: #777873; font: 8px var(--font-mono); letter-spacing: .06em; opacity: 0; animation: uc-fade .4s 1.5s forwards; }
.uc-hotspot {
  fill: var(--accent);
  stroke: #111212;
  stroke-width: 3;
  opacity: 0;
  animation: uc-hotspot 2.2s 1.3s ease-in-out infinite;
}
.uc-hotspot.h2 { animation-delay: 1.7s; }
.uc-hotspot.h3 { animation-delay: 2.1s; }

/* --- Scène : système à gauche, atelier à droite, IHM qui voyage --- */

.uc-canvas { display: flex; flex-direction: column; }
.uc-scene { position: relative; display: grid; grid-template-columns: 1fr 27%; flex: 1; min-height: 440px; margin-bottom: 66px; }
.uc-map-cell { position: relative; overflow: hidden; min-width: 0; }
.uc-map-cell .uc-map { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Faisceau de localisation : balaye la carte pendant l'étape 01 */
.uc-beam {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(185, 67, 48, .85), transparent);
  box-shadow: 0 0 14px rgba(185, 67, 48, .55);
  opacity: 0;
  pointer-events: none;
}
.uc-explorer[data-step="0"] .uc-beam { opacity: 1; animation: uc-beam 2.1s linear infinite; }
@keyframes uc-beam { from { left: 0; } to { left: 100%; } }

/* Onde de pulsation au point d'ancrage (extraction et retour) */
.uc-pulse {
  position: absolute;
  z-index: 4;
  left: var(--hx, 40%); top: var(--hy, 40%);
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.uc-explorer[data-step="1"] .uc-pulse { animation: uc-pulse 1s ease-out 2; }
.uc-explorer[data-step="3"] .uc-pulse { border-color: #70a180; animation: uc-pulse 1s ease-out .9s 2; }
@keyframes uc-pulse {
  0% { opacity: .9; transform: scale(.4); }
  100% { opacity: 0; transform: scale(4.2); }
}

.uc-atelier {
  position: relative;
  overflow: hidden;
  border-left: 1px solid #333432;
  background: #161717;
  padding: 16px 14px;
}
.uc-atelier > small {
  display: block;
  margin-bottom: 14px;
  color: #8b8984;
  font: 8px var(--font-mono);
  letter-spacing: .12em;
}
.uc-at-slot {
  display: grid;
  place-items: center;
  height: 108px;
  margin-bottom: 16px;
  border: 1.5px dashed #4a4b48;
  color: #5c5e5a;
  font: 7.5px var(--font-mono);
  letter-spacing: .1em;
  transition: border-color .35s ease;
}
.uc-at-steps span {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid #2c2d2c;
  color: #5f615d;
  font: 8px var(--font-mono);
  letter-spacing: .06em;
  transition: color .4s ease;
}
.uc-at-steps span::before { content: "○ "; }
.uc-at-scan {
  position: absolute;
  left: 14px; right: 14px; top: 52px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 9px rgba(185, 67, 48, .7);
  opacity: 0;
  pointer-events: none;
}

/* L'IHM voyageuse : au repos, ancrée dans le système (--hx/--hy) */
.uc-ihm {
  position: absolute;
  z-index: 5;
  width: 120px;
  left: var(--hx, 40%); top: var(--hy, 40%);
  transform: translate(-50%, -50%) scale(.58);
  border: 1px solid #6f716d;
  background: #1b1c1b;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  transition:
    left 1.3s cubic-bezier(.55, 0, .25, 1),
    top 1.3s cubic-bezier(.55, 0, .25, 1),
    transform 1.3s cubic-bezier(.55, 0, .25, 1),
    border-color .4s ease;
}
.uc-ihm .ui-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border-bottom: 1px solid #333432;
  color: #cfcdc8;
  font: 6.5px var(--font-mono);
  letter-spacing: .06em;
  white-space: nowrap;
}
.uc-ihm .ui-bar i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }
.uc-ihm .ui-body { padding: 8px 7px 7px; }
.uc-ihm .ui-body b { display: block; height: 3px; margin-bottom: 5px; background: #4a4b48; transition: background .4s ease; }
.uc-ihm .ui-body b:nth-child(1) { width: 76%; }
.uc-ihm .ui-body b:nth-child(2) { width: 54%; }
.uc-ihm .ui-body b:nth-child(3) { width: 86%; }
.uc-ihm .ui-gauge { display: block; height: 5px; margin-top: 3px; border: 1px solid #3c3d3b; }
.uc-ihm .ui-gauge i { display: block; height: 100%; width: 30%; background: #6f716d; transition: width 1s ease, background .4s ease; }

.uc-retag {
  position: absolute;
  z-index: 6;
  left: var(--hx, 40%);
  top: calc(var(--hy, 40%) + 46px);
  transform: translateX(-50%);
  padding: 4px 8px;
  border: 1px solid #70a180;
  background: #141514;
  color: #8fc4a3;
  font: 7px var(--font-mono);
  letter-spacing: .08em;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .4s ease .9s;
}

/* Chorégraphie du voyage, pilotée par data-step */
/* Étape 1 : extraction — l'IHM quitte le système pour l'atelier */
.uc-explorer[data-step="1"] .uc-ihm,
.uc-explorer[data-step="2"] .uc-ihm {
  left: var(--ax, 86%); top: var(--ay, 34%);
  transform: translate(-50%, -50%) scale(1);
}
.uc-explorer[data-step="1"] .uc-ihm {
  transform: translate(-50%, -50%) scale(1) rotate(-2deg);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(185, 67, 48, .35), 0 22px 48px rgba(0, 0, 0, .65);
}
.uc-explorer[data-step="1"] .uc-at-slot { border-color: var(--accent); }

/* Étape 2 : traitement — scan, lignes reconstruites, étapes atelier */
.uc-explorer[data-step="2"] .uc-ihm { border-color: var(--accent); }
.uc-explorer[data-step="2"] .uc-ihm .ui-body b { background: var(--accent); }
.uc-explorer[data-step="2"] .uc-at-scan { opacity: 1; animation: uc-at-scan 1.2s linear infinite; }
.uc-explorer[data-step="2"] .uc-at-steps span,
.uc-explorer[data-step="3"] .uc-at-steps span { color: #d7d5d0; }
.uc-explorer[data-step="2"] .uc-at-steps span:nth-child(1) { transition-delay: 0s; }
.uc-explorer[data-step="2"] .uc-at-steps span:nth-child(2) { transition-delay: .5s; }
.uc-explorer[data-step="2"] .uc-at-steps span:nth-child(3) { transition-delay: 1s; }

/* Étape 3 : réintégration — l'IHM revient dans le système, requalifiée */
.uc-explorer[data-step="3"] .uc-ihm { border-color: #70a180; }
.uc-explorer[data-step="3"] .uc-ihm .ui-body b { background: #70a180; }
.uc-explorer[data-step="3"] .uc-ihm .ui-gauge i { width: 86%; background: #70a180; }
.uc-explorer[data-step="3"] .uc-retag { opacity: 1; }
.uc-explorer[data-step="3"] .uc-sector.active .uc-hotspot.h1 {
  fill: #70a180;
  animation: none;
  opacity: 1;
}

@keyframes uc-at-scan { from { top: 52px; } to { top: 158px; } }

.uc-lab-flow {
  position: absolute;
  left: 5%; right: 5%; bottom: 22px;
  display: flex;
  align-items: center;
}
.uc-lab-flow > i { flex: 1; height: 1px; background: #3a3b39; }
.uc-flow-step {
  min-width: 92px;
  padding: 8px 9px;
  border: 1px solid #3e403e;
  color: #62645f;
  background: #151616;
  font: 8px var(--font-mono);
  transition: color .35s, border-color .35s, background .35s;
}
.uc-flow-step b { margin-right: 6px; color: var(--accent); font-weight: 400; }
.uc-flow-step.active { color: #fff; border-color: var(--accent); background: #201918; }

.uc-panel { padding: 34px; background: #171818; }
.uc-panel-kicker { color: var(--accent); font: 9px var(--font-mono); letter-spacing: .12em; }
.uc-panel h3 { margin: 18px 0 16px; font-size: clamp(18px, 2.4vw, 24px); }
.uc-panel-text { min-height: 94px; color: #96948e; font-size: 14px; line-height: 1.65; }
.uc-panel-status { margin: 28px 0; padding: 16px 0; border-top: 1px solid #3a3b39; border-bottom: 1px solid #3a3b39; }
.uc-panel-status small { display: block; color: #666864; font: 8px var(--font-mono); }
.uc-panel-status strong { display: block; min-height: 34px; margin: 9px 0; color: #deddd8; font: 11px/1.5 var(--font-mono); font-weight: 400; }
.uc-panel-status > div { height: 2px; background: #333432; }
.uc-panel-status i { display: block; width: 25%; height: 100%; background: var(--accent); transition: width .55s ease; }
.uc-explorer[data-step="1"] .uc-panel-status i { width: 50%; }
.uc-explorer[data-step="2"] .uc-panel-status i { width: 75%; }
.uc-explorer[data-step="3"] .uc-panel-status i { width: 100%; }
.uc-panel dl { margin-bottom: 30px; }
.uc-panel dl > div { display: grid; grid-template-columns: 72px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid #2f302f; }
.uc-panel dt { color: #62645f; font: 8px var(--font-mono); text-transform: uppercase; }
.uc-panel dd { color: #b0ada7; font-size: 11px; }
.uc-panel .btn-solid { border-color: #e5e4df; background: #e5e4df; color: #111212; }

.uc-sectors { background: var(--paper-alt); }
.section-intro {
  max-width: 62ch;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.65;
}
/* Grille des secteurs : cartes premium, hover inversé */
.ud-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.ud-grid article {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 230px;
  padding: 28px 26px 24px;
  background: var(--paper);
  transition: background .35s ease;
}
.ud-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.ud-num { color: var(--ink-faint); font: 20px var(--font-mono); transition: color .35s ease; }
.ud-code { color: var(--accent); font: 9px var(--font-mono); letter-spacing: .14em; text-align: right; }
.ud-grid h3 { font-size: 15px; transition: color .35s ease; }
.ud-grid p { flex: 1; color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; transition: color .35s ease; }
.ud-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ud-tags span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font: 8.5px var(--font-mono);
  letter-spacing: .1em;
  transition: border-color .35s ease, color .35s ease;
}
.ud-grid article:hover { background: #111212; }
.ud-grid article:hover .ud-num { color: #62645f; }
.ud-grid article:hover h3 { color: #fff; }
.ud-grid article:hover p { color: #b0ada7; }
.ud-grid article:hover .ud-tags span { border-color: #3a3b39; color: #d7d5d0; }
/* Carte ouverte « Et au-delà » : inversée en permanence */
.ud-grid .ud-more { background: #111212; }
.ud-grid .ud-more .ud-num { color: #62645f; }
.ud-grid .ud-more h3 { color: #fff; }
.ud-grid .ud-more p { color: #b0ada7; }
.ud-grid .ud-more .ud-tags span { border-color: var(--accent); color: var(--accent); }

@keyframes uc-draw { to { stroke-dashoffset: 0; } }
@keyframes uc-fade { to { opacity: 1; } }
@keyframes uc-hotspot {
  0%, 100% { opacity: .55; filter: drop-shadow(0 0 0 var(--accent)); }
  50% { opacity: 1; filter: drop-shadow(0 0 8px var(--accent)); }
}

@media (max-width: 900px) {
  .uc-explorer { grid-template-columns: 1fr; }
  .uc-canvas { border-right: 0; border-bottom: 1px solid #484744; }
  .uc-panel-text { min-height: 0; }
  .ud-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .uc-tabs { grid-template-columns: repeat(2, 1fr); }
  .uc-tabs button:nth-child(2) { border-right: 0; }
  .uc-tabs button:nth-child(-n+2) { border-bottom: 1px solid #484744; }
  .uc-canvas-top span:last-child { display: none; }
  .uc-scene { grid-template-columns: 1fr 36%; }
  .uc-ihm { width: 92px; }
  .uc-at-slot { height: 78px; }
  .uc-lab-flow { left: 3%; right: 3%; }
  .uc-flow-step { min-width: 0; padding: 7px 5px; font-size: 6.5px; }
  .uc-flow-step span { display: none; }
  .ud-grid { grid-template-columns: 1fr; }
  .ud-grid article { min-height: 0; padding: 22px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .uc-explorer * { animation: none !important; }
  .uc-wire, .uc-wire-circle, .uc-wheel { stroke-dashoffset: 0; }
  .uc-sector text, .uc-hotspot { opacity: 1; }
}

/* ============================================================
   RECOVER — héros : un logiciel de 1987 traverse l'atelier
   Boucle synchronisée de 14 s (--rcT) sur tous les éléments
   ============================================================ */
.rc-scene {
  --rcT: 14s;
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(0deg, #f0efeb 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, #f0efeb 0 1px, transparent 1px 44px),
    var(--paper);
}
.rc-track {
  position: absolute;
  top: 50%; left: 4%; right: 4%;
  border-top: 1px dashed #d9d7d2;
}

/* --- Le vieux logiciel : CRT vert phosphore --- */
.rc-old {
  position: absolute;
  top: 15%; left: 3%;
  width: 195px;
  background: #0b0f0b;
  border: 1px solid #1f2e1f;
  box-shadow: 0 20px 44px rgba(8, 18, 8, .3);
  transform-origin: center;
  animation: rc-old var(--rcT) ease-in-out infinite;
}
.rc-old::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.24) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.rc-old-bar {
  display: flex; justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 1px solid #1f2e1f;
  color: #57d98a;
  font: 8px var(--font-mono);
  letter-spacing: .14em;
}
.rc-old-body { position: relative; padding: 11px 10px 12px; }
.rc-old-body p {
  margin: 0;
  color: #4ecb7f;
  font: 9px var(--font-mono);
  line-height: 2;
  letter-spacing: .04em;
  text-shadow: 0 0 7px rgba(78, 203, 127, .5);
  opacity: 0;
}
.rc-old-body p b { color: #ff6b4a; font-weight: 400; text-shadow: 0 0 7px rgba(255, 107, 74, .5); }
.rc-old-body .l1 { animation: rc-l1 var(--rcT) infinite; }
.rc-old-body .l2 { animation: rc-l2 var(--rcT) infinite; }
.rc-old-body .l3 { animation: rc-l3 var(--rcT) infinite; }
.rc-old-body .l4 { animation: rc-l4 var(--rcT) infinite; }
.rc-scan {
  position: absolute; left: 0; right: 0; top: 0;
  height: 12px;
  background: linear-gradient(180deg, transparent, rgba(120, 255, 170, .16), transparent);
  animation: rc-scanmove 2.8s linear infinite;
}
.rc-old-tag {
  display: block;
  padding: 6px 10px;
  border-top: 1px solid #1f2e1f;
  color: var(--accent);
  font: 7.5px var(--font-mono);
  letter-spacing: .14em;
}

/* --- L'atelier --- */
.rc-gate {
  position: absolute;
  top: 13%; bottom: 17%;
  left: 43%;
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .82);
  animation: rc-gate var(--rcT) infinite;
}
.rc-gate span { color: var(--ink-faint); font: 7.5px var(--font-mono); letter-spacing: .2em; }
.rc-gate b { color: var(--ink); font: 9px var(--font-mono); font-weight: 700; letter-spacing: .08em; }
.rc-beam {
  position: absolute; left: 6px; right: 6px; top: 8%;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(200, 45, 22, .55);
  opacity: 0;
  animation: rc-beam var(--rcT) linear infinite;
}
.rc-gate em {
  position: absolute;
  bottom: -24px; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: var(--accent);
  font: 8px var(--font-mono);
  font-style: normal;
  letter-spacing: .12em;
  opacity: 0;
}
.rc-gate .s1 { animation: rc-s1 var(--rcT) infinite; }
.rc-gate .s2 { animation: rc-s2 var(--rcT) infinite; }
.rc-gate .s3 { animation: rc-s3 var(--rcT) infinite; }

/* --- Paquets atelier → livrables --- */
.rc-dot {
  position: absolute;
  left: 57%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(200, 45, 22, .6);
  opacity: 0;
}
.rc-dot.d1 { top: 40%; animation: rc-d1 var(--rcT) linear infinite; }
.rc-dot.d2 { top: 57%; animation: rc-d2 var(--rcT) linear infinite; }

/* --- Les sorties --- */
.rc-out {
  position: absolute;
  top: 9%; right: 3%;
  width: 185px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rc-win-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  background: #faf9f7;
  color: var(--ink-faint);
  font: 8px var(--font-mono);
  letter-spacing: .1em;
}
.rc-win-bar.dark { background: #111212; border-bottom-color: #2c2d2c; color: #d7d5d0; }
.rc-win-bar .led { width: 6px; height: 6px; border-radius: 50%; background: #4ecb7f; box-shadow: 0 0 6px rgba(78, 203, 127, .7); }
.rc-src, .rc-new {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 14px 30px rgba(17, 18, 18, .07);
  opacity: 0;
}
.rc-src { animation: rc-src var(--rcT) ease infinite; }
.rc-new { animation: rc-new var(--rcT) ease infinite; }
.rc-src-body { display: flex; flex-direction: column; gap: 7px; padding: 12px 10px; }
.rc-src-body i {
  display: block;
  width: 0; height: 4px;
  background: #c9c7c2;
  animation: rc-code var(--rcT) ease infinite;
}
.rc-src-body i.c { background: var(--accent); opacity: .65; }
.rc-new-body { display: flex; flex-direction: column; gap: 7px; padding: 11px 10px 13px; }
.rc-new-body span { color: var(--ink-faint); font: 8px var(--font-mono); letter-spacing: .1em; }
.rc-field {
  padding: 6px 9px;
  border: 1px solid var(--line);
  color: var(--ink);
  font: 10.5px var(--font-mono);
}
.rc-gauge { height: 5px; border: 1px solid var(--line); }
.rc-gauge i { display: block; height: 100%; width: 0; background: var(--ink); animation: rc-gauge var(--rcT) ease infinite; }
.rc-proof {
  align-self: flex-start;
  padding: 6px 11px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font: 8.5px var(--font-mono);
  letter-spacing: .14em;
  opacity: 0;
  animation: rc-proof var(--rcT) ease infinite;
}
.rc-caption {
  position: absolute;
  left: 0; right: 0; bottom: 11px;
  text-align: center;
  color: var(--ink-faint);
  font: 8.5px var(--font-mono);
  letter-spacing: .12em;
}

/* --- Timeline 14 s --- */
@keyframes rc-old {
  0% { opacity: 0; transform: translate(0, 10px) scale(1); }
  4%, 26% { opacity: 1; transform: translate(0, 0) scale(1); }
  38% { opacity: 1; transform: translate(145px, 80px) scale(.32); }
  42%, 100% { opacity: 0; transform: translate(145px, 80px) scale(.3); }
}
@keyframes rc-l1 { 0%, 5% { opacity: 0; } 7%, 100% { opacity: 1; } }
@keyframes rc-l2 { 0%, 9% { opacity: 0; } 11%, 100% { opacity: 1; } }
@keyframes rc-l3 { 0%, 13% { opacity: 0; } 15%, 100% { opacity: 1; } }
@keyframes rc-l4 { 0%, 18% { opacity: 0; } 20%, 100% { opacity: 1; } }
@keyframes rc-scanmove { 0% { top: -12px; } 100% { top: 100%; } }
@keyframes rc-gate {
  0%, 34% { border-color: var(--line); box-shadow: none; }
  38%, 62% { border-color: var(--accent); box-shadow: 0 0 30px rgba(200, 45, 22, .16); }
  68%, 100% { border-color: var(--line); box-shadow: none; }
}
@keyframes rc-beam {
  0%, 36% { opacity: 0; top: 8%; }
  38% { opacity: 1; top: 8%; }
  44% { top: 88%; }
  50% { top: 8%; }
  56% { top: 88%; }
  61% { opacity: 1; top: 8%; }
  63%, 100% { opacity: 0; top: 8%; }
}
@keyframes rc-s1 { 0%, 37% { opacity: 0; } 39%, 45% { opacity: 1; } 47%, 100% { opacity: 0; } }
@keyframes rc-s2 { 0%, 45% { opacity: 0; } 47%, 53% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes rc-s3 { 0%, 53% { opacity: 0; } 55%, 61% { opacity: 1; } 63%, 100% { opacity: 0; } }
@keyframes rc-d1 {
  0%, 58% { opacity: 0; transform: translateX(0); }
  60% { opacity: 1; }
  66%, 100% { opacity: 0; transform: translateX(130px); }
}
@keyframes rc-d2 {
  0%, 63% { opacity: 0; transform: translateX(0); }
  65% { opacity: 1; }
  71%, 100% { opacity: 0; transform: translateX(130px); }
}
@keyframes rc-src {
  0%, 60% { opacity: 0; transform: translateY(12px) scale(.96); }
  64%, 95% { opacity: 1; transform: translateY(0) scale(1); }
  99%, 100% { opacity: 0; transform: translateY(0) scale(1); }
}
@keyframes rc-code { 0%, 63% { width: 0; } 74%, 100% { width: var(--w, 70%); } }
@keyframes rc-new {
  0%, 70% { opacity: 0; transform: translateY(12px) scale(.96); }
  74%, 95% { opacity: 1; transform: translateY(0) scale(1); }
  99%, 100% { opacity: 0; transform: translateY(0) scale(1); }
}
@keyframes rc-gauge { 0%, 75% { width: 0; } 83%, 100% { width: 78%; } }
@keyframes rc-proof {
  0%, 82% { opacity: 0; transform: scale(.9); }
  85%, 95% { opacity: 1; transform: scale(1); }
  99%, 100% { opacity: 0; }
}

@media (max-width: 900px) {
  .rc-scene { min-height: 360px; }
  .rc-old { width: 170px; }
  .rc-out { width: 170px; }
  .rc-gate { width: 70px; left: 43%; }
}

.metier { padding: 72px 0 88px; scroll-margin-top: 72px; }
.metier-alt { background: var(--paper-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
}
.metier-grid article {
  padding: 28px;
  border-right: 1px solid var(--line);
}
.metier-grid article:last-child { border-right: none; }
.metier-grid h3, .metier-v h3 { font-size: 17px; margin: 10px 0 12px; }
.metier-grid p, .metier-v p { font-size: 14.5px; color: var(--ink-soft); max-width: 42ch; }
.metier-v {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--line);
}
.metier-v > div {
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metier-v > div:nth-child(2n) { border-right: none; }
.metier-v > div:nth-child(n+3) { border-bottom: none; }
@media (max-width: 900px) {
  .metier-grid, .metier-v { grid-template-columns: 1fr; }
  .metier-grid article, .metier-v > div { border-right: none; border-bottom: 1px solid var(--line); }
  .metier-grid article:last-child, .metier-v > div:last-child { border-bottom: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rc-scene * { animation: none !important; }
  .rc-old, .rc-old-body p, .rc-src, .rc-new, .rc-proof { opacity: 1; }
  .rc-old { transform: none; }
  .rc-src-body i { width: var(--w, 70%); }
  .rc-gauge i { width: 78%; }
  .rc-scan, .rc-beam, .rc-dot, .rc-gate em { display: none; }
}
