/* GreenDrive — feuille de style de base.
   Pas de framework CSS lourd (design brief §6) : variables + utilitaires.
   Positionnement visuel : média auto éditorial (InsideEVs/Electrek), pas
   annuaire dense (design brief §2 / .claude/agents/design-site.md). */

:root {
  --gd-night: #0B1B2E;
  --gd-teal: #17D9A3; /* à recalibrer à la pipette sur le logo source — brief §3/§7.2 */
  --gd-bg: #FFFFFF;
  --gd-text: #16202B;
  --gd-muted: #5B6B7A;
  --gd-border: #E3E8EC;
  --gd-danger: #D64545;

  --energy-bev: #17D9A3;
  --energy-phev: #2E6FE0;
  --energy-hev: #F2795A;
  --energy-mhev: #D9A441;
  --energy-reev: #8B5CF6;
  --energy-thermique: #8A8F98;

  --gd-container: 1200px;
  --gd-radius: 8px;
  --gd-radius-lg: 14px;
  --gd-space-1: 8px;
  --gd-space-2: 16px;
  --gd-space-3: 24px;
  --gd-space-4: 32px;
  --gd-space-5: 48px;

  --gd-header-h: 72px;

  /* Ombres dérivées de la couleur nuit — pas de nouvelle teinte de marque. */
  --gd-shadow-sm: 0 2px 8px rgba(11, 27, 46, 0.08);
  --gd-shadow-md: 0 12px 28px rgba(11, 27, 46, 0.14);
  --gd-shadow-lg: 0 20px 48px rgba(11, 27, 46, 0.22);

  /* Typographie (brief §4 : "une deuxième graisse/famille plus marquée
     pour les titres") — Sora en display (géométrique, confiant, cohérent
     avec un positionnement éditorial technique/EV), Source Sans 3 en corps
     de texte (lisibilité longue lecture, excellent support des accents
     français). Palette et logo restent inchangés (identité verrouillée). */
  --gd-font-display: 'Sora', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --gd-font-body: 'Source Sans 3', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Nuance fraîche dérivée du teal, très désaturée — pour alterner le fond
     de certaines sections sans jamais introduire une teinte hors marque. */
  --gd-bg-alt: #F4FBF9;

  /* Mode nuit : surfaces (cartes, champs) et titres passent par ces variables. */
  --gd-surface: #FFFFFF;
  --gd-heading: var(--gd-night);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--gd-font-body);
  background: var(--gd-bg);
  color: var(--gd-text);
  line-height: 1.5;
}

.container {
  max-width: var(--gd-container);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container { padding: 0 24px; }
}

a { color: inherit; }
img { max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--gd-font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--gd-heading);
  text-wrap: balance;
}
/* Échelle fluide : donne aux titres une vraie présence sans dépendre du
   style par défaut du navigateur (jusqu'ici identique quelle que soit la
   page — h1 d'accueil ou h1 de formulaire). */
h1 { font-size: clamp(1.9rem, 1.55rem + 1.6vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 1.2rem + 0.7vw, 1.8rem); }
h3 { font-size: clamp(1.1rem, 1.02rem + 0.35vw, 1.3rem); }
h4 { font-size: 1.05rem; }

/* Utilitaire d'accessibilité : contenu réservé aux lecteurs d'écran. */
.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;
}

/* Focus clavier visible partout (design brief §7.5). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gd-teal);
  outline-offset: 2px;
}

/* ==========================================================================
   Header + mega-menu
   ========================================================================== */
.gd-header {
  background: var(--gd-night);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--gd-shadow-sm);
}
.gd-header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--gd-space-2);
  min-height: var(--gd-header-h);
  padding-block: 12px;
  /* Le logo (1er élément du flex) doit coller davantage au bord de l'écran
     que le reste des pages : on réduit ici uniquement le retrait gauche du
     header, sans toucher au `.container` générique utilisé ailleurs (hero,
     sections, footer...). Le côté droit garde le retrait standard, donc le
     bouton hamburger / la recherche ne bougent pas. */
  padding-left: 0;
}

/* Logo : monogramme image (fond noir du JPEG fondu au bleu nuit via
   mix-blend-mode) + wordmark texte — les deux éléments du lockup de marque
   restent présents (design brief §3). */
.gd-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-family: var(--gd-font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.gd-logo-mark {
  /* Image recadrée (marge noire retirée). */
  height: 38px;
  width: auto;
  display: block;
  mix-blend-mode: screen; /* fait disparaître le fond noir du JPEG sur le bleu nuit */
}
.gd-logo-word {
  font-family: 'Poppins', var(--gd-font-display);
  font-weight: 700;
}
.gd-logo-word strong { color: var(--gd-teal); font-weight: 700; }
@media (min-width: 1024px) {
  .gd-logo-mark { height: 42px; }
  .gd-logo-word { font-size: 1.3rem; }
}

/* Bouton hamburger (mobile uniquement) — pas de JS externe, juste un
   toggle vanilla minimal dans header.php. */
.gd-nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  cursor: pointer;
}
.gd-nav-toggle .bar { width: 18px; height: 2px; background: #fff; border-radius: 2px; }

.gd-nav-drawer { flex-basis: 100%; width: 100%; display: none; }
.gd-nav-drawer.is-open { display: block; }

.gd-nav {
  list-style: none;
  margin: 0;
  padding: 12px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gd-nav-item { position: relative; }
.gd-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  text-decoration: none;
  color: #fff;
  font-family: var(--gd-font-display);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 6px;
  transition: color 0.15s ease;
}
.gd-nav-link:hover, .gd-nav-link:focus-visible { color: var(--gd-teal); }
.gd-nav-item.has-mega > .gd-nav-link::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: auto;
  opacity: 0.7;
  transition: transform 0.15s ease;
}
.gd-nav-item.has-mega:hover > .gd-nav-link::after,
.gd-nav-item.has-mega:focus-within > .gd-nav-link::after {
  transform: rotate(225deg);
}

/* Panneau mega-menu : sur mobile il reste inline sous le lien parent (fond
   nuit hérité du tiroir), avec un liseré vertical pour marquer visuellement
   le rattachement à sa rubrique. Sur desktop il devient un panneau blanc
   flottant (règles dans le breakpoint 1024px plus bas). */
.gd-mega-panel {
  padding: 4px 0 12px 16px;
  margin: 0 0 4px 10px;
  border-left: 2px solid rgba(255, 255, 255, 0.14);
}
.gd-mega-title { color: rgba(255, 255, 255, 0.55); }
.gd-mega-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gd-mega-panel a {
  display: block;
  padding: 8px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.88rem;
  border-radius: 6px;
}
.gd-mega-panel a:hover, .gd-mega-panel a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.gd-mega-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 8px;
  font-size: 0.85rem !important;
  font-weight: 700;
  color: var(--gd-teal) !important;
}
.gd-mega-cta:hover, .gd-mega-cta:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gd-teal) !important;
}
.gd-mega-cta .arrow { transition: transform 0.15s ease; }
.gd-mega-cta:hover .arrow, .gd-mega-cta:focus-visible .arrow { transform: translateX(3px); }

.gd-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 2px;
  margin: 8px 0 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.gd-search:focus-within {
  border-color: var(--gd-teal);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(23, 217, 163, 0.18);
}
.gd-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 9px 10px;
  font-size: 0.9rem;
}
.gd-search input::placeholder { color: rgba(255, 255, 255, 0.6); }
.gd-search input:focus { outline: none; }
.gd-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  border-radius: 6px;
}
.gd-search-btn:hover, .gd-search-btn:focus-visible { color: var(--gd-teal); }

@media (min-width: 1024px) {
  .gd-nav-toggle { display: none; }
  .gd-nav-drawer, .gd-nav-drawer.is-open {
    display: flex;
    align-items: center;
    flex-basis: auto;
    width: auto;
    flex: 1;
    gap: var(--gd-space-4);
  }
  .gd-nav { flex-direction: row; align-items: center; padding: 0; gap: 2px; }
  .gd-nav-link { padding: 12px 14px; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; }
  .gd-nav-item:hover > .gd-nav-link,
  .gd-nav-item:focus-within > .gd-nav-link {
    color: var(--gd-teal);
    background: rgba(255, 255, 255, 0.06);
    border-bottom-color: var(--gd-teal);
  }
  .gd-mega-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin: 8px 0 0;
    padding: 18px;
    min-width: 320px;
    background: var(--gd-surface);
    color: var(--gd-text);
    border-radius: 10px;
    border-left: 0;
    box-shadow: var(--gd-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 110;
  }
  /* Pont invisible qui comble l'écart entre le lien et le panneau, pour que
     le survol ne se perde pas en descendant la souris. */
  .gd-mega-panel::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: -8px;
    height: 8px;
  }
  .gd-nav-item.has-mega:hover .gd-mega-panel,
  .gd-nav-item.has-mega:focus-within .gd-mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .gd-mega-title {
    color: var(--gd-muted);
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--gd-border);
  }
  .gd-mega-panel ul { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 2px 12px; }
  .gd-mega-panel a { color: var(--gd-text); }
  .gd-mega-panel a:hover, .gd-mega-panel a:focus-visible {
    background: rgba(23, 217, 163, 0.14);
    color: var(--gd-heading);
  }
  .gd-mega-cta {
    display: flex;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--gd-border);
    color: var(--gd-heading) !important;
  }
  .gd-mega-cta:hover, .gd-mega-cta:focus-visible {
    background: transparent;
    color: var(--gd-teal) !important;
  }
  .gd-search { margin: 0 0 0 auto; width: 220px; }
}

/* Bandeau catégorie */
.gd-tag {
  display: inline-block;
  background: var(--gd-teal);
  color: var(--gd-night);
  font-family: var(--gd-font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 4px;
}
.gd-tag--sm { font-size: 0.62rem; padding: 3px 8px; }

/* Badge énergie */
.gd-energy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
}
.gd-energy-badge.bev { background: var(--energy-bev); color: var(--gd-night); }
.gd-energy-badge.phev { background: var(--energy-phev); }
.gd-energy-badge.hev { background: var(--energy-hev); }
.gd-energy-badge.mhev { background: var(--energy-mhev); color: var(--gd-night); }
.gd-energy-badge.reev { background: var(--energy-reev); }
.gd-energy-badge.thermique { background: var(--energy-thermique); }

/* ==========================================================================
   Titres de section éditoriaux
   ========================================================================== */
.gd-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: var(--gd-space-4) 0 var(--gd-space-2);
  font-size: 1.35rem;
}
.gd-section-title::before {
  content: "";
  width: 4px;
  height: 1.1em;
  background: var(--gd-teal);
  border-radius: 2px;
  flex-shrink: 0;
}
.gd-section-title a { color: inherit; text-decoration: none; }
.gd-section-title a:hover, .gd-section-title a:focus-visible { color: var(--gd-teal); }

/* En-tête de section rubrique : titre + lien "Voir tout" sur une même ligne
   (accueil, sections par rubrique). */
.gd-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.gd-section-head .gd-section-title { margin: 0; }
.gd-section-more {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gd-heading);
  text-decoration: none;
}
.gd-section-more:hover, .gd-section-more:focus-visible { color: var(--gd-teal); }

/* Chapô descriptif sous le titre d'une section rubrique (accueil) : remonté
   contre le titre, avec une respiration avant la grille de cartes. Classe
   dédiée plutôt qu'un style inline dans le template. */
.gd-rubric-desc { margin: -8px 0 16px; }

/* Petit libellé d'accentuation réutilisé (mega-menu, hero, listes
   secondaires) : même langage visuel — barre teal + caps discrètes — pour
   la cohérence demandée entre le menu et le reste du site. */
.gd-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-family: var(--gd-font-display);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gd-muted);
}
.gd-eyebrow::before {
  content: "";
  width: 3px;
  height: 12px;
  background: var(--gd-teal);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ==========================================================================
   Accueil : hero + grille
   ========================================================================== */
.gd-hero-section { padding-top: var(--gd-space-3); }
.gd-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gd-space-3);
}
@media (min-width: 1024px) {
  .gd-hero-grid { grid-template-columns: 2fr 1fr; align-items: stretch; }
}

.gd-hero-secondary-title {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gd-muted);
}
.gd-hero-secondary {
  display: flex;
  flex-direction: column;
  /* La colonne est étirée (align-items: stretch sur .gd-hero-grid) pour
     égaler la hauteur du hero : sans ça, les 3 cartes compactes, plus
     basses que le hero, laissaient un vide vertical disgracieux en bas de
     colonne. space-between répartit l'écart résiduel entre les cartes au
     lieu de l'accumuler en un seul bloc vide en bas. */
  justify-content: flex-start; /* N-01 : 2 articles secondaires, regroupés en haut */
  gap: var(--gd-space-3);
}
.gd-hero-secondary .gd-card--compact { padding-block: var(--gd-space-2); border-radius: 0; }
.gd-hero-secondary .gd-card--compact:first-of-type { padding-top: 0; }
.gd-hero-secondary .gd-card--compact:last-of-type { padding-bottom: 0; }
.gd-hero-secondary .gd-card--compact + .gd-card--compact { border-top: 1px solid var(--gd-border); }

/* ==========================================================================
   Bandes pleine largeur en alternance bleu nuit / blanc (accueil) — le blanc
   est le fond par défaut de la page (aucune classe à poser), cette classe ne
   sert que pour la bande nuit. Réutilisée par le pavé mission, le pavé
   Bornes et plusieurs sections rubrique/promotions/marques, dont l'ordre et
   la couleur sont décidés dans home.php ($bandIndex) plutôt que figés ici.
   ========================================================================== */
.gd-band--dark {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gd-night) 0%, #0f2c48 100%);
  color: #fff;
  padding-block: var(--gd-space-5);
}
.gd-band--dark::before {
  content: "";
  position: absolute;
  top: -140px;
  right: -100px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(23, 217, 163, 0.22), transparent 70%);
  pointer-events: none;
}
.gd-band--dark .gd-eyebrow { color: var(--gd-teal); }
.gd-band--dark .gd-eyebrow::before { background: var(--gd-teal); }
.gd-band--dark .gd-section-title { color: #fff; }
.gd-band--dark .gd-section-more { color: #fff; }
.gd-band--dark .gd-section-more:hover, .gd-band--dark .gd-section-more:focus-visible { color: var(--gd-teal); }
.gd-band--dark .gd-rubric-desc { color: rgba(255, 255, 255, 0.75); }

/* ==========================================================================
   Pavé mission — bandeau éditorial distinct du hero, contenu venant de la
   page statique "À propos" (route '/', variable $mission).
   ========================================================================== */
.gd-mission {
  /* Le fond bleu nuit + halo vient de .gd-band--dark (partagée avec les
     autres bandes alternées de l'accueil) ; cette classe reste toujours
     appliquée avec .gd-band--dark en pratique (bande d'ouverture, jamais en
     blanc — brief §3, seul bandeau éditorial "mise en avant" garanti). */
  margin-top: var(--gd-space-4);
}
.gd-mission-inner { max-width: 720px; position: relative; }
.gd-mission .gd-eyebrow { color: var(--gd-teal); }
.gd-mission .gd-eyebrow::before { background: var(--gd-teal); }
.gd-mission-text {
  margin: 0 0 var(--gd-space-2);
  font-size: 1.15rem;
  line-height: 1.6;
  color: #fff;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}
.gd-mission-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid var(--gd-teal);
  padding-bottom: 2px;
}
.gd-mission-link:hover, .gd-mission-link:focus-visible { color: var(--gd-teal); }

/* Cartes de navigation catalogue (accueil), sur le modèle des 3 grandes
   cartes cliquables de la page d'accueil de Moteur.ma (Voitures/Motos/
   Camions) — adaptées à la structure GreenDrive (Modèles/Comparateur/
   Bornes/Distributeurs). */
.gd-home-nav {
  display: grid; grid-template-columns: 1fr; gap: var(--gd-space-2);
  margin: var(--gd-space-4) 0;
}
/* 6 pavés côte à côte sur une seule ligne en grand écran (demande 2026-12-03) ;
   3 par ligne sur tablette, 2 sur mobile. */
@media (min-width: 480px) { .gd-home-nav { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .gd-home-nav { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) {
  .gd-home-nav { grid-template-columns: repeat(6, 1fr); }
}
.gd-home-nav-card {
  display: flex; flex-direction: column; gap: 4px;
  border: 2px solid rgba(11, 27, 46, 0.09); border-radius: var(--gd-radius-lg);
  padding: var(--gd-space-3); text-decoration: none; color: inherit;
  background: var(--gd-surface);
  box-shadow: var(--gd-shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.gd-home-nav-card:hover, .gd-home-nav-card:focus-visible { border-color: var(--gd-teal); box-shadow: var(--gd-shadow-lg); transform: translateY(-4px); }
.gd-home-nav-title { font-weight: 800; font-size: 1.1rem; color: var(--gd-heading); }
@media (min-width: 1024px) {
  .gd-home-nav-card { padding: var(--gd-space-2); }
  .gd-home-nav-title { font-size: 1rem; }
}

/* Pavé "Trouver un véhicule neuf" (accueil, entre la bande mission et le
   hero éditorial) — pavé à part entière, visuellement distinct des bandes
   pleine largeur (fond bg-alt teinté teal + bordure, comme un encart). Vrai
   formulaire GET plutôt que des menus "jump" indépendants : marque et
   énergie se combinent et se valident ensemble via un seul bouton
   (/modeles?vue=modeles accepte les deux filtres à la fois). */
.gd-quickfind {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gd-space-3) var(--gd-space-4);
  margin: var(--gd-space-4) auto;
  padding: var(--gd-space-4);
  background: var(--gd-surface);
  border: 2px solid var(--gd-teal);
  border-radius: var(--gd-radius-lg);
  box-shadow: var(--gd-shadow-lg);
}
.gd-quickfind-label {
  margin: 0;
  font-family: var(--gd-font-display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--gd-heading);
  flex-shrink: 0;
}
/* Deux lignes empilées : marque/modèle/énergie, puis budget min/max +
   bouton — chaque ligne est son propre rang flex (.gd-quickfind-row), la
   deuxième visuellement détachée par une séparation fine (mets en forme
   demandé explicitement, pour ne pas laisser les deux lignes se confondre). */
.gd-quickfind-form { display: flex; flex-direction: column; gap: 14px; flex: 1; min-width: 280px; }
.gd-quickfind-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.gd-quickfind-row--budget { padding-top: 14px; border-top: 1px solid var(--gd-border); }
/* Pousse Réinitialiser + Rechercher à droite de la ligne budget : la marge
   auto ne s'applique qu'au premier des deux boutons, mais comme ce sont des
   frères flex consécutifs, elle repousse le groupe entier vers la droite. */
#gd-qf-reset {
  margin-left: auto;
  background: var(--energy-phev);
  color: #fff;
  border-color: var(--energy-phev);
}
#gd-qf-reset:hover { background: var(--energy-phev); filter: brightness(0.92); }
.gd-quickfind-submit { flex-shrink: 0; }
/* Un champ = libellé visible (même style que .gd-field label, formulaires
   du site) + son contrôle — la taille de flex vit sur le wrapper, pas sur
   le contrôle lui-même (qui remplit juste sa largeur à 100%). */
.gd-quickfind-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; min-width: 140px; }
/* Budget min/max élargis (plus que marque/modèle/énergie) pour occuper
   l'espace laissé par les boutons repoussés à droite. */
.gd-quickfind-row--budget .gd-quickfind-field { flex: 1 1 240px; min-width: 200px; }
.gd-quickfind-field label {
  font-family: var(--gd-font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gd-muted);
}
.gd-quickfind-select {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--gd-font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gd-text);
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius);
  box-shadow: var(--gd-shadow-sm);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.gd-quickfind-select:hover, .gd-quickfind-select:focus-visible { border-color: var(--gd-teal); box-shadow: var(--gd-shadow-md); }
/* Budget min/max (nombre) réutilisent .gd-quickfind-select pour rester
   visuellement identiques aux <select> — seul le curseur diffère (un champ
   de saisie n'est pas "cliquable" comme un menu). */
input.gd-quickfind-select { cursor: text; }

/* Pavé Bornes (accueil) — le fond (nuit ou blanc) est posé par .gd-band--dark
   une bande sur deux (voir home.php $bandIndex) ; cette classe ne garde que
   l'espacement vertical, commun aux deux états. */
.gd-bornes-pave { padding-block: var(--gd-space-5); margin-top: var(--gd-space-4); margin-bottom: var(--gd-space-4); }
.gd-bornes-pave-text p { margin: var(--gd-space-2) 0 var(--gd-space-3); }
.gd-bornes-pave-inner { display: grid; grid-template-columns: 1fr; gap: var(--gd-space-3); }
@media (min-width: 1024px) { .gd-bornes-pave-inner { grid-template-columns: 1fr 1fr; align-items: center; } }
.gd-bornes-pave-text p { color: var(--gd-text); margin: var(--gd-space-2) 0 var(--gd-space-3); }
.gd-bornes-pave-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--gd-space-2); }

