/* ═══════════════════════════════════════
   R&D Motor — Dark Editorial
═══════════════════════════════════════ */

:root {
  /* ── Accent : ambre chaud, visible sur dark ── */
  --orange: #d97706;
  --orange-2: #f59e0b;
  --orange-light: rgba(217,119,6,0.14);
  --orange-dim: rgba(217,119,6,0.07);

  /* ── Neutrals sombres ── */
  --purple: #1c1917;
  --purple-2: #292524;
  --purple-light: rgba(255,255,255,0.06);
  --purple-dim: rgba(255,255,255,0.04);

  /* ── Sémantique adapté dark ── */
  --green: #6ee7b7;
  --green-light: rgba(110,231,183,0.12);
  --green-dim: rgba(110,231,183,0.07);

  --amber: #fbbf24;
  --amber-light: rgba(251,191,36,0.12);
  --amber-dim: rgba(251,191,36,0.07);

  --red: #fca5a5;
  --red-light: rgba(252,165,165,0.12);
  --red-dim: rgba(252,165,165,0.07);

  --blue: #93c5fd;
  --blue-light: rgba(147,197,253,0.12);

  /* ── Fond noir chaud (warm black) ── */
  --bg: #0c0a09;
  --surface: #161412;
  --surface-2: #1f1b18;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);

  /* ── Texte sur dark ── */
  --text: #faf8f5;
  --text-1: #faf8f5;
  --text-2: rgba(250,248,245,0.55);
  --text-3: rgba(250,248,245,0.28);

  --topbar-h: 64px;
  --bnav-h: 68px;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 28px;
  --r-full: 9999px;

  /* ── Ombres sur dark ── */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5), 0 1px 8px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.45);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.55);
  --shadow-orange: 0 4px 20px -4px rgba(217,119,6,0.30);
  --shadow-zinc: 0 4px 16px rgba(0,0,0,0.50);

  /* ── Easing (Emil Kowalski) ── */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  /* ── Transitions ── */
  --t-fast: 140ms cubic-bezier(0.23, 1, 0.32, 1);
  --t-base: 220ms cubic-bezier(0.23, 1, 0.32, 1);
  --t-slow: 380ms cubic-bezier(0.23, 1, 0.32, 1);

  --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Stagger animation ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.stagger-item {
  animation: fadeSlideUp 0.28s cubic-bezier(0.23, 1, 0.32, 1) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-family: inherit; }

/* ── Focus visible (clavier / accessibilité) ── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.form-input:focus-visible {
  outline: none; /* les inputs ont déjà border + box-shadow au :focus */
}

/* ── Layout ── */
#app { display: flex; flex-direction: column; min-height: 100vh; }

#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: rgba(12,10,9,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border);
}
.topbar-brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-logo { font-size: 24px; line-height: 1; }
.brand-name {
  font-size: 20px; font-weight: 900; color: var(--orange);
  letter-spacing: -0.5px; line-height: 1;
}
.brand-name span { color: var(--text); }

#main-content {
  margin-top: var(--topbar-h);
  padding: 20px 16px calc(var(--bnav-h) + 24px + env(safe-area-inset-bottom));
  min-height: calc(100vh - var(--topbar-h));
  animation: pageIn 0.2s ease;
}
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

#bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--bnav-h) + env(safe-area-inset-bottom));
  background: rgba(22,20,18,0.92);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
  box-shadow: 0 -1px 0 var(--border);
}
.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  padding: 8px 4px;
  transition: color var(--t-fast);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.bnav-item svg { width: 22px; height: 22px; transition: transform var(--t-fast); }
.bnav-item.active { color: var(--orange); }
.bnav-item.active svg { transform: scale(1.1); }
.bnav-item.active::after {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 3px;
  background: var(--orange);
  border-radius: 0 0 4px 4px;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--orange); color: #fff;
  font-size: 15px; font-weight: 700; font-family: var(--font);
  padding: 13px 24px; border-radius: var(--r-full); border: none; cursor: pointer;
  box-shadow: var(--shadow-orange);
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease, background-color 200ms ease, color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--orange-2); box-shadow: 0 6px 28px -4px rgba(217,119,6,0.50); }
}
.btn-primary.full { width: 100%; }
.btn-primary.sm { padding: 9px 18px; font-size: 13px; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface-2); color: var(--text);
  font-size: 14px; font-weight: 600; font-family: var(--font);
  padding: 10px 20px; border-radius: var(--r-full);
  border: 1.5px solid var(--border-strong); cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn-secondary:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn-secondary:hover { background: var(--surface); border-color: var(--border-strong); }
}
.btn-secondary.sm { padding: 8px 16px; font-size: 13px; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; color: var(--text-2);
  font-size: 14px; font-weight: 600; font-family: var(--font);
  padding: 10px 16px; border-radius: var(--r-full); border: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}
.btn-ghost:active { transform: scale(0.97); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ghost.full { width: 100%; }

.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--red); color: #fff;
  font-size: 14px; font-weight: 700; font-family: var(--font);
  padding: 10px 22px; border-radius: var(--r-full); border: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.btn-danger:active { transform: scale(0.97); }

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  flex-shrink: 0;
}
.btn-icon svg { width: 15px; height: 15px; }
.btn-icon:hover { border-color: var(--orange); color: var(--orange); }
.btn-icon.danger { color: var(--red); border-color: rgba(239,68,68,0.25); background: var(--red-light); }
.btn-icon.danger:hover { border-color: var(--red); background: var(--red); color: #fff; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  border: 1px solid var(--border);
}

/* ── Typography ── */
.section-title { font-size: 18px; font-weight: 900; color: var(--text); margin-bottom: 14px; letter-spacing: -0.3px; }
.section-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-row .section-title { margin-bottom: 0; }

/* ── Chips ── */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.chip-success { background: var(--green-light); color: var(--green); }
.chip-warning { background: var(--amber-light); color: var(--amber); }
.chip-danger  { background: var(--red-light);   color: var(--red); }
.chip-purple  { background: #f4f4f5; color: #18181b; }
.chip-orange  { background: var(--orange-light); color: var(--orange); }
.chip-blue    { background: var(--blue-light);   color: var(--blue); }
.chip-gray    { background: var(--surface-2);    color: var(--text-2); border: 1px solid var(--border); }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.form-label .req { color: var(--red); margin-left: 2px; }
.form-input {
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: var(--r-md); color: var(--text);
  padding: 12px 14px; font-size: 15px; font-family: var(--font);
  width: 100%; outline: none;
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
  -webkit-appearance: none;
}
.form-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-dim);
  background: var(--surface);
}
.form-input::placeholder { color: var(--text-3); }
select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
textarea.form-input { resize: vertical; min-height: 80px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Empty State ── */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 24px; gap: 12px; }
.empty-art { font-size: 64px; margin-bottom: 4px; }
.empty h3 { font-size: 20px; font-weight: 900; }
.empty p { color: var(--text-2); font-size: 14px; max-width: 280px; line-height: 1.6; }

/* ── Overlay ── */
.overlay { position: fixed; inset: 0; z-index: 500; display: flex; align-items: flex-end; justify-content: center; }
.overlay.hidden { display: none !important; }

/* ── Onboarding ── */
#onboarding { background: rgba(0,0,0,0.80); backdrop-filter: blur(12px); align-items: center; }
.onboard-wrap { width: 100%; max-width: 460px; padding: 24px 20px; z-index: 1; }
.onboard-card {
  background: var(--surface); border-radius: var(--r-2xl); padding: 36px 28px;
  text-align: center; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 16px;
}
.onboard-art { font-size: 80px; line-height: 1; }
.onboard-card h2 { font-size: 24px; font-weight: 900; letter-spacing: -0.5px; }
.onboard-card p { color: var(--text-2); font-size: 15px; line-height: 1.6; }

/* ── Modal ── */
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(8px); }
.modal-box {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  width: 100%; max-width: 580px; max-height: 88vh;
  overflow-y: auto; padding: 20px 20px 32px;
  box-shadow: var(--shadow-lg); animation: slideUp 0.28s cubic-bezier(0.23, 1, 0.32, 1); z-index: 1;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 20px; }
.modal-title { font-size: 20px; font-weight: 900; margin-bottom: 20px; letter-spacing: -0.3px; }
.modal-footer { display: flex; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ── Confirm ── */
#confirm-overlay { background: rgba(0,0,0,0.7); backdrop-filter: blur(10px); align-items: center; }
.confirm-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2xl); padding: 32px 24px;
  text-align: center; width: calc(100% - 48px); max-width: 360px;
  box-shadow: var(--shadow-lg); animation: slideUp 0.22s cubic-bezier(0.23, 1, 0.32, 1);
}
.confirm-art { font-size: 52px; margin-bottom: 12px; }
.confirm-box h3 { font-size: 20px; font-weight: 900; margin-bottom: 8px; }
.confirm-box p { color: var(--text-2); font-size: 14px; margin-bottom: 24px; line-height: 1.5; }
.confirm-btns { display: flex; gap: 10px; justify-content: center; }

/* ── Toast ── */
#toast-container {
  position: fixed;
  bottom: calc(var(--bnav-h) + 12px + env(safe-area-inset-bottom));
  left: 16px; right: 16px;
  z-index: 9000; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: #27272a; color: #fff;
  border-radius: var(--r-lg); padding: 13px 16px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
  animation: toastIn 0.32s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: auto;
  opacity: 1; transform: translateY(0);
  @starting-style {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
  }
}
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }
.toast.out { animation: toastOut 0.16s ease-out forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(8px) scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px) scale(0.97); } }

