/* =====================================================================
   PIERRANSKIPHOTO — Le Garage
   Système : noir garage + os chaud + couleur ambiante issue des photos
   ===================================================================== */
:root {
  color-scheme: dark;
  --ink: #060607;
  --ink-2: #0e0e10;
  --bone: #ece8e1;
  --bone-2: rgba(236, 232, 225, .64);
  --bone-3: rgba(236, 232, 225, .36);
  --line: rgba(236, 232, 225, .14);
  --signal: #ff3b2a;           /* feu arrière : redline, LED d'alarme, néon */
  --amb: 200 190 176;          /* couleur ambiante — pilotée par les photos */
  --g-amb: 200 190 176;        /* couleur de la galerie ouverte */
  --display: 'Anybody', 'Arial Black', Impact, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --pad: clamp(16px, 3.2vw, 44px);
}
@media (prefers-color-scheme: light) {
  /* le garage est un lieu de nuit : même palette dans les deux modes */
  :root:not([data-theme="light"]) { color-scheme: dark; }
}
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
html.locked, html.locked body { overflow: hidden; }
body {
  margin: 0; background: var(--ink); color: var(--bone);
  font-family: var(--mono); font-size: 13px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
@media (pointer: fine) { body.has-cursor, body.has-cursor * { cursor: none !important; } }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
kbd { font-family: var(--mono); font-size: 10px; padding: 2px 6px; border: 1px solid currentColor; border-radius: 3px; opacity: .7; }
:focus-visible { outline: 1px solid rgb(var(--amb)); outline-offset: 4px; }
p, h1, h2, h3, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow, .mono-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--bone-2);
}

/* ------------------------------------------------------------- scène */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
#scroll-track { position: relative; width: 1px; pointer-events: none; }

/* ------------------------------------------------------------- loader */
#loader {
  position: fixed; inset: 0; z-index: 200; background: var(--ink);
  display: grid; place-items: center; align-content: center; gap: 28px;
}
#loader.gone { display: none; }
.tach { position: relative; width: min(300px, 70vw); aspect-ratio: 1; }
.tach svg { width: 100%; height: 100%; overflow: visible; }
.tach .tick { stroke: var(--bone-3); stroke-width: 2; }
.tach .tick.major { stroke: var(--bone); stroke-width: 3; }
.tach .num { fill: var(--bone-2); font: 600 15px var(--mono); text-anchor: middle; dominant-baseline: middle; }
.tach .num.red { fill: var(--signal); }
.tach .arc { fill: none; stroke: var(--line); stroke-width: 1; }
.tach .redline { fill: none; stroke: var(--signal); stroke-width: 6; }
.tach .needle { stroke: var(--signal); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(255, 59, 42, .7)); }
.tach .hub { fill: var(--ink-2); stroke: var(--bone-3); }
.tach-read { position: absolute; left: 0; right: 0; top: 64%; text-align: center; }
.tach-read b { display: block; font: 800 34px/1 var(--display); font-variation-settings: 'wdth' 125; letter-spacing: .02em; }
.tach-read small { font-size: 10px; letter-spacing: .18em; color: var(--bone-3); text-transform: uppercase; }
.loader-line { display: flex; gap: 18px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--bone-2); }
.loader-line b { color: var(--bone); font-weight: 500; }
.loader-line[hidden] { display: none; }

