/* ==========================================================================
   CarbuZen - Stylesheet Officielle & Design Haute Précision
   Identité visuelle moderne, layout verrouillé anti-déformation, historique
   ========================================================================== */

:root {
  /* Thème Clair par défaut */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;
  
  --border-light: #e2e8f0;
  --border-focus: #0284c7;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;

  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-bg: #e0f2fe;

  --zen: #10b981;
  --zen-dark: #047857;
  --zen-bg: #ecfdf5;

  --success: #16a34a;
  --success-bg: #dcfce7;
  --success-text: #15803d;

  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --danger-text: #b91c1c;

  --warning: #d97706;
  --warning-bg: #fef3c7;
  --warning-text: #b45309;

  --shadow-card: 0 2px 10px -2px rgba(15, 23, 42, 0.07), 0 1px 3px -1px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 12px 24px -4px rgba(15, 23, 42, 0.12), 0 4px 8px -2px rgba(15, 23, 42, 0.06);
  --shadow-modal: 0 20px 40px rgba(0, 0, 0, 0.25);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

[data-theme="dark"] {
  --bg-page: #0b1120;
  --bg-card: #151e32;
  --bg-subtle: #1e293b;
  --bg-hover: #27354a;
  
  --border-light: #24324d;
  --border-focus: #38bdf8;

  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-light: #94a3b8;

  --primary: #38bdf8;
  --primary-hover: #0284c7;
  --primary-bg: rgba(56, 189, 248, 0.15);

  --zen: #34d399;
  --zen-dark: #10b981;
  --zen-bg: rgba(16, 185, 129, 0.15);

  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.15);
  --success-text: #4ade80;

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --danger-text: #f87171;

  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --warning-text: #fbbf24;

  --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.6);
  --shadow-modal: 0 24px 50px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .leaflet-tile-pane {
  filter: brightness(0.72) invert(1) contrast(2.1) hue-rotate(200deg) saturate(0.35);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 0.9375rem; /* ≈15px — unité relative pour respecter RGAA 10.4 (zoom 200%) */
  overflow-x: hidden;
  max-width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button, input, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   Accessibilité RGAA & WCAG (Normes A11y & décret 2019-768)
   ========================================================================== */

/* Masquage visuel tout en restant accessible aux lecteurs d'écran (RGAA / W3C) */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  left: 0 !important;
  top: 0 !important;
}

/* Liens d'évitement / Navigation rapide (Skip Links) */
.skip-links-nav {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100000;
  width: 100%;
  pointer-events: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #0284c7;
  color: #ffffff !important;
  padding: 12px 20px;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  transition: transform 0.15s ease;
  z-index: 100001;
}

.skip-link:focus,
.skip-link:focus-visible {
  left: 20px;
  transform: translateY(0);
  outline: 3px solid #f59e0b !important;
  outline-offset: 3px !important;
}

/* Anneau de focus universel haute visibilité pour la navigation au clavier */
:focus-visible {
  outline: 3px solid #0284c7 !important;
  outline-offset: 2px !important;
}

[data-theme="dark"] :focus-visible {
  outline: 3px solid #38bdf8 !important;
  outline-offset: 2px !important;
}

/* Exceptions pour les champs de recherche disposant déjà d'un conteneur avec anneau complet */
.search-input:focus-visible {
  outline: none !important;
}

/* Réinitialisation accessible du fieldset des filtres */
fieldset.controls-filter-group {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Listes ordonnées sémantiques RGAA pour les cartes ordonnées */
.stations-cards-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.stations-cards-list > li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Liste de définitions sémantique RGAA pour la barre de fraîcheur */
.station-freshness-dl {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.85rem;
  font-size: 0.76rem;
  margin: 0;
}

.station-freshness-dl .freshness-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
}

.station-freshness-dl dt {
  color: var(--text-muted);
  font-weight: 600;
  margin: 0;
}

.station-freshness-dl dd {
  color: var(--text-main);
  font-weight: 800;
  margin: 0;
}

/* Liste sémantique RGAA des carburants dans le tiroir */
.drawer-fuels-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.45rem;
}

.drawer-fuels-list > li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Respect de la préférence utilisateur de réduction des mouvements */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* RGAA 10.12 — Espacement du texte personnalisable (WCAG 1.4.12)
   Garantit qu'aucun contenu n'est perdu si l'utilisateur applique des
   espacements personnalisés : interligne ≥ 1.5×, lettres ≥ 0.12em,
   mots ≥ 0.16em, paragraphes ≥ 2em. */
* {
  /* Les hauteurs fixes sur les conteneurs de texte sont évitées au profit
     de min-height + padding pour permettre la scalabilité */
  min-height: revert; /* annule tout min-height: 0 accidentel */
}
p, li, dd, dt, label, th, td, caption {
  /* Pas de overflow: hidden ni height fixe sur les éléments texte */
  overflow: visible;
}

/* ==========================================================================
   En-tête & Identité Visuelle CarbuZen
   ========================================================================== */

