/* Rapports Igeo — styles de la page (thème clair/sombre par variables). */
*, *::before, *::after { box-sizing: border-box; }
button, input { font: inherit; color: inherit; }
img { display: block; }

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #1f6a86;
  --accent-text: #ffffff;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --warn-bg: #fffaeb;
  --warn-text: #93370d;
  /* En-tête du tableau : bleu pétrole institutionnel Igeo */
  --table-head-bg: #1f6a86;
  --table-head-text: #ffffff;
  --row-alt: #f8fafc;
  --row-open: #e8f2f6;
  /* Variables lues par js/ui/dropdown.js */
  --notion-bg: #ffffff;
  --notion-surface: #ffffff;
  --notion-surface-hover: #f1f5f9;
  --notion-border: #e2e8f0;
  --notion-text: #0f172a;
  --notion-text-muted: #64748b;
  --notion-accent: #1f6a86;
  --notion-tag-blue-bg: rgba(31, 106, 134, 0.12);
}
html.dark {
  color-scheme: dark;
  --bg: #111315;
  --surface: #1a1d20;
  --surface-2: #202427;
  --surface-hover: #262a2e;
  --border: #2e3338;
  --text: #e6e6e6;
  --text-muted: #9ba3ab;
  --accent: #4aa3c3;
  --accent-text: #0b1418;
  --danger: #ff8a7a;
  --danger-bg: rgba(255, 115, 105, 0.12);
  --warn-bg: rgba(235, 196, 70, 0.12);
  --warn-text: #f1c742;
  --table-head-bg: #1f6a86;
  --row-alt: #1e2124;
  --row-open: #1d3540;
  --notion-bg: #191919;
  --notion-surface: #202020;
  --notion-surface-hover: #262626;
  --notion-border: #2e3338;
  --notion-text: #e6e6e6;
  --notion-text-muted: #9b9a97;
  --notion-accent: #58a6ff;
  --notion-tag-blue-bg: rgba(82, 156, 202, 0.18);
}
html, body { height: 100%; }
body.eco-page {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
}
.ms {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}
@keyframes scaleUp { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }

