/* ===================================================================
 * FuelMapPrice — ajustements fins
 * Tailwind gère le gros du travail ; ici uniquement ce qui ne peut pas
 * être exprimé en classes utilitaires.
 * =================================================================== */

[x-cloak] { display: none !important; }

html { scroll-behavior: smooth; }

/* Inputs : force color-scheme pour que le select natif s'adapte au th\u00e8me syst\u00e8me
   sur iOS Safari notamment (sinon texte sombre sur fond sombre illisible) */
select, input, textarea {
  color-scheme: light dark;
}

body {
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(26, 60, 52, 0.04), transparent 60%),
    radial-gradient(ellipse 60% 50% at 95% 5%, rgba(232, 93, 4, 0.05), transparent 60%);
  background-attachment: fixed;
}

/* Leaflet container — retire le contour bleu par défaut */
.leaflet-container {
  background: #EAE6DC;
  font-family: "Instrument Sans", system-ui, sans-serif;
  outline: none;
}

.leaflet-control-zoom a {
  background: #FFFFFF !important;
  color: #0F0F0E !important;
  border: 1px solid #E8E2D7 !important;
}
.leaflet-control-zoom a:hover {
  background: #FAF7F2 !important;
}

.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.85) !important;
  font-size: 10px !important;
  color: #52524E !important;
}

/* Marqueur personnalisé */
.fmp-marker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #FFFFFF;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 10px;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}
.fmp-marker > span {
  transform: rotate(45deg);
  line-height: 1;
  padding-bottom: 4px;
}

.fmp-marker-ref {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #E85D04;
  border: 4px solid #FFFFFF;
  box-shadow: 0 0 0 2px #E85D04, 0 4px 14px rgba(232, 93, 4, 0.45);
}

/* Marqueur en rupture */
.fmp-marker-rupture {
  opacity: 0.7;
  border-style: dashed;
}
.fmp-marker-rupt {
  position: absolute;
  top: -6px;
  right: -6px;
  transform: rotate(45deg);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #CF222E;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Clusters de marqueurs */
.fmp-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  border: 2.5px solid #FFFFFF;
  transition: transform 0.15s ease;
}
.fmp-cluster:hover {
  transform: scale(1.12);
}
.fmp-cluster span {
  line-height: 1;
  font-size: 13px;
}
.fmp-cluster-small {
  background: #1A7F37;
  width: 36px;
  height: 36px;
}
.fmp-cluster-small span { font-size: 12px; }
.fmp-cluster-medium {
  background: #D4A72C;
  width: 42px;
  height: 42px;
}
.fmp-cluster-medium span { font-size: 13px; }
.fmp-cluster-large {
  background: #CF222E;
  width: 48px;
  height: 48px;
}
.fmp-cluster-large span { font-size: 14px; }

/* Override les styles par défaut de MarkerCluster.Default.css */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: none !important;
}
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: none !important;
}

/* Badge rupture dans la liste */
.fmp-badge-rupture {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #CF222E;
  color: #FFFFFF;
  padding: 1px 6px;
  border-radius: 9999px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.5;
}

