/* ==========================================================================
   CarbuZen - Direction Artistique Moderne & Fluide
   Architecture :
   - Carte plein écran immersive (Edge-to-Edge Canvas)
   - Volet interactif avec verre dépoli (Frosted Glassmorphism)
   - Recherche prédictive, Sélecteur ergonomique, Cartes de stations détaillées
   - Mobile : Volet tactile inférieur adapté
   - 100% conforme RGAA 4.1 AA & Fluidité 60fps
   ========================================================================== */

:root {
  /* Système de couleurs CarbuZen Conforme RGAA 4.1 AA (Thème Clair) */
  --cz-bg: #f5f5f7;
  --cz-surface: #ffffff;
  --cz-surface-secondary: #f0f0f4;
  --cz-surface-tertiary: #e5e5ea;
  
  --cz-border: rgba(0, 0, 0, 0.12);
  --cz-border-strong: rgba(0, 0, 0, 0.20);

  --cz-text-primary: #1d1d1f;       /* Ratio 16.1:1 sur blanc (AAA) */
  --cz-text-secondary: #57575c;     /* Ratio 6.5:1 sur blanc (AAA) */
  --cz-text-tertiary: #5e5e64;      /* Ratio 5.7:1 sur blanc (AA > 4.5:1) */

  --cz-blue: #0066cc;               /* Ratio 5.4:1 sur blanc (AA) */
  --cz-blue-hover: #0055b3;
  --cz-blue-subtle: rgba(0, 102, 204, 0.12);

  --cz-green: #15803d;              /* Ratio 5.1:1 sur blanc (AA) */
  --cz-green-dark: #166534;         /* Ratio 7.2:1 sur blanc (AAA) */
  --cz-green-subtle: rgba(21, 128, 61, 0.14);

  --cz-red: #c81e1e;                /* Ratio 5.2:1 sur blanc (AA) */
  --cz-red-subtle: rgba(200, 30, 30, 0.14);

  --cz-orange: #b45309;             /* Ratio 4.8:1 sur blanc (AA) */
  --cz-orange-subtle: rgba(180, 83, 9, 0.14);

  --cz-yellow: #a16207;

  /* Ombres douces CarbuZen */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-island: 0 20px 60px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-floating: 0 16px 40px rgba(0, 0, 0, 0.12);

  /* Rayons de courbure */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-island: 28px;
  --radius-full: 9999px;

  /* Verre dépoli */
  --glass-island-bg: rgba(255, 255, 255, 0.86);
  --glass-blur: blur(35px) saturate(190%);
  --glass-border: 1px solid rgba(255, 255, 255, 0.7);

  /* Rétro-compatibilité pour scripts JS */
  --bg-page: var(--cz-bg);
  --bg-card: var(--cz-surface);
  --bg-subtle: var(--cz-surface-secondary);
  --border-light: var(--cz-border);
  --border-focus: var(--cz-blue);
  --text-main: var(--cz-text-primary);
  --text-muted: var(--cz-text-secondary);
  --text-light: var(--cz-text-tertiary);
  --primary: var(--cz-blue);
  --primary-hover: var(--cz-blue-hover);
  --primary-bg: var(--cz-blue-subtle);
  --zen: var(--cz-green);
  --zen-dark: var(--cz-green-dark);
  --zen-bg: var(--cz-green-subtle);
  --success: var(--cz-green);
  --success-bg: var(--cz-green-subtle);
  --success-text: var(--cz-green-dark);
  --danger: var(--cz-red);
  --danger-bg: var(--cz-red-subtle);
  --danger-text: var(--cz-red);
  --warning: var(--cz-orange);
  --warning-bg: var(--cz-orange-subtle);
  --warning-text: var(--cz-orange);
}

