/* ===========================
   Station - CSS Clean
   =========================== */

/* Root & layout de base */
:root{
  --header-h-desktop:80px;
  --header-h-mobile:100px;

  /* Couleurs carburants */
  --c-gazole:#ff8022;
  --c-e10:#20c997;
  --c-e85:#d10069;
  --c-sp95:#00bf80;
  --c-sp98:#004c33;
  --c-gplc:#0073e6;
  --primary:#0056b3;
  --c-brand:#004f92;
  --c-link:#007bff;
}

html{ box-sizing:border-box; }
*,*::before,*::after{ box-sizing:inherit; }

body{
  margin:0;
  color:#333;
  background:#fff;
  padding-top:var(--header-h-desktop);
  font-family:Arial, sans-serif;
}

@media (max-width:900px){
  body{ padding-top:var(--header-h-mobile); }
}

/* ---------------------------
   Header / Nav
   --------------------------- */
header{
  position:fixed; top:0; left:0; right:0;
  height:var(--header-h-desktop);
  width:100%;
  background:linear-gradient(to right,#0055a4,#fff,#ef4135);
  box-shadow:0 2px 5px rgba(0,0,0,.2);
  z-index:999;
}
@media (max-width:900px){
  header{ height:var(--header-h-mobile); }
}

.header-container{
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 20px; flex-wrap:wrap; gap:10px;
}
@media (max-width:900px){
  .header-container{ flex-direction:column; align-items:stretch; gap:10px; }
  .header-left{ display:flex; justify-content:space-between; align-items:center; width:100%; }
}

.logo{ display:flex; align-items:center; gap:10px; text-decoration:none; flex-shrink:0; }
.logo img{ width:40px; height:40px; object-fit:contain; }
.logo span{ font-size:1.4rem; font-weight:700; color:#333; white-space:nowrap; }

.main-nav{ display:flex; }
.main-nav ul{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:10px; }
.main-nav a{ font-size:14px; color:#333; text-decoration:none; padding:10px 14px; display:block; font-weight:700; }
#burger-btn{
  width:44px; height:44px;
  display:flex; align-items:center; justify-content:center;
  font-size:24px; line-height:1;
}

/* Sous-menus : desktop au survol, mobile toujours visibles dans le drawer */
@media (min-width:901px){
  .main-nav{ flex:1 1 auto; }
  .main-nav>ul{ align-items:center; gap:18px; white-space:nowrap; }
  .main-nav .has-submenu{ position:relative; }
  .main-nav .submenu{
    position:absolute; left:0; top:100%;
    min-width:240px; background:#fff; border:1px solid #eee;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
    padding:8px 0; z-index:1200; display:none;
  }
  .main-nav .has-submenu:hover>.submenu{ display:block; }
  #burger-btn{ display:none !important; }
}
@media (max-width:900px){
  .main-nav{ display:none; flex-direction:column; background:#0055a4; position:absolute; top:50px; left:0; width:100%;
             max-height:calc(100vh - 60px); overflow-y:auto; padding:10px 0; z-index:999; }
  .main-nav.active{ display:block; }
  .main-nav ul{ flex-direction:column; }
  .main-nav li{ border-bottom:1px solid #fff; }
  .main-nav .submenu{ position:relative; display:block; background:#003f7f; }
  .main-nav .submenu li a{ padding-left:25px; color:#fff; }
  #burger-btn{ display:block !important; }
}
.submenu li a{ color:#000; } /* base desktop */

.burger{ display:none; background:transparent; border:none; color:#333; cursor:pointer; margin-left:auto; }

/* Recherche header */
.search-geoloc{
  display:flex; align-items:center; gap:8px; width:100%; max-width:500px; position:relative; margin-bottom:5px;
}
#search{ flex:1; min-width:0; padding:10px 12px; font-size:1rem; border-radius:5px; border:1px solid #ccc; outline:0; }
#geolocate-btn{
  background:#007bff; color:#fff; border:none; padding:10px 14px; border-radius:5px; font-size:1.2rem;
  cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
#suggestions{
  position:absolute; top:calc(100% + 6px); left:0; right:0;
  background:#fff; color:var(--c-brand); border:1px solid #ddd; border-top:none; z-index:1000;
  display:none; max-height:260px; overflow:auto; border-radius:0 0 5px 5px;
}
.suggestion{ padding:10px; cursor:pointer; }
.suggestion:hover{ background:#f0f0f0; color:red; }

@media (max-width:900px){
  .search-geoloc{ width:100%; max-width:100%; margin:0 0 10px; }
  .search-geoloc input{ flex:1 1 auto; min-width:0; }
  #geolocate-btn{ width:44px; height:44px; padding:0; }
  #suggestions{ top:calc(100% + 6px); max-width:100%; z-index:2100; }
}

/* ---------------------------
   Container & typographie
   --------------------------- */
.container{
  width:90%; max-width:1200px; margin:0 auto;
  padding:20px; border-radius:8px; box-shadow:0 4px 8px rgba(0,0,0,.1);
}
.section, main, section{ margin-top:40px; }

h1{ margin:20px 0; font-size:calc(1rem + 1.5vw); font-weight:700; color:var(--c-brand); }
@media (max-width:900px){ h1{ font-size:1.5rem; } }
h2{ margin-top:10px; color:var(--c-brand); }

/* ---------------------------
   Tableaux / Prix
   --------------------------- */
table{ width:100%; border-collapse:collapse; table-layout:auto; }
th, td{ padding:10px; border-bottom:1px solid #ccc; }
th{ background:#004f92; color:#fff; }
.carburants td,.carburants th,table td,table th{padding:10px;border-bottom:1px solid #ccc}
td,th{padding:12px}
th{background-color:#004f92}
table thead th{ position:sticky; top:0; z-index:1;}

.prix{ font-size:1.1rem; text-align:right; color:#000; font-weight:700; }

.btn-favori{
  min-width: 28ch;           /* réserve la plus grande version du libellé */
  white-space:nowrap;
}
.fa-solid,.fa-brands{ display:inline-block; width:1.25em; min-width:1.25em; text-align:center }
/* Logo marque à gauche du H1 */
.brand-slot{
  flex:0 0 120px;   /* réserve l’emprise */
  width:120px; height:60px;
  display:grid; place-items:center;
}
.brand-slot img{ width:120px; height:60px; object-fit:contain }

/* Badge autoroute et mini logos */
.badge-autoroute img{ width:30px; height:30px; object-fit:contain }
img.logo-petite, .station-name img { width:64px; height:64px; object-fit:contain }

/* Map statique déjà OK, on force le ratio au cas où */
#map-holder{ aspect-ratio: 600 / 300; height:auto; }
#map{ width:100%; height:100%; }
.btn-maplink{
  border:2px solid currentColor; /* présente dès le premier paint */
}
.btn-gmaps{ color:#1a73e8; background:#e8f0fe; border-color:#1a73e8 }
.btn-waze { color:#0099cc; background:#e0f7fa; border-color:#0099cc }
/* Colonnes étroites = largeur fixe → pas de “pompement” quand les chiffres arrivent */
.carburants td.prix            { width: 9ch; }  /* “1,999 €” */
.carburants td[class^="date-"] { width: 5ch; }  /* “31/12”  */
.carburants td:last-child      { width: 4ch; }  /* bouton 🚨 */

.date-green{ color:#1b7f1b; text-align:right; font-weight:700; }
.date-orange{ color:#a86100; text-align:right; }
.date-red{ color:#b30000; text-align:right; }

.tendance-hausse{ color:red; font-weight:700; }
.tendance-baisse{ color:green; font-weight:700; }
.tendance-stable{ color:gray; }

/* Couleurs de libellé carburant */
.carburant{ font-weight:700; }
.carburant-gazole{ color:var(--c-gazole); }
.carburant-e10{ color:var(--c-e10); }
.carburant-e85{ color:var(--c-e85); }
.carburant-sp95{ color:var(--c-sp95); }
.carburant-sp98{ color:var(--c-sp98); }
.carburant-gplc{ color:var(--c-gplc); }

/* ---------------------------
   Badges / logos
   --------------------------- */
img[width][height]{ height:auto; max-width:100%; }
img.logo-petite, .station-name img{ width:64px; height:64px; object-fit:contain; }
.hide-mobile{ display:block; }
@media (max-width:600px){
  .hide-mobile{ display:none !important; }
}

/* ---------------------------
   Cartes / Graphiques (placeholders)
   --------------------------- */
#map-holder{
  position:relative; width:100%; height:260px;
  border-radius:8px; overflow:hidden; background:#eef1f5;
  margin-top:20px; margin-bottom:20px;
}
#map{ display:none; width:100%; height:100%; border:2px solid var(--c-link); border-radius:8px; }

#graph-wrapper{
  min-height:280px; display:grid; place-items:center;
  border:1px solid #eee; border-radius:8px;
}

/* ---------------------------
   Boutons cartes / actions
   --------------------------- */
.btn-maplink{
  display:inline-block; padding:10px 16px; margin:10px 0;
  font-size:.9rem; font-weight:600; color:var(--c-link); background:#fff;
  border:2px solid var(--c-link); border-radius:8px; text-decoration:none;
  box-shadow:0 2px 6px rgba(0,0,0,.1); transition:.2s ease-in-out;
}
.btn-maplink:hover{ background:var(--c-link); color:#fff; box-shadow:0 3px 8px rgba(0,0,0,.2); transform:translateY(-2px); }
.btn-maplink:focus{ outline:2px solid #0056b3; outline-offset:2px; }

.btn-gmaps{ color:#1a73e8; background:#e8f0fe; border-color:#1a73e8; }
.btn-gmaps:hover{ background:#1a73e8; color:#fff; box-shadow:0 3px 8px rgba(26,115,232,.3); }

.btn-waze{ color:#09c; background:#e0f7fa; border-color:#09c; }
.btn-waze:hover{ background:#09c; color:#fff; box-shadow:0 3px 8px rgba(0,153,204,.3); }

/* ---------------------------
   Ruptures / Alerte
   --------------------------- */
.alert-rupture-totale{
  background:#ff0000; color:#fff; font-weight:700; text-align:center;
  padding:15px; font-size:1.2rem; margin-bottom:20px; border-radius:6px;
  animation:clignote 1s infinite alternate;
}
@keyframes clignote{ from{opacity:1} to{opacity:.7} }
@media (prefers-reduced-motion: reduce){
  .alert-rupture-totale{ animation:none; }
}

.ruptures-stock, .services-station{
  background:#fff8f0; border:1px solid #ffc107; padding:20px; border-radius:8px;
  margin-top:30px; box-shadow:0 2px 5px rgba(0,0,0,.05);
}
.ruptures-stock h2, .services-station h2{ color:#c0392b; margin-bottom:15px; }
.rupture-def{ background:#f9e2e2; border-left:5px solid #e74c3c; padding:10px; font-weight:700; margin-bottom:10px; }

.rupture-table{ width:100%; margin-top:15px; border-collapse:collapse; }
.rupture-table th, .rupture-table td{ padding:10px; border:1px solid #ddd; text-align:center; }
.rupture-table tr.encours{ background:#ffecec; }

/* ---------------------------
   Horaires
   --------------------------- */
.horaires-station{
  background:#f8f9ff; border:1px solid #cce5ff; padding:20px; border-radius:8px;
  margin-top:30px; box-shadow:0 2px 5px rgba(0,0,0,.05);
}
.horaires-station h2{ margin-top:0; color:#0056b3; margin-bottom:15px; }
.table-horaires{ width:100%; border-collapse:collapse; background:#fff; border-radius:6px; overflow:hidden; }
.table-horaires td{ padding:10px; border-bottom:1px solid #eee; vertical-align:top; }
.horaires-station .ferme{ color:#c0392b; font-weight:700; }

/* ---------------------------
   Services
   --------------------------- */
.services{ display:flex; flex-wrap:wrap; gap:10px; margin:10px 0; }
.services-station-elem{ display:flex; align-items:center; gap:8px; font-size:.95rem; }

/* ---------------------------
   Liste stations proches
   --------------------------- */
.stations-proches ul{ list-style:none; margin:0; padding:0; }
.stations-proches li{
  padding:12px 15px; border:1px solid #eee; border-radius:8px; margin-bottom:12px;
  display:flex; justify-content:space-between; align-items:center;
}
.station-carburants{ font-size:.95rem; color:#444; }

/* ---------------------------
   Partage / Newsletter / Footer
   --------------------------- */
.share-buttons{ margin-top:30px; text-align:center; }
.share-btn{
  display:inline-block; padding:10px 15px; color:#fff; border-radius:5px; text-decoration:none;
  font-weight:700; transition:background .3s; margin:5px 10px;
}
.share-btn.fb{ background:#3b5998; }
.share-btn.fb:hover{ background:#2d4373; }
.share-btn.tw{ background:#1da1f2; }
.share-btn.tw:hover{ background:#0d95e8; }

.newsletter-cta{
  background:#007bff; color:#fff; padding:30px 20px; text-align:center; border-radius:8px;
  margin:40px 0; box-shadow:0 2px 8px rgba(0,0,0,.1);
}
.newsletter-form{ display:flex; justify-content:center; flex-wrap:wrap; gap:10px; }
.newsletter-form input[type=email]{ padding:12px; border:1px solid #ddd; border-radius:4px; width:250px; max-width:100%; }
.newsletter-form button{
  padding:12px 20px; background:gold; border:none; color:#333; font-weight:700; border-radius:4px; cursor:pointer;
}
.newsletter-form button:hover{ background:#ffc107; }

/* ---------------------------
   Modale (signalement)
   --------------------------- */
.modal{ position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:1000; display:none; }
.modal-dialog{ max-width:520px; margin:5vh auto; }
.modal-content{
  background:#fff; border-radius:12px; padding:18px 18px 14px; position:relative;
  box-shadow:0 10px 40px rgba(0,0,0,.2);
}
.modal-close{ position:absolute; right:8px; top:8px; background:transparent; border:0; font-size:20px; line-height:1; cursor:pointer; }
.modal .row{ margin-bottom:12px; }
.modal label{ display:block; font-weight:600; margin-bottom:6px; }
.modal input[type="text"], .modal input[type="email"], .modal input[type="number"], .modal textarea{
  width:100%; padding:8px 10px; border:1px solid #ddd; border-radius:8px;
}
.modal .actions{ display:flex; gap:10px; margin-top:8px; }
.modal .note{ color:#666; }
#anomaly-msg{ font-weight:600; }

/* ---------------------------
   Responsive spécifiques
   --------------------------- */
@media (max-width:600px){
  .container{ padding:10px; }
  .section{ padding:0 10px; }
  .services{ display:flex; flex-wrap:wrap; gap:8px; } /* corrige l’ancien display:table-row */
  img, td img{ max-height:50px; height:auto; width:auto; object-fit:contain; }
  h1{ font-size:1.5rem; }
}

/* ---------------------------
   Publicités (réserve d’espace)
   --------------------------- */
.adsense-container{
  max-width:728px; margin:20px auto; padding:10px; background:#f9f9f9;
  border:1px solid #ddd; border-radius:8px; text-align:center; box-shadow:0 2px 5px rgba(0,0,0,.05);
  min-height:280px;
}
@media (max-width:600px){
  .adsense-container{ min-height:250px; }
}
.adsense-slot-300x250{ aspect-ratio:300 / 250; }
.adsense-slot-336x280{ aspect-ratio:336 / 280; }

/* Ajoute une taille intrinsèque approximative pour éviter un shift lors du reveal */
.stations-proches,
.newsletter-cta,
.services-station,
.horaires-station,
#graph-wrapper,
#map-holder {
  content-visibility: auto;
  contain-intrinsic-size: 600px 800px; /* ajuste par bloc si besoin */
}

.site-footer{background-color:#2c3e50;color:#fff;padding:20px 0;margin-top:40px;font-size:14px}
.footer-container{max-width:1200px;margin:0 auto;padding:0 20px;text-align:center}
.footer-nav{margin-top:10px}
.footer-nav a{color:#fff;margin:0 10px;text-decoration:none;transition:color .3s}

.ads-content[data-ad-slot] { min-height: 280px; }
@media (max-width:600px){ .ads-content[data-ad-slot]{ min-height: 250px; } }
.ads-content .adsbygoogle { display:block; min-height:inherit; width:100%; }
.favori-section { min-height: 58px; } /* hauteur du bouton + petit texte*/
.favori-section .btn { white-space: nowrap; } /* évite le wrap brutal */
.main-nav { min-height: 44px; }           /* réserve le bandeau */
.main-nav ul { align-items:center; }
.main-nav a { line-height: 1.2; }
.center-button{display:flex;justify-content:center;margin:20px 0}
.btn, .toggle-comment-form, .share-btn.fb, .share-btn.tw{ background:var(--primary); color:#fff; }

/* Version contrastée AA (ratio ≥ 4.5:1) */
.prix-vert   { color:#1b7f1b !important; font-weight:700; }
.prix-orange { color:#a86100 !important; font-weight:700; } /* remplace #e67e22 */
.prix-rouge  { color:#b30000 !important; font-weight:700; } /* remplace red */
.station-link{
  font-weight:700;
  color:#0056b3;              /* bleu plus sombre que #007bff pour respecter le contraste AA */
  text-decoration:none;
}
.station-link:hover,
.station-link:focus{
  color:#003f7f;               /* encore plus sombre au survol */
  text-decoration:underline;
  outline:2px solid #003f7f;   /* focus visible au clavier */
  outline-offset:2px;
}

.legend-code{font-size:.9rem;color:#555}
.legend-chip{display:inline-flex;align-items:center;gap:6px;margin-left:10px}
.legend-chip .swatch{width:12px;height:12px;border-radius:2px;display:inline-block}
.legend-vert   .swatch{background:#1b7f1b}
.legend-orange .swatch{background:#a86100}
.legend-rouge  .swatch{background:#b30000}

/* utilitaire */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;margin:-1px;padding:0}
/* Réserver de l’espace pour éviter CLS */
#page-main { min-height:100vh; }
.section.carburants {
  min-height:200px;
  content-visibility:auto;
  contain-intrinsic-size:400px;
}

/* Logo fixe et sans shift */
.logo img {
  width:32px; height:32px; object-fit:contain;
  aspect-ratio:1/1;
}

/* ===========================
   Styles non utilisés dans la page "station"
   (conservés ici pour référence, désactivés)
   =========================== */
/*
#svgMap{ width:100%; height:auto; }
.note{ font-size:.9em; color:#555; margin-top:10px; }
.cheap{ fill:#00bf80; } .average{ fill:#ff8022; } .expensive{ fill:#ca3338; }
#fuel-select{ margin:20px; font-size:16px; }

.search-container,
.search-container form,
.search-box{ max-width:400px; position:relative; }
.search-container{ justify-content:center; align-items:center; margin:20px auto; width:90%;
  border:1px solid #ccc; border-radius:4px; }
.search-container form{ align-items:center; background:#fff; border-radius:5px; overflow:hidden; border:1px solid #ddd; }
.search-container input{ flex:1; padding:12px; font-size:16px; border:none; outline:0; border-radius:4px; width:100%; }
.search-container button{ background:#fff; border:none; padding:12px; cursor:pointer; transition:.3s; font-size:16px; }
.search-box{ border:1px solid #ccc; border-radius:4px; width:100%; margin:0 auto; }

.carte, .regions{ margin-top:20px; }
.regions{ display:flex; flex-wrap:wrap; gap:20px; justify-content:center; }
.region-card{
  background:#f8f9fa; border:1px solid #ddd; border-radius:10px; padding:15px; width:300px;
  box-shadow:2px 2px 10px rgba(0,0,0,.1); transition:transform .2s ease-in-out; text-align:center;
}
.region-card:hover{ transform:translateY(-5px); background:#007bff; }
.region-card h3{ color:#333; font-size:18px; margin-bottom:10px; text-align:center; }
.region-card a{ color:#007bff; text-decoration:none; font-weight:700; display:block; }
.region-card a:hover{ color:#0056b3; text-decoration:underline; }
.region-card ul{ margin:0; padding:0; list-style:none; }
.region-card ul li{ padding:8px; border-bottom:1px solid #ddd; }
.region-card ul li:last-child{ border-bottom:none; }

.carte_france{ display:flex; justify-content:center; gap:20px; align-items:flex-start; flex-wrap:wrap; }
.table-carburants-usa{ width:100%; margin:30px auto; box-shadow:0 4px 8px rgba(0,0,0,.1); font-size:1rem; background:#fff; border-radius:8px; overflow:hidden; }
.table-carburants-usa th{ background:#007bff; color:#fff; text-align:center; padding:12px; font-weight:700; }
.table-carburants-usa td{ padding:12px; text-align:center; border-top:1px solid #ddd; }
.table-carburants-usa td:first-child{ font-weight:700; text-align:left; }

.page-shortcuts{ background:#f9f9f9; padding:10px 15px; border-radius:8px; margin-bottom:20px; font-size:.95em; }
.page-shortcuts ul{ display:flex; flex-wrap:wrap; list-style:none; gap:10px; padding:0; margin:0; }
.page-shortcuts li a{ text-decoration:none; color:#06c; border:1px solid #ddd; padding:5px 10px; border-radius:5px; transition:background .2s; }
.page-shortcuts li a:hover{ background:#eee; }

.prix-encart{ background:#f0f0f0; padding:20px; margin:30px auto; border-radius:10px; max-width:600px; text-align:center; }

.commune-hidden, .mobile, .modif-cachee{ display:none; }

.small, small{ font-size:.59em; }  // à réviser accessibilité si réactivation
*/