/* ── XP Popup ── */
.xp-popup {
  position: fixed; bottom: calc(var(--bnav-h) + 90px); left: 50%; transform: translateX(-50%);
  background: var(--orange); color: #fff; font-size: 20px; font-weight: 900;
  padding: 12px 28px; border-radius: var(--r-full); box-shadow: 0 4px 16px -4px rgba(234,88,12,0.35);
  z-index: 9100; animation: xpIn 0.38s cubic-bezier(0.23, 1, 0.32, 1); white-space: nowrap;
}
.xp-popup.hidden { display: none; }
@keyframes xpIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(0.9); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* ── Badge Popup ── */
.badge-popup {
  position: fixed; top: calc(var(--topbar-h) + 12px); left: 16px; right: 16px;
  background: #18181b; color: #fff; border-radius: var(--r-xl);
  padding: 14px 20px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-zinc); z-index: 9100; animation: badgeIn 0.38s cubic-bezier(0.23, 1, 0.32, 1);
}
.badge-popup.hidden { display: none; }
#badge-popup-icon { font-size: 34px; flex-shrink: 0; }
.badge-popup-title { font-size: 11px; font-weight: 700; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-popup-name { font-size: 16px; font-weight: 900; margin-top: 2px; }
@keyframes badgeIn { from { opacity: 0; transform: translateY(-8px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ═══════════════════
   HOME
═══════════════════ */
.home-greeting { margin-bottom: 20px; }
.home-greeting h1 { font-size: 26px; font-weight: 900; letter-spacing: -0.5px; }
.home-greeting p { color: var(--text-2); font-size: 14px; margin-top: 4px; }

.level-card {
  background: linear-gradient(135deg, #1c1917 0%, #292524 60%, #44403c 100%);
  border-radius: var(--r-xl); padding: 20px; color: #fff;
  margin-bottom: 20px; display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-zinc);
}
.level-badge-big {
  width: 58px; height: 58px; background: rgba(255,255,255,0.2);
  border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center;
  font-size: 30px; flex-shrink: 0;
}
.level-info { flex: 1; min-width: 0; }
.level-name { font-size: 19px; font-weight: 900; }
.level-xp-label { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.xp-bar-track { margin-top: 10px; height: 8px; background: rgba(255,255,255,0.25); border-radius: var(--r-full); overflow: hidden; }
.xp-bar-fill { height: 100%; background: rgba(255,255,255,0.9); border-radius: var(--r-full); transition: width 0.8s cubic-bezier(.4,0,.2,1); }

.quick-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.quick-stat {
  background: var(--surface); border-radius: var(--r-lg); padding: 14px 12px;
  text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.quick-stat-val { font-size: 28px; font-weight: 900; letter-spacing: -1px; line-height: 1; color: var(--text); }
.quick-stat-label { font-size: 10px; color: var(--text-2); font-weight: 700; margin-top: 5px; text-transform: uppercase; letter-spacing: 0.4px; }
.quick-stat.danger .quick-stat-val { color: var(--red); }
.quick-stat.warning .quick-stat-val { color: var(--amber); }
.quick-stat.success .quick-stat-val { color: var(--green); }

.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item {
  background: var(--surface); border-radius: var(--r-lg); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  border-left-width: 4px; cursor: pointer; transition: transform var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.alert-item:active { transform: scale(0.99); }
.alert-item.is-overdue  { border-left-color: var(--red); }
.alert-item.is-upcoming { border-left-color: var(--amber); }
.alert-emoji { font-size: 24px; flex-shrink: 0; }
.alert-info { flex: 1; min-width: 0; }
.alert-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-vehicle { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.vehicle-mini-list { display: flex; flex-direction: column; gap: 10px; }
.vehicle-mini-card {
  background: var(--surface); border-radius: var(--r-lg); padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  cursor: pointer; transition: transform var(--t-fast), background-color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.vehicle-mini-card:active { transform: scale(0.98); }
.vehicle-mini-emoji { font-size: 32px; flex-shrink: 0; }
.vehicle-mini-info { flex: 1; min-width: 0; }
.vehicle-mini-name { font-size: 15px; font-weight: 700; }
.vehicle-mini-km { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ── Health Ring (SVG) ── */
.health-ring { position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.health-ring svg { transform: rotate(-90deg); }
.ring-bg { fill: none; }
.ring-fill { fill: none; stroke-linecap: round; transition: stroke-dasharray 0.7s cubic-bezier(.4,0,.2,1); }
.ring-fill.ok      { stroke: var(--green); }
.ring-fill.warning { stroke: var(--amber); }
.ring-fill.danger  { stroke: var(--red); }
.ring-label { position: absolute; font-size: 10px; font-weight: 900; color: var(--text); }

/* ═══════════════════
   GARAGE
═══════════════════ */
.garage-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; gap: 16px;
}
.garage-title { font-size: 26px; font-weight: 900; letter-spacing: -0.5px; }
.garage-subtitle { font-size: 14px; color: var(--text-2); margin-top: 4px; }

/* ── Empty state ── */
.garage-empty-wrap {
  max-width: 480px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-2xl); padding: 44px 32px; text-align: center;
}
.garage-empty-art { font-size: 64px; margin-bottom: 18px; }
.garage-empty-title { font-size: 22px; font-weight: 900; margin-bottom: 10px; letter-spacing: -0.3px; }
.garage-empty-sub {
  font-size: 14px; color: var(--text-2); line-height: 1.65;
  margin-bottom: 32px; max-width: 340px; margin-left: auto; margin-right: auto;
}
.garage-benefits { display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; text-align: left; }
.garage-benefit { display: flex; gap: 14px; align-items: flex-start; }
.garage-benefit-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.garage-benefit strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.garage-benefit p { font-size: 13px; color: var(--text-2); margin: 0; line-height: 1.5; }

/* ── Cards ── */
.gcard-list { display: flex; flex-direction: column; gap: 20px; }
.gcard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-2xl); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 200ms var(--ease-out), box-shadow 200ms ease, border-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .gcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
}

.gcard-photo {
  position: relative; width: 100%; aspect-ratio: 16 / 7;
  overflow: hidden; cursor: pointer; background: var(--surface-2);
}
.gcard-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 400ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .gcard:hover .gcard-photo img { transform: scale(1.04); }
}
.gcard-photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 30%, rgba(12,10,9,0.55) 100%);
  pointer-events: none;
}

.gcard-badge {
  position: absolute; top: 12px; right: 12px;
  display: flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700; letter-spacing: 0.2px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.gcard-badge.danger  { background: rgba(252,165,165,0.2); color: var(--red);   border: 1px solid rgba(252,165,165,0.35); }
.gcard-badge.warning { background: rgba(251,191,36,0.2);  color: var(--amber); border: 1px solid rgba(251,191,36,0.35); }
.gcard-badge.ok      { background: rgba(110,231,183,0.15); color: var(--green); border: 1px solid rgba(110,231,183,0.3); }

.gcard-body { padding: 20px 22px 22px; }

.gcard-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; cursor: pointer;
}
.gcard-name { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.2; }
.gcard-meta { font-size: 12px; color: var(--text-2); margin-top: 5px; }
.gcard-km-block { text-align: right; flex-shrink: 0; }
.gcard-km-val { font-size: 22px; font-weight: 900; color: var(--orange); letter-spacing: -0.5px; line-height: 1; }
.gcard-km-unit { font-size: 11px; color: var(--text-3); font-weight: 600; margin-top: 2px; }

.gcard-health { margin-bottom: 18px; }
.gcard-health-label {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 7px; font-size: 12px; color: var(--text-2); font-weight: 600;
}
.gcard-health-pct { font-weight: 800; }
.gcard-health-pct.ok      { color: var(--green); }
.gcard-health-pct.warning { color: var(--amber); }
.gcard-health-pct.danger  { color: var(--red); }
.gcard-health-track {
  height: 7px; background: var(--surface-2); border-radius: var(--r-full);
  overflow: hidden; border: 1px solid var(--border);
}
.gcard-health-fill {
  height: 100%; border-radius: var(--r-full);
  transition: width 0.9s cubic-bezier(.4,0,.2,1);
}
.gcard-health-fill.ok      { background: linear-gradient(90deg, #34d399, #6ee7b7); }
.gcard-health-fill.warning { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.gcard-health-fill.danger  { background: linear-gradient(90deg, #f87171, #fca5a5); }
.gcard-health-hint {
  font-size: 11px; margin-top: 7px; font-weight: 600;
}
.gcard-health-hint.ok      { color: var(--green); }
.gcard-health-hint.warning { color: var(--amber); }
.gcard-health-hint.danger  { color: var(--red); }

.gcard-actions { display: flex; align-items: center; gap: 8px; }
.gcard-btn-primary {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--orange); color: #fff;
  font-size: 13px; font-weight: 700; font-family: var(--font);
  padding: 12px 16px; border-radius: var(--r-lg); border: none; cursor: pointer;
  box-shadow: var(--shadow-orange);
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.gcard-btn-primary:active { transform: scale(0.97); }
.gcard-btn-km {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1.5px solid var(--border);
  color: var(--text-2); font-size: 13px; font-weight: 700; font-family: var(--font);
  padding: 11px 14px; border-radius: var(--r-lg); cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.gcard-btn-km:hover { color: var(--text); border-color: var(--border-strong); }
.gcard-btn-km:active { transform: scale(0.97); }
.gcard-btn-icon {
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-lg); border: 1.5px solid var(--border);
  background: var(--surface-2); color: var(--text-3); cursor: pointer; flex-shrink: 0;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.gcard-btn-icon:hover { color: var(--text); border-color: var(--border-strong); }
.gcard-btn-icon.del:hover { color: var(--red); border-color: rgba(252,165,165,0.3); background: var(--red-light); }
.gcard-btn-icon:active { transform: scale(0.95); }

/* legacy compat */
.vehicle-card { display: none; }
.vehicle-card-tap { flex: 1; display: flex; align-items: center; gap: 14px; cursor: pointer; min-width: 0; }
.vehicle-card-info { flex: 1; min-width: 0; }
.vehicle-card-name { font-size: 17px; font-weight: 800; }
.vehicle-card-meta { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.vehicle-card-km { font-size: 15px; font-weight: 700; color: var(--orange); margin-top: 6px; }
.vehicle-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }
.vehicle-card-actions { display: flex; gap: 6px; }

.fab {
  position: fixed; bottom: calc(var(--bnav-h) + 20px + env(safe-area-inset-bottom)); right: 20px;
  width: 58px; height: 58px; background: var(--orange); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px -4px rgba(234,88,12,0.28); cursor: pointer; border: none; z-index: 50;
  transition: transform var(--t-base); -webkit-tap-highlight-color: transparent;
}
.fab:active { transform: translateY(1px) scale(0.95); }
.fab svg { width: 26px; height: 26px; color: #fff; }

/* ═══════════════════
   VEHICLE DETAIL
═══════════════════ */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-full); padding: 8px 16px; margin-bottom: 20px; cursor: pointer;
}
.back-btn svg { width: 16px; height: 16px; }

.vehicle-hero-card {
  background: linear-gradient(135deg, var(--orange-light) 0%, var(--surface) 60%);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 22px 18px; margin-bottom: 20px;
}
.vehicle-hero-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.vehicle-hero-emoji { font-size: 52px; line-height: 1; }
.health-score-block { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.health-score-label { font-size: 10px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.4px; }
.vehicle-hero-name { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; }
.vehicle-hero-meta { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.vehicle-hero-km { font-size: 32px; font-weight: 900; color: var(--orange); letter-spacing: -1px; margin-top: 10px; line-height: 1; }
.vehicle-hero-km span { font-size: 16px; font-weight: 600; color: var(--text-2); }
.vehicle-hero-stats {
  display: flex; align-items: center; gap: 0; margin-top: 14px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--r-xl); overflow: hidden;
}
.vhs-item { flex: 1; padding: 10px 14px; text-align: center; }
.vhs-val { font-size: 16px; font-weight: 900; color: var(--text-1); letter-spacing: -0.3px; }
.vhs-label { font-size: 11px; color: var(--text-3); font-weight: 600; margin-top: 1px; }
.vhs-sep { width: 1px; background: var(--border); align-self: stretch; }
.vehicle-hero-actions { display: flex; gap: 10px; margin-top: 16px; }

.tabs-bar {
  display: flex; background: var(--surface-2); border-radius: var(--r-full);
  padding: 4px; gap: 4px; margin-bottom: 20px; border: 1px solid var(--border);
}
.tab-btn {
  flex: 1; padding: 10px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 700; color: var(--text-2);
  background: none; border: none; cursor: pointer; font-family: var(--font);
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
  text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.tab-btn.active { background: var(--surface); color: var(--orange); box-shadow: var(--shadow-sm); }
.tab-panel.hidden { display: none !important; }

.cat-header {
  display: flex; align-items: center; gap: 8px; padding: 8px 4px;
  margin: 16px 0 8px; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-2);
}
.cat-header-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Groupes d'entretiens ── */
.maint-source-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--orange-2);
  background: var(--orange-dim); border: 1px solid var(--orange-light);
  border-radius: var(--r-md); padding: 10px 14px; margin-bottom: 18px;
}
.maint-two-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.maint-group { margin-bottom: 0; }
.maint-group-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.maint-group-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 800; letter-spacing: -0.2px;
}
.maint-group-icon { font-size: 18px; }
.maint-group-sub { font-size: 12px; color: var(--text-3); font-weight: 500; }
.maint-group-list { display: flex; flex-direction: column; gap: 10px; }

.maint-item {
  background: var(--surface); border-radius: var(--r-lg); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  border-left-width: 4px; transition: border-left-color var(--t-fast), background-color var(--t-fast);
}
.maint-item.ok       { border-left-color: var(--green); }
.maint-item.upcoming { border-left-color: var(--amber); }
.maint-item.overdue  { border-left-color: var(--red); background: rgba(252,165,165,0.04); }
.maint-item.time     { border-left-color: var(--blue); }
.maint-emoji { font-size: 22px; flex-shrink: 0; }
.maint-info { flex: 1; min-width: 0; }
.maint-name { font-size: 14px; font-weight: 700; }
.maint-sub  { font-size: 12px; color: var(--text-2); margin-top: 2px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.maint-cat-tag { font-size: 11px; font-weight: 600; margin-left: 4px; }
.maint-last { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.maint-never { color: var(--amber) !important; font-weight: 600; }
.maint-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }

/* ── Accordéons paliers km ── */
.maint-milestone-list { display: flex; flex-direction: column; gap: 8px; }

.maint-milestone {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  transition: border-color 200ms ease;
}
.maint-milestone.open { border-color: var(--border-strong); }

.maint-milestone-hd {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px; cursor: pointer; background: none; border: none;
  font-family: var(--font); text-align: left;
  transition: background-color 140ms ease;
}
.maint-milestone-hd:hover { background: var(--surface-2); }
.maint-milestone-hd:active { transform: scale(0.99); }

.maint-milestone-left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.maint-milestone-km {
  flex-shrink: 0; padding: 6px 10px; border-radius: var(--r-md);
  font-size: 12px; font-weight: 900; letter-spacing: -0.3px; line-height: 1;
  text-align: center; min-width: 64px;
}
.maint-milestone-km.ok      { background: var(--green-dim);  color: var(--green); border: 1px solid rgba(110,231,183,0.2); }
.maint-milestone-km.warning { background: var(--amber-dim);  color: var(--amber); border: 1px solid rgba(251,191,36,0.2); }
.maint-milestone-km.danger  { background: var(--red-dim);    color: var(--red);   border: 1px solid rgba(252,165,165,0.2); }

.maint-milestone-title { font-size: 13px; font-weight: 700; color: var(--text); }
.maint-milestone-sub   { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.maint-milestone-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.maint-milestone-chevron {
  color: var(--text-3); flex-shrink: 0;
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.maint-milestone.open .maint-milestone-chevron { transform: rotate(180deg); }

.maint-milestone-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms cubic-bezier(0.23, 1, 0.32, 1);
}
.maint-milestone.open .maint-milestone-body { grid-template-rows: 1fr; }
.maint-milestone-items {
  overflow: hidden;
  padding: 0 12px;
}
.maint-milestone.open .maint-milestone-items { padding: 4px 12px 12px; }

/* les items à l'intérieur du milestone sont légèrement plus compacts */
.maint-milestone-items .maint-item {
  background: var(--surface-2);
}

/* ── Bouton "tout valider" d'un palier ── */
.maint-validate-all-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 10px; padding: 10px 14px;
  background: var(--green-dim); border: 1px dashed rgba(110,231,183,0.35);
  border-radius: var(--r-md); color: var(--green);
  font-family: var(--font); font-size: 12.5px; font-weight: 700;
  cursor: pointer; transition: background-color 140ms ease;
}
.maint-validate-all-btn:hover { background: var(--green-light); }
.maint-validate-all-btn:active { transform: scale(0.98); }

/* ── Modal de validation groupée ── */
.bulk-log-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.bulk-log-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-md);
  font-size: 13px; font-weight: 600;
}
.bulk-log-icon { font-size: 16px; }

/* ── Bouton tutoriel inline ── */
.maint-tuto-btn {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 5px; padding: 3px 8px;
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
  color: #f87171; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700; font-family: var(--font); cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.maint-tuto-btn:hover { background: rgba(239,68,68,0.15); color: #fca5a5; }
.maint-tuto-btn:active { transform: scale(0.97); }

/* ── Modal tutoriel ── */
.tuto-modal-header {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px;
}
.tuto-modal-icon { font-size: 36px; flex-shrink: 0; line-height: 1; }
.tuto-modal-title { font-size: 18px; font-weight: 900; letter-spacing: -0.3px; }
.tuto-modal-meta { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.tuto-modal-desc {
  font-size: 14px; color: var(--text-2); line-height: 1.65;
  margin-bottom: 16px;
}
.tuto-tip {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--orange-dim); border: 1px solid var(--orange-light);
  border-radius: var(--r-md); padding: 12px 14px;
  font-size: 13px; color: var(--text-2); line-height: 1.5;
  margin-bottom: 16px;
}
.tuto-tip svg { flex-shrink: 0; margin-top: 1px; color: var(--orange); }
.tuto-section-title {
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-3); margin-bottom: 10px;
}
.tuto-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tuto-equip-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.tuto-equip-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text);
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.tuto-equip-item:hover { background: var(--surface); border-color: var(--border-strong); }
.tuto-equip-item:active { transform: scale(0.98); }
.tuto-equip-item svg { flex-shrink: 0; color: var(--text-3); }
.tuto-yt-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #ff0000; color: #fff;
  font-size: 14px; font-weight: 700; font-family: var(--font);
  padding: 11px 20px; border-radius: var(--r-full);
  text-decoration: none;
  transition: transform 160ms var(--ease-out), opacity 160ms ease;
}
.tuto-yt-btn:hover { opacity: 0.9; }
.tuto-yt-btn:active { transform: scale(0.97); }

.maint-count-badge {
  display: inline-flex; align-items: center;
  background: rgba(217,119,6,0.15); color: var(--orange);
  border: 1px solid rgba(217,119,6,0.3);
  font-size: 10px; font-weight: 800; padding: 1px 6px;
  border-radius: var(--r-full); margin-left: 6px; vertical-align: middle;
}
.maint-btn-repeat {
  background: var(--surface-2) !important;
  color: var(--orange) !important;
  box-shadow: none !important;
  border: 1.5px solid rgba(217,119,6,0.35) !important;
}

/* ── Table Historique / Carburant (mobile : cards, desktop : tableau) ── */
.htable-wrap {
  background: var(--surface); border-radius: var(--r-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden;
}
.htable-header {
  display: none;
}
.htable-row {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.htable-row:last-child { border-bottom: none; }
.htable-row:hover { background: var(--bg); }
.htable-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; flex-wrap: wrap;
}
.history-check-sm { font-size: 15px; flex-shrink: 0; }
.htable-notes { font-size: 12px; color: var(--text-3); font-style: italic; font-weight: 400; }
.htable-cell { font-size: 13px; color: var(--text-2); }
.htable-actions { display: flex; align-items: center; gap: 6px; margin-top: 4px; }

/* Legacy (conservé pour compatibilité logbook/print) */
.history-item {
  background: var(--surface); border-radius: var(--r-lg); padding: 14px 14px;
  margin-bottom: 10px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.history-check {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--green-light); display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.history-info { flex: 1; min-width: 0; }
.history-name { font-size: 14px; font-weight: 700; }
.history-meta { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.history-notes { font-size: 12px; color: var(--text-3); font-style: italic; margin-top: 3px; }
.history-cost { color: var(--orange); font-weight: 700; }
.history-doneby {
  background: rgba(99,102,241,0.12); color: #818cf8;
  border-radius: var(--r-full); padding: 1px 6px; font-size: 10px; font-weight: 700;
}

/* ═══════════════════
   LOGBOOK
═══════════════════ */
.vehicle-tabs-scroll {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 20px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.vehicle-tabs-scroll::-webkit-scrollbar { display: none; }
.vtab {
  flex-shrink: 0; padding: 9px 18px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 700; background: var(--surface);
  border: 1.5px solid var(--border); color: var(--text-2);
  cursor: pointer; font-family: var(--font);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}
.vtab.active { background: var(--orange); color: #fff; border-color: var(--orange); }

.log-date-group { margin-bottom: 20px; }
.log-date-label { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.6px; padding: 0 4px; margin-bottom: 8px; }

/* ═══════════════════
   GUIDE
═══════════════════ */
.guide-search-wrap { position: relative; margin-bottom: 14px; }
.guide-search-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.guide-search-wrap i svg { width: 16px; height: 16px; }
.guide-search-input {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-full); color: var(--text);
  padding: 12px 16px 12px 42px; font-size: 14px; font-family: var(--font);
  width: 100%; outline: none; transition: border-color var(--t-base);
}
.guide-search-input:focus { border-color: var(--orange); }
.guide-search-input::placeholder { color: var(--text-3); }

.cat-filter-scroll {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
  mask-image: linear-gradient(to right, black 80%, transparent 100%);
}
.cat-filter-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0; padding: 8px 16px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 700; background: var(--surface);
  border: 1.5px solid var(--border); color: var(--text-2);
  cursor: pointer; font-family: var(--font);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}
.cat-chip.active { background: var(--orange); color: #fff; border-color: var(--orange); }

/* ── Icônes personnalisées (designer) avec repli emoji ── */
.cicon { display: inline-flex; align-items: center; justify-content: center; vertical-align: -2px; }
.cicon img { width: 1em; height: 1em; object-fit: contain; }
.cat-chip.active .cicon img { filter: brightness(0) invert(1); }

.guide-item {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); margin-bottom: 10px; overflow: hidden;
}
.guide-item-head { display: flex; align-items: center; gap: 12px; padding: 16px; cursor: pointer; user-select: none; }
.guide-emoji { font-size: 26px; flex-shrink: 0; }
.guide-info { flex: 1; min-width: 0; }
.guide-name { font-size: 14px; font-weight: 700; }
.guide-interval { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.guide-chevron { color: var(--text-3); transition: transform var(--t-base); flex-shrink: 0; }
.guide-chevron svg { width: 18px; height: 18px; }
.guide-item.open .guide-chevron { transform: rotate(180deg); }
.guide-body { display: none; padding: 0 16px 16px; }
.guide-item.open .guide-body { display: block; }
.guide-divider { height: 1px; background: var(--border); margin-bottom: 14px; }
.guide-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 12px; }
.guide-stats { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.guide-stat { font-size: 13px; color: var(--text-2); }
.guide-stat strong { color: var(--text); font-weight: 700; }
.guide-tip {
  background: var(--orange-light); border-radius: var(--r-md);
  padding: 12px 14px; font-size: 13px; color: var(--text-2);
  margin-bottom: 12px; display: flex; gap: 10px; line-height: 1.5;
}
.tools-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tool-tag { padding: 4px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-full); font-size: 12px; color: var(--text-2); }
a.tool-tag {
  display: inline-flex; align-items: center; gap: 5px;
  text-decoration: none; cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
a.tool-tag svg { flex-shrink: 0; opacity: 0.6; }
a.tool-tag:hover { background: var(--surface); border-color: var(--orange); color: var(--orange); }
a.tool-tag:hover svg { opacity: 1; }
a.tool-tag:active { transform: scale(0.97); }
.tools-disclosure { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.guide-yt-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #ff0000; color: #fff; font-size: 13px; font-weight: 700;
  font-family: var(--font); padding: 10px 18px; border-radius: var(--r-full);
  text-decoration: none; transition: opacity var(--t-fast);
}
.guide-yt-btn:active { opacity: 0.85; }

/* ═══════════════════
   PROFILE
═══════════════════ */

/* ── Profile Account Card (pac) ── */
.pac-hero {
  background: linear-gradient(160deg, #1c1917 0%, #292524 55%, #3b3431 100%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--r-2xl); padding: 32px 24px 24px;
  text-align: center; margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.pac-hero::before {
  content: '';
  position: absolute; bottom: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(217,119,6,0.10) 0%, transparent 70%);
  pointer-events: none;
}
.pac-avatar-wrap {
  position: relative; display: inline-flex; flex-shrink: 0;
  cursor: pointer; border-radius: 50%; margin-bottom: 16px;
}
.pac-avatar-img {
  width: 84px; height: 84px; border-radius: 50%;
  object-fit: cover; display: block;
  border: 3px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.pac-avatar-initials {
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), #c2410c);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 900; color: #fff;
  border: 3px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.pac-avatar-edit {
  position: absolute; bottom: 2px; right: 2px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface); border: 2px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.pac-name {
  font-size: 22px; font-weight: 900; color: #fff; letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.pac-email {
  font-size: 13px; color: rgba(255,255,255,0.45); margin-bottom: 20px;
}

.pac-level-row {
  display: flex; align-items: flex-start; gap: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-lg); padding: 14px 16px; text-align: left;
  margin-bottom: 16px;
}
.pac-level-icon { font-size: 26px; flex-shrink: 0; margin-top: 1px; }
.pac-level-info { flex: 1; min-width: 0; }
.pac-level-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pac-level-name { font-size: 14px; font-weight: 800; color: #fff; }
.pac-level-xp { font-size: 12px; color: var(--orange); font-weight: 700; }
.pac-xp-track {
  height: 5px; background: rgba(255,255,255,0.12); border-radius: var(--r-full); overflow: hidden;
}
.pac-xp-fill {
  height: 100%; background: var(--orange); border-radius: var(--r-full);
  transition: width 0.8s cubic-bezier(.4,0,.2,1);
}
.pac-level-next { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 6px; }

.pac-actions {
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.pac-btn-photo {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.65); font-size: 12px; font-weight: 600;
  font-family: var(--font); padding: 8px 16px; border-radius: var(--r-full);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.pac-btn-photo:hover { background: rgba(255,255,255,0.14); color: #fff; }
.pac-btn-photo:active { transform: scale(0.97); }
.pac-btn-remove {
  display: inline-flex; align-items: center;
  background: transparent; border: none;
  color: rgba(252,165,165,0.7); font-size: 12px; font-weight: 600;
  font-family: var(--font); padding: 8px 12px; border-radius: var(--r-full);
  cursor: pointer;
  transition: color 160ms ease;
}
.pac-btn-remove:hover { color: var(--red); }

.pac-logout {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px; border-radius: var(--r-xl);
  background: transparent; border: 1.5px solid rgba(252,165,165,0.2);
  color: var(--red); font-size: 14px; font-weight: 700; font-family: var(--font);
  cursor: pointer; margin-bottom: 28px;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.pac-logout:hover { background: var(--red-light); border-color: rgba(252,165,165,0.4); }
.pac-logout:active { transform: scale(0.98); }

/* legacy (kept for compat) */
.profile-hero { display: none; }
.profile-avatar { display: none; }
.profile-level-name { font-size: 22px; font-weight: 900; }
.profile-xp { font-size: 14px; opacity: 0.85; margin-top: 4px; }
.profile-xp-bar { margin-top: 14px; height: 10px; background: rgba(255,255,255,0.25); border-radius: var(--r-full); overflow: hidden; }
.profile-xp-fill { height: 100%; background: rgba(255,255,255,0.9); border-radius: var(--r-full); transition: width 0.8s cubic-bezier(.4,0,.2,1); }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 24px; }
.stat-box { background: var(--surface); border-radius: var(--r-lg); padding: 18px 16px; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.stat-box-val { font-size: 30px; font-weight: 900; letter-spacing: -1px; color: var(--orange); }
.stat-box-label { font-size: 12px; color: var(--text-2); font-weight: 700; margin-top: 4px; }

.badges-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.badge-card {
  background: var(--surface); border-radius: var(--r-lg); padding: 18px 14px;
  text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: transform 200ms var(--ease-out), border-color 200ms ease, background-color 200ms ease, opacity 300ms ease, filter 300ms ease;
}
.badge-card.earned { border-color: #27272a; background: #f4f4f5; }
.badge-card.locked { opacity: 0.45; filter: grayscale(0.8); }
.badge-icon { font-size: 34px; margin-bottom: 8px; }
.badge-name { font-size: 13px; font-weight: 800; color: var(--text); }
.badge-card.earned .badge-name { color: #18181b; }
.badge-desc { font-size: 11px; color: var(--text-2); margin-top: 4px; line-height: 1.4; }
.badge-card.earned .badge-desc { color: #52525b; }
.badge-earned-label { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 11px; font-weight: 700; color: #18181b; }

/* ═══════════════════
   AUTH SCREEN
═══════════════════ */
.auth-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: linear-gradient(160deg, #1c1917 0%, #292524 50%, #3b3431 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.auth-screen.hidden { display: none !important; }

.auth-wrap {
  background: var(--surface); border-radius: var(--r-2xl);
  padding: 36px 28px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg); position: relative;
}
.auth-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 14px; color: var(--text-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.auth-close:hover { background: var(--red-light); color: var(--red); border-color: var(--red); }
.auth-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; }
.auth-logo-icon { font-size: 32px; }
.auth-logo-name { font-size: 26px; font-weight: 900; color: var(--orange); letter-spacing: -0.5px; }
.auth-tagline { text-align: center; color: var(--text-2); font-size: 14px; margin-bottom: 28px; }

.auth-tabs {
  display: flex; background: var(--surface-2); border-radius: var(--r-full);
  padding: 4px; gap: 4px; margin-bottom: 24px; border: 1px solid var(--border);
}
.auth-tab {
  flex: 1; padding: 10px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 700; color: var(--text-2);
  background: none; border: none; cursor: pointer; font-family: var(--font);
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
  text-align: center;
}
.auth-tab.active { background: var(--surface); color: var(--orange); box-shadow: var(--shadow-sm); }

.auth-form.hidden { display: none !important; }

.cost-input-wrap { position: relative; }
.cost-input-prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 15px; font-weight: 700; color: var(--orange); pointer-events: none;
}
.cost-input { padding-left: 30px !important; }
.password-wrap { position: relative; }
.password-wrap .form-input { padding-right: 48px; }
.pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 16px;
  line-height: 1; padding: 4px;
}

.auth-error {
  background: var(--red-light); color: var(--red);
  border: 1px solid rgba(239,68,68,0.3); border-radius: var(--r-md);
  padding: 10px 14px; font-size: 13px; font-weight: 600;
  margin-bottom: 8px;
}
.auth-error.hidden { display: none !important; }

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 13px 20px; border-radius: var(--r-full);
  background: var(--surface); border: 1.5px solid var(--border-strong);
  font-size: 15px; font-weight: 700; font-family: var(--font);
  color: var(--text); cursor: pointer;
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease, border-color 160ms ease;
  box-shadow: var(--shadow-sm);
}
.btn-google:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.btn-google:active { transform: scale(0.97); }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-3); font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.auth-footer {
  text-align: center; color: var(--text-3); font-size: 12px;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border);
}
.auth-forgot { text-align: center; margin-top: 10px; }
.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--orange); font-size: 13px; font-family: var(--font);
  text-decoration: underline; padding: 0;
}
.link-btn:hover { opacity: 0.75; }

/* ── Topbar user badge ── */
.topbar-user {
  display: flex; align-items: center; gap: 8px;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), #c2410c);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: #fff; cursor: pointer;
  flex-shrink: 0;
}

/* ── Profile avatar upload ── */
.profile-avatar-wrap {
  position: relative; display: inline-flex; flex-shrink: 0;
  cursor: pointer; border-radius: 50%;
}
.profile-avatar-img {
  width: 56px; height: 56px; border-radius: 50%;
  object-fit: cover; display: block;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.avatar-edit-badge {
  position: absolute; bottom: -2px; right: -2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--orange); border: 2px solid var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1;
}
.profile-avatar-wrap:hover .profile-avatar-img,
.profile-avatar-wrap:hover .user-avatar { opacity: 0.8; }

/* ── Landing hero photo ── */
.hero-photo {
  position: relative; width: 100%; height: 100%;
  min-height: 420px; border-radius: var(--r-xl);
  overflow: hidden; background: var(--surface-2);
}
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: brightness(0.72) saturate(0.85);
  transition: transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
@media (hover: hover) and (pointer: fine) {
  .hero-photo:hover img { transform: scale(1.03); }
}
.hero-photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(12,10,9,0.55) 0%, rgba(12,10,9,0.1) 60%, transparent 100%);
}

/* ── Feature card with image ── */
.feature-card { padding: 0 !important; overflow: hidden; }
.feature-card-img {
  height: 160px; overflow: hidden;
  background: var(--surface-2);
}
.feature-card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: brightness(0.75) saturate(0.85);
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
@media (hover: hover) and (pointer: fine) {
  .feature-card:hover .feature-card-img img { transform: scale(1.05); }
}
.feature-card-body { padding: 20px 18px 22px; }
.feature-card-body .feature-title { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.feature-card-body .feature-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; }

/* ── Guide item thumbnail ── */
.guide-thumb {
  width: 48px; height: 48px; border-radius: var(--r-sm);
  overflow: hidden; flex-shrink: 0; background: var(--surface-2);
}
.guide-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: brightness(0.8) saturate(0.75);
}

/* ── Photo upload ── */
.photo-upload-area {
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--surface-2);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t-base);
}
.photo-upload-area:hover { border-color: var(--orange); }
.photo-upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  width: 100%; height: 100%; z-index: 2;
}
.photo-placeholder {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; color: var(--text-3); font-size: 13px; font-weight: 600;
  pointer-events: none; padding: 24px;
}
.photo-placeholder-icon { font-size: 40px; }
.photo-preview-img { width: 100%; height: 180px; object-fit: cover; display: block; }

/* ── Factures ── */
.invoice-area {
  border: 2px dashed var(--border-strong); border-radius: var(--r-lg);
  overflow: hidden; cursor: pointer; background: var(--surface-2);
  min-height: 100px; display: flex; align-items: center; justify-content: center;
  position: relative; transition: border-color var(--t-base);
}
.invoice-area:hover { border-color: var(--orange); }
.invoice-ph {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; color: var(--text-3); font-size: 13px; font-weight: 600;
  padding: 20px; pointer-events: none;
}
.invoice-preview-wrap { position: relative; width: 100%; }
.invoice-preview-img { width: 100%; max-height: 220px; object-fit: contain; display: block; background: var(--surface-2); }
.invoice-clear {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,0.65); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 140ms ease;
}
.invoice-clear:hover { background: rgba(239,68,68,0.85); }

.invoice-badge-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--r-full); border: none; cursor: pointer;
  background: rgba(234,88,12,0.1); color: var(--orange); font-size: 11px; font-weight: 700;
  font-family: var(--font); white-space: nowrap;
  transition: background-color 140ms ease, transform 120ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .invoice-badge-btn:hover { background: rgba(234,88,12,0.2); transform: scale(1.03); }
}