[data-theme="dark"] {
  /* Système de couleurs CarbuZen Conforme RGAA 4.1 AA (Thème Sombre) */
  --cz-bg: #000000;
  --cz-surface: #101216;
  --cz-surface-secondary: rgba(255, 255, 255, 0.08);
  --cz-surface-tertiary: rgba(255, 255, 255, 0.14);
  
  --cz-border: rgba(255, 255, 255, 0.12);
  --cz-border-strong: rgba(255, 255, 255, 0.24);

  --cz-text-primary: #ffffff;       /* Ratio 19.8:1 sur fond sombre (AAA) */
  --cz-text-secondary: #cbd5e1;     /* Ratio 11.2:1 sur fond sombre (AAA) */
  --cz-text-tertiary: #94a3b8;      /* Ratio 6.8:1 sur fond sombre (AAA) */

  --cz-blue: #38bdf8;               /* Ratio 9.1:1 sur fond sombre (AAA) */
  --cz-blue-hover: #60a5fa;
  --cz-blue-subtle: rgba(56, 189, 248, 0.18);

  --cz-green: #34d399;              /* Ratio 10.5:1 sur fond sombre (AAA) */
  --cz-green-dark: #10b981;
  --cz-green-subtle: rgba(52, 211, 153, 0.18);

  --cz-red: #f87171;                /* Ratio 5.8:1 sur fond sombre (AA) */
  --cz-red-subtle: rgba(248, 113, 113, 0.18);

  --cz-orange: #fbbf24;             /* Ratio 11.2:1 sur fond sombre (AAA) */
  --cz-orange-subtle: rgba(251, 191, 36, 0.18);

  --cz-yellow: #fde047;

  --shadow-island: 0 28px 70px rgba(0, 0, 0, 0.85), 0 0 1px 1px rgba(255, 255, 255, 0.1);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.6);
  --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.8);
  --shadow-floating: 0 20px 50px rgba(0, 0, 0, 0.9);

  --glass-island-bg: rgba(13, 15, 20, 0.86);
  --glass-blur: blur(40px) saturate(210%);
  --glass-border: 1px solid rgba(255, 255, 255, 0.13);

  --bg-page: var(--cz-bg);
  --bg-card: var(--cz-surface);
  --bg-subtle: var(--cz-surface-secondary);
  --border-light: var(--cz-border);
  --border-focus: var(--cz-blue);
  --text-main: var(--cz-text-primary);
  --text-muted: var(--cz-text-secondary);
  --text-light: var(--cz-text-tertiary);
  --primary: var(--cz-blue);
  --primary-hover: var(--cz-blue-hover);
  --primary-bg: var(--cz-blue-subtle);
  --zen: var(--cz-green);
  --zen-dark: var(--cz-green-dark);
  --zen-bg: var(--cz-green-subtle);
  --success: var(--cz-green);
  --success-bg: var(--cz-green-subtle);
  --success-text: var(--cz-green);
  --danger: var(--cz-red);
  --danger-bg: var(--cz-red-subtle);
  --danger-text: var(--cz-red);
  --warning: var(--cz-orange);
  --warning-bg: var(--cz-orange-subtle);
  --warning-text: var(--cz-orange);
}

.leaflet-tile-pane {
  transition: filter 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme="dark"] #map {
  background: #1c212c;
}

[data-theme="dark"] .leaflet-tile-pane {
  /* Style Nuit : Juste milieu équilibré (ardoise sombre satinée, routes douces & lisibilité optimale) */
  filter: invert(96%) hue-rotate(195deg) brightness(135%) contrast(84%) saturate(80%);
}

/* ==========================================================================
   Reset & Architecture Plein Écran (Native App View)
   ========================================================================== */

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

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: fixed;
  inset: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.cz-app-body {
  font-family: system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--cz-bg);
  color: var(--cz-text-primary);
  line-height: 1.45;
  letter-spacing: -0.02em;
  font-size: 0.9375rem;
}

button, input, select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  touch-action: manipulation;
}

/* Scrollbar discrète */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(140, 140, 145, 0.3);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(140, 140, 145, 0.6);
}

/* Accessibilité */
.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;
}

.skip-links-nav {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100000;
  pointer-events: none;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cz-blue);
  color: #ffffff !important;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  box-shadow: var(--shadow-floating);
  pointer-events: auto;
  z-index: 100001;
}
.skip-link:focus {
  left: 20px;
  outline: 3px solid var(--cz-yellow) !important;
}
:focus-visible {
  outline: 3px solid var(--cz-blue) !important;
  outline-offset: 2px !important;
}

/* ==========================================================================
   1. CARTE PLEIN ÉCRAN
   ========================================================================== */

.map-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#map {
  width: 100%;
  height: 100%;
  background: var(--cz-bg);
  outline: none;
}

/* Indicateur Flottant "Recherche auto" */
.map-live-indicator {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 999;
  background: var(--glass-island-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cz-text-primary);
  box-shadow: var(--shadow-sm);
  pointer-events: auto;
}

.live-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cz-blue);
  animation: cz-radar 2s infinite;
}

@keyframes cz-radar {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==========================================================================
   2. VOLET LATÉRAL PRINCIPAL
   ========================================================================== */

.cz-island-container {
  position: absolute;
  top: 20px;
  left: 20px;
  bottom: 20px;
  width: 450px;
  z-index: 1000;
  background: var(--glass-island-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-island);
  box-shadow: var(--shadow-island);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
}

.mobile-sheet-handle {
  display: none;
}

/* Modes de vue gérés par CarbuZen JS */
.cz-island-container.list-only {
  width: min(760px, calc(100vw - 40px));
}

.cz-island-container.map-only {
  transform: translateX(calc(-100% - 30px));
  opacity: 0;
  pointer-events: none;
}

/* Bouton flottant de rappel pour le mode Carte Seule (Desktop) */
.btn-floating-show-list {
  display: none;
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1001;
  background: var(--glass-island-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.25rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--cz-blue);
  box-shadow: var(--shadow-island);
  cursor: pointer;
  pointer-events: auto;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-floating-show-list:hover {
  background: var(--cz-surface);
  color: var(--cz-blue-hover);
  transform: translateY(-1px) scale(1.03);
  box-shadow: var(--shadow-floating);
}

body:has(.cz-island-container.map-only) .btn-floating-show-list {
  display: inline-flex;
}

/* --- Section 1 : En-tête de l'Îlot --- */
.island-header {
  padding: 1rem 1.25rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

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

.logo-box {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-emblem {
  width: 100%;
  height: 100%;
  display: block;
}

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

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

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

.brand-zen {
  color: var(--cz-blue);
  font-weight: 800;
}

.brand-tagline {
  font-size: 0.65rem;
  color: var(--cz-text-secondary);
}

.island-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Statut Flux DGEC */
.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--cz-surface-secondary);
  border: 1px solid var(--cz-border);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--cz-text-secondary);
}

.live-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cz-green);
  box-shadow: 0 0 0 2px var(--cz-green-subtle);
}

