/* ═══════════════════════════════════════════════════════════
   PRIXCARBURANT — STYLESHEET v3
   Mobile-first · Features: bottom nav, price pulse, swipe cards,
   GPS-first UX, fuel calculator, dark bargain scanner
   ═══════════════════════════════════════════════════════════ */

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

/* ════════════════ DESIGN TOKENS ════════════════ */
:root {
  --bg:           #070a0f;
  --surface:      #0c1017;
  --card:         #101520;
  --card2:        #151c28;
  --card-hover:   #18202e;
  --border:       rgba(255,255,255,0.06);
  --border-md:    rgba(255,255,255,0.12);
  --border-strong:rgba(255,255,255,0.2);

  --amber:        #f0a500;
  --amber2:       #ffc840;
  --amber-dim:    rgba(240,165,0,0.10);
  --amber-glow:   rgba(240,165,0,0.25);

  --green:        #22d3a0;
  --green-dim:    rgba(34,211,160,0.10);
  --red:          #f56565;
  --red-dim:      rgba(245,101,101,0.10);
  --blue:         #5b9cf6;
  --purple:       #a78bfa;
  --pink:         #f472b6;
  --cyan:         #22d3ee;
  --yellow:       #facc15;

  --text:         #dde4f0;
  --text-sm:      #a8b3c8;
  --muted:        #5c6880;
  --subtle:       #252d3d;

  --radius:       14px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --max-w:        1260px;

  --font:         'Instrument Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-display: 'Syne', sans-serif;

  --transition:   .18s cubic-bezier(.4,0,.2,1);
  --transition-spring: .35s cubic-bezier(.34,1.56,.64,1);

  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left, 0px);
  --safe-right:  env(safe-area-inset-right, 0px);

  /* Bottom nav height */
  --bottom-nav-h: 64px;
}

/* ════════════════ LIGHT MODE ════════════════ */
body.light {
  --bg:           #f5f3ee;
  --surface:      #ede9e0;
  --card:         #faf8f4;
  --card2:        #f0ede6;
  --card-hover:   #fff;
  --border:       rgba(0,0,0,0.07);
  --border-md:    rgba(0,0,0,0.13);
  --border-strong:rgba(0,0,0,0.22);
  --text:         #1a1f2e;
  --text-sm:      #3a4255;
  --muted:        #7a8296;
  --subtle:       #d8d3c8;
  --amber-dim:    rgba(240,165,0,0.12);
  --amber-glow:   rgba(240,165,0,0.2);
  --green-dim:    rgba(34,211,160,0.12);
  --red-dim:      rgba(245,101,101,0.12);
}

/* ════════════════ BASE ════════════════ */
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
::selection { background: rgba(240,165,0,0.25); color: var(--text); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  width: 100%;
  line-height: 1.5;
  transition: background var(--transition), color var(--transition);
  -webkit-text-size-adjust: 100%;
  /* Space for bottom nav — always shown */
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 8px);
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 5% 0%, rgba(240,165,0,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 95% 100%, rgba(91,156,246,0.04) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}

/* ════════════════ LOADING OVERLAY ════════════════ */
#loading-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(7,10,15,0.88);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity .3s;
}
#loading-overlay.active { display: flex; }
.lo-inner { text-align: center; }
.lo-pump {
  font-size: 52px;
  animation: pump 1.4s ease-in-out infinite;
  display: block;
  margin-bottom: 20px;
}
@keyframes pump { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }
.lo-bar {
  width: 200px; height: 3px;
  background: var(--border-md);
  border-radius: 999px;
  margin: 0 auto 14px;
  overflow: hidden;
}
.lo-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--amber2));
  border-radius: 999px;
  animation: load-bar 1.8s ease-in-out infinite;
}
@keyframes load-bar { 0%{width:0%} 60%{width:100%} 100%{width:100%;opacity:0} }
.lo-text { font-size: 13px; color: var(--text-sm); letter-spacing: .04em; }

/* ════════════════ TOPBAR ════════════════ */
#topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,10,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  padding-left: calc(16px + var(--safe-left));
  padding-right: calc(16px + var(--safe-right));
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background var(--transition);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
body.light #topbar { background: rgba(245,243,238,0.92); }
#topbar.scrolled {
  background: rgba(7,10,15,0.96);
  box-shadow: 0 2px 24px rgba(0,0,0,0.35);
  border-bottom-color: rgba(255,255,255,0.08);
}
body.light #topbar.scrolled { background: rgba(245,243,238,0.98); }

.topbar-brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text);
  flex-shrink: 0;
  min-width: 0;
}
.topbar-logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--amber), #c97f00);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 18px var(--amber-glow);
  flex-shrink: 0;
}
.topbar-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
}
.topbar-name em { color: var(--amber); font-style: normal; }

.topbar-right {
  display: flex; align-items: center; gap: 5px;
  flex-shrink: 0;
  overflow: visible;
}

/* Sur mobile : cacher les labels texte des pills pour gagner de la place */
@media (max-width: 480px) {
  .topbar-right { gap: 4px; }
  /* Cacher les textes des pills sur mobile sauf le compteur favoris */
  .tb-pill-text { display: none; }
  #fav-count { display: inline; } /* garder le compteur visible */
  .tb-pill { padding: 5px 8px; min-height: 32px; min-width: 32px; justify-content: center; }
  /* Cacher Live pill sur mobile */
  .live-pill { display: none; }
  /* Cacher le bouton Partager */
  #share-btn { display: none; }
}

.tb-pill {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sm);
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  font-family: var(--font);
  white-space: nowrap;
  min-height: 34px;
}
.tb-pill:hover { border-color: var(--border-md); color: var(--text); background: rgba(255,255,255,0.06); }

.live-pill { cursor: default; }
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  display: inline-block;
  animation: livepulse 2.2s ease infinite;
  flex-shrink: 0;
}
@keyframes livepulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(0.85)} }

.fav-pill { position: relative; }
.fav-pill:hover { border-color: rgba(240,165,0,.3); color: var(--amber); }

/* Auth btn — état connecté */
#auth-btn.is-logged {
  border-color: rgba(240,165,0,0.35);
  background: var(--amber-dim);
}
#auth-btn.is-logged:hover { background: rgba(240,165,0,0.15); }

/* ════════════════ HERO ════════════════ */
#hero {
  position: relative; z-index: 1;
  padding: 44px 16px 44px;
  padding-left: max(16px, var(--safe-left));
  padding-right: max(16px, var(--safe-right));
  background: linear-gradient(180deg, var(--surface) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}
#hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 15% 40%, rgba(240,165,0,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 60%, rgba(34,211,160,0.03) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 2; max-width: var(--max-w); margin: 0 auto; width: 100%; }
.hero-deco {
  position: absolute;
  right: -20px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(80px, 16vw, 240px);
  font-weight: 800;
  color: rgba(240,165,0,0.03);
  pointer-events: none; user-select: none;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.05em;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--amber-dim);
  border: 1px solid rgba(240,165,0,0.25);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 11px; font-weight: 700;
  color: var(--amber);
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 20px;
  max-width: 100%;
  animation: eyebrow-in 0.6s ease both;
}
@keyframes eyebrow-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 7vw, 92px);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.01em;
  margin-bottom: 18px;
  animation: title-in 0.7s 0.1s ease both;
}
@keyframes title-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-title .hl {
  color: var(--amber);
  text-shadow: 0 0 80px rgba(240,165,0,0.35), 0 0 30px rgba(240,165,0,0.2);
  position: relative;
  display: inline-block;
}
.hero-title .hl::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--amber), var(--amber2));
  border-radius: 2px;
  opacity: 0.5;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-sm);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 30px;
  animation: sub-in 0.7s 0.2s ease both;
}
@keyframes sub-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── HERO SPLIT LAYOUT ── */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: stretch;
  max-width: var(--max-w);
}

/* ── TRUST PANEL ── */
.hero-trust {
  background: var(--card);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.hero-trust:hover {
  border-color: rgba(240,165,0,0.2);
  box-shadow: 0 4px 32px rgba(240,165,0,0.05);
}
.hero-trust::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--amber), var(--green), var(--blue));
  opacity: 0.7;
}

.ht-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.ht-stat {
  background: var(--card2);
  padding: 14px 12px;
  text-align: center;
  transition: background var(--transition);
}
.ht-stat:hover { background: var(--card-hover); }
.ht-stat-val {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--amber);
  line-height: 1;
  letter-spacing: .02em;
}
.ht-stat-plus { font-size: 16px; opacity: 0.7; }
.ht-stat-lbl {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 5px;
  font-weight: 600;
}