/* Badge rupture dans le popup */
.fmp-pop-rupture {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #CF222E;
  color: #FFFFFF;
  padding: 1px 6px;
  border-radius: 9999px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Popup Leaflet */
.leaflet-popup-content-wrapper {
  border-radius: 14px !important;
  border: 1px solid #E8E2D7;
  box-shadow: 0 12px 30px rgba(15, 15, 14, 0.12) !important;
  padding: 2px;
}
.leaflet-popup-content {
  margin: 14px 16px !important;
  font-family: "Instrument Sans", sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: #0F0F0E;
}
.leaflet-popup-content .fmp-pop-name {
  font-weight: 600;
  margin-bottom: 2px;
}
.leaflet-popup-content .fmp-pop-addr {
  color: #52524E;
  font-size: 12px;
}
.leaflet-popup-content .fmp-pop-price {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 18px;
  margin-top: 8px;
}
.leaflet-popup-content .fmp-pop-fuel {
  color: #52524E;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.leaflet-popup-content .fmp-pop-time {
  color: #A8A59E;
  font-size: 11px;
  margin-top: 6px;
  font-family: "JetBrains Mono", monospace;
}
.leaflet-popup-content .fmp-pop-route {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 12px;
  background: #1A3C34;
  color: #FAF7F2 !important;
  border-radius: 20px;
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.15s ease;
}
.leaflet-popup-content .fmp-pop-route:hover {
  background: #0F2721;
}
.leaflet-popup-content .fmp-pop-route svg {
  flex: none;
}
.leaflet-popup-tip {
  box-shadow: none !important;
}

/* Range input — look plus refined */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  background: #E8E2D7;
  height: 4px;
  border-radius: 2px;
}
input[type="range"]::-moz-range-track {
  background: #E8E2D7;
  height: 4px;
  border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: #1A3C34;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  margin-top: -6px;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
input[type="range"]::-moz-range-thumb {
  background: #1A3C34;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Scrollbar subtile pour la liste latérale */
.overflow-y-auto {
  scrollbar-width: thin;
  scrollbar-color: #A8A59E transparent;
}
.overflow-y-auto::-webkit-scrollbar {
  width: 6px;
}
.overflow-y-auto::-webkit-scrollbar-thumb {
  background: #A8A59E;
  border-radius: 3px;
}

/* Arrivée progressive */
@keyframes fmp-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
section[x-show] {
  animation: fmp-fade-up 0.4s ease-out;
}

/* Responsive : réduction du titre sur petit écran */
@media (max-width: 420px) {
  h1.font-display { font-size: 1.875rem !important; }
}

/* ===================================================================
 * Autocomplete de villes
 * =================================================================== */
.fmp-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #FFFFFF;
  border: 1px solid #E8E2D7;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 15, 14, 0.12);
  z-index: 900;
  overflow: hidden;
  max-height: 300px;
  overflow-y: auto;
}

.fmp-suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #F1EEE6;
  transition: background 0.1s ease;
}
.fmp-suggestion-item:last-child { border-bottom: 0; }
.fmp-suggestion-item:hover,
.fmp-suggestion-item.active {
  background: #F6F2E9;
}

