/* ============================================================
   PompeMètre — styles.css
   pompe.lufop.net
   ============================================================ */

/* -- GOOGLE FONTS -- */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800;900&family=IBM+Plex+Mono:wght@400;500&family=Barlow:wght@400;500;600&display=swap');

/* -- VARIABLES -- */
:root {
  --amber:        #F5A623;
  --amber-dark:   #C47C0A;
  --amber-light:  #FFD27F;
  --red:          #E24B4A;
  --red-light:    #FF8080;
  --green:        #3DBA7E;
  --green-light:  #7EFFC1;
  --blue:         #4A9EE8;

  --bg:           #111210;
  --bg2:          #1A1C18;
  --bg3:          #232520;
  --bg4:          #2D2F29;

  --border:       rgba(255,255,255,0.07);
  --border-amber: rgba(245,166,35,0.3);

  --text:         #F2F0E8;
  --text-muted:   #8A8880;
  --text-dim:     #5A5A55;

  --mono:  'IBM Plex Mono', monospace;
  --cond:  'Barlow Condensed', sans-serif;
  --body:  'Barlow', sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* -- RESET -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background:   var(--bg);
  color:        var(--text);
  font-family:  var(--body);
  font-size:    16px;
  line-height:  1.6;
  min-height:   100vh;
  overflow-x:   hidden;
}

/* -- GRAIN OVERLAY -- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ------------------------------------------
   HEADER
------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(17,18,16,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

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

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--amber);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--cond);
  font-weight: 900;
  font-size: 18px;
  color: var(--bg);
  letter-spacing: -1px;
}
.logo-text {
  font-family: var(--cond);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: 0.3px;
}
.logo-text em {
  color: var(--amber);
  font-style: normal;
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.main-nav a {
  font-family: var(--body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  background: var(--bg3);
}
.main-nav a.nav-cta {
  background: var(--amber);
  color: var(--bg);
  font-weight: 600;
  margin-left: 0.5rem;
}
.main-nav a.nav-cta:hover { background: var(--amber-light); }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* -- LIVE BAR -- */
.live-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 0;
  overflow: hidden;
}
.live-bar-inner {
  display: flex;
  align-items: center;
  gap: 0;
}
.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 1rem;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
}
.live-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.75); }
}
.live-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--green);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.live-scroll-wrap {
  overflow: hidden;
  flex: 1;
}
.live-scroll {
  display: flex;
  gap: 0;
  animation: scrollLeft 40s linear infinite;
  width: max-content;
}
.live-scroll:hover { animation-play-state: paused; }
@keyframes scrollLeft {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.live-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 1.5rem;
  border-right: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.live-item strong   { color: var(--text); font-weight: 500; }
.live-item .up      { color: var(--red); }
.live-item .down    { color: var(--green); }
.live-item .neutral { color: var(--text-muted); }

/* ------------------------------------------
   LAYOUT UTILITIES
------------------------------------------ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 0 1rem;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--cond);
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.1;
}
.section-title .accent { color: var(--amber); }

.section-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.section-link {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--amber);
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 0.4rem;
  transition: opacity 0.15s;
}
.section-link:hover { opacity: 0.7; }

/* ------------------------------------------
   HERO
------------------------------------------ */
.hero {
  position: relative;
  padding: 3.5rem 1rem 2.5rem;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60%; height: 100%;
  background: radial-gradient(ellipse at top right, rgba(245,166,35,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245,166,35,0.1);
  border: 1px solid var(--border-amber);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--cond);
  font-weight: 900;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -1px;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}
.hero h1 .accent  { color: var(--amber); }
.hero h1 .outline {
  -webkit-text-stroke: 1.5px var(--text-muted);
  color: transparent;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 2rem;
  line-height: 1.75;
}

/* Hero stat grid */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
}
@media (min-width: 640px) {
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  background: var(--bg2);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: background 0.2s;
  cursor: default;
}
.stat-card:hover { background: var(--bg3); }

