/* ============ NOCTERA — télémétrie hypercar ============ */
:root {
  --void: #060607;
  --panel: #0c0d0f;
  --panel-2: #101215;
  --line: rgba(255, 255, 255, .09);
  --white: #f3f5f6;
  --fog: #7e858e;
  --fog-dim: rgba(126, 133, 142, .5);
  --acid: #c9fa3d;
  --acid-dim: rgba(201, 250, 61, .3);
  --disp: "Saira Condensed", "Arial Narrow", sans-serif;
  --sans: "Saira", "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--acid); color: var(--void); }

/* ---- grain + scanlines ---- */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 95; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1.1s steps(3) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0,0) } 33% { transform: translate(-2%,1%) }
  66% { transform: translate(1%,-2%) } 100% { transform: translate(2%,-1%) }
}
.scan {
  position: fixed; inset: 0; pointer-events: none; z-index: 94; opacity: .5;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.14) 3px 4px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.5) 100%);
}

/* ---- barre de progression ---- */
.progress-line {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--acid); z-index: 110;
  box-shadow: 0 0 12px var(--acid);
}

/* ---- HUD vitesse ---- */
.hud {
  position: fixed; left: 2rem; bottom: 2rem; z-index: 100;
  display: flex; flex-direction: column; gap: .6rem; width: 150px;
  mix-blend-mode: difference;
}
.hud-block { display: flex; flex-direction: column; gap: .2rem; }
.hud-label {
  font-family: var(--mono); font-size: .58rem;
  letter-spacing: .3em; text-transform: uppercase; color: var(--fog);
}
.hud-readout {
  font-family: var(--disp); font-weight: 800;
  font-size: 3rem; line-height: .9; color: var(--white);
  display: flex; align-items: baseline; gap: .4rem;
  font-variant-numeric: tabular-nums;
}
.hud-readout em {
  font-family: var(--mono); font-style: normal;
  font-size: .6rem; letter-spacing: .2em; color: var(--fog);
}
.hud-bar { height: 2px; background: var(--line); overflow: hidden; }
.hud-bar span {
  display: block; height: 100%; width: 0%;
  background: var(--acid); box-shadow: 0 0 8px var(--acid);
}

/* ---- topbar ---- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem 2rem; mix-blend-mode: difference;
}
.topbar-brand {
  font-family: var(--disp); font-weight: 900;
  letter-spacing: .3em; font-size: 1.1rem;
}
.topbar-brand span { color: var(--acid); font-size: .6rem; vertical-align: super; }
.topbar-cta {
  color: var(--white); text-decoration: none;
  font-family: var(--mono); font-size: .62rem;
  letter-spacing: .2em; text-transform: uppercase;
  border: 1px solid var(--line); padding: .55rem 1rem;
  transition: border-color .35s, color .35s;
}
.topbar-cta:hover { border-color: var(--acid); color: var(--acid); }

/* ---- index latéral ---- */
.rail {
  position: fixed; right: 1.6rem; top: 50%; transform: translateY(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: .85rem;
}
.rail a {
  display: flex; align-items: center; gap: .6rem; justify-content: flex-end;
  text-decoration: none; color: var(--fog-dim);
}
.rail-idx {
  font-family: var(--mono); font-size: .58rem; letter-spacing: .1em;
  transition: color .35s;
}
.rail-label {
  font-family: var(--mono); font-size: .55rem;
  letter-spacing: .18em; text-transform: uppercase;
  opacity: 0; transform: translateX(6px); transition: opacity .35s, transform .35s;
}
.rail a:hover .rail-label, .rail a.active .rail-label { opacity: 1; transform: none; }
.rail a.active .rail-idx { color: var(--acid); }

/* ---- média + placeholder ---- */
.media { position: relative; overflow: hidden; background: var(--panel); }
.media video, .media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* iOS : jamais de bouton play natif sur les vidéos d'ambiance */
video::-webkit-media-controls,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0;
}
.media.missing video, .media.missing img { display: none; }
.media.missing::before {
  content: ""; position: absolute; inset: -40%;
  background:
    radial-gradient(ellipse 55% 45% at 35% 60%, rgba(201,250,61,.14), transparent 62%),
    radial-gradient(ellipse 50% 40% at 72% 32%, rgba(60,70,40,.4), transparent 66%),
    linear-gradient(160deg, #121410 0%, #060607 55%, #0e1108 100%);
  animation: drift 20s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(-2%,-1%) scale(1) }
  to { transform: translate(2%,1.5%) scale(1.06) }
}
.media.missing::after {
  content: "◹ " attr(data-prompt) "  ·  " attr(data-asset);
  position: absolute; left: 50%; bottom: 1.8rem; transform: translateX(-50%);
  font-family: var(--mono); font-size: .58rem;
  letter-spacing: .18em; text-transform: uppercase; color: rgba(201,250,61,.6);
  border: 1px solid var(--acid-dim); padding: .5rem 1rem;
  white-space: nowrap; backdrop-filter: blur(3px);
}

