/* =========================================================================
   SM Automotive — style.css
   Mobile-first. Propriétés logiques (inline-start/end) => RTL automatique.
   Palette : gris Nardo en neutre principal + accent cuivre discret.
   ========================================================================= */

:root {
  --ink: #17181b;            /* quasi-noir du héro / footer */
  --ink-soft: #202127;
  --nardo: #9fa3a7;          /* gris Nardo */
  --nardo-dark: #6e7277;
  --paper: #ffffff;
  --paper-grey: #f4f5f6;
  --text: #212328;
  --text-dim: #5c5f66;
  --accent: #b4875a;         /* cuivre discret */
  --accent-ink: #8f6940;
  --wa: #22c15e;
  --radius: 14px;
  --header-h: 60px;
  --font-display: 'Marcellus', 'Noto Kufi Arabic', serif;
  --font-sans: 'Inter', 'Noto Kufi Arabic', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body { letter-spacing: 0; }

img { max-width: 100%; height: auto; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- Reveal on scroll (désactivé si reduced motion) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================== HEADER =========================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(23, 24, 27, .92);
  backdrop-filter: blur(8px);
  color: #fff;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark b { color: var(--accent); font-weight: inherit; }

#main-nav { display: none; gap: 26px; margin-inline-start: auto; }
#main-nav a {
  text-decoration: none;
  font-size: .92rem;
  color: #d8d9dc;
}
#main-nav a:hover { color: #fff; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
#main-nav + .header-actions { margin-inline-start: 0; }

#lang-switch { display: flex; gap: 2px; background: rgba(255,255,255,.08); border-radius: 8px; padding: 3px; }
#lang-switch button {
  border: 0; background: transparent; color: #c9cacd;
  font-size: .78rem; font-weight: 600; padding: 4px 8px; border-radius: 6px;
}
#lang-switch button[aria-pressed="true"] { background: #fff; color: var(--ink); }

.btn-wa-header {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--wa); color: #fff; text-decoration: none;
  font-size: .85rem; font-weight: 600;
  padding: 8px 13px; border-radius: 9px;
}
.btn-wa-header svg { width: 15px; height: 15px; }
.btn-wa-header .wa-txt { display: none; }

/* =========================== HERO =========================== */
#hero-section {
  /* motif zellige (étoile à 8 branches) très discret + halo */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23b4875a' stroke-opacity='.09'%3E%3Crect x='21' y='21' width='30' height='30'/%3E%3Crect x='21' y='21' width='30' height='30' transform='rotate(45 36 36)'/%3E%3Cpath d='M0 36h21M51 36h21M36 0v21M36 51v21'/%3E%3C/g%3E%3C/svg%3E") repeat,
    radial-gradient(1100px 480px at 70% 110%, rgba(159,163,167,.16), transparent 65%),
    var(--ink);
  color: #fff;
  overflow: hidden;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-block: 44px 0;
}
.hero-kicker {
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--nardo);
  margin: 0 0 14px;
}
/* étoile marocaine en ponctuation du kicker */
.hero-kicker::before {
  content: "✦";
  color: var(--accent);
  margin-inline-end: 10px;
  letter-spacing: 0;
}
#hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 8.5vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 14px;
}
.hero-sub {
  font-size: 1.02rem;
  color: #c3c5c9;
  max-width: 46ch;
  margin: 0 0 24px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 11px;
  font-size: .97rem; font-weight: 600; text-decoration: none; border: 0;
}
.btn-primary { background: var(--accent); color: #17181b; }
.btn-primary:hover { background: #c39a70; }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-outline:hover { border-color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn svg { width: 17px; height: 17px; flex: none; }

.hero-car {
  margin-top: 8px;
  align-self: center;
  width: min(620px, 94%);
  position: relative;
}
.hero-car img { display: block; width: 100%; position: relative; z-index: 1; }
/* arche marocaine (fer à cheval stylisé) derrière la voiture héro */
.hero-car::before {
  content: "";
  position: absolute;
  inset: -4% 9% 14%;
  border: 1px solid rgba(180, 135, 90, .38);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  pointer-events: none;
}

/* ombre douce sous la voiture héro */
.hero-car::after {
  content: "";
  position: absolute;
  inset-inline: 10%;
  bottom: 4%;
  height: 7%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.55), transparent 70%);
  z-index: -1;
}