.live-pill-divider {
  width: 1px;
  height: 10px;
  background: var(--cz-border-strong);
}

.live-timer-text {
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  color: var(--cz-text-tertiary);
}

.live-refresh-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cz-text-secondary);
  transition: all 0.2s ease;
}

.live-refresh-btn:hover {
  background: var(--cz-blue);
  color: #ffffff;
}

.live-refresh-btn.spinning .live-refresh-icon {
  animation: cz-spin 0.75s linear infinite;
}

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

.theme-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cz-surface-secondary);
  border: 1px solid var(--cz-border);
  color: var(--cz-text-secondary);
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  color: var(--cz-text-primary);
  transform: scale(1.06);
}

[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; }

/* --- Section 2 : Recherche intégrée --- */
.island-search-section {
  padding: 0.4rem 1.25rem 0.6rem;
  flex-shrink: 0;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--cz-surface);
  border: 1px solid var(--cz-border);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.4rem 0.3rem 0.95rem;
  gap: 0.6rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input-wrapper:focus-within {
  border-color: var(--cz-blue);
  box-shadow: 0 0 0 3px var(--cz-blue-subtle), var(--shadow-sm);
}

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

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--cz-text-primary);
  padding: 0.4rem 0;
  outline: none;
}

.search-input::placeholder {
  color: var(--cz-text-tertiary);
}

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

.btn-geo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--cz-surface-secondary);
  border: 1px solid var(--cz-border);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cz-text-primary);
  transition: all 0.2s ease;
}

.btn-geo:hover {
  background: var(--cz-blue-subtle);
  color: var(--cz-blue);
  border-color: rgba(0, 113, 227, 0.3);
}

.btn-primary-search {
  background: var(--cz-blue);
  color: #ffffff;
  padding: 0.42rem 0.95rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 113, 227, 0.25);
}

.btn-primary-search:hover {
  background: var(--cz-blue-hover);
  transform: scale(1.02);
}

.autocomplete-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--cz-surface);
  border: 1px solid var(--cz-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-floating);
  max-height: 240px;
  overflow-y: auto;
  z-index: 2000;
  display: none;
  padding: 0.3rem;
}

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

.autocomplete-item {
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  color: var(--cz-text-primary);
  cursor: pointer;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: var(--cz-blue-subtle);
  color: var(--cz-blue);
  font-weight: 600;
}

/* --- Section 3 : Sélecteur Carburant --- */
.island-fuel-nav {
  padding: 0 1.25rem 0.6rem;
  flex-shrink: 0;
}

.fuel-pills-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: var(--cz-surface-secondary);
  padding: 3px;
  border-radius: var(--radius-full);
  gap: 3px;
  width: 100%;
}

.fuel-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.38rem 0.2rem;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--cz-text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}

.fuel-pill-btn:hover {
  color: var(--cz-text-primary);
}

.fuel-pill-btn.active {
  background: var(--cz-surface);
  color: var(--cz-text-primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .fuel-pill-btn.active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.fuel-pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  font-size: 0.64rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--cz-text-tertiary);
  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-btn.active .fuel-pill-badge.gazole { background: #f59e0b; }
.fuel-pill-btn.active .fuel-pill-badge.e10 { background: #34c759; }
.fuel-pill-btn.active .fuel-pill-badge.sp98 { background: #28cd41; }
.fuel-pill-btn.active .fuel-pill-badge.e85 { background: #0071e3; }
.fuel-pill-btn.active .fuel-pill-badge.sp95 { background: #30d158; }

/* --- Section 4 : Barre de Contrôle & Filtres --- */
.island-toolbar {
  padding: 0.5rem 1.25rem 0.65rem;
  border-bottom: 1px solid var(--cz-border);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex-shrink: 0;
}

.summary-text {
  font-size: 0.82rem;
  color: var(--cz-text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  line-height: 1.45;
}

.summary-text b {
  color: var(--cz-text-primary);
  font-weight: 700;
}

.summary-sep {
  opacity: 0.45;
  margin: 0 0.15rem;
}

.summary-badge-green {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem; /* Espace net entre l'icône, le prix et le nom de station */
  background: var(--cz-green-subtle);
  border: 1px solid rgba(52, 199, 89, 0.28);
  color: var(--cz-green-dark);
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.76rem;
  margin-top: 0.15rem;
}

.badge-trophy {
  flex-shrink: 0;
}

.badge-price {
  font-weight: 800;
}

.badge-brand {
  font-weight: 700;
}

[data-theme="dark"] .summary-badge-green {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(52, 211, 153, 0.38);
  color: #34d399;
}

.controls-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

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

.filter-stock-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--cz-text-secondary);
}

.filter-stock-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 32px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--cz-surface-secondary);
  border: 1px solid var(--cz-border);
  position: relative;
  cursor: pointer;
  transition: background 0.25s ease;
}

.filter-stock-checkbox input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.filter-stock-checkbox input[type="checkbox"]:checked {
  background: var(--cz-green);
  border-color: var(--cz-green);
}

.filter-stock-checkbox input[type="checkbox"]:checked::after {
  transform: translateX(14px);
}

.sort-dropdown {
  background: var(--cz-surface);
  border: 1px solid var(--cz-border);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--cz-text-primary);
  outline: none;
  cursor: pointer;
}

.view-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--cz-surface-secondary);
  padding: 2px;
  border-radius: var(--radius-full);
  gap: 2px;
}

