/* ════════════════════════════════════════════════════════════════════
   EssenceMoinsCher v3 — Mobile-first CSS
   ════════════════════════════════════════════════════════════════════ */

:root {
  --bg:          #0a0a0a;
  --surface:     #111;
  --surface-2:   #1a1a1a;
  --surface-3:   #242424;
  --border:      rgba(255,255,255,.07);
  --border-2:    rgba(255,255,255,.13);
  --text:        #f4f4f4;
  --text-muted:  #888;
  --text-dim:    #444;
  --green:       #22c55e;
  --green-bg:    rgba(34,197,94,.1);
  --green-glow:  rgba(34,197,94,.25);
  --red:         #ef4444;
  --red-bg:      rgba(239,68,68,.1);
  --blue:        #3b82f6;
  --blue-bg:     rgba(59,130,246,.13);
  --orange:      #f97316;
  --orange-bg:   rgba(249,115,22,.1);
  --purple:      #818cf8;
  --purple-bg:   rgba(99,102,241,.13);
  --r:           12px;
  --r-sm:        8px;
  --r-xs:        6px;
  --panel-w:     400px;
  --t:           .15s ease;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top:    env(safe-area-inset-top, 0px);
}

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 68px;
}

body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* ══ Layout ════════════════════════════════════════════════════════ */
#app {
  display: flex;
  height: 100dvh;
  height: 100vh; /* fallback */
  overflow: hidden;
  position: relative;
}

/* ══ Map ═══════════════════════════════════════════════════════════ */
.map-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

#map, #ev-map {
  width: 100%;
  height: 100%;
}

/* ══ Leaflet zoom → bottom-right ══════════════════════════════════ */
#map .leaflet-top.leaflet-left,
#ev-map .leaflet-top.leaflet-left,
#es-map .leaflet-top.leaflet-left {
  top: auto !important;
  left: auto !important;
  bottom: 20px;
  right: 20px;
}
#map .leaflet-control-zoom a,
#ev-map .leaflet-control-zoom a,
#es-map .leaflet-control-zoom a {
  width: 36px;
  height: 36px;
  line-height: 36px;
  font-size: 18px;
  background: rgba(17,17,17,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f4f4f4;
  border: 1px solid rgba(255,255,255,.12) !important;
}
#map .leaflet-control-zoom a:hover,
#ev-map .leaflet-control-zoom a:hover,
#es-map .leaflet-control-zoom a:hover {
  background: rgba(34,34,34,.95);
}
#map .leaflet-control-zoom,
#ev-map .leaflet-control-zoom,
#es-map .leaflet-control-zoom {
  border: none !important;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}

.map-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  z-index: 5;
  transition: opacity .3s;
  pointer-events: none;
}
.map-empty.hidden { opacity: 0; }
.map-empty-inner {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  color: var(--text-dim); text-align: center; padding: 0 32px;
}
.map-empty-inner p { font-size: 13px; }

.map-loader {
  position: absolute; bottom: 80px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 24px;
  padding: 10px 18px;
  font-size: 13px; font-weight: 500;
  z-index: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.6);
  white-space: nowrap;
}
.map-loader[hidden] { display: none; }

/* FAB (mobile only) */
.fab-search {
  position: absolute;
  top: 16px; right: 16px;
  width: 48px; height: 48px;
  background: var(--green);
  border: none;
  border-radius: 50%;
  color: #000;
  display: none;
  align-items: center; justify-content: center;
  z-index: 400;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(34,197,94,.4);
  transition: transform var(--t), box-shadow var(--t);
}
.fab-search:active { transform: scale(.93); }

/* ══ Panel — Floating search card (desktop) ═══════════════════════ */
.panel {
  position: fixed;
  top: 84px;
  left: 16px;
  width: 380px;
  min-width: 0;
  max-height: calc(100dvh - 100px);
  height: auto;
  background: rgba(17,17,17,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  display: flex; flex-direction: column;
  overflow: hidden;
  z-index: 500;
  flex-shrink: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.panel--visible {
  opacity: 1;
  pointer-events: auto;
}

.drag-handle { display: none; }

.panel-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 16px calc(20px + var(--safe-bottom));
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
  -webkit-overflow-scrolling: touch;
}
.panel-scroll::-webkit-scrollbar { width: 3px; }
.panel-scroll::-webkit-scrollbar-thumb { background: var(--surface-3); }

/* ══ Logo — hidden in floating panel (navbar visible) ═════════════ */
.logo-row {
  display: none;
}
.logo-icon {
  width: 40px; height: 40px;
  background: var(--green);
  border-radius: 10px;
  display: grid; place-items: center;
  color: #000; flex-shrink: 0;
}
.logo-text { font-size: 19px; font-weight: 500; letter-spacing: -.3px; }
.logo-text strong { font-weight: 800; color: var(--green); }

/* ══ Search form ═══════════════════════════════════════════════════ */
.search-form { display: flex; flex-direction: column; gap: 18px; }
.search-form.collapsed { display: none; }

.field-group {}
.field-label {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--text-muted); margin-bottom: 9px;
}

