/* CarEasy 229 · la salle d'exposition au défilement.
   Direction : « la porte du garage se lève sur votre route » (référence : Forge Automotive, SOTD Awwwards).
   Couleurs du logo : bleu CarEasy (#0374b0 → #023169) ; la lumière des phares LED en bleu glacier. */
@import url("../fonts/polices.css");

:root {
  --nuit: #050b16;
  --nuit-2: #0b1626;
  --brume: #f2f7fb;
  --ciel: #d9eefa;
  --encre: #0c1e33;
  --acier: #4d6276;
  --bleu: #0569a8;
  --bleu-fonce: #034a7a;
  --glacier: #78d4ff;
  --chrome: #b9c8d6;
  --ligne: rgba(12, 30, 51, .14);
  --panneau: rgba(242, 247, 251, .9);
  --rayon: 22px;
  --rayon-s: 12px;
  --barre: 64px;
  --display: "Anybody", "Arial Narrow", system-ui, sans-serif;
  --texte: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, .8, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: auto; }
body {
  margin: 0; font-family: var(--texte); font-size: 17px; line-height: 1.55; color: var(--encre);
  background: var(--brume); overflow-x: clip; -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--glacier); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- la scène 3D, derrière tout ---------- */
#monde { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; background: var(--brume); }
.page { position: relative; z-index: 1; }