.view-tab-btn {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--cz-text-secondary);
  transition: all 0.15s ease;
}

.view-tab-btn.active {
  background: var(--cz-surface);
  color: var(--cz-text-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* --- Section 5 : Liste Défilante des Stations --- */
.stations-list-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
}

.stations-cards-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.station-row-card {
  background: var(--cz-surface);
  border: 1px solid var(--cz-border);
  border-radius: var(--radius-md);
  padding: 0.95rem;
  box-shadow: var(--shadow-card);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.station-row-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--cz-border-strong);
}

[data-theme="dark"] .station-row-card {
  background: rgba(18, 22, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .station-row-card:hover {
  background: rgba(26, 32, 45, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.75);
}

.station-row-card.station-card-focused {
  border-color: var(--cz-blue);
  box-shadow: 0 0 0 2px var(--cz-blue-subtle), var(--shadow-card-hover);
}

.station-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

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

.brand-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--cz-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 5px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.brand-avatar .brand-logo-img,
.brand-logo-img,
.cz-pin-img,
.cz-popup-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

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

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

.station-brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cz-text-primary);
  line-height: 1.2;
}

.best-price-badge {
  background: var(--cz-green-subtle);
  color: var(--cz-green-dark);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-full);
}
[data-theme="dark"] .best-price-badge {
  color: var(--cz-green);
}

.badge-vigilance-pill {
  background: var(--cz-orange-subtle);
  color: var(--cz-orange);
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-full);
}

.station-address-line {
  font-size: 0.78rem;
  color: var(--cz-text-secondary);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-service-pill {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--cz-text-tertiary);
  background: var(--cz-surface-secondary);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-xs);
  margin-top: 0.25rem;
}

.station-price-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.station-fuel-indicator {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--cz-text-tertiary);
  text-transform: uppercase;
}

.price-main-display .big-price {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--cz-text-primary);
  line-height: 1;
  display: flex;
  align-items: baseline;
}

.big-price-unit {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cz-text-secondary);
  margin-left: 2px;
}

.price-rupture-display {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cz-red);
}

.price-not-sold-display {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--cz-text-tertiary);
}

.stock-status-pill {
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-full);
}

.stock-status-pill.in-stock {
  background: var(--cz-green-subtle);
  color: var(--cz-green-dark);
}
[data-theme="dark"] .stock-status-pill.in-stock {
  color: var(--cz-green);
}

.stock-status-pill.rupture {
  background: var(--cz-red-subtle);
  color: var(--cz-red);
}

.stock-status-pill.not-sold {
  background: var(--cz-surface-secondary);
  color: var(--cz-text-tertiary);
}

.station-freshness-dl {
  background: var(--cz-surface-secondary);
  border-radius: var(--radius-xs);
  padding: 0.35rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem 0.65rem;
  font-size: 0.72rem;
}

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

.station-freshness-dl dt {
  color: var(--cz-text-tertiary);
  font-weight: 500;
}

.station-freshness-dl dd {
  color: var(--cz-text-primary);
  font-weight: 600;
}

.station-vigilance-alert {
  background: var(--cz-orange-subtle);
  border-radius: var(--radius-xs);
  padding: 0.4rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--cz-orange);
}

.card-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--cz-border);
}

.btn-toggle-drawer {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--cz-blue);
  background: var(--cz-blue-subtle);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.btn-toggle-drawer:hover {
  background: var(--cz-blue);
  color: #ffffff;
}

.btn-open-gps {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--cz-text-primary);
  background: var(--cz-surface-secondary);
  border: 1px solid var(--cz-border);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-open-gps:hover {
  background: var(--cz-surface-tertiary);
}

.station-details-drawer {
  background: var(--cz-surface-secondary);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  margin-top: 0.2rem;
}

.drawer-fuels-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 0.4rem;
}

