/* ============================================================
   site.css — couche commune ajoutée en dernier : accueil animé,
   cartes véhicules, WhatsApp flottant, barre mobile, pages légales,
   accessibilité. Chargé sur toutes les pages publiques.
   ============================================================ */

/* ---- Accessibilité ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lien-evitement {
  position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--red); color: #fff;
  padding: 10px 16px; font-weight: 700; border-radius: 4px; transition: top .2s;
}
.lien-evitement:focus { top: 12px; }
:target { scroll-margin-top: 80px; }
section[id] { scroll-margin-top: 70px; }

/* ============================================================
   ACCUEIL
   ============================================================ */
.hero2 { position: relative; background: #0a0a0c; color: #fff; overflow: hidden; padding: 64px 0 0; }
.hero2-fond {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 60% at 78% 45%, rgba(193, 0, 0, .28), transparent 65%),
    radial-gradient(ellipse 40% 50% at 10% 100%, rgba(193, 0, 0, .10), transparent 70%);
}
.hero2-fond::after { /* quadrillage discret qui s'efface sur les bords */
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 60% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 70% at 60% 40%, #000 30%, transparent 75%);
}
.hero2-grille { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 50px; align-items: center; padding-bottom: 64px; }

.hero2 h1 { font-size: clamp(42px, 6.2vw, 80px); line-height: 1.02; letter-spacing: -.015em; color: #fff; margin: 18px 0 24px; }
.hero2-mots { display: inline-grid; vertical-align: top; }
.hero2-mots span {
  grid-area: 1 / 1; font-style: italic; color: var(--red); font-weight: 700;
  opacity: 0; transform: translateY(.35em); filter: blur(6px);
  transition: opacity .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1), filter .5s ease;
}
.hero2-mots span.actif { opacity: 1; transform: none; filter: none; }
.hero2-mots span.sortie { opacity: 0; transform: translateY(-.35em); filter: blur(6px); }

.hero2-lead { font-size: 18px; line-height: 1.6; color: #c7c7cb; max-width: 540px; }
.hero2-ctas { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 34px; }
.btn-xl { padding: 20px 30px; font-size: 13.5px; }
.hero2-lien { color: #fff; font-weight: 600; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.4); padding-bottom: 3px; transition: border-color .2s; }
.hero2-lien:hover { border-color: #fff; }

.hero2-chiffres { display: flex; gap: 44px; margin: 46px 0 0; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .1); }
.hero2-chiffres div { display: flex; flex-direction: column-reverse; }
.hero2-chiffres dd { margin: 0; font-family: var(--font-serif); font-size: 42px; font-weight: 800; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.hero2-chiffres dt { margin-top: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-light); }

/* Pile de photos */
.hero2-pile { position: relative; height: 580px; }
.hero2-carte {
  position: absolute; left: 50%; top: 50%; width: 340px; aspect-ratio: 3 / 4; margin: 0;
  border-radius: 16px; overflow: hidden; background: #1a1a1e; cursor: pointer;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255,255,255,.08);
  transform: translate(-50%, -50%) scale(.8); opacity: 0; z-index: 0;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1), opacity .7s ease;
}
.hero2-carte img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero2-carte figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 50px 18px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85)); font-weight: 600; font-size: 15px;
  display: flex; align-items: center; gap: 10px;
}
.hero2-pastille { background: var(--red); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: 3px; }
.hero2-carte.pos-0 { transform: translate(-50%, -50%) rotate(-2deg); opacity: 1; z-index: 3; }
.hero2-carte.pos-1 { transform: translate(-28%, -53%) rotate(7deg) scale(.92); opacity: .9; z-index: 2; }
.hero2-carte.pos-2 { transform: translate(-72%, -47%) rotate(-11deg) scale(.86); opacity: .75; z-index: 1; }
.hero2-carte.pos-sortie { transform: translate(40%, -70%) rotate(22deg) scale(.95); opacity: 0; z-index: 4; }
/* Sans JavaScript : les 3 premières en éventail */
.hero2-carte[style*="--n: 0"] { transform: translate(-50%, -50%) rotate(-2deg); opacity: 1; z-index: 3; }
.hero2-carte[style*="--n: 1"] { transform: translate(-28%, -53%) rotate(7deg) scale(.92); opacity: .9; z-index: 2; }
.hero2-carte[style*="--n: 2"] { transform: translate(-72%, -47%) rotate(-11deg) scale(.86); opacity: .75; z-index: 1; }
.js-pile .hero2-carte:not([class*="pos-"]) { transform: translate(-50%, -50%) scale(.8); opacity: 0; z-index: 0; }