.fmp-suggestion-label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: #0F0F0E;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fmp-suggestion-scope {
  flex: none;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 8px;
  background: #F1EEE6;
  color: #52524E;
  font-family: "JetBrains Mono", monospace;
}
.fmp-suggestion-scope.scope-city       { background: #E6F4EA; color: #1A7F37; }
.fmp-suggestion-scope.scope-department { background: #FFF4E0; color: #B06500; }
.fmp-suggestion-scope.scope-region     { background: #EAE6FB; color: #6B40C4; }
.fmp-suggestion-scope.scope-country    { background: #FFE4E6; color: #B53A2A; }

/* ===================================================================
 * Panneau pr\u00e9f\u00e9rences (popover)
 * =================================================================== */
.fmp-prefs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 14, 0.35);
  backdrop-filter: blur(2px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px;
}

.fmp-prefs-panel {
  background: #FFFFFF;
  border: 1px solid #E8E2D7;
  border-radius: 18px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(15, 15, 14, 0.25);
  padding: 24px;
  animation: fmp-prefs-in 0.2s ease-out;
}

@keyframes fmp-prefs-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fmp-prefs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.fmp-prefs-title {
  font-family: "Bricolage Grotesque", serif;
  font-size: 20px;
  font-weight: 600;
  color: #0F0F0E;
}
.fmp-prefs-close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #52524E;
  border-radius: 6px;
}
.fmp-prefs-close:hover { background: #F1EEE6; color: #0F0F0E; }

.fmp-prefs-intro {
  font-size: 13px;
  color: #52524E;
  margin-bottom: 18px;
  line-height: 1.5;
}

.fmp-prefs-section {
  padding: 14px 0;
  border-top: 1px solid #F1EEE6;
}
.fmp-prefs-section:first-of-type { border-top: 0; }

.fmp-prefs-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.fmp-prefs-row-text { flex: 1; min-width: 0; }
.fmp-prefs-label { font-weight: 500; color: #0F0F0E; font-size: 14px; }
.fmp-prefs-hint  { font-size: 12px; color: #52524E; margin-top: 2px; line-height: 1.45; }

/* Switch (toggle) */
.fmp-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex: none;
  cursor: pointer;
  margin-top: 2px;
}
.fmp-switch input { opacity: 0; width: 0; height: 0; }
.fmp-switch-slider {
  position: absolute;
  inset: 0;
  background: #D8D1C1;
  border-radius: 24px;
  transition: background 0.2s ease;
}
.fmp-switch-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}
.fmp-switch input:checked + .fmp-switch-slider { background: #1A3C34; }
.fmp-switch input:checked + .fmp-switch-slider::before { transform: translateX(20px); }

.fmp-prefs-about {
  font-size: 12px;
  line-height: 1.5;
  padding-top: 4px;
}
.fmp-prefs-about-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 3px 0;
}
.fmp-prefs-about-key {
  color: #52524E;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fmp-prefs-about-val {
  color: #0F0F0E;
  text-align: right;
}
.fmp-prefs-about-link {
  color: #1A3C34;
  font-size: 12px;
  text-decoration: underline;
  text-decoration-color: rgba(26, 60, 52, 0.3);
}
.fmp-prefs-about-link:hover {
  text-decoration-color: #1A3C34;
}

.fmp-prefs-footer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #F1EEE6;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.fmp-prefs-clear {
  background: none;
  border: 1px solid #E8E2D7;
  color: #52524E;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}
.fmp-prefs-clear:hover { border-color: #CF222E; color: #CF222E; }

/* ===================================================================
 * Bloc d'aide "G\u00e9olocalisation refus\u00e9e"
 * =================================================================== */
.fmp-geo-help {
  background: #FFF8E8;
  border: 1px solid #F1DB9E;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #6B4F10;
  line-height: 1.5;
}
.fmp-geo-help strong { color: #3D2D05; }
.fmp-geo-help ul { margin: 6px 0 0 18px; padding: 0; }
.fmp-geo-help li { margin: 2px 0; }

/* ===================================================================
 * Mode sombre pour les nouveaux \u00e9l\u00e9ments
 * =================================================================== */
@media (prefers-color-scheme: dark) {
  .fmp-suggestions {
    background: #161C19;
    border-color: #2A2F2C;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }
  .fmp-suggestion-item { border-bottom-color: #2A2F2C; }
  .fmp-suggestion-item:hover,
  .fmp-suggestion-item.active { background: #1F2622; }
  .fmp-suggestion-label { color: #ECE9E0; }
  .fmp-suggestion-scope { background: #2A2F2C; color: #A9A9A1; }
  .fmp-suggestion-scope.scope-city       { background: rgba(26, 127, 55, 0.2);  color: #6FCF8B; }
  .fmp-suggestion-scope.scope-department { background: rgba(176, 101, 0, 0.25); color: #E8A84F; }
  .fmp-suggestion-scope.scope-region     { background: rgba(107, 64, 196, 0.25); color: #B796F0; }
  .fmp-suggestion-scope.scope-country    { background: rgba(181, 58, 42, 0.25);  color: #E58873; }

  .fmp-prefs-panel {
    background: #161C19;
    border-color: #2A2F2C;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  }
  .fmp-prefs-title { color: #ECE9E0; }
  .fmp-prefs-close:hover { background: #1F2622; color: #ECE9E0; }
  .fmp-prefs-intro { color: #A9A9A1; }
  .fmp-prefs-section { border-top-color: #2A2F2C; }
  .fmp-prefs-label { color: #ECE9E0; }
  .fmp-prefs-hint { color: #A9A9A1; }
  .fmp-prefs-footer { border-top-color: #2A2F2C; }
  .fmp-prefs-clear { background: transparent; border-color: #3A403D; color: #A9A9A1; }
  .fmp-prefs-clear:hover { border-color: #E58873; color: #E58873; }
  .fmp-switch-slider { background: #3A403D; }

  .fmp-prefs-about-key { color: #A9A9A1; }
  .fmp-prefs-about-val { color: #ECE9E0; }
  .fmp-prefs-about-link { color: #5BB89E; text-decoration-color: rgba(91, 184, 158, 0.35); }
  .fmp-prefs-about-link:hover { text-decoration-color: #5BB89E; }

  .fmp-geo-help {
    background: rgba(241, 219, 158, 0.08);
    border-color: rgba(241, 219, 158, 0.25);
    color: #E8D9AA;
  }
  .fmp-geo-help strong { color: #F4E4B8; }

  .leaflet-popup-content .fmp-pop-route { color: #ECE9E0 !important; }

  /* Rupture — dark mode */
  .fmp-badge-rupture,
  .fmp-pop-rupture { background: #A82020; }
  .fmp-marker-rupt { background: #A82020; }

  /* Clusters — dark mode */
  .fmp-cluster { border-color: #1E2A25; }
  .fmp-cluster-small  { background: #27A745; }
  .fmp-cluster-medium { background: #E0B636; }
  .fmp-cluster-large  { background: #E04040; }
}

/* ===================================================================
 * Page Géopolitique — cartes pétrole + fil d'actus
 * =================================================================== */

/* Oil price cards */
.fmp-oil-card {
  background: #FFFFFF;
  border: 1px solid #E8E2D7;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(15, 15, 14, 0.05);
}
.fmp-oil-card-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.fmp-oil-card-label {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #0F0F0E;
}
.fmp-oil-card-sub {
  font-size: 12px;
  color: #52524E;
}
.fmp-oil-card-price {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 32px;
  color: #0F0F0E;
  line-height: 1;
}
.fmp-oil-card-delta {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
}
.fmp-oil-card-delta.delta-up   { color: #CF222E; background: rgba(207, 34, 46, 0.08); }
.fmp-oil-card-delta.delta-down { color: #1A7F37; background: rgba(26, 127, 55, 0.08); }
.fmp-oil-card-delta.delta-flat { color: #52524E; background: rgba(82, 82, 78, 0.08); }
.fmp-oil-card-date {
  font-size: 11px;
  color: #A9A9A1;
  margin-top: 8px;
}

/* News grid */
.fmp-news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .fmp-news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .fmp-news-grid { grid-template-columns: repeat(3, 1fr); }
}

.fmp-news-card {
  display: block;
  background: #FFFFFF;
  border: 1px solid #E8E2D7;
  border-radius: 14px;
  padding: 16px 20px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 1px 4px rgba(15, 15, 14, 0.04);
}
.fmp-news-card:hover {
  border-color: #1A3C34;
  box-shadow: 0 4px 16px rgba(15, 15, 14, 0.1);
  transform: translateY(-1px);
}
.fmp-news-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fmp-news-card-source {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #E85D04;
}
.fmp-news-card-title {
  font-family: "Instrument Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #0F0F0E;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fmp-news-card-date {
  font-size: 11px;
  color: #A9A9A1;
}

/* ===================================================================
 * 🌙 DARK MODE — activé automatiquement via prefers-color-scheme
 * Plutôt que de parsemer le HTML de classes dark:, on repeint les
 * couleurs Tailwind directement via les classes originales.
 * =================================================================== */
@media (prefers-color-scheme: dark) {

  body {
    background-image:
      radial-gradient(ellipse 80% 60% at 10% 0%, rgba(26, 60, 52, 0.25), transparent 60%),
      radial-gradient(ellipse 60% 50% at 95% 5%, rgba(232, 93, 4, 0.14), transparent 60%);
    background-color: #0E1412;
    color: #ECE9E0;
  }

  /* Fonds */
  .bg-cream        { background-color: #0E1412 !important; }
  .bg-paper        { background-color: #161C19 !important; }
  .bg-cream\/80    { background-color: rgba(14, 20, 18, 0.82) !important; }
  .bg-cream\/60    { background-color: rgba(22, 28, 25, 0.7) !important; }
  .bg-forest\/10   { background-color: rgba(26, 60, 52, 0.35) !important; }

  .hover\:bg-cream\/60:hover { background-color: rgba(22, 28, 25, 0.9) !important; }
  .hover\:bg-line\/60:hover  { background-color: rgba(42, 47, 44, 0.6) !important; }

  /* Textes */
  .text-ink         { color: #ECE9E0 !important; }
  .text-ink-soft    { color: #A9A9A1 !important; }
  .text-ink-faint   { color: #6E6E66 !important; }
  .text-forest      { color: #5BB89E !important; }   /* vert plus lumineux sur fond sombre */
  .placeholder\:text-ink-faint::placeholder { color: #6E6E66 !important; }

  /* Bordures */
  .border-line       { border-color: #2A2F2C !important; }
  .border-line\/70   { border-color: rgba(42, 47, 44, 0.7) !important; }

  /* Boutons onglets actifs */
  .bg-forest { background-color: #1A3C34 !important; }
  .text-cream { color: #ECE9E0 !important; }

  /* Inputs & select */
  input, select, textarea {
    color-scheme: dark;
  }

  /* Highlight flamme reste éclatant */
  .text-flame { color: #FF7A2E !important; }

  /* Leaflet : assombrir légèrement les tuiles */
  .leaflet-container { background: #1A1F1C !important; }
  .leaflet-tile-pane { filter: brightness(0.75) invert(0) hue-rotate(0deg) contrast(1.05); }
  /* Approche moins agressive : calque sombre par-dessus */
  .leaflet-tile-pane::after {
    content: ''; position: absolute; inset: 0;
    background: rgba(8, 12, 10, 0.35); pointer-events: none;
    mix-blend-mode: multiply;
  }

  .leaflet-control-zoom a {
    background: #161C19 !important;
    color: #ECE9E0 !important;
    border-color: #2A2F2C !important;
  }
  .leaflet-control-zoom a:hover { background: #1F2622 !important; }
  .leaflet-control-attribution {
    background: rgba(22, 28, 25, 0.85) !important;
    color: #A9A9A1 !important;
  }
  .leaflet-control-attribution a { color: #5BB89E !important; }

  /* Popup Leaflet */
  .leaflet-popup-content-wrapper {
    background: #161C19 !important;
    border-color: #2A2F2C !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55) !important;
  }
  .leaflet-popup-tip { background: #161C19 !important; }
  .leaflet-popup-content        { color: #ECE9E0 !important; }
  .leaflet-popup-content .fmp-pop-addr { color: #A9A9A1 !important; }
  .leaflet-popup-content .fmp-pop-fuel { color: #A9A9A1 !important; }
  .leaflet-popup-content .fmp-pop-time { color: #6E6E66 !important; }

  /* Range thumb visible en sombre */
  input[type="range"]::-webkit-slider-runnable-track,
  input[type="range"]::-moz-range-track { background: #2A2F2C; }
  input[type="range"]::-webkit-slider-thumb,
  input[type="range"]::-moz-range-thumb { background: #5BB89E; border-color: #0E1412; }
  input[type="range"] { accent-color: #5BB89E; }

  /* Scrollbar */
  .overflow-y-auto::-webkit-scrollbar-thumb { background: #3A403D; }

  /* Ombres plus subtiles */
  .shadow-sm { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) !important; }

  /* Géopolitique — dark mode */
  .fmp-oil-card { background: #161C19; border-color: #2A2F2C; }
  .fmp-oil-card-label { color: #ECE9E0; }
  .fmp-oil-card-sub { color: #A9A9A1; }
  .fmp-oil-card-price { color: #ECE9E0; }
  .fmp-oil-card-delta.delta-up   { color: #E58873; background: rgba(207, 34, 46, 0.15); }
  .fmp-oil-card-delta.delta-down { color: #6FCF8B; background: rgba(26, 127, 55, 0.15); }
  .fmp-oil-card-delta.delta-flat { color: #A9A9A1; background: rgba(82, 82, 78, 0.15); }
  .fmp-news-card { background: #161C19; border-color: #2A2F2C; }
  .fmp-news-card:hover { border-color: #5BB89E; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); }
  .fmp-news-card-source { color: #FF7A2E; }
  .fmp-news-card-title { color: #ECE9E0; }
  .fmp-news-card-date { color: #A9A9A1; }
}


/* ===================================================================
 * 📱 NAVIGATION MOBILE PAR PAGES
 * Sur mobile (< 1024px), l'onglet Carte est découpé en 3 pages :
 *   - search : Hero + Filtres + boutons d'action
 *   - list   : Liste des stations
 *   - map    : Carte Leaflet
 * Sur desktop, tout reste affiché simultanément.
 * =================================================================== */

/* Barre de navigation mobile (Retour + Accueil) */
.fmp-mobile-nav {
  display: none;
}

@media (max-width: 1023px) {
  .fmp-mobile-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E8E2D7;
  }

  .fmp-mobile-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #E8E2D7;
    background: #FFFFFF;
    color: #0F0F0E;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .fmp-mobile-nav-btn:hover,
  .fmp-mobile-nav-btn:active {
    background: #F6F2E9;
    border-color: #1A3C34;
    color: #1A3C34;
  }

  /* Boutons d'action (Voir les stations / Voir la carte) */
  .fmp-mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }

  .fmp-mobile-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #E8E2D7;
    background: #FFFFFF;
    color: #0F0F0E;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
  }
  .fmp-mobile-action-btn:hover,
  .fmp-mobile-action-btn:active {
    background: #F6F2E9;
    border-color: #1A3C34;
  }
  .fmp-mobile-action-btn > span:first-of-type {
    flex: 1;
  }
  .fmp-mobile-action-btn > svg:last-child {
    color: #A8A59E;
    flex: none;
  }

  /* Badge compteur de stations */
  .fmp-mobile-action-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 12px;
    background: #1A3C34;
    color: #FAF7F2;
    font-size: 12px;
    font-weight: 600;
    font-family: "JetBrains Mono", monospace;
    line-height: 1;
  }

  /* Liste des stations en mode plein écran sur mobile */
  .fmp-mobile-list-scroll {
    max-height: calc(100vh - 220px) !important;
  }

  /* Carte plus haute sur mobile quand elle occupe toute la page */
  .fmp-mobile-map-height {
    height: calc(100vh - 260px) !important;
    min-height: 350px !important;
  }
}

/* On masque les boutons d'action mobile sur desktop */
@media (min-width: 1024px) {
  .fmp-mobile-actions {
    display: none !important;
  }
  .fmp-mobile-nav {
    display: none !important;
  }
}

/* ===================================================================
 * 🌙 Dark mode — styles mobile navigation
 * =================================================================== */
@media (prefers-color-scheme: dark) {
  .fmp-mobile-nav {
    border-bottom-color: #2A2F2C;
  }

  .fmp-mobile-nav-btn {
    background: #161C19;
    border-color: #2A2F2C;
    color: #ECE9E0;
  }
  .fmp-mobile-nav-btn:hover,
  .fmp-mobile-nav-btn:active {
    background: #1F2622;
    border-color: #5BB89E;
    color: #5BB89E;
  }

  .fmp-mobile-action-btn {
    background: #161C19;
    border-color: #2A2F2C;
    color: #ECE9E0;
  }
  .fmp-mobile-action-btn:hover,
  .fmp-mobile-action-btn:active {
    background: #1F2622;
    border-color: #5BB89E;
  }
  .fmp-mobile-action-btn > svg:last-child {
    color: #6E6E66;
  }

  .fmp-mobile-action-count {
    background: #5BB89E;
    color: #0E1412;
  }
}


/* ===================================================================
 * Popup : double bouton itinéraire (Google Maps + Apple Plans)
 * =================================================================== */
.fmp-pop-routes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.fmp-pop-route-google {
  background: #1A3C34 !important;
}
.fmp-pop-route-google:hover {
  background: #0F2721 !important;
}

.fmp-pop-route-apple {
  background: #52524E !important;
}
.fmp-pop-route-apple:hover {
  background: #3A3A36 !important;
}

@media (prefers-color-scheme: dark) {
  .fmp-pop-route-google {
    background: #2E6054 !important;
    color: #ECE9E0 !important;
  }
  .fmp-pop-route-google:hover {
    background: #3B7A6C !important;
  }
  .fmp-pop-route-apple {
    background: #3A403D !important;
    color: #ECE9E0 !important;
  }
  .fmp-pop-route-apple:hover {
    background: #4A504D !important;
  }
}


/* ===================================================================
 * Toast « Personnalisez votre expérience »
 * =================================================================== */
.fmp-prefs-toast {
  position: fixed;
  bottom: 24px;
  left: 16px;
  right: 16px;
  margin: 0 auto;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #1A3C34;
  color: #ECE9E0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255,255,255,0.06) inset;
  font-family: "Instrument Sans", system-ui, sans-serif;
}

.fmp-prefs-toast-icon {
  font-size: 24px;
  flex: none;
  line-height: 1;
}

.fmp-prefs-toast-body {
  flex: 1;
  min-width: 0;
}

.fmp-prefs-toast-title {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.fmp-prefs-toast-text {
  font-size: 12px;
  color: rgba(236, 233, 224, 0.65);
  line-height: 1.4;
}

.fmp-prefs-toast-btn {
  flex: none;
  padding: 7px 16px;
  border-radius: 10px;
  background: #E85D04;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.fmp-prefs-toast-btn:hover {
  background: #D4520A;
}

.fmp-prefs-toast-close {
  flex: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255,255,255,0.1);
  color: rgba(236, 233, 224, 0.6);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s ease, color 0.15s ease;
}
.fmp-prefs-toast-close:hover {
  background: rgba(255,255,255,0.18);
  color: #ECE9E0;
}

/* Mobile : toast plus compact */
@media (max-width: 480px) {
  .fmp-prefs-toast {
    bottom: 16px;
    padding: 12px 14px;
    gap: 10px;
    border-radius: 14px;
  }
  .fmp-prefs-toast-icon { font-size: 20px; }
  .fmp-prefs-toast-title { font-size: 13px; }
  .fmp-prefs-toast-text { font-size: 11px; }
  .fmp-prefs-toast-btn { padding: 6px 12px; font-size: 12px; }
}

@media (prefers-color-scheme: dark) {
  .fmp-prefs-toast {
    background: #0F1F1A;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(91, 184, 158, 0.12) inset;
  }
}