/* ============ HERO « ATLAS » (index.html) — plein écran ============ */
/* Scopé .hero-atlas : les démos qui utilisent l'ancien héro restent intactes */
#hero-section.hero-atlas {
  position: relative;
  display: flex;
  min-height: calc(100svh - var(--header-h));
  isolation: isolate;
  background: var(--ink); /* fallback pendant le chargement de l'image */
}
/* image de fond via <picture> (desktop paysage / mobile portrait) */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}
/* voile cinématique : lisibilité en haut (texte) et en bas (widget) */
#hero-section.hero-atlas::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(23,24,27,.62) 0%,
    rgba(23,24,27,.34) 30%,
    rgba(23,24,27,.30) 55%,
    rgba(23,24,27,.88) 100%);
}
.hero-atlas .hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 640px);
  justify-content: start;   /* flow-relative => à droite en RTL */
  align-content: center;
  width: 100%;
  padding-block: clamp(36px, 8vh, 84px);
  position: relative;
}
.hero-atlas .hero-copy { grid-area: 1 / 1; position: relative; }
/* voile local : frère du bloc texte, même cellule de grille => dimensionné
   par le texte lui-même ; déborde en douceur tout autour */
.hero-scrim {
  grid-area: 1 / 1;
  margin: -34px -44px;
  background: radial-gradient(115% 115% at 50% 45%,
    rgba(23,24,27,.66),
    rgba(23,24,27,.42) 55%,
    transparent 78%);
  pointer-events: none;
}
.hero-atlas .hero-kicker { color: #d8d9dc; }
.hero-atlas #hero-title {
  font-size: clamp(2.3rem, 9vw, 4.2rem);
  max-width: 16ch;
  text-shadow: 0 2px 24px rgba(0,0,0,.45);
}
.hero-atlas .hero-sub {
  color: #e8eaee;
  text-shadow: 0 1px 12px rgba(0,0,0,.5);
}
.hero-atlas .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(180,135,90,.35); }
.hero-atlas .btn { transition: transform .25s ease, box-shadow .25s ease, background .25s ease; }

/* entrées en douceur (réutilise l'esprit .reveal du site) */
.hero-atlas .hero-kicker,
.hero-atlas #hero-title,
.hero-atlas .hero-sub,
.hero-atlas .hero-ctas {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-rise .7s ease forwards;
}
.hero-atlas #hero-title { animation-delay: .12s; }
.hero-atlas .hero-sub { animation-delay: .24s; }
.hero-atlas .hero-ctas { animation-delay: .36s; }
@keyframes hero-rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .hero-atlas .hero-kicker, .hero-atlas #hero-title, .hero-atlas .hero-sub,
  .hero-atlas .hero-ctas {
    animation: none; opacity: 1; transform: none;
  }
}

/* ---- section recherche, sous le héro ---- */
#hero-search-section {
  background: var(--ink);
  padding-block: 26px 24px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* ---- widget de recherche glassmorphic ---- */
