/* =====================================================================
   DEM ACADEMY — « CINQ RAPPORTS »
   Cinq informations = cinq rapports. Les voyants de passage de rapport
   s'allument vert · vert · jaune · jaune · rouge, aux couleurs du Sénégal.
   ===================================================================== */

/* ---------- Polices auto-hébergées (aucune requête vers un tiers) ---------- */
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 900; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-900-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 900; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-ext-900-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 700; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-700-italic.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/barlow-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/barlow-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/chakra-petch-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/chakra-petch-latin-700-normal.woff2) format("woff2"); }

@property --ta { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* ---------- Système ---------- */
:root {
  --black: #070808;
  --night: #0b0c0e;
  --carbon: #111316;
  --carbon-2: #171a1e;
  --steel: #343a40;
  --metal: #8d959c;
  --metal-2: #bcc3c9;
  --text-2: #d5dadd;
  --white: #f7f6f2;
  --red: #e3121b;
  --red-hot: #ff3030;
  --red-deep: #9e0b12;
  --yellow: #ffd60a;
  --green: #1faa59;
  --green-text: #4fd389;
  --err: #ff6363;

  --f-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Impact, sans-serif;
  --f-ui: "Barlow", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-mono: "Chakra Petch", "Barlow", ui-monospace, monospace;

  --gutter: clamp(16px, 4.6vw, 32px);
  --cut: 13px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --banner: 0px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--black);
  scroll-padding-top: 86px;
  scroll-padding-bottom: 120px;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--black);
  color: var(--white);
  font: 400 17px/1.5 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
