/* ============================================================
   OhmCar — Design System v2
   Refonte moderne : blanc + vert électrique + accent jaune
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Couleurs */
  --bg: #FFFFFF;
  --surface: #F7F8FA;
  --surface-2: #EFF1F5;
  --text: #0A0F1A;
  --text-muted: #6B7280;
  --text-soft: #9AA3B2;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;

  --primary: #10B981;
  --primary-600: #059669;
  --primary-700: #047857;
  --primary-50: #ECFDF5;
  --primary-100: #D1FAE5;

  --accent: #FBBF24;
  --accent-50: #FEF3C7;

  --danger: #EF4444;
  --danger-50: #FEE2E2;
  --info: #3B82F6;
  --warning: #F59E0B;

  --dark: #0A0F1A;
  --dark-700: #111827;

  /* Rayons */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;

  /* Ombres */
  --shadow-sm: 0 1px 2px rgba(10, 15, 26, 0.04), 0 1px 1px rgba(10, 15, 26, 0.03);
  --shadow-md: 0 4px 12px rgba(10, 15, 26, 0.06), 0 2px 4px rgba(10, 15, 26, 0.04);
  --shadow-lg: 0 12px 32px rgba(10, 15, 26, 0.10), 0 4px 8px rgba(10, 15, 26, 0.05);
  --shadow-xl: 0 24px 48px rgba(10, 15, 26, 0.14);

  /* Espacements */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* Typographie */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: 24px;
  --fs-28: 28px;
  --fs-32: 32px;
  --fs-40: 40px;

  /* Layout */
  --app-max-width: 480px;
  --header-h: 64px;
  --tabbar-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-16);
  color: var(--text);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { border: none; background: none; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ---------- Mobile frame (sur desktop) ---------- */
.app-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background: linear-gradient(135deg, #F5F7FA 0%, #E4E9F0 100%);
}
.device-frame {
  position: relative;
  width: 100%;
  max-width: var(--app-max-width);
  background: var(--bg);
  box-shadow: var(--shadow-xl);
  min-height: 100vh;
  overflow: hidden;
}
@media (min-width: 768px) {
  .app-wrapper { padding: 24px 0; }
  .device-frame {
    margin: 0 auto;
    min-height: 880px;
    max-height: 920px;
    border-radius: 42px;
    border: 10px solid #111827;
    overflow: hidden;
  }
  .device-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 28px;
    background: #111827;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 1000;
  }
}

/* ---------- App layout ---------- */
.app {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  .app { min-height: 860px; max-height: 900px; }
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  animation: fade .25s ease;
  overflow: hidden;
}
.screen.active { display: flex; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.screen-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
.screen-body.no-tab { padding-bottom: 24px; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-4);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-center { display: flex; flex-direction: column; align-items: center; }
.header-title { font-size: var(--fs-16); font-weight: 600; }
.header-sub { font-size: var(--fs-12); color: var(--text-muted); }
.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  color: var(--text);
  transition: background .15s;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn.badge { position: relative; }
.icon-btn.badge::after {
  content: attr(data-badge);
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}

/* ---------- Bottom tab bar ---------- */
.tabbar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  z-index: 40;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  transition: color .15s;
}
.tab svg { width: 22px; height: 22px; stroke-width: 2; }
.tab.active { color: var(--primary); }
.tab.active svg { stroke: var(--primary); }
.tab.fab-slot { position: relative; }
.fab {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px; height: 56px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(16, 185, 129, .45);
  transition: transform .15s;
}
.fab:hover { transform: translateX(-50%) scale(1.05); }
.fab svg { width: 24px; height: 24px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 14px 20px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: var(--fs-16);
  transition: all .15s;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #1F2937; }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-outline { background: transparent; border: 1.5px solid var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-accent { background: var(--accent); color: var(--dark); }
.btn-block { width: 100%; }
.btn-sm { padding: 10px 14px; font-size: var(--fs-14); }
.btn-lg { padding: 16px 24px; font-size: var(--fs-18); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.field-label { font-size: var(--fs-13); font-weight: 600; color: var(--text); }
.field-hint { font-size: var(--fs-12); color: var(--text-muted); }
.input, .select, .textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  font-size: var(--fs-16);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}
.input-icon-wrap { position: relative; }
.input-icon-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-muted); }
.input-icon-wrap .input { padding-left: 44px; }
.textarea { min-height: 100px; resize: vertical; }