.ht-args { display: flex; flex-direction: column; gap: 12px; }
.ht-arg { display: flex; align-items: flex-start; gap: 12px; }
.ht-arg-icon {
  width: 36px; height: 36px;
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}
.ht-arg:hover .ht-arg-icon {
  background: var(--amber-dim);
  border-color: rgba(240,165,0,0.3);
}
.ht-arg-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.ht-arg-desc { font-size: 11px; color: var(--muted); line-height: 1.5; }

.ht-flags {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.ht-flag-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: default;
  transition: all var(--transition);
}
.ht-flag-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-md);
  transform: translateY(-2px);
}
.ht-flag-emoji {
  font-size: 24px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.ht-flag-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sm);
  letter-spacing: .02em;
}
.ht-flag-source {
  font-size: 9px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ht-flag-sep {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  flex-shrink: 0;
  display: none;
}

@media (max-width: 960px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-trust { display: none; }
}
@media (min-width: 961px) and (max-width: 1100px) {
  .hero-split { grid-template-columns: 1fr 280px; }
}

/* ── SEARCH FORM ── */
#search-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative; z-index: 2;
  transition: border-color var(--transition);
}
#search-form:focus-within { border-color: rgba(240,165,0,0.25); }

.sf-country-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.sf-section-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.sf-country-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.country-pill {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-md);
  border-radius: 14px;
  padding: 8px 16px 8px 10px;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
  overflow: hidden;
}
.country-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}
.country-pill:hover::before { opacity: 1; }
.country-pill:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.country-pill.active {
  background: linear-gradient(135deg, rgba(240,165,0,0.12) 0%, rgba(240,165,0,0.06) 100%);
  border-color: rgba(240,165,0,0.45);
  box-shadow: 0 0 0 1px rgba(240,165,0,0.15), 0 4px 20px rgba(240,165,0,0.1);
}

.cpill-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px; /* Espace entre le drapeau et le texte */
  font-weight: 500;
}
.cpill-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sm);
  transition: color var(--transition);
  letter-spacing: .01em;
}
.country-pill.active .cpill-name { color: var(--amber); }
.country-pill:hover .cpill-name { color: var(--text); }

.cpill-currency {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--muted);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  letter-spacing: .04em;
  transition: all var(--transition);
}
.country-pill.active .cpill-currency {
  background: rgba(240,165,0,0.12);
  border-color: rgba(240,165,0,0.3);
  color: var(--amber);
}

@media (max-width: 480px) {
  .country-pill { padding: 7px 12px 7px 8px; gap: 7px; min-height: 40px; }
  .cpill-flag { font-size: 20px; }
  .cpill-currency { display: none; }
}

.sf-fields-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.sf-fields-row .sf-field { flex: 1; min-width: 0; }
.sf-fields-row .sf-field--location { flex: 1.4; }

.sf-bottom-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.sf-filters { display: flex; gap: 10px; flex: 1; }
.sf-filters .sf-field { flex: 1; min-width: 90px; }

.sf-optional {
  font-weight: 400; text-transform: none; letter-spacing: 0;
  color: var(--muted); font-size: 9px;
}

/* ── FEATURES STRIP (above search tip) ── */
.sf-features-strip {
  display: flex;
  align-items: center;
  gap: 0;
  background: linear-gradient(135deg, rgba(240,165,0,0.06) 0%, rgba(34,211,160,0.04) 100%);
  border: 1px solid rgba(240,165,0,0.15);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  flex-wrap: wrap;
  row-gap: 8px;
}
.sf-feat {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 130px;
}
.sf-feat-icon {
  font-size: 15px;
  flex-shrink: 0;
  line-height: 1;
}
.sf-feat-text {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
}
.sf-feat-text strong {
  font-weight: 700;
  color: var(--amber);
}
.sf-feat-sub {
  color: var(--muted);
  font-size: 11px;
}
.sf-feat-sep {
  width: 1px;
  height: 22px;
  background: var(--border-md);
  flex-shrink: 0;
  margin: 0 10px;
}
body.light .sf-features-strip {
  background: linear-gradient(135deg, rgba(240,165,0,0.08) 0%, rgba(34,211,160,0.05) 100%);
  border-color: rgba(240,165,0,0.2);
}
@media (max-width: 600px) {
  .sf-features-strip { gap: 0; }
  .sf-feat-sep { display: none; }
  .sf-feat { min-width: calc(50% - 8px); }
  .sf-feat-sub { display: none; }
}

.sf-search-tip {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(91,156,246,0.06);
  border: 1px solid rgba(91,156,246,0.15);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px; color: var(--text-sm); line-height: 1.55;
}
.sf-search-tip svg { color: var(--blue); flex-shrink: 0; margin-top: 1px; }
body.light .sf-search-tip {
  background: rgba(91,156,246,0.07); border-color: rgba(91,156,246,0.2);
}

.sf-field { display: flex; flex-direction: column; position: relative; }
.sf-field--sm { flex: 0; min-width: 95px; }

.sf-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: .10em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 7px;
  display: flex; align-items: center; gap: 4px;
}

.sf-inner {
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  display: flex; align-items: center; gap: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
}
.sf-inner:focus-within {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-dim);
}
body.light .sf-inner { background: rgba(0,0,0,0.03); }

.sf-inner input, .sf-inner select {
  background: transparent; border: none;
  font-size: max(16px, 14px); color: var(--text);
  outline: none; width: 100%;
  font-family: var(--font); cursor: pointer;
}
.sf-inner select { border-bottom: none; box-shadow: none; }
.sf-inner select option { background: var(--card2); }

.cp-error { font-size: 11px; color: var(--red); margin-top: 5px; display: none; }

#btn-search {
  background: linear-gradient(135deg, var(--amber), #c97f00);
  color: #06080c;
  font-family: var(--font);
  font-weight: 700; font-size: 14px;
  border: none; border-radius: var(--radius-sm);
  padding: 12px 24px;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 24px var(--amber-glow);
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  flex-shrink: 0;
  position: relative; overflow: hidden;
  min-height: 46px;
  align-self: flex-end;
}
#btn-search::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
}
#btn-search:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(240,165,0,0.4); }
#btn-search:hover::after { background: rgba(255,255,255,0.08); }
#btn-search:active { transform: translateY(0); }
#btn-search:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ─ GPS BUTTON ─ */
#btn-gps {
  background: rgba(34,211,160,0.12);
  border: 1px solid rgba(34,211,160,0.3);
  border-radius: var(--radius-sm);
  color: var(--green);
  font-size: 12px; font-weight: 700;
  font-family: var(--font);
  padding: 8px 14px;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all var(--transition);
  min-height: 38px;
  white-space: nowrap;
}
#btn-gps:hover { background: rgba(34,211,160,0.2); transform: translateY(-1px); }
#btn-gps.locating { animation: gps-pulse 1s ease infinite; }
@keyframes gps-pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ── AUTOCOMPLETE ── */
.autocomplete-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--card2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm);
  overflow: hidden;
  z-index: 200;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  max-height: 220px;
  overflow-y: auto;
}
.autocomplete-list.open { display: block; animation: fadeIn .15s ease; }
.autocomplete-item {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-sm);
  transition: background var(--transition), color var(--transition);
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.selected {
  background: var(--card-hover); color: var(--text);
}
.autocomplete-item strong { color: var(--text); }
.ac-flag { font-size: 14px; flex-shrink: 0; }
.ac-cp { font-size: 11px; color: var(--muted); margin-left: auto; font-family: var(--font-mono); }

/* ── COUNTRY BANNER ── */
.country-banner {
  margin-top: 12px; padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px; line-height: 1.6;
  display: flex; align-items: flex-start; gap: 8px;
}
.country-banner.info {
  background: rgba(91,156,246,0.08);
  border: 1px solid rgba(91,156,246,0.2);
  color: var(--blue);
}
.country-banner.warning {
  background: rgba(240,165,0,0.08);
  border: 1px solid rgba(240,165,0,0.2);
  color: var(--amber);
}

/* ── RECENT SEARCHES ── */
.recent-searches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.recent-chip {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 12px 4px 10px;
  font-size: 12px; color: var(--text-sm);
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: border-color var(--transition), color var(--transition);
}
.recent-chip:hover { border-color: var(--border-md); color: var(--text); }
.recent-chip .rc-label { font-weight: 600; }
.recent-chip .rc-del { opacity: 0; color: var(--red); font-size: 14px; line-height: 1; transition: opacity var(--transition); }
.recent-chip:hover .rc-del { opacity: 1; }

