/* Lounge Car — 100% immersif, zéro typographie */

:root {
  --near-black: #0A0A0B;
  --off-white: #F5F5F0;
  --race-red: #C8102E;
}

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

html { scroll-behavior: auto; }

body {
  background: var(--near-black);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Preloader ---------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* la vidéo du logo est sur fond noir : fondu circulaire pour l'intégrer */
#preloader-logo {
  width: min(72vw, 420px);
  height: auto;
  display: block;
  -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 78%);
  mask-image: radial-gradient(circle, #000 55%, transparent 78%);
}

#preloader-bar {
  width: min(46vw, 220px);
  height: 2px;
  background: rgba(245, 245, 240, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

#preloader-bar-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--race-red);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}

/* ---------- Grain film ---------- */
#grain {
  position: fixed;
  inset: -100%;
  z-index: 50;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* ---------- Stage fixe + pistes de scroll ---------- */
#stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

#stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
}

#stage #canvas1 { opacity: 1; }

/* pistes invisibles : donnent la hauteur de scroll de chaque séquence */
.seq {
  position: relative;
  height: 300vh;
}

/* ---------- Typographie copy ---------- */
#copy-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.copy {
  position: absolute;
  max-width: min(560px, 86vw);
  color: var(--off-white);
  opacity: 0;
}

.copy .eyebrow,
#contact .eyebrow {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(0.62rem, 1.1vw, 0.78rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--race-red);
  margin-bottom: 1rem;
}

.copy h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4.4rem, 13vw, 9.5rem);
  line-height: 0.92;
  letter-spacing: 0.03em;
  font-weight: 400;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45);
}

.copy .baseline {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(1rem, 2vw, 1.3rem);
  letter-spacing: 0.06em;
  margin-top: 1.1rem;
  color: rgba(245, 245, 240, 0.9);
}

.copy .num {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(0.66rem, 1.1vw, 0.8rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--race-red);
  margin-bottom: 0.9rem;
}

.copy h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0.02em;
  font-weight: 400;
  margin-bottom: 1rem;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
}

.copy p {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(0.92rem, 1.5vw, 1.05rem);
  line-height: 1.65;
  color: rgba(245, 245, 240, 0.88);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.55);
}

.copy .brands {
  margin-top: 1rem;
  font-size: clamp(0.7rem, 1.1vw, 0.8rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 245, 240, 0.55);
}

.copy .stars {
  margin-top: 1rem;
  font-size: clamp(0.85rem, 1.3vw, 0.95rem);
  color: rgba(245, 245, 240, 0.85);
}

.copy .stars::first-letter { color: var(--race-red); }

.copy-hero {
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 1; /* visible au chargement — son tween ne rend qu'une fois le scroll dans sa fenêtre */
}

.copy-left  { left: clamp(1.4rem, 7vw, 7rem); bottom: clamp(5rem, 16vh, 9rem); }
.copy-right { right: clamp(1.4rem, 7vw, 7rem); bottom: clamp(5rem, 16vh, 9rem); text-align: right; }

@media (max-width: 640px) {
  .copy-left, .copy-right {
    left: 1.2rem; right: 1.2rem; bottom: 4.4rem; text-align: left;
  }
}

/* ---------- Section finale ---------- */
#contact {
  position: relative;
  z-index: 5; /* passe au-dessus du stage fixe en fin de scroll */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  background: var(--near-black);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

#contact h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0.03em;
  font-weight: 400;
  color: var(--off-white);
}

#agences {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

#agences li {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(0.72rem, 1.2vw, 0.84rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 245, 240, 0.75);
  border: 1px solid rgba(245, 245, 240, 0.18);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
}

/* ---------- CTA voiture ---------- */
#car-cta {
  position: relative;
  display: block;
  width: min(520px, 88vw);
  margin-top: 1.6rem;
  color: var(--off-white);
  text-decoration: none;
  outline: none;
}

#car-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1), filter 0.45s ease;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.55));
}

#car-road {
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 3.6rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 245, 240, 0.35) 20%, rgba(245, 245, 240, 0.35) 80%, transparent);
}

#car-smoke { position: absolute; left: 10%; bottom: 4rem; pointer-events: none; }

#car-smoke i {
  position: absolute;
  bottom: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 245, 240, 0.5), rgba(245, 245, 240, 0));
  opacity: 0;
}

#car-cta-label {
  display: block;
  margin-top: 1.1rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(0.8rem, 1.4vw, 0.95rem);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--off-white);
  transition: color 0.3s ease;
}

#car-cta-label em {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  font-weight: 300;
  font-size: 0.72em;
  letter-spacing: 0.18em;
  color: rgba(245, 245, 240, 0.5);
}

#car-cta:hover #car-img,
#car-cta:focus-visible #car-img {
  transform: translateX(12px);
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.6)) drop-shadow(0 6px 34px rgba(200, 16, 46, 0.45));
}

#car-cta:hover #car-cta-label { color: var(--race-red); }

/* ---------- CTA voiture flottant (immersif) ---------- */
#mini-cta {
  position: fixed;
  right: clamp(1rem, 2.6vw, 2.2rem);
  bottom: clamp(1rem, 3vh, 1.8rem);
  z-index: 45;
  width: clamp(120px, 14vw, 190px);
  text-decoration: none;
  opacity: 0.88;
  transition: opacity 0.35s ease;
}

#mini-cta:hover,
#mini-cta:focus-visible { opacity: 1; }

#mini-cta.gone { opacity: 0; pointer-events: none; }

#mini-cta .mini-car {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.55));
  transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1), filter 0.45s ease;
}

#mini-cta:hover .mini-car,
#mini-cta:focus-visible .mini-car {
  transform: translateX(8px);
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.6)) drop-shadow(0 4px 22px rgba(200, 16, 46, 0.45));
}

#mini-cta .mini-road {
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 1.15rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 245, 240, 0.35) 20%, rgba(245, 245, 240, 0.35) 80%, transparent);
}

#mini-cta .mini-smoke { position: absolute; left: 8%; bottom: 1.3rem; pointer-events: none; }

#mini-cta .mini-smoke i {
  position: absolute;
  bottom: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 245, 240, 0.5), rgba(245, 245, 240, 0));
  opacity: 0;
}

#mini-cta .mini-label {
  display: block;
  margin-top: 0.45rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(0.52rem, 0.85vw, 0.62rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(245, 245, 240, 0.75);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
  transition: color 0.3s ease;
}

#mini-cta:hover .mini-label { color: var(--race-red); }

/* état lancement (au clic) — animé en JS/GSAP */
#launch-veil {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--near-black);
  opacity: 0;
  pointer-events: none;
}

#contact-links { margin-top: 1.2rem; }

#contact-links a {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: rgba(245, 245, 240, 0.55);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 245, 240, 0.25);
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

#contact-links a:hover { color: var(--off-white); border-color: var(--race-red); }

/* ---------- Indicateur scroll ---------- */
#scroll-hint {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: 1px;
  height: 56px;
  background: rgba(245, 245, 240, 0.15);
  overflow: hidden;
  transition: opacity 0.6s ease;
}

#scroll-hint span {
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--off-white);
  animation: hint-drop 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes hint-drop {
  0% { top: -50%; }
  100% { top: 110%; }
}

#scroll-hint.hidden { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  #grain, #scroll-hint span, #contact-cta::before { animation: none; }
}