.checkbox, .radio { display: flex; align-items: center; gap: var(--sp-3); cursor: pointer; padding: var(--sp-2) 0; }
.checkbox input, .radio input { width: 20px; height: 20px; accent-color: var(--primary); }
.checkbox span, .radio span { font-size: var(--fs-14); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.card-row { display: flex; gap: var(--sp-3); align-items: center; }
.card-title { font-size: var(--fs-16); font-weight: 700; }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.chip.primary { background: var(--primary-50); color: var(--primary-700); border-color: var(--primary-100); }
.chip.accent { background: var(--accent-50); color: #92400E; border-color: var(--accent-50); }
.chip.danger { background: var(--danger-50); color: #991B1B; border-color: var(--danger-50); }
.chip.active { background: var(--dark); color: #fff; border-color: var(--dark); }
.chip svg { width: 14px; height: 14px; }
.chip-btn { cursor: pointer; transition: all .15s; }
.chip-btn:hover { background: var(--surface-2); }

/* ---------- Badges ---------- */
.badge-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.badge-dot.green { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.badge-dot.red { background: var(--danger); }
.badge-dot.orange { background: var(--warning); }

/* ---------- Utilitaires ---------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.grid { display: grid; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.text-muted { color: var(--text-muted); }
.text-soft { color: var(--text-soft); }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }
.fw-500 { font-weight: 500; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-18 { font-size: 18px; }
.fs-20 { font-size: 20px; }
.fs-24 { font-size: 24px; }
.fs-28 { font-size: 28px; }
.fs-32 { font-size: 32px; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.w-full { width: 100%; }
.rounded-full { border-radius: var(--r-full); }
.rounded-lg { border-radius: var(--r-lg); }

/* ---------- Onboarding / Splash ---------- */
.splash {
  min-height: 100vh;
  background: linear-gradient(160deg, #0A0F1A 0%, #1F2937 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
}
.splash::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(16,185,129,.35), transparent 70%);
  filter: blur(40px);
}
.splash::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(251,191,36,.25), transparent 70%);
  filter: blur(40px);
}
.splash-logo {
  font-family: var(--font);
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -2px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1;
}
.splash-logo-omega {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  background: var(--primary);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(16,185,129,.4);
}
.splash-logo-mark {
  width: 72px; height: 72px;
  border-radius: 18px;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 8px 24px rgba(16, 185, 129, .35));
}
.auth-logo-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: inline-block;
  vertical-align: middle;
}
.splash-content { z-index: 1; }
.splash h1 { font-size: 40px; font-weight: 800; line-height: 1.1; margin-bottom: 16px; letter-spacing: -1px; }
.splash h1 .hl { color: var(--primary); }
.splash p { font-size: 17px; color: rgba(255,255,255,.7); line-height: 1.5; }
.splash-actions { display: flex; flex-direction: column; gap: 12px; z-index: 1; }

.onb-slide { display: none; padding: 32px 24px; flex: 1; flex-direction: column; }
.onb-slide.active { display: flex; }
.onb-illu {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
}
.onb-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 20px; }
.onb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: all .2s; }
.onb-dot.active { background: var(--primary); width: 24px; border-radius: var(--r-full); }

/* ---------- Auth ---------- */
.auth-header { text-align: center; padding: 32px 24px 16px; }
.auth-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 28px; font-weight: 800; letter-spacing: -1px; margin-bottom: 8px; }
.auth-logo .omega-box { width: 36px; height: 36px; background: var(--dark); color: var(--primary); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; }
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  font-weight: 600;
  margin-bottom: 10px;
  transition: all .15s;
}
.social-btn:hover { background: var(--surface); }
.divider-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  margin: 20px 0;
}
.divider-or::before, .divider-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- Home / Carte ---------- */
.map-container {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #E8EEF4;
}
#map { width: 100%; height: 100%; }