#hero-widget {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 26px 60px rgba(0,0,0,.45);
}
.hw-field {
  background: rgba(23,24,27,.55);
  padding: 11px 16px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hw-field label {
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.hw-field select,
.hw-field input {
  background: none;
  border: 0;
  color: #fff;
  font-family: var(--font-sans);
  font-size: .95rem;
  outline: none;
  padding: 2px 0;
  width: 100%;
}
.hw-field select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.hw-field select option { color: var(--text); background: #fff; }
.hw-field input::-webkit-calendar-picker-indicator { filter: invert(.85); cursor: pointer; }
.hw-submit {
  background: var(--accent);
  color: #fff;
  border: 0;
  font-weight: 600;
  font-size: .92rem;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: background .25s ease;
}
.hw-submit:hover { background: var(--accent-ink); }
.hw-arrow { transition: transform .25s ease; }
.hw-submit:hover .hw-arrow { transform: translateX(4px); }
[dir="rtl"] .hw-arrow { transform: scaleX(-1); }
[dir="rtl"] .hw-submit:hover .hw-arrow { transform: scaleX(-1) translateX(4px); }

/* ---- indicateurs de confiance ---- */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px clamp(16px, 3vw, 36px);
  margin: 16px 0 0;
  font-size: .8rem;
  color: #c9cbd0;
}
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.hero-trust .tick { color: var(--accent); font-weight: 700; font-size: .72rem; }

/* mobile ≤700px : héro = hauteur exacte de l'image portrait (3:4),
   texte dans le tiers supérieur calme, voiture entière visible dessous,
   la recherche enchaîne directement (pas de bande vide) */
@media (max-width: 700px) {
  #hero-section.hero-atlas {
    min-height: 0;
    aspect-ratio: 896 / 1200;
  }
  #hero-section.hero-atlas::after {
    background: linear-gradient(180deg,
      rgba(23,24,27,.55) 0%,
      rgba(23,24,27,.28) 38%,
      transparent 60%,
      rgba(23,24,27,.18) 100%);
  }
  .hero-media img { object-position: center bottom; }
  .hero-atlas .hero-inner {
    align-content: start;
    padding-block: 18px 0;
  }
  .hero-scrim { margin: -20px -24px; }
  .hero-atlas .hero-kicker { font-size: .68rem; margin-bottom: 8px; }
  .hero-atlas #hero-title { font-size: clamp(1.65rem, 7.2vw, 2rem); margin-bottom: 8px; }
  .hero-atlas .hero-sub { font-size: .88rem; margin-bottom: 14px; }
  .hero-atlas .btn { padding: 10px 18px; font-size: .88rem; }
  .hw-field { padding: 9px 14px 8px; }
  .hw-field select, .hw-field input { font-size: .9rem; }
  .hw-submit { padding: 13px; font-size: .9rem; }
  .hero-trust { margin-top: 12px; font-size: .74rem; gap: 4px 14px; }
}
@media (min-width: 640px) {
  #hero-widget { grid-template-columns: 1fr 1fr; }
  .hw-submit { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  #hero-widget { grid-template-columns: 1.05fr 1fr 1fr 1.15fr auto; }
  .hw-submit { grid-column: auto; padding-inline: 30px; }
}

/* ========================= FLEET ========================= */
#fleet-section { background: var(--paper); padding-block: 56px 72px; }
.section-head { margin-bottom: 26px; }
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  margin: 0 0 6px;
}
.section-sub { color: var(--text-dim); margin: 0; }

#fleet-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-block: 10px 14px;
  margin-bottom: 26px;
  border-bottom: 1px solid #e7e8ea;
  scrollbar-width: none;
  /* collant sous le header : changer de catégorie reste à un tap */
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: var(--paper);
}
#fleet-tabs::-webkit-scrollbar { display: none; }
#fleet-tabs button {
  flex: none;
  border: 1px solid #dcdee1;
  background: #fff;
  color: var(--text-dim);
  font-size: .88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
#fleet-tabs button[aria-pressed="true"] {
  background: var(--ink); color: #fff; border-color: var(--ink);
}

#fleet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.car-card { display: flex; flex-direction: column; }
.car-figure { position: relative; margin: 0 0 6px; }
.car-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  /* ombre portée douce et cohérente sous chaque cutout */
  filter: drop-shadow(0 22px 16px rgba(23,24,27,.18));
}
.car-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.car-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.28rem;
  margin: 0;
}
.car-year { color: var(--text-dim); font-size: .85rem; white-space: nowrap; }
.car-specs {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  color: var(--text-dim); font-size: .86rem;
  margin: 6px 0 10px;
}
.car-specs .spec-auto { color: var(--accent-ink); font-weight: 600; }