.history-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.invoice-modal-img {
  padding: 4px 4px 12px; overflow-y: auto; max-height: 65vh;
}
.invoice-modal-img img { width: 100%; border-radius: var(--r-xl); display: block; }

.invoice-ocr-status {
  margin-top: 8px; font-size: 12px; font-weight: 700; text-align: center;
  padding: 7px 14px; border-radius: var(--r-full); transition: opacity 280ms ease;
}
.invoice-ocr-status.hidden { display: none; }
.invoice-ocr-status.loading {
  color: var(--orange); background: rgba(234,88,12,0.10);
  animation: ocr-pulse 1.2s ease-in-out infinite;
}
.invoice-ocr-status.ok { color: #34d399; background: rgba(52,211,153,0.12); }
.invoice-ocr-status.warn { color: var(--text-2); background: var(--surface-2); font-weight: 600; }
@keyframes ocr-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ── Vehicle photo in cards ── */
.vehicle-photo-thumb {
  width: 52px; height: 52px; border-radius: var(--r-md);
  object-fit: cover; flex-shrink: 0;
}
.vehicle-photo-hero {
  width: 100%; height: 180px; object-fit: cover;
  border-radius: var(--r-lg); margin-bottom: 16px; display: block;
}
.vehicle-mini-photo {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  object-fit: cover; flex-shrink: 0;
}

/* ═══════════════════════════════════
   LANDING PAGE
═══════════════════════════════════ */

/* ── Asymmetric hero split (DESIGN_VARIANCE=8) ── */
/* ── Landing editorial (Floria-style) ── */
.landing-hero {
  background: transparent;
  border-radius: 0;
  padding: 72px 0 80px;
  color: var(--text);
  margin-bottom: 0;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  min-height: min(80vh, 640px);
  border-bottom: 1px solid var(--border);
}
.landing-hero::before { display: none; }

.landing-hero-text {
  text-align: left;
}
.landing-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-height: 360px;
}
.landing-visual-ring {
  width: 100%; height: 100%;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, #1f1b18 0%, #292524 60%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
  line-height: 1;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  min-height: 360px;
}
.landing-visual-ring::after {
  content: '';
  position: absolute;
  bottom: -40px; right: -40px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(217,119,6,0.12) 0%, transparent 70%);
}