/* Grille de cartes */
.gd-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gd-space-3);
}
@media (min-width: 768px) {
  .gd-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .gd-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .gd-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .gd-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
}
.gd-home-brand-grid .gd-org-card { padding: var(--gd-space-2) var(--gd-space-1); }

/* Bande "Offres du moment" (accueil) : logos de marques en défilement
   horizontal, avec flèches manuelles des deux côtés + avance automatique
   par petits pas (JS, voir home.php) — même patron que les autres
   carrousels du site (Offres, pub), remplace l'ancienne boucle CSS pure en
   keyframes qui ne permettait aucun contrôle manuel. Dégradé sur les bords
   (mask-image) plutôt qu'une coupure nette. */
.gd-brand-scroll { display: flex; align-items: center; gap: var(--gd-space-2); }
.gd-brand-scroll-label {
  flex-shrink: 0;
  margin: 0;
  font-family: var(--gd-font-display);
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.15;
  color: var(--gd-heading);
}
.gd-brand-scroll-label--green { color: var(--gd-teal); }
.gd-brand-scroll-label--blue { color: var(--gd-heading); }
.gd-brand-scroll-viewport {
  flex: 1;
  min-width: 0;
  /* "hidden" et non "auto" : le rail ne défile plus par scrollLeft natif
     (bogue de bouclage — voir commentaire du script) mais par transform,
     appliqué en JS sur .gd-brand-scroll-track. La zone visible se contente
     de rogner ce qui dépasse. */
  overflow: hidden;
  /* Une simple marge verticale pour ne pas rogner le survol d'un pavé
     (translateY -3px + ombre --gd-shadow-md, qui déborde d'environ 16-20px
     au-dessus du pavé). 24px de chaque côté pour contenir largement
     l'ombre, pas seulement le déplacement du pavé. */
  padding-block: 24px;
  margin-block: -24px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
}
.gd-brand-scroll-track {
  display: flex;
  gap: var(--gd-space-2);
  width: max-content;
  padding: 0 4px;
  will-change: transform;
}
/* Pavé compact "Offres du moment" : icône carrée toute petite aux couleurs
   de la marque (variable CSS posée en inline par brand-chip.php), logo à
   la place d'un texte dans le carré — le nom de marque + le modèle de
   l'offre sont en légende dessous. color-mix() pour teinter le fond sans
   recalculer une valeur rgba() côté PHP à chaque marque. */
.gd-brand-chip-wrap {
  flex: 0 0 92px;
  width: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  text-align: center;
}
.gd-brand-chip {
  --brand-color: var(--gd-teal);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand-color) 14%, #fff);
  border: 2px solid var(--brand-color);
  box-shadow: var(--gd-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gd-brand-chip-wrap:hover .gd-brand-chip,
.gd-brand-chip-wrap:focus-visible .gd-brand-chip { transform: translateY(-3px); box-shadow: var(--gd-shadow-md); }
.gd-brand-chip img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gd-brand-chip-fallback { font-family: var(--gd-font-display); font-weight: 800; font-size: 1rem; color: var(--brand-color); }
.gd-brand-chip-caption {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  max-width: 100%;
}
.gd-brand-chip-caption strong {
  font-family: var(--gd-font-display);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--gd-text);
}
.gd-brand-chip-caption span {
  /* Nom complet du modèle, jamais tronqué — retour à la ligne plutôt
     qu'une ellipse si ça ne tient pas sur une seule ligne (ex. "Tasman
     Double cabine", "Nouveau OPEL Astra"). */
  font-size: 0.68rem;
  color: var(--gd-muted);
  white-space: normal;
  overflow-wrap: break-word;
}
.gd-band--dark .gd-brand-chip-caption strong { color: #fff; }
.gd-band--dark .gd-brand-chip-caption span { color: rgba(255, 255, 255, 0.7); }
@media (prefers-reduced-motion: reduce) {
  .gd-brand-chip { transition: none; }
  .gd-brand-chip-wrap:hover .gd-brand-chip { transform: none; }
}

@media (max-width: 640px) {
  .gd-brand-scroll-label { font-size: 1.05rem; }
  .gd-offres-nav { width: 30px; height: 30px; font-size: 1.1rem; }
}

/* ==========================================================================
   Carte article — standard, compacte (hero secondaire), grande (hero)
   Réutilisée sur l'accueil et les futures pages hub (design brief §7.3).

   Le pavé entier est le lien (élément racine <a class="gd-card">) : le
   titre n'a plus d'apparence de lien (couleur héritée, pas de
   soulignement), toute l'affordance "cliquable" vient de l'état
   hover/focus-visible du pavé (ombre, léger déplacement, zoom discret de
   l'image, teinte du titre).
   ========================================================================== */
.gd-card {
  border: 1px solid rgba(11, 27, 46, 0.09);
  border-radius: var(--gd-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--gd-surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--gd-shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.gd-card:hover, .gd-card:focus-visible {
  box-shadow: var(--gd-shadow-lg);
  transform: translateY(-4px);
  border-color: var(--gd-teal);
}
.gd-card-media { position: relative; display: block; overflow: hidden; }
.gd-card-media img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--gd-border);
  display: block;
  transition: transform 0.35s ease;
}
.gd-card:hover .gd-card-media img, .gd-card:focus-visible .gd-card-media img { transform: scale(1.045); }
.gd-card-media .gd-tag { position: absolute; top: 10px; left: 10px; }
.gd-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 27, 46, 0.28);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gd-video-play::before {
  content: "";
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(11, 27, 46, 0.55);
  backdrop-filter: blur(2px);
}
.gd-video-play::after {
  content: "▶";
  position: relative;
  color: #fff;
  font-size: 1.1rem;
  margin-left: 3px;
}
.gd-card:hover .gd-video-play, .gd-card:focus-visible .gd-video-play { opacity: 1; }
.gd-card-body { padding: var(--gd-space-2); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.gd-card-title { margin: 0; font-size: 1.05rem; line-height: 1.35; font-weight: 800; color: var(--gd-text); transition: color 0.15s ease; }
.gd-card:hover .gd-card-title, .gd-card:focus-visible .gd-card-title { color: var(--gd-heading); }
.gd-card-excerpt { margin: 0; color: var(--gd-muted); font-size: 0.9rem; line-height: 1.5; }
.gd-card .meta { color: var(--gd-muted); font-size: 0.8rem; margin-top: auto; }

/* Carte "à la une" : grande image plein cadre, texte en surimpression.
   Hauteur pilotée par un ratio (16:9, déjà la référence des couvertures
   d'article — brief §7.4) plutôt qu'une valeur fixe : le pavé reste
   proportionné à la largeur réelle de sa colonne à toutes les tailles
   d'écran (mobile pleine largeur, tablette pleine largeur, desktop 2/3 de
   la grille hero) au lieu d'une hauteur minimale figée qui devenait soit
   trop haute/carrée sur mobile, soit trop plate sur tablette large.
   `min-height` ne sert plus que de filet de sécurité sur les très petits
   écrans pour garder assez de place au titre/résumé en surimpression. */
.gd-card--hero {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 220px;
  border: 0;
  color: #fff;
  background: var(--gd-night);
  display: flex;
  align-items: flex-end;
}
.gd-card--hero .gd-card-media { position: absolute; inset: 0; }
.gd-card--hero .gd-card-media img { width: 100%; height: 100%; aspect-ratio: auto; }
.gd-card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 27, 46, 0) 25%, rgba(11, 27, 46, 0.94) 100%);
}
.gd-card--hero .gd-card-body {
  position: relative;
  z-index: 2;
  padding: var(--gd-space-4);
  gap: 10px;
}
.gd-card--hero .gd-card-title { font-size: clamp(1.4rem, 1rem + 1.6vw, 2.1rem); color: #fff; }
.gd-card--hero:hover .gd-card-title, .gd-card--hero:focus-visible .gd-card-title { color: #fff; }
.gd-card--hero .gd-card-excerpt { color: rgba(255, 255, 255, 0.85); max-width: 620px; }
.gd-card--hero .meta { color: rgba(255, 255, 255, 0.75); }

/* Carte compacte : liste secondaire à côté du hero. */
.gd-card--compact {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  border: 0;
}
.gd-card--compact:hover, .gd-card--compact:focus-visible { transform: none; box-shadow: none; }
.gd-card--compact .gd-card-media { flex: 0 0 104px; width: 104px; border-radius: 8px; overflow: hidden; }
.gd-card--compact .gd-card-media img { aspect-ratio: 4/3; border-radius: 8px; }
.gd-card--compact .gd-card-body { padding: 0; gap: 4px; }
.gd-card--compact .gd-card-title { font-size: 0.92rem; line-height: 1.35; }

.gd-empty {
  padding: var(--gd-space-4);
  text-align: center;
  color: var(--gd-muted);
  border: 1px dashed var(--gd-border);
  border-radius: var(--gd-radius);
}

/* ==========================================================================
   Page article — rythme de lecture (design brief §7.1 : 680-760px)
   ========================================================================== */
.gd-article {
  padding-top: var(--gd-space-3);
  padding-bottom: var(--gd-space-5);
  max-width: 760px;
}
.gd-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--gd-muted);
  font-size: 0.85rem;
  margin-bottom: var(--gd-space-2);
}
.gd-breadcrumb a { color: var(--gd-muted); text-decoration: none; }
.gd-breadcrumb a:hover, .gd-breadcrumb a:focus-visible { color: var(--gd-heading); text-decoration: underline; }
.gd-breadcrumb .sep { opacity: 0.6; }

.gd-article-header { margin-bottom: var(--gd-space-3); }
.gd-article-header h1 {
  font-size: clamp(1.7rem, 1.1rem + 2vw, 2.5rem);
  margin: 8px 0 12px;
}
.gd-article-subtitle {
  font-size: 1.15rem;
  color: var(--gd-muted);
  line-height: 1.5;
  margin: 0 0 16px;
  font-weight: 400;
}
.gd-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--gd-muted);
  font-size: 0.9rem;
}
.gd-article-meta .dot::before { content: "\00b7"; margin: 0 6px; opacity: 0.7; }
.gd-article-meta strong { color: var(--gd-text); }

.gd-article-byline { display: flex; align-items: center; gap: 10px; }
.gd-article-byline strong { display: block; color: var(--gd-text); font-size: 0.95rem; }
.gd-article-byline .gd-article-meta { margin-top: 1px; }
.gd-author-avatar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gd-teal);
  color: var(--gd-night);
  font-family: var(--gd-font-display);
  font-weight: 800;
  font-size: 0.95rem;
  overflow: hidden;
}
.gd-author-avatar img { width: 100%; height: 100%; object-fit: cover; }

.gd-author-card {
  display: flex;
  gap: var(--gd-space-2);
  align-items: flex-start;
  margin-top: var(--gd-space-4);
  padding: var(--gd-space-3);
  background: var(--gd-bg-alt);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-lg);
}
.gd-author-avatar--lg { width: 56px; height: 56px; font-size: 1.3rem; }
.gd-author-card-name { margin: 0 0 4px; font-family: var(--gd-font-display); font-weight: 800; color: var(--gd-heading); }
.gd-author-card-bio { margin: 0; color: var(--gd-muted); font-size: 0.92rem; line-height: 1.5; }

.gd-article-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--gd-radius-lg);
  margin: var(--gd-space-3) 0;
  display: block;
  background: var(--gd-border);
}

.gd-article-body {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--gd-text);
}
.gd-article-body > * + * { margin-top: var(--gd-space-3); }
.gd-article-body h2 { font-size: 1.5rem; margin-top: var(--gd-space-4); }
.gd-article-body h3 { font-size: 1.2rem; margin-top: var(--gd-space-3); }
.gd-article-body p { margin: 0; }
.gd-article-body ul, .gd-article-body ol { padding-left: 1.3em; }
.gd-article-body li + li { margin-top: 6px; }
.gd-article-body a { color: var(--gd-heading); text-decoration-color: var(--gd-teal); text-decoration-thickness: 2px; }
.gd-article-body a:hover, .gd-article-body a:focus-visible { color: var(--gd-teal); }

.gd-block-texte { font-size: 1.125rem; line-height: 1.75; }

.gd-block-image { margin: 0; }
.gd-block-image img { width: 100%; object-fit: cover; border-radius: var(--gd-radius-lg); display: block; }
.gd-block-image figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--gd-muted);
}
.gd-block-image figcaption .legende { color: var(--gd-text); }
.gd-block-image figcaption .credit { font-style: italic; }
.gd-block-image figcaption .legende + .credit::before { content: "\2014"; margin: 0 6px; font-style: normal; }

.gd-block-citation {
  position: relative;
  margin: 0;
  padding: var(--gd-space-2) var(--gd-space-3);
  border: 2px solid var(--gd-teal);
  background: var(--gd-soft, #F3FDF9);
  border-radius: var(--gd-radius-lg);
}
.gd-block-citation p {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--gd-heading);
}
.gd-block-citation cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--gd-muted);
}

.gd-block-cta {
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-lg);
  padding: var(--gd-space-3);
  text-align: center;
  background: var(--gd-soft, #F7FAF9);
}

/* Encadré éditorial (référentiel technique, avertissement...) — même
   famille visuelle que la citation (bordure teal) mais fond neutre pour ne
   pas être confondu avec une citation. */
.gd-block-encadre {
  margin: 0;
  padding: var(--gd-space-2) var(--gd-space-3);
  border: 2px solid var(--gd-teal);
  border-radius: var(--gd-radius-lg);
  background: var(--gd-bg);
}
.gd-block-encadre-titre {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gd-muted);
}
.gd-block-encadre p:last-child { margin: 0; font-size: 0.95rem; }

/* Tableau comparatif dans un article : scroll horizontal propre sur mobile
   plutôt que de casser la mise en page (design brief — ne jamais laisser le
   corps de page défiler horizontalement). */
.gd-block-tableau { overflow-x: auto; margin: var(--gd-space-2) 0; }
.gd-block-tableau table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.gd-block-tableau th, .gd-block-tableau td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--gd-border);
  text-align: left;
  white-space: nowrap;
}
.gd-block-tableau th { color: var(--gd-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.gd-block-cta p { margin: 0 0 12px; font-size: 1.05rem; }

/* Vidéo YouTube intégrée — même habillage légende/crédit que .gd-block-image,
   ratio 16:9 forcé pour éviter tout CLS pendant le chargement de l'iframe. */
.gd-block-video { margin: 0; }
.gd-block-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--gd-radius-lg);
  overflow: hidden;
  background: var(--gd-night);
}
.gd-block-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.gd-block-video figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--gd-muted);
}
.gd-block-video figcaption .legende { color: var(--gd-text); }
.gd-block-video figcaption .credit { font-style: italic; }
.gd-block-video figcaption .legende + .credit::before { content: "\2014"; margin: 0 6px; font-style: normal; }