/* ════════════════ KPI BAR ════════════════ */
#kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
  position: relative; z-index: 1;
}
.kpi-item {
  background: var(--surface);
  padding: 16px 12px;
  text-align: center;
  border-right: 1px solid var(--border);
  transition: background var(--transition);
  position: relative; overflow: hidden;
}
.kpi-item:last-child { border-right: none; }
.kpi-item::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px; background: var(--amber);
  transition: width .3s ease;
}
.kpi-item:hover { background: var(--card); }
.kpi-item:hover::after { width: 60%; }
.kpi-val {
  font-family: var(--font-display);
  font-size: clamp(18px, 3.5vw, 32px);
  font-weight: 700;
  letter-spacing: .02em; line-height: 1;
  transition: transform .2s;
}
.kpi-item:hover .kpi-val { transform: scale(1.04); }
.kpi-lbl { font-size: 9px; color: var(--muted); margin-top: 5px; text-transform: uppercase; letter-spacing: .06em; }

/* ════════════════ MAIN LAYOUT ════════════════ */
#main {
  max-width: var(--max-w); margin: 0 auto;
  padding: 24px 16px 80px;
  padding-left: max(16px, var(--safe-left));
  padding-right: max(16px, var(--safe-right));
  padding-bottom: max(80px, calc(80px + var(--safe-bottom)));
  position: relative; z-index: 1;
  width: 100%;
  box-sizing: border-box;
}

/* ════════════════ PANELS (chart, compare) ════════════════ */
#chart-panel, #compare-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  margin-bottom: 20px;
  display: none;
}
#chart-panel.visible, #compare-panel.visible { display: block; animation: fadeIn .3s ease; }

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; flex-wrap: wrap; gap: 10px;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700; letter-spacing: .02em;
}
.panel-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

.chart-tabs {
  display: flex; gap: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 4px;
}
.chart-tab {
  padding: 5px 12px; border-radius: 7px;
  font-size: 11px; font-weight: 600;
  cursor: pointer; border: none;
  color: var(--muted); background: transparent;
  font-family: var(--font);
  transition: all var(--transition);
  min-height: 30px;
}
.chart-tab.active { background: var(--card2); color: var(--text); }

.chart-wrap { height: 220px; position: relative; }

.fuel-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.fl-pill {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 11px;
  font-size: 11px; font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.fl-pill:hover { background: rgba(255,255,255,0.06); border-color: var(--border-md); }
.fl-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── COMPARE TABLE ── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
.compare-table th {
  text-align: left; padding: 8px 12px;
  font-size: 10px; font-weight: 700; color: var(--muted);
  letter-spacing: .07em; text-transform: uppercase;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.compare-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: rgba(255,255,255,0.02); }
.ct-best { color: var(--green); font-weight: 700; }
.ct-rank { font-family: var(--font-display); font-size: 16px; color: var(--subtle); }

/* ════════════════ RESULTS HEADER ════════════════ */
.rh {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.rh-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; letter-spacing: .02em;
}
.rh-title span { color: var(--amber); }
.rh-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.rh-controls { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.filter-bar {
  display: flex; gap: 3px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px;
}
.filter-btn {
  background: transparent; border: none;
  border-radius: 999px; padding: 5px 11px;
  font-size: 11px; font-weight: 600;
  color: var(--muted); cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
  min-height: 30px;
}
.filter-btn.active { background: var(--card2); color: var(--text); }

.sort-btns { display: flex; gap: 3px; }
.sort-btn {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 11px;
  font-size: 11px; font-weight: 600; color: var(--muted);
  cursor: pointer; font-family: var(--font);
  transition: all var(--transition);
  min-height: 30px;
}
.sort-btn.active { background: var(--amber-dim); border-color: rgba(240,165,0,.3); color: var(--amber); }

.toggle-btn {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 11px;
  font-size: 11px; font-weight: 600; color: var(--text-sm);
  cursor: pointer; font-family: var(--font);
  transition: all var(--transition);
  display: flex; align-items: center; gap: 5px;
  min-height: 30px;
}
.toggle-btn:hover { border-color: var(--border-md); color: var(--text); }
.toggle-btn.active { background: var(--amber-dim); border-color: rgba(240,165,0,.3); color: var(--amber); }

/* ════════════════ STATION CARDS ════════════════ */
#results-wrap { display: grid; grid-template-columns: 1fr; gap: 12px; }

.station-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  animation: slideUp .4s cubic-bezier(.2,.8,.4,1) both;
  will-change: transform;
  /* Swipe interaction hint */
  position: relative;
}
.station-card:hover {
  border-color: var(--border-md);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.station-card.best {
  border-color: rgba(240,165,0,.22);
  box-shadow: 0 0 0 1px rgba(240,165,0,0.05);
}
.station-card.best .card-top {
  background: linear-gradient(135deg, rgba(240,165,0,0.05) 0%, transparent 60%);
}

/* Price pulse animation for real-time updates */
.station-card.price-updated .card-top { animation: price-pulse .6s ease; }
@keyframes price-pulse {
  0%  { background: rgba(34,211,160,0.15); }
  100%{ background: transparent; }
}

.card-country-flag { font-size: 14px; flex-shrink: 0; margin-left: auto; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.card-top {
  padding: 14px 16px 12px;
  display: flex; align-items: flex-start; gap: 12px;
  flex-wrap: nowrap;
}

.card-rank {
  font-family: var(--font-display);
  font-size: 36px; line-height: 1;
  color: var(--subtle); min-width: 32px;
  font-weight: 800; flex-shrink: 0;
  transition: color var(--transition);
}
.card-rank.gold { color: var(--amber); text-shadow: 0 0 20px var(--amber-glow); }

.card-info { flex: 1; min-width: 0; }
.card-name {
  font-weight: 700; font-size: 15px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  letter-spacing: .04em; text-transform: uppercase;
  flex-shrink: 0;
}
.badge-best { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(240,165,0,.22); }
.badge-open { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,211,160,.22); }
.badge-brand { background: rgba(255,255,255,0.05); color: var(--text-sm); border: 1px solid var(--border); font-weight: 600; }

.card-addr { font-size: 12px; color: var(--text-sm); }
.card-dist { font-size: 11px; color: var(--muted); margin-top: 2px; }

.card-actions {
  display: flex; gap: 5px; margin-left: auto; flex-shrink: 0; align-items: flex-start;
}
.icon-btn {
  min-width: 34px; height: 34px;
  padding: 0 9px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600;
  font-family: var(--font);
  transition: all var(--transition);
  white-space: nowrap;
  min-height: 34px;
}
.icon-btn:hover { border-color: var(--border-md); color: var(--text); background: rgba(255,255,255,0.06); }
.icon-btn.active { color: var(--amber); border-color: rgba(240,165,0,.3); background: var(--amber-dim); }

.card-divider { height: 1px; background: var(--border); margin: 0 16px; }
.card-body { padding: 14px 16px; }

/* ── PRICE GRID ── */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 7px; margin-bottom: 12px;
}
.price-chip {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 5px; text-align: center;
  cursor: default;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.price-chip.highlight {
  background: var(--green-dim);
  border-color: rgba(34,211,160,.22);
}
.price-chip:hover { transform: scale(1.02); border-color: var(--border-md); }

.pc-fuel {
  font-size: 9px; color: var(--muted); letter-spacing: .07em; text-transform: uppercase;
  margin-bottom: 4px; display: flex; align-items: center; justify-content: center; gap: 3px;
}
.pc-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.pc-val { font-family: var(--font-mono); font-size: 14px; font-weight: 500; line-height: 1; }
.pc-val.green { color: var(--green); }
.pc-unit { font-size: 9px; opacity: .7; }
.pc-trend { font-size: 8px; margin-top: 3px; color: var(--muted); }
.pc-trend.down { color: var(--green); }
.pc-trend.up   { color: var(--red); }

/* ── BEST PRICE ROW ── */
.best-row {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.025); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px; margin-bottom: 10px; flex-wrap: wrap; gap: 6px;
}
.br-left { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.br-price { font-family: var(--font-mono); font-size: 17px; font-weight: 500; color: var(--green); }
.br-fuel  { font-size: 11px; color: var(--muted); margin-left: 5px; }

/* ── SAVINGS ── */
.savings-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-sm); margin-bottom: 10px;
}
.savings-badge {
  background: var(--green-dim); border: 1px solid rgba(34,211,160,.2);
  color: var(--green); font-weight: 700;
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
}