.landing-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--border-strong);
  color: var(--text-3);
  padding: 5px 14px; border-radius: var(--r-full);
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; margin-bottom: 24px;
}
.landing-title {
  font-size: clamp(36px, 5.5vw, 80px);
  line-height: 1.0;
  letter-spacing: -2.5px;
  margin-bottom: 24px;
  color: var(--text);
}
.landing-title .title-bold  { display: block; font-weight: 900; }
.landing-title .title-light { display: block; font-weight: 300; font-style: italic; color: var(--text-2); }
.landing-sub {
  font-size: 16px; line-height: 1.7; color: var(--text-2);
  margin-bottom: 36px; max-width: 46ch;
}
.landing-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.landing-actions .btn-primary {
  background: #fff; color: #0c0a09;
  padding: 14px 28px; font-size: 15px; font-weight: 700;
  box-shadow: none;
}
.landing-actions .btn-primary:hover { background: var(--text-2); color: #fff; }
.landing-actions .btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--border-strong);
  color: var(--text-2); font-size: 15px; font-weight: 600; font-family: var(--font);
  padding: 14px 24px; border-radius: var(--r-full); cursor: pointer;
  transition: transform 160ms var(--ease-out), color 160ms ease, border-color 160ms ease;
}
.landing-actions .btn-outline:hover { color: var(--text); border-color: var(--text); }
.landing-actions .btn-outline:active { transform: scale(0.97); }