.hero2-badge {
  position: absolute; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 12px;
  background: rgba(20, 20, 23, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .1); font-size: 13.5px; color: #e4e4e7; box-shadow: 0 16px 40px rgba(0,0,0,.4);
  animation: hmFlotte 6s ease-in-out infinite;
}
.hero2-badge b { color: #fff; }
.hero2-badge-1 { left: 0; top: 18%; }
.hero2-badge-1 b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #1f7a4a; font-size: 13px; }
.hero2-badge-2 { right: -18px; top: 34%; animation-delay: -3s; }
.hero2-badge-2 b { color: var(--red); font-family: var(--font-serif); font-size: 17px; }
@keyframes hmFlotte { 50% { transform: translateY(-10px); } }

/* Ruban d'engagements */
.hero2-ruban { position: relative; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(255,255,255,.02); overflow: hidden; }
.hero2-ruban-piste { display: flex; width: max-content; animation: hmRuban 45s linear infinite; }
.hero2-ruban ul { display: flex; margin: 0; padding: 18px 0; list-style: none; }
.hero2-ruban li { display: flex; align-items: center; gap: 14px; padding: 0 28px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #cfcfd3; white-space: nowrap; }
.hero2-ruban li::before { content: ""; width: 6px; height: 6px; background: var(--red); transform: rotate(45deg); }
@keyframes hmRuban { to { transform: translateX(-50%); } }

@media (max-width: 1000px) {
  .hero2 { padding-top: 40px; }
  .hero2-grille { grid-template-columns: 1fr; gap: 10px; padding-bottom: 40px; }
  .hero2-pile { height: 470px; }
  .hero2-carte { width: 280px; }
  .hero2-badge-1 { left: 2%; top: 6%; }
  .hero2-badge-2 { right: 0; top: auto; bottom: 2%; }
}
@media (max-width: 520px) {
  .hero2-chiffres { gap: 22px; }
  .hero2-chiffres dd { font-size: 32px; }
  .hero2-chiffres dt { font-size: 10px; letter-spacing: .06em; }
  .hero2-pile { height: 400px; }
  .hero2-carte { width: 230px; border-radius: 12px; }
  .hero2-badge { font-size: 12px; padding: 9px 12px; }
  .hero2-ctas { gap: 18px; }
  .btn-xl { width: 100%; justify-content: center; }
}

/* ============================================================
   CARTES VÉHICULES
   ============================================================ */
.vcard { position: relative; display: flex; flex-direction: column; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.vcard-lien { position: absolute; inset: 0; z-index: 2; }
.vcard-lien:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.vcard-media { position: relative; overflow: hidden; }
.vcard .vcard-badge { top: 12px; left: 12px; z-index: 1; }
.vcard-garantie { background: rgba(255,255,255,.94) !important; color: var(--ink) !important; }
.vcard-nbphotos {
  position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 5px;
  background: rgba(0,0,0,.7); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 20px;
}
.vcard-nbphotos svg { width: 14px; height: 14px; }
.vcard-body { display: flex; flex-direction: column; flex: 1; }
.vcard-model { font-size: 19px; margin-bottom: 12px; }
.vcard-puces { display: flex; flex-wrap: wrap; gap: 6px; }
.vcard-puces li { font-size: 12px; font-weight: 600; color: #4a4a50; background: #f3f1eb; padding: 4px 8px; border-radius: 4px; }
.vcard-foot { margin-top: auto; }
.vcard-body .vcard-foot { margin-top: 18px; }
.vcard-voir { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.vcard-voir svg { width: 13px; height: 13px; transition: transform .2s; }
.vcard:hover .vcard-voir svg { transform: translateX(4px); }

/* ============================================================
   WHATSAPP FLOTTANT & BARRE MOBILE
   ============================================================ */
.wa-flottant {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; display: flex; align-items: center; gap: 10px;
  background: #25d366; color: #fff; border-radius: 40px; padding: 12px 18px 12px 14px;
  font-weight: 700; font-size: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
  transform: translateY(120px); opacity: 0; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .3s;
}
.wa-flottant svg { width: 26px; height: 26px; }
.wa-flottant.visible { transform: none; opacity: 1; }
.wa-flottant:hover { background: #1ebe5b; }

.barre-mobile { display: none; }
@media (max-width: 760px) {
  .wa-flottant { bottom: 84px; right: 14px; padding: 12px; }
  .wa-flottant span { display: none; }
  .barre-mobile {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: flex; gap: 10px; padding: 10px 14px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom)); background: rgba(12, 12, 14, .96); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-dark); transform: translateY(110%); transition: transform .4s cubic-bezier(.2,.8,.2,1);
  }
  .barre-mobile.visible { transform: none; }
  .barre-mobile .btn { flex: 1; justify-content: center; }
  .barre-appel { flex-shrink: 0; width: 52px; display: grid; place-items: center; border: 1px solid var(--border-dark); border-radius: 2px; color: #fff; }
  .barre-appel svg { width: 20px; height: 20px; color: var(--red); }
  body { padding-bottom: 72px; }
}

/* ============================================================
   DIVERS
   ============================================================ */
.rgpd-note { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--gray-light); }
.rgpd-note a { color: #fff; text-decoration: underline; }
a.fc-item { display: block; transition: opacity .2s; }
a.fc-item:hover { opacity: .8; }
.footer-col a:hover { color: #fff; }
.nav.open .nav-links { z-index: 60; }

/* ============================================================
   PAGES LÉGALES & 404
   ============================================================ */
.page-simple { background: var(--cream); padding: 80px 0 100px; min-height: 60vh; }
.page-simple .wrap { max-width: 860px; }
.page-simple h1 { font-size: clamp(32px, 4.5vw, 48px); margin: 12px 0 10px; }
.page-simple .maj { color: var(--gray); font-size: 14px; margin-bottom: 40px; }
.page-simple h2 { font-size: 22px; margin: 40px 0 12px; }
.page-simple p, .page-simple li { color: #3a3a3f; font-size: 15.5px; line-height: 1.7; }
.page-simple ul { list-style: disc; padding-left: 22px; margin: 0 0 12px; }
.page-simple a { color: var(--red); text-decoration: underline; }
.page-simple .encadre { background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--red); padding: 18px 22px; margin: 20px 0; }
.page-simple .a-completer { background: #fff3cd; padding: 0 4px; border-radius: 2px; }
.page-404 { text-align: center; }
.page-404 .grand { font-family: var(--font-serif); font-size: clamp(90px, 18vw, 180px); font-weight: 800; line-height: 1; color: var(--red); }
.page-404 .hero-ctas { justify-content: center; margin-top: 30px; }

@media (prefers-reduced-motion: reduce) {
  .hero2-ruban-piste, .hero2-badge { animation: none; }
  .hero2-mots span { transition: none; }
}

@media print { .wa-flottant, .barre-mobile, .lien-evitement { display: none !important; } body { padding-bottom: 0 !important; } }

/* Mobile : le bouton rouge du haut laisse la place au menu (il est dans la barre du bas) */
@media (max-width: 600px) { .nav-right .btn { display: none; } .nav-toggle { display: block; } }

/* Fiche véhicule : équipements + bandeau d'aperçu (brouillon) */
.fiche-equip { margin-top: 22px; }
.fiche-equip h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--red); margin-bottom: 10px; font-family: var(--font-sans); }
.fiche-equip ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.fiche-equip li { position: relative; padding-left: 22px; font-size: 14.5px; color: #3a3a3f; }
.fiche-equip li::before { content: ""; position: absolute; left: 3px; top: 4px; width: 5px; height: 10px; border: solid var(--red); border-width: 0 2px 2px 0; transform: rotate(45deg); }
@media (max-width: 560px) { .fiche-equip ul { grid-template-columns: 1fr; } }
.bandeau-apercu { position: sticky; top: 78px; z-index: 40; background: #fff3cd; color: #6b4e00; text-align: center; padding: 10px 16px; font-size: 14px; font-weight: 600; }
.bandeau-apercu a { color: inherit; text-decoration: underline; }