body.has-banner { --banner: 34px; }
img, svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
p, h1, h2, h3, dl, dd, ol, ul { margin: 0; }
ol, ul { list-style: none; padding: 0; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
::selection { background: var(--yellow); color: var(--black); }

/* =====================================================================
   DÉCOR : le circuit et sa caméra
   ===================================================================== */
.world { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.world__cam {
  position: absolute; inset: -12%;
  transform-origin: 50% 50%;
  transition: transform 1.2s var(--ease-io);
  will-change: transform;
}
body[data-scene="dash"] .world__cam { transform: translate3d(-8%, 6%, 0) scale(1.32) rotate(-4deg); }
body[data-scene="pass"] .world__cam { transform: translate3d(7%, -5%, 0) scale(1.55) rotate(5deg); }

.world__glow { position: absolute; border-radius: 50%; transition: opacity 1s ease; }
.world__glow--red {
  width: 100vmax; height: 100vmax; left: -42vmax; bottom: -52vmax; opacity: .7;
  background: radial-gradient(closest-side, rgba(227, 18, 27, .34), rgba(227, 18, 27, 0));
}
.world__glow--yellow {
  width: 80vmax; height: 80vmax; right: -38vmax; top: -40vmax; opacity: .6;
  background: radial-gradient(closest-side, rgba(255, 214, 10, .13), rgba(255, 214, 10, 0));
}
body[data-ready="true"] .world__glow--red { opacity: 1; }
body[data-ready="true"] .world__glow--yellow { opacity: .95; }

.world__track { position: absolute; inset: 0; width: 100%; height: 100%; }
.track { fill: none; }
.track--base { stroke: rgba(255, 255, 255, .11); stroke-width: 1.6; }
.js .track--base { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.8s .15s var(--ease-out) forwards; }
.track--kerb { display: none; }
.track--sector-a, .track--sector-b { stroke-width: 1.4; stroke-linecap: round; opacity: 0; animation: fadeIn 1.2s 1.7s forwards; }
@keyframes fadeIn { to { opacity: .4; } }
.track--sector-a { stroke: var(--red); stroke-dasharray: 14 86; stroke-dashoffset: -4; }
.track--sector-b { stroke: var(--yellow); stroke-dasharray: 8 92; stroke-dashoffset: -55; }
.track__start rect { fill: rgba(255, 255, 255, .22); }

.world__grain {
  position: absolute; inset: 0; opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
.world__vignette { position: absolute; inset: 0; background: radial-gradient(130% 95% at 50% 38%, transparent 45%, rgba(0, 0, 0, .7)); }

/* ---------- Effets de transition ---------- */
.fx { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.fx__lines i {
  position: absolute; left: 0; height: 2px; width: 48vw; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95), transparent);
  transform: translate3d(110vw, 0, 0);
}
.fx__lines i:nth-child(1) { top: 9%; --k: 0; }
.fx__lines i:nth-child(2) { top: 16%; --k: 3; width: 30vw; background: linear-gradient(90deg, transparent, var(--yellow), transparent); }
.fx__lines i:nth-child(3) { top: 24%; --k: 1; height: 3px; }
.fx__lines i:nth-child(4) { top: 31%; --k: 5; width: 62vw; background: linear-gradient(90deg, transparent, var(--red-hot), transparent); }
.fx__lines i:nth-child(5) { top: 39%; --k: 2; }
.fx__lines i:nth-child(6) { top: 46%; --k: 6; width: 26vw; }
.fx__lines i:nth-child(7) { top: 53%; --k: 1; height: 4px; background: linear-gradient(90deg, transparent, var(--red-hot), transparent); }
.fx__lines i:nth-child(8) { top: 61%; --k: 4; }
.fx__lines i:nth-child(9) { top: 68%; --k: 0; width: 36vw; background: linear-gradient(90deg, transparent, var(--yellow), transparent); }
.fx__lines i:nth-child(10) { top: 76%; --k: 3; height: 3px; }
.fx__lines i:nth-child(11) { top: 84%; --k: 5; width: 58vw; }
.fx__lines i:nth-child(12) { top: 92%; --k: 2; background: linear-gradient(90deg, transparent, var(--red-hot), transparent); }
.fx.is-streak .fx__lines i { animation: streak .6s var(--ease-io) both; animation-delay: calc(var(--k) * 26ms); }
.fx.is-streak-r .fx__lines i { animation: streakR .6s var(--ease-io) both; animation-delay: calc(var(--k) * 26ms); }
.fx__flash { position: absolute; inset: 0; opacity: 0; background: radial-gradient(70% 55% at 50% 42%, rgba(255, 240, 190, .55), rgba(255, 214, 10, .1) 55%, transparent 80%); }
.fx.is-flash .fx__flash { animation: flash .55s ease-out both; }
.fx__sweep {
  position: absolute; top: -25%; bottom: -25%; left: 0; width: 160vw; display: flex;
  transform: translate3d(-180vw, 0, 0) skewX(-16deg);
}
.fx__sweep i:nth-child(1) { flex: .08; background: var(--yellow); }
.fx__sweep i:nth-child(2) { flex: .2; background: var(--red); }
.fx__sweep i:nth-child(3) { flex: 1; background: linear-gradient(90deg, #050505, var(--black) 85%, transparent); }
.fx.is-sweep .fx__sweep { animation: sweep 1s var(--ease-io) both; }

/* =====================================================================
   BOUTONS
   ===================================================================== */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 60px; padding: 0 28px;
  font: italic 900 25px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em;
  color: var(--white);
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
  transition: transform .16s var(--ease-out), opacity .2s ease, filter .3s ease;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  transition: background .25s ease;
}
.btn__icon { width: 24px; height: 24px; flex: none; transition: transform .3s var(--ease-out); }
.btn:active { transform: scale(.975); }
.btn[disabled] { cursor: progress; }

.btn--go { width: 100%; min-height: 66px; font-size: 28px; }
.btn--go::before { background: linear-gradient(100deg, #c90f17 0%, var(--red) 35%, #ff2626 65%, var(--red) 100%); }
.btn--go::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%) no-repeat;
  background-size: 260% 100%; background-position: 130% 0;
  animation: shine 3.8s 1.4s var(--ease-io) infinite;
}
.btn--go.is-ready { filter: drop-shadow(0 0 16px rgba(255, 40, 40, .55)); }
.btn--go.is-ready::after { animation-duration: 1.9s; animation-delay: 0s; }
.btn--go.is-ready .btn__icon { animation: nudge 1.9s var(--ease-io) infinite; }
.btn--go.is-firing::after { animation: shineFast .45s var(--ease-io) both; }
.btn.is-loading::before {
  background: linear-gradient(-45deg, var(--red) 25%, var(--red-deep) 25% 50%, var(--red) 50% 75%, var(--red-deep) 75%) 0 0 / 34px 34px;
  animation: stripes .55s linear infinite;
}
.btn.is-loading::after { animation: none; opacity: 0; }
.btn.is-loading .btn__icon { animation: blink .7s steps(1) infinite; }

.btn--ghost { flex: none; min-height: 44px; padding: 0 16px 0 12px; font-size: 18px; color: var(--metal-2); gap: 8px; --cut: 9px; }
.btn--ghost::before { background: rgba(255, 255, 255, .08); }
.btn--ghost .btn__icon { width: 18px; height: 18px; }
.stage__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }

.btn--line { width: 100%; min-height: 60px; font-size: 22px; gap: 10px; }
.btn--line::before { background: var(--steel); }
.btn--line::after {
  content: ""; position: absolute; inset: 2px; z-index: -1;
  clip-path: polygon(calc(var(--cut) - 1px) 0, 100% 0, calc(100% - var(--cut) + 1px) 100%, 0 100%);
  background: linear-gradient(180deg, #181b1f, #0e1012);
}
.btn--line .btn__icon { width: 22px; height: 22px; color: var(--yellow); }

@media (hover: hover) {
  .btn--go:hover:not([disabled])::before { background: linear-gradient(100deg, #e01019 0%, #ff2a2a 50%, #ff3a3a 100%); }
  .btn--go:hover:not([disabled]) .btn__icon { transform: translateX(5px); }
  .btn--line:hover::before { background: var(--yellow); }
  .btn--ghost:hover { color: var(--white); }
  .btn--ghost:hover .btn__icon { transform: translateX(-4px); }
}

.linkbtn {
  display: inline; min-height: 24px; font: inherit; color: var(--metal-2);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.linkbtn:hover { color: var(--white); }

/* ---------- Barre d'action (reste accessible au pouce) ---------- */
.dock {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; gap: 10px;
  padding: 18px var(--gutter) calc(14px + var(--safe-b));
  background: linear-gradient(to top, var(--black) 58%, rgba(7, 8, 8, .9) 78%, rgba(7, 8, 8, 0));
}
.dock--start { margin: auto calc(var(--gutter) * -1) 0; padding-top: 26px; }
.dock--form { margin: 22px calc(var(--gutter) * -1) 0; }
.dock--form .btn--go { flex: 1; width: auto; }
.btn--go .btn__label { white-space: nowrap; }
.app[data-stage="2"] .dock--form .btn--go { font-size: clamp(19px, 6.1vw, 28px); padding: 0 20px; gap: 10px; }

/* =====================================================================
   SCÈNES
   ===================================================================== */
.app { position: relative; z-index: 1; }
.scene { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding-top: var(--banner); }

/* Apparition : état initial seulement si le JavaScript est actif.
   Filet de sécurité : tout redevient visible après 2,5 s quoi qu'il arrive. */
.js .reveal, .js .emblem__logo { animation: failsafe .01s 2.5s both; }
.js .mega__txt { transform: translateY(112%) skewY(7deg); animation: failsafe .01s 2.5s both; }
.scene.is-in .reveal { animation: rise .75s var(--ease-out) both; }

/* =====================================================================
   01 — LE DÉPART
   ===================================================================== */
.start {
  flex: 1; display: flex; flex-direction: column;
  width: 100%; max-width: 560px; margin: 0 auto;
  padding: calc(10px + var(--safe-t)) var(--gutter) 0;
}
.start__copy { flex: 1; display: flex; flex-direction: column; }

.topline {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 6px 0 9px; border-bottom: 1px solid rgba(255, 255, 255, .09);
  font: 600 11.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--metal-2);
}
.topline__brand { font-weight: 700; color: var(--white); }
.topline__brand b { color: var(--yellow); font-weight: 700; }
.topline__date { display: inline-flex; align-items: center; text-align: right; }
.topline__dot { width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: blink 1.6s steps(1) infinite; flex: none; }

.emblem { position: relative; width: min(56vw, 230px); aspect-ratio: 1; margin: 14px auto 2px; display: grid; place-items: center; }
.emblem__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring-tick { stroke: currentColor; stroke-linecap: round; stroke-opacity: var(--rest, .14); }
.emblem.is-booting .ring-tick { animation: tickBoot 1.25s var(--ease-out) both; animation-delay: calc(var(--i) * 11ms + 260ms); }
.emblem.is-revving .ring-tick { animation: tickRev .4s var(--ease-out) both; animation-delay: calc(var(--i) * 4ms); }
.emblem__halo { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(227, 18, 27, .38), rgba(227, 18, 27, .08) 60%, transparent); animation: halo 3.4s ease-in-out infinite; }
.emblem__logo { position: relative; width: 73%; height: auto; filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .65)); }
.scene.is-in .emblem__logo { animation: logoIn 1s var(--ease-out) .05s both; }

.kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; }
.kicker__tag { position: relative; isolation: isolate; padding: 6px 13px 5px; font: italic 900 16px/1 var(--f-display); text-transform: uppercase; letter-spacing: .04em; }
.kicker__tag::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--red); clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%); }
.kicker__txt { font: italic 700 17px/1 var(--f-display); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.amp { color: var(--yellow); }

.mega { margin-top: 10px; font: italic 900 clamp(54px, 16.6vw, 80px)/.84 var(--f-display); text-transform: uppercase; letter-spacing: -.008em; color: var(--white); }
.mega__row { display: block; overflow: hidden; padding: .16em .16em .035em .03em; margin: -.16em 0 -.035em -.03em; }
.mega__txt { display: inline-block; transform-origin: 0 100%; white-space: nowrap; }
.scene.is-in .mega__txt { animation: megaIn .9s var(--ease-out) both; }
.scene.is-in .mega__row:nth-child(1) .mega__txt { animation-delay: .16s; }
.scene.is-in .mega__row:nth-child(2) .mega__txt { animation-delay: .25s; }
.scene.is-in .mega__row:nth-child(3) .mega__txt { animation-delay: .34s; }
.mega__row--brush { padding-left: .2em; margin-left: -.2em; padding-right: .36em; }
.mega__row--brush .mega__txt { position: relative; z-index: 0; padding: .07em .2em .03em .1em; margin-left: -.04em; }
.mega__row--brush .mega__txt::before {
  content: ""; position: absolute; z-index: -1; left: -.14em; right: -.18em; top: .04em; bottom: -.04em;
  background: var(--red);
  -webkit-mask: url(../img/brush.svg) center / 100% 100% no-repeat;
  mask: url(../img/brush.svg) center / 100% 100% no-repeat;
}
.js .mega__row--brush .mega__txt::before { clip-path: inset(0 100% 0 0); animation: failsafeClip .01s 2.5s both; }
.scene.is-in .mega__row--brush .mega__txt::before { animation: brush .55s var(--ease-io) .62s both; }
/* Texte noir sur pinceau jaune : le pinceau doit couvrir toute la hauteur des lettres */
.mega__row--yellow { padding-top: .1em; padding-bottom: .08em; }
.mega__row--yellow .mega__txt { color: var(--black); padding: .22em .3em .2em .16em; }
.mega__row--yellow .mega__txt::before { background: var(--yellow); top: 0; bottom: 0; left: -.1em; right: -.12em; }

.lead { margin-top: 18px; font: 400 17.5px/1.5 var(--f-ui); color: var(--text-2); max-width: 34em; }
.spec { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; margin-top: 18px; font: 700 clamp(12px, 3.4vw, 15px)/1 var(--f-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--yellow); }
.spec__bolt { width: 18px; height: 18px; color: var(--yellow); }
.spec__sep { color: var(--metal); }

.route { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
.route::before { content: ""; position: absolute; left: 20px; right: 20px; top: 14px; height: 2px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .3) 0 9px, transparent 9px 15px); }
.route__step { position: relative; display: flex; flex-direction: column; gap: 4px; padding-right: 6px; }
.route__step b { display: inline-grid; place-items: center; width: 44px; height: 30px; margin-bottom: 6px; font: 700 14px/1 var(--f-mono); color: var(--black); clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%); }
.route__step:nth-child(1) b { background: var(--green); color: #fff; }
.route__step:nth-child(2) b { background: var(--yellow); }
.route__step:nth-child(3) b { background: var(--red); color: #fff; }
.route__name { font: italic 900 18px/1 var(--f-display); text-transform: uppercase; letter-spacing: .01em; }
.route__sub { font: 600 11px/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--metal); }

.plate { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; border: 1px solid rgba(255, 255, 255, .1); background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)); }
.plate__item { padding: 10px 10px 11px; min-width: 0; }
.plate__item + .plate__item { border-left: 1px solid rgba(255, 255, 255, .08); }
.plate dt { display: flex; align-items: center; gap: 6px; font: 600 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--metal); }
.plate dt svg { width: 13px; height: 13px; color: var(--red); flex: none; }
.plate dd { margin-top: 7px; font: italic 900 17px/1.02 var(--f-display); text-transform: uppercase; letter-spacing: .01em; }
.context { margin-top: 12px; font: 400 13.5px/1.5 var(--f-ui); color: var(--metal); }
.context b { color: var(--green-text); font-weight: 600; }