.stat-label {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-value {
  font-family: var(--cond);
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.5px;
}
.stat-value.amber  { color: var(--amber); }
.stat-value.red    { color: var(--red); }
.stat-value.green  { color: var(--green); }
.stat-value.blue   { color: var(--blue); }

.stat-change {
  font-family: var(--mono);
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-change.up      { color: var(--red); }
.stat-change.down    { color: var(--green); }
.stat-change.neutral { color: var(--text-dim); }

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ------------------------------------------
   BUTTONS
------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1;
}
.btn-amber {
  background: var(--amber);
  color: var(--bg);
}
.btn-amber:hover {
  background: var(--amber-light);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--bg3);
  border-color: rgba(255,255,255,0.14);
}
.btn-sm {
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
}

/* ------------------------------------------
   ALERT BOX
------------------------------------------ */
.alert-box {
  background: rgba(226,75,74,0.07);
  border: 1px solid rgba(226,75,74,0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.alert-box.warn {
  background: rgba(245,166,35,0.07);
  border-color: var(--border-amber);
}
.alert-box.info {
  background: rgba(74,158,232,0.07);
  border-color: rgba(74,158,232,0.25);
}
.alert-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.alert-content strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--red-light);
  margin-bottom: 2px;
}
.alert-box.warn .alert-content strong { color: var(--amber-light); }
.alert-box.info .alert-content strong { color: var(--blue); }
.alert-content span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ------------------------------------------
   CHART
------------------------------------------ */
.chart-container {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.chart-tabs {
  display: flex;
  gap: 0.2rem;
  margin-bottom: 1rem;
  background: var(--bg3);
  padding: 3px;
  border-radius: var(--radius-sm);
  width: fit-content;
}
.tab-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.35rem 0.8rem;
  border: none;
  background: none;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.5px;
}
.tab-btn.active {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.chart-legend {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.chart-wrap {
  position: relative;
  width: 100%;
  height: 280px;
}
@media (min-width: 768px) {
  .chart-wrap { height: 340px; }
}

/* ------------------------------------------
   RANKING / TABLE
------------------------------------------ */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.filter-btn {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.5px;
}
.filter-btn.active,
.filter-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(245,166,35,0.08);
}

.table-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
}

.station-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}
.station-table th {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: left;
  padding: 0.6rem 0.875rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.station-table th.right { text-align: right; }
.station-row {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}
.station-row:last-child { border-bottom: none; }
.station-row:hover { background: var(--bg3); }
.station-row td {
  padding: 0.875rem 0.875rem;
  font-size: 0.875rem;
  vertical-align: middle;
}

/* Rank */
.rank-badge {
  font-family: var(--cond);
  font-weight: 900;
  font-size: 1.15rem;
  width: 30px;
  text-align: center;
  display: inline-block;
}
.rank-1 { color: var(--red); }
.rank-2 { color: #F07040; }
.rank-3 { color: var(--amber); }
.rank-n  { color: var(--text-dim); }

/* Station cell */
.station-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.station-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Score bar */
.score-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}
.score-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--bg4);
  border-radius: 3px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.7s ease;
}
.score-val {
  font-family: var(--mono);
  font-size: 0.75rem;
  min-width: 28px;
  text-align: right;
}