.drawer-fuel-card {
  background: var(--cz-surface);
  border: 1px solid var(--cz-border);
  border-radius: var(--radius-xs);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.18s ease;
}

.drawer-fuel-card:hover {
  border-color: var(--cz-blue);
  background: var(--cz-blue-subtle);
  transform: translateY(-1px);
}

.drawer-fuel-card.active-fuel {
  border-color: var(--cz-blue);
  background: var(--cz-blue-subtle);
  box-shadow: 0 0 0 1.5px var(--cz-blue);
}

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

.drawer-fuel-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cz-text-secondary);
}

.drawer-fuel-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cz-text-primary);
}

.drawer-fuel-price.text-danger {
  color: var(--cz-red);
}

.drawer-fuel-maj {
  font-size: 0.62rem;
  color: var(--cz-text-tertiary);
}

.drawer-services-line {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--cz-border);
  font-size: 0.72rem;
  color: var(--cz-text-secondary);
}

/* --- Section 6 : Pied de l'Îlot --- */
.island-footer {
  padding: 0.6rem 1.25rem;
  background: var(--cz-surface);
  border-top: 1px solid var(--cz-border);
  flex-shrink: 0;
}

.footer-links-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: var(--cz-text-tertiary);
}

.btn-footer-a11y {
  color: var(--cz-text-secondary);
  font-weight: 600;
  cursor: pointer;
}
.btn-footer-a11y:hover {
  color: var(--cz-blue);
}

.footer-dot {
  opacity: 0.5;
}

/* ==========================================================================
   3. POPUPS & CONTROLES CARTE
   ========================================================================== */

/* Zoom controls */
.leaflet-bottom.leaflet-right {
  bottom: 24px !important;
  right: 20px !important;
}

.leaflet-control-zoom {
  margin: 0 !important;
}

.leaflet-bar {
  border: var(--glass-border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-island) !important;
  overflow: hidden;
}
.leaflet-bar a {
  background: var(--glass-island-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  color: var(--cz-text-primary) !important;
  border-bottom: 1px solid var(--cz-border) !important;
  width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  font-size: 1.25rem !important;
  transition: all 0.15s ease;
}
.leaflet-bar a:hover {
  background: var(--cz-surface-secondary) !important;
  color: var(--cz-blue) !important;
}

/* Clusters */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(0, 113, 227, 0.25) !important;
  border-radius: 50% !important;
}
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: var(--cz-blue) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3) !important;
}

/* Marqueurs Épingles Haute Précision */
.cz-marker-container {
  background: transparent !important;
  border: none !important;
}

.cz-map-pin {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cz-surface);
  border: 1.5px solid var(--cz-border-strong);
  border-radius: var(--radius-full);
  padding: 3px 9px 3px 3px;
  box-shadow: var(--shadow-floating);
  cursor: pointer;
  white-space: nowrap;
  transform: translate(-50%, -100%);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  user-select: none;
}