.start__copy > :nth-child(1) { animation-delay: .1s !important; }
.start__copy > :nth-child(3) { animation-delay: .46s !important; }
.start__copy > :nth-child(4) { animation-delay: .56s !important; }
.start__copy > :nth-child(5) { animation-delay: .64s !important; }
.start__copy > :nth-child(6) { animation-delay: .72s !important; }
.start__copy > :nth-child(7) { animation-delay: .8s !important; }

/* =====================================================================
   02 — LE TABLEAU DE BORD
   ===================================================================== */
.dashbar {
  position: sticky; top: var(--banner); z-index: 6;
  display: flex; align-items: center; gap: 10px;
  height: calc(60px + var(--safe-t)); padding: var(--safe-t) var(--gutter) 0;
  background: linear-gradient(180deg, rgba(7, 8, 8, .97) 0%, rgba(7, 8, 8, .93) 72%, rgba(7, 8, 8, 0) 100%);
}
.dashbar__logo { width: 46px; height: auto; flex: none; transform-origin: 0 0; }
.dashbar__id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dashbar__id b { font: italic 900 19px/1 var(--f-display); text-transform: uppercase; letter-spacing: .01em; }
.dashbar__id span { font: 600 10px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--metal); white-space: nowrap; }

.shift { margin-left: auto; display: flex; gap: 5px; padding: 8px 10px; background: #040505; border: 1px solid rgba(255, 255, 255, .09); border-radius: 3px; flex: none; }
.shift i { --c: var(--green); width: 15px; height: 10px; border-radius: 2px; background: #1b1e21; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); transform: skewX(-14deg); transition: background .12s ease, box-shadow .25s ease; }
.shift i:nth-child(2) { --k: 1; }
.shift i:nth-child(3) { --k: 2; --c: var(--yellow); }
.shift i:nth-child(4) { --k: 3; --c: var(--yellow); }
.shift i:nth-child(5) { --k: 4; --c: var(--red-hot); }
.shift i.is-on { background: var(--c); box-shadow: 0 0 10px var(--c), inset 0 0 0 1px rgba(255, 255, 255, .3); }
.shift i.is-pop { animation: ledPop .42s var(--ease-spring); }
.shift.is-full i { animation: ledFlash .8s steps(1) both; }
.shift.is-chase i { animation: chase .75s linear infinite; animation-delay: calc(var(--k, 0) * 110ms); background: var(--c); }
.shift.is-fault i { background: var(--red-hot) !important; box-shadow: 0 0 10px var(--red-hot) !important; animation: fault .3s steps(1) 4 !important; }
.shift.is-out i { background: #1b1e21 !important; box-shadow: none !important; transition: none; animation: none !important; }

.dash { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 600px; margin: 0 auto; padding: 0 var(--gutter); }
.cockpit { padding-top: 2px; }

.cluster {
  position: relative; display: grid; grid-template-columns: minmax(130px, 45%) 1fr; align-items: center; gap: 12px;
  padding: 12px 14px 10px 8px;
  background: linear-gradient(155deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .01) 55%), var(--night);
  border: 1px solid rgba(255, 255, 255, .08);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.cluster::before { content: ""; position: absolute; left: 0; top: 0; width: 64px; height: 2px; background: var(--red); }
.cluster::after { content: ""; position: absolute; right: 0; bottom: 0; width: 40px; height: 2px; background: var(--yellow); }

.tach { position: relative; width: 100%; max-width: 200px; justify-self: center; container-type: inline-size; }
.tach__svg { width: 100%; height: auto; overflow: visible; }
.tach__rim { fill: none; stroke: rgba(255, 255, 255, .13); stroke-width: 1; }
.tbar { stroke: #30363b; stroke-width: 3.6; transition: stroke .18s ease, opacity .18s ease; }
.tbar.is-on, .tbar.is-boot { stroke: var(--c); }
.tbar.is-blip { stroke: var(--c); opacity: .45; transition-delay: 0s !important; }
.tbar.is-head { stroke: #fff; }
.tach__labels text { font: 600 9px var(--f-mono); fill: #808990; text-anchor: middle; dominant-baseline: middle; transition: fill .2s; }
.tach__labels text.is-on { fill: var(--white); }

.gear { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 1px; }
.gear__win { display: block; height: 1em; overflow: hidden; font: italic 900 38cqw/1 var(--f-display); }
.gear__digit { display: block; text-shadow: 0 0 22px rgba(255, 214, 10, .25); transition: color .3s; }
.gear__digit.is-up { animation: gearUp .34s var(--ease-out); }
.gear__digit.is-down { animation: gearDown .34s var(--ease-out); }
.gear__label { font: 700 max(9px, 5cqw)/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--metal); transition: color .3s; }
.app[data-ready="true"] .gear__digit { color: var(--yellow); }
.app[data-ready="true"] .gear__label { color: var(--green-text); }

.readout { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.readout__k { font: 600 10.5px/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--metal); }
.readout__pct { display: flex; align-items: baseline; gap: 3px; font: 700 46px/1 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.readout__pct small { font-size: 20px; color: var(--metal); }
.readout__count { font: 600 14px/1.3 var(--f-ui); color: var(--text-2); }
.readout__status { display: inline-flex; align-items: center; gap: 7px; margin-top: 3px; font: 700 10.5px/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--metal); }
.readout__status i { width: 8px; height: 8px; border-radius: 50%; background: var(--metal); flex: none; }
.app:not([data-count="0"]) .readout__status { color: var(--yellow); }
.app:not([data-count="0"]) .readout__status i { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.app[data-ready="true"] .readout__status { color: var(--green-text); }
.app[data-ready="true"] .readout__status i { background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 1.2s steps(1) infinite; }

.laps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.laps__item { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 8px 4px 9px; border-bottom: 2px solid rgba(255, 255, 255, .12); font: italic 900 15px/1 var(--f-display); text-transform: uppercase; color: var(--metal); transition: color .3s, border-color .3s; }
.laps__item b { font: 700 11px/1 var(--f-mono); color: inherit; }
.laps__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.laps__item.is-current { color: var(--white); border-color: var(--yellow); }
.laps__item.is-current b { color: var(--yellow); }
.laps__item.is-done { color: var(--text-2); border-color: var(--green); }
.laps__item.is-done b { color: var(--green-text); }

.telemetry { display: none; }

/* ---------- Formulaire ---------- */
.panel { flex: 1; display: flex; flex-direction: column; margin-top: 20px; }
.stage { display: flex; flex-direction: column; gap: 18px; }
.stage__head { display: flex; flex-direction: column; gap: 7px; }
.stage__num { font: 700 12px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--yellow); }
.stage__num span, .stage__num i { color: var(--metal); font-style: normal; }
.stage__title { font: italic 900 clamp(35px, 10.6vw, 50px)/.9 var(--f-display); text-transform: uppercase; letter-spacing: -.004em; outline: none; }
.stage__lead { font: 400 17px/1.45 var(--f-ui); color: var(--text-2); }

.field { position: relative; }
.field__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.field__label { display: flex; align-items: center; gap: 10px; min-width: 0; font: 600 16px/1.2 var(--f-ui); color: var(--white); cursor: pointer; }
.field__idx { flex: none; display: inline-grid; place-items: center; min-width: 30px; height: 20px; padding: 0 6px; font: 700 11px/1 var(--f-mono); color: var(--black); background: var(--metal); clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); transition: background .2s, color .2s; }
.field__state { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 700 10.5px/1 var(--f-mono); letter-spacing: .13em; text-transform: uppercase; color: #6b737a; white-space: nowrap; transition: color .2s; }
.field__state i { width: 8px; height: 8px; border-radius: 50%; background: #2b3035; transition: background .2s, box-shadow .2s; }
.field.is-focus .field__idx { background: var(--yellow); }
.field.is-typing .field__state { color: var(--yellow); }
.field.is-typing .field__state i { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); animation: pulse 1s ease-in-out infinite; }
.field.is-valid .field__idx { background: var(--green); color: #fff; }
.field.is-valid .field__state { color: var(--green-text); }
.field.is-valid .field__state i { background: var(--green); box-shadow: 0 0 9px var(--green); }
.field.is-error .field__idx { background: var(--red); color: #fff; }
.field.is-error .field__state { color: var(--err); }
.field.is-error .field__state i { background: var(--red-hot); box-shadow: 0 0 9px var(--red-hot); }

.field__box {
  position: relative; display: flex; align-items: center; height: 62px;
  background: linear-gradient(180deg, #15181b, #0d0f11);
  border: 1px solid #383e44; border-radius: 3px;
  transition: border-color .2s, background .2s;
}
.field__box::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 4px; border-radius: 3px 0 0 3px; background: #41474d; transition: background .2s, box-shadow .2s; }
.field.is-focus .field__box { border-color: rgba(255, 214, 10, .8); background: linear-gradient(180deg, #1a1d20, #101214); }
.field.is-focus .field__box::before { background: var(--yellow); box-shadow: 0 0 14px rgba(255, 214, 10, .65); }
.field.is-valid .field__box::before { background: var(--green); box-shadow: 0 0 12px rgba(31, 170, 89, .5); }
.field.is-valid:not(.is-focus) .field__box { border-color: rgba(31, 170, 89, .6); }
.field.is-error .field__box { border-color: var(--red-hot); }
.field.is-error .field__box::before { background: var(--red-hot); box-shadow: 0 0 12px rgba(255, 48, 48, .55); }
.field.is-validated .field__box::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--green), #c6ffdd, transparent);
  transform-origin: 0 50%; animation: validSweep .65s var(--ease-out) both;
}
.field.is-shake .field__box { animation: shake .4s ease; }

.field__input {
  flex: 1; min-width: 0; width: 100%; height: 100%;
  padding: 0 48px 0 18px;
  background: transparent; border: 0; border-radius: 0; outline: none;
  -webkit-appearance: none; appearance: none;
  font: 600 21px/1 var(--f-ui); color: var(--white); caret-color: var(--yellow);
}
.field__input::placeholder { color: #5b636b; opacity: 1; font-weight: 400; }
.field__input:-webkit-autofill,
.field__input:-webkit-autofill:focus { -webkit-text-fill-color: var(--white); -webkit-box-shadow: 0 0 0 100px #15181b inset; caret-color: var(--yellow); transition: background-color 9999s; }
.field__input[readonly] { color: var(--metal-2); }
.field__ok { position: absolute; right: 14px; top: 50%; width: 22px; height: 22px; margin-top: -11px; color: var(--green); opacity: 0; transform: scale(.3) rotate(-20deg); transition: opacity .2s, transform .45s var(--ease-spring); pointer-events: none; }
.field.is-valid .field__ok { opacity: 1; transform: none; }

/* Ligne lumineuse qui parcourt le contour au focus */
.field__trace {
  position: absolute; inset: -2px; border-radius: 5px; padding: 2px; pointer-events: none; opacity: 0;
  background: conic-gradient(from var(--ta), transparent 0deg 220deg, rgba(255, 214, 10, .2) 260deg, var(--yellow) 318deg, #fff 340deg, var(--red-hot) 352deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.field.is-tracing .field__trace { animation: trace 1s var(--ease-io) both; }

.field__hint { margin-top: 7px; font: 400 13.5px/1.4 var(--f-ui); color: var(--metal); }
.field.is-error .field__hint { display: none; }
.field__error { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font: 600 15px/1.35 var(--f-ui); color: var(--err); animation: errIn .3s var(--ease-out); }
.field__error svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }

.field__box--tel .field__input { padding-left: 14px; letter-spacing: .02em; }
.field__prefix { flex: none; display: flex; align-items: center; gap: 9px; height: 100%; padding: 0 13px 0 18px; border-right: 1px solid #2d3237; font: 700 19px/1 var(--f-mono); color: var(--metal-2); }
.flag-sn { display: flex; width: 22px; height: 15px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
.flag-sn i { flex: 1; }
.flag-sn i:nth-child(1) { background: #00853f; }
.flag-sn i:nth-child(2) { position: relative; background: #fdef42; }
.flag-sn i:nth-child(2)::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #00853f; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.flag-sn i:nth-child(3) { background: #e31b23; }

.field__box--unit .field__input { padding-right: 60px; font: 700 26px/1 var(--f-mono); letter-spacing: .03em; }
.field__box--unit .field__input::placeholder { font-weight: 600; }
.field__unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font: 700 15px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--metal); pointer-events: none; transition: color .2s; }
.field.is-valid .field__unit { color: var(--green-text); }

/* ---------- Instruments de l'étape 2 ---------- */
.field--metric {
  padding: 14px 14px 16px 10px;
  background: linear-gradient(155deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .01) 55%), var(--night);
  border: 1px solid rgba(255, 255, 255, .08);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}
.metric { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 14px; align-items: center; }
.metric__body { min-width: 0; }
.gauge { position: relative; display: flex; justify-content: center; align-items: center; }

.ruler { --p: 0; --h: 164px; position: relative; width: 100px; height: var(--h); }
.ruler__labels span { position: absolute; left: 0; transform: translateY(50%); font: 600 10px/1 var(--f-mono); color: #646c73; }
.ruler__labels span:nth-child(1) { bottom: 100%; }
.ruler__labels span:nth-child(2) { bottom: 75%; }
.ruler__labels span:nth-child(3) { bottom: 50%; }
.ruler__labels span:nth-child(4) { bottom: 25%; }
.ruler__labels span:nth-child(5) { bottom: 0; }
.ruler__ticks {
  position: absolute; left: 26px; top: 0; bottom: 0; width: 16px;
  background:
    repeating-linear-gradient(to top, rgba(255, 255, 255, .5) 0 1.5px, transparent 1.5px 25%) left bottom / 16px calc(100% + 1.5px) no-repeat,
    repeating-linear-gradient(to top, rgba(255, 255, 255, .26) 0 1px, transparent 1px 5%) left bottom / 9px calc(100% + 1px) no-repeat;
}
.ruler__leds { position: absolute; left: 46px; top: 0; bottom: 0; width: 10px; display: flex; flex-direction: column-reverse; gap: 2px; }
.ruler__leds i { flex: 1; border-radius: 1px; background: #202427; transition: background .15s ease, box-shadow .2s ease; }
.ruler__leds i.is-on { background: var(--yellow); box-shadow: 0 0 6px rgba(255, 214, 10, .45); }
.ruler__leds i.is-head { background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .8); }
.ruler.is-out .ruler__leds i.is-on { background: var(--red-hot); box-shadow: 0 0 6px rgba(255, 48, 48, .5); }
.ruler__mark {
  position: absolute; left: 24px; right: 0; bottom: 0; height: 2px; margin-bottom: -1px;
  background: linear-gradient(90deg, var(--yellow), rgba(255, 214, 10, .4));
  box-shadow: 0 0 10px rgba(255, 214, 10, .7);
  transform: translateY(calc(var(--p) * var(--h) * -1));
  transition: transform .6s var(--ease-spring), opacity .3s;
  opacity: 0;
}
.ruler.has-value .ruler__mark { opacity: 1; }
.ruler__val { position: absolute; right: 0; top: 50%; transform: translateY(-50%); padding: 4px 7px 3px 9px; font: 700 13px/1 var(--f-mono); color: var(--black); background: var(--yellow); clip-path: polygon(4px 0, 100% 0, 100% 100%, 0 100%); }
.ruler.is-out .ruler__mark { background: var(--red-hot); box-shadow: 0 0 10px rgba(255, 48, 48, .7); }
.ruler.is-out .ruler__val { background: var(--red-hot); color: #fff; }

.gauge--dial { width: 108px; height: 108px; }
.dial { width: 100%; height: 100%; overflow: visible; }
.dbar { stroke: #30363b; stroke-width: 4.2; transition: stroke .15s ease; }
.dbar.is-on { stroke: var(--yellow); }
.dbar.is-head { stroke: #fff; }
.dial__labels text { font: 600 10px var(--f-mono); fill: #646c73; text-anchor: middle; dominant-baseline: middle; }
.dial__read { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.odo { display: flex; align-items: flex-end; height: 1em; font: 700 21px/1 var(--f-mono); font-variant-numeric: tabular-nums; }
.odo__col { display: block; width: .62em; height: 1em; overflow: hidden; text-align: center; transition: opacity .25s; }
.odo__col.is-ghost { opacity: .16; }
.odo__strip { display: flex; flex-direction: column; transition: transform .55s var(--ease-out); }
.odo__strip span { display: block; height: 1em; }
.odo__sep { width: .3em; text-align: center; color: var(--metal); }
.dial__unit { font: 700 10px/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--metal); }
.field.is-valid .dial__unit { color: var(--green-text); }

.privacy { display: flex; gap: 11px; align-items: flex-start; padding: 13px 14px; border-left: 2px solid var(--green); background: rgba(31, 170, 89, .07); font: 400 13.5px/1.5 var(--f-ui); color: var(--text-2); }
.privacy svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--green-text); }
.privacy .linkbtn { color: var(--white); }

.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.alert { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; background: rgba(227, 18, 27, .12); border: 1px solid rgba(255, 48, 48, .55); border-left-width: 4px; }
.alert.is-in { animation: rise .45s var(--ease-out); }
.alert svg { flex: none; width: 22px; height: 22px; color: var(--err); }
.alert__title { font: italic 900 21px/1.05 var(--f-display); text-transform: uppercase; }
.alert__text { margin-top: 4px; font: 400 15px/1.45 var(--f-ui); color: var(--text-2); }

/* =====================================================================
   03 — LE PASS
   ===================================================================== */
.finish { width: 100%; max-width: 560px; margin: 0 auto; padding: calc(18px + var(--safe-t)) var(--gutter) calc(28px + var(--safe-b)); display: flex; flex-direction: column; gap: 22px; }
.finish__kicker { display: inline-flex; align-items: center; gap: 8px; font: 700 12px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--green-text); }
.finish__kicker svg { width: 16px; height: 16px; }
.scene--demo .finish__kicker { color: var(--yellow); }
.mega--finish { font-size: clamp(36px, 11.4vw, 74px); margin-top: 12px; }
.mega--finish .mega__txt { white-space: nowrap; }
.scene--pass.is-in .mega__row:nth-child(1) .mega__txt { animation-delay: .32s; }
.scene--pass.is-in .mega__row:nth-child(2) .mega__txt { animation-delay: .42s; }
.scene--pass.is-in .mega__row--brush .mega__txt::before { animation-delay: .72s; }
.finish .lead { margin-top: 14px; }
.scene--pass.is-in .finish__kicker,
.scene--pass.is-in .finish .lead { animation: rise .7s var(--ease-out) .5s both; }
.scene--pass.is-in .finish__actions { animation: rise .7s var(--ease-out) .85s both; }
.scene--pass.is-in .safety { animation: rise .7s var(--ease-out) 1s both; }

.pass-stage { display: grid; place-items: center; perspective: 1100px; padding: 4px 0; touch-action: pan-y; }
.pass { position: relative; width: min(84vw, 340px); aspect-ratio: 5 / 8; container-type: inline-size; }
.pass__card {
  position: absolute; inset: 0; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; padding: 13cqw 6.4cqw 0;
  border-radius: 4.5cqw;
  background: linear-gradient(180deg, #1a1d21 0%, #0c0d0f 70%, #0a0b0c 100%);
  box-shadow: 0 34px 70px -24px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .14);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .7s var(--ease-out);
}
.pass-stage.is-tilting .pass__card { transition: transform .1s linear; }
.pass__card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1.4cqw; background: var(--red); z-index: 1; }
.pass__card::after {
  content: ""; position: absolute; inset: -20% -70%; z-index: 4; pointer-events: none;
  background: linear-gradient(105deg, transparent 44%, rgba(255, 255, 255, .13) 50%, transparent 56%);
  transform: translateX(-62%);
  animation: sheen 6.5s 2.6s var(--ease-io) infinite;
}
.pass__card > * { position: relative; z-index: 2; }
.pass__carbon, .pass__circuit, .pass__stripes, .pass__checker, .pass__slot, .pass__flag, .pass__demo, .pass__foil, .pass__glare { position: absolute; z-index: 0; }
.pass__carbon {
  inset: 0; opacity: .6;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, .04) 25%, transparent 25% 50%, rgba(255, 255, 255, .04) 50% 75%, transparent 75%) 0 0 / 1.8cqw 1.8cqw,
    linear-gradient(-45deg, rgba(0, 0, 0, .4) 25%, transparent 25% 50%, rgba(0, 0, 0, .4) 50% 75%, transparent 75%) 0 0 / 1.8cqw 1.8cqw;
}
.pass__circuit { right: -16%; top: 5%; width: 92%; height: auto; }
.pass__circuit path { fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: 7; }
.pass__stripes { right: -14cqw; bottom: 22cqw; width: 60cqw; display: flex; flex-direction: column; gap: 1.6cqw; transform: rotate(-28deg); }
.pass__stripes i { display: block; }
.pass__stripes i:nth-child(1) { height: 8cqw; background: var(--red); }
.pass__stripes i:nth-child(2) { height: 3cqw; background: var(--yellow); }
.pass__checker {
  right: 0; bottom: 12cqw; width: 42cqw; height: 34cqw; opacity: .15;
  background: conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0) 0 0 / 5cqw 5cqw;
  -webkit-mask: linear-gradient(90deg, transparent, #000 70%);
  mask: linear-gradient(90deg, transparent, #000 70%);
}
.pass__slot { left: 41.5cqw; top: 4.6cqw; width: 17cqw; height: 3.2cqw; border-radius: 2cqw; background: #030404; box-shadow: inset 0 0 0 .25cqw rgba(255, 255, 255, .13); z-index: 3; }
.pass__top { display: flex; justify-content: space-between; gap: 2cqw; font: 600 2.95cqw/1 var(--f-mono); letter-spacing: .5cqw; text-transform: uppercase; color: var(--metal-2); }
#pass-ref { color: var(--yellow); }
.pass__brand { display: flex; align-items: center; gap: 4cqw; margin-top: 4cqw; }
.pass__brand img { width: 33cqw; height: auto; flex: none; }
.pass__title { display: flex; flex-direction: column; align-items: flex-start; font-family: var(--f-display); font-style: italic; font-weight: 900; text-transform: uppercase; line-height: .8; }
.pass__dem { font-size: 22.7cqw; letter-spacing: -.02em; }
.pass__academy { position: relative; z-index: 0; margin-top: 1cqw; padding: .12em .24em .06em .14em; margin-left: -.1em; font-size: 11.4cqw; color: var(--black); }
.pass__academy::before { content: ""; position: absolute; inset: 0 -.06em 0 -.04em; z-index: -1; background: var(--yellow); -webkit-mask: url(../img/brush.svg) center / 100% 100% no-repeat; mask: url(../img/brush.svg) center / 100% 100% no-repeat; }
.pass__band { position: relative; z-index: 2; display: flex; align-items: center; gap: 2.4cqw; width: 76%; margin: 5cqw 0 0 -6.4cqw; padding: 2.2cqw 2cqw 2.2cqw 6.4cqw; font: italic 900 5.6cqw/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.pass__band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--red); clip-path: polygon(0 0, 100% 0, calc(100% - 4cqw) 100%, 0 100%); }
.pass__band svg { width: 5cqw; height: 5cqw; color: var(--yellow); flex: none; }
.pass__name { display: flex; flex-direction: column; margin-top: 5cqw; font-family: var(--f-display); font-style: italic; font-weight: 900; text-transform: uppercase; line-height: .9; }
.pass__first { font-size: var(--fs1, 9.5cqw); color: var(--yellow); white-space: nowrap; }
.pass__last { font-size: var(--fs, 21cqw); white-space: nowrap; letter-spacing: -.01em; padding-right: .08em; }
.pass__first.is-wrap, .pass__last.is-wrap { white-space: normal; }
.ch { display: inline-block; white-space: pre; }
.pass__rule {
  height: 2.2cqw; margin-top: 4.5cqw;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .45) 0 .25cqw, transparent .25cqw 2cqw) left bottom / 100% 1.2cqw no-repeat,
    linear-gradient(rgba(255, 255, 255, .22), rgba(255, 255, 255, .22)) left bottom / 100% .25cqw no-repeat;
}
.pass__info { display: grid; gap: 2.4cqw; margin-top: 4cqw; }
.pass__info dt { font: 600 2.7cqw/1 var(--f-mono); letter-spacing: .55cqw; text-transform: uppercase; color: var(--metal); }
.pass__info dd { margin-top: .9cqw; font: italic 700 6.6cqw/1 var(--f-display); text-transform: uppercase; letter-spacing: .01em; }
.pass__info small { display: block; margin-top: 1.1cqw; font: 600 2.6cqw/1 var(--f-mono); letter-spacing: .4cqw; color: var(--green-text); }
.pass__fine { margin-top: auto; padding: 3cqw 0 5.2cqw; font: 400 2.75cqw/1.35 var(--f-ui); color: var(--metal); }
.pass__flag { left: 0; right: 0; bottom: 0; height: 1.6cqw; display: flex; z-index: 3; }
.pass__flag i { flex: 1; }
.pass__flag i:nth-child(1) { background: #00853f; }
.pass__flag i:nth-child(2) { background: #fdef42; }
.pass__flag i:nth-child(3) { background: #e31b23; }
.pass__demo { left: 50%; top: 52%; z-index: 3; transform: translate(-50%, -50%) rotate(-24deg); padding: 1cqw 4cqw; border: .6cqw solid rgba(255, 214, 10, .55); font: italic 900 12cqw/1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; color: rgba(255, 214, 10, .7); white-space: nowrap; }
.pass__foil {
  inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: screen; opacity: .85;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 214, 10, .14) 42%, rgba(255, 255, 255, .2) 50%, rgba(227, 18, 27, .14) 58%, transparent 70%) no-repeat;
  background-size: 300% 300%;
  background-position: var(--mx, 50%) var(--my, 50%);
}
.pass__glare { inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .18), transparent 46%); }
.pass-stage.is-tilting .pass__glare { opacity: 1; }

.pass.is-in .ch { animation: chIn .6s var(--ease-out) both; animation-delay: calc(.62s + var(--i) * 30ms); }
.pass.is-in .pass__band { animation: wipeIn .5s var(--ease-io) .5s both; }
.pass.is-in .pass__stripes i:nth-child(1) { animation: stripeIn .65s var(--ease-out) .75s both; }
.pass.is-in .pass__stripes i:nth-child(2) { animation: stripeIn .65s var(--ease-out) .85s both; }
.pass.is-in .pass__checker { animation: checkerIn .9s var(--ease-out) 1s both; }
.pass.is-in .pass__info > div { animation: rise .6s var(--ease-out) both; }
.pass.is-in .pass__info > div:nth-child(1) { animation-delay: .9s; }
.pass.is-in .pass__info > div:nth-child(2) { animation-delay: .98s; }
.pass.is-in .pass__info > div:nth-child(3) { animation-delay: 1.06s; }

.finish__actions { display: flex; flex-direction: column; gap: 10px; }
.save-status { min-height: 1.45em; font: 600 14.5px/1.45 var(--f-ui); color: var(--green-text); text-align: center; }
.save-status.is-error { color: var(--err); }
.safety { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid rgba(255, 214, 10, .35); background: rgba(255, 214, 10, .05); }
.safety__k { display: flex; align-items: center; gap: 8px; font: 700 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.safety__k svg { width: 16px; height: 16px; }
.safety__txt { font: 400 14.5px/1.45 var(--f-ui); color: var(--text-2); }

/* ---------- Notice de confidentialité ---------- */
.sheet { width: min(640px, 100%); max-width: 100%; max-height: min(90dvh, 820px); margin: auto auto 0; padding: 0; border: 0; border-top: 3px solid var(--red); background: var(--carbon); color: var(--white); overflow: auto; overscroll-behavior: contain; }
.sheet[open] { animation: sheetUp .38s var(--ease-out); }
.sheet::backdrop { background: rgba(0, 0, 0, .74); }
.sheet__inner { display: flex; flex-direction: column; gap: 8px; padding: 22px var(--gutter) calc(22px + var(--safe-b)); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.sheet__title { font: italic 900 30px/1 var(--f-display); text-transform: uppercase; }
.sheet__close { width: 46px; height: 46px; display: grid; place-items: center; color: var(--metal-2); flex: none; }
.sheet__close svg { width: 22px; height: 22px; }
.sheet h3 { margin-top: 12px; font: 700 12px/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.sheet p { font: 400 15.5px/1.55 var(--f-ui); color: var(--text-2); }
.sheet .todo { color: var(--yellow); font-weight: 600; }
.sheet__ok { margin-top: 18px; }

.demo-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 34px;
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 12px;
  font: 700 11.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--black);
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, #f0c400 14px 28px);
}
.demo-banner b { padding: 5px 8px; background: var(--black); color: var(--yellow); }
.noscript { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; padding: 18px; background: var(--red); color: #fff; font-weight: 600; text-align: center; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 374px) {
  .plate dd { font-size: 15px; }
  .route__name { font-size: 16px; }
  .cluster { grid-template-columns: 118px 1fr; gap: 8px; }
  .readout__pct { font-size: 38px; }
  .readout__count { font-size: 13px; }
  .metric { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
  .ruler { width: 92px; }
  .gauge--dial { width: 96px; height: 96px; }
  .odo { font-size: 18px; }
  .field--metric .field__state span { display: none; }
  .field__label { font-size: 15px; }
  .btn--go { font-size: 25px; }
}
@media (max-width: 420px) {
  .field--metric .field__state span { display: none; }
}
@media (max-height: 740px) and (max-width: 599px) {
  .emblem { width: min(40vw, 168px); margin-top: 8px; }
  .mega { font-size: clamp(48px, 14.6vw, 66px); margin-top: 6px; }
  .lead { font-size: 16.5px; margin-top: 12px; }
  .spec, .route, .plate { margin-top: 14px; }
}

@media (min-width: 600px) {
  .start, .finish { max-width: 600px; }
  .emblem { width: 250px; }
}

@media (min-width: 960px) {
  body { font-size: 18px; }
  html { scroll-padding-top: 100px; }

  /* Départ : composition asymétrique */
  .start {
    max-width: 1280px;
    display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    grid-template-rows: auto 1fr; grid-template-areas: "top top" "copy emblem";
    column-gap: clamp(40px, 5vw, 88px);
    padding-top: calc(24px + var(--safe-t)); padding-bottom: 40px;
  }
  .topline { grid-area: top; font-size: 12.5px; }
  .start__copy { grid-area: copy; justify-content: center; padding: 36px 0 0; }
  .emblem { grid-area: emblem; align-self: center; width: min(36vw, 480px); margin: 0 auto; }
  .mega { font-size: clamp(80px, 7.2vw, 124px); }
  .lead { font-size: 19px; max-width: 32em; margin-top: 16px; }
  /* Le bouton de départ reste visible sans défiler ; le détail suit */
  .start__copy > .dock--start { order: 4; }
  .start__copy > .route, .start__copy > .plate, .start__copy > .context { order: 5; }
  .route { margin-top: 30px; }
  .route { max-width: 560px; }
  .plate { max-width: 620px; }
  .plate dd { font-size: 20px; }
  .dock--start { position: static; margin: 24px 0 0; padding: 0; background: none; max-width: 460px; }

  /* Tableau de bord : cockpit à gauche, saisie à droite */
  .dashbar { height: calc(76px + var(--safe-t)); padding-left: max(var(--gutter), calc((100vw - 1240px) / 2 + var(--gutter))); padding-right: max(var(--gutter), calc((100vw - 1240px) / 2 + var(--gutter))); }
  .dashbar__logo { width: 56px; }
  .dashbar__id b { font-size: 22px; }
  .shift { gap: 7px; padding: 10px 13px; }
  .shift i { width: 24px; height: 13px; }
  .dash { max-width: 1240px; display: grid; grid-template-columns: minmax(360px, .92fr) minmax(440px, 1fr); column-gap: clamp(32px, 4.5vw, 72px); align-items: start; padding-bottom: 40px; }
  .cockpit { position: sticky; top: calc(96px + var(--banner)); padding-top: 18px; }
  .cluster { grid-template-columns: 1fr; justify-items: center; gap: 6px; padding: 30px 30px 24px; }
  .tach { max-width: 380px; }
  .readout { align-items: center; text-align: center; }
  .readout__pct { font-size: 60px; }
  .readout__pct small { font-size: 26px; }
  .readout__count { font-size: 16px; }
  .laps { margin-top: 14px; }
  .laps__item { font-size: 17px; padding: 10px 6px 11px; }
  .telemetry { display: block; margin-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
  .telemetry li { display: grid; grid-template-columns: 30px 96px minmax(0, 1fr) 10px; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid rgba(255, 255, 255, .06); font: 600 12px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--metal); }
  .telemetry b { color: #5d656c; }
  .telemetry em { font: 600 14px/1.1 var(--f-ui); font-style: normal; color: #6b737a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .telemetry i { width: 9px; height: 9px; border-radius: 50%; background: #2b3035; }
  .telemetry li.is-ok em { color: var(--white); }
  .telemetry li.is-ok i { background: var(--green); box-shadow: 0 0 9px var(--green); }
  .telemetry li.is-err i { background: var(--red-hot); box-shadow: 0 0 9px var(--red-hot); }
  .telemetry li.is-err em { color: var(--err); }

  .panel { margin-top: 18px; padding: 34px 38px 0; background: linear-gradient(180deg, rgba(14, 16, 18, .86), rgba(9, 10, 11, .9)); border: 1px solid rgba(255, 255, 255, .08); }
  .stage__title { font-size: clamp(46px, 3.8vw, 60px); }
  .stage__lead { font-size: 18px; }
  .dock--form { margin: 26px -38px 0; padding: 22px 38px 30px; }
  .metric { grid-template-columns: 124px minmax(0, 1fr); gap: 20px; }
  .ruler { --h: 176px; width: 112px; }
  .gauge--dial { width: 124px; height: 124px; }
  .odo { font-size: 24px; }
  .field--metric .field__state span { display: inline; }

  /* Pass : carte à gauche, message à droite */
  .finish {
    max-width: 1180px; display: grid;
    grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
    grid-template-areas: "card head" "card actions" "card safety";
    grid-template-rows: auto auto 1fr;
    column-gap: clamp(48px, 6vw, 96px); row-gap: 22px; align-items: start;
    padding-top: calc(56px + var(--safe-t)); padding-bottom: 56px;
  }
  .pass-stage { grid-area: card; align-self: center; }
  .pass { width: min(31vw, 420px); }
  .finish__head { grid-area: head; align-self: end; }
  .finish__actions { grid-area: actions; max-width: 470px; }
  .safety { grid-area: safety; max-width: 470px; }
  .mega--finish { font-size: clamp(60px, 5.5vw, 96px); }
  .sheet { margin: auto; }
}

/* =====================================================================
   ANIMATIONS
   ===================================================================== */
@keyframes failsafe { from { opacity: 0; } to { opacity: 1; transform: none; } }
@keyframes failsafeClip { to { clip-path: inset(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes megaIn { from { transform: translateY(112%) skewY(7deg); } to { transform: none; } }
@keyframes brush { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes logoIn { from { opacity: 0; transform: scale(.84) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes halo { 0%, 100% { opacity: .75; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes tickBoot { 0% { stroke-opacity: .14; } 32% { stroke-opacity: 1; } 100% { stroke-opacity: var(--rest, .14); } }
@keyframes tickRev { to { stroke-opacity: 1; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes shine { 0% { background-position: 130% 0; } 32%, 100% { background-position: -130% 0; } }
@keyframes shineFast { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateX(5px); } }
@keyframes stripes { to { background-position: 34px 0; } }
@keyframes streak { 0% { opacity: 0; transform: translate3d(110vw, 0, 0) scaleX(.4); } 18% { opacity: 1; } 100% { opacity: 0; transform: translate3d(-60vw, 0, 0) scaleX(1.5); } }
@keyframes streakR { 0% { opacity: 0; transform: translate3d(-60vw, 0, 0) scaleX(.4); } 18% { opacity: 1; } 100% { opacity: 0; transform: translate3d(110vw, 0, 0) scaleX(1.5); } }
@keyframes flash { 0% { opacity: 0; } 14% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sweep { from { transform: translate3d(-180vw, 0, 0) skewX(-16deg); } to { transform: translate3d(130vw, 0, 0) skewX(-16deg); } }
@keyframes ledPop { 0% { transform: skewX(-14deg) scale(1.7); filter: brightness(1.9); } 100% { transform: skewX(-14deg) scale(1); filter: none; } }
@keyframes ledFlash { 0%, 50% { opacity: 1; } 25%, 75% { opacity: .2; } 100% { opacity: 1; } }
@keyframes chase { 0%, 100% { opacity: .25; } 18% { opacity: 1; } }
@keyframes fault { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes gearUp { from { transform: translateY(75%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gearDown { from { transform: translateY(-75%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes trace { 0% { --ta: 0deg; opacity: 1; } 78% { opacity: 1; } 100% { --ta: 360deg; opacity: 0; } }
@keyframes validSweep { from { transform: scaleX(0); opacity: 1; } 70% { opacity: 1; } to { transform: scaleX(1); opacity: 0; } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@keyframes errIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes chIn { from { opacity: 0; transform: translateY(.5em) skewX(-14deg); } to { opacity: 1; transform: none; } }
@keyframes wipeIn { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes stripeIn { from { transform: translateX(110%); } to { transform: none; } }
@keyframes checkerIn { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0); } }
@keyframes sheen { 0% { transform: translateX(-62%); } 26%, 100% { transform: translateX(62%); } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* =====================================================================
   RÉDUIRE LES ANIMATIONS (préférence système)
   ===================================================================== */
.rm *, .rm *::before, .rm *::after {
  animation-duration: 1ms !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 1ms !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}
.rm .world__cam { transition: none !important; }
.rm .start__copy > * { animation-delay: 0s !important; }
.rm .pass__card { transform: none !important; }
.rm .pass__card::after, .rm .btn--go::after { display: none; }
@media (prefers-reduced-motion: reduce) {
  html:not(.js) *, html:not(.js) *::before, html:not(.js) *::after { animation: none !important; transition: none !important; }
}
