/* ============================================================
   Versailles Motors — site vitrine
   ============================================================ */

:root {
  --bg: #070608;
  --bg-soft: #0d0c0f;
  --surface: #131216;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f5f5f7;
  --muted: #9d9da4;
  --faint: #6e6e76;
  --red: #e10613;
  --serif: "Bodoni Moda", Didot, "Playfair Display", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.21, 1);
  --radius: 22px;
}

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

/* le défilement doux n'est activé qu'après le chargement (saut d'ancre initial instantané) */
html.smooth { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--red); color: #fff; }

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

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

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 300;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 99px;
}
.skip:focus { left: 8px; }

.container { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }

/* ------------------------------------------------------------
   Texture de grain + halo curseur
   ------------------------------------------------------------ */

.grain {
  position: fixed; inset: -6%; z-index: 240; pointer-events: none; opacity: 0.05;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(1) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  12% { transform: translate(-2.5%, 1.8%); }
  25% { transform: translate(1.8%, -2.5%); }
  37% { transform: translate(-1.6%, -1.8%); }
  50% { transform: translate(2.4%, 1.2%); }
  62% { transform: translate(-1.2%, 2.4%); }
  75% { transform: translate(1.8%, 1.8%); }
  87% { transform: translate(-2.4%, -1.2%); }
}

.cursor-halo {
  position: fixed; left: 0; top: 0; width: 700px; height: 700px;
  z-index: 55; pointer-events: none; border-radius: 50%;
  opacity: 0; transition: opacity 1.2s ease;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.05), rgba(225, 6, 19, 0.022) 45%, transparent 70%);
  mix-blend-mode: screen;
}
.cursor-halo.on { opacity: 1; }

/* ------------------------------------------------------------
   Navigation
   ------------------------------------------------------------ */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 6, 8, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border-color: var(--line);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__brand img { width: 36px; height: 36px; transition: transform 0.6s var(--ease); }
.nav__brand:hover img { transform: rotate(-8deg) scale(1.06); }
.nav__brand span {
  font-family: var(--serif); font-size: 15px; letter-spacing: 0.32em;
  font-weight: 500; white-space: nowrap;
}
/* MOTORS fait partie du nom : même style que VERSAILLES */
.nav__brand span em { font-style: normal; }

.nav__links { display: flex; align-items: center; gap: 34px; }
.nav__links a {
  font-size: 13px; font-weight: 400; letter-spacing: 0.08em; color: var(--muted);
  transition: color 0.3s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:not(.nav__lbc) { position: relative; }
.nav__links a:not(.nav__lbc)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 100%;
  background: var(--text); transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav__links a:not(.nav__lbc):hover::after { transform: scaleX(1); transform-origin: left; }
.nav__links .nav__lbc {
  color: var(--text); border: 1px solid var(--line); border-radius: 99px;
  padding: 8px 16px; transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav__links .nav__lbc:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.05); }

@media (max-width: 760px) {
  .nav__links a:not(.nav__lbc) { display: none; }
  .nav__brand span { letter-spacing: 0.22em; font-size: 13px; }
  .nav__links .nav__lbc { white-space: nowrap; }
}
@media (max-width: 440px) {
  .nav__brand span em { display: none; }
}

/* ------------------------------------------------------------
   Héro
   ------------------------------------------------------------ */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  text-align: center;
  isolation: isolate;
  padding: 120px 24px 90px;
  overflow: hidden;
  perspective: 1200px;
}

/* halos vivants */
.hero__halo { position: absolute; z-index: -2; border-radius: 50%; pointer-events: none; }
.hero__halo--top {
  left: 50%; top: -24%; width: 1150px; height: 820px; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.075), transparent 70%);
  animation: breathe 11s ease-in-out infinite alternate;
}
.hero__halo--red {
  left: 50%; bottom: -32%; width: 1350px; height: 950px; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(225, 6, 19, 0.15), transparent 72%);
  animation: drift 17s ease-in-out infinite alternate;
}
@keyframes breathe {
  from { opacity: 0.65; scale: 1; }
  to { opacity: 1; scale: 1.14; }
}
@keyframes drift {
  from { translate: -57% 0; opacity: 0.75; }
  to { translate: -43% 2%; opacity: 1; }
}