.map-topbar {
  position: absolute;
  top: 12px; left: 12px; right: 12px;
  z-index: 500;
  display: flex;
  gap: 8px;
}
.search-pill {
  flex: 1;
  background: var(--bg);
  border-radius: var(--r-full);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  font-size: 14px;
  color: var(--text);
}
.search-pill svg { width: 18px; height: 18px; color: var(--text-muted); }
.map-fab {
  width: 44px; height: 44px;
  background: var(--bg);
  border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}

.filter-scroll {
  position: absolute;
  top: 72px; left: 0; right: 0;
  z-index: 500;
  display: flex;
  gap: 8px;
  padding: 0 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-scroll .chip { background: var(--bg); box-shadow: var(--shadow-sm); }

.map-bottom-sheet {
  position: absolute;
  left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px);
  z-index: 500;
  background: var(--bg);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.map-bottom-sheet .thumb { width: 72px; height: 72px; border-radius: var(--r-md); object-fit: cover; flex-shrink: 0; }
.map-bottom-sheet .info { flex: 1; min-width: 0; }

.fab-locate {
  position: absolute;
  right: 12px; bottom: calc(var(--tabbar-h) + 12px);
  z-index: 500;
  width: 48px; height: 48px;
  background: var(--bg);
  border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}

/* ---------- Spot card (list) ---------- */
.spot-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 12px;
  transition: box-shadow .15s;
}
.spot-card:hover { box-shadow: var(--shadow-md); }
.spot-card .thumb { width: 88px; height: 88px; border-radius: var(--r-md); object-fit: cover; flex-shrink: 0; }
.spot-card .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.spot-card .title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.spot-card .spot-title { font-weight: 700; font-size: var(--fs-16); }
.spot-card .spot-price { font-weight: 700; color: var(--primary); font-size: var(--fs-16); }
.spot-card .spot-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
.spot-card .spot-meta svg { width: 14px; height: 14px; }

/* ---------- Rating stars ---------- */
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 14px; height: 14px; color: var(--accent); }
.stars svg.off { color: var(--border-strong); }

/* ---------- Detail screen ---------- */
.detail-hero {
  position: relative;
  height: 260px;
  background: var(--surface-2);
  overflow: hidden;
}
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero .back-btn {
  position: absolute;
  top: 16px; left: 16px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,.9);
  border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.detail-hero .fav-btn {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,.9);
  border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.photo-dots {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 4px;
}
.photo-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); }
.photo-dots span.active { background: #fff; width: 16px; border-radius: var(--r-full); }

.detail-body { padding: 20px 16px; }
.detail-section { padding: 20px 0; border-bottom: 1px solid var(--border); }
.detail-section:last-child { border-bottom: none; }
.detail-section-title { font-size: var(--fs-18); font-weight: 700; margin-bottom: 12px; }

.sticky-cta {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 -8px 24px rgba(0,0,0,.05);
}
.sticky-cta .price-col { flex: 1; }
.sticky-cta .price-col .price { font-size: var(--fs-20); font-weight: 800; }
.sticky-cta .price-col .price-sub { font-size: 12px; color: var(--text-muted); }

/* Host profile mini */
.host-row {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; background: var(--surface); border-radius: var(--r-lg);
}
.avatar {
  width: 48px; height: 48px; border-radius: var(--r-full);
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
  flex-shrink: 0;
}
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.avatar.xl { width: 96px; height: 96px; font-size: 36px; }

/* Features grid */
.features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feature {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; background: var(--surface); border-radius: var(--r-md);
}
.feature svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }
.feature .label { font-size: 13px; font-weight: 600; }
.feature .value { font-size: 12px; color: var(--text-muted); }