.btn-gps {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  color: var(--text); font-size: 14px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  transition: background var(--t), border-color var(--t);
  -webkit-tap-highlight-color: transparent;
}
.btn-gps:active { background: var(--surface-3); }
.btn-gps svg { color: var(--green); flex-shrink: 0; }
.btn-gps.active { border-color: var(--green); color: var(--green); }

.or-sep {
  display: flex; align-items: center; gap: 10px;
  margin: 11px 0;
  color: var(--text-muted); font-size: 11px; font-weight: 600; letter-spacing: .08em;
}
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 1px; background: var(--border-2); }

.ac-wrap { position: relative; z-index: 500; }
.input-city {
  width: 100%; padding: 13px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  color: var(--text); font-size: 15px; font-family: inherit;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.input-city::placeholder { color: var(--text-muted); }
.input-city:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-bg);
}

.ac-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  list-style: none; z-index: 400;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  overflow: hidden; max-height: 220px; overflow-y: auto;
}
.ac-list[hidden] { display: none; }
.ac-list li {
  padding: 11px 14px; font-size: 13px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background var(--t);
}
.ac-list li:last-child { border-bottom: none; }
.ac-list li:hover, .ac-list li.kbd { background: var(--surface-3); }

.pos-status { font-size: 12.5px; font-weight: 500; margin-top: 7px; min-height: 18px; }
.pos-status.ok  { color: var(--green); }
.pos-status.err { color: var(--red); }

.fuel-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.fuel-btn {
  padding: 11px 4px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text-muted); font-size: 12.5px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
}
.fuel-btn:active { background: var(--surface-3); }
.fuel-btn.active { background: var(--green); border-color: var(--green); color: #000; font-weight: 700; }

.radius-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
.radius-btn {
  padding: 11px 4px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text-muted); font-size: 12.5px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
}
.radius-btn:active { background: var(--surface-3); }
.radius-btn.active { background: var(--green); border-color: var(--green); color: #000; font-weight: 700; }

.tank-btn {
  padding: 11px 4px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text-muted); font-size: 12.5px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
}
.tank-btn:active { background: var(--surface-3); }
.tank-btn.active { background: var(--green); border-color: var(--green); color: #000; font-weight: 700; }

.btn-search {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px;
  background: #f5f5f5; border: none; border-radius: var(--r);
  color: #0a0a0a; font-size: 15px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
}
.btn-search:active:not(:disabled) { background: var(--green); transform: scale(.98); }
.btn-search:disabled { opacity: .3; cursor: not-allowed; }
.btn-search.loading { opacity: .7; pointer-events: none; }

/* ══ Toggle ════════════════════════════════════════════════════════ */
.toggle-wrap { display: flex; justify-content: center; padding: 14px 0 4px; }
.toggle-wrap[hidden] { display: none; }
.btn-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px;
  background: transparent; border: 1.5px solid var(--green);
  border-radius: 24px; color: var(--green);
  font-size: 12.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background var(--t);
  -webkit-tap-highlight-color: transparent;
}
.btn-toggle:active { background: var(--green-bg); }
#toggle-chevron { transition: transform .2s ease; }

/* ══ Results ═══════════════════════════════════════════════════════ */
.results { margin-top: 4px; }
.results[hidden] { display: none; }

.results-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 10px;
}
#res-count { font-size: 17px; font-weight: 800; }
.results-hdr-right { display: flex; align-items: center; gap: 8px; }
.fuel-tag-pill {
  font-size: 11.5px; font-weight: 600;
  padding: 4px 12px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 20px; color: var(--text-muted);
}

/* Average price bar */
.avg-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); margin-bottom: 10px;
  font-size: 12px; color: var(--text-muted);
}
.avg-bar[hidden] { display: none; }
.avg-bar strong { color: var(--text); }
.avg-bar svg { flex-shrink: 0; opacity: .6; }

/* Filters */
.filters-row {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.filters-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 20px; color: var(--text-muted);
  font-size: 12px; font-weight: 600; font-family: inherit;
  cursor: pointer; white-space: nowrap;
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
}
.filter-chip:active { background: var(--surface-3); }
.filter-chip.active { background: var(--green-bg); border-color: rgba(34,197,94,.4); color: var(--green); }