/* ── TOGGLE ROW ── */
.toggle-row { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap; }

/* ── PANELS IN CARD ── */
.panel {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; margin-bottom: 10px;
  display: none;
}
.panel.open { display: block; animation: fadeIn .2s ease; }
.panel-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
  letter-spacing: .05em; text-transform: uppercase;
}

/* ── HISTORY MINI CHART ── */
.mini-chart-wrap { height: 120px; position: relative; margin-bottom: 10px; }
.hist-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.hs-item { background: var(--surface); border-radius: var(--radius-sm); padding: 7px; text-align: center; }
.hs-lbl { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.hs-val { font-family: var(--font-mono); font-size: 12px; margin-top: 2px; }

/* ── SERVICES ── */
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0; }
.service-tag {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 20px;
  font-size: 11px; color: var(--text-sm);
  display: inline-flex; align-items: center; gap: 4px;
}
.srv-empty { color: var(--muted); font-size: 12px; padding: 6px 0; }

.srv-horaires {
  width: 100%; margin-top: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.srv-hor-title {
  font-size: 11px; font-weight: 600; color: var(--text-sm);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px;
}
.srv-hor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 4px;
}
.srv-hor-row {
  font-size: 11px; color: var(--text);
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.04);
  border-radius: 4px; padding: 3px 6px;
}

/* ── MAP LINK ── */
.map-preview {
  width: 100%; height: 72px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; text-decoration: none; color: var(--text-sm);
  font-size: 12px; font-weight: 600; gap: 6px;
  transition: background var(--transition), border-color var(--transition);
  margin-bottom: 8px;
}
.map-preview:hover { background: var(--card-hover); border-color: var(--border-md); }

/* ════════════════ EMPTY STATES ════════════════ */
.empty-state {
  text-align: center; padding: 60px 20px;
  background: var(--card); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.es-icon { font-size: 48px; margin-bottom: 16px; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.empty-state h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: .02em; margin-bottom: 10px; }
.empty-state p { color: var(--text-sm); font-size: 14px; line-height: 1.7; }
.es-flags { display: flex; justify-content: center; gap: 12px; margin: 20px 0; font-size: 28px; }
.es-tips { margin-top: 16px; }
.es-tip {
  display: inline-block;
  background: var(--amber-dim); border: 1px solid rgba(240,165,0,.15);
  border-radius: 999px; padding: 6px 14px;
  font-size: 12px; color: var(--amber);
}

/* ════════════════ LOAD MORE ════════════════ */
.load-more-btn {
  background: var(--card); border: 1px solid var(--border);
  color: var(--text-sm); font-family: var(--font);
  font-size: 13px; font-weight: 600;
  padding: 12px 28px; border-radius: 999px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  transition: all var(--transition);
  min-height: 44px;
}
.load-more-btn:hover { border-color: var(--border-md); color: var(--text); background: var(--card2); }

/* ════════════════ SPINNER ════════════════ */
.spinner-wrap { text-align: center; padding: 60px; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--amber);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════ TOAST ════════════════ */
#toast {
  position: fixed;
  bottom: max(calc(var(--bottom-nav-h) + 16px), calc(var(--bottom-nav-h) + 16px + var(--safe-bottom)));
  left: 50%; transform: translateX(-50%) translateY(16px);
  background: rgba(21,28,40,0.96);
  border: 1px solid var(--border-md);
  border-radius: 14px; padding: 12px 22px;
  font-size: 13px; font-weight: 600; color: var(--text);
  box-shadow: 0 8px 40px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  opacity: 0; transition: opacity .22s ease, transform .22s ease;
  pointer-events: none; z-index: 9999;
  white-space: nowrap; max-width: calc(100vw - 40px);
  text-align: center;
  display: flex; align-items: center; gap: 8px; justify-content: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
body.light #toast { background: rgba(255,255,255,0.96); color: #1a1f2e; }

@media (min-width: 769px) {
  #toast { bottom: max(28px, calc(28px + var(--safe-bottom))); }
}

/* ════════════════ FOOTER ════════════════ */
footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  position: relative; z-index: 1;
}

.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 28px 16px 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-title { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: .01em; }
.footer-title em { color: var(--amber); font-style: normal; }
.footer-sub { font-size: 12px; color: var(--text-sm); margin-top: 5px; line-height: 1.6; }
.footer-copy { font-size: 10px; color: var(--muted); margin-top: 6px; letter-spacing: 0.03em; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a {
  font-size: 12px; color: var(--muted); text-decoration: none;
  transition: color var(--transition);
  padding: 4px 0;
  position: relative;
}
.footer-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 100%;
  height: 1px; background: var(--amber);
  transition: right var(--transition);
}
.footer-links a:hover { color: var(--amber); }
.footer-links a:hover::after { right: 0; }

/* ════════════════ MAP PANEL ════════════════ */
#map-panel {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 auto 28px;
  max-width: var(--max-w);
  padding: 0 20px 20px;
}
#map-panel.visible { display: block; }
#map-panel .panel-header { padding: 20px 0 16px; }

#leaflet-map {
  width: 100%;
  height: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  z-index: 1;
}
@media (max-width: 600px) { #leaflet-map { height: 280px; } }

.map-style-btns {
  display: flex; gap: 4px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 3px;
}
.map-style-btn {
  background: none; border: none;
  border-radius: 6px; padding: 5px 8px;
  font-size: 16px; cursor: pointer;
  transition: all 0.15s; opacity: 0.5;
}
.map-style-btn:hover { opacity: 0.85; background: var(--card2); }
.map-style-btn.active { opacity: 1; background: var(--card2); box-shadow: 0 1px 4px rgba(0,0,0,0.3); }

.map-legend {
  display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap;
}
.ml-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-sm);
}
.ml-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* Custom Leaflet popup */
.leaflet-popup-content-wrapper {
  background: var(--card2) !important;
  border: 1px solid var(--border-md) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
  color: var(--text) !important;
}
.leaflet-popup-tip { background: var(--card2) !important; }
.leaflet-popup-content { margin: 14px 16px !important; min-width: 180px; }
.lp-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.lp-addr { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.lp-dist { font-size: 12px; color: var(--amber); font-weight: 600; margin-bottom: 6px; }
.lp-prices { display: flex; flex-wrap: wrap; gap: 4px; }
.lp-price {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px;
  font-size: 11px; font-family: var(--font-mono);
}
.lp-price.best { border-color: var(--green); color: var(--green); }

/* ════════════════ BOTTOM NAV — always visible ════════════════ */
#bottom-nav {
  display: flex !important;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  height: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(10, 14, 22, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-md);
  z-index: 9500;
  align-items: center;
  justify-content: space-around;
  padding-top: 0;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.45), 0 -1px 0 rgba(240,165,0,0.06);
  box-sizing: border-box;
}
body.light #bottom-nav {
  background: rgba(240, 237, 230, 0.96);
}

.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 12px;
  transition: all var(--transition);
  border: none;
  background: none;
  color: var(--muted);
  font-family: var(--font);
  position: relative;
  flex: 1;
  max-width: 80px;
}
.bn-item:active { transform: scale(0.92); }
.bn-item.active { color: var(--amber); }
.bn-item.active .bn-icon {
  background: var(--amber-dim);
  box-shadow: 0 0 0 1px rgba(240,165,0,0.2);
}
.bn-item.active .bn-label {
  font-weight: 800;
  color: var(--amber);
}

.bn-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: background var(--transition);
}
.bn-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
}
.bn-badge {
  position: absolute;
  top: 2px; right: 10px;
  background: var(--amber);
  color: #0a0f1c;
  font-size: 9px; font-weight: 800;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* ════════════════ FUEL CALCULATOR PANEL ════════════════ */
#calc-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  display: none;
}
#calc-panel.visible { display: block; animation: fadeIn .3s ease; }

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 480px) { .calc-grid { grid-template-columns: 1fr; } }

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.calc-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.calc-input {
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 16px; color: var(--text);
  font-family: var(--font-mono);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.calc-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-dim);
}

