/* =============================================================================
   NOCTURNE AUTOMOBILES — Showroom d'exception (ord_VYB-2026-4123)
   CSS pur écrit à la main — aucun framework. Mobile-first.
   Direction artistique : univers 100 % sombre, chaque véhicule émerge de
   l'obscurité, révélé par la lumière (glow / réflexions). Ambiance « audacieux ».
   Couleur principale client : #050b1a (déclinée en nuances froides).
   ============================================================================= */

/* ---------- Variables ---------- */
:root {
  --bg: #050b1a;              /* couleur principale du client */
  --bg-2: #070f22;
  --surface: #0b1730;
  --surface-2: #0e1c3a;
  --line: rgba(176, 198, 255, .10);
  --line-strong: rgba(176, 198, 255, .22);

  --text: #eaf0fc;
  --muted: #97a5c4;
  --muted-2: #64708e;

  --light: #dfe8ff;          /* la lumière qui révèle */
  --accent: #8fb2ff;         /* halo froid */
  --accent-soft: rgba(143, 178, 255, .16);

  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --maxw: 1160px;
  --radius: 18px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  /* léger dégradé pour donner de la profondeur au fond */
  background-image:
    radial-gradient(120% 80% at 50% -10%, #0b1a3a 0%, var(--bg) 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; }

::selection { background: rgba(143, 178, 255, .3); color: #fff; }

/* Voile cinématographique : vignette + très léger grain */
.veil {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(130% 100% at 50% 0%, transparent 55%, rgba(0, 0, 0, .55) 100%);
  mix-blend-mode: multiply;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.section { position: relative; z-index: 2; padding: 76px 0; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}

.section-title { font-size: clamp(28px, 6vw, 46px); }

.section-head { max-width: 640px; margin-bottom: 42px; }
.section-note, .section-head .eyebrow { margin-top: 0; }
.section-note { color: var(--muted); margin-top: 14px; font-size: 15px; }

.lede { color: var(--muted); font-size: clamp(16px, 2.6vw, 20px); line-height: 1.7; max-width: 640px; margin-top: 18px; font-weight: 400; }

.accent { color: var(--accent); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 14.5px;
  padding: 14px 26px; border-radius: 100px; cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
  border: 1px solid transparent; white-space: nowrap;
}
.btn-primary {
  background: var(--light); color: #060c1c;
  box-shadow: 0 0 0 rgba(143, 178, 255, 0);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(143, 178, 255, .35);
  background: #fff;
}
.btn-ghost {
  background: transparent; color: var(--text); border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: #fff; transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- En-tête / navigation ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(5, 11, 26, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent) 55%, #21386e 100%);
  box-shadow: 0 0 16px rgba(143, 178, 255, .8);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: .04em; }

.nav-links { display: none; list-style: none; gap: 30px; }
.nav-links a {
  font-size: 14px; color: var(--muted); font-weight: 500; position: relative; padding: 4px 0;
  transition: color .2s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
  background: var(--accent); transition: width .28s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-cta { display: none; padding: 10px 20px; font-size: 13.5px; }

/* ---------- Héro ---------- */
.hero {
  position: relative; z-index: 2;
  min-height: 100svh; display: flex; align-items: center;
  padding: 110px 0 80px; overflow: hidden;
}
/* faisceau de lumière qui révèle */
.hero-light {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(52% 46% at 50% 8%, rgba(143, 178, 255, .28) 0%, transparent 62%),
    radial-gradient(60% 50% at 50% 120%, rgba(45, 80, 160, .22) 0%, transparent 60%);
  animation: lightBreath 9s ease-in-out infinite;
}
@keyframes lightBreath {
  0%, 100% { opacity: .8; }
  50% { opacity: 1; }
}
.hero-inner { position: relative; z-index: 2; text-align: center; }
.hero-title {
  font-size: clamp(42px, 12vw, 104px); font-weight: 800; letter-spacing: -.03em;
  margin: 6px auto 0; max-width: 14ch;
  text-shadow: 0 0 60px rgba(143, 178, 255, .25);
}
.hero-sub { color: var(--muted); font-size: clamp(15px, 2.4vw, 19px); max-width: 560px; margin: 26px auto 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 38px; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3;
  width: 26px; height: 42px; border: 1px solid var(--line-strong); border-radius: 100px;
  display: flex; justify-content: center; padding-top: 8px;
}
.scroll-dot { width: 4px; height: 8px; border-radius: 4px; background: var(--accent); animation: scrollDot 1.8s ease-in-out infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 80%, 100% { opacity: 0; transform: translateY(10px); } }

/* ---------- Le showroom (présentation) ---------- */
.showroom { padding-top: 40px; }

/* ---------- Collection / véhicules ---------- */
.cars { list-style: none; display: grid; grid-template-columns: 1fr; gap: 22px; }

.car {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.car:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: 0 30px 60px rgba(0, 0, 0, .5), 0 0 52px -6px color-mix(in srgb, var(--glow) 50%, transparent); }

/* La « scène » : le véhicule émerge de l'obscurité, révélé par un halo (--glow) */
.car-stage {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: radial-gradient(80% 120% at 50% 0%, color-mix(in srgb, var(--glow) 22%, transparent) 0%, transparent 60%), #04091a;
}
.car-stage::before { /* projecteur (repli CSS, sous la photo) */
  content: ""; position: absolute; left: 50%; top: -40%; width: 150%; height: 150%; z-index: 0;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 45%, transparent) 0%, transparent 100%);
  opacity: .55; transition: opacity .4s var(--ease); filter: blur(2px);
}
/* Photo du véhicule — révélée par la lumière (ratio 16/10, object-fit: cover).
   Repli : opacity:0 par défaut → tant que l'image n'a pas chargé (ou si absente),
   la scène CSS ci-dessus (halo, index, réflexion) reste visible derrière. */
.car-photo {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  filter: brightness(.7) saturate(.85);
  transform: scale(1);
  transition: opacity .5s var(--ease), filter .45s var(--ease), transform .45s var(--ease);
}
.car-photo.is-loaded { opacity: 1; }
.car:hover .car-photo.is-loaded { filter: brightness(1) saturate(1); transform: scale(1.05); }
.car:hover .car-stage::before { opacity: .9; }
.car-index {
  position: absolute; left: 20px; top: 16px; z-index: 3;
  font-family: var(--font-display); font-weight: 800; font-size: 40px;
  color: transparent; -webkit-text-stroke: 1px rgba(180, 200, 255, .35);
  letter-spacing: .02em;
}
.stage-floor { /* réflexion au sol (au-dessus de la photo) */
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 2;
  background: linear-gradient(90deg, transparent, var(--glow), transparent);
  box-shadow: 0 0 26px 3px color-mix(in srgb, var(--glow) 50%, transparent);
  opacity: .7;
}

.car-body { padding: 22px 24px 26px; position: relative; z-index: 2; }
.car-tint {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.swatch {
  width: 15px; height: 15px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .55), var(--sw) 60%);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, .6);
}
.car-name { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.car-desc { color: var(--muted); font-size: 15px; line-height: 1.65; }

/* ---------- Contact ---------- */
.contact { position: relative; text-align: center; padding: 96px 0 92px; overflow: hidden; }
.contact-light {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(46% 60% at 50% 45%, rgba(143, 178, 255, .2) 0%, transparent 62%);
}
.contact-inner { position: relative; z-index: 2; }
.contact .lede { margin-left: auto; margin-right: auto; }
.contact-actions { margin-top: 34px; }
.contact-loc {
  margin-top: 30px; font-family: var(--font-display); font-size: 12.5px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted-2);
}

/* ---------- Pied de page ---------- */
.site-footer { position: relative; z-index: 2; border-top: 1px solid var(--line); padding: 34px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.footer-brand { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: .04em; }
.footer-legal { color: var(--muted-2); font-size: 13px; }
.footer-credit { color: var(--muted-2); font-size: 12px; letter-spacing: .1em; opacity: .8; }
.footer-credit a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.footer-credit a:hover { color: var(--accent); }

/* ---------- Animations de révélation au scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
/* léger décalage en cascade pour les cartes voisines */
.cars .car:nth-child(2) { transition-delay: .05s; }
.cars .car:nth-child(3) { transition-delay: .1s; }
.cars .car:nth-child(4) { transition-delay: .15s; }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .cars { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .section { padding: 100px 0; }
  .car-body { padding: 26px 28px 30px; }
}
@media (min-width: 1100px) {
  .cars { gap: 26px; }
}

/* ---------- Accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .car:hover .car-photo.is-loaded { transform: none; } /* pas de zoom, juste le fond (brightness) */
}