/* bouton START (démarrage moteur = activation du son) */
.ignite { display: grid; justify-items: center; gap: 14px; animation: igniteIn .6s var(--ease-out) both; }
.ignite[hidden] { display: none; }
@keyframes igniteIn { from { opacity: 0; transform: translateY(8px); } }
.start-btn {
  width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; line-height: 1;
  background: radial-gradient(circle at 50% 32%, #2b2b2f, #0e0e10 72%);
  box-shadow: 0 0 0 2px #1b1b1e, 0 0 0 5px rgb(255 59 42 / .55), 0 0 30px rgb(255 59 42 / .28), inset 0 2px 0 rgb(255 255 255 / .08), inset 0 -8px 16px rgb(0 0 0 / .6);
  transition: transform .12s var(--ease-out), box-shadow .3s;
  animation: startPulse 2.4s ease-in-out infinite;
}
.start-btn small { font: 500 9px/1 var(--mono); letter-spacing: .26em; color: var(--bone-2); text-transform: uppercase; }
.start-btn b { font: 850 23px/1 var(--display); font-variation-settings: 'wdth' 125; letter-spacing: .06em; color: var(--bone); margin-left: .06em; /* compense l'interlettrage pour un centrage optique */ }
.start-btn:hover { box-shadow: 0 0 0 2px #1b1b1e, 0 0 0 5px var(--signal), 0 0 60px rgb(255 59 42 / .55), inset 0 2px 0 rgb(255 255 255 / .1), inset 0 -8px 16px rgb(0 0 0 / .6); }
.start-btn:active, .ignite.pressed .start-btn { transform: scale(.94); animation: none; }
@keyframes startPulse { 50% { box-shadow: 0 0 0 2px #1b1b1e, 0 0 0 5px rgb(255 59 42 / .8), 0 0 48px rgb(255 59 42 / .45), inset 0 2px 0 rgb(255 255 255 / .08), inset 0 -8px 16px rgb(0 0 0 / .6); } }
.ignite-hint { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--bone-3); }
.ignite-mute { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--bone-2); text-decoration: underline; text-underline-offset: 4px; padding: 6px 8px; }
.ignite-mute:hover { color: var(--bone); }
.ignite.pressed .ignite-hint, .ignite.pressed .ignite-mute { opacity: 0; transition: opacity .3s; }

/* bouton son du HUD */
.snd { display: inline-flex; align-items: center; gap: 8px; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.eq i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; opacity: .55; }
.snd.on .eq i { opacity: 1; animation: eq .9s ease-in-out infinite; }
.snd.on .eq i:nth-child(2) { animation-delay: -.35s; }
.snd.on .eq i:nth-child(3) { animation-delay: -.6s; }
.snd.on .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 10px; } }

/* ------------------------------------------------------------- HUD haut */
.hud-top {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: calc(var(--pad) * .7) var(--pad); pointer-events: none;
}
.hud-top > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.brand-word { font: 800 17px/1 var(--display); font-variation-settings: 'wdth' 150; letter-spacing: .04em; }
.brand-word span { font-weight: 400; color: var(--bone-2); }
.alarm { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 8px var(--signal); animation: alarm 2.4s steps(1) infinite; }
@keyframes alarm { 0%, 6% { opacity: 1; } 7%, 100% { opacity: .12; } }