.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 0.65rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.logo-box {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.brand-emblem {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 10px rgba(2, 132, 199, 0.28));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-wrapper:hover .brand-emblem {
  transform: scale(1.08) rotate(-2deg);
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-title {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  display: flex;
  align-items: baseline;
}

.brand-carbu {
  color: var(--text-main);
}

.brand-zen {
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 1px;
}

.brand-tagline {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  margin-top: 1px;
}

.header-center-info {
  display: flex;
  align-items: center;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.35rem 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  user-select: none;
}

/* État 1 : CONNECTÉ (VERT) */
.live-status-pill.status-connected {
  background: rgba(16, 185, 129, 0.1);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .live-status-pill.status-connected {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
}

/* État 2 : DÉCONNECTÉ / HORS LIGNE (ROUGE) */
.live-status-pill.status-disconnected {
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.4);
  cursor: pointer;
}

[data-theme="dark"] .live-status-pill.status-disconnected {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.45);
}

/* Point Pulsant (Vert ou Rouge selon la classe) */
.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.live-status-pill.status-connected .live-pulse-dot {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
  animation: pulse-dot-green 2s infinite;
}

.live-status-pill.status-disconnected .live-pulse-dot {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.35);
  animation: pulse-dot-red 1.4s infinite;
}

@keyframes pulse-dot-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulse-dot-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Libellé de statut */
.live-label {
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Séparateur discret */
.live-pill-divider {
  width: 1px;
  height: 13px;
  background: currentColor;
  opacity: 0.28;
  margin: 0 0.1rem;
}

/* Compte à rebours discret */
.live-timer-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.88;
  letter-spacing: 0.02em;
}

.live-timer-icon {
  opacity: 0.75;
  flex-shrink: 0;
}