.trust-row {
  display: flex; align-items: center; gap: 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin: 0 0 64px; padding: 0;
}
.trust-item {
  flex: 1; padding: 24px 20px; text-align: center;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none;
}
.trust-item:last-child { border-right: none; }
.trust-item-icon { font-size: 20px; margin-bottom: 4px; }
.trust-item-label { font-size: 11px; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

.landing-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text-3); margin-bottom: 10px;
}
.landing-section-title {
  font-size: clamp(22px, 3vw, 36px); font-weight: 800; letter-spacing: -0.8px;
  color: var(--text); margin-bottom: 28px; line-height: 1.15;
}

.features-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  margin-bottom: 36px;
}
/* First card spans full width on top row, second and third split bottom row */
.features-grid .feature-card:nth-child(1) { grid-column: 1; grid-row: 1; }
.features-grid .feature-card:nth-child(2) { grid-column: 2; grid-row: 1; }
.features-grid .feature-card:nth-child(3) { grid-column: 1; grid-row: 2; }
.features-grid .feature-card:nth-child(4) { grid-column: 2; grid-row: 2; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 22px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 200ms var(--ease-out), box-shadow 200ms ease, border-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
}
.feature-icon { font-size: 32px; margin-bottom: 12px; }
.feature-title { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.feature-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; }

.steps-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 36px; }
.step-item {
  display: flex; align-items: flex-start; gap: 16px; padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.step-item:last-child { border-bottom: none; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); border: 1.5px solid var(--border-strong);
  color: var(--orange); font-size: 17px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.step-title { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.step-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; }

.landing-faq { margin-bottom: 36px; }
.landing-faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.landing-faq-item summary { font-size: 14px; font-weight: 700; cursor: pointer; color: var(--text); list-style: none; }
.landing-faq-item summary::-webkit-details-marker { display: none; }
.landing-faq-item summary::after { content: "+"; float: right; color: var(--orange-2); font-weight: 800; }
.landing-faq-item[open] summary::after { content: "−"; }
.landing-faq-item p { font-size: 13px; color: var(--text-2); line-height: 1.65; margin-top: 10px; }

.landing-cta-banner {
  background: transparent;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 64px 0;
  text-align: center; color: var(--text);
  margin-bottom: 0;
}
.landing-cta-banner h2 { font-size: clamp(20px, 3vw, 34px); font-weight: 800; margin-bottom: 10px; letter-spacing: -0.8px; }
.landing-cta-banner p { font-size: 15px; color: var(--text-2); margin-bottom: 28px; line-height: 1.6; }
.landing-cta-banner .btn-white {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--text); color: var(--bg);
  font-size: 14px; font-weight: 700; font-family: var(--font);
  padding: 13px 32px; border-radius: var(--r-full); border: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}
.landing-cta-banner .btn-white:hover { background: var(--orange); color: #fff; }
.landing-cta-banner .btn-white:active { transform: scale(0.97); }

/* ── Topbar login button ── */
.topbar-login-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--text); color: var(--bg);
  font-size: 13px; font-weight: 600; font-family: var(--font);
  padding: 8px 18px; border-radius: var(--r-full); border: none; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}
.topbar-login-btn:hover { background: var(--orange); color: #fff; }
.topbar-login-btn:active { transform: scale(0.97); }

/* ── Refined cards ── */
.card { border-radius: var(--r-xl); }

/* ══════════════════════════════════════
   TOPBAR NAV (tous écrans ≥640px)
══════════════════════════════════════ */
.top-mobile-nav { display: none; align-items: center; gap: 4px; }
.tmn-item {
  padding: 7px 14px; border-radius: var(--r-md); font-size: 14px; font-weight: 600;
  color: var(--text-2); background: none; border: none; cursor: pointer;
  font-family: var(--font);
  transition: background-color 140ms ease, color 140ms ease;
  white-space: nowrap; position: relative;
}
.tmn-item:hover { color: var(--text); background: var(--surface-2); }
.tmn-item.active { color: var(--text); font-weight: 700; }
.tmn-item.active::after {
  content: '';
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 2px;
  background: var(--orange); border-radius: 2px 2px 0 0;
}

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
:root { --sidebar-w: 248px; }

#sidebar {
  display: none;
  position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #1c1917 0%, #292524 60%, #3b3431 100%);
  border-right: 1px solid rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 1px 0 0 rgba(0,0,0,0.25);
  flex-direction: column; z-index: 50;
  overflow-y: auto;
}
.sidebar-nav { padding: 20px 12px; flex: 1; display: flex; flex-direction: column; }
.snav-group { margin-bottom: 28px; }
.snav-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: rgba(255,255,255,0.35); padding: 0 10px 10px;
  display: block;
}
.snav-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 10px 10px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.60);
  background: none; border: none; cursor: pointer; font-family: var(--font);
  transition: background-color var(--t-fast), color var(--t-fast); text-align: left; position: relative;
  margin-bottom: 2px;
}
.snav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.snav-item:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.90); }
.snav-item.active { background: rgba(146,64,14,0.22); color: #fde68a; font-weight: 700; }
.snav-item.active::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; background: var(--orange); border-radius: 0 2px 2px 0;
}
.sidebar-footer {
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-version { font-size: 11px; color: rgba(255,255,255,0.28); font-weight: 500; }

/* ══════════════════════════════════════
   PAGE HEADERS (desktop)
══════════════════════════════════════ */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 32px; padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.page-header-left h1 { font-size: 26px; font-weight: 900; letter-spacing: -0.5px; }
.page-header-left p { color: var(--text-2); font-size: 14px; margin-top: 5px; }
.page-header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

/* ══════════════════════════════════════
   KPI ROW
══════════════════════════════════════ */
.kpi-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 28px; }
.kpi-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 200ms var(--ease-out), box-shadow 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
}
.kpi-card.is-alert { border-color: rgba(220,38,38,0.3); background: var(--red-light); }
.kpi-card.is-warn  { border-color: rgba(217,119,6,0.3);  background: var(--amber-light); }
.kpi-icon {
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
}
.kpi-icon svg { width: 18px; height: 18px; }
.kpi-icon-orange { background: var(--surface-2); color: var(--orange); }
.kpi-icon-red    { background: var(--red-light);  color: var(--red); }
.kpi-icon-amber  { background: var(--surface-2);  color: var(--text-2); }
.kpi-icon-purple { background: var(--surface-2);  color: var(--text-2); }
.kpi-val   { font-size: 32px; font-weight: 900; letter-spacing: -1px; line-height: 1; color: var(--text); }
.kpi-label { font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.4px; }