.shift { display: flex; align-items: center; gap: 14px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(6, 6, 7, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.leds { display: flex; gap: 5px; }
.leds i { width: 7px; height: 7px; border-radius: 50%; background: rgba(236, 232, 225, .1); transition: background .12s, box-shadow .12s; }
.leds i.on.g { background: #2fd36b; box-shadow: 0 0 8px #2fd36b; }
.leds i.on.r { background: var(--signal); box-shadow: 0 0 8px var(--signal); }
.leds i.on.b { background: #3f7dff; box-shadow: 0 0 8px #3f7dff; }
.shift.flash .leds i { background: #3f7dff; box-shadow: 0 0 10px #3f7dff; animation: shiftflash .42s steps(2) 1; }
@keyframes shiftflash { 50% { opacity: .2; } }
.gear { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border: 1px solid var(--line); border-radius: 4px;
  font: 800 15px/1 var(--display); font-variation-settings: 'wdth' 110; color: rgb(var(--amb)); }
.gear-label { font-size: 9px; letter-spacing: .18em; color: var(--bone-3); text-transform: uppercase; }

.hud-nav { justify-self: end; display: flex; gap: 6px; }
.hud-nav button {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(6, 6, 7, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background .25s, color .25s, border-color .25s;
}
.hud-nav button:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.hud-nav button:active { transform: translateY(1px); }

/* ------------------------------------------------------------- hero */
#hero {
  position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; align-content: center; gap: 22px;
  text-align: center; pointer-events: none; padding: var(--pad); will-change: transform, opacity;
}
.hero-name {
  font: 850 9vw/.8 var(--display); font-variation-settings: 'wdth' 150; letter-spacing: 0;
  display: flex; justify-content: center; overflow: hidden; padding: .06em .02em .02em; margin: 0;
  text-shadow: 0 .04em .12em rgba(0, 0, 0, .55);
}
.hero-name span { display: inline-block; transform: translateY(105%); }
.ready .hero-name span { transform: none; transition: transform 1.1s var(--ease-out); transition-delay: calc(var(--i) * 55ms + 150ms); }
.hero-top, .hero-sub, .scroll-cue { opacity: 0; transform: translateY(10px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.ready .hero-top, .ready .hero-sub, .ready .scroll-cue { opacity: 1; transform: none; transition-delay: .7s; }
.ready .hero-sub { transition-delay: .85s; }
.ready .scroll-cue { transition-delay: 1.1s; }
.hero-top { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.hero-sub { max-width: 34ch; color: var(--bone-2); font-size: 13px; text-wrap: pretty; }
.scroll-cue { margin-top: 10vh; display: grid; justify-items: center; gap: 10px; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--bone-2); }
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(var(--bone), transparent); transform-origin: top; animation: cue 1.8s var(--ease-io) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ------------------------------------------------------------- fiche baie */
#bay-info {
  position: fixed; z-index: 12; left: 0; bottom: 0; padding: var(--pad); max-width: min(820px, 100vw);
  pointer-events: none; opacity: 0; transition: opacity .5s var(--ease-out);
}
#bay-info.show { opacity: 1; pointer-events: auto; }
.bi-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.plate {
  display: inline-flex; align-items: stretch; height: 30px; border-radius: 4px; overflow: hidden; background: var(--bone); color: #0b0b0c;
  box-shadow: inset 0 0 0 2px #0b0b0c, 0 0 0 1px rgba(236, 232, 225, .4);
  font: 800 15px/1 var(--display); font-variation-settings: 'wdth' 80; letter-spacing: .06em;
}
.plate .cc { display: grid; place-items: end center; width: 20px; padding-bottom: 4px; background: rgb(var(--amb)); color: #0b0b0c; font: 700 8px/1 var(--mono); letter-spacing: 0; }
.plate .pn { display: flex; align-items: center; gap: 6px; padding: 0 12px 0 10px; }
.plate .pn small { font: 600 9px/1 var(--mono); letter-spacing: .1em; }
.bi-make { color: rgb(var(--amb)); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.bi-model {
  font: 850 clamp(42px, 7.6vw, 132px)/.84 var(--display); font-variation-settings: 'wdth' var(--wd, 118); letter-spacing: -.01em;
  text-transform: uppercase; margin: 0 0 14px -.03em; text-wrap: balance;
}
.bi-model .ch { display: inline-block; }
.bi-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 22px; color: var(--bone-2); }
.bi-mood { font-size: 12px; letter-spacing: .08em; }
.specs { display: flex; flex-wrap: wrap; gap: 6px; }
.specs li { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding: 5px 9px; border: 1px solid var(--line); border-radius: 2px; color: var(--bone); }
.enter {
  display: inline-flex; align-items: center; gap: 14px; padding: 15px 18px 15px 20px; border-radius: 2px;
  border: 1px solid rgb(var(--amb) / .65); background: rgb(var(--amb) / .12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; transition: background .3s, color .3s, transform .2s;
}
.enter em { font-style: normal; color: var(--bone-2); letter-spacing: .1em; padding-left: 14px; border-left: 1px solid var(--line); transition: color .3s; }
.enter:hover { background: rgb(var(--amb)); color: #0b0b0c; }
.enter:hover em { color: rgba(11, 11, 12, .7); border-color: rgba(11, 11, 12, .2); }
.enter:active { transform: scale(.98); }
.enter .arrow { display: inline-block; transition: transform .3s var(--ease-out); }
.enter:hover .arrow { transform: translateX(4px); }

/* ------------------------------------------------------------- odomètre */
.odo {
  position: fixed; z-index: 12; right: var(--pad); bottom: var(--pad); display: flex; align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: .18em; color: var(--bone-3); text-transform: uppercase;
}
.odo-w { display: flex; padding: 4px 5px; gap: 2px; border: 1px solid var(--line); border-radius: 3px; background: rgba(6, 6, 7, .55); }
.wheel { position: relative; width: .72em; height: 1.25em; overflow: hidden; font: 600 15px/1.25 var(--mono); color: var(--bone); letter-spacing: 0; }
.wheel.dec { color: #0b0b0c; background: var(--bone); border-radius: 1px; }
.wheel .strip { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; align-items: center; will-change: transform; }
.wheel .strip span { height: 1.25em; }
.odo-dot { width: 3px; height: 3px; background: var(--bone-3); align-self: flex-end; margin: 0 1px 4px; }

/* ------------------------------------------------------------- fin d'allée */
#end {
  position: fixed; z-index: 12; inset: 0; display: grid; align-content: end; justify-items: start; gap: 22px;
  padding: var(--pad); padding-bottom: calc(var(--pad) + 64px); pointer-events: none; opacity: 0; transition: opacity .6s var(--ease-out);
}
#end.show { opacity: 1; }
#end.show .end-cta, #end.show footer { pointer-events: auto; }
.end-title { font: 850 clamp(32px, min(5vw, 8.4vh), 96px)/.9 var(--display); font-variation-settings: 'wdth' 118; text-transform: uppercase; letter-spacing: -.01em; max-width: 17ch; text-wrap: balance; }
.odo { transition: opacity .4s; }
body.at-end .odo { opacity: 0; }
.end-title em { font-style: normal; color: var(--signal); }
.end-sub { max-width: 44ch; color: var(--bone-2); text-wrap: pretty; }
.end-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-main, .btn-ghost {
  display: inline-flex; align-items: center; gap: 14px; padding: 16px 22px; border-radius: 2px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; transition: background .3s, color .3s, transform .2s, border-color .3s;
}
.btn-main { background: var(--signal); color: #0b0b0c; font-weight: 600; }
.btn-main:hover { background: var(--bone); }
.btn-ghost { border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--bone); }
.btn-main:active, .btn-ghost:active { transform: scale(.98); }
.end-foot { position: absolute; left: var(--pad); right: var(--pad); bottom: var(--pad); display: flex; justify-content: space-between; gap: 16px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--bone-3); }
.end-foot button:hover { color: var(--bone); }

/* ------------------------------------------------------------- curseur AF */
#cursor { position: fixed; z-index: 300; left: 0; top: 0; width: 0; height: 0; pointer-events: none; display: none; will-change: transform; contain: layout style; }
.has-cursor #cursor { display: block; }
#cursor.away { opacity: 0; }
#cursor .box { position: absolute; left: 0; top: 0; width: var(--cs, 26px); height: var(--cs, 26px); transform: translate(-50%, -50%); transition: width .16s var(--ease-out), height .16s var(--ease-out); }
#cursor .box i { position: absolute; width: 8px; height: 8px; border: 1.5px solid var(--bone); transition: border-color .25s; }
#cursor .box i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
#cursor .box i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
#cursor .box i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
#cursor .box i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
#cursor .dot { position: absolute; width: 3px; height: 3px; left: -1.5px; top: -1.5px; background: var(--bone); border-radius: 50%; }
#cursor .lbl { position: absolute; left: 0; top: calc(var(--cs, 26px) / 2 + 8px); transform: translateX(-50%); white-space: nowrap; font-size: 9px; letter-spacing: .18em; color: var(--bone-2); opacity: 0; transition: opacity .25s; }
#cursor.photo { --cs: 74px; }
#cursor.photo .box i { border-color: rgb(var(--amb)); }
#cursor.photo .lbl { opacity: 1; color: rgb(var(--amb)); }
#cursor.ui { --cs: 40px; }
#cursor.press { --cs: 18px; }
#cursor.photo.press { --cs: 58px; }
#cursor.locked .lbl::before { content: '● '; color: #2fd36b; }

/* ------------------------------------------------------------- index */
#index {
  position: fixed; inset: 0; z-index: 60; background: rgba(6, 6, 7, .9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: grid; grid-template-rows: auto 1fr; padding: var(--pad); overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity .45s var(--ease-out), visibility 0s .45s;
}
#index.open { opacity: 1; visibility: visible; transition: opacity .45s var(--ease-out); }
.ix-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.ix-head button { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; }
.ix-head button:hover { background: var(--bone); color: var(--ink); }
.ix-list { align-self: center; counter-reset: ix; }
.ix-list li { border-bottom: 1px solid var(--line); overflow: hidden; }
.ix-row {
  position: relative; width: 100%; display: grid; grid-template-columns: 70px 1fr auto; align-items: baseline; gap: 18px; padding: clamp(12px, 2.2vh, 22px) 0; text-align: left;
  transform: translateY(40%); opacity: 0; transition: transform .8s var(--ease-out), opacity .8s var(--ease-out), color .3s;
}
#index.open .ix-row { transform: none; opacity: 1; transition-delay: calc(var(--i) * 60ms + 80ms); }
.ix-row::before { content: ''; position: absolute; inset: 0 -100vw; background: rgb(var(--row) / .16); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out); z-index: -1; }
.ix-row:hover::before, .ix-row:focus-visible::before { transform: scaleX(1); }
.ix-n { font-size: 12px; color: var(--bone-3); letter-spacing: .1em; }
.ix-name { font: 850 clamp(28px, 4.8vw, 74px)/.95 var(--display); font-variation-settings: 'wdth' 120; text-transform: uppercase; transition: font-variation-settings .5s var(--ease-out); }
.ix-row:hover .ix-name { font-variation-settings: 'wdth' 150; }
.ix-name em { font-style: normal; font-weight: 300; color: var(--bone-2); font-size: .5em; letter-spacing: .04em; vertical-align: .55em; margin-right: .5em; }
.ix-meta { font-size: 11px; color: var(--bone-2); letter-spacing: .1em; text-transform: uppercase; text-align: right; }
.ix-peek { position: fixed; left: 0; top: 0; width: 300px; aspect-ratio: 3 / 2; object-fit: cover; pointer-events: none; z-index: 61; opacity: 0; transform: translate(-50%, -50%) scale(.9); transition: opacity .3s, transform .4s var(--ease-out); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.ix-peek.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ------------------------------------------------------------- galerie */
#gallery {
  position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: var(--ink);
  opacity: 0; visibility: hidden; transition: opacity .5s var(--ease-out), visibility 0s .5s;
}
#gallery.open { opacity: 1; visibility: visible; transition: opacity .5s var(--ease-out); }
.g-bg { position: absolute; inset: -8%; z-index: 0; }
.g-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(50px) saturate(1.35) brightness(.3); transition: opacity 1s var(--ease-out); }
.g-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 45%, transparent 30%, var(--ink) 95%); }
.g-top, .g-stage, .g-bottom { position: relative; z-index: 1; }
.g-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: calc(var(--pad) * .7) var(--pad); }
.g-back { justify-self: start; display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; background: rgba(6, 6, 7, .4); transition: background .25s, color .25s; }
.g-back:hover { background: var(--bone); color: var(--ink); }
.g-title { display: flex; align-items: center; gap: 14px; text-align: left; }
.g-title p { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: rgb(var(--g-amb)); }
.g-title h2 { font: 850 clamp(18px, 2.2vw, 30px)/1 var(--display); font-variation-settings: 'wdth' 130; text-transform: uppercase; letter-spacing: .01em; }
.g-title .plate { --amb: var(--g-amb); }
.g-count { justify-self: end; font-size: 12px; letter-spacing: .14em; color: var(--bone-2); }
.g-count b { font: 800 22px/1 var(--display); font-variation-settings: 'wdth' 120; color: var(--bone); }

.g-stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 calc(var(--pad) * .6); min-height: 0; }
.g-frame { position: relative; justify-self: center; display: inline-block; line-height: 0; max-width: 100%; }
.g-frame img {
  display: block; max-width: min(100%, 1500px); max-height: calc(100svh - 300px); width: auto; height: auto; object-fit: contain;
  box-shadow: 0 40px 140px -30px rgb(var(--g-amb) / .55), 0 0 0 1px rgba(236, 232, 225, .06);
  transition: box-shadow 1s var(--ease-out);
}
#gallery.open .g-frame img.first { animation: develop 1.1s var(--ease-out) both; }
/* changements de photo / de voiture : simple fondu */
.g-frame img { transition: box-shadow 1s var(--ease-out); }
.g-top, .g-stage, .g-bottom { transition: opacity .3s ease; }
#gallery.switching .g-top, #gallery.switching .g-stage, #gallery.switching .g-bottom { opacity: 0; }
@keyframes develop { from { transform: scale(1.06); filter: brightness(1.8) contrast(.8); } to { transform: none; filter: none; } }
.g-shutter { position: absolute; inset: 0; display: flex; flex-direction: column; pointer-events: none; }
.g-shutter i {
  flex: 1; transform: scaleY(0); transform-origin: top;
  background: linear-gradient(#36373b 0%, #55575c 16%, #26272a 52%, #151618 88%, #08080a 100%);
  transition: transform .26s var(--ease-io);
}
.g-shutter.closed i { transform: scaleY(1.02); transition-delay: calc(var(--i) * 26ms); }
.g-shutter.opening i { transform-origin: bottom; }
.g-ai {
  position: absolute; left: 12px; top: 12px; line-height: 1; padding: 6px 9px; border: 1px dashed rgba(236, 232, 225, .55); border-radius: 2px;
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--bone); background: rgba(6, 6, 7, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.g-nav { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 18px; background: rgba(6, 6, 7, .35); transition: background .25s, color .25s, transform .2s; }
.g-nav:hover { background: var(--bone); color: var(--ink); }
.g-nav:active { transform: scale(.94); }
.g-nav:disabled { opacity: .25; pointer-events: none; }

.g-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr); align-items: end; gap: 24px; padding: 14px var(--pad) calc(var(--pad) * .8); }
.g-note { display: grid; gap: 10px; }
.g-note .mood { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: rgb(var(--g-amb)); }
.g-note .txt { color: var(--bone-2); max-width: 40ch; text-wrap: pretty; font-size: 12px; }
.film {
  position: relative; justify-self: center; max-width: 100%; overflow-x: auto; scrollbar-width: none; background: #0b0a09; padding: 30px 14px 22px; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(236, 232, 225, .05);
}
.film::-webkit-scrollbar { display: none; }
.film::before, .film::after {
  content: ''; position: absolute; left: 0; right: 0; height: 7px; min-width: 100%;
  background: repeating-linear-gradient(90deg, transparent 0 7px, rgba(236, 232, 225, .2) 7px 15px, transparent 15px 24px);
  mask: linear-gradient(#000, #000); border-radius: 1px;
}
.film::before { top: 6px; } .film::after { bottom: 6px; }
.film-edge { position: absolute; left: 14px; top: 16px; line-height: 1; font-size: 7px; letter-spacing: .3em; color: rgb(var(--g-amb) / .8); white-space: nowrap; }
.film-frames { display: flex; gap: 10px; }
.film-frames button { position: relative; flex: none; width: 104px; height: 70px; border-radius: 1px; overflow: hidden; opacity: .5; outline: 1px solid rgba(236, 232, 225, .08); transition: opacity .3s, outline-color .3s, transform .3s var(--ease-out); }
.film-frames button:hover { opacity: .85; }
.film-frames button.cur { opacity: 1; outline: 1.5px solid rgb(var(--g-amb)); transform: translateY(-2px); }
.film-frames img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-frames span { position: absolute; left: 4px; bottom: 3px; font-size: 8px; letter-spacing: .1em; color: var(--bone); text-shadow: 0 1px 2px #000; }
.g-next { justify-self: end; display: grid; gap: 6px; text-align: right; padding: 12px 0; border-top: 1px solid var(--line); min-width: 180px; }
.g-next small { font-size: 10px; letter-spacing: .18em; color: var(--bone-3); text-transform: uppercase; }
.g-next b { font: 850 clamp(16px, 1.8vw, 24px)/1 var(--display); font-variation-settings: 'wdth' 125; text-transform: uppercase; transition: color .3s; }
.g-next:hover b { color: rgb(var(--g-amb)); }
.g-wipe { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; pointer-events: none; }
.g-wipe i { flex: 1; transform: scaleY(0); transform-origin: top; background: linear-gradient(#2c2d30 0%, #4a4c51 14%, #1f2022 55%, #0c0c0e 100%); transition: transform .34s var(--ease-io); }
.g-wipe.closed i { transform: scaleY(1.03); transition-delay: calc(var(--i) * 22ms); }
.g-wipe.opening i { transform-origin: bottom; }

/* ------------------------------------------------------------- sans WebGL */
.no-webgl #gl, .no-webgl #hero, .no-webgl .shift, .no-webgl .odo, .no-webgl #bay-info, .no-webgl #end, .no-webgl #scroll-track { display: none !important; }
.no-webgl #index { position: relative; opacity: 1; visibility: visible; min-height: 100vh; padding-top: 90px; background: var(--ink); }
.no-webgl .ix-head button { display: none; }
.no-webgl .ix-row { transform: none; opacity: 1; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 760px) {
  .hud-top { grid-template-columns: 1fr auto; row-gap: 10px; }
  .shift { grid-column: 1 / -1; grid-row: 2; justify-self: center; padding: 6px 12px; gap: 10px; }
  .gear-label { display: none; }
  .brand { gap: 7px; }
  .brand-word { font-size: 11.5px; }
  .hud-nav { gap: 4px; }
  .hud-nav button { padding: 7px 9px; font-size: 9px; letter-spacing: .12em; }
  .snd-l { display: none; }
  .hero-top { flex-direction: column; gap: 6px; }
  #bay-info { padding-bottom: calc(var(--pad) + 6px); }
  .bi-model { font-size: clamp(34px, 11vw, 64px); }
  .bi-meta { margin-bottom: 16px; }
  .bi-mood { display: none; }
  .enter { padding: 14px 16px; gap: 10px; font-size: 10px; letter-spacing: .14em; white-space: nowrap; }
  .enter kbd { display: none; }
  .enter em { padding-left: 10px; }
  .odo { display: none; }
  .g-top { grid-template-columns: auto 1fr; }
  .g-title { grid-column: 1 / -1; grid-row: 2; }
  .g-count { grid-column: 2; grid-row: 1; }
  .g-stage { grid-template-columns: minmax(0, 1fr); padding: 0 8px; }
  .g-nav { display: none; }
  .g-frame img { max-height: calc(100svh - 330px); }
  .g-bottom { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .g-note .txt { display: none; }
  .film { justify-self: stretch; }
  .g-next { justify-self: stretch; text-align: left; }
  .ix-row { grid-template-columns: 34px 1fr; }
  .ix-meta { grid-column: 2; text-align: left; }
  .ix-peek { display: none; }
  #end { padding-bottom: calc(var(--pad) + 52px); }
  .end-foot { flex-direction: column; gap: 6px; }
}
@media (max-height: 560px) and (min-width: 761px) {
  .bi-model { font-size: clamp(34px, 9vh, 72px); }
  .g-frame img { max-height: calc(100svh - 230px); }
}

/* qualité réduite : plus de flou d'arrière-plan recalculé à chaque image au-dessus de la 3D */
body.lite .shift, body.lite .hud-nav button, body.lite .enter, body.lite .g-ai, body.lite #index {
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
body.lite .shift, body.lite .hud-nav button { background: rgba(6, 6, 7, .78); }
body.lite .enter { background: rgb(var(--amb) / .2); }
body.lite #index { background: rgba(6, 6, 7, .97); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