/* ---------- la barre du haut : une bande de bord opaque ---------- */
.haut {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: var(--barre);
  display: flex; align-items: center; gap: 12px; padding: 0 max(16px, env(safe-area-inset-left));
  background: rgba(242, 247, 251, .97); border-bottom: 1px solid var(--ligne);
}
.haut .marque { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.haut .marque img { height: 50px; width: auto; }
.haut .outils { display: flex; gap: 6px; }
.haut .outils button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--ligne); background: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 18px; }
.haut .outils svg { width: 20px; height: 20px; }
.haut nav { display: none; gap: 4px; }
.haut nav a {
  text-decoration: none; padding: 10px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--acier);
  transition: color .2s, background .2s;
}
.haut nav a:hover, .haut nav a[aria-current="page"] { color: var(--encre); background: rgba(5, 105, 168, .08); }
.haut nav a.cta { background: var(--bleu); color: #fff; margin-left: 6px; }
.haut nav a.cta:hover { background: var(--bleu-fonce); color: #fff; }
.burger { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--ligne); background: #fff; }
.burger svg { width: 22px; height: 22px; }
@media (min-width: 980px) {
  .haut nav { display: flex; }
  .haut .outils .burger, .burger { display: none; }
  .action { display: none !important; }
}

/* menu du téléphone */
.tiroir { position: fixed; inset: 0; z-index: 60; background: var(--nuit); color: #fff; padding: 88px 24px 32px;
  display: flex; flex-direction: column; gap: 6px; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.tiroir.ouvert { opacity: 1; pointer-events: auto; }
.tiroir a { font-family: var(--display); font-stretch: 125%; font-weight: 700; font-size: clamp(26px, 8vw, 40px); text-decoration: none;
  padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.tiroir .fermer { position: absolute; top: 12px; right: 16px; width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: none; color: #fff; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px;
  border-radius: 999px; border: 0; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-plein { background: var(--bleu); color: #fff; box-shadow: 0 10px 30px -10px rgba(5, 105, 168, .7), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-plein:hover { background: var(--bleu-fonce); transform: translateY(-2px); }
.btn-wa { background: #fff; color: var(--encre); border: 1px solid var(--ligne); }
.btn-wa svg { color: #1a8f4c; }
.btn-wa:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -14px rgba(12,30,51,.4); }
.btn-clair { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.28); }

/* ---------- la barre d'action du téléphone : bande de bord opaque ---------- */
.action {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(242, 247, 251, .98); border-top: 1px solid var(--ligne);
}
.action .btn { flex: 1; min-height: 50px; }
.action .btn-wa { flex: 0 0 56px; padding: 0; }
body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (min-width: 980px) {
  .action { left: auto; right: 24px; bottom: 24px; padding: 0; background: none; border: 0; }
  .action .btn-wa { flex: none; padding: 0 22px; }
  body { padding-bottom: 0; }
}

/* ---------- typographie ---------- */
.titre-geant {
  font-family: var(--display); font-weight: 800; font-stretch: var(--etire, 112%); letter-spacing: -.02em; line-height: .92;
  font-size: clamp(44px, 11vw, 150px); margin: 0; text-transform: uppercase;
}
.titre { font-family: var(--display); font-weight: 750; font-stretch: 108%; line-height: 1; letter-spacing: -.015em;
  font-size: clamp(32px, 6.4vw, 76px); margin: 0 0 18px; }
.chapo { font-size: clamp(18px, 2.2vw, 22px); color: var(--acier); max-width: 34ch; margin: 0 0 26px; }
.badge-voiture { font-family: var(--display); font-stretch: 150%; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; }

/* ---------- les sections posées sur la scène ---------- */
.plan { position: relative; min-height: 100svh; padding: calc(var(--barre) + 28px) 20px 40px; display: flex; flex-direction: column; justify-content: center; }
.plan .contenu { width: min(1180px, 100%); margin: 0 auto; }
.plan.bas { justify-content: flex-end; }
.panneau { background: var(--panneau); border: 1px solid rgba(255,255,255,.7); border-radius: var(--rayon); padding: 22px;
  box-shadow: 0 30px 60px -40px rgba(12,30,51,.45); }

/* ouverture */
.ouverture { text-align: center; justify-content: flex-start; padding-top: calc(var(--barre) + 6vh); }
.ouverture h1 { font-family: var(--texte); font-weight: 600; font-size: clamp(16px, 2vw, 19px); letter-spacing: .01em; color: var(--acier); margin: 14px auto 0; max-width: 32ch; }
.ouverture .titre-geant { color: var(--encre); }
.ouverture .boutons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* le tour d'une voiture */
.tour { justify-content: flex-end; }
.tour .fiche-vivante { display: grid; gap: 14px; max-width: 520px; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.puces li { background: #fff; border: 1px solid var(--ligne); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 15px; }
.puces li b { font-family: var(--display); font-stretch: 120%; }

/* manifeste */
.manifeste { text-align: center; }
.manifeste .mots { display: grid; gap: 4px; container-type: inline-size; width: min(1100px, calc(100vw - 36px)); margin: 0 auto; }
.manifeste .mot { font-family: var(--display); font-weight: 850; text-transform: uppercase; font-size: min(190px, calc(100cqi / 7));
  line-height: .86; font-stretch: 60%; color: var(--encre); transition: font-stretch .1s linear; }
.manifeste p { max-width: 36ch; margin: 22px auto 0; color: var(--acier); font-size: 19px; }

/* chapitres des services : écran coupé en deux */
.chapitre { padding: 0; min-height: auto; }
.chapitre .coupe { display: grid; min-height: 100svh; }
.chapitre .texte { padding: calc(var(--barre) + 24px) 22px 32px; display: flex; flex-direction: column; justify-content: center; background: var(--brume); }
.chapitre .photo { position: relative; overflow: hidden; min-height: 52svh; background: var(--nuit-2); }
.chapitre .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 1.4s var(--ease); }
.chapitre.vu .photo img { transform: scale(1); }
.chapitre .texte { container-type: inline-size; }
.chapitre .grand-mot { font-family: var(--display); font-weight: 850; text-transform: uppercase; line-height: .9; white-space: nowrap;
  font-size: min(120px, calc(100cqi / (var(--n, 8) * .95))); font-stretch: 118%; margin: 0 0 18px; }
.chapitre .grand-mot span { display: inline-block; clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease); }
.chapitre.vu .grand-mot span { clip-path: inset(0 0 0 0); }
.chapitre.sombre .texte { background: var(--nuit); color: #fff; }
.chapitre.sombre .chapo { color: var(--chrome); }
@media (min-width: 900px) {
  .chapitre .coupe { grid-template-columns: 1fr 1fr; }
  .chapitre.inverse .texte { order: 2; }
  .chapitre .texte { padding: 0 6vw; }
}

/* la flotte au défilement horizontal */
.rail { height: 520svh; padding: 0; display: block; }
.rail .colle { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--barre) + 16px) 20px 28px; }
.rail .tete { position: absolute; top: calc(var(--barre) + 18px); left: 20px; right: 20px; }
.rail .tete .titre { margin-bottom: 8px; }
.filtres { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.filtres::-webkit-scrollbar { display: none; }
.filtres button { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ligne); background: #fff; font-weight: 600; font-size: 15px; }
.filtres button[aria-pressed="true"] { background: var(--encre); color: #fff; border-color: var(--encre); }
.carte-rail { display: grid; gap: 6px; max-width: 520px; }
.carte-rail .nom { font-family: var(--display); font-weight: 800; font-stretch: 130%; text-transform: uppercase; font-size: clamp(28px, 6vw, 56px); line-height: .95; margin: 0; }
.carte-rail .ligne { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.compteur { font-family: var(--display); font-stretch: 140%; font-weight: 700; color: var(--acier); font-size: 15px; }

/* comment ça marche : la route et ses bornes */
.route ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: borne; }
.route li { counter-increment: borne; display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; }
.route li::before { content: counter(borne); width: 64px; height: 76px; display: grid; place-items: center; border-radius: 14px 14px 8px 8px;
  background: #fff; border: 2px solid var(--encre); font-family: var(--display); font-weight: 800; font-size: 34px; font-stretch: 120%; }
.route h3 { margin: 6px 0 4px; font-size: 21px; }
.route p { margin: 0; color: var(--acier); }
@media (min-width: 900px) { .route ol { grid-template-columns: repeat(3, 1fr); } .route li { grid-template-columns: 1fr; } }

/* les voyants au vert */
.voyants { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 12px; }
.voyant { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; padding: 16px; border-radius: 18px; background: var(--nuit); color: #fff; }
.voyant i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #0e2338; color: #3a5068; transition: color .6s, box-shadow .6s, background .6s; }
.voyant i svg { width: 24px; height: 24px; }
.voyant.allume i { color: #6cffa8; background: #0d2b22; box-shadow: 0 0 22px rgba(108, 255, 168, .55); }
.voyant b { display: block; font-size: 17px; }
.voyant span { color: var(--chrome); font-size: 14px; }

/* final, de nuit */
.final { color: #fff; text-align: center; }
.final .titre-geant { color: #fff; }
.final p { color: var(--chrome); max-width: 34ch; margin: 18px auto 26px; font-size: 19px; }

/* pied de page : bande pleine */
.pied { position: relative; z-index: 1; background: var(--nuit); color: var(--chrome); padding: 48px 20px calc(48px + env(safe-area-inset-bottom)); }
.pied .contenu { width: min(1180px, 100%); margin: 0 auto; display: grid; gap: 28px; }
.pied a { color: #fff; }
.pied img { height: 54px; width: auto; filter: brightness(0) invert(1); opacity: .9; }
.pied .credit { font-size: 13px; opacity: .7; }
@media (min-width: 900px) { .pied .contenu { grid-template-columns: 1.2fr 1fr 1fr; } }

/* ---------- le chargement « le contact » ---------- */
#contact { position: fixed; inset: 0; z-index: 100; background: var(--nuit); color: #fff;
  display: grid; place-items: center; overflow: hidden; }
#contact .cadran { width: min(78vw, 420px); aspect-ratio: 1; position: relative; }
#contact svg.compte { width: 100%; height: 100%; overflow: visible; }
#contact .lecture { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
#contact .lecture b { font-family: var(--display); font-stretch: 130%; font-weight: 800; font-size: clamp(36px, 10vw, 64px); line-height: 1; display: block; }
#contact .lecture small { display: block; color: var(--chrome); letter-spacing: .02em; font-size: 14px; margin-top: 6px; }
#contact .start { position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(.6); opacity: 0;
  border-radius: 50%; border: 2px solid rgba(120, 212, 255, .7); background: radial-gradient(circle at 50% 35%, #16324f, #071425 70%);
  color: #fff; display: grid; place-items: center; text-align: center; pointer-events: none;
  box-shadow: 0 0 0 10px rgba(120,212,255,.06), 0 0 60px rgba(120, 212, 255, .35), inset 0 2px 0 rgba(255,255,255,.15);
  transition: transform .6s var(--ease), opacity .6s; }
#contact .start b { font-family: var(--display); font-stretch: 140%; font-weight: 800; font-size: clamp(18px, 5vw, 28px); letter-spacing: .08em; display: block; }
#contact .start span { font-size: 12px; color: var(--glacier); letter-spacing: .12em; display: block; margin-top: 2px; }
#contact.pret .start { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; animation: pouls 2.2s ease-in-out infinite; }
#contact.pret .lecture { opacity: 0; transition: opacity .4s; }
@keyframes pouls { 50% { box-shadow: 0 0 0 18px rgba(120,212,255,.0), 0 0 90px rgba(120, 212, 255, .55), inset 0 2px 0 rgba(255,255,255,.15); } }
#contact .consigne { position: absolute; bottom: calc(40px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; padding: 0 24px;
  color: var(--chrome); font-size: 16px; opacity: 0; transition: opacity .6s .3s; }
#contact.pret .consigne { opacity: 1; }
#contact .consigne button { background: none; border: 0; color: #fff; text-decoration: underline; text-underline-offset: 4px; padding: 10px; min-height: 44px; }
#contact .marque-contact { position: absolute; top: calc(28px + env(safe-area-inset-top)); left: 0; right: 0; display: flex; justify-content: center; }
#contact .marque-contact img { height: 46px; width: auto; filter: brightness(0) invert(1); opacity: .85; }
/* les phares qui balaient la nuit au démarrage */
#contact .phares { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(40% 30% at 30% 55%, rgba(200, 240, 255, .9), transparent 70%), radial-gradient(40% 30% at 70% 55%, rgba(200, 240, 255, .9), transparent 70%); }
#contact.demarre .phares { animation: phares 1.1s ease-out forwards; }
@keyframes phares { 0% { opacity: 0; } 18% { opacity: 1; } 30% { opacity: .35; } 45% { opacity: 1; } 100% { opacity: .8; } }
/* la porte du garage : des lames qui montent */
#contact .porte { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(14, 1fr); pointer-events: none; opacity: 0; }
#contact .porte i { background: linear-gradient(#1a2a3e, #0f1c2d 60%, #0a1422); border-bottom: 2px solid #050b16; }
#contact.porte-baissee .porte { opacity: 1; }
#contact.ouvre { transform: translateY(-104%); transition: transform 1.7s cubic-bezier(.7, 0, .2, 1) .2s; }
#contact.ouvre .cadran, #contact.ouvre .consigne, #contact.ouvre .marque-contact { opacity: 0; transition: opacity .3s; }

/* ---------- les indications : on montre le geste ---------- */
.indice { position: fixed; z-index: 45; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px);
  display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 999px; background: var(--nuit); color: #fff;
  box-shadow: 0 20px 40px -18px rgba(5,11,22,.7); opacity: 0; pointer-events: none; transition: opacity .4s, transform .4s var(--ease); width: min(380px, calc(100vw - 32px)); }
.indice.vu { opacity: 1; transform: translate(-50%, 0); }
.indice .geste { width: 42px; height: 42px; border-radius: 50%; background: #13263c; display: grid; place-items: center; flex: none; }
.indice .geste svg { width: 28px; height: 28px; }
.indice b { display: block; font-size: 15px; }
.indice span { display: block; font-size: 13px; color: var(--chrome); }
@media (min-width: 980px) { .indice { bottom: 36px; } }
@media (max-width: 979px) { .indice { top: calc(var(--barre) + 10px); bottom: auto; transform: translate(-50%, -12px); } }
.geste .doigt { animation: glisse-haut 1.6s ease-in-out infinite; }
.geste .doigt-cote { animation: glisse-cote 1.6s ease-in-out infinite; }
@keyframes glisse-haut { 0%, 100% { transform: translateY(5px); } 50% { transform: translateY(-5px); } }
@keyframes glisse-cote { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(6px); } }

/* le compteur de route (où on en est) */
.odometre { position: fixed; z-index: 38; right: 14px; top: 50%; transform: translateY(-50%); display: none; flex-direction: column; gap: 14px; }
.odometre button { display: flex; align-items: center; gap: 10px; justify-content: flex-end; background: none; border: 0; padding: 4px; min-height: 30px; color: var(--acier); font-size: 13px; font-weight: 600; }
.odometre button i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; transition: background .3s, transform .3s; }
.odometre button span { opacity: 0; transition: opacity .3s; }
.odometre:hover button span, .odometre button.ici span { opacity: 1; }
.odometre button.ici { color: var(--encre); }
.odometre button.ici i { background: var(--bleu); border-color: var(--bleu); transform: scale(1.3); }
@media (min-width: 980px) { .odometre { display: flex; } }
.mode-emploi { position: fixed; inset: 0; z-index: 70; background: rgba(5, 11, 22, .72); display: grid; place-items: end center; opacity: 0; pointer-events: none; transition: opacity .3s; }
.mode-emploi.ouvert { opacity: 1; pointer-events: auto; }
.mode-emploi .feuille { width: min(560px, 100%); background: var(--brume); border-radius: 24px 24px 0 0; padding: 26px 22px calc(26px + env(safe-area-inset-bottom)); }
.mode-emploi ul { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 14px; }
.mode-emploi li { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; }
.mode-emploi li .geste { width: 46px; height: 46px; border-radius: 50%; background: var(--nuit); color: #fff; display: grid; place-items: center; }
.mode-emploi li .geste svg { width: 28px; height: 28px; }
@media (min-width: 700px) { .mode-emploi { place-items: center; } .mode-emploi .feuille { border-radius: 24px; } }

/* ---------- mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .chapitre .grand-mot span { clip-path: none; }
}