/* ══ Station cards ════════════════════════════════════════════════ */
#stations-list { display: flex; flex-direction: column; gap: 10px; }

.station-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px;
  cursor: pointer;
  transition: border-color var(--t), transform var(--t);
  -webkit-tap-highlight-color: transparent;
}
.station-card:active { transform: scale(.99); }
.station-card.cheapest { background: rgba(15,40,25,.85); border-color: rgba(34,197,94,.3); }
.station-card.selected { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.card-left { flex: 1; min-width: 0; }
.card-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 3px; }
.card-name { font-size: 15px; font-weight: 700; color: var(--text); }
.card-right { text-align: right; flex-shrink: 0; }
.card-fuel-label { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1px; }
.card-price { font-size: 22px; font-weight: 800; color: var(--green); letter-spacing: -.5px; white-space: nowrap; }
.card-price.na { color: var(--text-dim); font-size: 13px; font-weight: 400; }

.badge-cheapest {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--green); color: #000;
  font-size: 10px; font-weight: 700;
  padding: 3px 9px; border-radius: 5px;
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px;
}
.badge-highway {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px;
  background: var(--purple-bg); color: var(--purple);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 4px; text-transform: uppercase;
}

/* Savings vs average */
.card-savings {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px; margin-bottom: 3px;
}
.card-savings.cheaper { background: var(--green-bg); color: var(--green); }
.card-savings.pricier { background: var(--red-bg); color: var(--red); }

/* Distance */
.card-distance {
  font-size: 11.5px; color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 4px;
}

.card-address { font-size: 12px; color: var(--text-muted); margin-bottom: 9px; line-height: 1.4; }

.card-status-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; }

.badge-open {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: .04em;
}
.badge-open.green  { background: var(--green-bg);  color: var(--green);  border: 1px solid rgba(34,197,94,.25); }
.badge-open.red    { background: var(--red-bg);    color: var(--red);    border: 1px solid rgba(239,68,68,.25); }
.badge-open.blue   { background: var(--blue-bg);   color: var(--blue);   border: 1px solid rgba(59,130,246,.25); }
.badge-open.orange { background: var(--orange-bg); color: var(--orange); border: 1px solid rgba(249,115,22,.25); }
.badge-open.gray   { background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border); }
.badge-open svg    { width: 11px; height: 11px; flex-shrink: 0; }

.card-updated { font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

.card-rupture {
  display: flex; align-items: center; gap: 7px;
  background: var(--red-bg); border: 1px solid rgba(239,68,68,.2);
  border-radius: var(--r-xs); padding: 7px 11px;
  font-size: 12px; font-weight: 600; color: var(--red); margin-bottom: 9px;
}

/* All prices strip */
.card-prices-strip {
  display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px;
}
.price-chip {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 4px 9px;
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: var(--r-xs);
  font-size: 10px;
}
.price-chip-label { color: var(--text-muted); font-weight: 600; letter-spacing: .04em; line-height: 1.2; }
.price-chip-value { color: var(--text); font-weight: 700; font-size: 11px; }
.price-chip.selected-fuel { border-color: rgba(34,197,94,.4); background: var(--green-bg); }
.price-chip.selected-fuel .price-chip-value { color: var(--green); }
.price-chip-date { font-size: 8px; color: rgba(255,255,255,.6); font-weight: 500; margin-top: 1px; white-space: nowrap; }

.card-services { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.svc-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 4px 9px;
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text-muted);
}
.svc-pill svg { flex-shrink: 0; opacity: .7; }