/* Galerie — grille responsive, chaque image garde sa propre légende/crédit
   (pas de légende commune à toute la galerie). */
.gd-block-galerie {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gd-space-2);
}
.gd-block-galerie-item { margin: 0; }
.gd-block-galerie-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--gd-radius);
  display: block;
  background: var(--gd-border);
}
.gd-block-galerie-item figcaption {
  margin-top: 6px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--gd-muted);
}
.gd-block-galerie-item figcaption .legende { color: var(--gd-text); }
.gd-block-galerie-item figcaption .credit { font-style: italic; }
.gd-block-galerie-item figcaption .legende + .credit::before { content: "\2014"; margin: 0 4px; font-style: normal; }

/* Section Sources — regroupée en fin d'article, visuellement distincte du
   corps éditorial (design brief §7.4). */
.gd-sources {
  margin-top: var(--gd-space-4);
  padding: var(--gd-space-3);
  background: var(--gd-soft, #F7F9FA);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-lg);
}
.gd-sources h2 { margin: 0 0 12px; font-size: 1.1rem; }
.gd-sources ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: gd-source; }
.gd-sources li { counter-increment: gd-source; padding-left: 28px; position: relative; font-size: 0.92rem; line-height: 1.5; }
.gd-sources li::before {
  content: counter(gd-source);
  position: absolute;
  left: 0; top: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gd-teal);
  color: var(--gd-night);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gd-sources a { color: var(--gd-heading); font-weight: 600; text-decoration-color: var(--gd-teal); overflow-wrap: anywhere; }
.gd-sources a:hover, .gd-sources a:focus-visible { color: var(--gd-teal); }
.gd-sources .org { color: var(--gd-muted); }

/* Footer */
.gd-footer {
  background: var(--gd-night);
  color: #cfd8e3;
  margin-top: var(--gd-space-4);
  padding: var(--gd-space-4) 0;
}
.gd-footer a { color: #fff; text-decoration: none; }

.gd-newsletter {
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: var(--gd-space-3);
  margin-bottom: var(--gd-space-3);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--gd-space-3);
}
.gd-newsletter-form { flex: 1 1 320px; max-width: 420px; }
.gd-newsletter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.gd-newsletter-row input[type="email"] {
  flex: 1 1 200px;
  padding: 10px 12px;
  border-radius: var(--gd-radius);
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.gd-newsletter-row input[type="email"]::placeholder { color: #9fb0c0; }
.gd-newsletter-consent {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: #cfd8e3;
}
.gd-newsletter-consent input { margin-top: 3px; }

.gd-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: var(--gd-space-3);
  padding-bottom: var(--gd-space-3);
}
@media (max-width: 760px) {
  .gd-footer-grid { grid-template-columns: 1fr 1fr; }
}
.gd-footer-brand { grid-column: 1 / -1; max-width: 320px; }
@media (min-width: 761px) {
  .gd-footer-brand { grid-column: auto; max-width: none; }
}
.gd-footer-tagline { color: #9fb0c0; font-size: 0.88rem; line-height: 1.5; margin: var(--gd-space-1) 0 var(--gd-space-2); }
.gd-footer-social { display: flex; gap: 10px; }
.gd-footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px;
  background: rgba(255,255,255,0.08); color: #fff; transition: background 0.15s ease, color 0.15s ease;
}
.gd-footer-social a:hover, .gd-footer-social a:focus-visible { background: var(--gd-teal); color: var(--gd-night); }
.gd-footer-col { display: flex; flex-direction: column; gap: 8px; }
.gd-footer-col-title {
  font-family: var(--gd-font-display); font-size: 0.75rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--gd-teal); margin: 0 0 4px;
}
.gd-footer-col a { color: #cfd8e3; font-size: 0.9rem; }
.gd-footer-col a:hover, .gd-footer-col a:focus-visible { color: var(--gd-teal); }
.gd-footer-copy { border-top: 1px solid rgba(255,255,255,0.15); padding-top: var(--gd-space-2); color: #9fb0c0; font-size: 0.85rem; }

/* ==========================================================================
   En-tête de rubrique (/actu, /conso, /{parent}/{enfant}...)
   ========================================================================== */
.gd-category-header { margin-bottom: var(--gd-space-2); }
.gd-category-description { color: var(--gd-muted); font-size: 1.05rem; max-width: 640px; margin: 4px 0 0; }
.gd-category-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--gd-space-2) 0 var(--gd-space-4); }
.gd-category-chip {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--gd-border);
  color: var(--gd-text);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.gd-category-chip:hover, .gd-category-chip:focus-visible {
  border-color: var(--gd-teal);
  color: var(--gd-heading);
  background: var(--gd-bg-alt);
}

/* Formulaires (BO + leads publics) */
.gd-field { margin-bottom: var(--gd-space-2); display: flex; flex-direction: column; gap: 4px; }
.gd-field label { font-weight: 600; font-size: 0.9rem; }
.gd-field input:not([type="checkbox"]):not([type="radio"]), .gd-field select, .gd-field textarea {
  padding: 10px 12px;
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius);
  font-size: 1rem;
  font-family: inherit;
}
.gd-field input[type="checkbox"], .gd-field input[type="radio"] {
  width: auto;
  margin-right: 6px;
}
.gd-btn {
  display: inline-block;
  background: var(--gd-teal);
  color: var(--gd-night);
  font-family: var(--gd-font-display);
  font-weight: 700;
  border: none;
  border-radius: var(--gd-radius);
  padding: 12px 20px;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.gd-btn:hover { filter: brightness(0.95); box-shadow: var(--gd-shadow-sm); transform: translateY(-1px); }
.gd-btn:active { transform: translateY(0); }
.gd-btn.secondary { background: transparent; color: var(--gd-text); border: 1px solid var(--gd-border); }
.gd-btn.secondary:hover { border-color: var(--gd-teal); box-shadow: none; }
.gd-btn--small { padding: 6px 14px; min-height: auto; font-size: 0.85rem; }
@media (prefers-reduced-motion: reduce) {
  .gd-btn { transition: none; }
  .gd-btn:hover { transform: none; }
}

/* Rubrique Offres : pavé marques + carrousel de promotions */
.gd-offres-marques { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--gd-space-3) 0; }
.gd-offres-marque-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--gd-border); border-radius: 999px;
  padding: 6px 14px; font-size: 0.85rem; font-weight: 600;
  color: var(--gd-text); text-decoration: none; background: var(--gd-surface);
}
.gd-offres-marque-chip:hover, .gd-offres-marque-chip:focus-visible { border-color: var(--gd-teal); color: var(--gd-heading); }
.gd-offres-marque-chip img { height: 18px; width: auto; object-fit: contain; }

.gd-offres-carousel-wrap { position: relative; display: flex; align-items: center; gap: 8px; margin: var(--gd-space-3) 0; }
.gd-offres-carousel {
  display: flex; gap: var(--gd-space-2); overflow-x: auto; scroll-behavior: smooth;
  scroll-snap-type: x mandatory; padding-bottom: 6px; flex: 1;
}
.gd-offres-carousel::-webkit-scrollbar { height: 6px; }
.gd-offres-card {
  position: relative; flex: 0 0 220px; scroll-snap-align: start;
  border: 1px solid rgba(11, 27, 46, 0.09); border-radius: var(--gd-radius-lg);
  background: var(--gd-surface); text-decoration: none; color: inherit; overflow: hidden;
  box-shadow: var(--gd-shadow-sm);
  display: flex; flex-direction: column; transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.gd-offres-card:hover, .gd-offres-card:focus-visible { box-shadow: var(--gd-shadow-lg); transform: translateY(-4px); border-color: var(--gd-teal); }
.gd-offres-ribbon {
  position: absolute; top: 10px; left: -28px; transform: rotate(-45deg);
  background: var(--gd-danger); color: #fff; font-weight: 800; font-size: 0.7rem;
  padding: 3px 32px; z-index: 1;
}
.gd-offres-card-image { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--gd-bg); }
.gd-offres-card-body { padding: var(--gd-space-2); }
.gd-offres-price { font-size: 1.2rem; font-weight: 800; color: var(--gd-heading); margin: 2px 0; }
.gd-offres-nav {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--gd-border); background: var(--gd-surface); font-size: 1.3rem; line-height: 1;
  cursor: pointer; color: var(--gd-heading);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.gd-offres-nav:hover { border-color: var(--gd-teal); background: var(--gd-bg-alt); }

/* Pavés publicitaires réutilisables (bannieres) — un gabarit par format
   IAB déclaré sur emplacements_bannieres.format_recommande. Chaque
   gabarit fixe une largeur max ET un ratio (aspect-ratio + object-fit:
   cover) : le visuel est recadré pour remplir exactement la forme
   attendue de l'emplacement, jamais étiré ni affiché à sa taille native
   (un visuel de campagne fait ~970x630 quel que soit l'emplacement où il
   est réutilisé — sans ratio forcé, un pavé "haut de page" censé être une
   bannière fine ressortait aussi haut qu'une photo produit). */
.gd-pub { margin: var(--gd-space-3) auto; text-align: center; }
.gd-pub-label { display: block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gd-muted); margin-bottom: 4px; }
.gd-pub-link { display: block; max-width: 100%; }
.gd-pub-link img { display: block; width: 100%; height: 100%; border-radius: var(--gd-radius); object-fit: contain; }
/* Même langage "premium" que le reste des pavés du site (ombre au repos,
   accentuation au survol) — avant, un visuel publicitaire s'affichait à
   plat, sans aucune profondeur, alors que tout le reste du site en a
   depuis la passe de finition. Pas sur la variante native (déjà un cadre
   pointillé volontairement discret pour se distinguer d'un vrai visuel). */
.gd-pub-link:not(.gd-pub-link--native) {
  border-radius: var(--gd-radius);
  overflow: hidden;
  box-shadow: var(--gd-shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.gd-pub-link:not(.gd-pub-link--native):hover,
.gd-pub-link:not(.gd-pub-link--native):focus-visible {
  box-shadow: var(--gd-shadow-md);
  transform: translateY(-2px);
}

/* Leaderboard — bannière fine "haut de page" (accueil hors hero, fiches
   modèle, catalogue, articles, footer). Ratio 1116:170 = dimensions
   réelles des visuels fournis (Kia/Citroën/Leapmotor), pas le format IAB
   728:90 générique — avec object-fit:cover, un ratio de gabarit différent
   du ratio réel de l'image recadre à tort une partie du visuel. Sur
   mobile, un ratio aussi large serait illisible : repasse en "pavé
   mobile" proche du carré, format standard sur les réseaux publicitaires
   (aucun visuel mobile dédié fourni, donc pas de ratio réel à y caler). */
.gd-pub--leaderboard { max-width: 1120px; }
.gd-pub--leaderboard .gd-pub-link { aspect-ratio: 1116 / 170; }
@media (max-width: 600px) {
  .gd-pub--leaderboard { max-width: 336px; }
  .gd-pub--leaderboard .gd-pub-link { aspect-ratio: 336 / 280; }
}

/* Large leaderboard (970x250) — hero pleine largeur (accueil). Aucun
   visuel réel fourni à ce format : ratio IAB générique conservé. */
.gd-pub--large-leaderboard { max-width: 970px; }
.gd-pub--large-leaderboard .gd-pub-link { aspect-ratio: 970 / 250; }
/* Mobile : bannière IAB 320x100 (visuel mobile dédié quand l'annonceur en fournit un). */
@media (max-width: 600px) {
  .gd-pub--large-leaderboard { max-width: 320px; }
  .gd-pub--large-leaderboard .gd-pub-link { aspect-ratio: 320 / 100; }
}

/* Medium rectangle — sidebar comparateur, milieu d'article. Ratio 400:300
   = dimensions réelles des visuels carrés fournis (Citroën/Leapmotor),
   pas le format IAB 300:250 générique (si Google Ad Manager sert un jour
   un vrai 300x250, ce ratio légèrement différent recadrera un peu son
   visuel — accepté pour l'instant : GAM est désactivé, cf. config.php). */
.gd-pub--rectangle { max-width: 300px; }
.gd-pub--rectangle .gd-pub-link { aspect-ratio: 300 / 250; }

/* Half page / skyscraper — sidebar fiche modèle, vertical. Ratio 356:400 =
   dimensions réelles des visuels verticaux fournis, bien moins étiré que
   le format IAB 300:600 générique (quasi carré, pas un vrai "skyscraper").
   Plus besoin d'un repli mobile spécifique : contrairement à un vrai
   300:600 (1:2), ce ratio proche du carré tient déjà bien sur un écran
   étroit. */
.gd-pub--skyscraper { max-width: 300px; }
.gd-pub--skyscraper .gd-pub-link { aspect-ratio: 300 / 600; }

/* Carrousel multi-campagnes (banniere-slot.php, mode $carousel=true) —
   utilisé quand plusieurs annonceurs sont actifs sur le même emplacement
   (ex. home_hero) : chaque campagne défile plutôt que de tirer une seule
   au hasard à chaque chargement. Boutons prev/next réutilisent le style
   déjà en place pour le carrousel de la page Offres (cohérence visuelle).
   Même format et mêmes dimensions que les autres bannières horizontales du
   site (leaderboard 728x90, .gd-pub--leaderboard) — même max-width que
   celle-ci pour rester visuellement identique (hors Offres véhicules). */
.gd-pub-carousel-block { margin: var(--gd-space-3) auto; max-width: 1120px; text-align: center; }
/* Hero de la homepage : seul cas où le carrousel casse le container
   standard (1200px) pour occuper toute la largeur de l'écran — traitement
   "hero" réservé à cette bannière précise, les autres bannières du site
   restent au gabarit partagé ci-dessus. calc(50% - 50vw) plutôt que
   width:100vw : évite le décalage lié à la largeur de la scrollbar. Le
   gouttière (padding-inline sur .gd-pub-carousel-wrap ci-dessous) garde les
   flèches à distance du bord de l'écran plutôt que collées dessus. */
.gd-pub-carousel-block[data-emplacement="home_hero"] {
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.gd-pub-carousel-wrap { display: flex; align-items: center; gap: 8px; }
.gd-pub-carousel-block[data-emplacement="home_hero"] .gd-pub-carousel-wrap { padding-inline: 64px; }
@media (max-width: 700px) {
  .gd-pub-carousel-block[data-emplacement="home_hero"] .gd-pub-carousel-wrap { padding-inline: 12px; }
}
.gd-pub-carousel {
  display: flex;
  flex: 1;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  gap: 0;
}
.gd-pub-carousel::-webkit-scrollbar { display: none; }
.gd-pub-carousel-slide { flex: 0 0 100%; scroll-snap-align: start; padding: 0 2px; }
/* Carrousel = billboards IAB 970x250 (décembre 2026) ; 320x100 sur mobile. */
.gd-pub-carousel-slide .gd-pub-link { aspect-ratio: 970 / 250; max-width: 970px; margin: 0 auto; }
@media (max-width: 600px) {
  .gd-pub-carousel-slide .gd-pub-link { aspect-ratio: 320 / 100; }
}

.gd-pub-link--native {
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  border: 1px dashed var(--gd-border); border-radius: var(--gd-radius-lg);
  padding: var(--gd-space-3); text-decoration: none; background: var(--gd-bg);
  min-width: 260px; aspect-ratio: auto;
}
.gd-pub-native-title { font-weight: 700; color: var(--gd-heading); }
.gd-pub-native-cta { font-size: 0.85rem; font-weight: 700; color: var(--gd-teal); }
.gd-pub[data-emplacement$="_sidebar"] .gd-pub-link--native { min-width: unset; width: 100%; }

/* Formulaire de demande d'offre */
/* Landing page de campagne (/offres-vehicules/{marque}/{modele}) : visuel
   carré de la campagne à côté du formulaire, jamais au-dessus (demande
   explicite) — colonne unique tant que l'écran n'a pas la place. */
.gd-offre-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gd-space-4);
  margin-top: var(--gd-space-3);
  align-items: start;
}
/* Visuel de la campagne sans cadre (ni bordure, ni fond, ni ombre) :
   horizontal -> au-dessus du formulaire ; autre format -> à gauche, en grand. */
@media (min-width: 860px) {
  .gd-offre-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .gd-offre-layout--sans-visuel { grid-template-columns: minmax(0, 1fr); }
}
.gd-offre-visual { border: 0; background: none; box-shadow: none; border-radius: 0; }
.gd-offre-visual img { width: 100%; height: auto; display: block; border-radius: 0; }
.gd-offre-visual--horizontale { margin-top: var(--gd-space-3); }
.gd-offre-layout--sans-visuel .gd-offre-form-col { max-width: 640px; }
.gd-offre-form-col { max-width: 480px; }

/* Comparateur */
.gd-cmp-selected { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--gd-space-2) 0; }
.gd-cmp-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gd-bg); border: 1px solid var(--gd-border); border-radius: 999px;
  padding: 6px 8px 6px 14px; font-size: 0.85rem; font-weight: 600;
}
.gd-cmp-chip a { color: var(--gd-muted); text-decoration: none; font-weight: 800; padding: 2px 6px; }
.gd-cmp-chip a:hover { color: var(--gd-danger); }
.gd-cmp-search { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: var(--gd-space-2) 0 var(--gd-space-3); }
.gd-cmp-search .gd-catalog-search { flex: 1; min-width: 220px; }
.gd-cmp-table-wrap { overflow-x: auto; margin: var(--gd-space-2) 0; }
.gd-cmp-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.gd-cmp-table th, .gd-cmp-table td { border-bottom: 1px solid var(--gd-border); padding: 10px 14px; text-align: left; font-size: 0.9rem; white-space: nowrap; }
.gd-cmp-table thead th { vertical-align: top; text-align: center; padding-top: var(--gd-space-2); }
/* Avant : ni hauteur ni ratio fixés, seulement une largeur max — chaque
   photo gardait sa hauteur native, donnant une rangée de véhicules à
   comparer visuellement inégale (une photo large et basse à côté d'une
   haute et étroite). aspect-ratio + object-fit: contain réserve la même
   case (140x100) à chaque véhicule, quelle que soit la forme de sa photo
   source — même traitement que .gd-org-card-image ailleurs sur le site. */