/* Price cell */
.price-cell {
  font-family: var(--mono);
  font-size: 0.875rem;
  text-align: right;
  white-space: nowrap;
}
.price-above { color: var(--red-light); }
.price-below { color: var(--green-light); }
.price-avg   { color: var(--text); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--mono);
  font-size: 0.63rem;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.badge-red {
  background: rgba(226,75,74,0.12);
  border: 1px solid rgba(226,75,74,0.22);
  color: var(--red-light);
}
.badge-amber {
  background: rgba(245,166,35,0.1);
  border: 1px solid var(--border-amber);
  color: var(--amber-light);
}
.badge-green {
  background: rgba(61,186,126,0.08);
  border: 1px solid rgba(61,186,126,0.2);
  color: var(--green-light);
}
.badge-gray {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ------------------------------------------
   CARDS GRID
------------------------------------------ */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 640px) {
  .cards-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .cards-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.info-card {
  background: var(--bg2);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 0.2s;
}
.info-card:hover { background: var(--bg3); }

.info-card-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.icon-amber { background: rgba(245,166,35,0.12); }
.icon-red   { background: rgba(226,75,74,0.12); }
.icon-green { background: rgba(61,186,126,0.1); }
.icon-blue  { background: rgba(74,158,232,0.1); }

.info-card h3 {
  font-family: var(--cond);
  font-weight: 800;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.info-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.info-card p strong { color: var(--amber); font-weight: 600; }

/* ------------------------------------------
   METER (délai barre)
------------------------------------------ */
.meter-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
@media (min-width: 768px) {
  .meter-section { grid-template-columns: 1fr 1fr; }
}

.meter-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.meter-title {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.meter-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.meter-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.meter-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.meter-item-label { font-size: 0.8rem; color: var(--text-muted); }
.meter-item-val   { font-family: var(--mono); font-size: 0.8rem; }

/* ------------------------------------------
   FUEL AVERAGES ROW
------------------------------------------ */
.fuel-avg-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
}
@media (min-width: 500px) {
  .fuel-avg-row { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .fuel-avg-row { grid-template-columns: repeat(6, 1fr); }
}

.fuel-avg-card {
  background: var(--bg2);
  padding: 1rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: background 0.15s;
}
.fuel-avg-card:hover { background: var(--bg3); }
.fuel-avg-name {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.fuel-avg-price {
  font-family: var(--cond);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  color: var(--amber);
  line-height: 1.1;
}
.fuel-avg-count {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}
.fuel-avg-card.no-data .fuel-avg-price {
  color: var(--text-dim);
  font-size: 1.1rem;
}

/* ------------------------------------------
   ERROR / LOADING STATES
------------------------------------------ */
.state-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.state-box .state-icon { font-size: 2rem; }
.state-box h3 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
}
.state-box p { font-size: 0.875rem; color: var(--text-muted); max-width: 400px; }
.state-box code {
  font-family: var(--mono);
  font-size: 0.8rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--red-light);
  display: block;
  text-align: left;
  max-width: 100%;
  word-break: break-all;
}

/* Loading shimmer */
.shimmer {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ------------------------------------------
   DATA UPDATE BADGE
------------------------------------------ */
.update-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.update-info .sep { color: var(--border); }

/* ------------------------------------------
   FOOTER
------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1rem;
  margin-top: 2rem;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-brand-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.875rem;
  line-height: 1.65;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.875rem;
}
.footer-col a {
  display: block;
  font-size: 0.83rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.22rem 0;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-bottom p {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}
.footer-source {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}
.source-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}

/* ------------------------------------------
   RESPONSIVE MOBILE NAV
------------------------------------------ */
@media (max-width: 768px) {
  .burger { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 58px;
    left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    z-index: 300;
  }
  .main-nav.open { display: flex; }
  .main-nav a { text-align: center; padding: 0.65rem 1rem; }
  .main-nav a.nav-cta { margin-left: 0; margin-top: 0.25rem; }

  .hide-sm { display: none !important; }
}

/* ------------------------------------------
   ANIMATIONS
------------------------------------------ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim { animation: fadeUp 0.5s ease both; }
.d1   { animation-delay: 0.08s; }
.d2   { animation-delay: 0.16s; }
.d3   { animation-delay: 0.24s; }
.d4   { animation-delay: 0.32s; }

/* ------------------------------------------
   SCROLLBAR
------------------------------------------ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: var(--bg2); }
::-webkit-scrollbar-thumb  { background: var(--bg4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }





/* ------------------------------------------
   STATION LIST — sr-list
   Classement + index, mobile-first
------------------------------------------ */

.sr-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg2);
  overflow: hidden;
}

.sr-row {
  display: grid !important;
  grid-template-columns: 36px 1fr auto;
  align-items: start;
  gap: 0 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  text-decoration: none;
}
.sr-row:last-child { border-bottom: none; }
.sr-row:hover { background: var(--bg3); }

/* Rang */
.sr-rank {
  font-family: var(--cond);
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--text-dim);
  text-align: center;
  padding-top: 2px;
  line-height: 1;
}
.sr-rank-1 { color: var(--red); }
.sr-rank-2 { color: #F07040; }
.sr-rank-3 { color: var(--amber); }

/* Corps */
.sr-body { min-width: 0; }

.sr-name {
  font-family: var(--body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sr-name a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sr-name a:hover { color: var(--amber); }

.sr-tag {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 20px;
  white-space: nowrap;
}
.sr-tag-red   { background: rgba(226,75,74,0.12);  color: var(--red-light);    border: 1px solid rgba(226,75,74,0.25); }
.sr-tag-amber { background: rgba(245,166,35,0.1);  color: var(--amber-light);  border: 1px solid var(--border-amber); }
.sr-tag-gray  { background: rgba(255,255,255,0.04); color: var(--text-muted);  border: 1px solid var(--border); }

.sr-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Badges carburants */
.sr-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.srb {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg3);
  white-space: nowrap;
}
.srb-above {
  border-color: var(--red);
  background: rgba(226,75,74,0.08);
}
.srb-below {
  border-color: var(--green);
  background: rgba(61,186,126,0.08);
}
.srb-highlight {
  border-color: var(--amber) !important;
  border-width: 1.5px;
}

.srb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.srb-name {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.srb-price {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
}
.srb-above .srb-price { color: var(--red-light); }
.srb-below .srb-price { color: var(--green-light); }

.srb-ecart {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}
.srb-above .srb-ecart { color: var(--red); }
.srb-below .srb-ecart { color: var(--green); }

/* Score droite */
.sr-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding-top: 2px;
}
.sr-score-num {
  font-family: var(--cond);
  font-weight: 900;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.5px;
}
.sr-score-bar {
  width: 52px;
  height: 3px;
  background: var(--bg4);
  border-radius: 2px;
  overflow: hidden;
}
.sr-score-fill {
  height: 100%;
  border-radius: 2px;
}

/* Filtre select */
.filter-select {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg2);
  color: var(--text-muted);
  cursor: pointer;
  max-width: 220px;
  transition: border-color 0.15s;
}
.filter-select:hover { border-color: var(--amber); color: var(--text); }

/* Mobile */
@media (max-width: 600px) {
  .sr-row {
    grid-template-columns: 28px 1fr auto;
    gap: 0 10px;
    padding: 12px 14px;
  }
  .sr-rank { font-size: 0.95rem; }
  .sr-score-num { font-size: 1.3rem; }
  .sr-score-bar { width: 40px; }
  .srb-ecart { display: none; }
  .srb:nth-child(n+4) { display: none; }
}

@media (max-width: 380px) {
  .sr-tag { display: none; }
  .srb:nth-child(n+3) { display: none; }
}

/* -- Onglets carburants nearby -- */
.nearby-fuel-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: .85rem;
}