/* ══════════════════════════════════════
   DESKTOP BREAKPOINT (≥ 960px)
══════════════════════════════════════ */
@media (min-width: 960px) {

  /* Layout */
  #sidebar { display: none !important; }
  #bottom-nav { display: none !important; }
  .top-mobile-nav { display: flex !important; }
  #topbar { padding: 0 40px; height: 68px; }
  .brand-name { font-size: 21px; }

  #main-content {
    margin-top: 68px;
    margin-left: auto;
    margin-right: auto;
    padding: 48px 64px;
    max-width: 1200px;
    min-height: calc(100vh - 68px);
    margin-bottom: 0;
  }

  /* Toast + modal */
  #toast-container { left: auto; right: 32px; bottom: 32px; max-width: 380px; }
  .modal-box { border-radius: var(--r-2xl); max-width: 600px; margin: auto; }
  #modal-overlay { align-items: center; }

  /* KPIs: 4 colonnes */
  .kpi-row { grid-template-columns: repeat(4, 1fr); }

  /* Garage: 2 colonnes */
  .gcard-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

  /* Landing */
  .landing-hero { padding: 72px 64px; min-height: 400px; }
  .landing-sub { font-size: 17px; }
  /* features bento: asymmetric stays but wider top row on desktop */
  .features-grid { grid-template-columns: 2fr 1fr; }
  .steps-list { display: grid; grid-template-columns: repeat(3, 1fr); }
  .step-item { border-bottom: none; border-right: 1px solid var(--border); padding: 20px 28px 20px 0; display: flex; flex-direction: column; gap: 10px; }
  .step-item:last-child { border-right: none; padding-right: 0; }
  .landing-cta-banner { padding: 48px 72px; display: flex; align-items: center; justify-content: space-between; gap: 32px; text-align: left; }
  .landing-cta-banner h2 { font-size: 28px; margin-bottom: 6px; }
  .landing-cta-banner p { margin-bottom: 0; }

  /* Guide: 2 colonnes */
  #guide-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-items: start; }
  .guide-item.open { grid-column: 1 / -1; }

  /* Logbook */
  .logbook-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
  .logbook-sidebar { position: sticky; top: calc(68px + 40px); }

  /* Profile */
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .badges-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-body { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

  /* Vehicle detail */
  .vehicle-detail-top { display: grid; grid-template-columns: 1fr 280px; gap: 28px; align-items: start; }
  .maint-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .maint-two-cols { grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }

  /* Historique / Carburant — tableau desktop */
  .htable-header {
    display: grid; grid-template-columns: 2.5fr 1fr 1fr 1fr 1fr 100px;
    padding: 10px 16px; gap: 12px;
    font-size: 11px; font-weight: 700; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 0.5px;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .htable-row {
    display: grid; grid-template-columns: 2.5fr 1fr 1fr 1fr 1fr 100px;
    align-items: center; flex-direction: unset; gap: 12px; padding: 13px 16px;
  }
  .htable-name { flex-wrap: nowrap; }
  .htable-cell { font-size: 14px; color: var(--text-1); }
  .htable-actions { margin-top: 0; justify-content: flex-end; }

  /* Forms */
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════
   TABLET (640px – 959px)
══════════════════════════════════════ */
@media (min-width: 640px) and (max-width: 959px) {
  .top-mobile-nav { display: flex; }
  #topbar { padding: 0 24px; }
  #main-content { padding: 24px 28px calc(var(--bnav-h) + 24px); max-width: 860px; margin-left: auto; margin-right: auto; }
  /* keep asymmetric bento on tablet */
  .features-grid { grid-template-columns: 2fr 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
  .modal-box { border-radius: var(--r-2xl); max-width: 540px; margin: auto; }
  #modal-overlay { align-items: center; }
}

/* ══════════════════════════════════════
   MOBILE: stack hero columns
══════════════════════════════════════ */
@media (max-width: 639px) {
  .landing-hero {
    grid-template-columns: 1fr;
    padding: 36px 24px 32px;
    min-height: auto;
  }
  .landing-hero-visual { display: none; }
  .landing-visual-ring { width: 140px; height: 140px; font-size: 60px; }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .features-grid .feature-card:nth-child(1),
  .features-grid .feature-card:nth-child(2),
  .features-grid .feature-card:nth-child(3),
  .features-grid .feature-card:nth-child(4) {
    grid-column: 1;
    grid-row: auto;
  }
}

/* ══════════════════════════════════════
   ACCESSIBILITY: REDUCED MOTION
══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .stagger-item {
    animation: none;
    opacity: 1;
    transform: none;
  }
  #main-content { animation: none; }
  .modal-box,
  .confirm-box { animation: none; }
  .toast { animation: none; }
  .toast.out { animation: none; opacity: 0; transition: opacity 0.1s ease; }
  .xp-popup,
  .badge-popup { animation: none; }
  .xp-bar-fill,
  .profile-xp-fill,
  .ring-fill { transition: none; }
  .hero-photo img,
  .feature-card-img img { transition: none; }
  .fab { transition: none; }
}

/* ══════════════════════════════════════
   RAPPELS INTELLIGENTS
══════════════════════════════════════ */
.maint-chip-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.maint-date-est {
  font-size: 10px; font-weight: 700; color: var(--text-3);
  white-space: nowrap; letter-spacing: 0.2px;
}

/* ══════════════════════════════════════
   SUIVI CARBURANT
══════════════════════════════════════ */
.fuel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.fuel-title { font-size: 16px; font-weight: 800; }
.fuel-stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 20px;
}
.fuel-stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 12px 10px; text-align: center;
}
.fuel-stat-val { font-size: 16px; font-weight: 900; color: var(--orange); letter-spacing: -0.5px; }
.fuel-stat-label { font-size: 11px; color: var(--text-3); font-weight: 600; margin-top: 2px; }
.fuel-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--border-subtle);
}
.fuel-item:last-child { border-bottom: none; }
.fuel-item-icon { font-size: 22px; flex-shrink: 0; }
.fuel-item-info { flex: 1; min-width: 0; }
.fuel-item-main { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.fuel-item-liters { font-size: 15px; font-weight: 800; }
.fuel-item-ppl { font-size: 12px; color: var(--text-2); }
.fuel-item-meta { font-size: 12px; color: var(--text-2); }
@media (max-width: 400px) { .fuel-stats-row { grid-template-columns: repeat(2, 1fr); } }

/* ══════════════════════════════════════
   STATISTIQUES / GRAPHIQUES
══════════════════════════════════════ */
.chart-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 16px; box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.chart-card-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 800; margin-bottom: 12px;
}
.chart-card-title i { width: 16px; height: 16px; color: var(--orange); flex-shrink: 0; }
.chart-svg { width: 100%; height: auto; display: block; }

/* ── Historique : barre de recherche / filtres ── */
.hist-toolbar { margin-bottom: 14px; }
.hist-toolbar .guide-search-wrap { margin-bottom: 10px; }
.hist-toolbar .cat-filter-scroll { margin-bottom: 10px; }
.hist-date-filter {
  display: flex; align-items: center; gap: 8px;
}
.hist-date-filter .form-input {
  flex: 1; padding: 10px 12px; font-size: 13px;
}
.hist-date-sep { color: var(--text-3); font-size: 13px; flex-shrink: 0; }