.cz-map-pin:hover {
  transform: translate(-50%, -108%) scale(1.08);
  z-index: 10000 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.cz-map-pin.cz-pin-focused {
  border-color: var(--cz-blue);
  box-shadow: 0 0 0 3px var(--cz-blue-subtle), var(--shadow-floating);
}

/* Avatar officiel de marque dans l'épingle */
.cz-pin-brand-avatar {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

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

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

.cz-pin-brand-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cz-text-secondary);
  max-width: 75px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cz-pin-fuel-badge {
  font-size: 0.58rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--cz-text-tertiary);
  padding: 0 3px;
  border-radius: 3px;
}
.cz-pin-fuel-badge.fuel-gazole { background: #d97706; }
.cz-pin-fuel-badge.fuel-e10 { background: #34c759; }
.cz-pin-fuel-badge.fuel-sp98 { background: #28cd41; }
.cz-pin-fuel-badge.fuel-e85 { background: #0071e3; }
.cz-pin-fuel-badge.fuel-sp95 { background: #30d158; }

.cz-pin-price {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--cz-text-primary);
  letter-spacing: -0.02em;
}

/* Épingle Moins Cher (Top Prix Vert) */
.cz-map-pin.cheapest {
  background: var(--cz-green);
  border-color: var(--cz-green-dark);
}
.cz-map-pin.cheapest .cz-pin-brand-name {
  color: rgba(255, 255, 255, 0.9);
}
.cz-map-pin.cheapest .cz-pin-price {
  color: #ffffff;
}

.cz-pin-top-badge {
  position: absolute;
  top: -8px;
  right: -4px;
  background: #ffffff;
  color: var(--cz-green-dark);
  font-size: 0.58rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Épingle Rupture */
.cz-map-pin.rupture {
  border-color: var(--cz-red);
}
.cz-map-pin.rupture .cz-pin-price {
  color: var(--cz-red);
  font-size: 0.75rem;
}

.cz-pin-pointer {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: inherit;
  border-right: 1.5px solid inherit;
  border-bottom: 1.5px solid inherit;
  border-color: inherit;
}

/* Position de l'utilisateur (Point bleu animé) */
.cz-user-gps-leaflet-icon {
  background: transparent !important;
  border: none !important;
}

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

.cz-user-gps-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #007aff;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 12px rgba(0, 122, 255, 0.75), 0 2px 6px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 2;
}

[data-theme="dark"] .cz-user-gps-dot {
  background: #2997ff;
  border-color: #ffffff;
  box-shadow: 0 0 16px rgba(41, 151, 255, 0.9), 0 2px 8px rgba(0, 0, 0, 0.6);
}

.cz-user-gps-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 122, 255, 0.35);
  animation: czGpsPulse 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  z-index: 1;
}

[data-theme="dark"] .cz-user-gps-pulse {
  background: rgba(41, 151, 255, 0.45);
}

@keyframes czGpsPulse {
  0% {
    transform: scale(0.35);
    opacity: 0.95;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* Popups Leaflet CarbuZen */
.leaflet-popup-content-wrapper {
  background: var(--glass-island-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: var(--glass-border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-island) !important;
  padding: 0 !important;
  color: var(--cz-text-primary) !important;
}
.leaflet-popup-tip {
  background: var(--cz-surface) !important;
}
.cz-popup-card {
  padding: 1.1rem;
  width: 280px;
}
.cz-popup-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}
.cz-popup-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--cz-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 5px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.cz-popup-brand-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--cz-text-primary);
}
.cz-popup-address {
  font-size: 0.74rem;
  color: var(--cz-text-secondary);
}
.cz-popup-main-price {
  background: var(--cz-surface-secondary);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.cz-popup-fuel-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cz-text-secondary);
}
.cz-popup-price-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--cz-text-primary);
}
.cz-popup-fuels-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
}
.cz-popup-fuel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  padding: 0.2rem 0.35rem;
  border-radius: var(--radius-xs);
  transition: background 0.15s ease;
}
.cz-popup-fuel-row:hover {
  background: var(--cz-blue-subtle);
}
.cz-popup-row-name {
  color: var(--cz-text-secondary);
}
.cz-popup-row-price {
  font-weight: 600;
  color: var(--cz-text-primary);
}
.cz-popup-btn-gps {
  display: block;
  text-align: center;
  background: var(--cz-blue);
  color: #ffffff;
  padding: 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.cz-popup-btn-gps:hover {
  background: var(--cz-blue-hover);
}

/* ==========================================================================
   4. MODALE ACCESSIBILITÉ & INFOS
   ========================================================================== */

dialog.a11y-dialog,
.a11y-dialog {
  border: 1px solid var(--cz-border);
  border-radius: var(--radius-lg);
  background: var(--cz-surface);
  box-shadow: var(--shadow-floating);
  overflow: hidden;
  clip-path: inset(0 round var(--radius-lg));
  -webkit-clip-path: inset(0 round var(--radius-lg));
  padding: 0;
  max-width: 580px;
  width: 90vw;
  margin: auto;
  z-index: 99999;
  outline: none;
}

[data-theme="dark"] dialog.a11y-dialog,
[data-theme="dark"] .a11y-dialog {
  background: #11141a;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.a11y-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.a11y-dialog-content {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.a11y-dialog-header {
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--cz-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.a11y-dialog-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cz-text-primary);
}
.a11y-dialog-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cz-surface-secondary);
  color: var(--cz-text-secondary);
  font-size: 1.1rem;
}
.a11y-dialog-body {
  padding: 1.35rem;
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  font-size: 0.85rem;
  color: var(--cz-text-secondary);
}
.a11y-shortcuts-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.4rem;
}
.a11y-shortcuts-table th,
.a11y-shortcuts-table td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--cz-border);
  text-align: left;
}
.a11y-shortcuts-table kbd {
  background: var(--cz-surface-secondary);
  border: 1px solid var(--cz-border-strong);
  border-radius: var(--radius-xs);
  padding: 0.12rem 0.35rem;
  font-weight: 600;
  font-size: 0.78rem;
}
.a11y-dialog-footer {
  padding: 0.85rem 1.35rem;
  border-top: 1px solid var(--cz-border);
  display: flex;
  justify-content: flex-end;
}

/* Chargement */
.simple-loading {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--cz-text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.simple-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--cz-border);
  border-top-color: var(--cz-blue);
  border-radius: 50%;
  animation: cz-spin 0.75s linear infinite;
}

/* ==========================================================================
   5. RESPONSIVE ADAPTATIF PC, TABLETTE & MOBILE
   ========================================================================== */