/* Review */
.review {
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.review:last-child { border-bottom: none; }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-head .name { font-weight: 600; font-size: 14px; }
.review-head .date { font-size: 12px; color: var(--text-muted); }
.review-text { font-size: 14px; color: var(--text); line-height: 1.5; }

/* ---------- List items ---------- */
.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}
.list-item:hover { background: var(--surface); }
.list-item:last-child { border-bottom: none; }
.list-item .li-icon { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--primary-50); color: var(--primary-700); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.list-item .li-icon.accent { background: var(--accent-50); color: #92400E; }
.list-item .li-icon.danger { background: var(--danger-50); color: #991B1B; }
.list-item .li-icon.dark { background: var(--surface); color: var(--text); }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title { font-size: 15px; font-weight: 600; }
.list-item .li-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.list-item .li-chevron { color: var(--text-soft); }

.section-title { padding: 16px 16px 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: .5px; }

/* ---------- Bookings ---------- */
.booking-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
}
.booking-card .thumb { width: 60px; height: 60px; border-radius: var(--r-md); object-fit: cover; flex-shrink: 0; }
.booking-card .body { flex: 1; min-width: 0; }
.booking-card .status { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-full); }
.booking-card .status.pending { background: var(--accent-50); color: #92400E; }
.booking-card .status.confirmed { background: var(--primary-50); color: var(--primary-700); }
.booking-card .status.completed { background: var(--surface-2); color: var(--text-muted); }
.booking-card .status.cancelled { background: var(--danger-50); color: #991B1B; }

/* ---------- QR confirmation ---------- */
.qr-wrap {
  background: var(--bg);
  border-radius: var(--r-xl);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  margin: 24px 16px;
}
.qr-code {
  width: 200px; height: 200px;
  background: #fff;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  margin: 0 auto 16px;
}

/* ---------- Stats dashboard ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
}
.stat-card .label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-card .value { font-size: 24px; font-weight: 800; margin-top: 4px; }
.stat-card .delta { font-size: 12px; font-weight: 600; margin-top: 4px; display: inline-flex; align-items: center; gap: 2px; }
.stat-card .delta.up { color: var(--primary-700); }
.stat-card .delta.down { color: var(--danger); }

/* ---------- Calendar availability ---------- */
.avail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.avail-row .day { width: 90px; font-weight: 600; }
.avail-row .slots { flex: 1; display: flex; gap: 6px; flex-wrap: wrap; }
.time-chip {
  padding: 6px 10px;
  background: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-100);
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
}
.time-chip.closed { background: var(--surface); color: var(--text-muted); border-color: var(--border); }

.switch { position: relative; width: 40px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0;
  background: var(--border-strong);
  border-radius: var(--r-full);
  transition: .2s;
  cursor: pointer;
}
.switch-slider::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}
.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(16px); }