/* filigrane monogramme en 3D flottante */
.hero__mark {
  position: absolute; z-index: -1; right: -150px; top: 50%;
  width: 640px; height: 640px; opacity: 0.05; pointer-events: none;
  animation: markfloat 16s ease-in-out infinite alternate;
}
.hero__mark img { width: 100%; height: 100%; }
@keyframes markfloat {
  from { transform: translateY(-50%) rotate3d(0.1, 1, 0, -13deg); }
  to { transform: translateY(-50%) rotate3d(0.1, 1, 0, 13deg); }
}

.hero__eyebrow {
  font-size: 12px; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 34px; font-weight: 400;
}

/* VERSAILLES et MOTORS : même police, même taille — c'est le nom complet */
.hero__title, .hero__motors {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(36px, 9.2vw, 122px);
  letter-spacing: 0.16em; text-indent: 0.16em; /* compense la dernière lettre */
  line-height: 1.04;
  color: var(--text);
  perspective: 900px;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .hero__title, .hero__motors { letter-spacing: 0.1em; text-indent: 0.1em; }
}
/* apparition lettre à lettre (spans créés en JS) */
.fx .hero__title:not(.split), .fx .hero__motors:not(.split) { opacity: 0; }
.hero__title .ltr, .hero__motors .ltr {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.34em) rotateX(56deg) scale(1.05);
  transform-origin: 50% 100%;
  filter: blur(10px);
  animation: ltr 1.15s var(--ease) forwards;
  will-change: transform, filter;
}
@keyframes ltr {
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* filet rouge + monogramme qui se dessine */
.hero__rule {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(12px, 2.2vw, 22px);
  /* espacement réduit sur mobile, ample sur grand écran */
  margin: clamp(10px, 2.4vw, 26px) auto clamp(8px, 2vw, 22px);
  width: min(560px, 80%);
}
.hero__rule::before, .hero__rule::after {
  content: ""; height: 1px; flex: 1;
  transform: scaleX(0);
  animation: ruleline 1.1s var(--ease) 1.05s forwards;
}
.hero__rule::before {
  background: linear-gradient(90deg, transparent, var(--red));
  transform-origin: right;
}
.hero__rule::after {
  background: linear-gradient(90deg, var(--red), transparent);
  transform-origin: left;
}
@keyframes ruleline { to { transform: scaleX(1); } }

.vm-draw { width: clamp(44px, 5.8vw, 84px); height: clamp(44px, 5.8vw, 84px); display: block; }
.vm-draw__strokes * { fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 1.5; }
.vm-draw__strokes .s1 { stroke-dasharray: 425; stroke-dashoffset: 425; animation: vmdraw 1.1s var(--ease) 0.80s forwards; }
.vm-draw__strokes .s2 { stroke-dasharray: 550; stroke-dashoffset: 550; animation: vmdraw 1.1s var(--ease) 0.95s forwards; }
.vm-draw__strokes .s3 { stroke-dasharray: 400; stroke-dashoffset: 400; animation: vmdraw 1.1s var(--ease) 1.10s forwards; }
.vm-draw__strokes .s4 { stroke-dasharray: 400; stroke-dashoffset: 400; animation: vmdraw 1.1s var(--ease) 1.25s forwards; }
.vm-draw__strokes .s5 { stroke-dasharray: 330; stroke-dashoffset: 330; animation: vmdraw 1.1s var(--ease) 1.40s forwards; }
@keyframes vmdraw { to { stroke-dashoffset: 0; } }
.vm-draw__fills { opacity: 0; animation: vmfill 0.9s ease 1.95s forwards; }
.vm-draw__reds { opacity: 0; animation: vmfill 0.6s ease 2.3s forwards; }
@keyframes vmfill { to { opacity: 1; } }

.hero__tagline {
  /* signature de marque : courte, lumineuse, posée */
  max-width: 720px; margin: 36px auto 0;
  color: #e7e7ec; font-weight: 300; line-height: 1.45;
  font-size: clamp(20px, 2.7vw, 30px); letter-spacing: 0.012em;
}
.hero__cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 42px; }

