/* Trajet VE -- appli "carte d'abord" (carte plein écran, panneau
   coulissant, barre de navigation), aux couleurs du panneau Trajet VE de
   JARVIS : fond nuit, couleurs façon Waze : bleu #1a6fe8 comme accent principal (plus de
   vert/cyan électrique). */

:root {
  --fond: #05080e;
  --panneau: #0d121b;
  --bloc: #141a25;
  --bloc-2: #1a2130;
  --texte: #e6eef9;
  --texte-att: rgba(230, 238, 249, 0.66);
  --texte-faible: rgba(230, 238, 249, 0.45);
  --bordure: rgba(255, 255, 255, 0.09);
  --vert: #1a6fe8;
  --vert-clair: #6fb3ff;
  --cyan: #4fe0ff;
  --violet: #c46bff;
  --orange: #ffcf70;
  --rouge: #ff7a90;
  --jaune: #ffd23f;
  --vert-vif: #4da8ff;
  --violet-texte: #d199ff;
  --meta: #a8f0d8;
  --rouge-texte: #ff9aaa;
  --nav-fond: #080c13;
  --fab-urgence: #3a0f18;
  --haut-degrade: linear-gradient(180deg, rgba(5, 8, 14, 0.92) 0%, rgba(5, 8, 14, 0.55) 70%, rgba(5, 8, 14, 0) 100%);
  --chip: rgba(20, 26, 37, 0.92);
  --urgence-fond: rgba(5, 8, 14, 0.98);
  --attribution: rgba(5, 8, 14, 0.6);
  --bordure-forte: rgba(255, 255, 255, 0.12);
  --separateur: rgba(255, 255, 255, 0.06);
  --piste: rgba(255, 255, 255, 0.08);
  --voile: rgba(255, 255, 255, 0.04);
  --poignee: rgba(255, 255, 255, 0.28);
  --pointilles: rgba(255, 255, 255, 0.35);
  /* couleurs de puissance des bornes : identiques dans les deux thèmes */
  --p-ultra: #c46bff;
  --p-rapide: #22e5a0;
  --p-acc: #4fe0ff;
  --nav-h: 62px;
  --feuille-visible: 212px;
  --securite-bas: env(safe-area-inset-bottom, 0px);
  --securite-haut: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

/* Thème clair : textes plus foncés pour rester lisibles en plein jour */
:root[data-theme="clair"] {
  --fond: #eef2f7;
  --panneau: #ffffff;
  --bloc: #f3f6fa;
  --bloc-2: #e7ecf3;
  --texte: #101826;
  --texte-att: rgba(16, 24, 38, 0.74);
  --texte-faible: rgba(16, 24, 38, 0.62);
  --bordure: rgba(16, 24, 38, 0.12);
  --vert: #1a6fe8;
  --vert-clair: #0b4fb3;
  --cyan: #0a5fb0;
  --violet: #8a2fd1;
  --orange: #a86200;
  --rouge: #c8243f;
  --jaune: #7a5c00;
  --vert-vif: #0b4fb3;
  --violet-texte: #7b22c2;
  --meta: #0b6b4c;
  --rouge-texte: #b01f38;
  --nav-fond: #ffffff;
  --fab-urgence: #ffe1e6;
  --haut-degrade: linear-gradient(180deg, rgba(238, 242, 247, 0.95) 0%, rgba(238, 242, 247, 0.6) 70%, rgba(238, 242, 247, 0) 100%);
  --chip: rgba(255, 255, 255, 0.96);
  --urgence-fond: rgba(238, 242, 247, 0.98);
  --attribution: rgba(255, 255, 255, 0.75);
  --bordure-forte: rgba(16, 24, 38, 0.14);
  --separateur: rgba(16, 24, 38, 0.08);
  --piste: rgba(16, 24, 38, 0.1);
  --voile: rgba(16, 24, 38, 0.04);
  --poignee: rgba(16, 24, 38, 0.25);
  --pointilles: rgba(16, 24, 38, 0.35);
  color-scheme: light;
}
:root[data-theme="clair"] .ev-feuille { box-shadow: 0 -8px 30px rgba(16, 24, 38, 0.18); }
:root[data-theme="clair"] .ev-fab,
:root[data-theme="clair"] .ev-barre-recherche,
:root[data-theme="clair"] .ev-chip { box-shadow: 0 4px 14px rgba(16, 24, 38, 0.18); }
:root[data-theme="clair"] .ev-barre-recherche { background: #ffffff; }
:root[data-theme="clair"] .ev-chip.actif { color: #ffffff; background: #1a6fe8; border-color: #1a6fe8; }
:root[data-theme="clair"] .ev-segments button.active { color: #ffffff; background: #1a6fe8; }
:root[data-theme="clair"] .ev-btn-principal { color: #ffffff; background: linear-gradient(90deg, #1a6fe8, #0b4fb3); }
:root[data-theme="clair"] .ev-urgence-entete { color: #b01f38; }
:root[data-theme="clair"] .ev-alerte { color: var(--rouge-texte); }
:root[data-theme="clair"] .ev-nav-alerte { color: #fff; }
:root[data-theme="clair"] .leaflet-tooltip { box-shadow: 0 4px 14px rgba(16, 24, 38, 0.2); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fond);
  color: var(--texte);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--vert-clair); }
h2 { margin: 0; font-size: 18px; font-weight: 800; }
h3 { margin: 0 0 10px; font-size: 14px; font-weight: 800; color: var(--vert-clair); }
button { font-family: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

/* ── Carte ─────────────────────────────────────────────────────────────── */
.ev-carte { position: fixed; inset: 0; z-index: 0; background: #0b1017; }
.ev-tuiles-sombres { filter: invert(100%) hue-rotate(180deg) brightness(88%) contrast(92%) saturate(70%); }
.leaflet-container { background: #0b1017; font-family: inherit; }
.leaflet-bottom { bottom: calc(var(--feuille-visible) + 4px); transition: bottom 0.28s ease; }
.leaflet-control-attribution { background: var(--attribution) !important; color: var(--texte-faible) !important; font-size: 9px !important; }
.leaflet-control-attribution a { color: var(--texte-att) !important; }
.leaflet-tooltip { background: var(--bloc); color: var(--texte); border: 1px solid rgba(34, 229, 160, 0.3); border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5); }
.leaflet-tooltip-top::before { border-top-color: var(--bloc); }

/* Épingles de bornes, couleur = puissance */
.ev-pin {
  position: absolute;
  left: 2px;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 3px;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s ease;
}
.ev-pin span { transform: rotate(45deg); font-size: 11px; font-weight: 900; color: #06131b; letter-spacing: -0.3px; }
.ev-pin.ultra { background: var(--p-ultra); color: var(--p-ultra); }
.ev-pin.rapide { background: var(--p-rapide); color: var(--p-rapide); }
.ev-pin.acc { background: var(--p-acc); color: var(--p-acc); }
.ev-pin.lent { background: #8ea3c9; color: #8ea3c9; }
.ev-pin.selection { transform: rotate(-45deg) scale(1.3); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35), 0 0 22px currentColor; }
/* Carte bancaire acceptée : bien visible d'un coup d'œil sur la carte,
   demande explicite de l'utilisateur le 2026-10-11 (le petit "CB" d'avant
   passait inaperçu). */
.ev-pin-cb {
  position: absolute;
  top: -10px;
  right: -12px;
  transform: rotate(45deg);
  background: var(--vert);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.55);
}
/* Feu d'occupation (vert/orange/rouge) sur l'épingle -- absent si inconnue. */
.ev-pin-etat {
  position: absolute;
  bottom: -2px;
  left: -2px;
  transform: rotate(45deg);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.ev-pin-etat.vert { background: var(--vert-vif); }
.ev-pin-etat.orange { background: var(--orange); }
.ev-pin-etat.rouge { background: var(--rouge); }
/* Étiquette de batterie à côté d'un arrêt de recharge */
.ev-etiquette-arret { display: inline-block; white-space: nowrap; padding: 2px 7px; border-radius: 8px; background: var(--chip); color: var(--texte); border: 1px solid rgba(79, 224, 255, 0.6); font-size: 11.5px; font-weight: 800; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); }
.ev-etiquette-arret-3d { position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%); }

/* Parkings */
.ev-parking { position: relative; width: 24px; height: 24px; border-radius: 6px; background: #2d6cdf; color: #fff; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); cursor: pointer; }
.ev-parking b { position: absolute; top: -8px; right: -8px; font-size: 11px; }
.ev-fiche-parking { display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.35; color: #111; }
.ev-fiche-parking a { font-weight: 700; }

/* Pastille de l'opérateur (sigle aux couleurs du réseau) */
.ev-badge-op { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 4px; margin-right: 6px; border-radius: 5px; font-size: 10px; font-weight: 900; letter-spacing: 0.2px; vertical-align: 1px; }

/* Groupe de bornes proches : nombre, couleur de la plus puissante */
.ev-grappe { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; color: #06131b; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55); cursor: pointer; }
.ev-grappe.ultra { background: var(--p-ultra); }
.ev-grappe.rapide { background: var(--p-rapide); }
.ev-grappe.acc { background: var(--p-acc); }
.ev-grappe.lent { background: #8ea3c9; }
.marker-cluster { background: transparent !important; }
.ev-position { width: 18px; height: 18px; border-radius: 50%; background: #3d8bff; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(61, 139, 255, 0.25), 0 0 12px rgba(61, 139, 255, 0.8); }
.ev-point-trajet { border-radius: 50%; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }

/* ── Barre du haut ─────────────────────────────────────────────────────── */
.ev-haut {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: calc(10px + var(--securite-haut)) 12px 8px;
  background: var(--haut-degrade);
  pointer-events: none;
}
.ev-haut > * { pointer-events: auto; }
.ev-haut-ligne { display: flex; gap: 8px; }
.ev-barre-recherche {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px;
  border-radius: 24px;
  border: 1px solid var(--bordure-forte);
  background: var(--bloc);
  color: var(--texte-att);
  font-size: 16px;
  text-align: left;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.ev-loupe { font-size: 18px; }
.ev-chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 4px; scrollbar-width: none; }
.ev-chips::-webkit-scrollbar { display: none; }
.ev-chip {
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border-radius: 17px;
  border: 1px solid var(--bordure-forte);
  background: var(--chip);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.ev-haut .ev-chip { height: 44px; }
.ev-chip.actif { background: var(--vert); border-color: var(--vert); color: #04221a; }
.ev-bandeau {
  margin-top: 6px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255, 60, 90, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

/* ── Boutons flottants ─────────────────────────────────────────────────── */
.ev-fabs {
  position: fixed;
  right: 12px;
  bottom: calc(var(--feuille-visible) + 14px);
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: bottom 0.28s ease, opacity 0.2s;
}
.ev-fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--bordure-forte);
  background: var(--bloc);
  font-size: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.ev-diagnostic { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.4; padding: 10px 12px; border-radius: 12px; background: var(--voile); border: 1px solid var(--bordure); }
.ev-fab-texte { font-size: 15px; font-weight: 900; color: var(--texte); }
.ev-fab.actif { border-color: var(--vert); color: var(--vert-vif); }
.ev-fab.muet { border-color: #ef4444; color: #ef4444; }
/* Étiquette du curseur « où serai-je ? » sur la carte 3D */
.ev-curseur-3d { position: relative; }
.ev-curseur-3d-texte { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 3px 8px; border-radius: 8px; background: var(--chip); color: var(--texte); font-size: 12px; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
/* MapLibre impose position: relative à .maplibregl-map : on garde le plein écran. */
.ev-carte-3d, .ev-carte-3d.maplibregl-map { position: fixed; inset: 0; z-index: 1; background: #0b1017; }
.ev-carte-3d.ev-3d-invisible { visibility: hidden; }
/* Même boîte que l'icône Leaflet (36 × 46), l'épingle y est positionnée en absolu. */
.ev-pin-3d { position: relative; width: 36px; height: 46px; cursor: pointer; }
.ev-fab-urgence { background: var(--fab-urgence); border-color: rgba(255, 90, 110, 0.6); }
body[data-feuille="haut"] .ev-fabs { opacity: 0; pointer-events: none; }

/* ── Panneau coulissant ────────────────────────────────────────────────── */
.ev-feuille {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--nav-h) + var(--securite-bas));
  height: calc(100dvh - var(--nav-h) - var(--securite-bas) - var(--securite-haut) - 64px);
  z-index: 700;
  display: flex;
  flex-direction: column;
  background: var(--panneau);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--bordure-forte);
  box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.55);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.ev-poignee-zone { flex-shrink: 0; height: 26px; display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.ev-poignee { width: 42px; height: 5px; border-radius: 3px; background: var(--poignee); }
.ev-feuille-corps { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 20px; }

.ev-vue { display: flex; flex-direction: column; gap: 12px; }
.ev-vue-entete { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; touch-action: none; }
.ev-entete-btns { display: flex; gap: 14px; flex-shrink: 0; }
.ev-lien { background: none; border: none; color: var(--vert-clair); font-size: 13.5px; font-weight: 700; padding: 6px 0; cursor: pointer; }
.ev-retour { align-self: flex-start; background: none; border: none; color: var(--vert-clair); font-size: 15px; font-weight: 700; padding: 4px 0; cursor: pointer; }

.ev-legende { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11.5px; color: var(--texte-att); }
.ev-legende span { display: inline-flex; align-items: center; gap: 5px; }
.ev-point { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ev-point.ultra { background: var(--p-ultra); }
.ev-point.rapide { background: var(--p-rapide); }
.ev-point.acc { background: var(--p-acc); }
.ev-point.lent { background: #8ea3c9; }
.ev-mini-cb { background: #fff; color: #07784f; font-size: 8px; font-weight: 900; padding: 1px 3px; border-radius: 4px; }

/* ── Navigation ────────────────────────────────────────────────────────── */
.ev-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 800;
  height: calc(var(--nav-h) + var(--securite-bas));
  padding-bottom: var(--securite-bas);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--nav-fond);
  border-top: 1px solid var(--bordure-forte);
}
.ev-nav-btn { background: none; border: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--texte-faible); cursor: pointer; }
.ev-nav-btn span { font-size: 21px; filter: grayscale(0.7); opacity: 0.8; }
.ev-nav-btn.actif { color: var(--vert-clair); font-weight: 700; }
.ev-nav-btn.actif span { filter: none; opacity: 1; }

/* ── Éléments communs ──────────────────────────────────────────────────── */
.ev-carte-bloc { background: var(--bloc); border: 1px solid var(--bordure); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ev-carte-bloc:empty { display: none; }
.ev-colonne { display: flex; flex-direction: column; gap: 12px; }
.ev-grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ev-grille-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ev-grille-champs .ev-large { grid-column: 1 / -1; }

.ev-champ { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--texte-att); }
.ev-input {
  width: 100%;
  min-height: 46px;
  background: var(--bloc-2);
  border: 1px solid var(--bordure);
  border-radius: 12px;
  color: var(--texte);
  padding: 11px 12px;
  font-size: 16px;
  font-family: inherit;
}
.ev-input:focus { outline: none; border-color: var(--vert); box-shadow: 0 0 0 3px rgba(34, 229, 160, 0.15); }
textarea.ev-input { resize: vertical; }
.ev-input-row { display: flex; gap: 8px; align-items: center; }
.ev-input-row .ev-input { flex: 1; }
.ev-mini-btn { flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--bordure); background: var(--bloc-2); font-size: 19px; cursor: pointer; }

.ev-valeur { color: var(--vert-clair); font-weight: 800; font-size: 14px; }
.ev-curseur { width: 100%; height: 28px; margin: 0; accent-color: var(--vert); }
.ev-jauge { height: 10px; border-radius: 999px; background: var(--piste); overflow: hidden; }
.ev-jauge-remplissage { height: 100%; width: 80%; background: var(--vert); box-shadow: 0 0 12px currentColor; transition: width 0.2s, background 0.2s; }

.ev-check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; line-height: 1.35; }
.ev-check input { width: 20px; height: 20px; accent-color: var(--vert); flex-shrink: 0; }

.ev-btn-principal {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, #1a6fe8, #4fe0ff);
  color: #03201a;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(34, 229, 160, 0.25);
  cursor: pointer;
}
.ev-btn-principal:disabled, .ev-btn:disabled { opacity: 0.5; cursor: wait; }
.ev-btn { padding: 12px 8px; border-radius: 12px; border: 1px solid var(--bordure); background: var(--bloc); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.ev-btn-secondaire { align-self: flex-start; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--bordure); background: var(--bloc-2); font-size: 13px; text-decoration: none; color: var(--texte); cursor: pointer; }

.ev-segments { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--bloc-2); border-radius: 12px; }
.ev-segments button { border: none; background: none; padding: 9px 4px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--texte-att); cursor: pointer; }
.ev-segments button.active { background: var(--vert); color: #04221a; }

.ev-accordeon { background: var(--bloc); border: 1px solid var(--bordure); border-radius: 16px; padding: 14px; }
.ev-accordeon summary { cursor: pointer; font-size: 14.5px; font-weight: 700; outline: none; }
.ev-accordeon[open] summary { margin-bottom: 14px; color: var(--vert-clair); }

.ev-hint { font-size: 12px; color: var(--texte-faible); line-height: 1.45; }
.ev-alerte { background: rgba(255, 60, 90, 0.12); border: 1px solid rgba(255, 60, 90, 0.4); color: var(--rouge-texte); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; }
.ev-domicile { background: rgba(255, 210, 63, 0.08); border: 1px solid rgba(255, 210, 63, 0.3); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; color: var(--jaune); line-height: 1.5; }
.ev-resultat-calc { background: var(--bloc-2); border-radius: 12px; padding: 12px; font-size: 14px; line-height: 1.6; }

.ev-vehicule-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: linear-gradient(90deg, #1a6fe8, #4fe0ff, #1a6fe8);
  background-size: 200% auto;
  color: #05130e;
  animation: badgeBrillance 3s linear infinite;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ev-vehicule-badge:empty { display: none; }
@keyframes badgeBrillance { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }

/* ── Saisie départ / destination ───────────────────────────────────────── */
.ev-itineraire-champs { display: flex; align-items: center; gap: 10px; background: var(--bloc); border: 1px solid var(--bordure); border-radius: 16px; padding: 12px; }
.ev-itineraire-points { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 2px; }
.ev-pt-depart, .ev-pt-arrivee { width: 12px; height: 12px; border-radius: 50%; }
.ev-pt-depart { background: var(--vert); box-shadow: 0 0 8px var(--vert); }
.ev-pt-arrivee { background: #ff6b35; box-shadow: 0 0 8px #ff6b35; border-radius: 3px; }
.ev-pt-ligne { width: 2px; height: 34px; background: repeating-linear-gradient(180deg, var(--pointilles) 0 4px, transparent 4px 8px); }
.ev-itineraire-saisies { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ev-inverser { width: 40px; height: 40px; font-size: 18px; }

/* ── Modes ─────────────────────────────────────────────────────────────── */
.ev-charge-mode-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ev-charge-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 2px;
  border-radius: 12px;
  border: 1px solid var(--bordure);
  background: var(--bloc-2);
  font-size: 18px;
  cursor: pointer;
}
.ev-charge-mode-btn span { font-size: 11.5px; font-weight: 600; color: var(--texte-att); }
.ev-charge-mode-btn.active { border-color: var(--vert); background: rgba(34, 229, 160, 0.15); box-shadow: 0 0 12px rgba(34, 229, 160, 0.2); }
.ev-charge-mode-btn.active span { color: var(--vert-clair); }

/* ── Liste de bornes ───────────────────────────────────────────────────── */
.ev-liste { display: flex; flex-direction: column; gap: 10px; }
.ev-borne-ligne {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--bloc);
  border: 1px solid var(--bordure);
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.ev-borne-ligne:active { background: var(--bloc-2); }
.ev-borne-puissance {
  flex-shrink: 0;
  width: 54px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #06131b;
  font-weight: 900;
  font-size: 17px;
  line-height: 1.05;
  padding: 8px 0;
}
.ev-borne-puissance small { font-size: 10px; font-weight: 700; }
.ev-borne-puissance.ultra { background: var(--p-ultra); }
.ev-borne-puissance.rapide { background: var(--p-rapide); }
.ev-borne-puissance.acc { background: var(--p-acc); }
.ev-borne-puissance.lent { background: #8ea3c9; }
.ev-borne-infos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ev-borne-nom { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-borne-sous { font-size: 12.5px; color: var(--texte-att); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-borne-pastilles { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }

.ev-cb-pill { padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.ev-cb-pill.ok { background: rgba(34, 229, 160, 0.15); color: var(--vert-vif); border-color: rgba(34, 229, 160, 0.4); }
.ev-cb-pill.warn { background: rgba(255, 170, 0, 0.14); color: var(--orange); border-color: rgba(255, 170, 0, 0.4); }
.ev-cb-pill.non { background: rgba(255, 60, 90, 0.14); color: var(--rouge); border-color: rgba(255, 60, 90, 0.4); }
.ev-cb-pill.inconnu, .ev-cb-pill.attente, .ev-cb-pill.neutre { background: var(--voile); color: var(--texte-att); border-color: var(--bordure); }

/* ── Fiche borne ───────────────────────────────────────────────────────── */
.ev-fiche-tete { display: flex; gap: 12px; align-items: flex-start; }
.ev-fiche-tete .ev-borne-puissance { width: 64px; font-size: 20px; }
.ev-fiche-titre { font-size: 19px; font-weight: 800; line-height: 1.25; }
.ev-fiche-sous { font-size: 13px; color: var(--texte-att); margin-top: 3px; }
.ev-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-actions-rangee { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 8px; }
.ev-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 2px;
  border-radius: 14px;
  background: var(--bloc);
  border: 1px solid var(--bordure);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--texte);
  text-decoration: none;
  cursor: pointer;
}
.ev-action span { width: 40px; height: 40px; border-radius: 50%; background: rgba(34, 229, 160, 0.14); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.ev-action.actif span { background: rgba(255, 210, 63, 0.25); }
.ev-prises { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ev-prise { background: var(--bloc-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.ev-prise strong { font-size: 13.5px; }
.ev-prise span { font-size: 12px; color: var(--texte-att); }
.ev-prise .ev-prise-kw { font-size: 17px; font-weight: 800; color: var(--vert-clair); }
.ev-ligne-info { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--separateur); font-size: 13.5px; }
.ev-ligne-info:last-child { border-bottom: none; }
.ev-ligne-info .label { color: var(--texte-att); flex: 0 0 auto; }
.ev-ligne-info .value { text-align: right; }
.ev-liste-paiement { list-style: none; margin: 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.ev-cb-texte.ok { color: var(--vert-vif); }
.ev-cb-texte.warn { color: var(--orange); }
.ev-cb-texte.non { color: var(--rouge); }
.ev-cb-texte.inconnu, .ev-cb-texte.attente { color: var(--texte-att); font-weight: 600; }
.ev-alternative { padding: 10px 12px; border-radius: 12px; background: var(--bloc-2); font-size: 13.5px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--meta); align-items: center; }
.ev-score { display: inline-block; font-size: 16px; font-weight: 800; padding: 5px 12px; border-radius: 10px; background: rgba(34, 229, 160, 0.12); color: var(--vert-clair); }
.ev-score.warn { background: rgba(255, 170, 0, 0.12); color: var(--orange); }
.ev-score.bad { background: rgba(255, 60, 90, 0.12); color: var(--rouge); }
.ev-details-score { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-details-score span { font-size: 11.5px; padding: 4px 8px; border-radius: 7px; background: var(--voile); color: var(--texte-att); }

/* ── Résultat : tuiles et étapes ───────────────────────────────────────── */
.ev-tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ev-tuile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; border: 1px solid; background: var(--voile); text-align: center; }
.ev-tuile .t-valeur { font-size: 16px; font-weight: 800; }
.ev-tuile .t-label { font-size: 10.5px; color: var(--texte-att); }
.ev-tuile.cyan { border-color: rgba(0, 229, 255, 0.4); } .ev-tuile.cyan .t-valeur { color: var(--cyan); }
.ev-tuile.violet { border-color: rgba(181, 55, 242, 0.45); } .ev-tuile.violet .t-valeur { color: var(--violet-texte); }
.ev-tuile.good { border-color: rgba(34, 229, 160, 0.5); } .ev-tuile.good .t-valeur { color: var(--vert-vif); }
.ev-tuile.warn { border-color: rgba(255, 170, 0, 0.5); } .ev-tuile.warn .t-valeur { color: var(--orange); }
.ev-tuile.bad { border-color: rgba(255, 60, 90, 0.5); } .ev-tuile.bad .t-valeur { color: var(--rouge); }
.ev-meteo-info { font-size: 12.5px; color: var(--texte-att); margin-top: 8px; }

.ev-etapes { position: relative; display: flex; flex-direction: column; padding-left: 4px; }
.ev-etape { position: relative; display: flex; gap: 12px; }
.ev-etape-rail { position: relative; width: 28px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.ev-etape-rail::after { content: ""; flex: 1; width: 3px; margin: 2px 0; background: rgba(34, 229, 160, 0.45); border-radius: 2px; }
.ev-etape:last-child .ev-etape-rail::after { display: none; }
.ev-etape-icone { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; border: 2px solid #fff; }
.ev-etape.depart .ev-etape-icone { background: var(--p-rapide); }
.ev-etape.arret .ev-etape-icone { background: var(--p-acc); }
.ev-etape.arrivee .ev-etape-icone { background: #ff6b35; }
.ev-etape-corps { flex: 1; min-width: 0; padding-bottom: 12px; }
.ev-etape-titre { font-size: 15px; font-weight: 700; }
.ev-etape-sous { font-size: 12.5px; color: var(--texte-att); margin-top: 2px; }
.ev-etape-carte { margin-top: 8px; padding: 12px; border-radius: 14px; background: var(--bloc); border: 1px solid rgba(79, 224, 255, 0.3); display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.ev-etape-route { font-size: 12.5px; color: var(--texte-faible); padding: 2px 0 10px; }
.ev-batt { font-weight: 800; }
.ev-batt.good { color: var(--vert-vif); } .ev-batt.warn { color: var(--orange); } .ev-batt.bad { color: var(--rouge); }

/* ── Profil du trajet et frise ─────────────────────────────────────────── */
.ev-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-stats span { font-size: 12px; padding: 5px 9px; border-radius: 9px; background: var(--bloc-2); }
.ev-stats strong { color: var(--vert-clair); }
.ev-courbe-wrap { position: relative; height: 270px; }
.ev-frise-entete { display: flex; justify-content: space-between; font-size: 14px; }
.ev-frise-valeur { font-size: 16px; font-weight: 800; color: var(--vert-clair); }
.ev-frise-piste { position: relative; height: 12px; margin: 16px 8px 4px; border-radius: 999px; background: var(--piste); touch-action: none; cursor: pointer; }
.ev-frise-piste::before { content: ""; position: absolute; inset: -16px 0; }
.ev-frise-remplissage { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, #1a6fe8, #6fb3ff); pointer-events: none; }
.ev-frise-arrets { position: absolute; inset: 0; pointer-events: none; }
.ev-charge-timeline-stop { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; background: var(--bloc); border: 2px solid var(--cyan); display: flex; align-items: center; justify-content: center; font-size: 12px; pointer-events: auto; cursor: pointer; z-index: 2; }
.ev-frise-curseur { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; background: var(--cyan); border: 3px solid #fff; box-shadow: 0 0 14px rgba(0, 229, 255, 0.9); pointer-events: none; z-index: 3; }
.ev-frise-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--texte-faible); }

/* ── Itinéraires alternatifs ───────────────────────────────────────────── */
.ev-itineraires { gap: 8px; }
.ev-itineraires h3 { margin: 0; }
.ev-itin-aide { font-size: 12px; color: var(--texte-att); }
.ev-itineraire { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; font: inherit; color: var(--texte); background: var(--voile); border: 1px solid var(--bordure); border-radius: 14px; padding: 10px 12px; cursor: pointer; }
.ev-itineraire.choisi { border-color: var(--vert); background: rgba(34, 229, 160, 0.08); cursor: default; }
.ev-itineraire.attente { cursor: default; opacity: 0.75; }
.ev-itin-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.ev-itin-coche { font-size: 12px; font-weight: 700; color: var(--vert-vif); }
.ev-itin-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.ev-itin-ligne { font-size: 13px; line-height: 1.4; }
.ev-itin-sous { font-size: 12px; color: var(--texte-att); line-height: 1.4; }

/* ── Scénarios ─────────────────────────────────────────────────────────── */
.ev-scenarios { display: flex; flex-direction: column; gap: 10px; }
.ev-scenarios-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ev-scenario { background: var(--bloc); border: 1px solid var(--bordure); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.ev-scenario-mode { font-size: 14px; font-weight: 800; color: var(--vert-clair); text-align: center; margin-bottom: 4px; }
.ev-scenario-ligne { display: flex; justify-content: space-between; font-size: 12px; color: var(--texte-att); padding: 3px 0; border-bottom: 1px solid var(--separateur); }
.ev-scenario-ligne strong { color: var(--texte); }
.ev-scenario .ev-btn { margin-top: 6px; padding: 8px; font-size: 12.5px; }

.ev-qrcode { align-self: center; padding: 12px; background: #fff; border-radius: 12px; }
.ev-qrcode img { display: block; }

/* ── Urgence ───────────────────────────────────────────────────────────── */
.ev-urgence { position: fixed; inset: 0; z-index: 900; background: var(--urgence-fond); display: flex; flex-direction: column; }
.ev-urgence-entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(16px + var(--securite-haut)) 16px 16px; background: rgba(255, 60, 90, 0.14); border-bottom: 1px solid rgba(255, 60, 90, 0.35); color: #ff8a9a; font-weight: 800; font-size: 14px; }
.ev-urgence-fermer { flex-shrink: 0; border: 1px solid rgba(255, 128, 128, 0.6); background: rgba(255, 60, 90, 0.25); color: #fff; border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.ev-urgence-corps { flex: 1; overflow-y: auto; padding: 16px 16px calc(16px + var(--securite-bas)); display: flex; flex-direction: column; gap: 14px; }
.ev-urgence-carte { background: var(--bloc); border: 1px solid var(--bordure); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.ev-urgence-carte.principale { border-color: rgba(34, 229, 160, 0.6); background: rgba(34, 229, 160, 0.07); }
.ev-urgence-titre { font-size: 15px; font-weight: 800; }

/* ── Navigation GPS ────────────────────────────────────────────────────── */
.ev-btn-go { font-size: 17px; padding: 16px; }
.ev-lien-centre { align-self: center; }

body.ev-mode-navigation { --feuille-visible: 96px; }
body.ev-mode-navigation .ev-haut,
body.ev-mode-navigation .ev-feuille,
body.ev-mode-navigation .ev-nav,
body.ev-mode-navigation .ev-fabs { display: none !important; }
body.ev-mode-navigation .ev-carte { left: 0; }

.ev-navigation { position: fixed; inset: 0; z-index: 850; pointer-events: none; }
.ev-navigation > * { pointer-events: auto; }
.ev-voiture { width: 56px; height: 56px; transition: transform 0.6s linear; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)); }

.ev-nav-haut { position: absolute; top: calc(8px + var(--securite-haut)); left: 8px; right: 8px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.ev-nav-haut > * { pointer-events: auto; }
.ev-nav-manoeuvre {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f7a55, #0b5c41);
  color: #fff;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.55);
}
/* Grand bandeau : flèche dessinée et distance à gauche, rue en gros à droite. */
.ev-nav-manoeuvre-gauche { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; min-width: 96px; }
.ev-nav-fleche { line-height: 1; text-align: center; }
.ev-nav-fleche svg { display: block; width: 88px; height: 88px; }
.ev-nav-fleche-emoji { display: block; font-size: 64px; line-height: 88px; }
.ev-nav-manoeuvre-texte { min-width: 0; flex: 1; }
.ev-nav-distance { font-size: 40px; font-weight: 900; line-height: 1; white-space: nowrap; }
.ev-nav-rue { font-size: 30px; font-weight: 800; line-height: 1.12; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-nav-instruction { font-size: 16px; font-weight: 600; line-height: 1.25; opacity: 0.92; margin-top: 4px; }
.ev-nav-rue.hidden ~ .ev-nav-instruction { font-size: 24px; font-weight: 800; opacity: 1; margin-top: 0; }
.ev-nav-ensuite-fleche svg { width: 22px; height: 22px; vertical-align: -5px; }
/* Affichage compact (par défaut) : pensé pour le cas où tout s'affiche en
   même temps. Bandeau bas, « Puis… » accroché dessous, une seule info
   secondaire à la fois (voir navigation.js), pastilles et tuiles discrètes. */
body.ev-bandeau-compact .ev-nav-haut { gap: 6px; }
body.ev-bandeau-compact .ev-nav-manoeuvre { order: 0; padding: 8px 12px; gap: 10px; border-radius: 16px; }
body.ev-bandeau-compact .ev-nav-manoeuvre-gauche { min-width: 58px; }
body.ev-bandeau-compact .ev-nav-fleche svg { width: 50px; height: 50px; }
body.ev-bandeau-compact .ev-nav-fleche-emoji { font-size: 36px; line-height: 50px; }
body.ev-bandeau-compact .ev-nav-distance { font-size: 23px; }
body.ev-bandeau-compact .ev-nav-rue { font-size: 21px; -webkit-line-clamp: 1; }
body.ev-bandeau-compact .ev-nav-instruction { font-size: 13.5px; margin-top: 2px; }
body.ev-bandeau-compact .ev-nav-rue.hidden ~ .ev-nav-instruction { font-size: 17px; }
body.ev-bandeau-compact .ev-nav-panneau { margin-top: 3px; gap: 4px; }
body.ev-bandeau-compact .ev-num { font-size: 13px; padding: 0 6px; border-width: 1.5px; }
body.ev-bandeau-compact .ev-nav-direction { font-size: 15px; }
body.ev-bandeau-compact .ev-nav-ensuite { order: 1; margin: -10px 0 0 14px; padding: 7px 12px 5px; border-radius: 0 0 12px 12px; font-size: 13px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35); }
body.ev-bandeau-compact .ev-nav-alerte { order: 2; padding: 7px 12px; font-size: 13.5px; }
body.ev-bandeau-compact .ev-nav-danger { order: 3; padding: 4px 10px; font-size: 13.5px; }
body.ev-bandeau-compact .ev-nav-voies { order: 4; }
body.ev-bandeau-compact .ev-nav-vue-voies { order: 5; align-self: flex-start; width: 140px; padding: 6px; border-radius: 12px; }
body.ev-bandeau-compact .ev-nav-vue-voies-instruction { font-size: 10px; }
body.ev-bandeau-compact .ev-nav-vue-voies-distance { font-size: 14px; margin-bottom: 0; }
body.ev-bandeau-compact .ev-nav-borne { order: 6; align-self: flex-start; max-width: 100%; padding: 5px 10px; border-radius: 12px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(20, 28, 40, 0.82); color: #e8eef7; }
body.ev-bandeau-compact .ev-aire { width: 50px; padding: 4px 2px 3px; border-width: 1.5px; border-radius: 10px; }
body.ev-bandeau-compact .ev-aire span { font-size: 15px; }
body.ev-bandeau-compact .ev-aire strong { font-size: 11px; }
body.ev-bandeau-compact .ev-aire small { font-size: 10px; }
body.ev-bandeau-compact .ev-nav-aires { gap: 4px; }
.ev-nav-voies { align-self: center; display: flex; gap: 0; padding: 6px 8px; border-radius: 14px; background: #0b4a35; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }
.ev-nav-voie { min-width: 46px; height: 46px; padding: 0 6px; display: flex; align-items: center; justify-content: center; gap: 1px; font-size: 30px; font-weight: 900; line-height: 1; color: rgba(255, 255, 255, 0.3); border-left: 2px dashed rgba(255, 255, 255, 0.35); }
.ev-nav-voie:first-child { border-left: none; }
.ev-nav-voie.active { color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.14); border-radius: 8px; }
.ev-nav-voie .suivre { color: #fff; }
.ev-nav-ensuite { align-self: flex-start; padding: 7px 14px; border-radius: 12px; background: #0b4a35; color: #d9fff0; font-size: 14px; font-weight: 600; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }
.ev-nav-borne { padding: 9px 14px; border-radius: 14px; background: var(--panneau); border: 1px solid rgba(79, 224, 255, 0.45); font-size: 13.5px; line-height: 1.35; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }
.ev-nav-borne strong { color: var(--cyan); }
.ev-nav-alerte { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(120, 20, 38, 0.95); border: 1px solid rgba(255, 90, 110, 0.6); font-size: 14px; font-weight: 600; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }
.ev-nav-alerte .ev-btn { flex-shrink: 0; padding: 8px 12px; background: rgba(255, 255, 255, 0.12); }
/* Info discrète (bleu) : rien à faire, pas de conséquence sur la conduite
   (ex : bascule automatique sur l'autre fournisseur de carte, rappel des
   commandes vocales) -- ne doit pas alarmer comme une vraie alerte. */
.ev-nav-alerte.ev-nav-alerte-info { background: rgba(20, 60, 110, 0.95); border-color: rgba(100, 170, 255, 0.6); }

.ev-nav-vitesse-bloc { position: absolute; left: 12px; bottom: calc(108px + var(--securite-bas)); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ev-nav-limite { width: 54px; height: 54px; border-radius: 50%; background: #fff; border: 6px solid #e0162b; color: #111; font-size: 20px; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); }
.ev-nav-vitesse { width: 66px; height: 66px; border-radius: 50%; background: var(--bloc); border: 2px solid var(--bordure-forte); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55); }
.ev-nav-vitesse[data-etat-vitesse="vert"] { box-shadow: 0 0 0 4px #22c55e; }
.ev-nav-vitesse[data-etat-vitesse="orange"] { box-shadow: 0 0 0 4px #f97316; }
.ev-nav-vitesse strong { font-size: 24px; font-weight: 900; line-height: 1; }
.ev-nav-vitesse span { font-size: 10px; color: var(--texte-att); }
.ev-nav-vitesse.exces { background: #b3122a; border-color: #ff5c7a; }
.ev-nav-vitesse.exces span { color: #fff; }

.ev-nav-boutons { position: absolute; right: 12px; bottom: calc(108px + var(--securite-bas)); display: flex; flex-direction: column; gap: 10px; }
.ev-nav-recentrer { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(112px + var(--securite-bas)); padding: 12px 20px; border-radius: 24px; border: none; background: #3d8bff; color: #fff; font-size: 15px; font-weight: 800; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); cursor: pointer; }

.ev-nav-carte {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(104px + var(--securite-bas));
  padding: 16px;
  border-radius: 18px;
  background: var(--panneau);
  border: 1px solid rgba(34, 229, 160, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
  z-index: 2;
}
.ev-nav-carte-titre { font-size: 18px; font-weight: 800; color: var(--vert-clair); }

/* Téléphone à l'horizontale (support voiture) : consignes et infos dans une
   colonne à gauche, la carte et la voiture à droite. */
@media (orientation: landscape) and (max-height: 560px) {
  .ev-navigation { --col-nav: min(44vw, 420px); }
  .ev-nav-haut { right: auto; width: var(--col-nav); }
  .ev-nav-bas { right: auto; width: var(--col-nav); border-top-right-radius: 16px; }
  .ev-nav-infos strong { font-size: 16px; }
  .ev-nav-vitesse-bloc { left: calc(var(--col-nav) + 14px); bottom: calc(12px + var(--securite-bas)); flex-direction: row; }
  .ev-nav-boutons { bottom: calc(12px + var(--securite-bas)); }
  .ev-nav-boutons .ev-fab { width: 44px; height: 44px; font-size: 18px; }
  .ev-nav-recentrer { left: calc(var(--col-nav) + (100vw - var(--col-nav)) / 2); bottom: calc(14px + var(--securite-bas)); }
  .ev-nav-carte { right: auto; width: var(--col-nav); bottom: calc(76px + var(--securite-bas)); max-height: calc(100vh - 100px); overflow-y: auto; }
}

/* Mode voiture : tout en plus grand, facile à viser d'un doigt en roulant. */
body.ev-mode-voiture .ev-nav-distance { font-size: 46px; }
body.ev-mode-voiture .ev-nav-rue { font-size: 34px; }
body.ev-mode-voiture .ev-nav-instruction { font-size: 18px; }
body.ev-mode-voiture .ev-nav-fleche svg { width: 104px; height: 104px; }
body.ev-mode-voiture .ev-nav-boutons .ev-fab { width: 60px; height: 60px; font-size: 26px; }
body.ev-mode-voiture .ev-nav-stop { width: 62px; height: 62px; font-size: 26px; }
body.ev-mode-voiture .ev-nav-infos strong { font-size: 22px; }
body.ev-mode-voiture .ev-nav-vitesse { width: 78px; height: 78px; }
body.ev-mode-voiture .ev-nav-vitesse strong { font-size: 30px; }
body.ev-mode-voiture .ev-nav-limite { width: 64px; height: 64px; font-size: 24px; }
.ev-nav-carte-sous { font-size: 12.5px; color: var(--texte-att); }

.ev-nav-bas {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px calc(10px + var(--securite-bas));
  background: var(--nav-fond);
  border-top: 1px solid var(--bordure-forte);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.5);
}
.ev-nav-stop { flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; border: none; background: #b3122a; color: #fff; font-size: 22px; font-weight: 900; cursor: pointer; }
.ev-nav-infos { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; text-align: center; }
.ev-nav-infos > * { display: flex; flex-direction: column; align-items: center; background: none; border: none; padding: 0; color: var(--texte); cursor: default; }
.ev-nav-infos strong { font-size: 19px; font-weight: 900; }
.ev-nav-infos span { font-size: 11px; color: var(--texte-att); }
.ev-nav-infos div:first-child strong { color: var(--vert-clair); }
.ev-nav-batt { cursor: pointer !important; }
.ev-nav-batt strong.good { color: var(--vert-vif); } .ev-nav-batt strong.warn { color: var(--orange); } .ev-nav-batt strong.bad { color: var(--rouge); }

/* ── Notification ──────────────────────────────────────────────────────── */
.ev-toast {
  position: fixed;
  left: 50%;
  top: calc(120px + var(--securite-haut));
  transform: translate(-50%, -10px);
  z-index: 1000;
  max-width: 90vw;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--bloc);
  border: 1px solid rgba(34, 229, 160, 0.4);
  font-size: 13.5px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.ev-toast.visible { opacity: 1; transform: translate(-50%, 0); }

.ev-aide-champ { display: block; margin-top: 3px; font-size: 11px; color: var(--texte-faible); }

/* Journal des recharges */
.ev-details summary { cursor: pointer; font-weight: 700; font-size: 13.5px; padding: 4px 0; }
.ev-details[open] summary { margin-bottom: 8px; }
.ev-journal-mois { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--separateur); font-size: 13px; }
.ev-journal-mois strong { text-transform: capitalize; }
.ev-positif { color: var(--vert-vif); font-weight: 700; }
.ev-negatif { color: var(--rouge); font-weight: 700; }
.ev-journal-liste { display: flex; flex-direction: column; }
.ev-journal-ligne { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--separateur); font-size: 12.5px; }

/* Accueil du premier lancement */
.ev-accueil { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.6); }
.ev-accueil-carte { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 22px 18px; border-radius: 22px; background: var(--panneau); border: 1px solid var(--bordure-forte); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); text-align: center; }
.ev-accueil-icone { font-size: 46px; line-height: 1; }
.ev-accueil-carte h2 { margin: 0; font-size: 20px; }
.ev-accueil-carte p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--texte-att); text-align: left; }
.ev-accueil-points { display: flex; gap: 6px; }
.ev-accueil-points span { width: 8px; height: 8px; border-radius: 50%; background: var(--piste); }
.ev-accueil-points span.actif { background: var(--vert); }
.ev-accueil-boutons { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ev-accueil-boutons .ev-btn-principal { flex: 1; }

/* Bandeau « nouvelle version disponible » */
.ev-maj { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 12px + var(--securite-bas)); z-index: 950; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--panneau); border: 1px solid var(--vert); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); font-size: 14px; font-weight: 600; }
.ev-maj .ev-btn { flex-shrink: 0; padding: 8px 12px; }
.ev-maj-boutons { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Grand écran (PC, tablette) : panneau à gauche ─────────────────────── */
@media (min-width: 900px) {
  :root { --feuille-visible: 0px; }
  .ev-feuille { top: 0; right: auto; width: 420px; height: auto; bottom: var(--nav-h); border-radius: 0; transform: none !important; }
  .ev-poignee-zone { display: none; }
  .ev-feuille-corps { padding-top: 16px; padding-bottom: 20px !important; }
  .ev-nav { right: auto; width: 420px; }
  .ev-haut { left: 420px; }
  .ev-carte { left: 420px; }
  .ev-fabs { bottom: 24px; }
  body[data-feuille="haut"] .ev-fabs { opacity: 1; pointer-events: auto; }
  .ev-toast { left: calc(50% + 210px); }
}
.ev-btn-plein { width: 100%; margin-top: 8px; }
body.ev-mode-navigation .ev-maj { display: none; }

/* Zone de danger (radars) : bandeau orange sous la manœuvre. */
.ev-nav-danger { align-self: flex-start; padding: 8px 14px; border-radius: 12px; background: #e8590c; color: #fff; font-size: 17px; font-weight: 800; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }
/* Alerte radar bien plus marquee que la zone de danger ci-dessus (demande
   explicite du 2026-10-10 : "il faut que ca flashe bien") -- pleine largeur,
   tres grande, clignote vraiment (couleur ET taille), uniquement pendant
   l'approche rapprochee (200/100/50 m, voir verifierApprocheRadar). */
.ev-nav-radar-flash {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
  animation: ev-radar-flash 0.6s infinite;
}
@keyframes ev-radar-flash {
  0%, 100% { background: #d32f2f; transform: scale(1); }
  50% { background: #ff8f00; transform: scale(1.035); }
}
/* Fenêtre des voies (comme Sygic), à droite sous le bandeau. */
.ev-nav-vue-voies { align-self: flex-end; width: 140px; padding: 7px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 14px; background: linear-gradient(#1b2433, #2a3344); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55); }
.ev-nav-vue-voies svg { display: block; width: 100%; height: auto; }
.ev-nav-vue-voies-instruction { color: #fff; font-size: 12px; font-weight: 900; letter-spacing: 0.04em; text-align: center; text-transform: uppercase; }
.ev-nav-vue-voies-distance { color: #fff; font-size: 20px; font-weight: 900; text-align: center; margin: 2px 0; }
body.ev-mode-voiture .ev-nav-vue-voies { width: 160px; }
body.ev-mode-voiture .ev-nav-vue-voies-instruction { font-size: 13px; }
/* Routes coupées à éviter (Trajet > options) et visée sur la carte */
.ev-zones-evitees { display: flex; flex-direction: column; gap: 6px; }
.ev-zone-evitee { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--chip); font-size: 14px; }
.ev-zone-evitee button { background: none; border: none; color: var(--texte); font-size: 16px; cursor: pointer; }
.ev-visee { position: fixed; z-index: 900; width: 44px; height: 44px; margin: -22px 0 0 -22px; pointer-events: none; border: 3px solid #ff3b3b; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8); }
.ev-visee::before, .ev-visee::after { content: ""; position: absolute; background: #ff3b3b; }
.ev-visee::before { left: 50%; top: -12px; bottom: -12px; width: 3px; margin-left: -1.5px; }
.ev-visee::after { top: 50%; left: -12px; right: -12px; height: 3px; margin-top: -1.5px; }
.ev-visee-barre { position: fixed; z-index: 950; left: 12px; right: 12px; top: calc(12px + var(--securite-haut)); display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--panneau); border: 1px solid #ff3b3b; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); font-size: 14px; font-weight: 600; }
.ev-visee-barre div { display: flex; gap: 8px; justify-content: flex-end; }

/* Panneau comme sur la route : bleu sur autoroute, numéros de route aux
   couleurs françaises, numéro de sortie, direction. */
.ev-nav-manoeuvre { transition: background 0.6s; }
.ev-nav-manoeuvre.autoroute { background: linear-gradient(135deg, #1f63c6, #164a99); }
.ev-nav-panneau { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.ev-num { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 16px; font-weight: 900; line-height: 1.3; border: 2px solid rgba(255, 255, 255, 0.9); }
.ev-num-rouge { background: #d4232b; color: #fff; }
.ev-num-jaune { background: #f6c700; color: #111; border-color: #111; }
.ev-num-vert { background: #178a3c; color: #fff; }
.ev-num-cyan { background: #00a0e0; color: #fff; }
.ev-num-gris { background: #5b6475; color: #fff; }
.ev-num-sortie { background: #fff; color: #111; border-color: #111; }
.ev-nav-direction { font-size: 19px; font-weight: 800; }
body.ev-mode-voiture .ev-nav-direction { font-size: 22px; }

/* Feuille de route : sorties et échangeurs */
.ev-echangeurs { margin-top: 10px; }
.ev-echangeurs-liste { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.ev-echangeur { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; background: var(--chip); font-size: 14px; }
.ev-echangeur .ev-num { font-size: 13px; padding: 1px 6px; }
.ev-echangeur-km { min-width: 58px; font-weight: 800; color: var(--texte-att); }
.ev-echangeur-dir { font-weight: 700; }

/* Menu « ⋯ » de la navigation */
.ev-nav-menu { bottom: calc(112px + var(--securite-bas)); }
.ev-nav-menu-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.ev-nav-menu-grille button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--bordure-forte); background: var(--bloc); color: var(--texte); font-size: 24px; cursor: pointer; }
.ev-nav-menu-grille button span { font-size: 13px; font-weight: 700; text-align: center; }
.ev-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ev-chip { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--bordure-forte); background: var(--bloc); color: var(--texte); font-size: 14px; font-weight: 600; cursor: pointer; }
.ev-chip.actif { background: var(--vert-clair); color: #06281a; border-color: var(--vert-clair); }
/* Frise du trajet restant */
.ev-nav-frise { position: absolute; left: 12px; right: 12px; bottom: calc(92px + var(--securite-bas)); height: 12px; border-radius: 6px; background: rgba(34, 229, 160, 0.55); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.ev-nav-frise span { position: absolute; top: 0; bottom: 0; }
.ev-nav-frise .fait { background: #6b7385; border-radius: 6px 0 0 6px; }
.ev-nav-frise .bouchon { background: #e53935; }
.ev-nav-frise .travaux { background: #ff9800; }
.ev-nav-frise .danger { top: -3px; bottom: auto; height: 4px; background: #ff6d00; }
.ev-nav-frise i { position: absolute; top: 50%; transform: translate(-50%, -50%); font-style: normal; font-size: 14px; line-height: 1; }
.ev-nav-frise .voiture { width: 16px; height: 16px; border-radius: 50%; background: #3d8bff; border: 3px solid #fff; }
.ev-nav-frise .arrivee { left: 100%; }
/* Tête haute : à l'envers, pour le reflet dans le pare-brise */
.ev-nav-hud { display: none; }
body.ev-hud .ev-nav-hud { display: flex; position: fixed; inset: 0; z-index: 5000; background: #000; align-items: center; justify-content: center; }
.ev-hud-contenu { transform: scaleY(-1); display: flex; flex-direction: column; align-items: center; gap: 10px; color: #7dffcf; text-align: center; padding: 20px; }
.ev-hud-fleche svg { width: 180px; height: 180px; }
.ev-hud-fleche svg path { stroke: #7dffcf; }
.ev-hud-fleche svg polygon { stroke: #7dffcf; fill: #7dffcf; }
.ev-hud-distance { font-size: 72px; font-weight: 900; line-height: 1; }
.ev-hud-texte { font-size: 34px; font-weight: 800; max-width: 90vw; }
.ev-hud-vitesses { display: flex; gap: 24px; align-items: center; margin-top: 10px; }
.ev-hud-vitesse { font-size: 84px; font-weight: 900; }
.ev-hud-vitesse.exces { color: #ff5252; }
.ev-hud-limite { width: 84px; height: 84px; border-radius: 50%; border: 9px solid #ff5252; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 900; color: #fff; }

/* Suggestions d'adresses */
.ev-suggestions { position: fixed; z-index: 1200; display: flex; flex-direction: column; max-height: 50vh; overflow-y: auto; border-radius: 12px; background: var(--panneau); border: 1px solid var(--bordure-forte); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
.ev-suggestions button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: none; border-bottom: 1px solid var(--bordure); background: none; color: var(--texte); text-align: left; cursor: pointer; }
.ev-suggestions button:last-child { border-bottom: none; }
.ev-suggestions span { font-size: 12.5px; color: var(--texte-att); }
/* Résultats (le long du trajet, parkings) */
.ev-titre-fermer { display: flex; justify-content: space-between; align-items: center; }
.ev-fermer { background: none; border: none; color: var(--texte); font-size: 18px; cursor: pointer; }
.ev-nav-resultats { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; max-height: 40vh; overflow-y: auto; }
.ev-nav-resultat { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--chip); }
.ev-nav-resultat .ev-btn { flex-shrink: 0; }
.ev-garee { font-size: 26px; line-height: 40px; width: 40px; height: 40px; text-align: center; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }

/* Graphique batterie prévue / réelle (palette validée : bleu / orange) */
.ev-batt-graph { --serie-1: #3987e5; --serie-2: #d95926; margin-top: 6px; touch-action: none; }
:root[data-theme="clair"] .ev-batt-graph, :root[data-theme="clair"] .ev-batt-legende { --serie-1: #2a78d6; --serie-2: #eb6834; }
.ev-batt-legende { --serie-1: #3987e5; --serie-2: #d95926; display: flex; gap: 16px; font-size: 13px; color: var(--texte-att); margin-top: 6px; }
.ev-batt-legende span { display: inline-flex; align-items: center; gap: 6px; }
.ev-batt-legende .trait-prevue { width: 18px; height: 2px; background: var(--serie-1); }
.ev-batt-legende .point-reelle { width: 9px; height: 9px; border-radius: 50%; background: var(--serie-2); }
.ev-batt-graph svg { display: block; width: 100%; height: auto; }
.ev-batt-graph .grille { stroke: var(--bordure); stroke-width: 1; }
.ev-batt-graph .axe { fill: var(--texte-att); font-size: 11px; }
.ev-batt-graph .borne { stroke: var(--texte-att); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.6; }
.ev-batt-graph .maintenant { stroke: var(--texte); stroke-width: 1; opacity: 0.5; }
.ev-batt-graph .prevue { fill: none; stroke: var(--serie-1); stroke-width: 2; stroke-linejoin: round; }
.ev-batt-graph .reelle { fill: none; stroke: var(--serie-2); stroke-width: 2; stroke-linejoin: round; }
.ev-batt-graph .point-reel { fill: var(--serie-2); stroke: var(--panneau); stroke-width: 2; }
.ev-batt-graph .curseur { stroke: var(--texte); stroke-width: 1; }
.ev-batt-details summary { font-size: 13px; color: var(--texte-att); cursor: pointer; margin-top: 4px; }
.ev-batt-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.ev-batt-table th, .ev-batt-table td { padding: 3px 6px; text-align: right; border-bottom: 1px solid var(--bordure); }
#ev-nav-batterie-panneau { max-height: calc(100vh - 220px); overflow-y: auto; }

/* Quand partir ? (une seule couleur : la durée) */
.ev-quand-partir { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ev-qp-ligne { display: grid; grid-template-columns: 84px 1fr 124px; align-items: center; gap: 8px; font-size: 14px; }
.ev-qp-heure { font-weight: 700; }
.ev-qp-barre { height: 12px; border-radius: 6px; background: var(--bordure); overflow: hidden; }
.ev-qp-barre i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: #3987e5; }
:root[data-theme="clair"] .ev-qp-barre i { background: #2a78d6; }
.ev-qp-valeur { font-weight: 800; white-space: nowrap; }
.ev-qp-valeur small { margin-left: 6px; font-weight: 600; color: var(--texte-att); }
.ev-stats-periodes { margin-bottom: 8px; }

/* Aires et bornes sur autoroute (colonne comme Sygic, au-dessus du compteur) */
.ev-nav-aires { display: flex; flex-direction: column; gap: 6px; }
.ev-aire { width: 66px; padding: 6px 2px 5px; border-radius: 12px; background: #1f63c6; color: #fff; display: flex; flex-direction: column; align-items: center; line-height: 1.1; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); border: 2px solid rgba(255, 255, 255, 0.85); }
.ev-aire span { font-size: 20px; }
.ev-aire strong { font-size: 13px; font-weight: 900; white-space: nowrap; }
.ev-aire small { font-size: 11px; font-weight: 700; opacity: 0.9; }
.ev-aire-recharge { background: #0f8a5f; }
body.ev-mode-voiture .ev-aire { width: 78px; }
body.ev-mode-voiture .ev-aire strong { font-size: 15px; }

/* Boutons de droite estompés après quelques secondes sans toucher l'écran. */
.ev-nav-boutons { transition: opacity 0.5s; }
body.ev-nav-calme .ev-nav-boutons { opacity: 0.35; }

/* Bandeau replié en longue ligne droite : une seule ligne */
.ev-nav-manoeuvre.replie { padding: 5px 12px; gap: 8px; align-items: center; }
.ev-nav-manoeuvre.replie .ev-nav-manoeuvre-gauche { flex-direction: row; gap: 6px; min-width: 0; align-items: center; }
.ev-nav-manoeuvre.replie .ev-nav-fleche svg { width: 26px; height: 26px; }
.ev-nav-manoeuvre.replie .ev-nav-distance { font-size: 18px; }
.ev-nav-manoeuvre.replie .ev-nav-rue { font-size: 15px; -webkit-line-clamp: 1; }
.ev-nav-manoeuvre.replie .ev-nav-instruction, .ev-nav-manoeuvre.replie .ev-nav-panneau { display: none; }
.ev-nav-manoeuvre.replie .ev-nav-rue.hidden ~ .ev-nav-instruction { display: block; font-size: 15px; }
.ev-nav-manoeuvre { cursor: pointer; }
/* Écran épuré sur autoroute : l'essentiel reste, le reste s'efface -- mais
   pas la frise de progression (petite, utile en un coup d'œil, demande du
   2026-10-03 : elle semblait "ne pas marcher" alors qu'elle était juste masquée ici). */
.ev-nav-borne, .ev-nav-frise { transition: opacity 0.6s; }
body.ev-nav-epure .ev-nav-borne { opacity: 0; pointer-events: none; }
body.ev-nav-epure .ev-nav-boutons { opacity: 0.15; }
/* Feuille de route (toucher le bandeau) */
.ev-nav-feuille { position: absolute; left: 8px; right: 8px; top: calc(96px + var(--securite-haut)); z-index: 30; max-height: 55vh; overflow-y: auto; padding: 10px 12px; border-radius: 16px; background: var(--panneau); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55); }
.ev-nav-feuille small { font-weight: 500; color: var(--texte-att); font-size: 12px; }
.ev-feuille-liste { display: flex; flex-direction: column; margin-top: 6px; }
.ev-feuille-ligne { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--bordure); font-size: 14px; }
.ev-feuille-ligne em { font-style: normal; font-weight: 800; white-space: nowrap; }
.ev-feuille-fleche svg { width: 24px; height: 24px; display: block; }
.ev-feuille-fleche svg path, .ev-feuille-fleche svg polygon { stroke: var(--texte); }
.ev-feuille-fleche svg polygon { fill: var(--texte); }
/* Nuit douce */
body.ev-nuit-douce.ev-mode-navigation .ev-carte, body.ev-nuit-douce.ev-mode-navigation .ev-carte-3d { filter: brightness(0.78); }
body.ev-nuit-douce .ev-nav-haut, body.ev-nuit-douce .ev-nav-bas { filter: brightness(0.88); }

/* Km réels sous les curseurs de batterie */
.ev-km-estime { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--texte-att); }

/* Raccourcis de destination, bilan d'arrivée */
.ev-raccourcis-dest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ev-bilan { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 8px 0; }
.ev-bilan div { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 10px; background: var(--chip); }
.ev-bilan strong { font-size: 17px; }
.ev-bilan span { font-size: 12px; color: var(--texte-att); }

/* Taille du texte en navigation (réglage) : tout le haut, le bas, le compteur */
.ev-nav-haut, .ev-nav-bas, .ev-nav-vitesse-bloc, .ev-nav-feuille { zoom: var(--echelle-nav, 1); }
/* Téléphone faible : ombres et transitions coûteuses retirées */
body.ev-eco .ev-nav-manoeuvre, body.ev-eco .ev-nav-ensuite, body.ev-eco .ev-fab, body.ev-eco .ev-aire { box-shadow: none; }
body.ev-eco .ev-nav-manoeuvre, body.ev-eco .ev-nav-boutons, body.ev-eco .ev-nav-borne { transition: none; }

/* « Puis… » : une ligne discrète dans le bandeau, sous l'instruction */
.ev-nav-manoeuvre-texte .ev-nav-ensuite, body.ev-bandeau-compact .ev-nav-manoeuvre-texte .ev-nav-ensuite { margin: 5px 0 0; padding: 4px 0 0; border-radius: 0; border-top: 1px solid rgba(255, 255, 255, 0.22); background: none; box-shadow: none; color: rgba(255, 255, 255, 0.85); font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-nav-manoeuvre-texte .ev-nav-ensuite-fleche svg { width: 16px; height: 16px; vertical-align: -3px; }
/* Prochaine borne : une ligne dans la barre du bas */
.ev-nav-bas { flex-wrap: wrap; row-gap: 4px; }
.ev-nav-bas .ev-nav-borne, body.ev-bandeau-compact .ev-nav-bas .ev-nav-borne { order: -1; flex-basis: 100%; margin: 0; padding: 0 2px 4px; border: none; border-bottom: 1px solid var(--bordure); border-radius: 0; background: none; box-shadow: none; color: var(--texte-att); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-nav-bas .ev-nav-borne strong { color: var(--texte); }
body.ev-borne-bas .ev-nav-frise { bottom: calc(116px + var(--securite-bas)); }
body.ev-borne-bas .ev-nav-boutons, body.ev-borne-bas .ev-nav-vitesse-bloc { bottom: calc(134px + var(--securite-bas)); }
.ev-nav-manoeuvre-texte .ev-nav-ensuite .ev-nav-fleche-emoji { display: inline; font-size: 14px; line-height: 1; }
.ev-nav-manoeuvre-texte .ev-nav-ensuite-fleche { display: inline; }

/* Écoute d'une réponse à la voix (mains sur le volant) */
.ev-nav-ecoute { position: absolute; left: 50%; bottom: calc(160px + var(--securite-bas)); transform: translateX(-50%); z-index: 40; padding: 10px 18px; border-radius: 22px; background: #c62828; color: #fff; font-size: 17px; font-weight: 800; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); animation: ev-pulse 1.2s infinite; }
@keyframes ev-pulse { 50% { opacity: 0.7; } }

/* Icônes dessinées */
.ev-fab .ev-icone { display: block; margin: auto; }
.ev-fab-sos { font-size: 13px; font-weight: 900; letter-spacing: 0.5px; }
/* Sous-menus (Profil, réglages de recharge) */
.ev-sous-menu { border: 1px solid var(--bordure); border-radius: 12px; padding: 4px 12px; margin-top: 8px; }
.ev-sous-menu > summary { cursor: pointer; padding: 8px 0; font-weight: 800; }
.ev-sous-menu[open] > summary { border-bottom: 1px solid var(--bordure); margin-bottom: 6px; }
.ev-aide-liste { margin: 6px 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.4; }
.ev-champ-titre { display: block; }
.ev-champ-titre .ev-valeur { display: inline; }

/* 🆘 SOS */
.ev-sos { position: fixed; inset: 0; z-index: 6000; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.55); }
.ev-sos-carte { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 14px 16px calc(16px + var(--securite-bas)); border-radius: 20px 20px 0 0; background: var(--panneau); border-top: 3px solid #d32f2f; display: flex; flex-direction: column; gap: 10px; }
.ev-sos-tete { display: flex; justify-content: space-between; align-items: center; font-size: 18px; }
.ev-sos-position { display: flex; flex-direction: column; gap: 6px; }
.ev-sos-ligne { display: grid; grid-template-columns: 108px 1fr; gap: 8px; align-items: baseline; padding: 6px 10px; border-radius: 10px; background: var(--chip); }
.ev-sos-ligne span { color: var(--texte-att); font-size: 13px; }
.ev-sos-ligne strong { font-size: 17px; }
.ev-sos-ligne small { font-weight: 600; color: var(--texte-att); font-size: 12.5px; }
.ev-sos-appel { display: block; text-align: center; padding: 14px; border-radius: 14px; background: #d32f2f; color: #fff; font-size: 20px; font-weight: 900; text-decoration: none; }
.ev-menu-sos { border-color: #d32f2f !important; }

/* Scan d'une borne (QR code) : même principe de feuille que le SOS. */
.ev-scan-borne { position: fixed; inset: 0; z-index: 6000; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.55); }
.ev-scan-carte { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 14px 16px calc(16px + var(--securite-bas)); border-radius: 20px 20px 0 0; background: var(--panneau); border-top: 3px solid var(--vert); display: flex; flex-direction: column; gap: 10px; }
.ev-scan-video { width: 100%; aspect-ratio: 3 / 4; max-height: 50vh; object-fit: cover; border-radius: 14px; background: #000; }
.ev-scan-resultat { display: flex; flex-direction: column; gap: 8px; }

/* Présentation à l'ouverture */
.ev-presentation { position: fixed; inset: 0; z-index: 9000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; text-align: center; background: linear-gradient(160deg, #0b1220, #12324a); color: #fff; transition: opacity 0.5s; }
.ev-presentation img { border-radius: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); margin-bottom: 10px; }
.ev-presentation h1 { margin: 0; font-size: 34px; font-weight: 900; letter-spacing: 0.5px; }
.ev-presentation-sous { margin: 0 0 22px; color: #9fd8ff; font-size: 15px; }
.ev-presentation-mention { margin: 0; font-size: 16px; font-weight: 800; }
.ev-presentation-legal { margin: 10px 0 0; max-width: 460px; font-size: 11.5px; line-height: 1.45; color: rgba(255, 255, 255, 0.62); }
.ev-presentation-suite { margin: 26px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, 0.5); }
.ev-presentation.ev-presentation-fermee { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Carte de la région hors ligne, reprise après coupure */
.ev-region-bloc { border: 1px solid var(--bordure); border-radius: 12px; padding: 10px 12px; margin: 8px 0 12px; display: flex; flex-direction: column; gap: 6px; }
.ev-reprise small { opacity: 0.85; }

/* Trajet : le bouton « effacer » n'apparaît que si le champ contient du
   texte, ce qui laisse la place de lire le champ vide en entier. */
.ev-itineraire-saisies .ev-input:placeholder-shown + .ev-mini-btn { display: none; }

/* Message « rien sur cette période » : toute la largeur, pas une colonne. */
.ev-tuiles > .ev-hint { grid-column: 1 / -1; }

/* Profil : « Enregistrer » gardé sous les yeux tant qu'une modification
   n'est pas enregistrée. */
#ev-profil-save-btn.ev-a-enregistrer { position: sticky; bottom: 10px; z-index: 5; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.6); }

/* ── Menu : rubriques rangées par groupe, une page par rubrique ───────── */
.ev-menu-titre { margin: 6px 4px -4px; font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--texte-att); }
.ev-menu-groupe { display: flex; flex-direction: column; background: var(--bloc); border: 1px solid var(--bordure); border-radius: 16px; overflow: hidden; }
.ev-menu-ligne { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; background: none; border: none; border-bottom: 1px solid var(--bordure); color: var(--texte); font: inherit; text-align: left; cursor: pointer; }
.ev-menu-ligne:last-child { border-bottom: none; }
.ev-menu-ligne:active { background: var(--bloc-2); }
.ev-menu-ligne::after { content: "›"; font-size: 24px; line-height: 1; color: var(--texte-faible); }
/* Rond de couleur pleine + icône blanche, comme la liste Paramètres de Waze
   (l'icône reste un emoji dans le code ; .ev-menu-glyphe le rend blanc,
   séparément du fond pour ne pas aussi le blanchir). */
.ev-menu-icone { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #3b82f6; font-size: 17px; }
.ev-menu-glyphe { filter: brightness(0) invert(1); }
.ev-menu-nom { display: block; font-size: 15.5px; font-weight: 700; }
.ev-menu-detail { display: block; margin-top: 2px; font-size: 12.5px; color: var(--texte-att); }
.ev-menu-switch { width: 46px; height: 27px; border-radius: 999px; background: #cbd5e1; position: relative; flex-shrink: 0; transition: background .18s; }
.ev-menu-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 23px; height: 23px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 35%); transition: transform .18s; }
.ev-menu-toggle[data-actif="true"] .ev-menu-switch { background: #1a6fe8; }
.ev-menu-toggle[data-actif="true"] .ev-menu-switch::after { transform: translateX(19px); }
.ev-hors-rubrique { display: none !important; }
.ev-retour-menu { flex-shrink: 0; padding: 8px 12px 8px 0; font-size: 15px; }
.ev-vue-entete:has(.ev-retour-menu:not(.hidden)) { justify-content: flex-start; }
button.ev-bandeau { width: 100%; border: none; font-family: inherit; text-align: left; cursor: pointer; }

/* Clés API masquées par des points sans être des champs « mot de passe ». */
.ev-cle-masquee { -webkit-text-security: disc; }

/* Étapes « via » : petite flèche pour changer l'ordre. */
.ev-chip-mini { padding-left: 11px; padding-right: 11px; }

/* Guidage : état du signal GPS (affiché seulement quand il n'est pas bon). */
.ev-nav-gps { align-self: flex-start; padding: 5px 11px; border-radius: 999px; background: rgba(110, 72, 0, 0.94); border: 1px solid rgba(255, 190, 60, 0.7); color: #fff; font-size: 12.5px; font-weight: 700; }
.ev-nav-gps.ev-nav-gps-estime { background: rgba(20, 60, 110, 0.95); border-color: rgba(100, 170, 255, 0.7); }

/* Menu Options du guidage : bouton de fermeture large, facile à toucher. */
.ev-fermer-grand { min-height: 44px; padding: 8px 16px; border: 1px solid var(--bordure-forte); border-radius: 999px; background: var(--bloc); font-size: 15px; font-weight: 700; }

/* Menu › État de l'appli. */
.ev-etat-liste { display: flex; flex-direction: column; gap: 8px; }
.ev-etat-ligne { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--bordure); font-size: 14px; line-height: 1.4; }
.ev-etat-ligne.ev-etat-attention { border-color: rgba(255, 170, 0, 0.6); }

/* Contraste renforcé (Menu › Apparence, ou réglage du téléphone) : textes
   pleins et contours marqués, dans les deux thèmes. */
:root[data-contraste="fort"] { --texte: #ffffff; --texte-att: rgba(255, 255, 255, 0.94); --texte-faible: rgba(255, 255, 255, 0.86); --bordure: rgba(255, 255, 255, 0.42); --bordure-forte: rgba(255, 255, 255, 0.62); --separateur: rgba(255, 255, 255, 0.32); }
:root[data-theme="clair"][data-contraste="fort"] { --texte: #000000; --texte-att: rgba(0, 0, 0, 0.92); --texte-faible: rgba(0, 0, 0, 0.84); --bordure: rgba(0, 0, 0, 0.48); --bordure-forte: rgba(0, 0, 0, 0.66); --separateur: rgba(0, 0, 0, 0.34); }
@media (prefers-contrast: more) {
  :root { --texte-att: rgba(255, 255, 255, 0.94); --texte-faible: rgba(255, 255, 255, 0.86); --bordure: rgba(255, 255, 255, 0.42); --bordure-forte: rgba(255, 255, 255, 0.62); }
  :root[data-theme="clair"] { --texte-att: rgba(0, 0, 0, 0.92); --texte-faible: rgba(0, 0, 0, 0.84); --bordure: rgba(0, 0, 0, 0.48); --bordure-forte: rgba(0, 0, 0, 0.66); }
}

/* Croix de fermeture des panneaux du guidage : zone de toucher de 44 px. */
.ev-fermer { min-width: 44px; min-height: 44px; }