/* Nav buttons */
.card-nav { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.btn-nav {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: var(--r-sm);
  font-size: 12.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; text-decoration: none;
  transition: all var(--t); border: 1px solid transparent;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn-nav.waze  { background: rgba(51,208,253,.1); color: #33d0fd; border-color: rgba(51,208,253,.25); }
.btn-nav.gmaps { background: rgba(234,67,53,.1);  color: #ea4335; border-color: rgba(234,67,53,.25); }
.btn-nav.share { background: var(--surface-3); color: var(--text-muted); border-color: var(--border-2); }
.btn-nav:active { opacity: .8; transform: scale(.97); }

/* ══ Toast ════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: calc(24px + var(--safe-bottom)); left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 24px; padding: 10px 20px;
  font-size: 13px; font-weight: 600; color: var(--text);
  z-index: 9999; opacity: 0;
  transition: opacity .2s, transform .2s;
  white-space: nowrap; pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.6);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══ Leaflet overrides ════════════════════════════════════════════ */
.leaflet-container { background: #0d1117 !important; }
.leaflet-control-zoom {
  border: 1px solid var(--border-2) !important;
  border-radius: var(--r-sm) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.5) !important;
  overflow: hidden;
}
.leaflet-control-zoom a {
  background: var(--surface) !important; color: var(--text) !important;
  border-bottom-color: var(--border) !important;
  width: 32px !important; height: 32px !important; line-height: 32px !important;
  font-size: 17px !important;
}
.leaflet-control-zoom a:hover { background: var(--surface-2) !important; }
.leaflet-control-attribution {
  background: rgba(10,10,10,.85) !important; color: #555 !important;
  font-size: 10px !important; backdrop-filter: blur(4px);
}
.leaflet-control-attribution a { color: #666 !important; }
.leaflet-popup-content-wrapper {
  background: var(--surface) !important; border: 1px solid var(--border-2) !important;
  border-radius: var(--r) !important; color: var(--text) !important;
  box-shadow: 0 8px 30px rgba(0,0,0,.6) !important;
}
.leaflet-popup-tip { background: var(--surface) !important; }
.leaflet-popup-content { margin: 14px 16px !important; min-width: 160px; }
.popup-name  { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.popup-addr  { font-size: 11.5px; color: var(--text-muted); margin-bottom: 9px; line-height: 1.4; }
.popup-price { font-size: 24px; font-weight: 800; color: var(--green); line-height: 1; }
.popup-fuel  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.popup-dist  { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.popup-savings { font-size: 11px; font-weight: 700; margin-top: 3px; }
.popup-savings.cheaper { color: var(--green); }
.popup-savings.pricier { color: var(--red); }

/* Spin */
.spin {
  width: 16px; height: 16px;
  border: 2px solid var(--border-2); border-top-color: var(--green);
  border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ MOBILE ════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Layout vertical : map en haut, panel en dessous */
  #app {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  /* Map prend 45vh en haut, fixe */
  .map-area {
    position: relative;
    width: 100%;
    height: 45dvh;
    height: 45vh;
    flex-shrink: 0;
    overflow: hidden;
  }

  #map { width: 100%; height: 100%; }

  /* Cacher le FAB — plus besoin avec le layout vertical */
  .fab-search { display: none !important; }

  /* Panel en dessous, scrollable normalement */
  .panel {
    position: relative;
    top: auto;
    left: auto;
    width: 100%; min-width: 0;
    height: auto;
    max-height: none;
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-top: 1px solid var(--border-2);
    border-radius: 20px 20px 0 0;
    margin-top: -16px;
    z-index: 100;
    transform: none !important;
    box-shadow: 0 -8px 40px rgba(0,0,0,.6);
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
    transition: none;
  }
  .panel--visible { opacity: 1; pointer-events: auto; }

  /* Plus besoin des états du sheet */
  .panel[data-sheet="peek"],
  .panel[data-sheet="half"],
  .panel[data-sheet="open"] {
    transform: none !important;
  }

  .drag-handle { display: none; }

  .panel-scroll {
    padding-top: 16px;
    padding-bottom: calc(20px + var(--safe-bottom));
    overflow-y: visible;
    max-height: none;
  }

  .logo-row { display: none; }

  .map-loader {
    bottom: auto; top: 50%;
    transform: translateX(-50%) translateY(-50%);
  }

  /* Bigger tap targets on mobile */
  .btn-gps, .btn-search { padding: 15px; font-size: 15px; }
  .fuel-btn, .radius-btn, .tank-btn { padding: 13px 4px; font-size: 13px; }
  .btn-nav { padding: 11px 16px; font-size: 13px; }
  .card-name { font-size: 16px; }
  .card-price { font-size: 24px; }

  /* Reset zoom controls to default top-left on mobile */
  #map .leaflet-top.leaflet-left {
    top: 10px !important;
    left: 10px !important;
    bottom: auto;
    right: auto;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .fuel-grid { grid-template-columns: repeat(2,1fr); }
  .radius-grid { grid-template-columns: repeat(4,1fr); }
}

/* ── Inline spinner ──────────────────────────────────────────────── */
.spin-inline {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(0,0,0,.2); border-top-color: #000;
  border-radius: 50%; animation: spin .7s linear infinite;
  vertical-align: middle; margin-right: 4px;
}

/* ── Handle: big tap target, visible cursor ──────────────────────── */
.drag-handle {
  padding: 14px 0 8px !important;
  cursor: pointer;
  user-select: none;
}
.drag-handle:active .handle-bar { background: rgba(255,255,255,.3) !important; }