.hero__scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  color: var(--faint); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; animation: rise 1.2s var(--ease) 2.4s forwards;
}
.hero__scroll::after {
  content: ""; width: 1px; height: 34px;
  background: linear-gradient(180deg, var(--faint), transparent);
  animation: drip 2.2s var(--ease) infinite;
}
@keyframes drip {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@media (max-height: 840px) {
  .hero__scroll { display: none; }
}

/* entrée chorégraphiée du héro */
.hero [data-stagger] {
  opacity: 0; transform: translateY(26px);
  animation: rise 1.15s var(--ease) forwards;
}
.hero [data-stagger="1"] { animation-delay: 0.1s; }
.hero [data-stagger="4"] { animation-delay: 1.3s; }
.hero [data-stagger="5"] { animation-delay: 1.55s; }
.hero [data-stagger="6"] { animation-delay: 1.8s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------
   Boutons
   ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0.04em;
  padding: 14px 28px; border-radius: 99px; cursor: pointer; border: 1px solid transparent;
  position: relative; overflow: hidden;
  transition: transform 0.45s var(--ease), background 0.35s var(--ease),
    border-color 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.45s var(--ease),
    translate 0.4s var(--ease);
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--text); color: #0a0a0c; }
.btn--primary:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 14px 40px rgba(255, 255, 255, 0.12); }
.btn--ghost { border-color: rgba(255, 255, 255, 0.22); color: var(--text); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.04); transform: translateY(-2px); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: #f31523; transform: translateY(-2px); box-shadow: 0 14px 40px rgba(225, 6, 19, 0.25); }
.btn--big { padding: 17px 36px; font-size: 15px; }

/* balayage lumineux au survol */
.btn--primary::before, .btn--red::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  transform: translateX(-130%) skewX(-18deg);
  transition: transform 0.85s var(--ease);
}
.btn--primary::before { background: linear-gradient(105deg, transparent 35%, rgba(0, 0, 0, 0.10) 50%, transparent 65%); }
.btn--red::before { background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%); }
.btn--primary:hover::before, .btn--red:hover::before { transform: translateX(130%) skewX(-18deg); }

/* ------------------------------------------------------------
   Sections
   ------------------------------------------------------------ */

.section { padding: 130px 0; position: relative; }

.eyebrow {
  font-size: 12px; letter-spacing: 0.38em; text-transform: uppercase;
  color: var(--red); font-weight: 500; margin-bottom: 22px;
}
.section__head { max-width: 720px; margin-bottom: 70px; }
.section__head h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 5vw, 58px); line-height: 1.12; letter-spacing: 0.01em;
}
.section__head h2 em { font-style: italic; color: var(--muted); }
.section__head .lede { color: var(--muted); margin-top: 24px; max-width: 560px; font-size: 17px; }

/* révélation au défilement */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* titres balayés par un masque */
.clip-r {
  clip-path: inset(0 0 110% 0);
  transform: translateY(22px);
  transition: clip-path 1.25s var(--ease) 0.1s, transform 1.25s var(--ease) 0.1s;
}
.reveal.in .clip-r, .reveal.in.clip-r { clip-path: inset(-4% 0 -12% 0); transform: none; }

/* ------------------------------------------------------------
   Véhicules
   ------------------------------------------------------------ */

.cars { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.cars .car:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
@media (max-width: 860px) { .cars { grid-template-columns: 1fr; } }

.car {
  position: relative; cursor: pointer;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
  transform-style: preserve-3d;
}
.car:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.car:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.car__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0a0a0c; }
.cars .car:first-child:nth-last-child(odd) .car__media { aspect-ratio: 21 / 9; }
.car__media img {
  width: 100%; height: 100%; object-fit: cover;
  scale: 1.12;
  translate: 0 var(--py, 0px);
  transition: scale 1.5s var(--ease);
}
.car:hover .car__media img { scale: 1.18; }
.car__media::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 55%, rgba(7, 6, 8, 0.55));
}
/* rideau d'apparition de l'image */
.car__media::before {
  content: ""; position: absolute; inset: -1px; z-index: 3;
  background: linear-gradient(180deg, #0c0b0e, #070608);
  transform-origin: bottom;
  transition: transform 1.05s var(--ease) 0.15s;
}
.car.in .car__media::before { transform: scaleY(0); }

/* reflet qui suit la souris */
.car__glare {
  position: absolute; inset: 0; z-index: 2; opacity: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.13), transparent 60%);
  transition: opacity 0.5s var(--ease);
}
.car:hover .car__glare { opacity: 1; }