/* ---------- Segmented ---------- */
.segmented {
  display: inline-flex;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 4px;
  gap: 2px;
}
.segmented button {
  padding: 8px 16px;
  border-radius: calc(var(--r-md) - 4px);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .15s;
}
.segmented button.active { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- Chat ---------- */
.chat-list { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bubble {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  font-size: 14px;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
}
.bubble.in { background: var(--surface); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.out { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.chat-input {
  position: sticky; bottom: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}
.chat-input input { flex: 1; border: none; padding: 10px 14px; background: var(--surface); border-radius: var(--r-full); outline: none; }
.chat-input button { width: 40px; height: 40px; background: var(--primary); color: #fff; border-radius: var(--r-full); display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 26, .6);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  animation: fade .2s ease;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg);
  width: 100%;
  max-width: var(--app-max-width);
  border-top-left-radius: var(--r-xl);
  border-top-right-radius: var(--r-xl);
  padding: 24px;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-handle { width: 40px; height: 4px; background: var(--border-strong); border-radius: 2px; margin: -12px auto 16px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: calc(var(--tabbar-h) + 24px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; }

/* ---------- Energy badges ---------- */
.energy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
}
.energy-badge.solar { background: #FEF3C7; color: #B45309; }
.energy-badge.wind { background: #DBEAFE; color: #1D4ED8; }
.energy-badge.trad { background: var(--surface-2); color: var(--text-muted); }
.energy-badge.green { background: var(--primary-50); color: var(--primary-700); }

/* Leaflet custom marker */
.leaflet-container { font-family: var(--font); }
.custom-marker {
  width: 40px; height: 40px;
  background: var(--primary);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
}
.custom-marker svg { transform: rotate(45deg); color: #fff; width: 18px; height: 18px; }
.custom-marker.accent { background: var(--accent); }
.custom-marker.dark { background: var(--dark); }

/* ---------- Ad slot (Google Ads / partenaires) ---------- */
.ad-slot {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #FEFCE8 0%, #FFFFFF 100%);
  border: 1px solid #FDE68A;
  border-radius: var(--r-lg);
  margin-bottom: 12px;
  overflow: hidden;
}
.ad-slot::before {
  content: 'Annonce';
  position: absolute;
  top: 8px; right: 10px;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .5px;
  z-index: 2;
}
.ad-slot .thumb {
  width: 88px; height: 88px;
  border-radius: var(--r-md);
  object-fit: cover;
  flex-shrink: 0;
}
.ad-slot .body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ad-slot .brand { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.ad-slot .title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.ad-slot .subtitle { font-size: 12px; color: var(--text-muted); line-height: 1.3; }
.ad-slot .cta { font-size: 12px; font-weight: 700; color: var(--primary-700); margin-top: auto; align-self: flex-start; }

/* ---------- Payment method logos ---------- */
.pay-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.pay-logo.wallet { background: linear-gradient(135deg, #10B981, #059669); }
.pay-logo.wero   { background: linear-gradient(135deg, #5B47E0, #7C3AED); letter-spacing: -1px; }
.pay-logo.card   { background: linear-gradient(135deg, #1E40AF, #2563EB); font-size: 14px; }

/* ---------- Payment method cards ---------- */
.payment-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all .15s;
  background: var(--bg);
}
.payment-option.active {
  border-color: var(--primary);
  background: var(--primary-50);
}
.payment-option.disabled {
  opacity: .5;
  cursor: not-allowed;
  background: var(--surface);
}
.payment-option input[type="radio"] {
  margin-top: 2px;
  width: 18px; height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.payment-option .po-body { flex: 1; min-width: 0; }
.payment-option .po-title {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.payment-option .po-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 3px;
}

/* ---------- Validation method (mobile) ---------- */
.validation-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all .15s;
  background: var(--bg);
}
.validation-option.active {
  border-color: var(--primary);
  background: var(--primary-50);
}
.validation-option input[type="radio"] {
  margin-top: 2px;
  width: 18px; height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.validation-option .vo-body { flex: 1; min-width: 0; }
.validation-option .vo-title { font-weight: 700; font-size: 14px; }
.validation-option .vo-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; margin-top: 2px; }
.validation-option.disabled { opacity: .45; cursor: not-allowed; background: var(--surface); }
.validation-option.disabled .vo-title::after {
  content: ' · Nécessite une borne connectée';
  color: var(--danger);
  font-weight: 500;
  font-size: 11px;
  display: block;
  margin-top: 2px;
}

/* ---------- Language picker (mobile) ---------- */
.lang-picker { position: relative; display: inline-block; }
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
}
.lang-trigger .chev { font-size: 10px; color: var(--text-muted); }
.lang-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 200;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.lang-picker.open .lang-menu { display: flex; }
.lang-picker.menu-down .lang-menu { top: calc(100% + 6px); bottom: auto; }
.lang-option {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  width: 100%;
  background: none;
  border: none;
}
.lang-option:hover { background: var(--surface); }
.lang-option.active { background: var(--primary-50); color: var(--primary-700); font-weight: 600; }
.lang-flag { font-size: 18px; line-height: 1; }
.lang-label { flex: 1; }
.lang-check { color: var(--primary); font-weight: 700; }

/* Mini language badge (top right of splash etc.) */
.lang-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r-full);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.lang-badge:hover { background: rgba(255,255,255,.2); }

/* Page panel */
.page-panel { padding: 20px 16px; }
.page-panel h2 { font-size: var(--fs-24); font-weight: 800; margin-bottom: 8px; letter-spacing: -.5px; }
.page-panel h3 { font-size: var(--fs-18); font-weight: 700; margin: 16px 0 8px; }
.page-panel p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 8px; }