.live-timer-text {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Bouton d'actualisation intégré au badge */
.live-refresh-btn {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  color: currentColor;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-left: 0.15rem;
  flex-shrink: 0;
}

[data-theme="dark"] .live-refresh-btn {
  background: rgba(255, 255, 255, 0.08);
}

.live-refresh-btn:hover {
  background: rgba(0, 0, 0, 0.12);
  transform: scale(1.08);
}

[data-theme="dark"] .live-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.live-refresh-btn:active {
  transform: scale(0.92);
}

.live-refresh-icon {
  transition: transform 0.4s ease;
}

.live-refresh-btn.spinning .live-refresh-icon {
  animation: spin-refresh 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin-refresh {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  transform: rotate(15deg);
}

[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ==========================================================================
   Zone Recherche & Sélection de Carburant (Design aéré & épuré)
   ========================================================================== */

.search-hero {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 0.85rem 1.25rem;
  transition: background-color 0.2s ease;
}

.hero-box {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Pilules de sélection de carburant - Élégantes, compactes, horizontales */
.fuel-pills-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fuel-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0.32rem 0.95rem 0.32rem 0.45rem;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  user-select: none;
}

.fuel-pill-btn:hover {
  border-color: var(--primary);
  background: var(--bg-card);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.fuel-pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: #64748b;
  flex-shrink: 0;
}

.fuel-pill-badge.gazole { background: #d97706; }
.fuel-pill-badge.e10 { background: #10b981; }
.fuel-pill-badge.sp98 { background: #059669; }
.fuel-pill-badge.e85 { background: #0284c7; }
.fuel-pill-badge.sp95 { background: #15803d; }

.fuel-pill-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

/* État actif des pilules de carburant */
.fuel-pill-btn.active {
  background: var(--bg-card);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.22), 0 2px 8px rgba(2, 132, 199, 0.15);
  transform: translateY(-1px);
}
.fuel-pill-btn.active .fuel-pill-name {
  color: var(--text-main);
  font-weight: 900;
}

.fuel-pill-btn[data-fuel="gazole"].active {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.25), 0 2px 8px rgba(217, 119, 6, 0.15);
}
.fuel-pill-btn[data-fuel="gazole"].active .fuel-pill-name {
  color: #b45309;
}

.fuel-pill-btn[data-fuel="e10"].active {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25), 0 2px 8px rgba(16, 185, 129, 0.15);
}
.fuel-pill-btn[data-fuel="e10"].active .fuel-pill-name {
  color: #047857;
}

.fuel-pill-btn[data-fuel="sp98"].active {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25), 0 2px 8px rgba(5, 150, 105, 0.15);
}
.fuel-pill-btn[data-fuel="sp98"].active .fuel-pill-name {
  color: #065f46;
}

.fuel-pill-btn[data-fuel="e85"].active {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25), 0 2px 8px rgba(2, 132, 199, 0.15);
}
.fuel-pill-btn[data-fuel="e85"].active .fuel-pill-name {
  color: #0284c7;
}

.fuel-pill-btn[data-fuel="sp95"].active {
  border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.25), 0 2px 8px rgba(21, 128, 61, 0.15);
}
.fuel-pill-btn[data-fuel="sp95"].active .fuel-pill-name {
  color: #15803d;
}

[data-theme="dark"] .fuel-pill-btn[data-fuel="gazole"].active .fuel-pill-name { color: #f59e0b; }
[data-theme="dark"] .fuel-pill-btn[data-fuel="e10"].active .fuel-pill-name { color: #34d399; }
[data-theme="dark"] .fuel-pill-btn[data-fuel="sp98"].active .fuel-pill-name { color: #10b981; }
[data-theme="dark"] .fuel-pill-btn[data-fuel="e85"].active .fuel-pill-name { color: #38bdf8; }
[data-theme="dark"] .fuel-pill-btn[data-fuel="sp95"].active .fuel-pill-name { color: #4ade80; }


/* Champ de recherche ville */
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.25rem 0.45rem 0.25rem 0.85rem;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.search-input-wrapper:focus-within {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.search-icon-left {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  /* Pas d'outline ici : le conteneur .search-input-wrapper affiche déjà un anneau via :focus-within */
  padding: 0.35rem 0;
}

.search-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-geo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-geo:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-primary-search {
  background: var(--primary);
  color: #ffffff;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.9rem;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
  white-space: nowrap;
}

.btn-primary-search:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Autocomplétion dropdown */
.autocomplete-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  z-index: 1200;
  display: none;
  max-height: 280px;
  overflow-y: auto;
}

.autocomplete-box.active {
  display: block;
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: var(--bg-subtle);
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.autocomplete-city {
  font-weight: 700;
  color: var(--text-main);
}

.autocomplete-dep {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Bandeau de Synthèse Épuré
   ========================================================================== */

.summary-strip {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 0.65rem 1.25rem;
}

.summary-strip-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.summary-text {
  font-size: 0.92rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.summary-badge-green {
  background: var(--zen-bg);
  color: var(--zen-dark);
  font-weight: 800;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  max-width: 100%;
  word-break: break-word;
}

[data-theme="dark"] .summary-badge-green {
  color: #34d399;
}

.btn-force-refresh {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
  margin-left: 0.2rem;
}

.btn-force-refresh:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: rotate(180deg);
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.controls-filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.filter-stock-checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.filter-stock-checkbox input {
  width: 15px;
  height: 15px;
  accent-color: var(--zen);
}

.sort-dropdown {
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.sort-dropdown:focus-visible {
  border-color: var(--primary);
  outline: 3px solid var(--primary) !important;
  outline-offset: 2px !important;
}

.view-tabs {
  display: flex;
  background: var(--bg-subtle);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.view-tab-btn {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 6px;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.view-tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}



/* ==========================================================================
   LAYOUT PRINCIPAL VERROUILLÉ ANTI-DÉFORMATION
   La carte reste toujours visible et grande, la liste défile dans sa colonne
   ========================================================================== */

.content-container {
  max-width: 1440px;
  margin: 0.85rem auto 1rem;
  padding: 0 1.25rem;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.main-view-grid {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 1.25rem;
  height: calc(100vh - 200px);
  min-height: 580px;
  align-items: stretch;
}

/* Mode Vue Liste Seule */
.main-view-grid.list-only {
  grid-template-columns: 1fr;
}
.main-view-grid.list-only .map-wrapper {
  display: none;
}

/* Mode Vue Carte Seule */
.main-view-grid.map-only {
  grid-template-columns: 1fr;
}
.main-view-grid.map-only .stations-list-wrapper {
  display: none;
}

/* Colonne Liste de Stations : Défilement autonome dans son cadre */
.stations-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  position: relative;
  scroll-behavior: smooth;
}

.stations-list-wrapper::-webkit-scrollbar {
  width: 6px;
}
.stations-list-wrapper::-webkit-scrollbar-track {
  background: transparent;
}
.stations-list-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-full);
}
.stations-list-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* Cadre de la Carte Leaflet : Pleine hauteur garantie */
.map-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
  position: relative;
  box-shadow: var(--shadow-card);
}

#map {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   Cartes de Stations - Alignement Rigoureux & Logos Officiels
   ========================================================================== */

.station-row-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem 0.85rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}

.station-row-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Carte de station sélectionnée / active */
.station-row-card.station-card-focused {
  border-color: #0284c7 !important;
  background: var(--bg-card);
  box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.4), 0 10px 25px rgba(2, 132, 199, 0.2) !important;
  transform: translateY(-2px);
  z-index: 2;
}

[data-theme="dark"] .station-row-card.station-card-focused {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3.5px rgba(56, 189, 248, 0.45), 0 10px 25px rgba(56, 189, 248, 0.25) !important;
}

/* Vague lumineuse d'attention quand la carte est ciblée depuis la carte */
.station-row-card.station-card-pulse {
  animation: stationCardPulseWave 1.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes stationCardPulseWave {
  0% {
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.75), 0 4px 12px rgba(0, 0, 0, 0.12);
  }
  35% {
    box-shadow: 0 0 0 8px rgba(2, 132, 199, 0.35), 0 10px 28px rgba(2, 132, 199, 0.28);
  }
  65% {
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.45), 0 8px 22px rgba(2, 132, 199, 0.22);
  }
  100% {
    box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.4), 0 10px 25px rgba(2, 132, 199, 0.2);
  }
}

.station-row-card.best-station {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-card) 60%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

.station-row-card.best-station.station-card-focused {
  border-color: #0284c7 !important;
}

/* En-tête de carte : Alignement parfait gauche (identité) / droite (prix) */
.station-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.station-brand-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}

/* Avatar officiel de marque (format carré équilibré, respectant les proportions) */
.brand-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 4px;
  box-sizing: border-box;
}

.brand-avatar img,
.brand-avatar .brand-logo-img,
.brand-logo-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain !important;
  display: block !important;
  margin: auto !important;
}

.station-id-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.station-brand-header-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.station-brand-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.best-price-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: #047857;
  background: #d1fae5;
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

[data-theme="dark"] .best-price-badge {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.22);
}

.station-address-line {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-meta-tags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

.meta-dist-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-bg);
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-sm);
}

.meta-service-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-sm);
}