.car__badge {
  position: absolute; top: 18px; left: 18px; z-index: 2;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500;
  padding: 8px 14px; border-radius: 99px;
  background: rgba(7, 6, 8, 0.65); border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.car__badge--sold { background: rgba(225, 6, 19, 0.82); border-color: transparent; }

.car--sold .car__media img { filter: grayscale(0.6) brightness(0.7); }

/* voiture vendue : le nom du modèle devient « VENDU » */
.car__title--vendu {
  color: var(--red); letter-spacing: 0.16em; text-indent: 0.16em;
}

.car__body { padding: 26px 28px 30px; }
/* entrée en cascade du contenu de la carte */
.car__body > * {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.car.in .car__body > * { opacity: 1; transform: none; }
.car.in .car__body > *:nth-child(1) { transition-delay: 0.3s; }
.car.in .car__body > *:nth-child(2) { transition-delay: 0.38s; }
.car.in .car__body > *:nth-child(3) { transition-delay: 0.46s; }
.car.in .car__body > *:nth-child(4) { transition-delay: 0.54s; }

.car__line { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.car__title { font-family: var(--serif); font-weight: 500; font-size: 27px; letter-spacing: 0.015em; }
.car__price { font-size: 21px; font-weight: 500; letter-spacing: 0.02em; white-space: nowrap; }
.car__sub { color: var(--muted); font-size: 15px; margin-top: 6px; }

.car__specs {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px;
}
.car__specs li {
  font-size: 12.5px; color: var(--muted); letter-spacing: 0.04em;
  border: 1px solid var(--line); border-radius: 99px; padding: 6px 13px;
}
.car__cta {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--text);
}
.car__cta::after { content: "→"; transition: transform 0.4s var(--ease); color: var(--red); }
.car:hover .car__cta::after { transform: translateX(5px); }

/* état vide / squelette */
.cars-empty {
  grid-column: 1 / -1; text-align: center; padding: 90px 24px;
  border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted);
}
.cars-empty h3 { font-family: var(--serif); font-size: 30px; font-weight: 500; color: var(--text); margin-bottom: 12px; }

.skeleton { border-radius: var(--radius); aspect-ratio: 16 / 10; background: linear-gradient(100deg, #0d0c0f 40%, #141318 50%, #0d0c0f 60%); background-size: 200% 100%; animation: shimmer 1.6s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

.cars__note { margin-top: 46px; text-align: center; color: var(--faint); font-size: 14px; }
.cars__note a { color: var(--muted); border-bottom: 1px solid var(--line); transition: color 0.3s, border-color 0.3s; }
.cars__note a:hover { color: var(--text); border-color: var(--text); }

/* ------------------------------------------------------------
   Ruban défilant
   ------------------------------------------------------------ */

.marquee {
  overflow: hidden; padding: 26px 0 64px;
  user-select: none; pointer-events: none;
}
.marquee__track {
  display: flex; width: max-content;
  animation: marquee 38s linear infinite;
  will-change: transform;
}
.marquee__track span {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(54px, 7.5vw, 106px);
  letter-spacing: 0.1em; white-space: nowrap; padding-right: 0.55em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.14);
}
.marquee__track span i {
  font-style: normal; color: var(--red); -webkit-text-stroke: 0; opacity: 0.6;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------
   La maison (valeurs)
   ------------------------------------------------------------ */

.values { background: var(--bg-soft); border-block: 1px solid var(--line); overflow: hidden; }
.values::after {
  content: ""; position: absolute; right: -18%; top: -32%;
  width: 820px; height: 820px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(225, 6, 19, 0.07), transparent 70%);
  animation: breathe 13s ease-in-out infinite alternate;
}
.values .container { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: start; position: relative; z-index: 1; }
@media (max-width: 900px) { .values .container { grid-template-columns: 1fr; gap: 50px; } }

.values__statement {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(30px, 4.2vw, 46px); line-height: 1.22;
  position: sticky; top: 110px;
}
@media (max-width: 900px) {
  .values__statement { position: static; }
}
.values__statement em { font-style: italic; color: var(--red); }
/* révélation mot à mot pilotée par le défilement */
.values__statement .w { opacity: 0.15; transition: opacity 0.45s var(--ease); }
.values__statement .w.on { opacity: 1; }
.values__statement .w--em { font-style: italic; color: var(--red); }

.values__list { display: grid; gap: 0; }
.value { padding: 34px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 64px 1fr; gap: 18px; }
.value:last-child { border-bottom: 1px solid var(--line); }
.value__num { font-family: var(--serif); font-size: 19px; color: var(--faint); padding-top: 3px; }
.value h3 { font-size: 19px; font-weight: 500; margin-bottom: 8px; letter-spacing: 0.01em; }
.value p { color: var(--muted); font-size: 15.5px; }

/* ------------------------------------------------------------
   Bandeau leboncoin
   ------------------------------------------------------------ */

.lbc { padding: 150px 0; text-align: center; position: relative; overflow: hidden; }
.lbc::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(46% 60% at 50% 115%, rgba(225, 6, 19, 0.17), transparent 75%);
  pointer-events: none;
  transform-origin: 50% 100%;
  animation: lbcpulse 9s ease-in-out infinite alternate;
}
@keyframes lbcpulse {
  from { opacity: 0.7; transform: scale(1); }
  to { opacity: 1; transform: scale(1.08); }
}
.lbc h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(36px, 5.6vw, 64px); line-height: 1.1; margin-bottom: 22px;
}
.lbc p { color: var(--muted); max-width: 480px; margin: 0 auto 40px; }
.lbc small { display: block; margin-top: 22px; color: var(--faint); font-size: 13px; letter-spacing: 0.04em; }