.car-colors { display: flex; align-items: center; gap: 8px; min-height: 30px; margin-bottom: 12px; flex-wrap: wrap; }
.car-colors .color-name { font-size: .8rem; color: var(--text-dim); }
.swatch {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  outline: 1px solid #d4d6d9;
  padding: 0;
  flex: none;
}
.swatch[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }

.car-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.car-price { font-size: .95rem; color: var(--text-dim); }
.car-price strong { color: var(--text); font-size: 1.25rem; font-weight: 700; }
.btn-book {
  background: var(--accent); color: #17181b;
  border: 0; border-radius: 10px;
  padding: 11px 22px; font-size: .92rem; font-weight: 600;
}
.btn-book:hover { background: #c39a70; }
.car-total {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent-ink);
  margin-top: 2px;
}

/* ======================= HOW IT WORKS ======================= */
#how-section { background: var(--paper-grey); padding-block: 56px 64px; text-align: center; }
#how-section .section-title { text-align: center; }
.how-steps { display: grid; grid-template-columns: 1fr; gap: 22px; margin-top: 10px; justify-items: center; }
.how-step h3 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.15rem; margin: 0 0 4px;
}
.how-step p { margin: 0; color: var(--text-dim); font-size: .95rem; max-width: 34ch; }

/* ========================= GALLERY ========================== */
#gallery-section {
  background: var(--ink);
  color: #fff;
  padding-block: 56px 72px;
}
#gallery-section .section-title { text-align: center; color: #fff; }
.gallery-sub { text-align: center; color: #b9bbc0; margin: 0 0 8px; }

/* ---- scène 3D : colonnes inclinées, défilement vertical en boucle ---- */
#gallery-stage {
  position: relative;
  height: min(78vh, 640px);
  overflow: hidden;
  /* léger spot lumineux au centre */
  background:
    radial-gradient(60% 55% at 50% 42%, rgba(180,135,90,.14), transparent 70%);
}
.g-tilt {
  position: absolute;
  inset: -12% -6%;
  display: flex;
  justify-content: center;
  gap: clamp(10px, 2.2vw, 26px);
  transform: perspective(1200px) rotateX(10deg) rotateZ(-4deg) scale(1.06);
  transform-style: preserve-3d;
}
.g-col {
  width: clamp(150px, 26vw, 320px);
  flex: none;
  overflow: hidden;
}
.g-col-3 { display: none; }
.g-track {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2.2vw, 26px);
  animation: g-scroll var(--dur, 60s) linear infinite;
  will-change: transform;
}
/* colonne du milieu : part décalée + sens inverse => parallaxe */
.g-col:nth-child(2) .g-track { animation-direction: reverse; }
@keyframes g-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }  /* contenu dupliqué par JS => boucle parfaite */
}
#gallery-stage:hover .g-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .g-track { animation: none; }
  #gallery-stage { height: auto; max-height: none; overflow: visible; }
  .g-tilt { position: static; transform: none; inset: auto; flex-wrap: wrap; padding-block: 20px; }
  .g-col { overflow: visible; }
}

.g-item {
  display: block;
  flex: none;
  border-radius: 12px;
  overflow: hidden;
  background: #222;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  outline: 1px solid rgba(255,255,255,.08);
  transition: transform .3s ease, box-shadow .3s ease;
}
.g-item:hover {
  transform: scale(1.035);
  box-shadow: 0 22px 54px rgba(0,0,0,.6);
  z-index: 2;
}
.g-item img {
  display: block;
  width: 100%;
  height: auto;
}

/* voiles de fondu haut/bas (profondeur) */
.g-fade {
  position: absolute;
  left: 0; right: 0;
  height: 90px;
  pointer-events: none;
  z-index: 3;
}
.g-fade-top { top: 0; background: linear-gradient(var(--ink), transparent); }
.g-fade-bottom {
  bottom: 0;
  height: 110px;
  background: linear-gradient(transparent, var(--ink) 78%);
}

/* lightbox */
#gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 12, .93);
  padding: 0;
  border: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}