/* crochets d'angle */
.bracket::before, .bracket::after {
  content: ""; position: absolute; width: 22px; height: 22px; z-index: 3;
  pointer-events: none;
}
.bracket::before { top: 10px; left: 10px; border-top: 1px solid var(--acid); border-left: 1px solid var(--acid); }
.bracket::after { bottom: 10px; right: 10px; border-bottom: 1px solid var(--acid); border-right: 1px solid var(--acid); }

/* ---- hero ---- */
.hero-pin { height: 320vh; position: relative; }
.hero-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.media-hero { position: absolute; inset: 0; }
.media-hero::after { bottom: 6rem; }
.hero-frame { position: absolute; inset: 1.4rem; z-index: 4; pointer-events: none; }
.hero-frame span { position: absolute; width: 26px; height: 26px; }
.hero-frame span:nth-child(1) { top: 0; left: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.hero-frame span:nth-child(2) { top: 0; right: 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.hero-frame span:nth-child(3) { bottom: 0; left: 0; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.hero-frame span:nth-child(4) { bottom: 0; right: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.hero-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
  background: linear-gradient(to bottom, rgba(6,6,7,.35), transparent 32%, transparent 62%, rgba(6,6,7,.7));
}
.hero-kicker {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .35em; text-transform: uppercase; color: var(--acid);
  margin-bottom: 1.4rem;
}
.hero-title {
  font-family: var(--disp); font-weight: 900;
  font-size: clamp(3.5rem, 18vw, 15rem);
  letter-spacing: .02em; line-height: .82; text-transform: uppercase;
}
.hero-title .ch {
  display: inline-block; opacity: 0; transform: translateY(.5em) skewX(-8deg);
  transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1);
}
.hero-title.in .ch { opacity: 1; transform: none; }
.hero-meta {
  margin-top: 1.8rem; display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center;
  opacity: 0; transition: opacity 1.2s ease 1s;
}
.hero-title.in ~ .hero-meta { opacity: 1; }
.hero-meta span {
  font-family: var(--mono); font-size: .62rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--fog);
}
.hero-meta span + span { position: relative; }
.hero-meta span + span::before {
  content: ""; position: absolute; left: -1rem; top: 50%;
  width: 3px; height: 3px; background: var(--acid); transform: translateY(-50%);
}
.hero-scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  font-family: var(--mono); font-size: .58rem;
  letter-spacing: .25em; text-transform: uppercase; color: var(--fog);
}
.hero-scroll-hint span {
  width: 1px; height: 3rem; background: linear-gradient(to bottom, transparent, var(--acid));
  animation: hint 2s ease-in-out infinite; transform-origin: top;
}
@keyframes hint { 0%,100% { transform: scaleY(.3); opacity: .3 } 50% { transform: scaleY(1); opacity: 1 } }

/* ---- ticker ---- */
.ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; background: var(--panel); padding: 1rem 0;
}
.ticker-track {
  display: inline-flex; align-items: center; gap: 1.6rem; white-space: nowrap;
  animation: marquee 26s linear infinite;
}
.ticker-track span {
  font-family: var(--disp); font-weight: 800; font-size: 1.4rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--white);
}
.ticker-track i { color: var(--acid); font-style: normal; }
@keyframes marquee { from { transform: translateX(0) } to { transform: translateX(-50%) } }

/* ---- sections communes ---- */
section { position: relative; }
.section-kicker {
  font-family: var(--mono); font-size: .64rem;
  letter-spacing: .28em; text-transform: uppercase; color: var(--acid);
  margin-bottom: 1.4rem;
}
.section-title {
  font-family: var(--disp); font-weight: 900;
  font-size: clamp(2.2rem, 6vw, 5rem); line-height: .92;
  letter-spacing: .01em; text-transform: uppercase;
}