.calc-result {
  background: linear-gradient(135deg, rgba(240,165,0,0.08), rgba(34,211,160,0.05));
  border: 1px solid rgba(240,165,0,0.2);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.calc-result-label {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 8px;
}
.calc-result-val {
  font-family: var(--font-display);
  font-size: 42px; font-weight: 800;
  color: var(--amber); line-height: 1;
  transition: all .3s cubic-bezier(.2,.8,.4,1);
}
.calc-result-sub { font-size: 12px; color: var(--text-sm); margin-top: 6px; }
.calc-result-savings {
  font-size: 13px; color: var(--green); font-weight: 700;
  margin-top: 8px; padding: 6px 14px;
  background: var(--green-dim);
  border-radius: 999px; display: inline-block;
}

.calc-fuel-btns {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px;
}
.calc-fuel-btn {
  background: var(--surface); border: 1px solid var(--border-md);
  border-radius: 999px; padding: 6px 14px;
  font-size: 12px; font-weight: 600; color: var(--text-sm);
  cursor: pointer; font-family: var(--font);
  transition: all var(--transition);
  min-height: 34px;
  display: flex; align-items: center; gap: 5px;
}
.calc-fuel-btn.active {
  background: var(--amber-dim);
  border-color: rgba(240,165,0,0.4);
  color: var(--amber);
}

/* ════════════════ ALERT MODAL (price alerts) ════════════════ */
#alert-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(7,10,15,0.85); backdrop-filter: blur(8px);
  z-index: 9100; align-items: flex-end; justify-content: center;
}
#alert-overlay.open { display: flex; }

#alert-modal {
  background: var(--card);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%; max-width: 500px;
  padding-bottom: calc(20px + var(--safe-bottom));
  animation: slide-up-modal .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slide-up-modal {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.alert-handle {
  width: 40px; height: 4px;
  background: var(--border-md);
  border-radius: 999px;
  margin: 12px auto 20px;
}
.alert-body { padding: 0 24px 24px; }
.alert-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 800;
  margin-bottom: 6px;
}
.alert-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.alert-field { margin-bottom: 16px; }
.alert-field label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 7px;
}
.alert-field input {
  width: 100%;
  background: var(--surface); border: 1px solid var(--border-md);
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: 16px; color: var(--text); font-family: var(--font-mono);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.alert-field input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-dim);
}
.alert-btn {
  width: 100%; background: var(--amber); color: #0a0f1c;
  border: none; border-radius: var(--radius-sm); padding: 14px;
  font-size: 15px; font-weight: 700; font-family: var(--font-display);
  cursor: pointer; transition: all var(--transition);
}
.alert-btn:hover { background: var(--amber2); transform: translateY(-1px); }

/* Active alerts list */
.alert-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
}
.alert-item-icon { font-size: 18px; }
.alert-item-info { flex: 1; }
.alert-item-name { font-size: 13px; font-weight: 600; }
.alert-item-price { font-size: 11px; color: var(--muted); }
.alert-item-del {
  background: var(--red-dim); border: 1px solid rgba(245,101,101,.2);
  color: var(--red); border-radius: var(--radius-sm); padding: 5px 10px;
  font-size: 11px; font-weight: 700; cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}
.alert-item-del:hover { background: rgba(245,101,101,0.2); }

/* ════════════════ DEAL SCANNER (premium feature) ════════════════ */
#deal-scanner-banner {
  background: linear-gradient(135deg, rgba(240,165,0,0.1), rgba(34,211,160,0.06));
  border: 1px solid rgba(240,165,0,0.25);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: none;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all var(--transition);
}
#deal-scanner-banner:hover { border-color: rgba(240,165,0,0.4); }
#deal-scanner-banner.visible { display: flex; }
.dsb-icon { font-size: 28px; flex-shrink: 0; }
.dsb-content { flex: 1; }
.dsb-title {
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  margin-bottom: 2px; display: flex; align-items: center; gap: 8px;
}
.dsb-badge {
  font-size: 9px; font-weight: 800;
  background: var(--amber); color: #0a0f1c;
  padding: 2px 7px; border-radius: 999px;
  letter-spacing: .05em; text-transform: uppercase;
}
.dsb-sub { font-size: 12px; color: var(--text-sm); }
.dsb-arrow { color: var(--amber); font-size: 20px; }

/* ════════════════ OPEN/CLOSED BADGE ════════════════ */
.open-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px 2px 5px; border-radius: 999px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  vertical-align: middle; flex-shrink: 0;
}
.open-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.open-badge--open {
  background: rgba(34,211,160,0.12); border: 1px solid rgba(34,211,160,0.3); color: var(--green);
}
.open-dot--open {
  background: var(--green); box-shadow: 0 0 6px var(--green);
  animation: livepulse 2.2s ease infinite;
}
.open-badge--closed {
  background: rgba(245,101,101,0.10); border: 1px solid rgba(245,101,101,0.25); color: var(--red);
}
.open-dot--closed { background: var(--red); }
.open-badge--unknown {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--muted);
}
.open-dot--unknown { background: var(--muted); }

/* ════════════════ CARD MINI-MAP ════════════════ */
.card-minimap-wrap { margin-top: 14px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-md); display: none; }
.card-minimap { width: 100%; height: 220px; background: var(--surface); position: relative; z-index: 1; }
.card-minimap-btns {
  display: flex; gap: 8px; padding: 10px;
  background: var(--card2); border-top: 1px solid var(--border); flex-wrap: wrap;
}
.minimap-route-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-md); background: var(--amber);
  color: #0a0f1c; font-size: 12px; font-weight: 700; font-family: var(--font);
  cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.minimap-route-btn:hover { background: var(--amber2); transform: translateY(-1px); }
.minimap-waze-btn { background: var(--surface); color: var(--text); flex: 0 0 auto; border-color: var(--border-md); }
.minimap-waze-btn:hover { background: var(--card-hover); color: var(--text); transform: translateY(-1px); }

/* ════════════════ AUTH MODAL ════════════════ */
/* ════════════════ AUTH OVERLAY ════════════════ */
#auth-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(4,7,13,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9000; align-items: center; justify-content: center;
  padding: 16px;
}
#auth-overlay.open { display: flex; }

#auth-modal {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 24px;
  width: 100%; max-width: 420px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7), 0 0 0 1px rgba(240,165,0,0.05);
  animation: modal-in .3s cubic-bezier(.34,1.4,.64,1);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  scrollbar-width: none;
}
#auth-modal::-webkit-scrollbar { display: none; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(24px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Header ── */
.auth-header {
  background: linear-gradient(145deg, rgba(240,165,0,0.13) 0%, rgba(91,156,246,0.07) 60%, transparent 100%);
  border-bottom: 1px solid var(--border);
  padding: 24px 24px 20px;
  display: flex; align-items: center; gap: 14px;
  position: relative;
}
.auth-logo-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--amber), #c97f00);
  border-radius: 14px; display: flex; align-items: center;
  justify-content: center; font-size: 22px;
  box-shadow: 0 4px 16px rgba(240,165,0,0.3);
}
.auth-logo-wrap { display: flex; align-items: center; gap: 14px; }
.auth-title {
  font-family: var(--font-display); font-size: 20px; font-weight: 800;
  color: var(--text); line-height: 1;
}
.auth-title em { color: var(--amber); font-style: normal; }
.auth-subtitle { font-size: 12px; color: var(--muted); margin-top: 3px; }
.auth-close {
  position: absolute; top: 14px; right: 14px;
  background: var(--surface); border: 1px solid var(--border-md);
  border-radius: 50%; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted);
  transition: all var(--transition);
}
.auth-close:hover { color: var(--text); background: var(--card2); border-color: var(--border-strong); }