/* ── Typographie & utilitaires d'épaisseur et contraste ── */
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }
.text-success { color: #16a34a !important; }
.text-danger { color: #dc2626 !important; }
.text-primary { color: #2563eb !important; }
.text-muted { color: var(--text-muted, #64748b) !important; }
.text-xs { font-size: 11px !important; }
.text-sm { font-size: 12px !important; }

.eco-shell { display: flex; flex-direction: column; height: 100%; }
.eco-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.eco-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.eco-topbar img { height: 28px; }
.eco-topbar .eco-title { font-weight: 700; font-size: 15px; }
.eco-topbar .eco-sub { color: var(--text-muted); font-size: 12px; }
.eco-topbar .eco-spacer { flex: 1; }
.eco-user { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 12px; }

.eco-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 6px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.eco-btn:hover { background: var(--surface-hover); }
.eco-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.eco-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.eco-btn.primary:hover { filter: brightness(1.08); }
.eco-btn.ghost { border-color: transparent; background: transparent; }

.notion-modal-dropdown-trigger.eco-trigger {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  background: var(--notion-surface, #fff); border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; font-size: 12px; color: var(--text); max-width: 100%;
}
.eco-trigger .eco-trigger-label { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eco-trigger .ms { font-size: 16px; color: var(--text-muted); }

.eco-input {
  height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 12px; min-width: 0;
}
.eco-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* ── Connexion ── */
.eco-login { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.eco-login-card {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px 24px; display: flex; flex-direction: column; gap: 14px;
}
.eco-login-card img { height: 40px; align-self: flex-start; }
.eco-login-card h1 { font-size: 20px; font-weight: 700; margin: 0; }
.eco-small { font-size: 12px; }
.eco-small a { color: var(--accent); font-weight: 600; text-decoration: none; }
.eco-small a:hover { text-decoration: underline; }
.eco-login-card p { margin: 0; color: var(--text-muted); line-height: 1.5; }
.eco-login-card .eco-btn.primary { height: 40px; justify-content: center; font-size: 13px; }
.eco-login-card details summary { cursor: pointer; color: var(--text-muted); font-size: 12px; }
.eco-token-row { display: flex; gap: 8px; margin-top: 8px; }
.eco-token-row .eco-input { flex: 1; }

.eco-alert { border-radius: 8px; padding: 8px 12px; font-size: 12px; line-height: 1.45; }
.eco-alert.error { background: var(--danger-bg); color: var(--danger); }
.eco-alert.warn { background: var(--warn-bg); color: var(--warn-text); }

/* ── Espace de travail ── */
.eco-workspace { flex: 1; display: flex; min-height: 0; position: relative; }
.eco-units {
  width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px;
  padding: 12px; background: var(--surface); border-right: 1px solid var(--border); min-height: 0;
  position: relative;
  transition: width 0.18s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s ease, padding 0.18s ease;
}

/* ── Sidebar Redimensionnable, Pliable & Commutateur de vue ── */
.eco-workspace.sidebar-collapsed .eco-units {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-right: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}
.eco-workspace.sidebar-collapsed .eco-sidebar-resizer {
  display: none !important;
}
.eco-sidebar-resizer {
  width: 6px;
  margin: 0 -3px;
  cursor: col-resize;
  position: relative;
  z-index: 20;
  user-select: none;
  background: transparent;
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.eco-sidebar-resizer:hover,
.eco-sidebar-resizer.is-resizing {
  background: var(--accent, #2563eb);
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.5);
}
.eco-units-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}
.eco-units-head-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.eco-units-head-right {
  display: flex;
  align-items: center;
}
.eco-sidebar-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.eco-sidebar-collapse-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--accent);
}
.eco-sidebar-uncollapse-btn {
  /* En bas à gauche : ne recouvre plus le bouton de période de la barre d'outils. */
  position: fixed;
  bottom: 16px;
  left: 12px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 6px;
  border-radius: 8px;
  background: var(--surface, #ffffff);
  color: var(--text, #1e293b);
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.eco-sidebar-uncollapse-btn:hover {
  background: var(--surface-hover, #f1f5f9);
  border-color: var(--accent, #2563eb);
  color: var(--accent, #2563eb);
  transform: translateX(2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.2);
}
.eco-sidebar-uncollapse-btn .ms {
  font-size: 16px;
}

/* Commutateur de vue : Groupes vs Véhicules */
.eco-unit-view-switch {
  display: flex;
  background: var(--surface-2, #f1f5f9);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}
.eco-view-switch-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--text-muted, #64748b);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.eco-view-switch-btn .ms {
  font-size: 14px;
}
.eco-view-switch-btn:hover {
  color: var(--text, #1e293b);
}
.eco-view-switch-btn.active {
  background: var(--surface, #ffffff);
  color: var(--accent, #2563eb);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.dark .eco-unit-view-switch {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}
.dark .eco-view-switch-btn.active {
  background: var(--surface, #1e293b);
  color: #38bdf8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.dark .eco-sidebar-uncollapse-btn {
  background: #1e293b;
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.eco-units-head span.count { color: var(--text-muted); font-weight: 500; font-size: 12px; }
.eco-units-actions { display: flex; gap: 6px; }
.eco-units-actions .eco-btn { flex: 1; justify-content: center; height: 28px; }
.eco-units-actions .eco-btn.eco-btn-icon { flex: 0 0 28px; width: 28px; padding: 0; }
.eco-units-actions .eco-btn.eco-btn-icon .ms { font-size: 16px; }
.eco-unit-list { flex: 1; overflow-y: auto; min-height: 0; margin: 0 -4px; }
.eco-unit {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; cursor: pointer;
  font-size: 12px;
}
.eco-unit:hover { background: var(--surface-hover); }
.eco-unit input { accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; }
.eco-unit .eco-unit-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eco-unit .eco-unit-plate { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.eco-unit-fuel-tag { display: inline-flex; align-items: center; margin-left: auto; flex-shrink: 0; }

/* ── Filtre de compatibilité carburant dans la barre latérale ── */
.eco-filter-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.eco-filter-card:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}
.eco-filter-card.active {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.35);
}
.eco-filter-card-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text);
}
.eco-filter-card.active .eco-filter-card-left {
  color: #16a34a;
}
.eco-filter-card input[type="checkbox"] {
  accent-color: #16a34a;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* ── Menu Accordéon des groupes dans la barre latérale ── */
.eco-group-accordion {
  margin-bottom: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.eco-group-accordion-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--surface-2);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  user-select: none;
  transition: background 0.12s ease;
}
.eco-group-accordion-head:hover {
  background: var(--surface-hover);
}
.eco-group-chevron {
  font-size: 16px;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}
.eco-group-icon {
  font-size: 15px;
  color: var(--accent);
}
.eco-group-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.eco-group-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--border);
  color: var(--text-muted);
}
.eco-group-badge.has-selected {
  background: rgba(37, 99, 235, 0.15);
  color: #2563eb;
}
.eco-group-check {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.eco-group-accordion-body {
  padding: 2px 4px 4px 10px;
  max-height: 380px;
  overflow-y: auto;
}
.eco-group-accordion-body.hidden {
  display: none;
}

.eco-report { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.eco-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.eco-toolbar .eco-sep { flex: 1; }
.eco-custom-range { display: inline-flex; align-items: center; gap: 6px; }
.eco-custom-range .eco-input { width: 178px; }
.eco-status { padding: 10px 16px; display: flex; flex-direction: column; gap: 8px; }
.eco-summary { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--text-muted); }
.eco-summary b { color: var(--text); font-weight: 700; }
.eco-progress { height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.eco-progress > div { height: 100%; background: var(--accent); transition: width 0.2s; }

.eco-report-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 0 16px 8px;
}
.eco-report-head h2 { margin: 0; font-size: 18px; font-weight: 500; }
.eco-report-head .eco-period { color: var(--text-muted); font-size: 13px; }

.eco-table-wrap { flex: 1; min-height: 0; overflow: auto; margin: 0 16px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
table.eco-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  font-weight: 500;
  width: max-content;
  min-width: 100%;
  color: var(--text, #0f172a);
}
.eco-table > thead > tr > th {
  position: sticky; top: 0; z-index: 2; background: var(--table-head-bg); color: var(--table-head-text);
  font-weight: 700; text-align: center; padding: 10px 8px; line-height: 1.3; vertical-align: middle;
  font-size: 12px;
  letter-spacing: 0.01em;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}
.eco-table > tbody > tr > td {
  padding: 8px 8px; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--border);
  line-height: 1.4;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text, #0f172a);
}
.eco-table > tbody > tr > td.left { text-align: left; }
.eco-table > thead > tr > th:first-child, .eco-table > tbody > tr.trip > td:first-child { position: sticky; left: 0; z-index: 1; }
.eco-table > thead > tr > th:first-child { z-index: 3; }
.eco-table > tbody > tr.trip { cursor: pointer; }
.eco-table > tbody > tr.trip > td { background: var(--surface); }
.eco-table > tbody > tr.trip.alt > td { background: var(--row-alt); }
.eco-table > tbody > tr.trip:hover > td { background: var(--surface-hover); }
.eco-table > tbody > tr.trip.open > td { background: var(--row-open); }
.eco-caret { font-size: 16px; color: var(--text-muted); margin-right: 2px; }
.eco-table > tbody > tr.detail > td { background: var(--surface-2); padding: 0; text-align: left; }
.eco-detail { position: sticky; left: 0; max-width: min(1200px, calc(100vw - 340px)); padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.eco-detail h4 { margin: 8px 0 2px; font-size: 12px; font-weight: 700; }
.eco-detail h4:first-child { margin-top: 0; }
.eco-detail table { border-collapse: collapse; font-size: 11px; width: 100%; }
.eco-detail th { text-align: left; color: var(--text-muted); font-weight: 600; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.eco-detail td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.eco-detail a { color: var(--accent); text-decoration: underline; }
.eco-empty { padding: 40px 16px; text-align: center; color: var(--text-muted); }
.eco-more { display: flex; justify-content: center; padding: 10px; }

@media (max-width: 860px) {
  .eco-workspace { flex-direction: column; overflow-y: auto; }
  .eco-units { width: auto; border-right: none; border-bottom: 1px solid var(--border); max-height: 42vh; }
  .eco-report { min-height: 70vh; }
  .eco-detail { max-width: calc(100vw - 48px); }
  .eco-topbar .eco-sub { display: none; }
}

/* ── Bouton Thème (Clair / Sombre) ── */
.eco-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}
.eco-theme-btn:hover {
  background: var(--surface-hover);
  color: var(--accent);
  border-color: var(--accent);
}
.eco-theme-btn .ms {
  font-size: 19px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.eco-theme-btn:hover .ms {
  transform: rotate(18deg) scale(1.08);
}
.eco-theme-btn:active .ms {
  transform: scale(0.92);
}

/* ── Langue ── */
.eco-lang { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.eco-lang button { border: 0; background: var(--surface); padding: 5px 9px; font-size: 11px; font-weight: 700; cursor: pointer; color: var(--text-muted); }
.eco-lang button.is-active { background: var(--accent); color: var(--accent-text); }
.eco-topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ── Tableau : en-têtes larges pour les colonnes de texte ── */
.eco-table > thead > tr > th.wide { min-width: 160px; }
.eco-empty-small { padding: 16px; }

/* ── Détail d'un trajet ── */
.eco-detail-note { margin: 0; color: var(--text-muted); }
.eco-detail-scroll { overflow-x: auto; }
.eco-chips { min-width: 220px; }
.eco-chip {
  display: inline-block; margin: 1px 3px 1px 0; padding: 1px 6px; border-radius: 10px;
  background: var(--surface-hover); border: 1px solid var(--border); font-size: 10px; white-space: nowrap;
}

/* ── Menus Notion (js/notion_dropdown.js) ── */
.notion-dropdown-menu {
  position: fixed; z-index: 99999; display: flex; flex-direction: column;
  background: var(--notion-surface); color: var(--notion-text);
  border: 1px solid var(--notion-border); border-radius: 12px; padding: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); font-size: 12px; user-select: none;
  animation: scaleUp 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.notion-dropdown-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.notion-dropdown-title {
  padding: 6px 10px; margin-bottom: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--notion-text-muted); border-bottom: 1px solid var(--notion-border);
}
.notion-dropdown-search { position: relative; display: flex; align-items: center; padding: 4px; margin-bottom: 4px; }
.notion-dropdown-search .ms { position: absolute; left: 12px; font-size: 15px; opacity: 0.5; pointer-events: none; }
.notion-dropdown-search input {
  width: 100%; border-radius: 8px; padding: 6px 10px 6px 30px; font-size: 12px;
  background: var(--notion-bg); border: 1px solid var(--notion-border); color: var(--notion-text); outline: none;
}
.notion-dropdown-search input:focus { border-color: var(--notion-accent); }
.notion-dropdown-list { flex: 1; overflow-y: auto; min-height: 0; }
.notion-dropdown-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer;
}
.notion-dropdown-item:hover { background: var(--notion-surface-hover); }
.notion-dropdown-item.is-selected { background: var(--notion-tag-blue-bg); color: var(--notion-accent); font-weight: 700; }
.notion-dropdown-item.is-disabled { opacity: 0.4; pointer-events: none; }
.notion-dropdown-item .ms { font-size: 16px; opacity: 0.75; }
.notion-dropdown-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notion-dropdown-badge {
  padding: 1px 6px; border-radius: 10px; font-size: 10px; background: var(--notion-surface-hover); color: var(--notion-text-muted);
}
.notion-dropdown-check { margin-left: auto; }
.notion-dropdown-empty { padding: 14px; text-align: center; opacity: 0.6; }
.notion-dropdown-group {
  padding: 8px 10px 4px; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--notion-text-muted);
}

/* ── Sélecteur de colonnes (js/column_picker.js) ── */
.column-picker-presets { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 4px 4px; }
.column-picker-preset {
  border: 1px solid var(--notion-border); background: var(--notion-bg); border-radius: 6px;
  padding: 3px 8px; font-size: 11px; cursor: pointer;
}
.column-picker-preset:hover { border-color: var(--notion-accent); color: var(--notion-accent); }
.column-picker-item { padding: 5px 10px; }
.column-picker-item input, .column-picker-stat input { accent-color: var(--accent); margin: 0; }
.column-picker-hint { padding: 4px 10px 8px; color: var(--notion-text-muted); font-style: italic; }
.column-picker-sensor { display: flex; flex-direction: column; gap: 3px; padding: 5px 10px; border-radius: 8px; }
.column-picker-sensor:hover { background: var(--notion-surface-hover); }
.column-picker-sensor-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.column-picker-stats { display: flex; flex-wrap: wrap; gap: 4px; }
.column-picker-stat {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--notion-border); font-size: 10px;
}
.column-picker-stat.is-on { border-color: var(--notion-accent); color: var(--notion-accent); background: var(--notion-tag-blue-bg); }
.column-picker-footer { padding: 6px 10px 2px; border-top: 1px solid var(--notion-border); margin-top: 4px; color: var(--notion-text-muted); }
.column-picker-footer.is-warning { color: var(--danger); }

/* ── Sélecteur de rapport dans la barre latérale ── */
.eco-report-selector {
  display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.eco-report-selector-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted);
}
.eco-report-selector-head .badge {
  background: rgba(31, 106, 134, 0.12); color: var(--accent); padding: 1px 6px;
  border-radius: 10px; font-weight: 700;
}
.eco-report-card {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); cursor: pointer;
  transition: all 0.15s ease;
}
.eco-report-card:hover {
  background: var(--surface-hover); border-color: var(--accent);
}
.eco-report-card-icon {
  width: 30px; height: 30px; border-radius: 6px; background: var(--accent);
  color: var(--accent-text); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.eco-report-card-icon .ms { font-size: 18px; }
.eco-report-card-info { flex: 1; min-width: 0; }
.eco-report-card-title {
  font-weight: 700; font-size: 12px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eco-report-card-desc {
  font-size: 10px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eco-report-card-caret { color: var(--text-muted); }

/* ── Grille KPI de synthèse ── */
.eco-kpi-grid {
  display: flex; flex-wrap: wrap; gap: 10px; padding: 0 16px 12px;
}
.eco-kpi-card {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03); min-width: 130px;
}
.eco-kpi-icon {
  width: 28px; height: 28px; border-radius: 6px; background: rgba(31, 106, 134, 0.1);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
}
.eco-kpi-icon .ms { font-size: 16px; }
.eco-kpi-content { display: flex; flex-direction: column; }
.eco-kpi-val { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.2; }
.eco-kpi-lbl { font-size: 10px; color: var(--text-muted); font-weight: 500; }

/* ── Badges de tableau ── */
.eco-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px;
  border-radius: 10px; font-size: 10px; font-weight: 600; white-space: nowrap;
}
.eco-badge.trip { background: rgba(31, 106, 134, 0.12); color: var(--accent); }
.eco-badge.stop { background: rgba(100, 116, 139, 0.15); color: var(--text-muted); }
.eco-badge.danger { background: var(--danger-bg); color: var(--danger); }
.eco-badge.warn { background: var(--warn-bg); color: var(--warn-text); }

/* ── Vue interactive V13 · Rapport journalier (Adaptation Securysat 1:1 aux couleurs Igeo) ── */
.v13-view {
  display: flex; flex-direction: column; gap: 16px; padding: 0 16px 20px;
}
.v13-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.v13-toolbar-label {
  display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text-muted);
}
.v13-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.v13-day-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 11px; color: var(--text);
  cursor: pointer; transition: all 0.15s ease;
}
.v13-day-pill:hover { background: var(--surface-hover); border-color: var(--accent); }
.v13-day-pill.active {
  background: var(--accent); color: var(--accent-text); border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(31, 106, 134, 0.25);
}
.v13-pill-badge {
  background: rgba(255, 255, 255, 0.2); padding: 1px 6px; border-radius: 10px; font-size: 10px; font-weight: 700;
}
.v13-day-pill:not(.active) .v13-pill-badge {
  background: rgba(31, 106, 134, 0.1); color: var(--accent);
}

/* ── Hero 2 colonnes officiel Securysat (39% Fiche gauche / 59% Carte droite) ── */
.v13-hero-row {
  display: grid;
  grid-template-columns: 39% 59%;
  gap: 2%;
  align-items: stretch;
}
@media (max-width: 960px) {
  .v13-hero-row { grid-template-columns: 1fr; gap: 16px; }
}

/* Panneau Gauche (Fiche Journalière Securysat) */
.v13-panel-left {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.05);
  min-width: 0;
  overflow: hidden;
}
.v13-panel-title {
  text-align: center; font-size: 13.5px; font-weight: 800; color: var(--text);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v13-panel-title u { text-decoration: underline; text-underline-offset: 3px; }
.v13-panel-date {
  text-align: center; font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 6px;
}
.v13-panel-map-toggle {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; font-size: 11px;
  color: var(--text); margin-bottom: 4px;
}
.v13-panel-map-toggle label {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
}
.v13-panel-map-toggle input { cursor: pointer; accent-color: var(--accent); }
.v13-fields-btn {
  padding: 2px 8px !important;
  height: 24px !important;
  font-size: 11px !important;
  border-radius: 6px !important;
  border: 1px solid var(--border) !important;
  background: var(--surface-2) !important;
}
.v13-fields-btn:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
.v13-panel-disclaimer {
  text-align: center; font-size: 10px; color: var(--text-muted); font-style: italic; margin-bottom: 10px;
}
.v13-info-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
  font-size: 11px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
@media (max-width: 680px) {
  .v13-info-column { grid-template-columns: 1fr; }
}
.v13-info-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.v13-info-row b {
  color: var(--text); font-weight: 600; white-space: nowrap; flex-shrink: 0;
}
.v13-info-row span {
  color: var(--text);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.v13-info-row .highlight { font-weight: 700; color: var(--accent); }

/* Panneau Droite (Carte Leaflet) */
.v13-map-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.05);
}
.v13-map-head {
  display: flex; align-items: center; justify-content: space-between; padding: 8px 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.v13-map-actions { display: flex; align-items: center; gap: 6px; }
.v13-map-container { flex: 1; min-height: 340px; width: 100%; background: #e5e7eb; }
.v13-map-fullscreen {
  position: fixed !important; top: 0; left: 0; width: 100vw !important; height: 100vh !important;
  z-index: 99999; border-radius: 0 !important;
}
.v13-map-fullscreen .v13-map-container { height: calc(100vh - 44px) !important; }

/* ── Frise chronologique d'activité 0h - 24h (Timeline) ── */
.v13-timeline-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.v13-timeline-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
  font-size: 11px; font-weight: 700; color: var(--text);
}
.v13-timeline-legend {
  display: flex; align-items: center; gap: 12px; font-size: 10px; color: var(--text-muted);
}
.v13-legend-item { display: flex; align-items: center; gap: 4px; }
.v13-legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.v13-legend-dot.trip { background: var(--accent); }
.v13-legend-dot.stop { background: #f59e0b; }
.v13-legend-dot.idle { background: #ea580c; }

.v13-timeline-track {
  position: relative; height: 32px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden; margin-bottom: 6px;
}
.v13-timeline-segment {
  position: absolute; top: 0; height: 100%; cursor: pointer; transition: opacity 0.15s ease;
}
.v13-timeline-segment:hover { opacity: 0.85; filter: brightness(1.1); }
.v13-timeline-segment.trip { background: var(--accent); }
.v13-timeline-segment.stop { background: #f59e0b; }
.v13-timeline-segment.idle { background: #ea580c; }
.v13-timeline-ticks {
  display: flex; justify-content: space-between; font-size: 9px; font-family: monospace;
  color: var(--text-muted); padding: 0 2px;
}

/* ── Tableau des trajets de la journée (V03 Rapport trajets) ── */
.v13-trips-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.v13-table-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.v13-trip-row { cursor: pointer; transition: background 0.12s ease; }
.v13-trip-row:hover { background: var(--surface-hover); }
.v13-trip-row.active {
  background: rgba(31, 106, 134, 0.12) !important; border-left: 3px solid var(--accent);
}
html.dark .v13-trip-row.active {
  background: rgba(74, 163, 195, 0.18) !important;
}

/* Tracés et Marqueurs Leaflet — White Outline Dynamique O(1) */
path.igeo-route-outline {
  stroke-width: var(--igeo-outline-w, 5.9px);
}
path.igeo-route-outline.is-highlighted {
  stroke-width: var(--igeo-outline-hi-w, 9.1px);
}
path.igeo-route-line {
  stroke-width: var(--igeo-route-w, 3.5px);
}
path.igeo-route-line.is-highlighted {
  stroke-width: var(--igeo-route-hi-w, 5px);
}

.v13-custom-marker, .v20-custom-pin { display: flex; align-items: center; justify-content: center; }
.igeo-map-pin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: scale(var(--igeo-icon-scale, 1));
  transform-origin: 50% 92%;
  transition: transform 0.15s ease;
  will-change: transform;
}
.igeo-map-pin-icon img,
.igeo-map-pin-icon svg {
  display: block;
  pointer-events: none;
  overflow: visible;
}
.igeo-map-pin-icon .igeo-icon-outline,
.igeo-map-pin-icon .igeo-pin-outline,
.igeo-map-pin-icon .igeo-flag-outline {
  stroke-width: var(--igeo-icon-outline-w, 7.2px);
  transition: stroke-width 0.12s ease;
}
.igeo-map-pin-icon .igeo-icon-keyline,
.igeo-map-pin-icon .igeo-pin-shadow,
.igeo-map-pin-icon .igeo-flag-shadow {
  stroke-width: var(--igeo-icon-keyline-w, 9px);
  transition: stroke-width 0.12s ease;
}
.igeo-map-pin-icon:hover {
  transform: scale(calc(var(--igeo-icon-scale, 1) * 1.15));
}
.v13-stop-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  color: #2563eb;
  border: var(--igeo-stop-border, 2.3px) solid #2563eb;
  font-weight: 800;
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 var(--igeo-stop-ring, 3px) #ffffff,
    0 0 0 calc(var(--igeo-stop-ring, 3px) + 1.1px) rgba(15, 23, 42, 0.28),
    0 3px 7px rgba(15, 23, 42, 0.38);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  cursor: pointer;
  user-select: none;
  transform: scale(var(--igeo-icon-scale, 1));
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.12s ease;
}
.v13-stop-badge:hover {
  transform: scale(calc(var(--igeo-icon-scale, 1) * 1.18));
  background: #2563eb;
  color: #ffffff;
  border-color: #ffffff;
}
.v20-event-pin-badge {
  width: 34px;
  height: 34px;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--igeo-stop-border, 2.3px) solid #ffffff;
  box-shadow:
    0 0 0 var(--igeo-stop-ring, 2.8px) #ffffff,
    0 0 0 calc(var(--igeo-stop-ring, 2.8px) + 1.1px) rgba(15, 23, 42, 0.28),
    0 3px 10px rgba(15, 23, 42, 0.42);
  transform: scale(var(--igeo-icon-scale, 1));
  transition: transform 0.15s ease, box-shadow 0.12s ease;
}
.v20-event-pin-badge:hover {
  transform: scale(calc(var(--igeo-icon-scale, 1) * 1.14));
}
.v13-pin-circle {
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 0 0 var(--igeo-stop-ring, 2.5px) #ffffff, 0 2px 6px rgba(0, 0, 0, 0.35); border: 2px solid #ffffff;
}
.v13-pin-circle.start { width: 26px; height: 26px; background: #10b981; }
.v13-pin-circle.end { width: 26px; height: 26px; background: #ef4444; }
.v13-pin-circle.stop { width: 20px; height: 20px; background: #f59e0b; }
.v13-map-popup { font-family: inherit; font-size: 11px; line-height: 1.4; color: #1e293b; }

.v13-multiday-details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.v13-multiday-summary {
  display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--accent); cursor: pointer;
}

/* ── Améliorations Leaflet en mode sombre ── */
html.dark .leaflet-popup-content-wrapper,
html.dark .leaflet-popup-tip {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
}
html.dark .v13-map-popup {
  color: var(--text);
}
html.dark .v13-map-popup .text-muted {
  color: var(--text-muted);
}
html.dark .leaflet-bar a {
  background-color: var(--surface);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
html.dark .leaflet-bar a:hover {
  background-color: var(--surface-hover);
  color: var(--accent);
}
html.dark .leaflet-control-layers {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
html.dark .leaflet-control-layers-expanded {
  background: var(--surface);
  color: var(--text);
}
html.dark .leaflet-control-attribution {
  background: rgba(26, 29, 32, 0.8) !important;
  color: var(--text-muted) !important;
}
html.dark .leaflet-control-attribution a {
  color: var(--accent) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RAPPORT V20 · GESTION CARBURANT & ÉNERGIE (F03, F04, V35, COURBE 5MIN)
   ═══════════════════════════════════════════════════════════════════════════════ */
.v20-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px;
}

/* ── Barre de sélection des véhicules (Pills) ── */
.v20-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.v20-pills-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.v20-toolbar-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.v20-veh-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.v20-veh-pill:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}
.v20-veh-pill.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(31, 106, 134, 0.3);
}
.v20-veh-pill .v20-pill-badge {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
  font-weight: 800;
}
.v20-veh-pill.active .v20-pill-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ── Carte Graphique de niveau de cuve ── */
.v20-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.v20-chart-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.v20-chart-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.v20-chart-vehicle-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(31, 106, 134, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
}
html.dark .v20-chart-vehicle-badge {
  background: rgba(74, 163, 195, 0.15);
  color: var(--accent);
}
.v20-chart-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}
.v20-chart-actions-left {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.v20-chart-actions-right {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.v20-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-hover, #f1f5f9);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}
.v20-icon-btn:hover {
  background: var(--bg-card, #ffffff);
  color: var(--accent, #1f6a86);
  border-color: var(--accent, #1f6a86);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
html.dark .v20-icon-btn {
  background: rgba(255, 255, 255, 0.05);
}
html.dark .v20-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent, #4aa3c3);
  border-color: var(--accent, #4aa3c3);
}

.v20-source-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-hover, #f1f5f9);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
html.dark .v20-source-toggle {
  background: rgba(255, 255, 255, 0.05);
}
.v20-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.v20-source-btn:hover {
  color: var(--text);
}
.v20-source-btn.active {
  background: var(--bg-card, #ffffff);
  color: var(--accent, #1f6a86);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
html.dark .v20-source-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent, #4aa3c3);
}
.v20-mini-spinner {
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: v20-spin-anim 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes v20-spin-anim {
  to { transform: rotate(360deg); }
}

.v20-mode-selector {
  display: inline-flex;
  align-items: center;
  background: var(--bg-hover, #f1f5f9);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
html.dark .v20-mode-selector {
  background: rgba(255, 255, 255, 0.05);
}
.v20-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.v20-mode-btn:hover {
  color: var(--text);
}
.v20-mode-btn.active {
  background: var(--bg-card, #ffffff);
  color: var(--accent, #1f6a86);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
html.dark .v20-mode-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent, #4aa3c3);
}

.v20-interval-slider-card {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  background: var(--bg-hover, #f1f5f9);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  min-width: 175px;
}
html.dark .v20-interval-slider-card {
  background: rgba(255, 255, 255, 0.05);
}
.v20-interval-slider-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.v20-interval-slider-title {
  font-weight: 600;
  color: var(--text-muted);
}
.v20-interval-pill {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
}
html.dark .v20-interval-pill {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}
.v20-interval-slider-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.v20-slider-limit {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
}
.v20-range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  background: var(--border, #cbd5e1);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  margin: 0;
}
.v20-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.1s ease;
}
.v20-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
.v20-range-input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
html.dark .v20-range-input {
  background: rgba(255, 255, 255, 0.15);
}
html.dark .v20-range-input::-webkit-slider-thumb {
  background: #38bdf8;
  border-color: #0f172a;
}

.v20-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.v20-zoom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card, #ffffff);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.v20-zoom-btn:hover {
  background: var(--bg-hover, #f1f5f9);
  color: var(--text);
}
html.dark .v20-zoom-btn {
  background: rgba(255, 255, 255, 0.05);
}
html.dark .v20-zoom-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.v20-hud-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 7px 14px;
  background: var(--bg-hover, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
  color: var(--text);
  min-height: 34px;
}
html.dark .v20-hud-bar {
  background: rgba(255, 255, 255, 0.04);
}
.v20-hud-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.v20-hud-item .ms {
  font-size: 14px;
}
.v20-hud-item.fuel {
  font-weight: 700;
  color: var(--accent, #1f6a86);
}
.v20-hud-item.addr {
  max-width: 440px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}
.v20-zoom-brush {
  fill: rgba(37, 99, 235, 0.18);
  stroke: #2563eb;
  stroke-width: 1px;
  stroke-dasharray: 2,2;
}

/* Légende du graphique */
.v20-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.v20-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.v20-legend-line {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}
.v20-legend-line.raw {
  background: #f59e0b;
  height: 0;
  border-top: 2px dashed #f59e0b;
}
.v20-legend-line.filtered {
  background: #2563eb;
}
.v20-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.v20-legend-dot.refuel {
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}
.v20-legend-dot.theft {
  background: #dc2626;
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

/* ── Ligne Trajet Interactive & Sélection V35 ── */
.v20-trip-row {
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.v20-trip-row:hover {
  background: rgba(56, 189, 248, 0.08) !important;
}
.v20-trip-row.selected {
  background: rgba(56, 189, 248, 0.16) !important;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #0284c7;
}
html.dark .v20-trip-row.selected {
  background: rgba(56, 189, 248, 0.22) !important;
  box-shadow: inset 3px 0 0 #38bdf8;
}

/* ── Badge chip de trajet sélectionné ── */
.v20-trip-highlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #0284c7;
  margin-left: 8px;
}
html.dark .v20-trip-highlight-badge {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}
.v20-chip-clear {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 0;
  opacity: 0.7;
}
.v20-chip-clear:hover {
  opacity: 1;
}

/* ── Masque d'assombrissement du graphe ── */
.v20-chart-dim-mask {
  transition: opacity 0.25s ease;
}

/* ── Surbrillance des sections d'événements sur la courbe (Highlight hybride) ── */
.v20-event-band {
  cursor: pointer;
  transition: fill 0.2s ease, stroke-opacity 0.2s ease;
}
.v20-event-band.refuel {
  fill: rgba(22, 163, 74, 0.13);
  stroke: rgba(22, 163, 74, 0.45);
  stroke-width: 1px;
  stroke-dasharray: 3,3;
}
.v20-event-band.refuel:hover {
  fill: rgba(22, 163, 74, 0.24);
  stroke: #16a34a;
}
.v20-event-band.theft {
  fill: rgba(220, 38, 38, 0.13);
  stroke: rgba(220, 38, 38, 0.45);
  stroke-width: 1px;
  stroke-dasharray: 3,3;
}
.v20-event-band.theft:hover {
  fill: rgba(220, 38, 38, 0.24);
  stroke: #dc2626;
}
.v20-event-band.manual {
  fill: rgba(139, 92, 246, 0.16);
  stroke: rgba(139, 92, 246, 0.7);
  stroke-dasharray: 4,4;
}
.v20-event-band.manual:hover {
  fill: rgba(139, 92, 246, 0.28);
  stroke: #8b5cf6;
}
.v20-band-resize-handle {
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
}
.v20-band-resize-handle circle {
  transition: r 0.12s cubic-bezier(0.4, 0, 0.2, 1), fill 0.12s ease, stroke-width 0.12s ease;
}
.v20-band-resize-handle:hover circle,
.v20-band-resize-handle.active circle {
  r: 7.5;
  fill: #7c3aed;
  stroke: #ffffff;
  stroke-width: 2.5;
  filter: drop-shadow(0 2px 4px rgba(124, 58, 237, 0.5));
}
.v20-band-resize-handle:hover line,
.v20-band-resize-handle.active line {
  stroke: #7c3aed;
  stroke-width: 4.5;
}

.v20-event-curve-highlight {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.v20-event-curve-highlight.refuel {
  stroke: #16a34a;
  stroke-width: 3.5px;
  filter: drop-shadow(0 0 3px rgba(22, 163, 74, 0.6));
}
.v20-event-curve-highlight.theft {
  stroke: #dc2626;
  stroke-width: 3.5px;
  filter: drop-shadow(0 0 3px rgba(220, 38, 38, 0.6));
}

.v20-event-pill-badge {
  cursor: pointer;
  transition: transform 0.15s ease;
}
.v20-event-pill-badge:hover {
  transform: translateY(-2px);
}
.v20-event-pill-badge rect.refuel {
  fill: #16a34a;
}
.v20-event-pill-badge rect.theft {
  fill: #dc2626;
}
.v20-event-pill-badge text {
  fill: #ffffff;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  text-anchor: middle;
}

/* ── Synchronisation bidirectionnelle : ligne de tableau ciblée ── */
.eco-table tr.v20-row-focused {
  background: rgba(37, 99, 235, 0.16) !important;
  outline: 2px solid #2563eb;
  transition: all 0.35s ease;
}
html.dark .eco-table tr.v20-row-focused {
  background: rgba(59, 130, 246, 0.25) !important;
  outline-color: #60a5fa;
}
.v20-table-interactive tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}
.v20-table-interactive tbody tr:hover {
  background: rgba(37, 99, 235, 0.08);
}

.v20-svg-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px;
}
.v20-svg-chart {
  width: 100%;
  height: auto;
  max-height: 290px;
  display: block;
}

/* ══════════════════════════════════════════════════════════════════════════
   HABILLAGE MODERNE TYPE MYGEOTAB · LES 4 COURBES CHRONOLOGIQUES SYNCHRONISÉES
   ══════════════════════════════════════════════════════════════════════════ */
.v20-charts-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  position: relative;
}

/* ── Mode Grille Hybride 2 colonnes (Niveau carburant pleine largeur, 4 secondaires en 2x2) ── */
.v20-charts-stack.layout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.v20-charts-stack.layout-grid #v20-card-level {
  grid-column: 1 / -1;
}
.v20-charts-stack.layout-grid .v20-zoom-banner {
  grid-column: 1 / -1;
}
@media (max-width: 960px) {
  .v20-charts-stack.layout-grid {
    grid-template-columns: 1fr;
  }
}

.v20-geotab-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  padding: 12px 16px 8px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.v20-geotab-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}
html.dark .v20-geotab-card {
  background: var(--surface, #1e293b);
  border-color: var(--border, #334155);
}
html.dark .v20-geotab-card:hover {
  border-color: #475569;
}

.v20-geotab-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 8px;
}
.v20-geotab-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text, #1e293b);
  letter-spacing: -0.01em;
}
.v20-geotab-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.v20-geotab-stat {
  font-size: 13.5px;
  font-weight: 800;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(37, 99, 235, 0.2);
}
html.dark .v20-geotab-stat {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.25);
}

.v20-geotab-btn-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border, #e2e8f0);
  background: transparent;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}
.v20-geotab-btn-icon:hover {
  background: var(--bg-hover, #f1f5f9);
  color: var(--text, #0f172a);
}
html.dark .v20-geotab-btn-icon {
  border-color: #334155;
  color: #94a3b8;
}
html.dark .v20-geotab-btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

/* Callouts et Badges Min / Max ancrés sur la courbe (Style Capture 1) */
.v20-callout-rect {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.22));
}

/* Infobulle Unifiée Haute Précision - Format Compact HUD */
.v20-unified-tooltip {
  position: fixed;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
  font-size: 10px;
  pointer-events: none;
  z-index: 100;
  backdrop-filter: blur(8px);
  min-width: 185px;
  max-width: 215px;
  transition: opacity 0.12s ease;
}
.v20-unified-tooltip-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 4px;
  margin-bottom: 5px;
}
.v20-unified-tooltip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  margin-bottom: 5px;
}
.v20-unified-tooltip-row {
  display: flex;
  flex-direction: column;
}
.v20-unified-tooltip-lbl {
  font-size: 8px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.1;
}
.v20-unified-tooltip-val {
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
  line-height: 1.2;
}
.v20-unified-tooltip-footer {
  font-size: 8.5px;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.v20-pill-mini-orange {
  font-size: 8.5px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0 4px;
  border-radius: 4px;
  margin-left: auto;
}


/* ── Widget Dynamique : Modèle de Répartition du Carburant ── */
.v20-breakdown-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}
html.dark .v20-breakdown-card {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}
.v20-breakdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.v20-breakdown-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #0f172a);
}
.v20-breakdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
}
html.dark .v20-breakdown-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}
.v20-breakdown-layout {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.v20-donut-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.v20-donut-svg {
  transform: rotate(-90deg);
  width: 140px;
  height: 140px;
}
.v20-donut-circle-bg {
  fill: none;
  stroke: var(--border, #e2e8f0);
  stroke-width: 14;
  opacity: 0.5;
}
html.dark .v20-donut-circle-bg {
  stroke: rgba(255, 255, 255, 0.08);
}
.v20-donut-seg {
  fill: none;
  stroke-width: 14;
  transition: stroke-dasharray 0.4s ease, stroke-dashoffset 0.4s ease;
}
.v20-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.v20-donut-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text, #0f172a);
  line-height: 1.1;
}
.v20-donut-lbl {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #64748b);
  margin-top: 2px;
}
.v20-breakdown-metrics {
  flex: 1;
  min-width: 280px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.v20-metric-card {
  background: var(--surface-2, rgba(248, 250, 252, 0.8));
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
html.dark .v20-metric-card {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(255, 255, 255, 0.06);
}
.v20-metric-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}
.v20-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}
.v20-metric-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.v20-metric-vol {
  font-size: 16px;
  font-weight: 800;
  color: var(--text, #0f172a);
}
.v20-metric-sub {
  font-size: 11px;
  color: var(--text-muted, #64748b);
  font-weight: 500;
}
.v20-comparison-bar {
  width: 100%;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
}
html.dark .v20-comparison-bar {
  border-color: rgba(255, 255, 255, 0.08);
}
.v20-comparison-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.v20-comparison-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.v20-comparison-delta {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
}
.v20-comparison-delta.positive {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}
.v20-comparison-delta.highlight {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
}
html.dark .v20-comparison-delta.highlight {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}

/* ── Cartes Accordéons (F03, F04, V35, Synthèse Flotte) ── */
.v20-accordion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.v20-accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}
.v20-accordion-head:hover {
  background: var(--surface-hover);
}
.v20-accordion-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
}
.v20-accordion-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.v20-chevron {
  font-size: 20px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.v20-chevron.collapsed {
  transform: rotate(-90deg);
}
.v20-accordion-body {
  padding: 14px;
  overflow-x: auto;
}
/* Vue de côté (carte ouverte) : les tableaux tiennent dans la colonne restante au lieu de
   déborder ; le texte passe à la ligne et la police se resserre. */
.v20-split-wrapper.has-side-map:not(.collapsed-map) .v20-accordion-body { padding: 8px; }
.v20-split-wrapper.has-side-map:not(.collapsed-map) .v20-main-col table.eco-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}
.v20-split-wrapper.has-side-map:not(.collapsed-map) .v20-main-col .eco-table > thead > tr > th,
.v20-split-wrapper.has-side-map:not(.collapsed-map) .v20-main-col .eco-table > tbody > tr > td {
  padding: 6px 5px;
  font-size: 11px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.v20-split-wrapper.has-side-map:not(.collapsed-map) .v20-main-col .eco-table .v20-badge,
.v20-split-wrapper.has-side-map:not(.collapsed-map) .v20-main-col .eco-table [class*="pill"] {
  white-space: normal;
}
.v20-accordion-body.hidden {
  display: none;
}

/* Badges d'état */
.v20-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 700;
}
.v20-badge.success {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}
.v20-badge.danger {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}
.v20-badge.info {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}
.v20-badge.neutral {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
}
.v20-badge.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.v20-empty-message {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ── Survol interactif de la courbe (Crosshair & Tooltip) ── */
.v20-chart-container {
  position: relative;
  width: 100%;
}
.v20-tooltip {
  position: absolute;
  top: 10px;
  right: 14px;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.94);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.45;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.16);
  z-index: 100;
  transition: opacity 0.1s ease;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.v20-tooltip-title {
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.v20-tooltip-fuel {
  font-size: 14px;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 2px;
}
.v20-tooltip-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-top: 3px;
  display: inline-block;
}
.v20-tooltip-status.normal { background: rgba(59, 130, 246, 0.25); color: #bfdbfe; }
.v20-tooltip-status.plein { background: rgba(34, 197, 94, 0.3); color: #86efac; }
.v20-tooltip-status.theft { background: rgba(239, 68, 68, 0.3); color: #fca5a5; }
.v20-tooltip-hint {
  font-size: 9.5px;
  color: #94a3b8;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 3px;
}

/* ── Split Layout Vue de Côté (Table à gauche, Carte à droite) ── */
.v20-split-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.v20-main-col {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: flex 0.25s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.v20-split-wrapper.has-side-map .v20-main-col {
  flex: 1 1 52%;
  max-width: 52%;
}

.v20-split-wrapper.has-side-map.wide-map .v20-main-col {
  flex: 1 1 35%;
  max-width: 35%;
}

.v20-split-wrapper.has-side-map.collapsed-map .v20-main-col {
  flex: 1 1 100%;
  max-width: 100%;
}

/* ── Panneau rétractable Mini-carte Leaflet (Vue de côté) ── */
.v20-minimap-card {
  position: sticky;
  top: 12px;
  flex: 0 0 47%;
  width: 47%;
  height: calc(100vh - 84px);
  max-height: calc(100vh - 84px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: visible; /* Pour laisser dépasser le bouton circulaire de split */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: flex 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.v20-split-wrapper.has-side-map.wide-map .v20-minimap-card {
  flex: 0 0 64%;
  width: 64%;
}

.v20-split-wrapper.has-side-map.collapsed-map .v20-minimap-card {
  flex: 0 0 0%;
  width: 0;
  min-width: 0;
  padding: 0;
  border: none;
  opacity: 0;
  pointer-events: none;
}

.v20-minimap-card.hidden {
  display: none !important;
}

.v20-minimap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

.v20-minimap-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
}

.v20-minimap-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  flex: 1;
  min-width: 0;
}

.v20-minimap-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.v20-minimap-tag.v20-addr-tag {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}

.v20-minimap-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.v20-minimap-container {
  flex: 1 1 auto;
  width: 100%;
  height: 100% !important;
  min-height: 250px;
  background: #e2e8f0;
  border-radius: 0 0 12px 12px;
}

/* ── Bouton circulaire de toggle / split (identique à la capture) ── */
.v20-split-toggle-btn {
  position: absolute;
  bottom: 24px;
  left: -18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1010;
  transition: transform 0.2s ease, background 0.2s ease;
}

.v20-split-toggle-btn:hover {
  background: #1d4ed8;
  transform: scale(1.08);
}

.v20-split-toggle-btn .ms {
  font-size: 20px;
  line-height: 1;
}

.v20-trip-row.selected,
.v20-event-row.selected,
.v20-event-row.v20-row-focused {
  background: rgba(37, 99, 235, 0.08) !important;
  outline: 1px solid rgba(37, 99, 235, 0.28);
}

@media (max-width: 900px) {
  .v20-split-wrapper {
    flex-direction: column;
  }
  .v20-split-wrapper.has-side-map .v20-main-col {
    max-width: 100%;
    flex: 1 1 100%;
  }
  .v20-minimap-card {
    position: relative;
    top: 0;
    width: 100%;
    height: 380px;
    max-height: 380px;
  }
  .v20-split-toggle-btn {
    display: none;
  }
}

/* ── Sidebar Tiroir Droite : Paramètres Carburant & Filtres Avancés ── */
.v20-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.v20-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.v20-settings-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 390px;
  max-width: 92vw;
  background: var(--surface, #ffffff);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
}
.v20-settings-drawer.open {
  transform: translateX(0);
  pointer-events: auto;
  visibility: visible;
}

.v20-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface-2, #f8fafc);
  border-bottom: 1px solid var(--border);
}
.v20-drawer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.v20-drawer-title .ms {
  font-size: 20px;
}
#v20-close-drawer {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  transition: all 0.15s ease;
}
#v20-close-drawer:hover {
  background: var(--bg-hover, rgba(0, 0, 0, 0.06));
  color: var(--text);
}

.v20-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.v20-drawer-section {
  background: var(--bg-hover, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
html.dark .v20-drawer-section {
  background: rgba(255, 255, 255, 0.03);
}

.v20-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.v20-section-head .ms {
  font-size: 16px;
}

.v20-field-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v20-field-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.v20-field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.v20-field-val {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent, #1f6a86);
  background: rgba(31, 106, 134, 0.1);
  padding: 1px 7px;
  border-radius: 10px;
}

.v20-range-input {
  width: 100%;
  accent-color: var(--accent, #1f6a86);
  cursor: pointer;
  height: 6px;
}

.v20-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
}
.v20-toggle-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.v20-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}
.v20-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.v20-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border, #cbd5e1);
  transition: 0.25s;
  border-radius: 20px;
}
.v20-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}
.v20-switch input:checked + .v20-slider {
  background-color: var(--accent, #1f6a86);
}
.v20-switch input:checked + .v20-slider:before {
  transform: translateX(18px);
}

.v20-drawer-foot {
  padding: 14px 20px;
  background: var(--surface-2, #f8fafc);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.v20-drawer-foot button {
  flex: 1;
}

/* Lignes annulées et badges de consolidation */
.v20-row-canceled {
  opacity: 0.55;
  background: rgba(100, 116, 139, 0.05) !important;
}
.v20-badge.canceled {
  background: rgba(100, 116, 139, 0.16);
  color: var(--text-muted);
  border: 1px dashed var(--border);
}
.v20-badge.merged {
  background: rgba(14, 165, 233, 0.14);
  color: #0284c7;
  cursor: help;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PR01 · AUDIT DES PERTES RÉSEAU (STYLES COMPLETS & ADAPTATIFS)
   ═══════════════════════════════════════════════════════════════════════════════ */
.pr01-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.pr01-toolbar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pr01-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pr01-filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pr01-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.pr01-filter-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.pr01-filter-btn.active {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
}

.pr01-filter-btn.status-active.active {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.pr01-filter-btn.status-resolved.active {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.pr01-search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 240px;
  max-width: 340px;
  flex: 1;
}

.pr01-search-icon {
  position: absolute;
  left: 9px;
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.pr01-search-input {
  width: 100%;
  padding: 6px 30px 6px 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s;
}

.pr01-search-input:focus {
  border-color: var(--accent);
}

.pr01-search-clear {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
}

/* Sections du rapport PR01 (Haut = Hors ligne, Principal = Résolus) */
.pr01-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.pr01-section-active {
  border-color: rgba(239, 68, 68, 0.35);
}

.pr01-section-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pr01-section-header.danger {
  background: rgba(239, 68, 68, 0.06);
  border-bottom-color: rgba(239, 68, 68, 0.2);
}

.pr01-section-header.primary {
  background: var(--surface-2);
  border-bottom-color: var(--border);
}

.pr01-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pr01-section-title-wrap h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.pr01-section-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.pr01-section-badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.pr01-section-badge.badge-danger {
  background: #ef4444;
  color: #ffffff;
}

.pr01-section-badge.badge-success {
  background: #10b981;
  color: #ffffff;
}

.pr01-section-badge.badge-primary {
  background: var(--accent);
  color: #ffffff;
}

.pr01-all-online-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  margin: 14px 18px;
}

.pr01-all-online-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--text);
}

.pr01-all-online-info strong {
  font-size: 13px;
  color: #10b981;
}

.pr01-row-active td {
  background: rgba(239, 68, 68, 0.02);
}

.pr01-row-active:hover td {
  background: rgba(239, 68, 68, 0.06) !important;
}

.pr01-badge-tier {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.pr01-badge-tier.critical {
  background: rgba(127, 29, 29, 0.15);
  color: #b91c1c;
  border: 1px solid rgba(185, 28, 28, 0.3);
}

.pr01-badge-tier.danger {
  background: rgba(185, 28, 28, 0.12);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.pr01-badge-tier.warning {
  background: rgba(194, 65, 12, 0.12);
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.25);
}

.pr01-badge-tier.notice {
  background: rgba(3, 105, 161, 0.12);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.pr01-badge-tier.info {
  background: rgba(31, 106, 134, 0.12);
  color: #0d9488;
  border: 1px solid rgba(13, 148, 136, 0.25);
}

.pr01-tiers-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.pr01-tier-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.pr01-tier-head {
  padding: 7px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}

.pr01-tier-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3px;
}

.pr01-tier-name {
  text-transform: uppercase;
}

.pr01-tier-counter {
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.22);
  padding: 2px 8px;
  border-radius: 10px;
}

.pr01-table-wrapper {
  overflow-x: auto;
}

.pr01-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.pr01-table th {
  background: var(--surface-2);
  color: var(--text-muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.pr01-table th.left, .pr01-table td.left {
  text-align: left;
}

.pr01-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  color: var(--text);
}

.pr01-table tr.alt td {
  background: var(--row-alt, rgba(0, 0, 0, 0.015));
}

.pr01-table tr:hover td {
  background: var(--surface-hover);
}

.pr01-table tfoot td {
  background: var(--surface-2);
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  font-size: 11px;
}

.pr01-tier-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface);
}

.pr01-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.pr01-badge-status.offline {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.pr01-badge-status.online {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.pr01-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pr01Pulse 1.8s infinite;
}

@keyframes pr01Pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.pr01-text-badge-danger {
  color: #ef4444;
  font-weight: 700;
}

.pr01-loc-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
}

.pr01-loc-text {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pr01-map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.pr01-map-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.pr01-map-btn .ms {
  font-size: 14px;
}

/* Modale de carte Leaflet */
.pr01-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
  padding: 16px;
}

.pr01-modal-card {
  background: var(--surface);
  border-radius: 12px;
  width: 100%;
  max-width: 720px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.pr01-modal-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
}

.pr01-modal-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.pr01-modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.pr01-modal-close:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.pr01-modal-body {
  padding: 16px;
}

/* Adaptations Dark Mode pour PR01 */
html.dark .pr01-day-section {
  background: var(--surface);
  border-color: var(--border);
}

html.dark .pr01-day-header {
  background: var(--surface-2);
  border-color: var(--border);
}

html.dark .pr01-table th, html.dark .pr01-table tfoot td {
  background: var(--surface-2);
  border-color: var(--border);
}

html.dark .pr01-table td {
  border-color: var(--border);
}

html.dark .pr01-toolbar-card {
  background: var(--surface);
  border-color: var(--border);
}

html.dark .pr01-search-input {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

/* ── Barre de progression style YouTube en haut d'écran ── */
.eco-yt-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #2563eb, #60a5fa);
  box-shadow: 0 0 10px #3b82f6, 0 0 5px #60a5fa;
  z-index: 99999;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  pointer-events: none;
  opacity: 0;
}
.eco-yt-progress-bar.loading {
  opacity: 1;
}
.eco-yt-progress-bar.done {
  width: 100% !important;
  opacity: 0;
}

/* ── Skeleton Loader UI Shimmer ── */
@keyframes ecoShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.eco-skeleton {
  background: linear-gradient(90deg, var(--border, #e2e8f0) 25%, var(--surface-hover, #f1f5f9) 50%, var(--border, #e2e8f0) 75%);
  background-size: 200% 100%;
  animation: ecoShimmer 1.5s infinite;
  border-radius: 6px;
  display: inline-block;
}
.eco-skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 14px;
}
.eco-skeleton-chart {
  height: 260px;
  width: 100%;
  border-radius: 8px;
}
.eco-skeleton-table {
  width: 100%;
}
.eco-skeleton-row {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

/* ── Menu utilisateur Wialon Topbar ── */
.wialon-user-menu-container {
  position: relative;
  display: inline-block;
}
.wialon-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px 0 6px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wialon-user-btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}
.wialon-user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wialon-user-avatar.lg {
  width: 38px;
  height: 38px;
}
.wialon-user-avatar .ms {
  font-size: 15px;
}
.wialon-user-avatar.lg .ms {
  font-size: 24px;
}
.wialon-user-caret {
  font-size: 18px;
  color: var(--text-muted);
}
.wialon-user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  z-index: 10000;
  animation: scaleUp 0.12s ease-out;
}
.wialon-user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 10px;
}
.wialon-user-info {
  overflow: hidden;
}
.wialon-user-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wialon-user-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.wialon-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}
.wialon-dropdown-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 6px 16px 4px;
}
.wialon-dropdown-item {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}
.wialon-dropdown-item:hover {
  background: var(--surface-hover);
}
.wialon-dropdown-item.danger {
  color: #dc2626;
}
.wialon-dropdown-item.danger:hover {
  background: rgba(220, 38, 38, 0.08);
}
.wialon-dropdown-pill {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-hover, #f1f5f9);
  color: var(--text-muted);
}
.wialon-lang-switcher {
  display: flex;
  flex-direction: column;
  padding: 2px 8px;
  gap: 2px;
}
.wialon-lang-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.wialon-lang-btn:hover {
  background: var(--surface-hover);
}
.wialon-lang-btn.active {
  font-weight: 700;
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}
.wialon-lang-btn .check {
  font-size: 16px;
  color: var(--accent);
}

/* ── Panneau de réglages carburant dans la Sidebar ── */
.sidebar-fuel-card {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.sidebar-fuel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  background: var(--surface);
  user-select: none;
}
.sidebar-fuel-head:hover {
  background: var(--surface-hover);
}
.sidebar-fuel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 12px;
  color: var(--text);
}
.sidebar-fuel-body {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sidebar-fuel-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-fuel-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.sidebar-export-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text);
}
.sidebar-export-checklist label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.sidebar-export-checklist input[type="checkbox"] {
  accent-color: var(--accent);
}

/* ── Tiroir latéral d'enregistrement de plein réel (Drawer) ── */
.v20-real-refuel-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 99990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.v20-real-refuel-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.v20-real-refuel-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  max-width: 90vw;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 99995;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.v20-real-refuel-drawer.open {
  right: 0;
}
.v20-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.v20-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.v20-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.v20-drawer-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.v20-drawer-field label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.v20-drawer-field input, .v20-drawer-field select, .v20-drawer-field textarea {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  box-sizing: border-box;
}
.v20-drawer-field textarea {
  height: 60px;
  padding: 6px 10px;
  resize: vertical;
}
.v20-drawer-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}




/* ═══ Drawer « Paramètres des rapports » (js/settings_drawer.js) ═══ */
.rs-backdrop {
  position: fixed; inset: 0; z-index: 1999;
  background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.rs-backdrop.open { opacity: 1; visibility: visible; pointer-events: auto; }
.rs-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 2000;
  width: 460px; max-width: 94vw; display: flex; flex-direction: column;
  background: var(--surface); color: var(--text);
  border-left: 1px solid var(--border); box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
  transform: translateX(100%); visibility: hidden; pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
}
.rs-drawer.open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.rs-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.rs-head-icon { color: var(--accent); font-size: 22px; }
.rs-head-text { flex: 1; min-width: 0; }
.rs-title { font-size: 15px; font-weight: 700; }
.rs-sub { margin-top: 3px; }
.rs-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text-muted); cursor: pointer;
}
.rs-icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.rs-icon-btn.sm { width: 26px; height: 26px; }
.rs-icon-btn.sm .ms { font-size: 16px; }
.rs-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; border: 1px solid var(--border); color: var(--text-muted); background: var(--surface);
}
.rs-pill .ms { font-size: 14px; }
.rs-pill.shared { color: var(--accent); border-color: var(--accent); background: var(--notion-tag-blue-bg); }
.rs-pill.current { color: var(--accent); border-color: var(--accent); font-size: 10px; padding: 1px 7px; }
.rs-search { position: relative; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.rs-search .ms { position: absolute; left: 26px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--text-muted); pointer-events: none; }
.rs-search input {
  width: 100%; height: 34px; padding: 0 10px 0 32px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 12px; outline: none;
}
.rs-search input:focus { border-color: var(--accent); }
.rs-body { flex: 1; overflow-y: auto; padding: 8px 12px 16px; }
.rs-cat {
  padding: 12px 4px 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
}
.rs-empty { padding: 24px 8px; text-align: center; color: var(--text-muted); }
.rs-report { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--surface); overflow: hidden; }
.rs-report.open { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.rs-report-head {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: transparent; border: 0; cursor: pointer; text-align: left; color: var(--text);
}
.rs-report-head:hover { background: var(--surface-hover); }
.rs-report-icon { color: var(--accent); }
.rs-report-title { flex: 1; min-width: 0; font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-chevron { color: var(--text-muted); }
.rs-report-body { padding: 4px 12px 12px; border-top: 1px solid var(--border); background: var(--surface-2); }
.rs-meta { padding: 8px 2px 0; font-size: 11px; color: var(--text-muted); }
.rs-rerun {
  display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-radius: 8px;
  background: var(--warn-bg); color: var(--warn-text); font-size: 12px;
}
.rs-rerun span:nth-child(2) { flex: 1; }
.rs-rerun .eco-btn { height: 28px; }
.rs-section { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.rs-section-title { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.rs-section-title .ms { font-size: 17px; color: var(--accent); }
.rs-section-hint { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; line-height: 1.4; }
.rs-field { display: block; padding: 7px 0; border-top: 1px dashed var(--border); }
.rs-section-title + .rs-field, .rs-section-hint + .rs-field { border-top: 0; }
.rs-label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.rs-hint { font-size: 11px; color: var(--text-muted); margin-top: 3px; line-height: 1.4; }
.rs-input-row { display: flex; align-items: center; gap: 8px; }
.rs-number { width: 120px; }
.rs-text { width: 100%; }
.rs-unit { font-size: 11px; color: var(--text-muted); }
.rs-select { width: 100%; justify-content: flex-start; }
.rs-select .eco-trigger-label { flex: 1; text-align: left; }
.rs-color { width: 40px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; }
.rs-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.rs-switch-text { flex: 1; min-width: 0; }
.rs-switch-text .rs-label { margin-bottom: 0; }
.rs-switch { position: relative; flex-shrink: 0; width: 38px; height: 20px; }
.rs-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.rs-switch-track { position: absolute; inset: 0; border-radius: 20px; background: var(--border); transition: background 0.2s; }
.rs-switch-track::before {
  content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; transition: transform 0.2s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.rs-switch input:checked + .rs-switch-track { background: var(--accent); }
.rs-switch input:checked + .rs-switch-track::before { transform: translateX(18px); }
.rs-switch input:focus-visible + .rs-switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.rs-range-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rs-range-head .rs-label { margin-bottom: 0; }
.rs-range-val {
  font-size: 11px; font-weight: 700; color: var(--accent); padding: 1px 8px; border-radius: 999px;
  background: var(--notion-tag-blue-bg); white-space: nowrap;
}
.rs-range { width: 100%; margin-top: 6px; accent-color: var(--accent); cursor: pointer; }
.rs-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.rs-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 11px; cursor: pointer;
}
.rs-chip .ms { font-size: 14px; }
.rs-chip.on { border-color: var(--accent); color: var(--accent); background: var(--notion-tag-blue-bg); font-weight: 600; }
.rs-table-wrap { overflow-x: auto; margin: 4px 0; border: 1px solid var(--border); border-radius: 8px; }
.rs-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.rs-table th {
  padding: 5px 6px; text-align: left; font-size: 10px; font-weight: 700; color: var(--text-muted);
  background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.rs-table td { padding: 2px 3px; border-bottom: 1px solid var(--border); }
.rs-table tr:last-child td { border-bottom: 0; }
.rs-table-empty { text-align: center; color: var(--text-muted); padding: 8px !important; }
.rs-table-del { width: 30px; text-align: center; }
.rs-cell {
  width: 100%; min-width: 48px; height: 26px; padding: 0 6px; border: 1px solid transparent; border-radius: 4px;
  background: transparent; color: var(--text); font-size: 11px;
}
.rs-cell:hover { border-color: var(--border); }
.rs-cell:focus { border-color: var(--accent); outline: none; background: var(--surface); }
.rs-cell-select {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 2px; width: 100%; min-width: 90px; height: 26px;
  padding: 0 4px 0 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text);
  font-size: 11px; cursor: pointer; white-space: nowrap;
}
.rs-cell-select .ms { font-size: 15px; color: var(--text-muted); }
.rs-table-add { height: 28px; margin-top: 2px; }
.rs-info-body { font-size: 12px; }
.rs-info-table { width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 4px; }
.rs-info-table th, .rs-info-table td { padding: 4px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.rs-info-table th { font-size: 10px; color: var(--text-muted); font-weight: 700; background: var(--surface-2); }
.rs-info-unit { margin-top: 8px; font-weight: 700; font-size: 12px; }
.rs-warn { color: var(--warn-text); background: var(--warn-bg); border-radius: 6px; padding: 4px 8px; margin-top: 4px; font-size: 11px; }
.rs-columns .notion-dropdown-list { max-height: 360px; overflow-y: auto; }
.column-picker-inline { display: flex; flex-direction: column; }
.column-picker-inline .column-picker-presets { padding: 0 0 4px; }
.column-picker-inline .notion-dropdown-search { padding: 4px 0; }
.column-picker-inline .notion-dropdown-search .ms { left: 8px; }
.rs-report-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.rs-foot {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 10px 12px;
  background: var(--surface-2); border-top: 1px solid var(--border);
}
.rs-save { margin-left: auto; font-size: 11px; color: var(--text-muted); }
.rs-save.saved { color: #16a34a; }
.rs-save.error { color: var(--danger); }
.eco-settings-badge {
  padding: 0 6px; border-radius: 999px; font-size: 10px; font-weight: 700;
  background: var(--notion-tag-blue-bg); color: var(--accent);
}
.eco-rerun-banner { display: flex; align-items: center; gap: 8px; }
.eco-rerun-banner span:nth-child(2) { flex: 1; }
@media (max-width: 520px) {
  .rs-drawer { width: 100vw; max-width: 100vw; }
  .rs-number { width: 100%; }
}
/* Calcul pas à pas des scores (détail d'un trajet EC04) */
.eco-score-breakdown th { text-align: left; white-space: nowrap; width: 130px; color: var(--text-muted); font-weight: 600; }
.eco-score-breakdown td { text-align: left; }