#gallery-lightbox[hidden] { display: none; }
#gallery-lightbox img {
  max-width: min(94vw, 1100px);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.lb-btn {
  position: absolute;
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lb-btn:hover { background: rgba(255,255,255,.18); }
#lb-close { top: 16px; inset-inline-end: 16px; }
#lb-prev { inset-inline-start: 10px; top: 50%; transform: translateY(-50%); }
#lb-next { inset-inline-end: 10px; top: 50%; transform: translateY(-50%); }
#lb-count {
  position: absolute;
  bottom: 14px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  color: #cfd1d5;
  font-size: .85rem;
  letter-spacing: .06em;
}
[dir="rtl"] #lb-count { transform: translateX(50%); }

@media (min-width: 700px) {
  .g-col-3 { display: block; }
  #gallery-stage { height: min(82vh, 720px); }
}

/* ==================== CONDITIONS (FAQ) ====================== */
#conditions-section { background: var(--paper-grey); padding-block: 56px 64px; }
#conditions-section[hidden] { display: none; }
#conditions-section .section-title { text-align: center; }
.faq-list {
  margin: 18px auto 0;
  max-width: 680px;
  display: grid;
  gap: 10px;
}
.faq-item {
  background: var(--paper);
  border: 1px solid #e6e8ea;
  border-radius: 10px;
  overflow: hidden;
}
.faq-q {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  -webkit-tap-highlight-color: transparent;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: "";
  flex: 0 0 auto;
  width: 9px; height: 9px;
  border-inline-end: 2px solid var(--accent);
  border-block-end: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform .2s ease;
  margin-block-start: -4px;
}
.faq-item[open] .faq-q::after { transform: rotate(225deg); margin-block-start: 4px; }
.faq-q:hover { color: var(--accent-ink); }
.faq-a {
  margin: 0;
  padding: 0 16px 14px;
  color: var(--text-dim);
  font-size: .93rem;
}