/* ══════════════════════════════════════
   EXPORT PDF
══════════════════════════════════════ */
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff !important; color: #18181b !important; font-size: 12px; }

  #topbar, #sidebar, #bottom-nav, .back-btn,
  .vehicle-hero-actions, .maint-right button,
  .tabs-bar, .btn-icon, .maint-tuto-btn,
  .no-print { display: none !important; }

  #main-content { margin: 0 !important; padding: 0 20px !important; max-width: 100% !important; }

  .vehicle-hero-card {
    background: #f4f4f5 !important; border: 1px solid #e4e4e7 !important;
    border-radius: 12px; margin-bottom: 20px; page-break-inside: avoid;
  }
  .vehicle-hero-km, .vhs-val { color: #e8600f !important; }

  .tab-panel { display: block !important; }
  .tabs-bar { display: none !important; }

  .maint-milestone { page-break-inside: avoid; }
  .maint-milestone-body { grid-template-rows: 1fr !important; }

  .history-item, .fuel-item { page-break-inside: avoid; border-bottom: 1px solid #e4e4e7; }

  .maint-group-header::before {
    content: ""; display: block;
    border-top: 2px solid #e8600f; margin-bottom: 8px;
  }
  .maint-two-cols { grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
  .gcard-list { grid-template-columns: 1fr !important; }

  .chip { border: 1px solid #e4e4e7 !important; }
  .chip-danger { border-color: #fca5a5 !important; color: #dc2626 !important; }
  .chip-warning { border-color: #fcd34d !important; color: #d97706 !important; }
  .chip-success { border-color: #6ee7b7 !important; color: #059669 !important; }
}

/* ══════════════════════════════════════
   BOUTON PARTAGER
══════════════════════════════════════ */
.btn-share-carnet {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--r-full);
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff; border: none; cursor: pointer; font-family: var(--font);
  font-size: 13px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 2px 12px rgba(22,163,74,0.35);
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .btn-share-carnet:hover { transform: scale(1.04); box-shadow: 0 4px 20px rgba(22,163,74,0.45); }
}
.btn-share-carnet:active { transform: scale(0.97); }

/* Modal partage */
.share-modal-header { text-align: center; padding: 8px 0 16px; }
.share-modal-icon { font-size: 40px; margin-bottom: 8px; }
.share-modal-title { font-size: 18px; font-weight: 900; margin-bottom: 8px; }
.share-modal-sub { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.share-link-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: var(--r-xl); padding: 10px 12px; cursor: text; margin-bottom: 10px;
}
.share-link-input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 11px; color: var(--text-2); font-family: monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.share-link-copy {
  flex-shrink: 0; padding: 6px 14px; border-radius: var(--r-full);
  background: var(--orange); color: #fff; border: none; cursor: pointer;
  font-size: 12px; font-weight: 700; font-family: var(--font);
  transition: transform 140ms var(--ease-out);
}
.share-link-copy:active { transform: scale(0.95); }
.share-modal-note {
  font-size: 11px; color: var(--text-3); text-align: center;
  padding: 0 8px; line-height: 1.5;
}

/* ══════════════════════════════════════
   VUE PARTAGÉE (acheteur)
══════════════════════════════════════ */
.share-view {
  min-height: 100vh; background: var(--bg);
  max-width: 640px; margin: 0 auto;
}

/* Nav */
.share-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 10;
  backdrop-filter: blur(12px);
}
.share-nav-logo { font-size: 16px; font-weight: 900; letter-spacing: -0.3px; }
.share-nav-badge {
  display: flex; align-items: center; gap: 5px;
  background: rgba(22,163,74,0.12); color: #4ade80;
  border: 1px solid rgba(22,163,74,0.2); border-radius: var(--r-full);
  padding: 4px 12px; font-size: 11px; font-weight: 700;
}

/* Hero */
.share-hero {
  position: relative; width: 100%; aspect-ratio: 16/7; overflow: hidden;
  background: var(--surface-2);
}
.share-hero-photo {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.share-hero-photo-empty {
  display: flex; align-items: center; justify-content: center; font-size: 80px;
}
.share-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 60%);
}
.share-hero-content {
  position: absolute; bottom: 20px; left: 20px; right: 20px;
}
.share-hero-title {
  font-size: 24px; font-weight: 900; color: #fff;
  letter-spacing: -0.5px; line-height: 1.1;
}
.share-hero-meta { font-size: 13px; color: rgba(255,255,255,0.7); margin-top: 4px; }
.share-hero-km {
  font-size: 28px; font-weight: 900; color: var(--orange);
  letter-spacing: -1px; margin-top: 6px; line-height: 1;
}
.share-hero-km span { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.7); }

/* KPIs */
.share-kpi-row {
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--border);
}
.share-kpi { flex: 1; padding: 20px 16px; text-align: center; }
.share-kpi-val { font-size: 22px; font-weight: 900; color: var(--orange); letter-spacing: -0.5px; }
.share-kpi-label { font-size: 11px; color: var(--text-3); font-weight: 600; margin-top: 4px; line-height: 1.4; }
.share-kpi-sep { width: 1px; background: var(--border); margin: 12px 0; }

/* Body */
.share-body { padding: 24px 20px 32px; }
.share-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.share-empty { text-align: center; color: var(--text-3); font-size: 14px; padding: 20px 0; }

/* Timeline */
.share-timeline { position: relative; padding-left: 20px; }
.share-timeline::before {
  content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border);
}
.share-log {
  display: flex; gap: 14px; padding-bottom: 20px; position: relative;
}
.share-log-dot {
  position: absolute; left: -20px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface-2); border: 2px solid var(--border);
  flex-shrink: 0; z-index: 1;
}
.share-log-dot.has-invoice { background: var(--orange); border-color: var(--orange); }
.share-log-content { flex: 1; min-width: 0; }
.share-log-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px;
}
.share-log-icon { font-size: 16px; }
.share-log-name { font-size: 14px; font-weight: 700; }
.share-invoice-tag {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  background: rgba(234,88,12,0.1); color: var(--orange);
  border-radius: var(--r-full); white-space: nowrap;
}
.share-invoice-btn {
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  background: rgba(234,88,12,0.12); color: var(--orange);
  border: 1px solid rgba(234,88,12,0.3); border-radius: var(--r-full);
  cursor: pointer; white-space: nowrap; transition: background .15s, transform .1s;
}
.share-invoice-btn:hover { background: rgba(234,88,12,0.22); transform: scale(1.04); }
.share-log-meta { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.share-cost { color: var(--orange); font-weight: 700; }

/* Carburant grid */
.share-fuel-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 8px;
}
.share-fuel-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 12px 14px;
}
.share-fuel-km { font-size: 14px; font-weight: 800; }
.share-fuel-detail { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.share-fuel-date { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.share-more { text-align: center; font-size: 12px; color: var(--text-3); padding: 6px; }

/* Footer */
.share-footer {
  border-top: 1px solid var(--border); padding: 24px 20px 40px;
  background: var(--surface);
}
.share-footer-stamp {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11px; color: var(--text-3); font-weight: 600;
  margin-bottom: 24px;
}
.share-footer-cta { text-align: center; }
.share-footer-cta p {
  font-size: 13px; color: var(--text-2); margin-bottom: 16px; line-height: 1.5;
}

/* ══ Logbook preview ══════════════════════════════════════════════════════════ */
.logbook-preview-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-2xl); overflow: hidden; margin-bottom: 80px;
}
.logbook-hero-wrap {
  position: relative; width: 100%; aspect-ratio: 16/7; overflow: hidden;
  background: var(--surface-2);
}
.logbook-body { padding: 24px 20px 28px; }
.logbook-share-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; border-top: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(232,96,15,0.07) 0%, rgba(232,96,15,0.03) 100%);
}
.logbook-share-banner-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.logbook-share-banner-text strong { font-size: 14px; font-weight: 800; color: var(--text-1); }
.logbook-share-banner-text span { font-size: 12px; color: var(--text-3); line-height: 1.4; }
@media (max-width: 480px) {
  .logbook-share-banner { flex-direction: column; align-items: stretch; }
  .logbook-share-banner .btn-primary { width: 100%; }
}

/* ── Vue partagée standalone ── */
#shared-carnet-root {
  min-height: 100vh;
  background: var(--bg);
}

/* ════════════════════════════════════════
   ADMIN PANEL
════════════════════════════════════════ */

/* Stats row */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 600px) { .admin-stats-row { grid-template-columns: repeat(2, 1fr); } }

.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
}
.admin-stat-card.pro   { border-color: rgba(232,96,15,0.4); background: rgba(232,96,15,0.06); }
.admin-stat-card.disabled { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.05); }
.admin-stat-card.xp   { border-color: rgba(168,85,247,0.3); background: rgba(168,85,247,0.05); }

.admin-stat-val {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-1);
  line-height: 1;
  margin-bottom: 6px;
}
.admin-stat-card.pro   .admin-stat-val { color: var(--orange); }
.admin-stat-card.disabled .admin-stat-val { color: var(--red); }
.admin-stat-card.xp   .admin-stat-val { color: #a855f7; }

.admin-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Toolbar / Search */
.admin-toolbar { margin-bottom: 16px; }
.admin-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.admin-search-wrap i {
  position: absolute;
  left: 12px;
  color: var(--text-3);
  pointer-events: none;
  width: 16px;
  height: 16px;
}
.admin-search-input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.admin-search-input:focus { border-color: var(--orange); }

/* User list */
.admin-user-list { display: flex; flex-direction: column; gap: 8px; }

.admin-user-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .15s;
}
.admin-user-row:hover { border-color: rgba(232,96,15,0.3); }
.admin-user-row.is-disabled { opacity: 0.55; }

.admin-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  flex-shrink: 0;
}
.admin-user-avatar.muted { background: var(--surface-2); color: var(--text-3); }

.admin-user-info { flex: 1; min-width: 0; }
.admin-user-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.admin-user-meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  white-space: nowrap;
}
.admin-btn:hover { border-color: var(--orange); color: var(--text-1); }
.admin-btn.active-pro { border-color: var(--orange); background: var(--orange-light); color: var(--orange); }
.admin-btn.warn { border-color: rgba(245,158,11,0.4); color: #d97706; }
.admin-btn.warn:hover { background: rgba(245,158,11,0.1); }
.admin-btn.danger { border-color: rgba(239,68,68,0.3); color: var(--red); }
.admin-btn.danger:hover { background: rgba(239,68,68,0.08); }
.admin-btn i { width: 13px; height: 13px; }

@media (max-width: 680px) {
  .admin-user-row { flex-wrap: wrap; }
  .admin-user-actions { width: 100%; padding-top: 8px; border-top: 1px solid var(--border); }
}

/* Loading spinner */
.admin-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  color: var(--text-2);
  gap: 14px;
}
.admin-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* User detail modal */
.admin-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.admin-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.admin-detail-item:nth-last-child(-n+2) { border-bottom: none; }
.admin-detail-item span:first-child { color: var(--text-3); font-weight: 600; }
.admin-detail-item span:last-child { color: var(--text-1); font-weight: 700; text-align: right; }

.admin-detail-section {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 18px 0 10px;
}

.admin-vehicle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  margin-bottom: 6px;
}
.admin-vehicle-name { font-size: 13px; font-weight: 800; color: var(--text-1); }
.admin-vehicle-meta { font-size: 12px; color: var(--text-3); }

.admin-log-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.admin-log-row:last-child { border-bottom: none; }

.text-orange { color: var(--orange) !important; }
.text-red    { color: var(--red) !important; }
.text-green  { color: var(--green) !important; }

/* ── Indicateur hors-ligne ─────────────────────────────────────────── */
.offline-indicator {
  position: fixed;
  top: calc(var(--topbar-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--surface-2);
  border: 1px solid var(--amber-light);
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  z-index: 2000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  animation: slideDown 0.25s ease;
}
.offline-indicator.hidden { display: none; }
@keyframes slideDown { from { opacity:0; transform: translateX(-50%) translateY(-8px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }

/* ── Répartition coûts par catégorie ───────────────────────────────── */
.cat-cost-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.cat-cost-row {
  display: grid;
  grid-template-columns: 130px 1fr 90px;
  align-items: center;
  gap: 10px;
}
.cat-cost-label { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.cat-cost-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cat-cost-bar-wrap { height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.cat-cost-bar { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.cat-cost-val { font-size: 12px; font-weight: 700; color: var(--text-1); text-align: right; }
.cat-cost-pct { font-size: 11px; font-weight: 500; color: var(--text-3); margin-left: 4px; }
@media (max-width: 480px) {
  .cat-cost-row { grid-template-columns: 100px 1fr 70px; }
  .cat-cost-label { font-size: 12px; }
}

/* ══════════════════════════════════════════════════════════════
   DASHBOARD CONNECTÉ
══════════════════════════════════════════════════════════════ */
.dashboard-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 24px;
}

/* Greeting */
.dashboard-greeting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 18px 20px;
}
.dashboard-greeting-left { flex: 1; min-width: 0; }
.dashboard-hi { font-size: 17px; font-weight: 700; color: var(--text-1); margin-bottom: 10px; }
.dashboard-hi strong { color: var(--orange); }
.dashboard-level { display: flex; align-items: center; gap: 10px; }
.dashboard-level-icon { font-size: 22px; flex-shrink: 0; }
.dashboard-level-info { flex: 1; min-width: 0; }
.dashboard-level-name { font-size: 13px; font-weight: 700; color: var(--text-1); display: block; margin-bottom: 5px; }
.dashboard-xp-track { height: 5px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: 3px; }
.dashboard-xp-fill { height: 100%; background: linear-gradient(90deg, var(--orange), var(--orange-2)); border-radius: 99px; transition: width .5s var(--ease-out); }
.dashboard-xp-next { font-size: 11px; color: var(--text-3); }

/* Véhicule principal */
.dash-vehicle-card {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface);
}
.dash-vehicle-photo {
  position: relative;
  height: 160px;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-2);
}
.dash-vehicle-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease-out); }
.dash-vehicle-photo:hover img { transform: scale(1.03); }
.dash-vehicle-photo-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 55%); }
.dash-vehicle-body { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; gap: 12px; }
.dash-vehicle-left { flex: 1; min-width: 0; cursor: pointer; }
.dash-vehicle-name { font-size: 17px; font-weight: 900; color: var(--text-1); margin-bottom: 2px; }
.dash-vehicle-km { font-size: 15px; font-weight: 700; color: var(--text-2); }
.dash-vehicle-km span { font-size: 12px; font-weight: 500; }