/* ── Tabs ── */
.auth-tabs {
  display: flex; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.auth-tab {
  flex: 1; padding: 12px 8px; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; border: none; background: none;
  border-bottom: 2px solid transparent;
  transition: all var(--transition); font-family: var(--font);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.auth-tab:hover { color: var(--text-sm); }
.auth-tab.active { color: var(--amber); border-bottom-color: var(--amber); background: var(--card); }
.auth-tab-icon { font-size: 14px; }

/* ── Body ── */
.auth-body { padding: 20px 22px 24px; }
.auth-panel { display: none; }
.auth-panel.active { display: block; animation: fadeSlideUp .2s ease; }
@keyframes fadeSlideUp {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ── Social buttons ── */
.auth-social-section { display: flex; gap: 8px; margin-bottom: 14px; }
.auth-social-btn {
  flex: 1; background: var(--surface); border: 1px solid var(--border-md);
  border-radius: 10px; padding: 10px 8px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--text-sm);
  cursor: pointer; transition: all var(--transition); font-family: var(--font);
  white-space: nowrap;
}
.auth-social-btn:hover { background: var(--card2); border-color: var(--border-strong); color: var(--text); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.auth-social-btn:active { transform: translateY(0); }

/* ── Divider ── */
.auth-divider {
  text-align: center; color: var(--muted); font-size: 11px;
  margin: 14px 0; position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%; width: calc(50% - 20px);
  height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }
.auth-divider span { background: var(--card); padding: 0 8px; position: relative; z-index: 1; }

/* ── Fields ── */
.auth-field { margin-bottom: 14px; }
.auth-name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-field label {
  display: block; font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 5px;
}
.auth-optional { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 10px; }
.auth-field-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.auth-field-header label { margin-bottom: 0; }
.auth-forgot-link { font-size: 11px; color: var(--amber); text-decoration: none; }
.auth-forgot-link:hover { text-decoration: underline; }

.auth-input-wrap {
  position: relative; display: flex; align-items: center;
  background: var(--surface); border: 1.5px solid var(--border-md);
  border-radius: 10px; transition: border-color .2s, box-shadow .2s;
  overflow: hidden;
}
.auth-input-wrap:focus-within {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(240,165,0,0.12);
}
.auth-input-icon {
  padding: 0 0 0 12px; color: var(--muted); flex-shrink: 0;
  display: flex; align-items: center;
}
.auth-input-wrap input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 11px 12px; font-size: 14px; color: var(--text);
  font-family: var(--font); min-width: 0;
}
.auth-input-wrap input::placeholder { color: var(--muted); }
.auth-toggle-pass {
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 0 12px;
  display: flex; align-items: center;
  transition: color .2s;
}
.auth-toggle-pass:hover { color: var(--text); }

/* Password strength */
.auth-pass-strength { margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.psb-track { flex: 1; height: 3px; background: var(--border-md); border-radius: 2px; overflow: hidden; }
.psb-fill   { height: 100%; width: 0; border-radius: 2px; transition: width .4s, background .4s; }
.psb-label  { font-size: 10px; font-weight: 600; color: var(--muted); min-width: 50px; text-align: right; }

/* ── Submit button ── */
.auth-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--amber), #d4900a);
  color: #0a0f1c;
  border: none;
  border-radius: 12px;
  padding: 15px 16px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 6px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  position: relative; overflow: hidden;
  min-height: 52px;
  /* Ombre pour le faire ressortir sur fond sombre mobile */
  box-shadow: 0 4px 20px rgba(240,165,0,0.30), 0 2px 6px rgba(0,0,0,0.4);
  /* Empêche l'opacité héritée de réduire la lisibilité */
  opacity: 1 !important;
  /* Meilleur contraste du texte */
  letter-spacing: 0.02em;
}
.auth-submit-btn::after {
  content: ''; position: absolute;
  top: -50%; left: -60%; width: 40%; height: 200%;
  background: rgba(255,255,255,0.2); transform: skewX(-20deg);
  transition: left .5s ease; pointer-events: none;
}
.auth-submit-btn:hover {
  background: linear-gradient(135deg, var(--amber2), var(--amber));
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(240,165,0,0.45);
}
.auth-submit-btn:hover::after { left: 130%; }
.auth-submit-btn:active { transform: translateY(0); box-shadow: 0 2px 10px rgba(240,165,0,0.25); }
.auth-submit-btn:disabled { opacity: .45 !important; cursor: not-allowed; transform: none; box-shadow: none; }

/* Variante verte (inscription) */
.auth-submit-green {
  background: linear-gradient(135deg, var(--green), #1ab88a);
  color: #061a10;
  box-shadow: 0 4px 20px rgba(34,211,160,0.25), 0 2px 6px rgba(0,0,0,0.4);
}
.auth-submit-green:hover {
  background: linear-gradient(135deg, #35edb5, var(--green));
  box-shadow: 0 8px 28px rgba(34,211,160,0.40);
}

/* Mobile : encore un peu plus haut pour faciliter le tap */
@media (max-width: 520px) {
  .auth-submit-btn {
    min-height: 56px;
    font-size: 16px;
    border-radius: 14px;
  }
}

/* ── Perks grid ── */
.auth-perks {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 16px;
}
.auth-perk {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 11px;
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text-sm); font-weight: 500;
  transition: all .2s ease;
}
.auth-perk:hover { border-color: rgba(240,165,0,0.25); background: var(--amber-dim); transform: translateY(-1px); }
.auth-perk-icon { font-size: 15px; flex-shrink: 0; }

/* ── Legal ── */
.auth-legal { font-size: 11px; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.5; }
.auth-legal a { color: var(--amber); text-decoration: none; }
.auth-legal a:hover { text-decoration: underline; }

/* ── Error shake ── */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-7px); }
  40%      { transform: translateX(7px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* ── Mobile bottom sheet ── */
@media (max-width: 520px) {
  #auth-overlay { align-items: flex-end; padding: 0; }
  #auth-modal {
    border-radius: 20px 20px 0 0; max-height: 92vh;
    animation: sheet-in .3s cubic-bezier(.34,1.2,.64,1);
    max-width: 100%;
  }
  @keyframes sheet-in {
    from { opacity:0; transform: translateY(100%); }
    to   { opacity:1; transform: translateY(0); }
  }
  .auth-handle {
    width: 36px; height: 4px; background: var(--border-md);
    border-radius: 2px; margin: 10px auto 0; display: block;
  }
  .auth-body { padding: 16px 18px 32px; }
  .auth-header { padding: 16px 18px 14px; }
  .auth-name-row { grid-template-columns: 1fr; gap: 0; }
}
@media (min-width: 521px) { .auth-handle { display: none; } }

.tb-user { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.tb-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--green));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #0a0f1c;
}

/* ════════════════ PAGE OVERLAY ════════════════ */
#page-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(7,10,15,0.9); backdrop-filter: blur(10px);
  z-index: 8000; overflow-y: auto;
}
#page-overlay.open { display: block; }

.page-modal { max-width: 760px; margin: 40px auto; padding: 0 20px 60px; }
.pm-back {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 13px;
  cursor: pointer; margin-bottom: 32px; padding: 10px 0;
  width: fit-content; transition: color var(--transition);
  background: none; border: none; font-family: var(--font);
}
.pm-back:hover { color: var(--text); }

.pm-hero {
  background: linear-gradient(135deg, rgba(240,165,0,0.10), rgba(91,156,246,0.06));
  border: 1px solid var(--border-md); border-radius: var(--radius-lg);
  padding: 40px; margin-bottom: 32px; text-align: center;
}
.pm-icon { font-size: 48px; margin-bottom: 16px; display: block; }
.pm-title { font-family: var(--font-display); font-size: 36px; font-weight: 800; margin-bottom: 12px; }
.pm-subtitle { font-size: 16px; color: var(--text-sm); max-width: 520px; margin: 0 auto; line-height: 1.6; }

.pm-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 32px; margin-bottom: 20px;
}
.pm-card h3 {
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  color: var(--amber); margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.pm-card p { font-size: 14px; color: var(--text-sm); line-height: 1.7; margin-bottom: 10px; }
.pm-card p:last-child { margin-bottom: 0; }
.pm-card ul { margin: 8px 0; padding-left: 0; list-style: none; }
.pm-card ul li { font-size: 14px; color: var(--text-sm); line-height: 1.7; padding-left: 16px; position: relative; }
.pm-card ul li::before { content: '—'; position: absolute; left: 0; color: var(--amber); }

.pm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
@media (max-width: 480px) { .pm-grid { grid-template-columns: 1fr; } }

.pm-stat {
  background: var(--card); border: 1px solid var(--border-md);
  border-radius: var(--radius); padding: 20px; text-align: center;
}
.pm-stat-val {
  font-family: var(--font-display); font-size: 32px; font-weight: 800;
  color: var(--amber); margin-bottom: 6px;
}
.pm-stat-lbl { font-size: 12px; color: var(--muted); }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.cf-field { display: flex; flex-direction: column; gap: 6px; }
.cf-field label {
  font-size: 11px; font-weight: 700; color: var(--text-sm);
  text-transform: uppercase; letter-spacing: .05em;
}
.cf-field input, .cf-field textarea, .cf-field select {
  background: var(--surface); border: 1px solid var(--border-md);
  border-radius: var(--radius-sm); padding: 11px 14px;
  font-size: 14px; color: var(--text); font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition); outline: none;
}
.cf-field textarea { min-height: 110px; resize: vertical; }
.cf-field input:focus, .cf-field textarea:focus, .cf-field select:focus {
  border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-dim);
}
.cf-btn {
  background: var(--amber); color: #0a0f1c; border: none;
  border-radius: var(--radius-sm); padding: 13px 28px;
  font-size: 14px; font-weight: 700; font-family: var(--font-display);
  cursor: pointer; align-self: flex-start; transition: all var(--transition);
}
.cf-btn:hover { background: var(--amber2); }