.gd-cmp-table thead img {
  max-width: 140px;
  width: 100%;
  aspect-ratio: 140 / 100;
  object-fit: contain;
  background: var(--gd-bg);
  border-radius: calc(var(--gd-radius) - 4px);
  display: block;
  margin: 0 auto 6px;
}
.gd-cmp-table thead .gd-cmp-name { font-weight: 800; }
.gd-cmp-table tbody th { color: var(--gd-muted); font-weight: 600; white-space: normal; }
.gd-cmp-table tbody td { font-weight: 700; color: var(--gd-text); text-align: center; }
.gd-cmp-category-row th { background: var(--gd-bg); color: var(--gd-text); text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.03em; }
.gd-cmp-table--equip tbody th { white-space: nowrap; }
.gd-cmp-table tbody td.gd-cmp-best { background: var(--gd-soft, #E9FBF4); color: var(--gd-success, #0E6B4E); border-radius: 6px; }
.gd-cmp-best-icon { color: var(--gd-teal); margin-left: 4px; font-size: 0.75em; }
.gd-cmp-chip { display: inline-flex; align-items: center; gap: 8px; }
.gd-cmp-chip img { width: 32px; height: 32px; object-fit: contain; border-radius: 4px; background: #fff; border: 1px solid var(--gd-border); }
.gd-alert { padding: 12px 16px; border-radius: var(--gd-radius); margin-bottom: var(--gd-space-2); }
.gd-alert.error { background: #FDEDED; color: #8A1F1F; border: 1px solid #F3C6C6; }
.gd-alert.success { background: var(--gd-soft, #E9FBF4); color: #0E6B4E; border: 1px solid #B7EEDA; }

/* Bandeau de consentement cookies */
.gd-cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--gd-night);
  color: #fff;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.2);
}
.gd-cookie-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--gd-space-2);
  padding-block: var(--gd-space-2);
}
.gd-cookie-banner-inner p { margin: 0; max-width: 640px; font-size: 0.9rem; }
.gd-cookie-banner-inner a { color: var(--gd-teal); }
.gd-cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.gd-cookie-actions .gd-btn.secondary { color: #fff; border-color: rgba(255,255,255,0.4); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Annuaire organisations (Distributeurs, Installateurs) — pavés + fiche
   détail. Pas d'image (logos non systématiquement disponibles) : le pavé
   s'appuie sur le nom, la ville et les badges (marques distribuées ou villes
   couvertes) plutôt que sur une photo — sauf le pavé véhicule (marque/
   modèle/version), qui affiche l'image du modèle quand elle est connue.
   ========================================================================== */
.gd-org-card {
  border: 1px solid rgba(11, 27, 46, 0.09);
  border-radius: var(--gd-radius);
  background: var(--gd-surface);
  padding: var(--gd-space-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--gd-shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.gd-org-card:hover, .gd-org-card:focus-visible, .gd-org-card:focus-within { box-shadow: var(--gd-shadow-lg); transform: translateY(-4px); border-color: var(--gd-teal); }
.gd-org-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  /* contain (pas cover) : les photos sources sont recadrées sur le
     véhicule (scripts/trim_vehicle_images.php), donc leur ratio varie
     beaucoup d'un modèle à l'autre (voiture large et basse après
     recadrage, etc.) — cover coupait les côtés des véhicules les plus
     "larges" pour remplir une boîte 16:10 fixe. contain montre toujours
     la voiture en entier ; le recadrage à la source suffit maintenant à
     garder une taille visuelle raisonnablement cohérente. */
  object-fit: contain;
  background: var(--gd-bg);
  border-radius: calc(var(--gd-radius) - 4px);
  transition: transform 0.2s ease;
}
.gd-org-card:hover .gd-org-card-image, .gd-org-card:focus-visible .gd-org-card-image { transform: scale(1.04); }
/* vehicle-card.php : l'emplacement image est toujours rendu, même sans
   photo réelle (35/431 modèles sans image_principale_url) — sinon ces
   pavés étaient plus courts que les autres et cassaient l'alignement
   uniforme de la grille. --wrap est un <span>, pas un <img> : object-fit
   ne s'y applique pas, reporté sur l'<img> imbriqué le cas échéant. */
/* align-items: flex-end (pas center) : les photos recadrées (voir
   trim_vehicle_images.php) varient beaucoup en ratio — une voiture large
   et basse flotte en bande fine centrée verticalement, une autre plus
   haute remplit presque toute la boîte. Sans alignement commun, le "sol"
   de chaque véhicule tombe à une hauteur différente d'un pavé à l'autre,
   et le texte juste en dessous (même niveau fixe, hauteur de boîte
   inchangée) paraît désaligné par rapport à la voiture au-dessus. */
.gd-org-card-image--wrap { display: flex; align-items: flex-end; justify-content: center; }
.gd-org-card-image--wrap img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gd-org-card-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gd-text);
  transition: color 0.15s ease;
  /* Hauteur réservée pour 2 lignes pile (même sans line-clamp support),
     avec troncature propre au-delà : un nom court ou long donne toujours
     le même espace au pavé, jamais une 3e ligne qui le grandirait. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.1rem * 1.25 * 2);
  line-height: 1.25;
}
.gd-org-card:hover .gd-org-card-name, .gd-org-card:focus-visible .gd-org-card-name { color: var(--gd-heading); }
/* Ligne sous-titre (badge énergie / nombre de versions) toujours rendue,
   même vide — sinon un pavé sans énergie ni versions remontait son prix
   d'une ligne par rapport aux autres. min-height calé sur le badge
   énergie (le plus haut des deux contenus possibles). */
.gd-org-card-city { margin: 0; color: var(--gd-muted); font-size: 0.85rem; min-height: 22px; display: flex; align-items: center; }
.gd-org-card-price { margin-top: auto; font-weight: 700; color: var(--gd-text); }
/* Pavé annuaire (organisation-card.php) avec bouton RDV intégré : le lien
   principal (nom/ville/extrait/badges) et le bouton "Réserver un RDV" sont
   deux enfants directs de .gd-org-card (devenu un <div> pour cet usage,
   .gd-org-card-inner porte le lien) — le bouton reste ainsi DANS la boîte
   du pavé (bordure/ombre/padding partagées), en bas, plutôt qu'un élément
   séparé en dessous. */
.gd-org-card-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  color: inherit;
  text-decoration: none;
}
.gd-org-card-rdv { text-align: center; }
.gd-org-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.gd-org-badge {
  display: inline-block;
  background: var(--gd-bg);
  border: 1px solid var(--gd-border);
  color: var(--gd-text);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}
.gd-org-badge--muted { color: var(--gd-muted); font-weight: 500; }

/* Marques distribuées (fiche distributeur) : un pavé cliquable par marque,
   renvoie vers la fiche marque du catalogue (/marques/{slug}, mêmes
   modèles que la rubrique Modèles). Palette reprise de .gd-energy-badge
   (même vocabulaire de couleurs déjà en place ailleurs sur le site) pour
   distinguer chaque marque au lieu d'un badge gris uniforme. */
.gd-org-badge-link {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gd-org-badge-link:hover, .gd-org-badge-link:focus-visible { transform: translateY(-1px); box-shadow: var(--gd-shadow-sm); }
.gd-org-badge-link--c0 { background: var(--energy-bev); color: var(--gd-night); }
.gd-org-badge-link--c1 { background: var(--energy-phev); }
.gd-org-badge-link--c2 { background: var(--energy-hev); }
.gd-org-badge-link--c3 { background: var(--energy-mhev); color: var(--gd-night); }
.gd-org-badge-link--c4 { background: var(--energy-reev); }
.gd-org-badge-link--c5 { background: var(--energy-thermique); }
@media (prefers-reduced-motion: reduce) {
  .gd-org-badge-link { transition: none; }
  .gd-org-badge-link:hover { transform: none; }
}

/* Logo marque sur le pavé /modeles?vue=marques — hauteur ET largeur
   réservées identiques sur chaque pavé (avant : juste height:32px sur
   l'image, sans conteneur ni contrainte de largeur, donc étirée par le
   flex du pavé et de taille apparente différente selon la forme propre de
   chaque logo). object-fit + max-height/max-width sur l'image : jamais de
   déformation, chaque logo garde ses proportions dans un espace identique. */
.gd-brand-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  width: 100%;
}
.gd-brand-card-logo img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
@media (prefers-reduced-motion: reduce) {
  .gd-org-card, .gd-org-card-image, .gd-org-card-name { transition: none; }
  .gd-org-card:hover { transform: none; }
}

/* Estimateur de coût énergétique — état initial (avant toute recherche) :
   3 étapes numérotées pour donner de la substance à la page plutôt qu'un
   simple champ de texte isolé, puis des raccourcis marque en-dessous. */
.gd-est-step {
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-lg);
  padding: var(--gd-space-3);
  background: var(--gd-surface);
}
.gd-est-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gd-teal);
  color: #fff;
  font-weight: 700;
  margin-bottom: var(--gd-space-2);
}
.gd-est-step h3 { margin: 0 0 4px; font-size: 1rem; }
.gd-est-brand-card { padding: var(--gd-space-2); text-align: center; align-items: center; }
.gd-est-brand-card .gd-org-card-name { font-size: 0.9rem; }
.gd-est-mode-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: var(--gd-space-3) 0 var(--gd-space-2); }