/* ---- reveals ---- */
.reveal { opacity: 0; transform: translateY(2rem); transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---- télémétrie ---- */
.specs { padding: 9rem 8vw; display: grid; grid-template-columns: .8fr 1.2fr; gap: 5vw; align-items: center; }
.specs-grid { display: flex; flex-direction: column; gap: 0; }
.spec-row {
  display: grid; grid-template-columns: 1fr auto; gap: .4rem 2rem;
  padding: 1.6rem 0; border-top: 1px solid var(--line); align-items: baseline;
}
.spec-row:nth-child(2) { transition-delay: .08s }
.spec-row:nth-child(3) { transition-delay: .16s }
.spec-row:nth-child(4) { transition-delay: .24s }
.spec-name { font-family: var(--mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--fog); }
.spec-val { font-family: var(--sans); font-size: 1rem; color: var(--white); text-align: right; }
.spec-num { font-family: var(--disp); font-weight: 800; font-size: 2.4rem; color: var(--acid); font-variant-numeric: tabular-nums; }
.spec-bar { grid-column: 1 / -1; height: 2px; background: var(--line); overflow: hidden; margin-top: .4rem; }
.spec-bar i { display: block; height: 100%; width: 0; background: var(--acid); transition: width 1.4s cubic-bezier(.2,.8,.2,1) .2s; }
.spec-row.in .spec-bar i { width: var(--w); }

/* ---- full-bleed ---- */
.bleed { height: 130vh; }
.bleed-media { position: sticky; top: 0; height: 100vh; width: 100%; }
.bleed-media video { will-change: transform; }
.bleed-caption {
  position: sticky; top: 0; height: 100vh; margin-top: -100vh;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
  text-align: left; padding: 0 8vw 8rem; z-index: 5; pointer-events: none;
  background: linear-gradient(to bottom, transparent 55%, rgba(6,6,7,.75));
}
.bleed-title { font-family: var(--disp); font-weight: 900; font-size: clamp(2.4rem, 7vw, 6rem); line-height: .9; text-transform: uppercase; }
.bleed-corner {
  position: absolute; top: 1.4rem; right: 1.4rem; z-index: 6;
  font-family: var(--mono); font-size: .58rem; letter-spacing: .2em;
  color: var(--fog); border: 1px solid var(--line); padding: .4rem .7rem;
}

/* ---- split détail ---- */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 6vw; align-items: center; padding: 10rem 8vw; max-width: 1500px; margin-inline: auto; }
.body-copy { margin-top: 2rem; max-width: 34rem; font-size: .98rem; line-height: 1.85; color: var(--fog); }
.detail-list { margin-top: 2.4rem; list-style: none; }
.detail-list li {
  padding: 1rem 0; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; color: var(--fog);
  display: flex; gap: 1rem;
}
.detail-list li b { color: var(--acid); }
.detail-list li:nth-child(2) { transition-delay: .08s }
.detail-list li:nth-child(3) { transition-delay: .16s }
.detail-list li:nth-child(4) { transition-delay: .24s }
.split-media .media { aspect-ratio: 4 / 5; }
.split-media .media video { will-change: transform; }

/* ---- configurateur ---- */
.config { padding: 8rem 8vw; text-align: center; }
.config-stage { margin-top: 3.5rem; display: flex; flex-direction: column; align-items: center; gap: 2.5rem; }
.config-preview {
  width: min(680px, 90%); aspect-ratio: 16 / 6; position: relative;
  border: 1px solid var(--line); overflow: hidden;
  background:
    radial-gradient(ellipse 70% 120% at 50% 130%, var(--sel, #c9fa3d), transparent 70%),
    linear-gradient(160deg, #131417, #08090a);
  transition: background .6s;
  display: flex; align-items: flex-end; justify-content: flex-start;
}
.config-preview::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 40%, rgba(255,255,255,.06), transparent 70%);
}
.config-preview-name {
  position: relative; z-index: 2; margin: 1.4rem;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--white);
}
.config-chips { display: flex; gap: 1.1rem; flex-wrap: wrap; justify-content: center; }
.chip {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  background: var(--c); border: 1px solid rgba(255,255,255,.2);
  position: relative; transition: transform .3s;
}
.chip:hover { transform: scale(1.12); }
.chip.is-active { box-shadow: 0 0 0 2px var(--void), 0 0 0 3px var(--white); }