/* Zoom controls Leaflet au-dessus du volet selon le mode sur mobile */
@media (max-width: 880px) {
  .leaflet-bottom.leaflet-right {
    transition: bottom 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  }
  body:has(.cz-island-container.map-only) .leaflet-bottom.leaflet-right {
    bottom: 84px !important;
    right: 16px !important;
  }
  body:has(.cz-island-container.list-only) .leaflet-bottom.leaflet-right {
    display: none !important;
  }
  body:has(.cz-island-container:not(.map-only):not(.list-only)) .leaflet-bottom.leaflet-right {
    bottom: calc(58vh + 16px) !important;
    right: 16px !important;
  }
  body.sheet-is-dragging .leaflet-bottom.leaflet-right {
    bottom: calc(var(--sheet-drag-height, 58vh) + 16px) !important;
    transition: none !important;
  }

  body.sheet-is-dragging {
    user-select: none;
    -webkit-user-select: none;
  }

  /* Volet tactile inférieur (Bottom Sheet) */
  .cz-island-container {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: 58vh;
    max-height: 94vh;
    border-radius: 24px 24px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
    padding-bottom: max(0px, env(safe-area-inset-bottom));
    transition: height 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: height;
  }

  /* État pendant le glissement au doigt : 0 latence, suit le doigt en temps réel */
  .cz-island-container.is-dragging {
    transition: none !important;
    will-change: height;
    user-select: none;
    -webkit-user-select: none;
    min-height: 0 !important;
  }
  .cz-island-container.is-dragging .island-search-section,
  .cz-island-container.is-dragging .island-fuel-nav,
  .cz-island-container.is-dragging .island-toolbar,
  .cz-island-container.is-dragging .stations-list-wrapper,
  .cz-island-container.is-dragging .island-footer {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: none !important;
  }

  /* Poignée tactile de redimensionnement */
  .mobile-sheet-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 0 6px;
    cursor: grab;
    background: transparent;
    border: none;
    user-select: none;
    touch-action: none;
    flex-shrink: 0;
  }
  .mobile-sheet-handle:active {
    cursor: grabbing;
  }
  .mobile-sheet-handle::before {
    content: '';
    display: block;
    width: 44px;
    height: 5px;
    border-radius: var(--radius-full);
    background: var(--cz-border-strong);
    transition: background 0.2s ease, width 0.2s ease, transform 0.2s ease;
  }
  .mobile-sheet-handle:hover::before,
  .mobile-sheet-handle:active::before,
  .cz-island-container.is-dragging .mobile-sheet-handle::before {
    background: var(--cz-blue);
    width: 52px;
    transform: scaleY(1.15);
  }

  .island-header {
    padding: 0.4rem 1rem 0.35rem;
  }
  .island-search-section {
    padding: 0.3rem 1rem 0.35rem;
  }
  .island-fuel-nav {
    padding: 0 1rem 0.35rem;
  }
  .island-toolbar {
    padding: 0.3rem 1rem 0.4rem;
  }
  .stations-list-wrapper {
    padding: 0.5rem 1rem 0.75rem;
  }

  /* Mode Carte Seule sur Mobile : Bottom sheet réduit en mini-barre tactile */
  .cz-island-container.map-only {
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    height: 64px !important;
    min-height: 64px !important;
    cursor: pointer;
  }
  .cz-island-container.map-only:not(.is-dragging) .island-search-section,
  .cz-island-container.map-only:not(.is-dragging) .island-fuel-nav,
  .cz-island-container.map-only:not(.is-dragging) .island-toolbar,
  .cz-island-container.map-only:not(.is-dragging) .stations-list-wrapper,
  .cz-island-container.map-only:not(.is-dragging) .island-footer {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  /* Mode Liste Seule sur Mobile : Plein écran */
  .cz-island-container.list-only {
    height: 92vh !important;
  }

  .btn-floating-show-list {
    display: none !important;
  }

  /* Footer avec marge inférieure safe-area */
  .island-footer {
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
  }
}

