/* =========================================================
   PleinMalin — système de design
   Identité "utilitaire temps réel" : asphalte + orange vif, sans-serif
   bold géométrique. Volontairement énergique et contrasté, distinct de
   PrixDuMètre (vert/terre cuite éditorial) et ValeurÉcole (marine/or
   académique) — c'est le seul des 3 sites orienté "outil en direct".
   ========================================================= */

:root {
  --asphalte: #1c1d21;
  --asphalte-clair: #2a2c32;
  --orange: #ff6a2b;
  --orange-clair: #ff8c54;
  --blanc: #ffffff;
  --gris-clair: #f4f4f2;
  --gris-bordure: #e2e1dd;
  --encre: #1c1d21;
  --gris-texte: #52534f;
  --positif: #1f8a4c;
  --negatif: #d1372f;

  --font-titre: "Sora", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-texte: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --rayon: 10px;
  --ombre: 0 2px 8px rgba(28, 29, 33, 0.1);
  --ombre-forte: 0 14px 36px rgba(28, 29, 33, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-texte);
  background: var(--blanc);
  color: var(--encre);
  line-height: 1.55;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: var(--font-titre);
  font-weight: 700;
  line-height: 1.15;
  color: var(--asphalte);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

a { color: var(--orange); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
p { color: var(--gris-texte); }

.conteneur { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.entete { background: var(--asphalte); color: var(--blanc); padding: 18px 0; }
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { font-family: var(--font-titre); font-size: 1.5rem; font-weight: 800; color: var(--blanc); }
.logo span { color: var(--orange); }
.nav-principale { display: flex; gap: 22px; flex-wrap: wrap; }
.nav-principale a { color: var(--blanc); opacity: 0.85; font-weight: 500; font-size: 0.95rem; }
.nav-principale a:hover { opacity: 1; text-decoration: none; border-bottom: 2px solid var(--orange); }

.hero { background: var(--asphalte); color: var(--blanc); padding: 64px 0 110px; text-align: center; position: relative; }
.hero h1 { color: var(--blanc); }
.hero .sous-titre { color: #c9cad0; font-size: 1.1rem; max-width: 620px; margin: 0 auto 30px; }

.recherche-box { max-width: 620px; margin: 0 auto; background: var(--blanc); border-radius: var(--rayon); padding: 10px; box-shadow: var(--ombre-forte); display: flex; gap: 8px; flex-wrap: wrap; }
.recherche-box input { flex: 1; min-width: 180px; border: none; background: transparent; font-family: var(--font-texte); font-size: 1.05rem; padding: 12px 14px; color: var(--encre); outline: none; }
.recherche-box button { background: var(--orange); color: var(--blanc); border: none; border-radius: 8px; padding: 0 22px; font-size: 0.98rem; font-weight: 700; cursor: pointer; transition: background 0.15s ease; }
.recherche-box button:hover { background: var(--orange-clair); }
.bouton-position { background: var(--gris-clair) !important; color: var(--asphalte) !important; }
.bouton-position:hover { background: var(--gris-bordure) !important; }

.filtres-carburant { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.filtres-carburant button { background: rgba(255,255,255,0.08); color: var(--blanc); border: 1px solid rgba(255,255,255,0.25); border-radius: 20px; padding: 6px 16px; font-size: 0.88rem; font-weight: 600; cursor: pointer; font-family: var(--font-texte); }
.filtres-carburant button.actif { background: var(--orange); border-color: var(--orange); }

.section { padding: 48px 0; }
.section--alt { background: var(--gris-clair); }

.grille-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 28px; }
.carte { background: var(--blanc); border: 1px solid var(--gris-bordure); border-radius: var(--rayon); padding: 22px; box-shadow: var(--ombre); }
.carte h3 { margin-top: 0; }

.resultats-liste { display: flex; flex-direction: column; gap: 10px; margin-top: -70px; position: relative; z-index: 3; }
.station-carte {
  background: var(--blanc); border-radius: var(--rayon); box-shadow: var(--ombre);
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border: 1px solid var(--gris-bordure);
}
.station-carte.moins-cher { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange), var(--ombre); }
.station-carte .infos { flex: 1; min-width: 0; }
.station-carte .nom-ville { font-weight: 700; font-size: 1.02rem; }
.station-carte .adresse { color: var(--gris-texte); font-size: 0.85rem; }
.station-carte .prix { font-family: var(--font-titre); font-weight: 800; font-size: 1.5rem; color: var(--asphalte); white-space: nowrap; }
.station-carte .prix .unite { font-size: 0.75rem; font-weight: 500; color: var(--gris-texte); }
.station-carte .distance { font-size: 0.8rem; color: var(--gris-texte); white-space: nowrap; }
.badge-moins-cher { background: var(--orange); color: var(--blanc); font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 12px; margin-left: 8px; }

.stat-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin: 32px 0; }
.stat { background: var(--blanc); border-radius: var(--rayon); border: 1px solid var(--gris-bordure); padding: 22px; text-align: center; }
.stat .valeur { font-family: var(--font-titre); font-size: 2rem; color: var(--orange); display: block; }
.stat .libelle { color: var(--gris-texte); font-size: 0.9rem; }

table.tableau-carburants { width: 100%; border-collapse: collapse; background: var(--blanc); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); }
table.tableau-carburants th, table.tableau-carburants td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--gris-clair); font-size: 0.92rem; }
table.tableau-carburants th { background: var(--asphalte); color: var(--blanc); font-family: var(--font-texte); font-weight: 600; }

.source-donnees { margin-top: 14px; font-size: 0.85rem; color: var(--gris-texte); border-left: 3px solid var(--orange); padding-left: 12px; }

.pied { background: var(--asphalte); color: #c9cad0; padding: 40px 0; margin-top: 40px; font-size: 0.9rem; }
.pied a { color: var(--orange-clair); }
.pied .colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin-bottom: 24px; }
.pied h4 { color: var(--blanc); font-family: var(--font-texte); font-size: 0.95rem; }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin-bottom: 6px; }
.mention-bas { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 16px; opacity: 0.75; font-size: 0.8rem; }

.chargement, .erreur, .vide { text-align: center; padding: 40px; color: var(--gris-texte); }
.erreur { color: var(--negatif); }
.fil-ariane { font-size: 0.85rem; color: var(--gris-texte); margin-bottom: 18px; }
.fil-ariane a { color: var(--asphalte); }

@media (max-width: 640px) {
  .entete .conteneur { flex-direction: column; align-items: flex-start; gap: 12px; }
  .recherche-box { flex-direction: column; }
  .station-carte { flex-wrap: wrap; }
}