/* ---- collection ---- */
.collection { padding: 6rem 8vw 10rem; max-width: 1500px; margin-inline: auto; }
.collection-grid { margin-top: 4rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3vw; }
.car-card:nth-child(2) { transition-delay: .12s; }
.car-card .media { aspect-ratio: 3 / 2; }
.car-card .media img { transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.car-card:hover .media img { transform: scale(1.05); }
.car-badge {
  position: absolute; top: 1rem; left: 1rem; z-index: 4;
  font-family: var(--mono); font-size: .54rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--void); background: var(--acid); padding: .3rem .6rem;
}
.car-info { padding: 1.5rem .3rem 0; }
.car-line { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.car-name { font-family: var(--disp); font-weight: 800; font-size: 1.7rem; text-transform: uppercase; }
.car-price { font-family: var(--disp); font-weight: 700; font-size: 1.3rem; color: var(--acid); white-space: nowrap; }
.car-specs { margin-top: .7rem; font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fog); }

/* ---- contact ---- */
.contact { padding: 0 0 9rem; }
.price-band {
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
  padding: 6rem 8vw; text-align: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.price-tag { font-family: var(--mono); font-size: .64rem; letter-spacing: .25em; text-transform: uppercase; color: var(--fog); }
.price-amount { font-family: var(--disp); font-weight: 900; font-size: clamp(3rem, 10vw, 8rem); line-height: .9; color: var(--white); }
.price-note { font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--fog); }
.contact-inner { max-width: 1300px; margin: 8rem auto 0; padding: 0 8vw; display: grid; grid-template-columns: 1fr 1fr; gap: 7vw; align-items: start; }
.agent { margin-top: 3rem; }
.agent-name { font-family: var(--disp); font-weight: 700; font-size: 1.6rem; text-transform: uppercase; }
.agent-role { margin-top: .3rem; font-family: var(--mono); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--acid); }
.agent-line { margin-top: .9rem; font-family: var(--mono); font-size: .72rem; color: var(--fog); }
.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-form label {
  display: flex; flex-direction: column; gap: .5rem;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--fog);
}
.contact-form input, .contact-form textarea {
  background: var(--panel); border: 1px solid var(--line); padding: .9rem 1rem;
  color: var(--white); font-family: var(--sans); font-size: 1rem; outline: none; resize: none;
  transition: border-color .35s;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--acid); }
.btn-acid {
  margin-top: 1rem; align-self: flex-start; cursor: pointer;
  background: var(--acid); color: var(--void); border: none;
  padding: 1.1rem 2.4rem;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700;
  transition: transform .3s, box-shadow .3s;
}
.btn-acid:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(201,250,61,.25); }
.form-confirm { display: none; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; color: var(--acid); }
.contact-form.sent .form-confirm { display: block; }
.contact-form.sent .btn-acid { display: none; }

/* ---- footer ---- */
.footer { padding: 4rem 8vw 3rem; text-align: center; border-top: 1px solid var(--line); }
.footer-brand { font-family: var(--disp); font-weight: 900; letter-spacing: .3em; font-size: 1rem; }
.footer-brand span { color: var(--acid); font-size: .55rem; vertical-align: super; }
.footer-line { margin-top: 1rem; font-family: var(--mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--fog); }
.footer-legal { margin-top: 1.8rem; font-family: var(--mono); font-size: .56rem; letter-spacing: .08em; color: var(--fog-dim); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .rail { display: none; }
  .hud { left: 1rem; bottom: 1rem; width: 120px; }
  .hud-readout { font-size: 2.2rem; }
  .specs { grid-template-columns: 1fr; gap: 3rem; padding: 7rem 7vw; }
  .split { grid-template-columns: 1fr; padding: 6rem 7vw; }
  .collection-grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
  .bleed { height: 108vh; }
  .bleed-caption { padding: 0 7vw 6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .ticker-track { animation: none; }
  .reveal, .hero-title .ch { transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---- hauteurs mobiles : éviter les sauts dus à la barre d'adresse ---- */
@supports (height: 100svh) {
  .hero-sticky, .bleed-media, .bleed-caption { height: 100svh; }
  .bleed-caption { margin-top: -100svh; }
}