/* Tablette en mode portrait (541px - 880px) */
@media (min-width: 541px) and (max-width: 880px) {
  .stations-cards-list {
    max-width: 680px;
    margin: 0 auto;
    width: 100%;
  }
  .island-header,
  .island-search-section,
  .island-fuel-nav,
  .island-toolbar,
  .stations-list-wrapper {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}

/* Smartphones et petits écrans (<= 540px) */
@media (max-width: 540px) {
  .island-header {
    padding: 0.35rem 0.75rem 0.3rem;
  }
  .brand-title {
    font-size: 1.15rem;
  }
  .logo-box {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
  }
  .theme-toggle-btn {
    width: 30px;
    height: 30px;
  }

  .island-search-section {
    padding: 0.25rem 0.75rem 0.35rem;
  }
  .search-input-wrapper {
    padding: 0.25rem 0.35rem 0.25rem 0.75rem;
    gap: 0.4rem;
  }
  .search-input {
    font-size: 0.85rem;
  }
  .btn-geo {
    padding: 0.35rem 0.55rem;
    font-size: 0.74rem;
  }
  .btn-primary-search {
    padding: 0.35rem 0.75rem;
    font-size: 0.76rem;
  }

  .island-fuel-nav {
    padding: 0 0.75rem 0.35rem;
  }
  .fuel-pills-row {
    padding: 2px;
    gap: 2px;
  }
  .fuel-pill-btn {
    padding: 0.34rem 0.15rem;
    font-size: 0.73rem;
    gap: 0.22rem;
  }
  .fuel-pill-badge {
    min-width: 17px;
    height: 16px;
    font-size: 0.58rem;
    padding: 0 3px;
  }

  .island-toolbar {
    padding: 0.3rem 0.75rem 0.4rem;
    gap: 0.45rem;
  }
  .summary-text {
    font-size: 0.78rem;
  }
  .summary-badge-green {
    font-size: 0.72rem;
    padding: 0.18rem 0.5rem;
  }

  .controls-right {
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: space-between;
  }
  .controls-filter-group {
    gap: 0.4rem;
  }
  .filter-stock-checkbox {
    font-size: 0.74rem;
  }
  .filter-stock-checkbox input[type="checkbox"] {
    width: 28px;
    height: 16px;
  }
  .filter-stock-checkbox input[type="checkbox"]::after {
    width: 12px;
    height: 12px;
  }
  .filter-stock-checkbox input[type="checkbox"]:checked::after {
    transform: translateX(12px);
  }
  .sort-dropdown {
    padding: 0.25rem 0.45rem;
    font-size: 0.72rem;
  }
  .view-tab-btn {
    padding: 0.22rem 0.5rem;
    font-size: 0.72rem;
  }

  .stations-list-wrapper {
    padding: 0.45rem 0.75rem 0.75rem;
  }
  .station-row-card {
    padding: 0.8rem;
    gap: 0.55rem;
  }
  .brand-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }
  .station-brand-title {
    font-size: 0.88rem;
  }
  .station-address-line {
    font-size: 0.74rem;
  }
  .price-main-display .big-price {
    font-size: 1.35rem;
  }
  .station-freshness-dl {
    padding: 0.3rem 0.55rem;
    font-size: 0.68rem;
  }
  .card-bottom-bar {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .btn-toggle-drawer,
  .btn-open-gps {
    font-size: 0.72rem;
    padding: 0.28rem 0.55rem;
  }

  .drawer-fuels-list {
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 0.35rem;
  }
  .drawer-fuel-card {
    padding: 0.35rem;
  }
  .drawer-fuel-name {
    font-size: 0.68rem;
  }
  .drawer-fuel-price {
    font-size: 0.76rem;
  }

  .island-footer {
    padding: 0.45rem 0.75rem;
  }
  .footer-links-row {
    gap: 0.35rem;
    font-size: 0.68rem;
  }
  .btn-footer-a11y {
    font-size: 0.68rem;
  }

  /* Popups Leaflet ajustés pour mobile */
  .cz-popup-card {
    padding: 0.85rem;
    width: min(270px, calc(100vw - 36px));
  }
  .cz-popup-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .map-live-indicator {
    top: 12px;
    right: 12px;
    padding: 0.32rem 0.7rem;
    font-size: 0.72rem;
  }

  /* Modales accessibles sur petits écrans */
  dialog.a11y-dialog,
  .a11y-dialog {
    width: calc(100vw - 20px);
    max-width: none;
    border-radius: var(--radius-md);
  }
  .a11y-dialog-header {
    padding: 0.85rem 1rem;
  }
  .a11y-dialog-title {
    font-size: 1rem;
  }
  .a11y-dialog-body {
    padding: 0.95rem 1rem;
    max-height: 65vh;
    gap: 0.85rem;
    font-size: 0.82rem;
  }
  .a11y-dialog-footer {
    padding: 0.75rem 1rem;
  }
}

/* Très petits smartphones (<= 380px) */
@media (max-width: 380px) {
  .brand-tagline {
    display: none;
  }
  .live-status-pill .live-label,
  .live-status-pill .live-pill-divider {
    display: none;
  }
  .live-status-pill {
    padding: 0.2rem 0.4rem;
    gap: 0.3rem;
  }
  .live-timer-text {
    font-size: 0.68rem;
  }
  .fuel-pill-btn {
    padding: 0.3rem 0.08rem;
    font-size: 0.68rem;
    gap: 0.12rem;
  }
  .fuel-pill-name {
    font-size: 0.68rem;
  }
  .summary-text {
    font-size: 0.74rem;
  }
  .controls-right {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }
  .controls-filter-group {
    justify-content: space-between;
  }
  .view-tabs {
    justify-content: center;
    width: 100%;
  }
  .view-tab-btn {
    flex: 1;
    text-align: center;
  }
}

/* Smartphones en orientation paysage (hauteur d'écran réduite <= 500px) */
@media (max-width: 880px) and (max-height: 500px) {
  .cz-island-container {
    height: 78vh;
    max-height: 90vh;
  }
  .cz-island-container.map-only {
    height: 50px !important;
    min-height: 50px !important;
  }
  body:has(.cz-island-container.map-only) .leaflet-bottom.leaflet-right {
    bottom: 60px !important;
  }
  body:has(.cz-island-container:not(.map-only):not(.list-only)) .leaflet-bottom.leaflet-right {
    bottom: calc(78vh + 10px) !important;
  }
}