/* Bloc Prix à droite : Aligné et stable */
.station-price-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
  min-width: 130px;
  text-align: right;
}

/* Badge de carburant explicite dans la fiche station (Anti-Confusion) */
.station-fuel-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.station-fuel-indicator.fuel-gazole {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.3);
}
.station-fuel-indicator.fuel-e10,
.station-fuel-indicator.fuel-sp95 {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.station-fuel-indicator.fuel-sp98 {
  background: rgba(5, 150, 105, 0.12);
  color: #065f46;
  border: 1px solid rgba(5, 150, 105, 0.3);
}
.station-fuel-indicator.fuel-e85 {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.3);
}
.station-fuel-indicator.fuel-gplc {
  background: rgba(147, 51, 234, 0.12);
  color: #7e22ce;
  border: 1px solid rgba(147, 51, 234, 0.3);
}

[data-theme="dark"] .station-fuel-indicator.fuel-gazole { color: #f59e0b; }
[data-theme="dark"] .station-fuel-indicator.fuel-e10,
[data-theme="dark"] .station-fuel-indicator.fuel-sp95 { color: #34d399; }
[data-theme="dark"] .station-fuel-indicator.fuel-sp98 { color: #10b981; }
[data-theme="dark"] .station-fuel-indicator.fuel-e85 { color: #38bdf8; }
[data-theme="dark"] .station-fuel-indicator.fuel-gplc { color: #c084fc; }

.price-main-display {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.2rem;
}

.big-price {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1;
  letter-spacing: -0.04em;
}

.big-price-unit {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.price-rupture-display {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--danger);
  line-height: 1.1;
}

.price-not-sold-display {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-light);
}

.stock-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.stock-status-pill.in-stock {
  background: var(--success-bg);
  color: var(--success-text);
}

.stock-status-pill.rupture {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.stock-status-pill.not-sold {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

/* Ligne Logistique & Fraîcheur des données */
.station-freshness-bar {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.85rem;
  font-size: 0.76rem;
}

.freshness-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.freshness-label {
  color: var(--text-muted);
  font-weight: 600;
}

.freshness-val {
  color: var(--text-main);
  font-weight: 800;
}

.freshness-val.reappro-ok {
  color: var(--zen-dark);
}

[data-theme="dark"] .freshness-val.reappro-ok {
  color: #34d399;
}

.freshness-val.reappro-wait {
  color: var(--warning);
}

.freshness-item.rupture-warn {
  color: var(--danger);
  font-weight: 800;
}

/* Barre d'action inférieure avec bouton Historique */
.card-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-light);
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card-actions-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-toggle-drawer {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.btn-toggle-drawer:hover {
  color: var(--primary);
}

.btn-open-gps {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--primary);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-open-gps:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Tiroir de détails repliable */
.station-details-drawer {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-top: 0.2rem;
}

.station-details-drawer[hidden] {
  display: none !important;
}

.station-details-drawer.open {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.drawer-fuels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.45rem;
}

.drawer-fuel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.drawer-fuel-card:hover {
  border-color: var(--primary);
}

.drawer-fuel-card.active-fuel {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.drawer-fuel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-fuel-name {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
}

.drawer-fuel-price {
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--text-main);
}

.drawer-fuel-price.text-danger {
  color: var(--danger);
  font-size: 0.8rem;
}

.drawer-fuel-maj {
  font-size: 0.65rem;
  color: var(--text-light);
}

.drawer-services-line {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 0.4rem;
  border-top: 1px dashed var(--border-light);
  line-height: 1.4;
}

/* ==========================================================================
   Marqueurs Leaflet Haute Précision
   ========================================================================== */

/* Indicateur Live de Recherche Auto Permanente sur la carte */
.map-live-indicator {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  color: #065f46;
  pointer-events: none;
  transition: all 0.25s ease;
}

[data-theme="dark"] .map-live-indicator {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(52, 211, 153, 0.4);
  color: #34d399;
}

.map-live-indicator.loading {
  border-color: var(--primary);
  color: var(--primary);
}

.live-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
  animation: pulse-dot 1.8s infinite;
}

.map-live-indicator.loading .live-indicator-dot {
  background: var(--primary);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.35);
}

.marker-pin-wrapper,
.cz-marker-container {
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
}

.cz-map-pin {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #0284c7;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  padding: 2px 8px 2px 3px;
  gap: 6px;
  white-space: nowrap;
  position: absolute;
  bottom: 8px;
  left: 0;
  transform: translate(-50%, 0);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  z-index: 10;
}

.cz-map-pin:hover {
  transform: translate(-50%, -2px) scale(1.06);
  z-index: 1000 !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* Aiguille / Pointeur précis vers la coordonnée */
.cz-pin-pointer {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid #0284c7;
  pointer-events: none;
}

.cz-pin-pointer::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -4px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 7px solid #ffffff;
}

/* Pastille point d'ancrage exact au sol (cible Leaflet [0,0]) */
.cz-marker-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: #0284c7;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 5;
}

.cz-pin-brand-avatar {
  width: 30px;
  height: 24px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 2px;
  box-sizing: border-box;
}

/* Règle absolue prioritaire contre les resets Leaflet (.leaflet-container img) */
.leaflet-container .cz-pin-brand-avatar img,
.leaflet-container img.cz-pin-img,
.cz-pin-brand-avatar img,
.cz-pin-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain !important;
  display: block !important;
  margin: auto !important;
}

.cz-pin-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.cz-pin-header-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cz-pin-brand-name {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.cz-pin-stale-icon {
  font-size: 0.68rem;
  margin-left: 2px;
}

.cz-pin-fuel-badge {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
}

.cz-pin-fuel-badge.fuel-gazole { background: #fef3c7; color: #92400e; }
.cz-pin-fuel-badge.fuel-e10,
.cz-pin-fuel-badge.fuel-sp95 { background: #dcfce7; color: #166534; }
.cz-pin-fuel-badge.fuel-sp98 { background: #d1fae5; color: #065f46; }
.cz-pin-fuel-badge.fuel-e85 { background: #e0f2fe; color: #075985; }
.cz-pin-fuel-badge.fuel-gplc { background: #f3e8ff; color: #6b21a8; }

.cz-pin-price {
  font-size: 0.85rem;
  font-weight: 900;
  color: #0f172a;
}

.cz-map-pin.cheapest {
  border-color: #059669;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35), 0 6px 14px rgba(0, 0, 0, 0.25);
}
.cz-map-pin.cheapest .cz-pin-pointer {
  border-top-color: #059669;
}
.cz-map-pin.cheapest .cz-pin-price {
  color: #047857;
  font-size: 0.92rem;
}

.cz-pin-top-badge {
  background: #10b981;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

.cz-map-pin.rupture {
  border-color: #dc2626;
}
.cz-map-pin.rupture .cz-pin-pointer {
  border-top-color: #dc2626;
}
.cz-map-pin.rupture .cz-pin-price {
  color: #dc2626;
  font-size: 0.78rem;
}

.cz-map-pin.not-sold {
  border-color: #cbd5e1;
  opacity: 0.75;
}
.cz-map-pin.not-sold .cz-pin-pointer {
  border-top-color: #94a3b8;
}
.cz-map-pin.not-sold .cz-pin-price {
  color: #64748b;
  font-size: 0.75rem;
}

[data-theme="dark"] .cz-map-pin {
  background: #1e293b;
  border-color: #38bdf8;
  color: #f8fafc;
}
[data-theme="dark"] .cz-pin-pointer {
  border-top-color: #38bdf8;
}
[data-theme="dark"] .cz-pin-pointer::after {
  border-top-color: #1e293b;
}
[data-theme="dark"] .cz-pin-price {
  color: #f8fafc;
}
[data-theme="dark"] .cz-map-pin.cheapest {
  border-color: #34d399;
}
[data-theme="dark"] .cz-map-pin.cheapest .cz-pin-pointer {
  border-top-color: #34d399;
}
[data-theme="dark"] .cz-map-pin.cheapest .cz-pin-price {
  color: #34d399;
}

/* Style de marqueur vigilance prix ancien */
.cz-map-pin.stale-warning {
  border-color: #f59e0b;
}
.cz-map-pin.stale-warning .cz-pin-pointer {
  border-top-color: #f59e0b;
}
.cz-map-pin.stale-warning .cz-pin-price {
  color: #b45309;
}

[data-theme="dark"] .cz-map-pin.stale-warning {
  border-color: #f59e0b;
}
[data-theme="dark"] .cz-map-pin.stale-warning .cz-pin-price {
  color: #fbbf24;
}

/* Style de marqueur sélectionné / actif */
.cz-map-pin.cz-pin-focused {
  z-index: 9999 !important;
  transform: translate(-50%, -6px) scale(1.15) !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 5px rgba(2, 132, 199, 0.5), 0 12px 28px rgba(0, 0, 0, 0.45) !important;
  animation: czPinBounce 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] .cz-map-pin.cz-pin-focused {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 5px rgba(56, 189, 248, 0.5), 0 12px 28px rgba(0, 0, 0, 0.55) !important;
}

.cz-map-pin.cz-pin-focused .cz-pin-pointer {
  border-top-color: #0284c7 !important;
}

[data-theme="dark"] .cz-map-pin.cz-pin-focused .cz-pin-pointer {
  border-top-color: #38bdf8 !important;
}

@keyframes czPinBounce {
  0% { transform: translate(-50%, 0) scale(1); }
  40% { transform: translate(-50%, -14px) scale(1.22); }
  75% { transform: translate(-50%, -4px) scale(1.1); }
  100% { transform: translate(-50%, -6px) scale(1.15); }
}

/* ==========================================================================
   Marqueur Géolocalisation Utilisateur (Rond Bleu Pulsant)
   ========================================================================== */

.cz-user-gps-container {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
}

.cz-user-gps-dot {
  width: 15px;
  height: 15px;
  background: #2563eb;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 3;
}

.cz-user-gps-pulse {
  position: absolute;
  width: 28px;
  height: 28px;
  background: rgba(37, 99, 235, 0.35);
  border-radius: 50%;
  animation: user-gps-ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
  z-index: 1;
}

@keyframes user-gps-ping {
  0% { transform: scale(0.6); opacity: 0.9; }
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

/* ==========================================================================
   Alerte Vigilance Prix (Données anciennes / non actualisées)
   ========================================================================== */

.station-vigilance-alert {
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: #92400e;
  line-height: 1.35;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.1);
  margin-top: 0.25rem;
}

[data-theme="dark"] .station-vigilance-alert {
  background: rgba(245, 158, 11, 0.12);
  border-color: #d97706;
  color: #fde68a;
}

.vigilance-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
}

.vigilance-text strong {
  font-weight: 800;
  color: #b45309;
}

[data-theme="dark"] .vigilance-text strong {
  color: #fbbf24;
}

.badge-vigilance-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #f59e0b;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

[data-theme="dark"] .badge-vigilance-pill {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: #b45309;
}

/* ==========================================================================
   Popup Leaflet Enrichie
   ========================================================================== */

.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 290px !important;
  line-height: 1.4 !important;
}

.cz-popup-card {
  padding: 0.95rem 1.1rem;
  background: #ffffff;
  color: #0f172a;
}

.cz-popup-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.cz-popup-avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 3px;
}

.cz-popup-brand-name {
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.1;
  color: #0f172a;
}

.cz-popup-address {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}

.cz-popup-main-price {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.cz-popup-fuel-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #334155;
}

.cz-popup-price-val {
  font-size: 1.2rem;
  font-weight: 900;
  color: #0284c7;
}

.cz-popup-fuels-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.65rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.45rem;
}

.cz-popup-fuel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.cz-popup-row-name {
  font-weight: 700;
  color: #64748b;
}

.cz-popup-row-price {
  font-weight: 800;
  color: #0f172a;
}

.cz-popup-row-price.rupture {
  color: #dc2626;
}

.cz-popup-footer-stats {
  font-size: 0.7rem;
  color: #64748b;
  margin-bottom: 0.65rem;
  background: #f8fafc;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cz-popup-actions {
  display: flex;
  gap: 0.4rem;
}



/* ==========================================================================
   États de Chargement & Footer
   ========================================================================== */

.simple-loading {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}

.simple-spinner {
  width: 36px;
  height: 36px;
  border: 3.5px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 0.75rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  padding: 1.25rem;
  margin-top: auto;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-source-note {
  max-width: 900px;
  margin: 0 auto 0.4rem;
  line-height: 1.4;
}

.footer-ai-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 auto 0.45rem;
  font-weight: 600;
  line-height: 1.4;
}

.footer-copy {
  font-weight: 700;
  color: var(--text-main);
}

/* Navigation secondaire & Accessibilité RGAA dans le pied de page */
.footer-nav {
  margin-bottom: 0.85rem;
}

.footer-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1.25rem;
}

.footer-nav-link {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  font-size: 0.82rem;
  transition: color 0.15s ease;
}

.footer-nav-link:hover {
  color: var(--primary);
}

.btn-footer-a11y {
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.btn-footer-a11y:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.footer-a11y-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  color: #059669;
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .footer-a11y-badge {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(52, 211, 153, 0.3);
  color: #34d399;
}

/* Boîte de dialogue accessible RGAA 13.8 */
.a11y-dialog {
  border: none;
  border-radius: var(--radius-md);
  padding: 0;
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-modal);
  max-width: 680px;
  width: 92vw;
  max-height: 85vh;
  margin: auto;
}

.a11y-dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.a11y-dialog-content {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.a11y-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--border-light);
}

.a11y-dialog-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.a11y-dialog-close {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.a11y-dialog-close:hover {
  color: var(--danger);
}

.a11y-dialog-body {
  padding: 1.35rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.a11y-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--primary);
}

.a11y-section p {
  margin: 0 0 0.75rem;
  color: var(--text-main);
}

.a11y-features-list {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.a11y-features-list li {
  color: var(--text-main);
}

.a11y-shortcuts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.a11y-shortcuts-table th,
.a11y-shortcuts-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border: 1px solid var(--border-light);
}

.a11y-shortcuts-table th {
  background: var(--bg-subtle);
  font-weight: 700;
  color: var(--text-main);
}

.a11y-shortcuts-table kbd {
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
  font-family: monospace;
  font-size: 0.8rem;
  padding: 0.15rem 0.35rem;
  color: var(--text-main);
}

.a11y-dialog-footer {
  padding: 0.85rem 1.35rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   SYSTÈME RESPONSIVE COMPLET : MOBILE, TABLETTES & DESKTOP
   ========================================================================== */

/* 1. Grands Écrans & Ordinateurs Portables (1025px à 1200px) */
@media (max-width: 1200px) and (min-width: 1025px) {
  .content-container {
    padding: 0 1rem;
  }
  .main-view-grid {
    grid-template-columns: 420px 1fr;
    gap: 1rem;
    height: calc(100vh - 215px);
  }
  .brand-tagline {
    font-size: 0.72rem;
  }
}

/* 2. Tablettes en mode Paysage & Petits Laptops (881px à 1024px) */
@media (max-width: 1024px) and (min-width: 881px) {
  .content-container {
    padding: 0 1rem;
    margin: 0.65rem auto 1rem;
  }
  .main-view-grid {
    grid-template-columns: 370px 1fr;
    gap: 1rem;
    height: calc(100vh - 225px);
    min-height: 500px;
  }
  .brand-tagline {
    display: none;
  }
  .station-price-box {
    min-width: 115px;
  }
  .big-price {
    font-size: 1.65rem;
  }
}

/* 3. Tablettes en mode Portrait & Écrans Moyens (681px à 880px) */
@media (max-width: 880px) {
  .content-container {
    padding: 0 1rem;
    margin: 0.65rem auto 1rem;
  }

  .main-view-grid {
    grid-template-columns: 1fr;
    height: auto;
    gap: 1rem;
  }

  /* Mode mixte sur tablette portrait */
  .stations-list-wrapper {
    height: 480px;
    padding-right: 4px;
  }
  .map-wrapper {
    height: 460px;
  }

  /* Mode Liste seule sur tablette */
  .main-view-grid.list-only .stations-list-wrapper {
    height: calc(100vh - 260px);
    min-height: 480px;
    max-width: 760px;
    margin: 0 auto;
    width: 100%;
  }

  /* Mode Carte seule sur tablette */
  .main-view-grid.map-only .map-wrapper {
    height: calc(100vh - 260px);
    min-height: 480px;
  }

  .brand-tagline {
    display: none;
  }

  .summary-strip-inner {
    gap: 0.65rem;
  }

  .controls-right {
    flex-wrap: wrap;
    gap: 0.65rem;
  }
}

/* 4. Téléphones Mobiles & Phablettes (jusqu'à 680px) */
@media (max-width: 680px) {
  /* Prise en charge des encoches iOS (Safe Area Insets) */
  .site-header {
    padding: max(0.45rem, env(safe-area-inset-top)) 0.75rem 0.45rem;
  }
  .site-footer {
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }

  /* En-tête mobile épuré et compact */
  .header-inner {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    justify-content: space-between;
  }

  .brand-wrapper {
    gap: 0.5rem;
  }

  .logo-box {
    width: 36px;
    height: 36px;
  }

  .brand-title {
    font-size: 1.25rem;
  }

  .brand-tagline {
    display: none;
  }

  .header-right {
    gap: 0.45rem;
  }

  .header-center-info {
    order: 3;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0.15rem;
  }

  .live-status-pill {
    padding: 0.22rem 0.6rem;
    font-size: 0.74rem;
    gap: 0.35rem;
    max-width: 100%;
  }

  .live-timer-wrap {
    font-size: 0.72rem;
  }

  .live-refresh-btn {
    width: 24px;
    height: 24px;
  }

  .theme-toggle-btn {
    width: 34px;
    height: 34px;
  }

  /* Zone de recherche mobile */
  .search-hero {
    padding: 0.65rem 0.75rem;
  }

  .hero-box {
    gap: 0.65rem;
  }

  /* Pilules de carburant : carrousel fluide tactile sans débordement vertical */
  .fuel-pills-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.15rem 0.1rem 0.35rem;
    gap: 0.4rem;
    margin: 0;
    max-width: 100%;
  }
  .fuel-pills-row::-webkit-scrollbar {
    display: none;
  }

  .fuel-pill-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.3rem 0.75rem 0.3rem 0.4rem;
    gap: 0.35rem;
    min-height: 36px;
  }
  .fuel-pill-name {
    font-size: 0.82rem;
  }
  .fuel-pill-badge {
    height: 22px;
    font-size: 0.68rem;
    padding: 0 5px;
  }

  /* Champ de recherche ville : ergonomie tactile pour pouces */
  .search-input-wrapper {
    flex-wrap: wrap;
    padding: 0.55rem 0.75rem 0.65rem;
    border-radius: var(--radius-md);
    gap: 0.45rem;
  }

  .search-icon-left {
    flex-shrink: 0;
  }

  .search-input {
    flex: 1;
    min-width: 0;
    font-size: 16px; /* 16px strict requis pour empêcher le zoom forcé d'iOS Safari */
    padding: 0.25rem 0;
  }

  .search-actions {
    display: flex;
    width: 100%;
    gap: 0.45rem;
    margin-top: 0.25rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border-light);
  }

  .btn-geo,
  .btn-primary-search {
    flex: 1;
    min-height: 40px;
    justify-content: center;
    padding: 0.45rem 0.5rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
  }

  /* Bandeau de synthèse et contrôles */
  .summary-strip {
    padding: 0.55rem 0.75rem;
  }

  .summary-strip-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .summary-text {
    font-size: 0.84rem;
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .summary-badge-green {
    font-size: 0.78rem;
    padding: 0.2rem 0.5rem;
    max-width: 100%;
    word-break: break-word;
    white-space: normal;
  }

  .controls-right {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .controls-filter-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
  }

  .filter-stock-checkbox {
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .sort-dropdown {
    flex: 1;
    min-width: 0;
    max-width: 200px;
    font-size: 0.78rem;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius-sm);
  }

  .view-tabs {
    width: 100%;
    display: flex;
  }

  .view-tab-btn {
    flex: 1;
    text-align: center;
    padding: 0.45rem 0.5rem;
    font-size: 0.82rem;
    font-weight: 800;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Grille Principale sur mobile */
  .content-container {
    padding: 0 0.55rem;
    margin: 0.45rem auto 0.85rem;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .main-view-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.65rem;
    height: auto;
    width: 100%;
    max-width: 100%;
  }

  /* Mode mixte (Split) sur mobile */
  .stations-list-wrapper {
    height: 430px;
    padding-right: 2px;
    gap: 0.65rem;
    min-width: 0;
    max-width: 100%;
  }

  .map-wrapper {
    height: 340px;
    border-radius: var(--radius-sm);
    min-width: 0;
    max-width: 100%;
  }

  /* Mode Liste seule sur mobile (pleine hauteur disponible) */
  .main-view-grid.list-only .stations-list-wrapper {
    height: calc(100vh - 245px);
    min-height: 400px;
  }

  /* Mode Carte seule sur mobile (pleine hauteur disponible) */
  .main-view-grid.map-only .map-wrapper {
    height: calc(100vh - 245px);
    min-height: 400px;
  }

  /* Cartes de stations adaptées au mobile */
  .station-row-card {
    padding: 0.75rem;
    gap: 0.55rem;
    border-radius: var(--radius-sm);
    max-width: 100%;
    box-sizing: border-box;
  }

  .station-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
  }

  .station-brand-block {
    flex: 1;
    min-width: 0;
    gap: 0.55rem;
  }

  .brand-avatar {
    width: 42px;
    height: 42px;
    padding: 3px;
    flex-shrink: 0;
  }

  .station-id-info {
    flex: 1;
    min-width: 0;
  }

  .station-brand-header-line {
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .station-brand-title {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .station-address-line {
    font-size: 0.74rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .station-price-box {
    flex-shrink: 0;
    min-width: 92px;
    max-width: 110px;
    text-align: right;
  }

  .big-price {
    font-size: 1.45rem;
    letter-spacing: -0.03em;
  }

  .station-fuel-indicator {
    font-size: 0.68rem;
    padding: 1px 5px;
  }

  .stock-status-pill {
    font-size: 0.72rem;
    padding: 0.12rem 0.45rem;
  }

  .station-freshness-bar {
    padding: 0.35rem 0.55rem;
    font-size: 0.73rem;
    gap: 0.25rem 0.5rem;
  }

  .card-bottom-bar {
    padding-top: 0.45rem;
    gap: 0.4rem;
  }

  .btn-toggle-drawer {
    font-size: 0.76rem;
    min-height: 34px;
  }

  .btn-open-gps {
    font-size: 0.78rem;
    min-height: 34px;
    padding: 0.35rem 0.75rem;
  }

  .drawer-fuels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
  }

  /* Popup Leaflet confiné pour éviter tout débordement d'écran */
  .leaflet-popup-content {
    width: min(290px, calc(100vw - 32px)) !important;
  }
  .cz-popup-card {
    padding: 0.8rem 0.9rem;
  }

  /* Footer mobile */
  .site-footer {
    padding: 1.1rem 0.75rem max(1.25rem, env(safe-area-inset-bottom));
    font-size: 0.74rem;
  }
}

/* 5. Téléphones très compacts (< 420px, ex: iPhone SE, iPhone Mini, Fold fermé) */
@media (max-width: 420px) {
  .brand-title {
    font-size: 1.15rem;
  }

  .logo-box {
    width: 32px;
    height: 32px;
  }

  /* Simplifie la pilule de direct pour garder tout sur une ligne */
  .live-label,
  .live-pill-divider {
    display: none;
  }

  .live-status-pill {
    padding: 0.2rem 0.35rem 0.2rem 0.5rem;
    gap: 0.25rem;
  }

  .brand-avatar {
    width: 36px;
    height: 36px;
  }

  .station-brand-title {
    font-size: 0.88rem;
  }

  .station-address-line {
    font-size: 0.72rem;
  }

  /* Sur écrans étroits, masquer le badge vigilance dans l'en-tête de carte car le bandeau d'alerte orange détaillé est déjà affiché en-dessous */
  .badge-vigilance-pill {
    display: none;
  }

  .best-price-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
  }

  .station-freshness-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .station-price-box {
    min-width: 82px;
    max-width: 96px;
  }

  .big-price {
    font-size: 1.3rem;
  }

  .big-price-unit {
    font-size: 0.65rem;
  }

  .btn-geo span,
  .btn-primary-search span {
    font-size: 0.75rem;
  }

  .sort-dropdown {
    max-width: 150px;
    font-size: 0.74rem;
  }

  .filter-stock-checkbox span {
    font-size: 0.75rem;
  }
}

/* 6. Écrans ultra-compacts (320px - 359px, ex: iPhone SE 1ère gén, Galaxy Fold fermé) */
@media (max-width: 359px) {
  .station-row-card {
    padding: 0.6rem 0.5rem;
    gap: 0.45rem;
  }

  .station-card-header {
    gap: 0.35rem;
  }

  .station-brand-block {
    gap: 0.4rem;
  }

  .brand-avatar {
    width: 32px;
    height: 32px;
    padding: 2px;
  }

  .station-brand-title {
    font-size: 0.82rem;
  }

  .station-price-box {
    min-width: 76px;
    max-width: 86px;
  }

  .big-price {
    font-size: 1.2rem;
  }

  .station-fuel-indicator {
    font-size: 0.62rem;
  }

  .stock-status-pill {
    font-size: 0.68rem;
  }

  .search-hero {
    padding: 0.5rem 0.55rem;
  }

  .btn-geo,
  .btn-primary-search {
    min-height: 36px;
    padding: 0.35rem 0.4rem;
  }

  .btn-geo span,
  .btn-primary-search span {
    font-size: 0.7rem;
  }

  .view-tab-btn {
    font-size: 0.76rem;
    min-height: 34px;
    padding: 0.35rem 0.35rem;
  }

  .summary-text {
    font-size: 0.78rem;
  }

  .summary-badge-green {
    font-size: 0.72rem;
    padding: 0.15rem 0.4rem;
  }
}