/* ------------------------------------------------------------
   Contact
   ------------------------------------------------------------ */

.contact { overflow: hidden; }
.contact::before {
  content: ""; position: absolute; left: -20%; top: -25%;
  width: 700px; height: 700px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.045), transparent 70%);
  animation: breathe 12s ease-in-out infinite alternate;
}
.contact .container { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; position: relative; z-index: 1; }
@media (max-width: 900px) { .contact .container { grid-template-columns: 1fr; gap: 50px; } }

.contact h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.15; }
.contact__intro { color: var(--muted); margin-top: 22px; max-width: 420px; }
.contact__list { display: grid; gap: 0; }
.contact__item { padding: 26px 0; border-top: 1px solid var(--line); display: grid; gap: 5px; }
.contact__item:last-child { border-bottom: 1px solid var(--line); }
.contact__item span { font-size: 11.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint); }
.contact__item a, .contact__item p { font-size: 21px; font-weight: 300; color: var(--text); transition: color 0.3s; }
.contact__item a:hover { color: var(--red); }
/* cascade d'apparition des coordonnées */
.contact__item[hidden] { display: none; }
.contact__list .contact__item { opacity: 0; transform: translateX(28px); transition: opacity 0.85s var(--ease), transform 0.85s var(--ease); }
.contact__list.in .contact__item { opacity: 1; transform: none; }
.contact__list.in .contact__item:nth-child(1) { transition-delay: 0.05s; }
.contact__list.in .contact__item:nth-child(2) { transition-delay: 0.13s; }
.contact__list.in .contact__item:nth-child(3) { transition-delay: 0.21s; }
.contact__list.in .contact__item:nth-child(4) { transition-delay: 0.29s; }
.contact__list.in .contact__item:nth-child(5) { transition-delay: 0.37s; }

/* ------------------------------------------------------------
   Pied de page
   ------------------------------------------------------------ */