/* Country data notes */
.country-data-note {
  background: var(--card2); border: 1px solid var(--border-md);
  border-radius: var(--radius); padding: 16px 20px;
  margin: 12px 0 0; font-size: 13px; color: var(--text-sm); line-height: 1.6;
}
.country-data-note strong { color: var(--amber); }
.country-data-note a { color: var(--blue); text-decoration: none; }
.country-data-note a:hover { text-decoration: underline; }

.open-data-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.odl-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border-md);
  border-radius: 999px; padding: 6px 14px;
  font-size: 12px; font-weight: 600; color: var(--text-sm);
  text-decoration: none; transition: all var(--transition);
}
.odl-btn:hover { background: var(--card2); border-color: var(--border-strong); color: var(--text); }

/* ════════════════ SWIPE ACTIONS (mobile) ════════════════ */
.card-swipe-wrapper {
  position: relative;
  overflow: hidden;
}
.card-swipe-bg-fav {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 80px;
  background: var(--amber-dim);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.card-swipe-bg-nav {
  position: absolute; top: 0; bottom: 0; right: 0;
  width: 80px;
  background: rgba(34,211,160,0.1);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

/* ════════════════ SPEED DIAL FAB (mobile) ════════════════ */
#fab-wrap {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 16px);
  right: 16px;
  z-index: 490;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  align-items: flex-end;
}
@media (min-width: 769px) { #fab-wrap { display: none; } }

#fab-main {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--amber), #c97f00);
  border-radius: 16px;
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 20px var(--amber-glow);
  cursor: pointer;
  transition: all var(--transition);
}
#fab-main:active { transform: scale(0.92); }

/* ════════════════ PRICE ALERT BADGE on cards ════════════════ */
.alert-btn-card {
  background: rgba(245,101,101,0.08);
  border: 1px solid rgba(245,101,101,0.2);
  color: var(--red);
}
.alert-btn-card:hover { background: rgba(245,101,101,0.15); }
.alert-btn-card.alerted { color: var(--red); border-color: rgba(245,101,101,.4); background: rgba(245,101,101,0.12); }

/* ════════════════ RESPONSIVE — TABLET ════════════════ */
@media (max-width: 700px) {
  .sf-fields-row { flex-direction: column; gap: 8px; }
  .sf-bottom-row { flex-direction: column; gap: 8px; align-items: stretch; }
  .sf-filters { flex-wrap: wrap; }
  #btn-search { width: 100%; justify-content: center; }
  #kpi { grid-template-columns: repeat(2, 1fr); }
  .card-top { flex-wrap: wrap; }
  .rh { flex-direction: column; }
  .rh-controls { width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .hero-title { font-size: clamp(24px, 8vw, 44px); }
  #topbar { padding: 0 12px; padding-left: calc(12px + var(--safe-left)); padding-right: calc(12px + var(--safe-right)); }
  .tb-pill--hide-xs { display: none; }
  .card-actions { flex-wrap: wrap; }
  .hero-eyebrow { font-size: 10px; padding: 4px 10px; }
  .hero-split { grid-template-columns: 1fr; }
  #search-form { width: 100%; }
  #hero { padding: 24px 12px 24px; }
}

/* ════════════════ RESPONSIVE — MOBILE ════════════════ */
@media (max-width: 480px) {
  html, body { width: 100%; }
  /* ── HERO ── */
  #hero { padding: 16px 12px 20px; display: block; }
  .hero-content { width: 100%; max-width: 100%; }
  /* ── TITRE PETIT ── */
  .hero-title { font-size: 24px !important; line-height: 1.05; letter-spacing: 0; }
  .hero-sub { font-size: 13px; margin-bottom: 16px; max-width: 100%; }
  /* ── FORMULAIRE 100% LARGEUR ── */
  .hero-split { display: block !important; width: 100% !important; max-width: 100% !important; }
  #search-form { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; }
  /* ── MAIN 100% ── */
  #main { padding: 12px 12px 20px; width: 100%; max-width: 100%; box-sizing: border-box; }
  .hero-deco { display: none; }
  #kpi { grid-template-columns: repeat(2, 1fr); }
  .kpi-val { font-size: 18px; }
  .kpi-lbl { font-size: 8px; }
  .chart-wrap { height: 180px; }
  .chart-tab { padding: 4px 9px; font-size: 10px; }
  .card-top { padding: 12px 12px 10px; gap: 10px; }
  .card-rank { font-size: 28px; min-width: 26px; }
  .card-body { padding: 10px 12px; }
  .card-divider { margin: 0 12px; }
  .price-grid { grid-template-columns: repeat(3, 1fr); }
  .pc-val { font-size: 12px; }
  .rh-title { font-size: 18px; }
  .empty-state { padding: 40px 16px; }
  .empty-state h2 { font-size: 20px; }
  .topbar-name { font-size: 15px; }
  #results-wrap { gap: 8px; }
  .icon-btn { min-width: 40px; min-height: 40px; }
  .filter-btn, .sort-btn { min-height: 36px; font-size: 12px; }
  #btn-gps { font-size: 11px; padding: 6px 10px; }
}

/* ════════════════ DYNAMIC ENHANCEMENTS ════════════════ */

/* Hero title shimmer effect */
.hero-title .hl {
  background: linear-gradient(90deg, var(--amber), var(--amber2), #ffb347, var(--amber));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
  text-shadow: none;
}
@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* Animated ambient glow behind hero */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 60% at 0% 50%, rgba(240,165,0,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 30% 40% at 100% 0%, rgba(34,211,160,0.04) 0%, transparent 60%);
  pointer-events: none;
  animation: hero-glow 8s ease-in-out infinite alternate;
}
@keyframes hero-glow {
  0%   { opacity: 1; }
  100% { opacity: 0.4; }
}

/* Station cards entrance animation enhanced */
.station-card {
  animation: cardReveal .5s cubic-bezier(.2,.8,.4,1) both;
}
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* KPI items pulse when data loads */
.kpi-val {
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), color .3s;
}
.kpi-val.updated {
  animation: kpiPop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes kpiPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.15); color: var(--amber2); }
  100% { transform: scale(1); }
}

/* Price cells hover pulse */
.price-cell {
  transition: transform var(--transition), background var(--transition);
}
.price-cell:hover {
  transform: scale(1.04);
}

/* Search button ripple */
#btn-search {
  overflow: hidden;
}
#btn-search::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.25) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: transform .4s ease, opacity .4s ease;
}
#btn-search:active::before {
  opacity: 1;
  transform: scale(2);
  transition: 0s;
}

/* Bottom nav with breathing glow */
#bottom-nav {
  box-shadow: 0 -4px 32px rgba(0,0,0,0.45), 0 -1px 0 rgba(240,165,0,0.06);
}
.bn-item.active .bn-icon {
  animation: bnGlow 2.5s ease-in-out infinite;
}
@keyframes bnGlow {
  0%,100% { box-shadow: none; }
  50%      { box-shadow: 0 0 12px var(--amber-glow); }
}

/* Topbar brand subtle animation on load */
.topbar-logo {
  animation: logoSpin 0s; /* ready for interaction */
}
.topbar-brand:hover .topbar-logo {
  animation: logoBounce .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes logoBounce {
  0%   { transform: scale(1) rotate(0deg); }
  50%  { transform: scale(1.15) rotate(-8deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Live dot enhanced */
.live-dot {
  animation: livepulse 1.8s ease infinite;
  box-shadow: 0 0 0 0 rgba(34,211,160,0.6);
}
@keyframes livepulse {
  0%   { opacity:1; transform:scale(1);   box-shadow: 0 0 0 0 rgba(34,211,160,0.5); }
  70%  { opacity:.7; transform:scale(1.1); box-shadow: 0 0 0 6px rgba(34,211,160,0); }
  100% { opacity:1; transform:scale(1);   box-shadow: 0 0 0 0 rgba(34,211,160,0); }
}

/* Auth modal enhanced entrance */
#auth-modal {
  box-shadow: 0 -8px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(240,165,0,0.08);
}

/* Smooth page-in for all sections */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-panel.active {
  animation: fadeSlideUp .25s ease;
}

/* ════════════════ ACCESSIBILITY ════════════════ */
*:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
  box-shadow: 0 0 0 4px rgba(240,165,0,0.12);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ════════════════ SCROLL INDICATOR ════════════════ */
.scroll-hint {
  display: none;
  position: absolute;
  bottom: 6px; left: 50%;
  transform: translateX(-50%);
  font-size: 10px; color: var(--muted);
  animation: bounce 2s ease infinite;
  pointer-events: none;
}
@media (max-width: 480px) { .scroll-hint { display: block; } }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(-4px)} }

/* ════════════════ SCAN PROGRESS ════════════════ */
.scan-progress-wrap {
  background: var(--card);
  border: 1px solid rgba(240,165,0,0.2);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  display: none;
}
.scan-progress-wrap.visible { display: block; }
.scan-bar-outer {
  height: 6px; background: var(--surface);
  border-radius: 999px; overflow: hidden; margin: 10px 0 6px;
}
.scan-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--green));
  border-radius: 999px;
  transition: width .3s ease;
}
.scan-stats {
  display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap;
}
.scan-stat {
  font-size: 11px; color: var(--text-sm);
  display: flex; align-items: center; gap: 5px;
}
.scan-stat strong { color: var(--text); font-family: var(--font-mono); }