/* Health ring sur le dashboard */
.dash-health-ring {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-ring-fill { transition: stroke-dasharray .6s var(--ease-out); }
.dash-ring-fill.ok      { stroke: var(--green); }
.dash-ring-fill.warning { stroke: var(--amber); }
.dash-ring-fill.danger  { stroke: var(--red); }
.dash-ring-pct {
  position: absolute;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  pointer-events: none;
}
.dash-ring-pct.ok      { color: var(--green); }
.dash-ring-pct.warning { color: var(--amber); }
.dash-ring-pct.danger  { color: var(--red); }

/* Quick km */
.dash-quick-km {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 16px 18px;
}
.dash-quick-km-label { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.dash-quick-km-row { display: flex; gap: 10px; align-items: center; }
.dash-km-input { flex: 1; font-size: 20px; font-weight: 900; text-align: center; letter-spacing: -1px; }

/* Section label */
.dash-section-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.dash-section-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
}
.dash-section-badge.danger  { background: var(--red-light); color: var(--red); }
.dash-section-badge.warning { background: var(--amber-light); color: var(--amber); }

/* Alertes */
.dash-alerts { display: flex; flex-direction: column; gap: 8px; }
.dash-alert-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dash-alert-row:hover { border-color: var(--border-strong); background: var(--surface-2); }
.dash-alert-row.overdue { border-color: rgba(252,165,165,.2); background: var(--red-dim); }
.dash-alert-row.upcoming { border-color: rgba(251,191,36,.15); background: var(--amber-dim); }
.dash-alert-icon { font-size: 20px; flex-shrink: 0; }
.dash-alert-info { flex: 1; min-width: 0; }
.dash-alert-name { font-size: 14px; font-weight: 700; color: var(--text-1); margin-bottom: 2px; }
.dash-alert-meta { font-size: 12px; }
.dash-alert-chevron { opacity: .4; flex-shrink: 0; }
.dash-status-red   { color: var(--red); font-weight: 700; }
.dash-status-amber { color: var(--amber); font-weight: 700; }
.dash-see-all {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  padding: 10px 0 0;
  display: block;
  text-align: center;
  width: 100%;
  transition: opacity .15s;
}
.dash-see-all:hover { opacity: .75; }

/* All OK */
.dash-all-ok {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--green-dim);
  border: 1px solid var(--green-light);
  border-radius: var(--r-xl);
  padding: 16px 18px;
}
.dash-all-ok-icon { font-size: 28px; flex-shrink: 0; }
.dash-all-ok-title { font-size: 15px; font-weight: 800; color: var(--green); margin-bottom: 2px; }
.dash-all-ok-sub { font-size: 13px; color: var(--text-2); }

/* Autres véhicules */
.dash-other-vehicles { display: flex; flex-direction: column; gap: 8px; }
.dash-mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: border-color .15s;
}
.dash-mini-card:hover { border-color: var(--border-strong); }
.dash-mini-card img { width: 44px; height: 44px; border-radius: var(--r-md); object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.dash-mini-info { flex: 1; min-width: 0; }
.dash-mini-name { font-size: 14px; font-weight: 800; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-mini-km { font-size: 12px; color: var(--text-3); }
.dash-mini-health { font-size: 13px; font-weight: 900; flex-shrink: 0; }
.dash-mini-health.ok      { color: var(--green); }
.dash-mini-health.warning { color: var(--amber); }
.dash-mini-health.danger  { color: var(--red); }

/* Activité récente */
.dash-recent { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; }
.dash-recent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.dash-recent-row:last-of-type { border-bottom: none; }
.dash-recent-icon { font-size: 18px; flex-shrink: 0; }
.dash-recent-info { flex: 1; min-width: 0; }
.dash-recent-name { font-size: 13px; font-weight: 700; color: var(--text-1); }
.dash-recent-meta { font-size: 12px; color: var(--text-3); }
.dash-recent-cost { font-size: 13px; font-weight: 800; color: var(--orange); flex-shrink: 0; }

/* Actions rapides */
.dash-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.dash-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
}
.dash-quick-btn:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-dim); }
.dash-quick-btn svg { opacity: .7; transition: opacity .15s; }
.dash-quick-btn:hover svg { opacity: 1; stroke: var(--orange); }
@media (max-width: 400px) {
  .dash-quick-actions { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════════════════════
   SOCIAL PROOF
══════════════════════════════════════════════════════════════ */
.social-proof-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 8px 0;
}
.social-proof-item { flex: 1; text-align: center; padding: 4px 12px; }
.social-proof-val { font-size: 22px; font-weight: 900; color: var(--orange); letter-spacing: -1px; line-height: 1; margin-bottom: 4px; }
.social-proof-label { font-size: 12px; color: var(--text-3); font-weight: 600; }
.social-proof-sep { width: 1px; background: var(--border); height: 36px; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════
   PRÉVISION COÛTS
══════════════════════════════════════════════════════════════ */
.forecast-card { border-color: rgba(217,119,6,.2); }
.forecast-total {
  background: var(--orange-dim);
  border: 1px solid var(--orange-light);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  margin-bottom: 16px;
  text-align: center;
}
.forecast-total-val { font-size: 28px; font-weight: 900; color: var(--orange); letter-spacing: -1px; }
.forecast-total-label { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.forecast-list { display: flex; flex-direction: column; gap: 8px; }
.forecast-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.forecast-icon { font-size: 18px; flex-shrink: 0; }
.forecast-info { flex: 1; min-width: 0; }
.forecast-name { font-size: 13px; font-weight: 700; color: var(--text-1); }
.forecast-when { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.forecast-cost { font-size: 13px; font-weight: 800; color: var(--orange); flex-shrink: 0; }
.forecast-disclaimer { font-size: 11px; color: var(--text-3); margin-top: 14px; line-height: 1.5; }

/* ══════════════════════════════════════════════════════════════
   PWA INSTALL BANNER
══════════════════════════════════════════════════════════════ */
.pwa-banner {
  position: fixed;
  bottom: calc(var(--bnav-h) + 10px);
  left: 12px;
  right: 12px;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideUpBanner .3s var(--ease-out) both;
}
.pwa-banner.hidden { display: none !important; }
@keyframes slideUpBanner {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pwa-banner-content { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.pwa-banner-icon { font-size: 24px; flex-shrink: 0; }
.pwa-banner-text { min-width: 0; }
.pwa-banner-text strong { display: block; font-size: 14px; font-weight: 800; color: var(--text-1); }
.pwa-banner-text span { font-size: 12px; color: var(--text-3); }
.pwa-banner-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pwa-banner-close { font-size: 16px; color: var(--text-3); padding: 4px 6px; border-radius: var(--r-sm); transition: color .15s; }
.pwa-banner-close:hover { color: var(--text-1); }
@media (min-width: 768px) {
  .pwa-banner { bottom: 16px; max-width: 480px; left: 50%; right: auto; transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════════════════════
   ONBOARDING ENRICHI
══════════════════════════════════════════════════════════════ */
.onboard-steps-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 20px;
}
.onboard-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--border-strong);
  transition: all .25s var(--ease-out);
}
.onboard-dot.active { background: var(--orange); width: 20px; }
.onboard-features { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; text-align: left; }
.onboard-feature { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); font-weight: 500; }
.onboard-feature span { font-size: 18px; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════
   MODE CLAIR
══════════════════════════════════════════════════════════════ */
:root.light {
  --orange: #b45309;
  --orange-2: #d97706;
  --orange-light: rgba(180,83,9,0.12);
  --orange-dim: rgba(180,83,9,0.06);

  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f5f5f4;
  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.18);

  --text: #1c1917;
  --text-1: #1c1917;
  --text-2: rgba(28,25,23,0.60);
  --text-3: rgba(28,25,23,0.35);

  --green: #16a34a;
  --green-light: rgba(22,163,74,0.12);
  --green-dim: rgba(22,163,74,0.06);

  --amber: #b45309;
  --amber-light: rgba(180,83,9,0.12);
  --amber-dim: rgba(180,83,9,0.06);

  --red: #dc2626;
  --red-light: rgba(220,38,38,0.10);
  --red-dim: rgba(220,38,38,0.05);

  --blue: #2563eb;
  --blue-light: rgba(37,99,235,0.10);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.10), 0 1px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
  --shadow-orange: 0 4px 20px -4px rgba(180,83,9,0.20);
}

:root.light #topbar {
  background: rgba(255,255,255,0.90);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

/* Toggle thème */
.pac-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  margin-bottom: 10px;
}

.pac-reminders-card {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  margin-bottom: 10px;
}
.pac-reminders-title { font-size: 14px; font-weight: 800; margin-bottom: 10px; }
.pac-reminder-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.pac-reminder-row:first-of-type { border-top: none; padding-top: 0; }
.pac-reminder-icon { font-size: 17px; flex-shrink: 0; }
.pac-reminder-name { font-size: 13px; font-weight: 700; color: var(--text-1); }
.pac-reminder-vehicle { font-weight: 500; color: var(--text-2); }
.pac-reminder-status { font-size: 12px; margin-top: 2px; }
.pac-reminder-status.overdue { color: var(--red); font-weight: 700; }
.pac-reminder-status.upcoming { color: var(--orange); }

.pac-pro-card {
  text-align: center;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  margin-bottom: 16px;
}
.pac-pro-card.is-pro { border-color: rgba(249,115,22,0.35); background: linear-gradient(135deg, rgba(249,115,22,0.08), var(--surface)); }
.pac-pro-badge { font-size: 15px; font-weight: 800; color: var(--orange); margin-bottom: 6px; }
.pac-pro-desc { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: 14px; }
.pac-pro-card .btn-primary, .pac-pro-card .btn-ghost { width: 100%; }
.pac-theme-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
}
.pac-theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  transition: color .15s;
}
.theme-toggle-track {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--border-strong);
  border-radius: 99px;
  transition: background .2s;
  display: block;
}
.pac-theme-toggle.active .theme-toggle-track { background: var(--orange); }
.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s var(--ease-out);
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  display: block;
}
.pac-theme-toggle.active .theme-toggle-thumb { transform: translateX(18px); }

/* ══════════════════════════════════════════════════════════════
   IMPRESSION PDF
══════════════════════════════════════════════════════════════ */
@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --surface-2: #f5f5f4;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --text: #111827;
    --text-1: #111827;
    --text-2: #374151;
    --text-3: #6b7280;
    --orange: #b45309;
    --green: #16a34a;
    --amber: #b45309;
    --red: #dc2626;
  }
  #topbar, #sidebar, #bottom-nav, #top-mobile-nav,
  .no-print, .modal-overlay, #toast-container, #xp-popup, #badge-popup,
  .pwa-banner, #pwa-install-banner,
  .vehicle-hero-actions, .gcard-actions, .back-btn,
  .tabs-bar { display: none !important; }

  body { background: #fff; color: #111; }
  #main-content { margin: 0 !important; padding: 16px !important; max-width: 100% !important; }
  .tab-panel { display: block !important; }
  .maint-milestone { break-inside: avoid; }

  .print-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 2px solid #111;
    margin-bottom: 24px;
  }
  .print-header-logo { font-size: 20px; font-weight: 900; }
  .print-header-date { font-size: 12px; color: #6b7280; }

  a[href]::after { content: none !important; }
}