.footer { border-top: 1px solid var(--line); padding: 60px 0 50px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand img { width: 30px; height: 30px; opacity: 0.9; }
.footer__brand span { font-family: var(--serif); letter-spacing: 0.3em; font-size: 13px; }
.footer__links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer__links a { color: var(--faint); font-size: 13px; transition: color 0.3s; }
.footer__links a:hover { color: var(--text); }
.footer__copy { width: 100%; margin-top: 34px; color: var(--faint); font-size: 12.5px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer__copy a { color: inherit; }
.footer__copy a:hover { color: var(--muted); }

/* ------------------------------------------------------------
   Fiche véhicule (overlay)
   ------------------------------------------------------------ */

.overlay { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; perspective: 1400px; }
.overlay[hidden] { display: none; }
.overlay__backdrop {
  position: absolute; inset: 0; background: rgba(4, 4, 6, 0.78);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  animation: fadein 0.45s var(--ease);
}
@keyframes fadein { from { opacity: 0; } }

.overlay__panel {
  position: relative; width: min(1060px, 100%); max-height: calc(100svh - 40px);
  overflow-y: auto; overscroll-behavior: contain;
  background: #0e0d11; border: 1px solid var(--line); border-radius: 26px;
  box-shadow: 0 60px 140px rgba(0, 0, 0, 0.7);
  animation: panelin 0.65s var(--ease);
  scrollbar-width: thin;
}
@keyframes panelin {
  from { opacity: 0; transform: translateY(42px) scale(0.965) rotateX(4deg); }
}

.overlay__close {
  position: sticky; top: 16px; margin-left: calc(100% - 60px); z-index: 5;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(10, 10, 13, 0.7); color: var(--text); font-size: 17px; cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background 0.3s, transform 0.3s;
  display: grid; place-items: center; line-height: 1;
}
.overlay__close:hover { background: rgba(255, 255, 255, 0.12); transform: rotate(90deg); }

.gallery {
  padding: 0 26px; margin-top: -26px;
  opacity: 0; transform: translateY(16px);
  animation: ovr 0.8s var(--ease) 0.1s forwards;
}
.gallery__main { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; background: #0a0a0c; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s ease; cursor: zoom-in; }
.gallery__main video { width: 100%; height: 100%; object-fit: cover; background: #000; display: block; }
/* compteur de médias */
.gallery__count {
  position: absolute; left: 14px; bottom: 14px; z-index: 3;
  font-size: 12px; font-weight: 500; letter-spacing: 0.06em; color: #fff;
  padding: 6px 12px; border-radius: 99px; background: rgba(7, 6, 8, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.gallery__count:empty { display: none; }
/* bouton plein écran */
.gallery__expand {
  position: absolute; right: 14px; bottom: 14px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(7, 6, 8, 0.55); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: grid; place-items: center; transition: background 0.3s, transform 0.3s;
}
.gallery__expand:hover { background: rgba(225, 6, 19, 0.85); transform: scale(1.06); }
.gallery__expand[hidden] { display: none; }
.gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(7, 6, 8, 0.55); color: #fff; cursor: pointer; font-size: 16px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background 0.3s; display: grid; place-items: center;
}
.gallery__nav:hover { background: rgba(225, 6, 19, 0.8); }
.gallery__nav--prev { left: 14px; }
.gallery__nav--next { right: 14px; }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumbs button {
  flex: 0 0 88px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: none; cursor: pointer; padding: 0;
  opacity: 0.55; transition: opacity 0.3s, border-color 0.3s;
}
.gallery__thumbs button.active { opacity: 1; border-color: var(--red); }
.gallery__thumbs button img { width: 100%; height: 100%; object-fit: cover; }
/* vignette vidéo */
.gallery__thumbs button.is-video {
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #1c1c22, #0a0a0c);
}
.gallery__thumbs button.is-video .thumb-play {
  color: #fff; font-size: 18px; line-height: 1;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(225, 6, 19, 0.85); padding-left: 2px;
}

/* ------------------------------------------------------------
   Visionneuse plein écran (photos)
   ------------------------------------------------------------ */

.lightbox {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(3, 3, 5, 0.94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fadein 0.3s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox__img {
  max-width: 94vw; max-height: 90vh; object-fit: contain;
  border-radius: 6px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  animation: lbin 0.4s var(--ease);
}
@keyframes lbin { from { opacity: 0; transform: scale(0.97); } }
.lightbox__close {
  position: absolute; top: 22px; right: 24px; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(20, 20, 24, 0.6); color: #fff;
  display: grid; place-items: center; transition: background 0.3s, transform 0.3s;
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.14); transform: rotate(90deg); }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer; font-size: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(20, 20, 24, 0.5); color: #fff;
  display: grid; place-items: center; transition: background 0.3s;
}
.lightbox__nav:hover { background: rgba(225, 6, 19, 0.85); }
.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }
.lightbox__count {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-size: 13px; letter-spacing: 0.08em; color: #e7e7ec;
  padding: 7px 16px; border-radius: 99px; background: rgba(20, 20, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.lightbox__count:empty { display: none; }
@media (max-width: 700px) {
  .lightbox__nav { width: 44px; height: 44px; }
  .lightbox__nav--prev { left: 10px; }
  .lightbox__nav--next { right: 10px; }
}

.overlay__info { padding: 34px 40px 46px; }
@media (max-width: 700px) { .overlay__info { padding: 28px 22px 38px; } .gallery { padding: 0 14px; } }

/* cascade d'apparition du contenu de la fiche */
.overlay__info > * { opacity: 0; transform: translateY(18px); animation: ovr 0.75s var(--ease) forwards; }
.overlay__info > *:nth-child(1) { animation-delay: 0.2s; }
.overlay__info > *:nth-child(2) { animation-delay: 0.3s; }
.overlay__info > *:nth-child(3) { animation-delay: 0.4s; }
.overlay__info > *:nth-child(4) { animation-delay: 0.5s; }
@keyframes ovr { to { opacity: 1; transform: none; } }

.overlay__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.overlay__head h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.overlay__head .sub { color: var(--muted); margin-top: 8px; font-size: 16px; }
.overlay__price { text-align: right; }
.overlay__price strong { display: block; font-size: clamp(24px, 3.4vw, 34px); font-weight: 500; letter-spacing: 0.02em; }
.overlay__price span { color: var(--faint); font-size: 12.5px; letter-spacing: 0.06em; }

.overlay__sold[hidden] { display: none; }
.overlay__sold {
  display: inline-block; margin-top: 14px;
  font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 500;
  color: #fff; background: var(--red); border-radius: 99px; padding: 8px 16px;
}

.specs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px;
  margin: 34px 0;
}
.spec { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: rgba(255, 255, 255, 0.015); }
.spec span { display: block; font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--faint); margin-bottom: 7px; }
.spec strong { font-weight: 500; font-size: 16.5px; }

.overlay__desc { color: var(--muted); white-space: pre-line; max-width: 700px; font-size: 16px; }
.overlay__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 38px; }

/* ------------------------------------------------------------
   Divers
   ------------------------------------------------------------ */

body.no-scroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .reveal { opacity: 1; transform: none; }
  .hero [data-stagger] { opacity: 1; transform: none; animation: none; }
  .grain, .cursor-halo { display: none; }
  .marquee__track { animation: none; }
  .clip-r { clip-path: none; transform: none; }
  .values__statement .w { opacity: 1; }
}

/* mode sans animations (débogage / captures) : /?static=1 */
.static .reveal,
.static .hero [data-stagger],
.static .hero__scroll,
.static .car__body > *,
.static .contact__list .contact__item,
.static .gallery,
.static .overlay__info > * { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
.static .clip-r { clip-path: none !important; transform: none !important; }
.static .hero__rule::before, .static .hero__rule::after { animation: none; transform: scaleX(1); }
.static .vm-draw__strokes { display: none; }
.static .vm-draw__fills, .static .vm-draw__reds { opacity: 1; animation: none; }
.static .hero__halo, .static .hero__mark, .static .values::after,
.static .contact::before, .static .lbc::before { animation: none; }
.static .car__media::before { display: none; }
.static .values__statement .w { opacity: 1; }
.static .grain, .static .cursor-halo { display: none; }
.static .marquee__track { animation: none; }
.static .hero { min-height: 780px; }
html.static { scroll-behavior: auto; }