/* ════════════════ ADMIN USERS PAGE ════════════════ */
#page-users .pm-grid {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 600px) {
  #page-users .pm-grid { grid-template-columns: repeat(2, 1fr); }
}
#page-users .pm-stat {
  border-top: 3px solid transparent;
  transition: all var(--transition);
}
#page-users .pm-stat:nth-child(1) { border-top-color: var(--amber); }
#page-users .pm-stat:nth-child(2) { border-top-color: var(--green); }
#page-users .pm-stat:nth-child(3) { border-top-color: var(--blue); }
#page-users .pm-stat:nth-child(4) { border-top-color: var(--purple); }

#users-tbody tr {
  transition: background var(--transition);
}
#users-tbody tr:hover td { background: rgba(255,255,255,0.025); }
#users-tbody tr:last-child td { border-bottom: none; }

.users-avatar {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; color: #0a0f1c;
  flex-shrink: 0;
}

/* ════════════════ PROFILE LOGOUT BUTTON — MOBILE FIX ════════════════ */
.profile-logout-btn {
  margin: 8px 16px 8px;
  width: calc(100% - 32px);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: rgba(245,101,101,0.16);
  border: 2px solid rgba(245,101,101,0.50);
  color: var(--red);
  border-radius: 14px;
  padding: 15px;
  font-size: 15px; font-weight: 700; font-family: var(--font);
  cursor: pointer; transition: all var(--transition);
  min-height: 54px;
  box-shadow: 0 2px 14px rgba(245,101,101,0.15);
  letter-spacing: 0.02em;
}
.profile-logout-btn:hover {
  background: rgba(245,101,101,0.26);
  border-color: rgba(245,101,101,0.70);
  box-shadow: 0 4px 22px rgba(245,101,101,0.28);
}
@media (max-width: 520px) {
  .profile-logout-btn {
    min-height: 58px;
    font-size: 16px;
    border-radius: 16px;
    margin: 8px 12px 12px;
    width: calc(100% - 24px);
  }
}
/* ════════════════════════════════════════════
   CARBUMALIN — ENHANCED UI/UX ADDITIONS
   ════════════════════════════════════════════ */

/* ── Improved search button with shimmer ── */
#btn-search {
  background: linear-gradient(135deg, var(--amber) 0%, #d4890a 50%, var(--amber) 100%);
  background-size: 200% 100%;
  animation: shimmer-idle 4s ease infinite;
  letter-spacing: 0.02em;
}
@keyframes shimmer-idle {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
#btn-search:hover { animation-play-state: paused; }

/* ── Improved station cards ── */
.station-card {
  transition: transform 0.22s cubic-bezier(.34,1.2,.64,1), box-shadow 0.22s ease, border-color 0.18s ease !important;
}
.station-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35) !important;
}
.station-card.best:hover {
  box-shadow: 0 8px 40px rgba(240,165,0,0.18) !important;
}

/* ── KPI bar enhancements ── */
#kpi {
  animation: kpi-in 0.5s 0.1s ease both;
}
@keyframes kpi-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.kpi-val {
  font-variant-numeric: tabular-nums;
}

/* ── Search form focus enhancement ── */
#search-form:focus-within {
  border-color: rgba(240,165,0,0.3) !important;
  box-shadow: 0 0 0 1px rgba(240,165,0,0.1), 0 4px 24px rgba(240,165,0,0.06) !important;
}

/* ── Trust arg hover ── */
.ht-arg {
  cursor: default;
  padding: 8px;
  border-radius: var(--radius-sm);
  margin: -8px;
  transition: background var(--transition);
}
.ht-arg:hover { background: rgba(255,255,255,0.03); }

/* ── Bottom nav active indicator ── */
.bnav-item.active .bnav-icon {
  filter: drop-shadow(0 0 6px rgba(240,165,0,0.5));
}

/* ── Topbar logo pulse on scroll ── */
#topbar.scrolled .topbar-logo {
  box-shadow: 0 0 20px rgba(240,165,0,0.4);
}

/* ── Improved autocomplete ── */
.ac-item:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.ac-item:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }

/* ── Smooth page transitions ── */
#page-overlay {
  animation: page-overlay-in 0.25s ease;
}
@keyframes page-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.pm-hero {
  animation: pm-hero-in 0.4s 0.05s ease both;
}
@keyframes pm-hero-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Country pills improved ── */
.country-pill {
  transition: all 0.2s cubic-bezier(.34,1.4,.64,1) !important;
}
.country-pill.active {
  transform: scale(1.05);
}
.country-pill:hover:not(.active) {
  transform: scale(1.03) translateY(-1px);
}

/* ── Improved deal scanner ── */
#deal-scanner-banner {
  transition: transform 0.2s cubic-bezier(.34,1.3,.64,1), box-shadow 0.2s ease !important;
}
#deal-scanner-banner:hover {
  transform: translateY(-2px) !important;
}

/* ── Loading overlay brand ── */
.lo-pump {
  filter: drop-shadow(0 0 20px rgba(240,165,0,0.4));
}

/* ── Accessibility improvements ── */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Print styles for SEO ── */
@media print {
  #topbar, .bottom-nav, #map-panel, .tb-pill { display: none !important; }
  body { background: white; color: black; }
  .station-card { page-break-inside: avoid; }
}

/* ── Improved fuel badge labels ── */
.fuel-badge {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ── Animated gradient border on hero trust ── */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-trust::before {
  background: linear-gradient(90deg, var(--amber), var(--green), var(--blue), var(--amber));
  background-size: 300% 100%;
  animation: gradient-shift 5s ease infinite;
  opacity: 0.8;
}

/* ── Better mobile touch targets ── */
@media (max-width: 768px) {
  .country-pill { min-height: 40px; }
  .sf-label { font-size: 11px; }
  #btn-search { min-height: 50px; font-size: 15px; font-weight: 800; }
  #btn-gps { min-height: 40px; }
}

/* ── High contrast borders for accessibility ── */
@media (prefers-contrast: high) {
  .station-card { border-color: rgba(255,255,255,0.3) !important; }
  .hero-eyebrow { border-color: var(--amber) !important; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Injection des émojis drapeaux via pseudo-élément */
.cpill-flag.fr::before {
  content: "🇫🇷";
}

.cpill-flag.ch::before {
  content: "🇨🇭";
}

.cpill-flag.it::before {
  content: "🇮🇹";
}

/* Optionnel : Légère animation ou style si ce sont des boutons cliquables (pills actives) */
.country-pill.cpill-flag {
  display: inline-flex !important; /* Force l'alignement en ligne */
  align-items: center !important;  /* Centre verticalement le drapeau et le texte */
  justify-content: center;
  gap: 8px;                        /* Espace horizontal entre le drapeau et le texte */
  vertical-align: middle;
}

.country-pill.cpill-flag:hover {
  transform: translateY(-1px);
}

/* Pseudo-élément configuré en inline-block pour rester sur la même ligne */
.country-pill.cpill-flag::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;                  /* Empêche le drapeau de s'écraser si le texte prend de la place */
  width: 18px;
  height: 13px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* URLs des drapeaux SVG officiels (CDN stable et rapide) */
.country-pill.cpill-flag.fr::before {
  background-image: url('https://purecatamphetamine.github.io/country-flag-icons/3x2/FR.svg');
}

.country-pill.cpill-flag.ch::before {
  background-image: url('https://purecatamphetamine.github.io/country-flag-icons/3x2/CH.svg');
}

.country-pill.cpill-flag.it::before {
  background-image: url('https://purecatamphetamine.github.io/country-flag-icons/3x2/IT.svg');
}