.gd-org-detail-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--gd-space-2); justify-content: space-between; }
.gd-org-coord { border: 1px solid var(--gd-border); border-radius: var(--gd-radius); padding: var(--gd-space-2) var(--gd-space-3); background: var(--gd-surface); margin: var(--gd-space-3) 0; }
.gd-org-coord dt { font-weight: 700; color: var(--gd-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 10px; }
.gd-org-coord dt:first-child { margin-top: 0; }
.gd-org-coord dd { margin: 2px 0 0; }

/* Liens applications mobiles (opérateurs de recharge type FastVolt/Kilowatt,
   dont l'essentiel de l'usage passe par l'appli) */
.gd-org-apps { margin: var(--gd-space-3) 0; }
.gd-org-apps-label { font-weight: 700; color: var(--gd-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 8px; }
.gd-org-apps-links { display: flex; flex-wrap: wrap; gap: 10px; }
.gd-org-services { display: grid; gap: var(--gd-space-2); margin: var(--gd-space-3) 0; }

/* ==========================================================================
   Catalogue véhicules (Marques -> Modèles -> Versions) — tableau de specs
   ========================================================================== */
.gd-specs-table { width: 100%; border-collapse: collapse; margin: var(--gd-space-3) 0; }
.gd-specs-table tr { border-bottom: 1px solid var(--gd-border); }
.gd-specs-table th, .gd-specs-table td { text-align: left; padding: 10px 12px; font-size: 0.92rem; }
.gd-specs-table th { color: var(--gd-muted); font-weight: 600; width: 45%; }
.gd-specs-table td { font-weight: 700; color: var(--gd-text); }
.gd-price-block { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: var(--gd-space-2) 0; }
.gd-price-block .price { font-size: 1.6rem; font-weight: 800; color: var(--gd-text); }
.gd-price-block .price--promo { color: var(--gd-danger); }
.gd-price-block .price--strike { text-decoration: line-through; color: var(--gd-muted); font-size: 1.1rem; font-weight: 600; }

/* Équipements par catégorie (fiche version + comparateur) */
.gd-equip-category { margin: var(--gd-space-3) 0 var(--gd-space-1); font-size: 1rem; color: var(--gd-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.gd-equip-list { list-style: none; margin: 0 0 var(--gd-space-2); padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.gd-equip-item { font-size: 0.9rem; display: flex; align-items: baseline; gap: 6px; }
.gd-equip-item.is-unavailable { color: var(--gd-muted); }
.gd-equip-icon { font-weight: 800; }
.gd-equip-item.is-available .gd-equip-icon { color: var(--gd-success, #1a8f4c); }
.gd-equip-item.is-unavailable .gd-equip-icon { color: var(--gd-muted); }
.gd-equip-item.is-option .gd-equip-icon { color: var(--gd-success, #1a8f4c); }
.gd-equip-item.is-unknown { color: var(--gd-muted); }
.gd-equip-item.is-mesure .gd-equip-val { font-weight: 700; }
.gd-equip-icon.is-available, .gd-equip-icon.is-option { color: var(--gd-success, #1a8f4c); }
.gd-equip-icon.is-unavailable, .gd-equip-icon.is-unknown { color: var(--gd-muted); }

/* Sélecteur de vue /modeles (Énergies / Marques / Modèles) */
.gd-mode-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gd-space-2); margin: var(--gd-space-3) 0 var(--gd-space-4); }
.gd-mode-card {
  display: block;
  text-align: center;
  border: 2px solid rgba(11, 27, 46, 0.09);
  border-radius: var(--gd-radius-lg);
  padding: var(--gd-space-3) var(--gd-space-2);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--gd-text);
  text-decoration: none;
  background: var(--gd-surface);
  box-shadow: var(--gd-shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.gd-mode-card:hover, .gd-mode-card:focus-visible { border-color: var(--gd-teal); box-shadow: var(--gd-shadow-lg); transform: translateY(-4px); }
.gd-mode-card.is-active { border-color: var(--gd-night); background: var(--gd-night); color: #fff; }

/* Recherche catalogue (filtre client, sans rechargement) */
.gd-catalog-search { display: flex; align-items: center; gap: 8px; max-width: 420px; margin-bottom: var(--gd-space-3); border: 1px solid var(--gd-border); border-radius: var(--gd-radius); padding: 8px 14px; background: var(--gd-surface); }
.gd-catalog-search input { border: none; outline: none; flex: 1; font-size: 0.95rem; background: transparent; }

/* Pavé énergie (case à cocher) */
.gd-energy-card { position: relative; cursor: pointer; }
.gd-energy-card-input { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; cursor: pointer; }
.gd-energy-card.is-checked { border-color: var(--gd-teal); box-shadow: 0 0 0 2px var(--gd-teal) inset; }
.gd-energy-submit { margin-top: var(--gd-space-1); }

/* Bornes — barre de filtres (ville/connecteur/puissance/statut, inspirée de
   la barre horizontale au-dessus de la carte sur moteur.ma) */
.gd-bornes-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: var(--gd-space-2); }
.gd-bornes-filters select {
  padding: 8px 12px;
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--gd-surface);
}

/* Bornes — carte + liste côte à côte (demande explicite : la liste doit
   être visible À CÔTÉ de la carte, pas en-dessous dans le flux) — colonne
   unique tant que l'écran n'a pas la place, la liste passe alors après la
   carte plutôt que de forcer 2 colonnes étroites. Même hauteur fixe sur les
   deux pour que la liste défile (scroll interne) à côté d'une carte stable,
   plutôt que d'allonger toute la page. */
.gd-bornes-map-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gd-space-3);
  align-items: start;
  margin: var(--gd-space-2) 0 var(--gd-space-4);
}
@media (min-width: 900px) {
  .gd-bornes-map-layout { grid-template-columns: minmax(0, 1fr) 380px; }
}
.gd-bornes-map { height: 560px; border-radius: var(--gd-radius); border: 1px solid var(--gd-border); }
.gd-bornes-list-panel {
  height: 560px;
  overflow-y: auto;
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius);
  padding: var(--gd-space-2) var(--gd-space-3);
  background: var(--gd-bg);
}
@media (min-width: 900px) {
  .gd-bornes-list-panel { position: sticky; top: calc(var(--gd-header-h) + 16px); }
}

/* Bornes — regroupement région > ville */
.gd-bornes-region { margin-top: var(--gd-space-5); }
.gd-bornes-region:first-child { margin-top: 0; }
.gd-bornes-region-title { border-bottom: 2px solid var(--gd-night); padding-bottom: 8px; margin-bottom: var(--gd-space-2); font-size: 1.05rem; }
.gd-bornes-ville-group { margin-top: var(--gd-space-3); }
.gd-bornes-ville-title { font-size: 0.95rem; font-weight: 700; color: var(--gd-muted); margin: 0 0 8px; display: flex; align-items: baseline; gap: 6px; }

/* Bornes — liste en panneau latéral : une seule colonne compacte, plus
   lisible qu'une grille à 3 colonnes une fois réduite à ~380px de large. */
.gd-bornes-list { display: flex; flex-direction: column; gap: var(--gd-space-2); }
.gd-bornes-card { padding: var(--gd-space-2) var(--gd-space-3); }
.gd-bornes-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.gd-bornes-card-head .gd-org-card-name { margin: 0; font-size: 1rem; }
.gd-bornes-status {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.gd-bornes-status--disponible { background: color-mix(in srgb, var(--gd-success, #1a8f4c) 15%, transparent); color: var(--gd-success, #1a8f4c); }
.gd-bornes-status--incertain { background: var(--gd-border); color: var(--gd-muted); }

/* ==========================================================================
   Fiche modèle (/marques/{brand}/{model}) — présentation inspirée Moteur.ma
   ========================================================================== */
.gd-model-hero {
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: var(--gd-space-4);
  margin-top: var(--gd-space-3);
  align-items: start;
}
@media (max-width: 760px) {
  .gd-model-hero { grid-template-columns: 1fr; }
}
.gd-model-hero-media {
  border-radius: var(--gd-radius-lg);
  overflow: hidden;
  background: var(--gd-bg);
  border: 1px solid var(--gd-border);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* contain (pas cover) : même raison que .gd-org-card-image — un ratio
   trop "large" après recadrage source se ferait couper sur les côtés
   avec cover dans cette boîte à ratio fixe. */
.gd-model-hero-media img { width: 100%; height: 100%; object-fit: contain; padding: var(--gd-space-2); }
.gd-model-hero-media-empty { width: 100%; height: 100%; background: linear-gradient(135deg, var(--gd-border), var(--gd-bg)); }
/* Galerie photo (images_vehicules, jusqu'à 6 vraies photos du carrousel
   moteur.ma — scripts/import_model_gallery_images.php) : miniatures
   cliquables en grille, ouvrent la visionneuse plein écran (.gd-lightbox
   plus bas) en carrousel bouclé. */
.gd-model-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--gd-space-2);
  margin-top: var(--gd-space-3);
}
.gd-model-gallery-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius);
  background: var(--gd-bg);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.gd-model-gallery-thumb:hover, .gd-model-gallery-thumb:focus-visible {
  border-color: var(--gd-teal);
  box-shadow: var(--gd-shadow-md);
  transform: translateY(-2px);
}
.gd-model-gallery-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Visionneuse plein écran : une image à la fois, carrousel auto qui
   boucle en continu (repart à la 1re photo après la dernière), en pause
   au survol ou dès qu'on navigue manuellement (flèches/clavier). */
.gd-lightbox { position: fixed; inset: 0; z-index: 200; }
.gd-lightbox-backdrop { position: absolute; inset: 0; background: rgba(11, 27, 46, 0.88); }
.gd-lightbox-body {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gd-space-2);
  padding: var(--gd-space-3);
}
/* Cadre à taille FIXE (indépendante de chaque photo) : les flèches sont
   des frères flex de ce cadre, jamais de l'image elle-même — sans ça,
   une photo plus étroite ou moins haute que la précédente rétrécissait
   le cadre et les flèches se rapprochaient/s'éloignaient à chaque
   changement au lieu de rester à une position fixe. */
.gd-lightbox-frame {
  /* 560 × 400 (2026-12-04) : les photos moteur.ma font souvent 526 à 900 px de large ;
     un cadre plus grand les agrandissait et les rendait floues. */
  width: min(85vw, 560px);
  height: min(60vh, 400px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gd-lightbox-image {
  position: relative;
  /* cover (pas contain) + taille du cadre en dur : chaque photo remplit
     exactement le même rectangle, quel que soit son ratio d'origine —
     recadrée si besoin plutôt que "flotter" plus petite dans le cadre. */
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--gd-radius);
  box-shadow: var(--gd-shadow-lg);
  background: var(--gd-surface);
}
.gd-lightbox-close {
  position: absolute;
  top: var(--gd-space-3);
  right: var(--gd-space-3);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.gd-lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }
.gd-lightbox-nav {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.gd-lightbox-nav:hover { background: rgba(255, 255, 255, 0.24); }
@media (max-width: 640px) {
  .gd-lightbox-body { padding: var(--gd-space-2); gap: 4px; }
  .gd-lightbox-nav { width: 38px; height: 38px; font-size: 1.4rem; }
  .gd-lightbox-close { top: var(--gd-space-2); right: var(--gd-space-2); width: 34px; height: 34px; font-size: 1.3rem; }
}
.gd-model-brand-logo { height: 32px; width: auto; margin-bottom: 10px; object-fit: contain; }
.gd-model-hero-info h1 { margin: 0 0 4px; }
.gd-model-quickspecs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: var(--gd-space-2) 0; }
.gd-model-quickspec {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gd-text);
  background: var(--gd-bg);
  border: 1px solid var(--gd-border);
  border-radius: 999px;
  padding: 4px 12px;
}
.gd-model-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--gd-space-2); }

.gd-version-table-wrap { overflow-x: auto; margin: var(--gd-space-2) 0; }
.gd-version-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.gd-version-table th, .gd-version-table td { padding: 12px 14px; border-bottom: 1px solid var(--gd-border); text-align: left; font-size: 0.9rem; }
.gd-version-table thead th { color: var(--gd-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.02em; }
.gd-version-table-name { font-weight: 700; color: var(--gd-text); }
.gd-version-table tbody tr:hover { background: var(--gd-bg); }

.gd-panel {
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-lg);
  padding: var(--gd-space-3);
}
.gd-panel h2 { margin-top: 0; }

/* Mise en page à colonne latérale (fiche modèle, fiche version,
   comparateur) — la pub verticale (skyscraper/half_page) doit être une
   vraie colonne à droite du contenu, jamais un pavé inséré au milieu ou en
   bas du flux linéaire (avant : le pavé "sidebar" s'affichait tout en bas
   de la page, centré comme n'importe quel autre bloc). Colonne unique tant
   que l'écran n'a pas la place (mobile/tablette) : le pavé passe alors
   simplement après le contenu principal plutôt que de forcer 2 colonnes
   étroites. */
.gd-page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gd-space-4);
  align-items: start;
}
@media (min-width: 1024px) {
  .gd-page-with-sidebar { grid-template-columns: minmax(0, 1fr) 300px; }
}
.gd-page-sidebar { display: flex; justify-content: center; }
@media (min-width: 1024px) {
  .gd-page-sidebar { position: sticky; top: calc(var(--gd-header-h) + 16px); }
}

/* ==========================================================================
   Assistants IA (comparateur, recherche de bornes)
   ========================================================================== */
.gd-ai-assistant {
  background: linear-gradient(135deg, var(--gd-night), #12314f);
  color: #fff;
  border-radius: var(--gd-radius-lg);
  padding: var(--gd-space-3);
  margin: var(--gd-space-3) 0;
}
.gd-ai-assistant h2 { color: #fff; margin: 0 0 4px; font-size: 1.15rem; }
.gd-ai-assistant .meta { color: rgba(255,255,255,0.75); margin: 0 0 var(--gd-space-2); }
.gd-ai-form { display: flex; gap: 10px; flex-wrap: wrap; }
.gd-ai-form input {
  flex: 1; min-width: 220px; padding: 10px 14px; border-radius: var(--gd-radius);
  border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); color: #fff; font-size: 0.95rem;
}
.gd-ai-form input::placeholder { color: rgba(255,255,255,0.55); }
.gd-ai-form input:focus { outline: 2px solid var(--gd-teal); background: rgba(255,255,255,0.14); }
.gd-ai-form button { background: var(--gd-teal); color: var(--gd-night); border: none; font-weight: 800; }
.gd-ai-result { margin-top: var(--gd-space-2); background: rgba(255,255,255,0.08); border-radius: var(--gd-radius); padding: var(--gd-space-2); }
.gd-ai-result p { margin: 0 0 8px; line-height: 1.5; }
.gd-ai-result .gd-ai-loading { color: rgba(255,255,255,0.7); font-style: italic; }
.gd-ai-result .gd-ai-error { color: #ffb4b4; }
.gd-ai-stations { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gd-ai-stations li { background: rgba(255,255,255,0.06); border-radius: 8px; padding: 10px 12px; font-size: 0.9rem; }
.gd-ai-stations li .gd-ai-station-meta { display: block; color: rgba(255,255,255,0.65); font-size: 0.8rem; margin-top: 2px; }
.gd-ai-vehicles { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gd-ai-vehicles li a {
  display: block; background: rgba(255,255,255,0.08); border-radius: 8px; padding: 10px 12px;
  color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,0.15);
}
.gd-ai-vehicles li a:hover { border-color: var(--gd-teal); }
.gd-ai-vehicles .gd-ai-vehicle-name { font-weight: 700; display: block; }
.gd-ai-vehicles .gd-ai-vehicle-price { color: var(--gd-teal); font-weight: 700; font-size: 0.9rem; }

/* Réponse des assistants : conserve les retours à la ligne (liste de recommandations du mode sans IA). */
.gd-ai-assistant p { white-space: pre-line; }

/* Pavés marques (Modèles, Marques, comparateur) : logo petit et discret en
   haut à droite, positionné hors du flux pour ne jamais décaler le nom de
   la marque ; tous les noms restent alignés, avec ou sans logo. */
.gd-org-card { position: relative; }
.gd-org-card > .gd-brand-card-logo {
  position: absolute; top: 14px; right: 14px;
  width: auto; height: 24px; max-width: 64px;
  justify-content: flex-end; opacity: 0.9; pointer-events: none;
}
.gd-org-card:has(> .gd-brand-card-logo) .gd-org-card-name { padding-right: 72px; }

/* Rubrique Offres : logo de marque réduit à une petite pastille à gauche
   du nom (les logos en toutes lettres, ex. Hyundai ou DFSK, doublaient le nom). */
.gd-offres-marque-chip img { height: 14px; max-width: 30px; width: auto; object-fit: contain; flex: 0 0 auto; }
/* Visuel vertical (grand pavé 300×600) : colonne plus étroite pour ne pas allonger la page. */
@media (min-width: 860px) {
  .gd-offre-layout--verticale { grid-template-columns: 380px minmax(0, 1fr); }
}

/* Article à la une (accueil) : calque bleu nuit sur toute l'image, renforcé
   en bas, pour que le titre et le résumé blancs restent lisibles quel que
   soit le visuel (les nouvelles couvertures sont souvent claires). */
.gd-card--hero .gd-card-scrim {
  background:
    linear-gradient(180deg, rgba(11, 27, 46, 0.35) 0%, rgba(11, 27, 46, 0.55) 45%, rgba(11, 27, 46, 0.95) 100%);
}
.gd-card--hero .gd-card-title, .gd-card--hero .gd-card-excerpt { text-shadow: 0 1px 12px rgba(6, 18, 38, 0.6); }

/* Recherche IA (page Modèles, champ de l'accueil) */
.gd-ai-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.gd-ai-chips .gd-energy-badge { text-decoration: none; }
.gd-ai-compte { margin: 0 0 10px; } /* F-07 : « X versions de Y modèles » */
.gd-ai-chip {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 0.75rem; font-weight: 600; text-decoration: none;
}
.gd-ai-results-title { margin: var(--gd-space-3) 0 var(--gd-space-2); font-size: 1.2rem; }
#gd-ai-modeles { margin-bottom: var(--gd-space-3); }
#gd-ai-mod-vehicules { margin-bottom: var(--gd-space-4); }
.gd-quickfind-field--ia { margin-bottom: var(--gd-space-2); }
.gd-quickfind-field--ia input { width: 100%; }
.gd-org-badges .gd-energy-badge { font-size: 0.7rem; padding: 2px 7px; }

/* Recherche IA des bornes : classement par distance */
.gd-ai-stations--classees li { display: flex; gap: 10px; align-items: flex-start; }
.gd-ai-stations--classees a { color: #fff; text-decoration: none; }
.gd-ai-stations--classees a:hover { text-decoration: underline; }
.gd-ai-station-rang {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  background: var(--gd-teal); color: var(--gd-night); font-weight: 800; font-size: 0.8rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.gd-ai-station-dist { margin-left: 8px; font-size: 0.8rem; font-weight: 700; color: var(--gd-teal); }
.gd-ai-station-itin { margin-left: 8px; font-size: 0.78rem; color: var(--gd-teal) !important; }

/* À la une (accueil) : plus de bandeau de rubrique, titre + résumé + date posés en bas du visuel. */
.gd-card--hero .gd-card-body { justify-content: flex-end; width: 100%; }
.gd-card--hero .meta { margin-top: 0; }
/* Détail d'article : visuel d'abord, titre en dessous, sans bandeau de rubrique. */
.gd-article-cover--top { margin: 0 0 var(--gd-space-3); }

/* Page Modèles : pavé Recherche IA réduit à une seule ligne. */
.gd-ai-assistant--compact { padding: 10px 12px; margin: var(--gd-space-2) 0; }
.gd-ai-assistant--compact .gd-ai-form { align-items: center; flex-wrap: nowrap; }
.gd-ai-assistant--compact .gd-ai-form input { padding-block: 8px; min-width: 0; }
.gd-ai-assistant--compact .gd-ai-form button { padding-block: 8px; white-space: nowrap; }
.gd-ai-compact-label { color: #fff; font-weight: 800; white-space: nowrap; font-size: 0.95rem; }
.gd-ai-assistant--compact + .gd-ai-result, .gd-ai-assistant--compact .gd-ai-result { margin-top: 8px; }
@media (max-width: 600px) {
  .gd-ai-assistant--compact .gd-ai-form { flex-wrap: wrap; }
  .gd-ai-compact-label { width: 100%; }
}
/* Pavés Marques / Énergies / Modèles moins hauts. */
.gd-mode-selector { margin: var(--gd-space-2) 0; }
.gd-mode-card { padding: 10px var(--gd-space-2); }

/* Barre de recherche dynamique (liste déroulante + correction automatique). */
.gd-dyn-search { position: relative; max-width: 520px; }
.gd-dyn-toggle { border: 0; background: transparent; cursor: pointer; font-size: 1rem; color: var(--gd-muted); padding: 0 2px; }
.gd-dyn-list {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0;
  list-style: none; margin: 0; padding: 4px; max-height: 320px; overflow-y: auto;
  background: var(--gd-surface); border: 1px solid var(--gd-border); border-radius: var(--gd-radius); box-shadow: var(--gd-shadow-lg);
}
.gd-dyn-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.gd-dyn-list li small { color: var(--gd-muted); font-size: 0.75rem; }
.gd-dyn-list li.is-sel, .gd-dyn-list li[data-i]:hover { background: rgba(23, 214, 160, 0.14); }
.gd-dyn-list li.gd-dyn-vide { color: var(--gd-muted); cursor: default; }
.gd-dyn-correction { margin: -8px 0 var(--gd-space-2); font-size: 0.85rem; color: var(--gd-muted); }

/* Landing page : visuels non horizontaux (carré, 1,5:1, vertical) un peu réduits. */
@media (min-width: 860px) {
  .gd-offre-layout:not(.gd-offre-layout--sans-visuel):not(.gd-offre-layout--verticale) { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); }
  .gd-offre-layout--verticale { grid-template-columns: 300px minmax(0, 1fr); }
}
.gd-offre-layout:not(.gd-offre-layout--sans-visuel) .gd-offre-visual img { max-width: 520px; margin-inline: auto; }

/* Rubrique Essais : média auteur de l'essai, en tête d'article. */
.gd-essai-source { border: 2px solid var(--gd-teal); background: var(--gd-bg, #f4f7fa); padding: 12px 16px; margin: 0 0 var(--gd-space-3); font-size: 0.92rem; line-height: 1.5; border-radius: var(--gd-radius-lg); }
.gd-essai-source a { font-weight: 700; margin-left: 4px; }

/* Page Bornes : carte pleine largeur (plus de bannière verticale), liste à droite,
   pavés compacts en blanc sur fond bleu nuit. */
.gd-bornes-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: var(--gd-space-2) 0 8px; }
.gd-bornes-selection { margin: 0; font-weight: 700; color: var(--gd-heading); }
#gd-bornes-tout { margin-left: auto; }
#gd-bornes-tout.is-active { opacity: 0.6; }
@media (min-width: 900px) {
  .gd-bornes-map-layout { grid-template-columns: minmax(0, 1fr) 360px; }
}
.gd-bornes-map, .gd-bornes-list-panel { height: 600px; }
.gd-bornes-list-panel { padding: 10px; }
.gd-bornes-list { gap: 8px; }
.gd-bornes-region { margin-top: var(--gd-space-3); }
.gd-bornes-region-title { font-size: 0.95rem; margin-bottom: 8px; padding-bottom: 4px; }
.gd-bornes-ville-group { margin-top: 10px; }
.gd-bornes-ville-title { font-size: 0.85rem; margin-bottom: 6px; }
.gd-org-card.gd-bornes-card {
  background: var(--gd-night); color: #fff; border: 0; padding: 8px 12px; gap: 2px;
  min-height: 0; box-shadow: none;
}
.gd-org-card.gd-bornes-card:hover, .gd-org-card.gd-bornes-card:focus-visible { background: #12314f; transform: none; }
.gd-bornes-card .gd-org-card-name { color: #fff; font-size: 0.9rem; line-height: 1.3; }
.gd-bornes-card-head { align-items: center; }
.gd-bornes-card-line { margin: 0; font-size: 0.78rem; line-height: 1.4; color: rgba(255,255,255,0.82); display: flex; flex-wrap: wrap; column-gap: 10px; }
.gd-bornes-card-kw { color: var(--gd-teal); font-weight: 700; }
.gd-bornes-card .gd-bornes-status { font-size: 0.66rem; padding: 2px 7px; }
.gd-bornes-card .gd-bornes-status--disponible { background: rgba(23, 214, 160, 0.2); color: var(--gd-teal); }
.gd-bornes-card .gd-bornes-status--incertain { background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.8); }
/* Résultats IA cliquables */
.gd-ai-hint { font-size: 0.82rem; opacity: 0.8; margin: 6px 0 0; }
.gd-ai-station-clic { cursor: pointer; border-radius: 8px; transition: background 0.15s ease; }
.gd-ai-station-clic:hover, .gd-ai-station-clic:focus-visible, .gd-ai-station-clic.is-active { background: rgba(23, 214, 160, 0.18); outline: none; }
.gd-bornes-card[hidden], .gd-bornes-ville-group[hidden], .gd-bornes-region[hidden] { display: none !important; }
.gd-org-card.gd-bornes-card { display: block; }
.gd-bornes-card .gd-bornes-card-head { margin-bottom: 3px; }
.gd-bornes-card .gd-org-card-name { margin: 0; padding: 0; }
.gd-bornes-ville-title .gd-bornes-ville-n { font-weight: 400; }
.gd-bornes-card .gd-org-card-name { min-height: 0; }
/* Une ligne par information (titre complet au survol via title). */
.gd-bornes-card .gd-org-card-name, .gd-bornes-card-line > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gd-bornes-card .gd-org-card-name { flex: 1; }
.gd-bornes-card-line { display: block; }
.gd-bornes-card-line > span { display: block; }

/* Liste des bornes aux couleurs du pavé Recherche IA : même fond dégradé bleu nuit,
   pavés en blanc translucide, texte blanc, accents et survol turquoise (couleur des boutons). */
.gd-bornes-list-panel { background: linear-gradient(135deg, var(--gd-night), #12314f); border: 0; color: #fff; }
.gd-bornes-list-panel .gd-bornes-region-title { color: #fff; border-bottom-color: var(--gd-teal); }
.gd-bornes-list-panel .gd-bornes-ville-title, .gd-bornes-list-panel .gd-bornes-ville-title .meta { color: rgba(255,255,255,0.7); }
.gd-org-card.gd-bornes-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.gd-bornes-card .gd-bornes-card-line > span:first-child { color: rgba(255,255,255,0.65); }
.gd-org-card.gd-bornes-card.gd-borne-card, .gd-org-card.gd-bornes-card.gd-borne-card * { cursor: pointer; }
.gd-org-card.gd-bornes-card.gd-borne-card:hover, .gd-org-card.gd-bornes-card.gd-borne-card:focus-visible,
.gd-org-card.gd-bornes-card.is-active { background: rgba(23, 214, 160, 0.18); border-color: var(--gd-teal); outline: none; }
.gd-bornes-card .gd-bornes-status--disponible { background: var(--gd-teal); color: var(--gd-night); }
/* Bouton « tout le réseau » et Rechercher : même turquoise / texte bleu nuit que le bouton IA. */
#gd-bornes-tout, #gd-bornes-filter-search { background: var(--gd-teal); color: var(--gd-night); border: none; font-weight: 800; cursor: pointer; }
.gd-bornes-list-panel::-webkit-scrollbar { width: 8px; }
.gd-bornes-list-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); border-radius: 8px; }
.gd-org-card.gd-bornes-card:hover .gd-org-card-name, .gd-org-card.gd-bornes-card:focus-visible .gd-org-card-name, .gd-org-card.gd-bornes-card.is-active .gd-org-card-name { color: #fff; }

/* Réponses IA véhicules : chaque option est un pavé cliquable (modèle ou version). */
.gd-ai-options { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.gd-ai-option {
  display: flex; gap: 14px; align-items: center; text-decoration: none; color: #fff;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; padding: 10px 14px;
  transition: background 0.15s ease, border-color 0.15s ease; cursor: pointer;
}
.gd-ai-option:hover, .gd-ai-option:focus-visible { background: rgba(23, 214, 160, 0.18); border-color: var(--gd-teal); outline: none; }
.gd-ai-option img { width: 110px; height: 70px; object-fit: contain; flex: 0 0 auto; background: rgba(255,255,255,0.9); border-radius: 6px; }
.gd-ai-option-corps { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gd-ai-option-texte { line-height: 1.45; font-size: 0.92rem; white-space: normal; }
.gd-ai-option-pied { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 0.85rem; }
.gd-ai-option-prix { color: var(--gd-teal); font-weight: 800; }
.gd-ai-option-lien { color: var(--gd-teal); font-weight: 700; }
@media (max-width: 600px) { .gd-ai-option img { width: 80px; height: 54px; } }

/* Page Modèles : champ avec suggestion d'écriture en gris + bouton Rechercher. */
.gd-dyn-search { max-width: 640px; }
.gd-dyn-field { position: relative; flex: 1; display: flex; min-width: 0; }
.gd-dyn-field input { position: relative; z-index: 1; width: 100%; background: transparent; }
.gd-dyn-ghost { position: absolute; inset: 0; display: flex; align-items: center; white-space: pre; overflow: hidden; pointer-events: none; font: inherit; font-size: 0.95rem; color: #9aa7b6; }
.gd-dyn-ghost-saisie { color: transparent; }
.gd-dyn-search { padding-right: 6px; }
.gd-dyn-go { padding: 6px 14px; white-space: nowrap; }
.gd-dyn-field input { font-family: inherit; font-size: 0.95rem; letter-spacing: normal; padding: 0; }

/* Accueil — « Trouver un véhicule neuf » resserré : titre au-dessus, pavé bleu Recherche IA
   (mêmes couleurs que les pavés IA des pages Modèles, Comparateur, Bornes), puis une seule
   ligne de filtres classiques. */
.gd-quickfind { flex-direction: column; align-items: stretch; gap: 12px; padding: var(--gd-space-3); margin: var(--gd-space-3) auto; }
.gd-quickfind-label { font-size: 1.2rem; }
.gd-quickfind-form { gap: 12px; min-width: 0; }
.gd-quickfind-row { gap: 8px 12px; }
.gd-quickfind-row .gd-quickfind-field { flex: 1 1 150px; min-width: 130px; }
.gd-quickfind-row .gd-quickfind-select { padding: 8px 10px; }
#gd-qf-reset { margin-left: 0; }
.gd-quickfind-ia {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  background: linear-gradient(135deg, var(--gd-night), #12314f); border-radius: var(--gd-radius-lg); padding: 10px 12px;
}
.gd-quickfind-ia label { color: #fff; font-family: var(--gd-font-display); font-weight: 800; font-size: 0.95rem; white-space: nowrap; }
.gd-quickfind-ia input, .gd-quickfind-ia textarea {
  flex: 1; min-width: 0; padding: 9px 14px; resize: none; line-height: 1.4; height: 40px; overflow: hidden; border-radius: var(--gd-radius); font-size: 0.95rem; font-family: inherit;
  border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); color: #fff;
}
.gd-quickfind-ia input::placeholder, .gd-quickfind-ia textarea::placeholder { color: rgba(255,255,255,0.55); }
.gd-quickfind-ia input:focus, .gd-quickfind-ia textarea:focus { outline: 2px solid var(--gd-teal); background: rgba(255,255,255,0.14); }
.gd-quickfind-ia .gd-btn { background: var(--gd-teal); color: var(--gd-night); border: none; font-weight: 800; padding: 9px 16px; white-space: nowrap; }
@media (max-width: 640px) {
  .gd-quickfind-ia { flex-wrap: wrap; padding: 14px; }
  .gd-quickfind-ia label { width: 100%; }
  /* Mobile : zone de texte haute comme la Recherche IA de bornes, bouton Rechercher en dessous. */
  .gd-quickfind-ia textarea { flex: 0 0 100%; width: 100%; height: auto; min-height: 110px; overflow: auto; resize: vertical; }
  .gd-quickfind-ia .gd-btn { flex: 0 0 100%; width: 100%; padding: 11px 16px; }
}

/* Accueil — pavé Bornes : texte lisible sur fond sombre, mini-pavés cliquables vers la page Bornes. */
.gd-band--dark .gd-bornes-pave-text p, .gd-bornes-pave.gd-band--dark .gd-bornes-pave-text p { color: rgba(255,255,255,0.85); }
.gd-bornes-pave-card { text-decoration: none; color: inherit; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.gd-bornes-pave-card:hover, .gd-bornes-pave-card:focus-visible { transform: translateY(-3px); box-shadow: var(--gd-shadow-lg); }

/* Accueil — bande Recharge : pavé Recherche IA (même style que les autres pavés IA) qui mène à la page Bornes. */
.gd-bornes-pave-ia { border: 1px solid rgba(255,255,255,0.18); align-self: center; }

/* Accueil — pavé Recherche IA de la bande Recharge : pavé blanc, zone de texte haute (plusieurs lignes). */
.gd-bornes-pave-ia {
  display: flex; flex-direction: column; gap: 10px; align-self: center;
  background: var(--gd-surface); border: 2px solid var(--gd-teal); border-radius: var(--gd-radius-lg); padding: 18px 20px; box-shadow: var(--gd-shadow-lg);
}
.gd-bornes-pave-ia label { color: var(--gd-heading); font-family: var(--gd-font-display); font-weight: 800; font-size: 1.05rem; }
.gd-bornes-pave-ia textarea {
  width: 100%; min-height: 110px; resize: vertical; padding: 12px 14px; font: inherit; font-size: 0.95rem; line-height: 1.45;
  color: var(--gd-text); background: var(--gd-surface); border: 1px solid var(--gd-border); border-radius: var(--gd-radius); box-shadow: var(--gd-shadow-sm);
}
.gd-bornes-pave-ia textarea:focus { outline: 2px solid var(--gd-teal); border-color: var(--gd-teal); }
.gd-bornes-pave-ia .gd-btn { align-self: flex-end; background: var(--gd-teal); color: var(--gd-night); border: none; font-weight: 800; }

/* Pavés d'articles : rubrique en bas de la miniature, pas en haut (où se trouve le badge des couvertures). */
.gd-card-media .gd-tag { top: auto; bottom: 10px; left: 10px; }
/* Format compact (« Aussi à la une ») : vignette trop petite pour un médaillon, la rubrique passe juste dessous. */
.gd-card--compact .gd-card-media { overflow: visible; display: flex; flex-direction: column; gap: 6px; border-radius: 0; }
.gd-card--compact .gd-card-media .gd-tag { position: static; align-self: flex-start; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-card--compact .gd-card-media .gd-tag { font-size: 0.6rem; padding: 3px 6px; letter-spacing: 0.02em; overflow: visible; text-overflow: clip; }

/* Page Bornes : petit bouton blanc « Itinéraire » (texte bleu) sur chaque pavé de la liste. */
.gd-bornes-itineraire {
  flex-shrink: 0; display: inline-block; background: #fff; color: #1d4ed8 !important; font-size: 0.68rem; font-weight: 800;
  padding: 3px 9px; border-radius: 999px; text-decoration: none; line-height: 1.4; white-space: nowrap; cursor: pointer;
}
.gd-bornes-itineraire:hover, .gd-bornes-itineraire:focus-visible { background: #e8efff; text-decoration: none; outline: none; }

/* Mobile : aucune page ne doit déborder en largeur. */
.gd-page-with-sidebar { grid-template-columns: minmax(0, 1fr); }
.gd-page-main { min-width: 0; }
@media (min-width: 1024px) {
  .gd-page-with-sidebar { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 640px) {
  .gd-brand-scroll { overflow: hidden; }
  .gd-brand-scroll-label { display: none; }
  .gd-ai-form input { min-width: 0; }
}
.gd-hero-grid { grid-template-columns: minmax(0, 1fr); }
.gd-hero-grid > * { min-width: 0; }
@media (min-width: 1024px) { .gd-hero-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.gd-card--compact .gd-card-body { min-width: 0; }

/* Mobile : le bloc « À la une » prend la hauteur de son texte au lieu d'élargir la page (ratio 16:9 + hauteur minimale). */
@media (max-width: 640px) {
  .gd-card--hero { aspect-ratio: auto; min-height: 320px; width: 100%; }
}

/* Menu mobile (smartphone) : tiroir qui défile seul, rubriques en accordéon, page figée derrière. */
@media (max-width: 1023px) {
  .gd-nav-drawer.is-open {
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 24px;
  }
  html.gd-nav-ouvert, html.gd-nav-ouvert body { overflow: hidden; }
  .gd-nav-item.has-mega > .gd-mega-panel { display: none; }
  .gd-nav-item.has-mega.is-open > .gd-mega-panel { display: block; }
  .gd-nav-item.has-mega > .gd-nav-link { display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
  .gd-nav-item.has-mega:hover > .gd-nav-link::after,
  .gd-nav-item.has-mega:focus-within > .gd-nav-link::after { transform: rotate(45deg); }
  .gd-nav-item.has-mega.is-open > .gd-nav-link::after { transform: rotate(225deg); }
  .gd-mega-panel a { min-height: 44px; display: flex; align-items: center; }
}

/* Guides d'achat (pages piliers SEO) */
.gd-guide-intro { font-size: 1.05rem; line-height: 1.6; max-width: 820px; }
.gd-guide-faits { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: var(--gd-space-4) 0; }
.gd-guide-fait { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--gd-radius-lg); text-decoration: none;
  background: linear-gradient(135deg, var(--gd-night), #12314f); color: #fff; box-shadow: var(--gd-shadow-sm); transition: transform .15s ease; }
.gd-guide-fait:hover { transform: translateY(-3px); }
.gd-guide-fait-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gd-teal); font-weight: 800; }
.gd-guide-fait strong { font-size: 1.1rem; }
.gd-guide-table-wrap { overflow-x: auto; border: 1px solid var(--gd-border); border-radius: var(--gd-radius-lg); }
.gd-guide-table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
.gd-guide-table th { text-align: left; background: var(--gd-night); color: #fff; padding: 10px 12px; font-weight: 700; white-space: nowrap; }
.gd-guide-table td { padding: 9px 12px; border-top: 1px solid var(--gd-border); vertical-align: top; }
.gd-guide-table tbody tr:nth-child(even) { background: rgba(0,0,0,.025); }
.gd-guide-table a { font-weight: 700; color: var(--gd-heading); }
.gd-guide-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: var(--gd-space-5) 0; }
.gd-guide-faq details { border: 1px solid var(--gd-border); border-radius: var(--gd-radius); padding: 12px 16px; margin-bottom: 10px; background: var(--gd-surface); }
.gd-guide-faq summary { cursor: pointer; font-weight: 700; color: var(--gd-heading); }
.gd-guide-faq details p { margin: 10px 0 0; line-height: 1.6; }
.gd-guide-autres { columns: 2; padding-left: 18px; }
.gd-guide-autres li { margin-bottom: 6px; break-inside: avoid; }
@media (max-width: 640px) { .gd-guide-autres { columns: 1; } }

/* Maillage interne : liens vers les fiches modèles dans les articles + encadré « Modèles cités ». */
.gd-lien-modele { color: var(--gd-heading); font-weight: 700; text-decoration: underline; text-decoration-color: var(--gd-teal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.gd-lien-modele:hover { color: var(--gd-teal-dark, #0b8f78); }
.gd-modeles-cites { margin: var(--gd-space-5) 0; padding: 18px 20px; border: 2px solid var(--gd-teal); border-radius: var(--gd-radius-lg); background: var(--gd-surface); }
.gd-modeles-cites-titre { margin: 0 0 12px; font-family: var(--gd-font-display); font-weight: 800; color: var(--gd-heading); font-size: 1.05rem; }
.gd-modeles-cites-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.gd-modele-cite { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--gd-radius); text-decoration: none; color: var(--gd-text); border: 1px solid var(--gd-border); transition: border-color .15s ease, box-shadow .15s ease; }
.gd-modele-cite:hover { border-color: var(--gd-teal); box-shadow: var(--gd-shadow-sm); }
.gd-modele-cite img { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.gd-modele-cite span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gd-modele-cite strong { color: var(--gd-heading); }

.gd-guides-lies { margin: var(--gd-space-3) 0; line-height: 1.7; }
.gd-guides-lies a { color: var(--gd-heading); font-weight: 600; }

/* Landing page « Réserver un test drive » (/essai/{marque}/{modele}) */
.gd-essai-intro { display: flex; gap: var(--gd-space-3); align-items: center; margin: var(--gd-space-2) 0 var(--gd-space-3); }
.gd-essai-intro img { width: 220px; max-width: 40%; height: auto; border-radius: var(--gd-radius-lg); object-fit: contain; background: #fff; }
.gd-essai-intro p { margin: 0; }
@media (max-width: 600px) { .gd-essai-intro { flex-direction: column; align-items: flex-start; } .gd-essai-intro img { max-width: 100%; width: 100%; } }

/* ==========================================================================
   Lecture interactive du marché (/marche-automobile) — templates/pages/marche.php
   Palette énergies validée (dataviz, adjacents CVD ΔE ≥ 26, contraste relayé par
   valeurs affichées + tableaux) : mild jaune, PHEV bleu, HEV orange, REEV violet, BEV vert.
   ========================================================================== */
.gd-mk, .gd-mk-pave {
  --mk-n: #1F3B5C; --mk-n1: #B4BEC9; --mk-nev: #008A17;
  --mk-mild: #F2A600; --mk-phev: #257DE0; --mk-hev: #F47230; --mk-reev: #6A4CE2; --mk-bev: #008A17;
  --mk-piste: #EDF1F4; --mk-grille: #E3E8EC;
}
.gd-mk-hero { background: var(--gd-night); color: #fff; padding: 32px 0 28px; }
.gd-mk-hero h1 { color: #fff; margin: 6px 0 8px; }
.gd-mk-hero .meta, .gd-mk-hero .meta a { color: rgba(255,255,255,.7); }
.gd-mk-hero .gd-eyebrow { color: var(--gd-teal); }
.gd-mk-sous { color: rgba(255,255,255,.82); max-width: 760px; margin: 0 0 16px; }
.gd-mk-periode { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gd-mk-periode label { font-weight: 700; }
.gd-mk-periode select { font: inherit; font-weight: 700; padding: 8px 12px; border-radius: var(--gd-radius); border: 2px solid var(--gd-teal); background: var(--gd-surface); color: var(--gd-night); min-width: 200px; }
.gd-mk-corps { padding-top: var(--gd-space-3); padding-bottom: var(--gd-space-4); }
.gd-mk-bloc { margin: var(--gd-space-4) 0; padding: var(--gd-space-4); background: var(--gd-surface); border: 2px solid var(--gd-teal); border-radius: var(--gd-radius-lg); box-shadow: var(--gd-shadow-lg); }
@media (max-width: 640px) { .gd-mk-bloc { padding: var(--gd-space-3); margin: var(--gd-space-3) 0; } }
.gd-mk-bloc h2 { margin: 0 0 6px; }
.gd-mk-bloc h3 { font-size: 1.05rem; margin: 12px 0 8px; }
.gd-mk-note { border: 2px solid var(--gd-teal); border-radius: var(--gd-radius-lg); background: var(--gd-soft, #F3FDF9); padding: 12px 16px; margin: 16px 0 0; font-weight: 600; }
.gd-mk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 14px 0 18px; }
.gd-mk-kpi { border: 1px solid var(--gd-border); border-radius: var(--gd-radius-lg); padding: 16px 18px; background: var(--gd-surface); display: flex; flex-direction: column; gap: 2px; }
.gd-mk-kpi--fort { background: var(--gd-bg-alt); border: 2px solid var(--gd-teal); }
.gd-mk-kpi-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gd-muted); font-weight: 700; }
.gd-mk-kpi strong { font-family: var(--gd-font-display); font-size: 2.3rem; line-height: 1.1; color: var(--gd-heading); }
.gd-mk-evol { font-weight: 700; }
.gd-mk-evol--up { color: #0B7A2A; }
.gd-mk-evol--down { color: var(--gd-muted); }
.gd-mk-legende { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 6px 0 10px; font-size: .9rem; }
.gd-mk-legende span { display: inline-flex; align-items: center; gap: 6px; }
.gd-mk-pastille { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.gd-mk-n { background: var(--mk-n); } .gd-mk-n1 { background: var(--mk-n1); } .gd-mk-nev { background: var(--mk-nev); }
.gd-mk-e-mild { background: var(--mk-mild); } .gd-mk-e-phev { background: var(--mk-phev); } .gd-mk-e-hev { background: var(--mk-hev); }
.gd-mk-e-reev { background: var(--mk-reev); } .gd-mk-e-bev { background: var(--mk-bev); }
/* Barres mensuelles groupées */
.gd-mk-barres { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; height: 220px; align-items: end; border-bottom: 1px solid var(--mk-grille); padding-bottom: 0; }
.gd-mk-mois { display: flex; flex-direction: column; height: 100%; }
.gd-mk-paire { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.gd-mk-barre { width: min(16px, 42%); border-radius: 4px 4px 0 0; min-height: 2px; cursor: default; }
.gd-mk-mois.is-apres .gd-mk-barre { opacity: .45; }
.gd-mk-mois-nom { text-align: center; font-size: .78rem; color: var(--gd-muted); padding-top: 4px; }
.gd-mk-mois.is-actif .gd-mk-mois-nom { color: var(--gd-heading); font-weight: 800; }
.gd-mk-mois.is-actif .gd-mk-barre.gd-mk-n { background: var(--gd-teal); box-shadow: 0 0 0 2px var(--mk-n) inset; }
.gd-mk-table { margin-top: 12px; }
.gd-mk-table summary { cursor: pointer; font-weight: 700; color: var(--gd-heading); }
.gd-mk-table table, .gd-mk-liste { width: 100%; border-collapse: collapse; font-size: .95rem; margin-top: 8px; }
.gd-mk-table th, .gd-mk-table td, .gd-mk-liste th, .gd-mk-liste td { padding: 6px 8px; border-bottom: 1px solid var(--gd-border); text-align: right; }
.gd-mk-table th[scope="row"], .gd-mk-liste th[scope="row"], .gd-mk-liste thead th:first-child, .gd-mk-table thead th:first-child { text-align: left; }
.gd-mk-liste thead th, .gd-mk-table thead th { font-size: .78rem; color: var(--gd-muted); text-transform: uppercase; letter-spacing: .04em; }
/* Familles VP / VUL */
.gd-mk-familles { display: flex; gap: 2px; height: 40px; margin: 12px 0 6px; border-radius: 8px; overflow: hidden; }
.gd-mk-famille { display: flex; align-items: center; padding: 0 12px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.gd-mk-famille--vp { background: var(--mk-n); color: #fff; }
.gd-mk-famille--vul { background: var(--mk-n1); color: var(--gd-night); justify-content: center; }
.gd-mk-2col { display: grid; grid-template-columns: 1fr; gap: var(--gd-space-3); }
.gd-mk-3col { display: grid; grid-template-columns: 1fr; gap: var(--gd-space-3); }
@media (min-width: 900px) { .gd-mk-2col { grid-template-columns: 1fr 1fr; } .gd-mk-3col { grid-template-columns: repeat(3, 1fr); } }
/* Classements par motorisation (mild, HEV, PHEV, REEV, BEV séparés) et focus villes (2026-12-03) */
.gd-mk-5col { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gd-space-3); }
.gd-mk-classement.gd-mk-classement--villes li { grid-template-columns: 22px minmax(90px, 140px) 1fr 70px 56px 64px; }
/* Focus villes : histogramme empilé horizontal (demande 2026-12-04) */
.gd-mk-histo-h { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 6px; }
.gd-mk-histo-ligne { display: grid; grid-template-columns: minmax(84px, 130px) 1fr 64px 52px; align-items: center; gap: 10px; }
.gd-mk-histo-nom { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-mk-histo-piste { display: block; background: var(--mk-piste, #eef2f5); border-radius: 4px; height: 18px; }
.gd-mk-histo-pile { display: flex; gap: 2px; height: 100%; min-width: 3px; border-radius: 4px; overflow: hidden; }
.gd-mk-histo-pile > span { display: block; min-width: 2px; height: 100%; cursor: default; }
.gd-mk-histo-val { font-weight: 700; font-size: .88rem; text-align: right; }
.gd-mk-histo-part { font-size: .8rem; color: var(--gd-muted, #5b6770); text-align: right; }
@media (max-width: 560px) { .gd-mk-histo-ligne { grid-template-columns: 78px 1fr 52px 44px; gap: 6px; } }
.gd-mk-total-e { margin: -6px 0 8px; }
.gd-mk-top-ev { font-size: .78rem; margin-left: 4px; }
.gd-mk-part { text-align: right; font-size: .88rem; color: var(--gd-muted, #5b6770); }
/* Classements à barres horizontales */
.gd-mk-classement { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.gd-mk-classement li { display: grid; grid-template-columns: 22px minmax(90px, 140px) 1fr 70px 64px; gap: 10px; align-items: center; }
.gd-mk-rang { color: var(--gd-muted); font-size: .85rem; }
.gd-mk-nom { font-weight: 700; }
.gd-mk-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.gd-mk-ev { text-align: right; font-size: .88rem; }
.gd-mk-piste { background: var(--mk-piste); border-radius: 4px; height: 14px; position: relative; display: block; }
.gd-mk-piste--large { height: 16px; margin-top: 4px; }
.gd-mk-piste--fine { height: 6px; grid-column: 1 / -1; }
.gd-mk-jauge { display: block; height: 100%; border-radius: 4px; background: var(--mk-n1); min-width: 2px; }
.gd-mk-jauge--tete { background: var(--mk-n); }
.gd-mk-jauge.gd-mk-e-mild { background: var(--mk-mild); } .gd-mk-jauge.gd-mk-e-phev { background: var(--mk-phev); } .gd-mk-jauge.gd-mk-e-hev { background: var(--mk-hev); }
.gd-mk-jauge.gd-mk-e-reev { background: var(--mk-reev); } .gd-mk-jauge.gd-mk-e-bev { background: var(--mk-bev); }
.gd-mk-pile { display: flex; gap: 2px; height: 100%; }
.gd-mk-pile > span { display: block; height: 100%; min-width: 2px; }
.gd-mk-pile > span:first-child { border-radius: 4px 0 0 4px; }
.gd-mk-pile > span:last-child { border-radius: 0 4px 4px 0; }
.gd-mk-pile > span:only-child { border-radius: 4px; }
.gd-mk-repere { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; background: var(--gd-night); opacity: .55; border-radius: 2px; }
.gd-mk-motos { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 14px; }
.gd-mk-moto-tete { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 700; }
.gd-mk-top { list-style: none; counter-reset: top; padding: 0; margin: 0; display: grid; gap: 10px; }
.gd-mk-top li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; counter-increment: top; }
.gd-mk-top-nom::before { content: counter(top) ". "; color: var(--gd-muted); }
.gd-mk-top-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.gd-mk-badge { font-size: .68rem; font-weight: 800; color: #fff; padding: 1px 6px; border-radius: 10px; vertical-align: 1px; }
.gd-mk-badge.gd-mk-e-mild, .gd-mk-badge.gd-mk-e-hev { color: var(--gd-heading); }
.gd-mk-definitions { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px 18px; margin: 10px 0; padding: 12px 16px; background: var(--gd-bg-alt); border-radius: var(--gd-radius-lg); border: 2px solid var(--gd-teal); }
.gd-mk-definitions div { display: flex; gap: 8px; }
.gd-mk-definitions dt { font-weight: 800; min-width: 92px; }
.gd-mk-definitions dd { margin: 0; color: var(--gd-muted); }
.gd-mk-courbe { width: 100%; height: auto; max-width: 820px; display: block; }
.gd-mk-grille { stroke: var(--mk-grille); stroke-width: 1; }
.gd-mk-axe { fill: var(--gd-muted); font-size: 12px; }
.gd-mk-ligne { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gd-mk-ligne--n { stroke: var(--mk-nev); }
.gd-mk-ligne--n1 { stroke: var(--mk-n1); }
.gd-mk-point { stroke: #fff; stroke-width: 2; cursor: default; }
.gd-mk-point--n { fill: var(--mk-nev); }
.gd-mk-point--n1 { fill: var(--mk-n1); }
.gd-mk-etiquette { font-size: 13px; font-weight: 800; fill: var(--gd-night); }
.gd-mk-sur { color: var(--gd-teal); filter: brightness(.7); font-size: .9rem !important; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px !important; }
.gd-mk-resume { padding-left: 18px; display: grid; gap: 8px; }
.gd-mk-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: var(--gd-space-3) 0; }
.gd-mk-tip { position: absolute; z-index: 50; background: var(--gd-night); color: #fff; padding: 6px 10px; border-radius: 6px; font-size: .85rem; pointer-events: none; box-shadow: var(--gd-shadow-md); white-space: nowrap; }
.gd-mk [data-tip]:focus-visible { outline: 2px solid var(--gd-night); outline-offset: 2px; }
@media (max-width: 640px) {
  .gd-mk-classement li { grid-template-columns: 18px minmax(70px, 96px) 1fr 58px; }
  .gd-mk-classement .gd-mk-ev { display: none; }
  .gd-mk-classement.gd-mk-classement--villes li { grid-template-columns: 18px minmax(70px, 96px) 1fr 52px 48px; }
  .gd-mk-barres { gap: 2px; height: 180px; }
  .gd-mk-mois-nom { font-size: .62rem; }
  .gd-mk-kpi strong { font-size: 1.9rem; }
}
/* Pavé accueil « Lecture interactive du marché » */
.gd-mk-pave { padding: var(--gd-space-3) 0; }
/* Pavé repris dans la rubrique Marché, déjà dans un .container : pas de double marge latérale. */
.gd-mk-pave-rubrique .gd-mk-pave > .container { padding-left: 0; padding-right: 0; max-width: none; }
.gd-mk-pave-rubrique { margin-bottom: var(--gd-space-3); }
/* Même encadré que le pavé « Trouver un véhicule neuf » (.gd-quickfind), demande 2026-12-03. */
.gd-mk-pave { padding: 0; }
.gd-mk-pave-carte { margin: var(--gd-space-4) auto; padding: var(--gd-space-4); background: var(--gd-surface); border: 2px solid var(--gd-teal); border-radius: var(--gd-radius-lg); box-shadow: var(--gd-shadow-lg); }
@media (max-width: 640px) { .gd-mk-pave-carte { padding: var(--gd-space-3); margin: var(--gd-space-3) auto; } }
.gd-mk-pave-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.gd-mk-pave-tete .gd-section-title { margin: 4px 0 0; }
.gd-mk-pave-choix { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--gd-muted); text-transform: uppercase; letter-spacing: .05em; }
.gd-mk-pave-choix select { font: inherit; font-size: 1rem; text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--gd-night); padding: 8px 12px; border: 2px solid var(--gd-teal); border-radius: var(--gd-radius); background: var(--gd-surface); min-width: 190px; }
.gd-mk-pave-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 0 8px; }
@media (min-width: 900px) { .gd-mk-pave-kpis { grid-template-columns: repeat(4, 1fr); } }
.gd-mk-pave-kpis > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--gd-radius-lg); background: var(--gd-bg-alt); border: 1px solid var(--gd-border); }
.gd-mk-pave-kpis strong { font-family: var(--gd-font-display); font-size: 1.7rem; color: var(--gd-heading); line-height: 1.15; }
.gd-mk-pave-kpis > div > span:last-child { font-size: .88rem; color: var(--gd-muted); }
.gd-mk-pave-kpis > .gd-mk-pave-nev { border: 2px solid var(--gd-teal); }
.gd-mk-pave-barres { display: grid; gap: 6px; height: 140px; align-items: end; border-bottom: 1px solid var(--mk-grille); }
.gd-mk-pave-pied { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }

/* Encadrés : jamais de simple liseré coloré sur un côté ou en haut ; on encadre tout le pavé (demande 2026-12-04). */

/* Pavé « Posez votre question sur le marché » (/marche-automobile, 2026-12-04) */
.gd-mk-question { margin: var(--gd-space-4) 0; border: 2px solid var(--gd-teal); border-radius: var(--gd-radius-lg); }
.gd-mk-q-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gd-mk-q-sug { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.3); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.gd-mk-q-sug:hover, .gd-mk-q-sug:focus-visible { border-color: var(--gd-teal); background: rgba(255,255,255,0.14); }
.gd-mk-question .gd-ai-result ul { margin: 0 0 8px 1.2em; padding: 0; }
.gd-mk-question .gd-ai-result li { margin: 2px 0; line-height: 1.5; }
.gd-mk-question .gd-ai-result strong { color: #fff; }

/* Accueil (2026-12-04) : une section claire qui suit une bande bleu nuit (ex. « Conso EV » après « Actu »)
   garde un peu d'air au-dessus de son titre. */
.gd-band--dark + section:not(.gd-band--dark) > .gd-rubric-section { padding-top: var(--gd-space-5); }

/* Pages « Bornes de recharge à <ville> » et liens par ville */
.gd-bornes-intro { max-width: 820px; margin-bottom: var(--gd-space-4); }
.gd-bornes-villes { margin-top: var(--gd-space-5); }
.gd-bornes-villes ul { list-style: none; padding: 0; margin: var(--gd-space-2) 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 24px; }
.gd-bornes-villes a { font-weight: 600; }
.gd-bornes-ville-title a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Maillage interne article <-> fiche modèle */
.gd-modeles-lies { margin-top: var(--gd-space-4); padding: var(--gd-space-3); border-left: 4px solid var(--gd-green, #2bb673); background: rgba(43, 182, 115, .06); border-radius: 6px; }
.gd-modeles-lies h2 { font-size: 1.1rem; margin: 0 0 8px; }
.gd-modeles-lies ul, .gd-articles-lies { margin: 0; padding-left: 18px; }
.gd-modeles-lies a, .gd-articles-lies a { font-weight: 600; }
.gd-articles-lies li { margin-bottom: 6px; }
.gd-articles-lies .meta { margin-left: 6px; }

/* ---------------------------------------------------------------
   Rubrique Matchs (2026-12-05) : duel en photos, pavés bleus (même
   esprit que les assistants IA), fiche technique, étapes numérotées.
   --------------------------------------------------------------- */
.gd-match-hero {
  background: radial-gradient(circle at 50% 120%, rgba(23,217,163,0.22), transparent 55%), linear-gradient(135deg, var(--gd-night), #12314f);
  color: #fff; border-radius: var(--gd-radius-lg); padding: var(--gd-space-4) var(--gd-space-3) var(--gd-space-3);
  margin: var(--gd-space-2) 0 var(--gd-space-3); text-align: center; overflow: hidden;
}
.gd-match-hero h1 { color: #fff; margin: 4px 0 8px; font-size: clamp(1.4rem, 3vw, 2.1rem); }
.gd-match-kicker { display: inline-block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gd-teal); margin: 0; }
.gd-match-accroche { color: rgba(255,255,255,0.82); max-width: 760px; margin: 0 auto var(--gd-space-3); line-height: 1.5; }
.gd-match-duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--gd-space-2); }
.gd-match-car { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; text-decoration: none; padding: var(--gd-space-2); border-radius: var(--gd-radius-lg); background: rgba(255,255,255,0.06); transition: background .2s; }
.gd-match-car:hover { background: rgba(255,255,255,0.12); }
.gd-match-car-img { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 190px; }
.gd-match-car-img img { max-width: 100%; max-height: 190px; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0,0,0,0.45)); }
.gd-match-car--b .gd-match-car-img img { transform: scaleX(-1); }
.gd-match-car-marque { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.7); margin-top: 8px; }
.gd-match-car-nom { font-family: var(--gd-font-display); font-size: 1.5rem; }
.gd-match-car-prix { color: var(--gd-teal); font-weight: 700; }
.gd-match-car-promo { color: #ffc857; font-weight: 700; font-size: 0.95rem; }
.gd-match-car-energie { font-size: 0.8rem; color: rgba(255,255,255,0.7); }
.gd-match-vs { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--gd-teal); color: var(--gd-night); font-family: var(--gd-font-display); font-weight: 900; font-size: 1.3rem; box-shadow: 0 0 0 6px rgba(23,217,163,0.25); }
.gd-match-vs--small { width: 38px; height: 38px; font-size: 0.85rem; box-shadow: 0 0 0 4px rgba(23,217,163,0.25); flex: none; }
.gd-match-pave { background: linear-gradient(135deg, var(--gd-night), #12314f); color: #fff; border-radius: var(--gd-radius-lg); padding: var(--gd-space-3); margin: var(--gd-space-3) 0; }
.gd-match-pave h2, .gd-match-pave h3 { color: #fff; margin: 0 0 8px; }
.gd-match-pave p { margin: 0 0 10px; line-height: 1.6; color: rgba(255,255,255,0.9); }
.gd-match-score { font-size: 0.9rem; color: var(--gd-teal) !important; }
.gd-match-h2 { margin-top: var(--gd-space-5); }
.gd-match-fiche-wrap { overflow-x: auto; border-radius: var(--gd-radius-lg); border: 1px solid var(--gd-border); }
.gd-match-fiche { width: 100%; border-collapse: collapse; min-width: 520px; }
.gd-match-fiche thead th { background: var(--gd-night); color: #fff; padding: 14px 12px; text-align: center; font-family: var(--gd-font-display); width: 36%; }
.gd-match-fiche thead th:first-child { width: 28%; }
.gd-match-fiche thead th span { display: block; font-family: inherit; font-weight: 400; font-size: 0.8rem; color: rgba(255,255,255,0.7); }
.gd-match-fiche tbody th { text-align: left; font-weight: 600; padding: 10px 12px; color: var(--gd-heading); }
.gd-match-fiche td { text-align: center; padding: 10px 12px; }
.gd-match-fiche tbody tr:nth-child(even) { background: var(--gd-soft, #F5F8FA); }
.gd-match-fiche td.is-best { color: #0a8a63; font-weight: 800; }
.gd-match-fiche td.is-best::after { content: ' ✓'; }
.gd-match-note { margin-top: 8px; }
.gd-match-etapes { list-style: none; padding: 0; margin: var(--gd-space-2) 0 0; display: flex; flex-direction: column; gap: var(--gd-space-2); counter-reset: none; }
.gd-match-etape { display: grid; grid-template-columns: 52px 1fr; gap: var(--gd-space-2); padding: var(--gd-space-2) var(--gd-space-3) var(--gd-space-2) var(--gd-space-2); border: 1px solid var(--gd-border); border-radius: var(--gd-radius-lg); background: var(--gd-surface); }
.gd-match-etape-num { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--gd-night); color: var(--gd-teal); font-family: var(--gd-font-display); font-weight: 900; font-size: 1.2rem; }
.gd-match-etape h3 { margin: 6px 0 6px; }
.gd-match-etape p { margin: 8px 0 0; line-height: 1.65; }
.gd-match-badge { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--gd-soft, #E8EEF3); color: var(--gd-heading); }
.gd-match-badge--a, .gd-match-badge--b { background: rgba(23,217,163,0.16); color: #0a6e50; }
.gd-match-pourqui { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gd-space-2); }
.gd-match-pourqui .gd-match-pave { margin: var(--gd-space-2) 0 0; }
.gd-match-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: var(--gd-space-4) 0; }
.gd-match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gd-space-2); }
.gd-match-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; border-radius: var(--gd-radius-lg); overflow: hidden; border: 1px solid var(--gd-border); background: var(--gd-surface); transition: transform .15s, box-shadow .15s; }
.gd-match-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11,27,46,0.12); }
.gd-match-card-duel { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 18px 12px; background: linear-gradient(135deg, var(--gd-night), #12314f); }
.gd-match-card-img { flex: 1; height: 90px; display: flex; align-items: flex-end; justify-content: center; }
.gd-match-card-img img { max-width: 100%; max-height: 90px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.4)); }
.gd-match-card-duel .gd-match-card-img:last-child img { transform: scaleX(-1); }
.gd-match-card-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.gd-match-card-body .gd-match-kicker { color: #0a8a63; }
.gd-match-card-promo { color: var(--gd-danger); font-weight: 700; }
@media (max-width: 720px) {
  .gd-match-duel { grid-template-columns: 1fr; }
  .gd-match-vs { margin: -6px auto; }
  .gd-match-car-img { height: 150px; }
  .gd-match-pourqui { grid-template-columns: 1fr; }
  .gd-match-etape { grid-template-columns: 1fr; }
}
/* Photos des matchs : fond clair commun ; « multiply » efface les fonds blancs des photos non détourées. */
.gd-match-car-img, .gd-match-card-img { background: radial-gradient(ellipse at 50% 85%, #dfe8ee 0%, #f7fafc 55%, #ffffff 100%); border-radius: 12px; padding: 10px; box-sizing: border-box; }
.gd-match-car-img img, .gd-match-card-img img { mix-blend-mode: multiply; filter: none; }
.gd-match-car-img { height: 210px; }
.gd-match-card-img { height: 100px; padding: 6px; }

/* Fenêtre newsletter (2026-12-05) : 5 s après l'arrivée, une seule fois par visiteur. */
.gd-nl-pop { position: fixed; inset: 0; z-index: 1000; background: rgba(6, 20, 30, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gd-nl-pop[hidden] { display: none; }
.gd-nl-pop-box { position: relative; background: var(--gd-surface); border-radius: 16px; max-width: 440px; width: 100%; padding: 28px 24px 18px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.gd-nl-pop-box h2 { font-size: 1.3rem; margin: 4px 0 8px; }
.gd-nl-pop-kicker { margin: 0; color: #0a8a63; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.gd-nl-pop-close { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--gd-muted); padding: 4px 8px; }
.gd-nl-pop-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.gd-nl-pop-form input[type=email] { padding: 12px; border: 1px solid var(--gd-border); border-radius: 10px; font-size: 1rem; }
.gd-nl-pop-consent { font-size: 0.85rem; display: flex; gap: 8px; align-items: flex-start; }
.gd-nl-pop-mention { font-size: 0.78rem; color: var(--gd-muted); margin: 0; }
.gd-nl-pop-non { display: block; margin: 10px auto 0; border: 0; background: none; color: var(--gd-muted); text-decoration: underline; cursor: pointer; font-size: 0.85rem; }
.gd-form-mention { margin-top: 12px; font-size: 0.85rem; }
.gd-bornes-signaler { display: inline-block; margin-top: 6px; font-size: 0.8rem; color: var(--gd-muted); }

/* F-03 (2026-12-05) : comparateur, ajout d'un 3e véhicule replié sous le tableau */
.gd-cmp-ajout { margin: var(--gd-space-4) 0; }
.gd-cmp-ajout > summary { list-style: none; cursor: pointer; display: inline-flex; }
.gd-cmp-ajout > summary::-webkit-details-marker { display: none; }
.gd-cmp-ajout[open] > summary { margin-bottom: var(--gd-space-3); }
#comparaison, #ajouter { scroll-margin-top: 90px; }

/* Offres (2026-12-06) : badges d'énergie Thermique / NEV sur chaque offre (accueil et /offres-vehicules). */
.gd-offres-energies { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.gd-offres-card .gd-offres-energies { position: absolute; top: 8px; right: 8px; z-index: 1; justify-content: flex-end; }
.gd-offres-energie {
  display: inline-block; padding: 2px 7px; border-radius: 999px;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.02em; line-height: 1.4; white-space: nowrap;
}
.gd-offres-energie--nev { background: var(--gd-teal); color: #04241f; }
.gd-offres-energie--thermique { background: #5b6675; color: #fff; }
.gd-offres-card .gd-offres-energie { font-size: 0.7rem; padding: 3px 9px; box-shadow: var(--gd-shadow-sm); }
/* Mobile : plus d'espace entre les offres qui défilent. */
@media (max-width: 640px) {
  .gd-brand-scroll-track { gap: 22px; padding: 0 12px; }
  .gd-brand-chip-wrap { flex: 0 0 100px; width: 100px; gap: 8px; }
  .gd-offres-carousel { gap: var(--gd-space-3); padding-inline: 4px; }
  .gd-offres-card { flex: 0 0 78%; }
}

/* ==========================================================================
   Mode nuit (2026-12-06) — html[data-theme="dark"], posé avant le rendu par
   le script de layout.php (choix mémorisé gd_theme, sinon préférence système).
   Les bandeaux bleu nuit (header, footer, hero) gardent --gd-night ; seules
   les surfaces claires, textes et bordures basculent.
   ========================================================================== */
/* F-05 (2026-12-06) : note sous les fiches techniques et le comparateur, lien vers /methodologie. */
.gd-specs-note { margin-top: 8px; font-size: 0.85rem; }
.gd-methodo h2 { margin-top: 24px; }

:root[data-theme="dark"] {
  --gd-bg: #0E1621;
  --gd-bg-alt: #121E2C;
  --gd-surface: #16212F;
  --gd-soft: #1A2838;
  --gd-text: #E3E9EF;
  --gd-muted: #9DAEBE;
  --gd-border: #2A3A4D;
  --gd-heading: #F2F6FA;
  --gd-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --gd-shadow-md: 0 12px 28px rgba(0, 0, 0, 0.45);
  --gd-shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}
:root[data-theme="dark"] a:not([class]) { color: #6FE8C6; }
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea { background-color: var(--gd-surface); color: var(--gd-text); border-color: var(--gd-border); }
:root[data-theme="dark"] .gd-alert.success,
:root[data-theme="dark"] .gd-cmp-table tbody td.gd-cmp-best { color: #6FE8C6; border-color: #1F5A48; }
:root[data-theme="dark"] .gd-alert.error { background: #3A1C1F; color: #F4B4B4; border-color: #6B2A2F; }

/* Bouton de bascule jour / nuit (header) */
.gd-theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px;
  background: transparent; color: #fff; cursor: pointer; padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.gd-theme-toggle:hover, .gd-theme-toggle:focus-visible { background: rgba(255, 255, 255, 0.1); border-color: var(--gd-teal); }
.gd-theme-toggle svg { width: 18px; height: 18px; }
.gd-theme-toggle .gd-ico-sun { display: none; }
:root[data-theme="dark"] .gd-theme-toggle .gd-ico-sun { display: block; }
:root[data-theme="dark"] .gd-theme-toggle .gd-ico-moon { display: none; }
.gd-theme-toggle { margin-left: auto; }
.gd-theme-toggle + .gd-nav-toggle { margin-left: 0; }
@media (min-width: 1024px) {
  .gd-theme-toggle { order: 5; margin-left: 0; }
}
:root[data-theme="dark"] .gd-mk, :root[data-theme="dark"] .gd-mk-pave {
  --mk-n: #5B8FCB; --mk-n1: #6E7C8B; --mk-nev: #2FBF4A; --mk-bev: #2FBF4A;
  --mk-piste: #223246; --mk-grille: #2A3A4D;
}
/* Logos de marque souvent noirs (SVG) : pastille claire en mode nuit pour rester lisibles. */
:root[data-theme="dark"] .gd-model-brand-logo,
:root[data-theme="dark"] .gd-brand-card-logo { background: #F2F6FA; border-radius: 8px; padding: 4px 8px; filter: none; }
/* Photos de véhicules : beaucoup sont des JPEG sur fond blanc. En mode nuit, leur cadre devient une
   vitrine blanche pleine (même rendu que le mode jour) au lieu d'un rectangle blanc dans une case sombre. */
:root[data-theme="dark"] .gd-org-card-image,
:root[data-theme="dark"] .gd-model-hero-media,
:root[data-theme="dark"] .gd-offres-card-image,
:root[data-theme="dark"] .gd-cmp-table thead img { background: #FFFFFF; border-color: transparent; }
/* Page version : même cadre photo que la fiche modèle (vitrine blanche en mode nuit via .gd-model-hero-media). */
.gd-version-media { max-width: 480px; margin-bottom: var(--gd-space-3); }
/* Matchs (2026-12-06) : pavés des modèles moins hauts, photo centrée dans son pavé. */
.gd-match-car { padding: 12px; }
.gd-match-car-img, .gd-match-card-img { align-items: center; }
.gd-match-car-img { height: 150px; }
.gd-match-car-img img { max-height: 100%; }
.gd-match-card-img { height: 90px; }
.gd-match-card-img img { max-height: 100%; }
@media (max-width: 640px) { .gd-match-car-img { height: 110px; } }

/* Accroche de l'accueil (2026-12-06) : bandeau très fin avant les offres du moment. */
.gd-accroche{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 18px;margin:0;padding:6px 16px;text-align:center;font-size:.85rem;line-height:1.3;letter-spacing:.02em;color:#fff;background:var(--gd-night,#0b1f3a);}
/* N-01 (2026-12-06) : 3 accès sous l'accroche. */
.gd-accroche-texte{margin:0;}
.gd-accroche-acces{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;}
.gd-accroche-acces a{color:#fff;text-decoration:none;font-weight:600;padding:3px 12px;border:1px solid var(--gd-teal,#16a394);border-radius:999px;}
.gd-accroche-acces a:hover,.gd-accroche-acces a:focus-visible{background:var(--gd-teal,#16a394);color:#fff;}
:root[data-theme="dark"] .gd-accroche-acces a{color:var(--gd-text,#e6edf5);}
.gd-accroche strong{color:var(--gd-teal,#16a394);font-weight:700;}
:root[data-theme="dark"] .gd-accroche{background:var(--gd-surface);color:var(--gd-text,#e6edf5);border-bottom:1px solid rgba(255,255,255,.08);}

/* L-04 (2026-12-06) : lien Confidentialité visible dans les mentions de consentement. */
.gd-newsletter-consent a, .gd-nl-pop-consent a { color: inherit; text-decoration: underline; }

/* L-06 (2026-12-06) : liens « toutes les offres » et « toutes les marques » côte à côte sous le bandeau. */
.gd-section-more-row { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0; }
@media (max-width: 640px) { .gd-section-more-row { margin-top: 8px; } }

/* N-03 (2026-12-06) : statut du modèle (hors « commercialisé ») et versions qui ne sont plus vendues. */
.gd-statut-marche { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; border: 2px solid var(--gd-teal, #16a394); color: var(--gd-heading, #0b1f3a); }
.gd-statut-marche--archive { border-color: var(--gd-border, #c9d3df); color: var(--gd-muted, #5b6b7f); }
.gd-versions-archivees { margin-top: var(--gd-space-3); }
.gd-versions-archivees summary { cursor: pointer; font-weight: 700; color: var(--gd-heading, #0b1f3a); }
.gd-versions-archivees .gd-version-table-wrap { margin-top: var(--gd-space-2); opacity: 0.85; }
.gd-quickfind-positionnement { margin: -4px 0 12px; }

/* N-05 (2026-12-06, choix utilisateur) : tableaux larges en cartes empilées sur téléphone.
   Libellé de colonne recopié dans data-label par js/tableaux-mobiles.js ; 1re cellule de la ligne = titre de la carte. */
@media (max-width: 640px) {
  table.gd-cartes-mobile, table.gd-cartes-mobile tbody, table.gd-cartes-mobile tr,
  table.gd-cartes-mobile th, table.gd-cartes-mobile td { display: block; width: auto; white-space: normal; }
  table.gd-cartes-mobile { min-width: 0 !important; border: 0; background: none; }
  table.gd-cartes-mobile thead { display: none; }
  table.gd-cartes-mobile tbody tr { margin: 0 0 10px; padding: 10px 12px; border: 2px solid var(--gd-border, #dfe6ee); border-radius: var(--gd-radius-lg, 12px); background: var(--gd-surface, #fff); }
  table.gd-cartes-mobile tr > :first-child { padding: 0 0 6px; border: 0; text-align: left; font-weight: 700; color: var(--gd-heading, #0b1f3a); background: none; }
  table.gd-cartes-mobile td { display: flex; justify-content: flex-end; align-items: center; gap: 6px; padding: 6px 0; border: 0; border-top: 1px solid var(--gd-border, #dfe6ee); text-align: right; }
  table.gd-cartes-mobile td::before { content: attr(data-label); flex: 0 1 50%; margin-right: auto; text-align: left; font-weight: 600; font-size: 0.85rem; color: var(--gd-muted, #5b6b7f); }
  table.gd-cartes-mobile tr > td:first-child { display: block; }
  table.gd-cartes-mobile tr > td:first-child::before, table.gd-cartes-mobile td[data-label=""]::before { content: none; }
  table.gd-cartes-mobile td[data-label=""] { justify-content: flex-end; }
  table.gd-cartes-mobile tr.gd-cmp-category-row { margin: 16px 0 6px; padding: 0; border: 0; background: none; }
  .gd-cmp-table-wrap, .gd-version-table-wrap, .gd-match-fiche-wrap { overflow-x: visible; }
}

/* Mode nuit (demande utilisateur 2026-12-06) : les cadres photo des modèles (vitrine blanche) sont couverts d'un
   calque bleu nuit transparent, couleur du thème, pour ne plus éblouir. Images nues enveloppées pour le recevoir. */
.gd-ai-option-photo { position: relative; display: block; flex: 0 0 auto; border-radius: 6px; overflow: hidden; }
.gd-cmp-photo { position: relative; display: block; border-radius: 8px; overflow: hidden; }
:root[data-theme="dark"] .gd-org-card-image--wrap,
:root[data-theme="dark"] .gd-model-hero-media,
:root[data-theme="dark"] .gd-match-car-img,
:root[data-theme="dark"] .gd-match-card-img,
:root[data-theme="dark"] .gd-ai-option-photo,
:root[data-theme="dark"] .gd-cmp-photo { position: relative; overflow: hidden; }
:root[data-theme="dark"] .gd-org-card-image--wrap::after,
:root[data-theme="dark"] .gd-model-hero-media::after,
:root[data-theme="dark"] .gd-match-car-img::after,
:root[data-theme="dark"] .gd-match-card-img::after,
:root[data-theme="dark"] .gd-ai-option-photo::after,
:root[data-theme="dark"] .gd-cmp-photo::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: rgba(11, 31, 58, 0.55); /* bleu nuit GreenDrive (#0B1F3A) */
}

/* Recherche (2026-12-06) : barre de liens vers les résultats par rubrique, en tête des résultats. */
.gd-search-nav { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--gd-space-4); padding: 10px 12px; background: var(--gd-surface, #fff); border: 2px solid var(--gd-teal, #16a394); border-radius: var(--gd-radius-lg, 12px); }
.gd-search-nav a, .gd-search-nav .is-vide { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.gd-search-nav a { color: var(--gd-heading, #0b1f3a); border: 1px solid var(--gd-teal, #16a394); }
.gd-search-nav a:hover, .gd-search-nav a:focus-visible { background: var(--gd-teal, #16a394); color: #fff; }
.gd-search-nav .is-vide { color: var(--gd-muted, #5b6b7f); border: 1px dashed var(--gd-border, #c9d3df); cursor: default; }
.gd-search-nav-nb { font-size: 0.8rem; padding: 1px 7px; border-radius: 999px; background: var(--gd-soft, #e8f6f3); color: var(--gd-heading, #0b1f3a); }
.gd-search-groupe { margin-bottom: var(--gd-space-5); scroll-margin-top: 90px; }