.nearby-fuel-tab {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.nearby-fuel-tab:hover {
  border-color: var(--fc);
  color: var(--fc);
}
.nearby-fuel-tab.active {
  background: color-mix(in srgb, var(--fc) 15%, transparent);
  border-color: var(--fc);
  color: var(--fc);
}

/* Badge rang */
.nearby-rank-badge {
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid transparent;
  display: inline-block;
}

/* Date màj dans carte nearby */
.nearby-card-maj {
  display: block;
  font-size: .64rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Ajuster la colonne droite pour empiler proprement */
.nearby-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

/* -- Carte améliorée -- */
#station-map {
  height: 300px;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
@media (min-width: 640px) { #station-map { height: 360px; } }

/* Tuiles légèrement assombries */
#station-map .leaflet-tile {
  filter: brightness(0.88) saturate(0.75) contrast(0.95);
}

/* -- Boutons navigation -- */
.map-nav-btns {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}
.map-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: .5rem .9rem;
  border-radius: 30px;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: transform .12s, box-shadow .12s, border-color .15s;
  white-space: nowrap;
}
.map-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.map-nav-gmaps {
  background: #fff;
  color: #222;
  border-color: rgba(255,255,255,.15);
}
.map-nav-gmaps:hover { border-color: #EA4335; }

.map-nav-waze {
  background: #33CCFF;
  color: #1a1a1a;
  border-color: transparent;
}
.map-nav-apple {
  background: #1c1c1e;
  color: #fff;
  border-color: rgba(255,255,255,.12);
}
.map-nav-apple:hover { border-color: rgba(255,255,255,.35); }

/* -- Pin marqueur pompe -- */
.pm-map-pin {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pm-map-pin-body {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0,0,0,.4);
  border: 2px solid rgba(255,255,255,.8);
}
.pm-map-pin-body svg {
  transform: rotate(45deg);
}
.pm-map-pin-tip {
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 10px solid transparent; /* couleur injectée inline */
  margin-top: -2px;
}
.pm-map-pin-shadow {
  width: 10px; height: 4px;
  border-radius: 50%;
  background: rgba(0,0,0,.25);
  margin-top: 2px;
  filter: blur(2px);
}

/* -- Popup Leaflet custom -- */
.pm-leaflet-popup .leaflet-popup-content-wrapper {
  background: var(--bg2, #1e1f1c) !important;
  border: 1px solid var(--border, rgba(255,255,255,.1)) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 28px rgba(0,0,0,.55) !important;
  padding: 0 !important;
  color: var(--text, #eee) !important;
}
.pm-leaflet-popup .leaflet-popup-content {
  margin: 0 !important;
  padding: 0 !important;
}
.pm-leaflet-popup .leaflet-popup-tip-container { display: none !important; }
.pm-leaflet-popup .leaflet-popup-close-button {
  color: var(--text-muted, #888) !important;
  top: 6px !important; right: 8px !important;
  font-size: 1rem !important;
}

/* -- Contenu popup -- */
.pm-pin-popup {
  padding: .85rem 1rem;
  min-width: 200px;
  font-family: var(--body, sans-serif);
}
.pm-pin-popup-sm { min-width: 160px; }

.pm-pin-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}
.pm-pin-popup-score {
  font-family: var(--mono, monospace);
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.pm-pin-popup-addr {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text, #eee);
  margin-bottom: 2px;
  line-height: 1.3;
}
.pm-pin-popup-city {
  font-size: .75rem;
  color: var(--text-muted, #888);
  margin-bottom: .65rem;
}

.pm-pin-popup-fuels {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: .75rem;
}
.pm-pin-popup-fuel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.pm-pin-popup-fuel:last-child { border-bottom: none; }
.pm-pin-popup-badge {
  font-family: var(--mono, monospace);
  font-size: .63rem;
  font-weight: 700;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 40px;
  text-align: center;
}
.pm-pin-popup-price {
  font-family: var(--mono, monospace);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text, #eee);
}
.pm-pin-popup-price em {
  font-style: normal;
  font-size: .67rem;
  color: var(--text-muted, #888);
}

.pm-pin-popup-actions {
  display: flex;
  gap: 5px;
  margin-top: .1rem;
}
.pm-pin-nav-btn {
  flex: 1;
  text-align: center;
  padding: .38rem .5rem;
  border-radius: 7px;
  font-size: .72rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .15s;
}
.pm-pin-nav-btn:hover { opacity: .85; }
.pm-pin-nav-g {
  background: #fff;
  color: #222;
}
.pm-pin-nav-w {
  background: #33CCFF;
  color: #1a1a1a;
}