/* ========================== FOOTER ========================== */
#site-footer {
  background: var(--ink);
  color: #c3c5c9;
  padding-block: 40px 24px;
}
.footer-inner { display: flex; flex-direction: column; gap: 22px; }
.footer-brand { margin: 0 0 6px; font-family: var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: #fff; font-size: 1.05rem; }
.footer-cities { margin: 0; }
.footer-brand b { color: var(--accent); font-weight: inherit; }
.footer-agencies { display: grid; gap: 12px; }
.footer-agencies-title {
  margin: 0;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.footer-address { font-style: normal; font-size: .92rem; line-height: 1.5; display: grid; gap: 2px; max-width: 34ch; }
.footer-address strong { color: #fff; font-weight: 600; }
.footer-address span, .footer-address a { color: #a9abb0; text-decoration: none; }
.footer-address a:hover { color: #fff; text-decoration: underline; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; font-size: .95rem; }
.footer-contact-title {
  margin: 0 0 2px;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.footer-contact a { color: #e7e8ea; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.footer-contact a:hover { color: #fff; }
.footer-contact svg { width: 15px; height: 15px; flex: none; }
.footer-cities { color: var(--nardo); }
.footer-credit {
  font-size: .82rem;
  color: #8b8d93;
  text-align: center;
  max-width: 280px;
  margin: 4px auto 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.footer-credit a { color: #b9bbbf; }

/* ===================== FLOATING WHATSAPP ===================== */
#floating-wa {
  position: fixed;
  bottom: 18px;
  inset-inline-start: 18px;   /* gauche en LTR, droite en RTL => le chat IA prend l'autre coin */
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: var(--wa);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}
#floating-wa svg { width: 26px; height: 26px; }
#floating-wa {
  transition: opacity .3s ease, visibility .3s;
}
#floating-wa.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ======================= BOOKING MODAL ======================= */
#booking-modal { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; }
#booking-modal::backdrop { background: rgba(23,24,27,.6); backdrop-filter: blur(2px); }
#booking-modal[open] { display: grid; place-items: end center; width: 100%; height: 100dvh; }
.modal-card {
  background: #fff;
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  overflow-y: auto;
  border-radius: 18px 18px 0 0;
  padding: 22px 20px 26px;
}
@media (min-width: 560px) {
  #booking-modal[open] { place-items: center; }
  .modal-card { border-radius: 18px; }
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-title { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; margin: 0; }
.modal-close { border: 0; background: var(--paper-grey); border-radius: 50%; width: 34px; height: 34px; font-size: 1.05rem; line-height: 1; color: var(--text-dim); }

#booking-form { display: grid; gap: 13px; }
.field { display: grid; gap: 5px; }
.field label { font-size: .82rem; font-weight: 600; color: var(--text-dim); }
.field input, .field select {
  width: 100%;
  font: inherit;
  padding: 11px 12px;
  border: 1px solid #d4d6d9;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
.field input:focus, .field select:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.field .hint { font-size: .74rem; color: var(--text-dim); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

#booking-estimate {
  background: var(--paper-grey);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: .9rem;
  color: var(--text-dim);
}
#booking-estimate strong { color: var(--text); font-size: 1.05rem; }
#booking-estimate .est-note { display: block; font-size: .76rem; margin-top: 3px; }

.booking-deposit {
  background: var(--paper-grey);
  border-radius: 10px;
  padding: 9px 13px;
  font-size: .86rem;
  color: var(--text-dim);
  margin: 0;
}
.booking-deposit[hidden] { display: none; }

#booking-feedback { font-size: .92rem; border-radius: 10px; padding: 12px 14px; }
#booking-feedback[hidden] { display: none; }
#booking-feedback.is-error { background: #fdf0ef; color: #9c3a32; }
#booking-feedback.is-success { background: #eefaf0; color: #1d7a3d; }
#booking-feedback .fb-title { font-weight: 700; display: block; margin-bottom: 3px; }
#booking-feedback .fb-ref { font-weight: 700; letter-spacing: .04em; }
#booking-feedback .btn-wa { margin-top: 10px; padding: 10px 16px; font-size: .88rem; border-radius: 9px; display: inline-flex; }

.btn-submit { width: 100%; padding: 14px; border-radius: 11px; background: var(--ink); color: #fff; border: 0; font-size: 1rem; font-weight: 700; }
.btn-submit:disabled { opacity: .55; cursor: wait; }

/* ========================= DESKTOP ========================= */
@media (min-width: 820px) {
  #main-nav { display: flex; }
  .btn-wa-header .wa-txt { display: inline; }

  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: 30px;
    padding-block: 72px 56px;
  }
  .hero-copy { flex: 1 1 46%; }
  .hero-car { flex: 1 1 54%; margin-top: 0; }


  #fleet-grid { grid-template-columns: repeat(2, 1fr); gap: 48px 32px; }
  /* une carte seule sur la dernière ligne : centrée, plus large
     (dans « Toutes », c'est la G 63 qui clôt la liste) */
  .car-card:last-child:nth-child(2n+1) { grid-column: 1 / -1; justify-self: center; width: min(100%, 560px); }

  .how-steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }

  .footer-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 40px;
    align-items: start;
  }
  .footer-agencies { grid-template-columns: 1fr 1fr; gap: 10px 24px; }
  .footer-agencies-title { grid-column: 1 / -1; }
  .footer-contact { align-items: flex-start; }
  .footer-credit { grid-column: 1 / -1; }
}

@media (min-width: 1100px) {
  #fleet-grid { grid-template-columns: repeat(3, 1fr); }
  .car-card:last-child:nth-child(2n+1) { grid-column: auto; justify-self: stretch; width: auto; }
  .car-card:last-child:nth-child(3n+1) { grid-column: 1 / -1; justify-self: center; width: min(100%, 560px); }
}

/* ancres : le titre de section ne passe pas sous le header collant */
main > section, #site-footer { scroll-margin-top: var(--header-h); }

/* petits téléphones (≤ 380 px) : logo, langues et WhatsApp tiennent sur une ligne */
@media (max-width: 380px) {
  .header-inner { gap: 10px; }
  .wordmark { font-size: 1rem; letter-spacing: .08em; }
  .header-actions { gap: 6px; }
  #lang-switch button { padding: 4px 6px; }
  .btn-wa-header { padding: 8px 10px; }
}
