/*
 * Refonte de l'interface (décembre 2026) : jetons du design system et
 * composants mobiles. Maquettes et règles : canevas « VigieOps — refonte de la
 * carte », page Design system.
 *
 * Palette : bleu, blanc, rouge et leurs nuances. Chaque section a une couleur
 * d'identité (icône, tuile, onglet actif) ; l'action principale reste toujours
 * en bleu VigieOps, le rouge vif est réservé à l'urgence (SOS).
 *
 * Chargée après app-shell.css : les sélecteurs restent ciblés (préfixe vo-)
 * pour ne pas réécrire l'existant, et ne s'appliquent qu'en mobile quand ils
 * remplacent un composant.
 */
/* Inter (SIL OFL 1.1, voir /assets/fonts/inter/OFL.txt), servie par le site : la CSP
   n'autorise que font-src 'self'. Police variable 400-800, sous-ensembles
   latin et latin étendu de Google Fonts. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/inter/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/inter/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --vo-primary: #0055a5;
  --vo-primary-container: #d3e3f7;
  --vo-on-primary-container: #00468a;
  --vo-primary-soft: #e3edf9;
  --vo-primary-text: #0055a5; /* texte et icônes bleus sur fond clair */
  --vo-sos: #e63946;

  --vo-carte: #0055a5;      --vo-carte-tint: #d3e3f7;      --vo-carte-fill: #a9c8ee;      --vo-carte-on: #00468a;
  --vo-infra: #1b2f6b;      --vo-infra-tint: #e0e4f2;      --vo-infra-fill: #c9d1ea;      --vo-infra-on: #142456;
  --vo-mission: #0a7cc2;    --vo-mission-tint: #d7ecf9;    --vo-mission-fill: #b5dbf3;    --vo-mission-on: #075a8c;
  --vo-secours: #d93025;    --vo-secours-tint: #fbdcd9;    --vo-secours-fill: #f6c3be;    --vo-secours-on: #a5221a;
  --vo-notes: #3d5a80;      --vo-notes-tint: #e1e8f1;      --vo-notes-fill: #c7d3e3;      --vo-notes-on: #2b4263;
  --vo-interprete: #c62839; --vo-interprete-tint: #fbdde0; --vo-interprete-fill: #f5c1c7; --vo-interprete-on: #8e1b28;
  --vo-plus: #5f6368;       --vo-plus-tint: #e8eaed;       --vo-plus-fill: #dadce0;       --vo-plus-on: #3c4043;

  --vo-text: #1b1f24;
  --vo-text-2: #5f6368;
  --vo-text-nav: #444b53;
  --vo-outline: #c4c7c5;
  --vo-divider: #eceef0;
  --vo-bg: #f6f7f9;
  --vo-surface: #ffffff;

  --vo-r-filter: 10px;
  --vo-r-tile: 14px;
  --vo-r-field: 16px;
  --vo-r-list: 20px;
  --vo-r-card: 24px;
  --vo-r-pill: 28px;

  --vo-e1: 0 1px 3px rgba(0, 0, 0, 0.2);
  --vo-e2: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(0, 0, 0, 0.10);
  --vo-e-sheet: 0 -2px 18px rgba(0, 0, 0, 0.14);

  --vo-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --vo-tricolore: linear-gradient(90deg, #0055a5 0 33.33%, #ffffff 33.33% 66.66%, #e63946 66.66% 100%);
}

[data-theme="dark"] {
  --vo-primary-container: #1d3a5c;
  --vo-on-primary-container: #cfe2ff;
  --vo-primary-soft: #1b2c42;
  --vo-primary-text: #9ec5f2;
  --vo-carte-tint: #1d3a5c;      --vo-carte-fill: #2f5a8c;      --vo-carte-on: #cfe2ff;
  --vo-infra: #9fb0e6;           --vo-infra-tint: #262f4d;      --vo-infra-fill: #3a4672;      --vo-infra-on: #dbe2ff;
  --vo-mission: #5cb3ea;         --vo-mission-tint: #123a52;    --vo-mission-fill: #1e5878;    --vo-mission-on: #cdeaff;
  --vo-secours: #ff8a80;         --vo-secours-tint: #4a1f1c;    --vo-secours-fill: #6e2c27;    --vo-secours-on: #ffdad5;
  --vo-notes: #a9bdd8;           --vo-notes-tint: #2a3a50;      --vo-notes-fill: #3d5270;      --vo-notes-on: #dde7f5;
  --vo-interprete: #ff8a95;      --vo-interprete-tint: #4a1d24; --vo-interprete-fill: #6e2a33; --vo-interprete-on: #ffdadd;
  --vo-plus: #aab1ba;            --vo-plus-tint: #333a43;       --vo-plus-fill: #4a525c;       --vo-plus-on: #e8eaed;
  --vo-carte: #7fb2ec;
  --vo-text: #e8eaed;
  --vo-text-2: #aab1ba;
  --vo-text-nav: #c4c9cf;
  --vo-outline: #4a515b;
  --vo-divider: #2c323b;
  --vo-bg: #12161c;
  --vo-surface: #1c2128;
}

/* ── Icônes de section ─────────────────────────────────────────────── */
.vo-ico { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vo-ico .vo-fill { fill: var(--vo-ico-fill, none); }
[data-section="carte"]      { --vo-sec: var(--vo-carte);      --vo-sec-tint: var(--vo-carte-tint);      --vo-ico-fill: var(--vo-carte-fill);      --vo-sec-on: var(--vo-carte-on); }
[data-section="infra"]      { --vo-sec: var(--vo-infra);      --vo-sec-tint: var(--vo-infra-tint);      --vo-ico-fill: var(--vo-infra-fill);      --vo-sec-on: var(--vo-infra-on); }
[data-section="mission"]    { --vo-sec: var(--vo-mission);    --vo-sec-tint: var(--vo-mission-tint);    --vo-ico-fill: var(--vo-mission-fill);    --vo-sec-on: var(--vo-mission-on); }
[data-section="secours"]    { --vo-sec: var(--vo-secours);    --vo-sec-tint: var(--vo-secours-tint);    --vo-ico-fill: var(--vo-secours-fill);    --vo-sec-on: var(--vo-secours-on); }
[data-section="notes"]      { --vo-sec: var(--vo-notes);      --vo-sec-tint: var(--vo-notes-tint);      --vo-ico-fill: var(--vo-notes-fill);      --vo-sec-on: var(--vo-notes-on); }
[data-section="interprete"] { --vo-sec: var(--vo-interprete); --vo-sec-tint: var(--vo-interprete-tint); --vo-ico-fill: var(--vo-interprete-fill); --vo-sec-on: var(--vo-interprete-on); }
[data-section="plus"]       { --vo-sec: var(--vo-plus);       --vo-sec-tint: var(--vo-plus-tint);       --vo-ico-fill: var(--vo-plus-fill);       --vo-sec-on: var(--vo-plus-on); }

/* ── Bouton SOS (rouge réservé à l'urgence) ────────────────────────── */
.vo-sos {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 20px;
  background: var(--vo-sos);
  color: #ffffff;
  font: 800 12px/1 var(--vo-font);
  letter-spacing: 0.03em;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.35);
  cursor: pointer;
}

/* Bureau : l'en-tête garde logo et SOS, la recherche n'en a pas besoin. */
.vo-search-logo, .vo-search .vo-search-sos { display: none; }
/* Icône au trait (horloge) : la classe .icon d'origine impose un remplissage. */
#mapSearchLocateBtn svg { fill: none !important; stroke: currentColor; }

@media (max-width: 768px) {
  .vo-search .vo-search-sos { display: inline-flex; align-items: center; justify-content: center; }

  /* ── En-tête : remplacé par la recherche flottante (carte) et la barre
        de section (autres écrans). Les boutons restent dans le DOM : le menu
        « Plus » réutilise leurs gestionnaires. ── */
  .app > .header { display: none !important; }

  /* ── Barre de navigation : 5 onglets, pastille teintée sur l'actif ── */
  .mobile-nav.vo-nav {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 0;
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
    background: var(--vo-surface);
    border-top: 1px solid var(--vo-divider);
    box-shadow: none;
  }
  .vo-nav .mobile-nav-btn {
    gap: 4px;
    padding: 2px 0;
    font: 500 12px/16px var(--vo-font);
    letter-spacing: 0;
    color: var(--vo-text-nav);
    min-height: 56px;
    justify-content: center;
  }
  .vo-nav .mobile-nav-btn .nav-icon {
    width: 60px;
    height: 32px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vo-sec);
    font-size: 0;
    transform: none !important;
    align-self: center !important;
    flex: none !important;
    transition: background-color 0.2s ease;
  }
  .vo-nav .mobile-nav-btn.active { color: var(--vo-sec-on); font-weight: 700; }
  .vo-nav .mobile-nav-btn.active .nav-icon { background: var(--vo-sec-tint); }

  /* ── Recherche flottante sur la carte : une pilule, logo et SOS dedans ── */
  .map-overlay-search .search-row.vo-search {
    height: 56px;
    gap: 2px !important;
    padding: 0 8px 0 6px;
    border-radius: var(--vo-r-pill);
    background: var(--vo-surface);
    box-shadow: var(--vo-e2);
    box-sizing: border-box;
  }
  .vo-search #mapSearchInput {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 4px !important;
    font: 400 16px var(--vo-font);
    color: var(--vo-text);
  }
  .vo-search #mapSearchActionBtn { display: none; }
  .vo-search #mapSearchLocateBtn {
    flex: none;
    width: 40px;
    height: 40px;
    min-width: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 20px;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--vo-text-2) !important;
  }
  .vo-search #mapSearchLocateBtn svg { width: 22px; height: 22px; fill: none !important; stroke: currentColor; }
  .vo-search-logo {
    flex: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 22px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
  }
  .vo-search-logo img { width: 30px; height: 30px; }
  .vo-search .vo-sos { margin-left: 2px; }

  /* ── Barre de section des écrans plein écran ── */
  .vo-appbar { display: none; }
  .sidebar.mobile-full .vo-appbar:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 10px 20px;
    position: relative;
    background: var(--vo-bg);
    flex-shrink: 0;
  }
  .sidebar.mobile-full .vo-appbar::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: var(--vo-tricolore);
  }
  .vo-appbar-back {
    flex: none;
    width: 44px;
    height: 44px;
    margin-left: -12px;
    border: 0;
    border-radius: 22px;
    background: transparent;
    color: var(--vo-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .vo-appbar-back[hidden] { display: none; }
  .vo-appbar-tile {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--vo-sec-tint);
    color: var(--vo-sec);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .vo-appbar-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font: 700 26px/32px var(--vo-font);
    letter-spacing: -0.02em;
    color: var(--vo-text);
  }
  .sidebar.mobile-full { background: var(--vo-bg) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

  /* Bannière d'installation : au-dessus de la barre du bas, pas dessus. */
  .pwa-install-banner.visible { bottom: calc(84px + env(safe-area-inset-bottom)); }

  .sidebar.mobile-full .sidebar-content { padding: 4px 16px 96px !important; background: transparent !important; }
}

/* Outils des sections (mobile et bureau). */
/* ── Outils des sections : cartes blanches, tuile de couleur ──
   Les !important répondent aux règles d'origine écrites par identifiant
   (#panelInfra, #panelFirstAid) et au thème « modern » ; ils ne valent
   qu'en mobile plein écran. */
.sidebar .sidebar-panel {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.sidebar .collapsible-section {
  border: 0 !important;
  border-radius: var(--vo-r-list) !important;
  background: var(--vo-surface) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.05) !important;
  margin: 0 0 12px !important;
}
.sidebar .collapsible-header {
  min-height: 64px;
  padding: 12px 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.sidebar .collapsible-header:hover { background: transparent !important; }
.sidebar .collapsible-section.open .collapsible-header { border-bottom: 1px solid var(--vo-divider); }
.sidebar .collapsible-header-left {
  gap: 14px;
  font: 600 16px/22px var(--vo-font);
  color: var(--vo-text);
}
.sidebar .collapsible-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--vo-sec-tint, var(--vo-primary-soft));
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar .collapsible-body { padding: 16px 14px; }


/* Icônes des en-têtes repliables (bureau et mobile) : remplacent les emojis. */
.collapsible-icon .vo-ico { width: 20px; height: 20px; color: var(--vo-sec, var(--vo-primary)); }
.collapsible-chevron .vo-ico { width: 18px; height: 18px; }
.vo-badge-ia {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: var(--vo-sec-tint, var(--vo-primary-soft)) !important;
  color: var(--vo-sec-on, var(--vo-on-primary-container)) !important;
  font: 700 12px/1 var(--vo-font) !important;
  box-shadow: none !important;
}
.vo-badge-ia .vo-ico-spark { width: 12px; height: 12px; fill: currentColor; stroke: none; }

/* ── Menu « Plus » : panneau qui monte du bas ──────────────────────── */
.vo-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050; /* au-dessus de la bannière d'installation (10000) */
  background: rgba(15, 20, 25, 0.38);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.vo-sheet-overlay[hidden] { display: none; }
.vo-sheet {
  width: 100%;
  max-width: 560px;
  max-height: 88dvh;
  overflow-y: auto;
  box-sizing: border-box;
  background: var(--vo-bg);
  border-radius: var(--vo-r-pill) var(--vo-r-pill) 0 0;
  box-shadow: var(--vo-e-sheet);
  padding: 8px 16px max(20px, env(safe-area-inset-bottom));
  font-family: var(--vo-font);
  color: var(--vo-text);
  animation: vo-sheet-in 0.22s ease-out;
}
@keyframes vo-sheet-in { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .vo-sheet { animation: none; } }
.vo-sheet-handle { width: 32px; height: 4px; border-radius: 2px; background: var(--vo-outline); margin: 0 auto 12px; }
.vo-sheet-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px 4px; }
.vo-sheet-title { margin: 0; font: 700 22px/28px var(--vo-font); letter-spacing: -0.01em; }
.vo-icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--vo-text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.vo-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.vo-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 0;
  border-radius: var(--vo-r-card);
  background: var(--vo-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.05);
  color: var(--vo-text);
  text-align: left;
  font-family: var(--vo-font);
  cursor: pointer;
}
.vo-tile-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--vo-sec-tint);
  color: var(--vo-sec);
  display: flex;
  align-items: center;
  justify-content: center;
}
.vo-tile-icon .vo-ico { width: 24px; height: 24px; }
.vo-tile-title { display: block; font: 700 17px/22px var(--vo-font); }
.vo-tile-sub { display: block; margin-top: 2px; font: 400 13px/18px var(--vo-font); color: var(--vo-text-2); }
.vo-section-label { margin: 0 4px 8px; font: 600 16px/22px var(--vo-font); }
.vo-list { background: var(--vo-surface); border-radius: var(--vo-r-list); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); overflow: hidden; }
.vo-row {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border: 0;
  border-bottom: 1px solid var(--vo-divider);
  background: transparent;
  color: var(--vo-text);
  font: 500 15px/20px var(--vo-font);
  text-align: left;
  cursor: pointer;
}
.vo-row:last-child { border-bottom: 0; }
.vo-row[hidden] { display: none; }
.vo-row-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--vo-plus-tint);
  color: var(--vo-plus-on);
  display: flex;
  align-items: center;
  justify-content: center;
}
.vo-row-icon.is-primary { background: var(--vo-primary-soft); color: var(--vo-primary-text); }
.vo-row-icon .vo-ico { width: 19px; height: 19px; }
.vo-row-label { flex: 1; min-width: 0; }
.vo-chevron { width: 18px; height: 18px; color: var(--vo-text-2); flex: none; }
.vo-switch {
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: #dadce0;
  position: relative;
  transition: background-color 0.2s ease;
}
.vo-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: left 0.2s ease;
}
[aria-checked="true"] > .vo-switch { background: var(--vo-primary); }
[aria-checked="true"] > .vo-switch::after { left: 21px; }
.vo-sheet-foot { margin: 16px 0 0; text-align: center; font: 400 12px/18px var(--vo-font); color: var(--vo-text-2); }
.vo-row:focus-visible, .vo-tile:focus-visible, .vo-icon-btn:focus-visible, .vo-sos:focus-visible, .vo-search-logo:focus-visible {
  outline: 3px solid var(--vo-primary);
  outline-offset: 2px;
}

/* ── Fond de carte et calques ──────────────────────────────────────── */
.vo-basemaps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 20px; }
.vo-basemap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--vo-text-2);
  font: 500 13px/16px var(--vo-font);
  cursor: pointer;
}
.vo-basemap img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid var(--vo-surface);
  box-shadow: 0 0 0 1px var(--vo-outline);
}
.vo-basemap[aria-pressed="true"] { color: var(--vo-primary-text); font-weight: 700; }
.vo-basemap[aria-pressed="true"] img { box-shadow: 0 0 0 2.5px var(--vo-primary); }
.vo-section-label--spaced { margin-top: 20px; }
.vo-row--layer { min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
.vo-row-title { display: block; }
.vo-row-sub { display: block; font: 400 13px/18px var(--vo-font); color: var(--vo-text-2); }
.vo-row-icon.is-red { background: var(--vo-secours-tint); color: var(--vo-secours); }
.vo-ico-layer { width: 20px; height: 20px; }

/* Raccourcis sous la recherche (mobile et bureau). */
.vo-chips {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
  padding: 2px 2px 6px;
  overflow-x: auto;
  scrollbar-width: none;
  box-sizing: border-box;
}
.vo-chips::-webkit-scrollbar { display: none; }
.vo-chip {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 17px;
  background: var(--vo-surface);
  color: var(--vo-text);
  font: 500 14px/1 var(--vo-font);
  box-shadow: var(--vo-e1);
  cursor: pointer;
}
.vo-chip.is-on { background: var(--vo-primary); color: #ffffff; }
/* Sous la recherche quel que soit l'ordre imposé par l'ancienne mise en page. */
.vo-chips { order: 10; }
body.mobile-search-editing .vo-chips, body.mobile-keyboard-open .vo-chips { display: none; }

/* Colonne de la carte : seul « Fond de carte et calques » reste ; les autres
   boutons sont pilotés depuis le panneau et les raccourcis. */
.map-overlay-controls { bottom: auto !important; overflow: visible !important; }
.map-overlay-controls > :first-child { margin-top: 0 !important; }
.map-overlay-controls .map-ctrl-group { background: transparent !important; box-shadow: none !important; border: 0 !important; }
#mapBtnCompass, #mapBtnFavorites, #mapBtnDept, #mapBtnPoi, #mapBtnDefib, #mapBtnMission,
#mapBtnAccidents, #mapBtnCambriolages, #mapBtnAntennes, #mapBtnPr, #mapBtnTransit, #mapBtnSeveso {
  display: none !important;
}
.map-overlay-controls #mapBtnStyle,
.vo-fab-locate #mapBtnLocate {
  width: 44px !important;
  height: 44px !important;
  border: 0 !important;
  border-radius: 22px !important;
  background: var(--vo-surface) !important;
  color: var(--vo-text) !important;
  box-shadow: var(--vo-e1), 0 4px 10px rgba(0, 0, 0, 0.08) !important;
}
.map-overlay-controls #mapBtnStyle svg { width: 21px !important; height: 21px !important; }
#mapStyleMenu { display: none !important; }

.vo-fab-locate {
  position: absolute;
  right: 14px;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
}
.vo-fab-locate #mapBtnLocate { width: 48px !important; height: 48px !important; border-radius: 24px !important; color: #1a73e8 !important; }
.vo-fab-locate #mapBtnLocate svg { width: 22px; height: 22px; }
/* La fiche résultat occupe le bas : le bouton s'efface. */
.map-bottom-bar.visible ~ .vo-fab-locate,
body.navigation-mode .vo-fab-locate,
body.mobile-keyboard-open .vo-fab-locate { display: none; }

@media (max-width: 768px) {
  .map-overlay-search .map-search-inner { width: calc(100vw - 24px); max-width: none; }
  .map-overlay-controls { top: calc(env(safe-area-inset-top, 0px) + 124px) !important; right: 12px !important; }
}
@media (min-width: 769px) {
  .map-overlay-controls { top: 16px !important; right: 16px !important; }
  .vo-fab-locate { right: 16px; bottom: 44px; }
}

/* ── Fiche résultat : panneau qui monte du bas ─────────────────────── */
:root { --vo-unit-bg: #f3f7fc; --vo-unit-border: #dbe6f4; --vo-chip-neutral: #f1f3f4; }
[data-theme="dark"] { --vo-unit-bg: #1b2a3d; --vo-unit-border: #2b3f58; --vo-chip-neutral: #2a3038; }

@media (max-width: 768px) {
  /* Position fixe : map.js calcule la hauteur (barre du bas + 8 px) par
     rapport au bas de l'écran, pas du conteneur de carte. */
  .map-bottom-bar {
    position: fixed !important;
    flex-direction: column !important;
    align-items: stretch !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: var(--vo-r-card) !important;
    background: var(--vo-surface) !important;
    box-shadow: var(--vo-e-sheet) !important;
    font-family: var(--vo-font);
  }
}

/* Contenu de la fiche résultat (mobile et bureau). */
.map-bottom-bar .map-bottom-bar-grab {
  position: static !important;
  transform: none !important;
  align-self: center !important;
  flex: none !important;
  display: block !important;
  width: 32px !important;
  height: 4px !important;
  margin: 8px auto 2px !important;
  border-radius: 2px !important;
  background: var(--vo-outline) !important;
  opacity: 1 !important;
}
.map-bottom-bar .mb-left {
  position: relative;
  padding: 10px 20px 16px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 14px;
}
.map-bottom-bar .mb-title {
  padding-right: 48px;
  font: 700 22px/28px var(--vo-font) !important;
  letter-spacing: -0.01em;
  color: var(--vo-text) !important;
  white-space: normal !important;
}
.map-bottom-bar .mb-sub { margin-top: 2px; font: 400 14px/20px var(--vo-font) !important; color: var(--vo-text-2) !important; }
.map-bottom-bar #mbBrigade.mb-sub--brigade:not(:empty) {
  margin-top: 14px !important;
  padding: 12px 14px !important;
  border: 1px solid var(--vo-unit-border) !important;
  border-radius: 18px !important;
  background: var(--vo-unit-bg) !important;
}
.map-bottom-bar #mbBrigade { height: auto !important; max-height: none !important; }
.map-bottom-bar .mb-brigade-line {
  height: auto !important;
  min-height: 0 !important;
  flex: none !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.map-bottom-bar .mb-brigade-line { display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; }
.map-bottom-bar .mb-brigade-name { flex: none !important; font: 600 15px/20px var(--vo-font) !important; color: var(--vo-text) !important; white-space: normal !important; }
.vo-unit-kicker { display: block; margin-bottom: 2px; font: 600 12px/16px var(--vo-font); color: var(--vo-primary-text); letter-spacing: 0.02em; }
.vo-unit-phone { display: block; margin-top: 2px; font: 400 13px/18px var(--vo-font); color: var(--vo-text-2); }
.map-bottom-bar .mb-brigade-actions { display: flex !important; flex-wrap: wrap; gap: 8px !important; margin: 0 !important; }
.map-bottom-bar .mb-brigade-action,
.map-bottom-bar .vo-call {
  height: 36px;
  padding: 0 14px !important;
  border: 1px solid var(--vo-outline) !important;
  border-radius: 18px !important;
  background: var(--vo-surface) !important;
  color: var(--vo-primary-text) !important;
  font: 600 14px/1 var(--vo-font) !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  text-decoration: none !important;
}
.map-bottom-bar .vo-call { border-color: transparent !important; background: var(--vo-primary-soft) !important; color: var(--vo-on-primary-container) !important; }
.map-bottom-bar .mb-brigade-icon, .map-bottom-bar .vo-call svg { width: 17px; height: 17px; }
.map-bottom-bar .mb-left .mb-actions { display: flex !important; gap: 8px !important; margin-top: 16px !important; }
.map-bottom-bar .mb-actions .btn {
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  border-radius: 22px !important;
  font: 600 15px/1 var(--vo-font) !important;
}
.map-bottom-bar .mb-actions .btn-open-route {
  border: 0 !important;
  background: var(--vo-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 85, 165, 0.28) !important;
}
.map-bottom-bar .mb-actions .btn-ghost {
  border: 1px solid var(--vo-outline) !important;
  background: var(--vo-surface) !important;
  color: var(--vo-primary-text) !important;
}
.map-bottom-bar .mb-close-inline {
  position: absolute !important;
  top: 8px !important;
  right: 14px !important;
  width: 40px !important;
  height: 40px !important;
  border: 0 !important;
  border-radius: 20px !important;
  background: var(--vo-chip-neutral) !important;
  color: var(--vo-text-2) !important;
  font-size: 22px !important;
  line-height: 1 !important;
}


/* ── Contenu des sections : boutons, champs, cartes ────────────────── */
.vo-btn-ico {
  width: 18px;
  height: 18px;
  flex: none;
  margin-right: 6px;
  vertical-align: -4px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sketch-zoom-btn .vo-btn-ico { margin-right: 0; }
.translate-hint .vo-btn-ico { width: 16px; height: 16px; color: var(--vo-text-2); }

/* Une action principale par écran, en bleu VigieOps ; le reste en contour. */
.sidebar .btn {
  min-height: 44px;
  border-radius: 22px !important;
  font: 600 15px/1.2 var(--vo-font) !important;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidebar .btn-primary,
.sidebar .mission-tab-cta:not(.mission-tab-cta--secondaire) {
  border: 0 !important;
  background: var(--vo-primary) !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 85, 165, 0.28) !important;
}
.sidebar .btn-secondary,
.sidebar .mission-tab-cta--secondaire,
.sidebar .note-quick-btn,
.sidebar .note-voice-btn,
.sidebar .sketch-btn {
  border: 1px solid var(--vo-outline) !important;
  background: var(--vo-surface) !important;
  background-image: none !important;
  color: var(--vo-primary-text) !important;
  border-radius: 22px !important;
  box-shadow: none !important;
  font-family: var(--vo-font) !important;
}
.sidebar .mission-tab-cta {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  max-width: none !important;
  height: 48px;
  margin: 10px 0 0 !important;
  border-radius: 24px !important;
  font: 600 15px/1 var(--vo-font) !important;
}

.sidebar .form-input,
.sidebar textarea,
.sidebar select {
  border: 1px solid #e3e5e8 !important;
  border-radius: var(--vo-r-field) !important;
  background: var(--vo-bg) !important;
  color: var(--vo-text) !important;
  font-size: 16px !important;
  box-shadow: none !important;
}
[data-theme="dark"] .sidebar .form-input,
[data-theme="dark"] .sidebar textarea,
[data-theme="dark"] .sidebar select { border-color: var(--vo-outline) !important; }

.sidebar .natinf-chip {
  height: 32px;
  padding: 0 12px !important;
  border: 1px solid var(--vo-outline) !important;
  border-radius: var(--vo-r-filter) !important;
  background: var(--vo-surface) !important;
  color: var(--vo-text) !important;
  font: 500 13px/1 var(--vo-font) !important;
  box-shadow: none !important;
}
.sidebar .natinf-chip.active {
  border-color: transparent !important;
  background: var(--vo-primary-container) !important;
  color: var(--vo-on-primary-container) !important;
}

/* Cartes de contenu (Missions, Notes, Interprète, croquis). */
.sidebar .mission-tab-empty,
.sidebar .surv-bloc--amorce,
.sidebar .translate-section,
.sidebar .sketch-card,
.sidebar #panelNotes > .form-group {
  margin: 0 0 14px !important;
  padding: 18px 16px !important;
  border: 0 !important;
  border-radius: var(--vo-r-card) !important;
  background: var(--vo-surface) !important;
  background-image: none !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.05) !important;
  text-align: left !important;
}
.sidebar .surv-amorce { border: 0 !important; padding: 0 !important; background: transparent !important; text-align: left !important; }
.sidebar .translate-module { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
.sidebar .mission-tab-empty-title,
.sidebar .surv-amorce-titre {
  font: 700 19px/26px var(--vo-font) !important;
  letter-spacing: -0.01em;
  color: var(--vo-text) !important;
  text-align: left !important;
}
.sidebar .mission-tab-empty p,
.sidebar .surv-amorce p {
  margin: 6px 0 4px !important;
  font: 400 14px/20px var(--vo-font) !important;
  color: var(--vo-text-2) !important;
  text-align: left !important;
}
.sidebar .translate-section-label {
  font: 600 13px/18px var(--vo-font) !important;
  letter-spacing: 0.02em;
  color: var(--vo-primary-text) !important;
}
.sidebar .translate-section--them .translate-section-label { color: var(--vo-interprete) !important; }
.sidebar .translate-hint {
  border: 0 !important;
  background: transparent !important;
  padding: 4px !important;
  font: 400 13px/18px var(--vo-font) !important;
  color: var(--vo-text-2) !important;
}
.sidebar .note-gps-chip {
  border: 0 !important;
  border-radius: var(--vo-r-tile) !important;
  background: var(--vo-secours-tint) !important;
  color: var(--vo-secours-on) !important;
  min-height: 44px;
  margin-bottom: 12px !important;
  font: 500 14px/20px var(--vo-font) !important;
}


/* Interprète : un micro plein par interlocuteur, bleu pour vous, rouge pour l'autre. */
.sidebar .translate-mic-btn {
  border: 0 !important;
  background: var(--vo-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(0, 85, 165, 0.35) !important;
}
.sidebar .translate-section--them .translate-mic-btn {
  background: var(--vo-interprete) !important;
  box-shadow: 0 3px 10px rgba(198, 40, 57, 0.32) !important;
}
.sidebar .translate-result { border: 0 !important; border-radius: var(--vo-r-field) !important; background: var(--vo-primary-soft) !important; }
.sidebar .translate-section--them .translate-result { background: var(--vo-interprete-tint) !important; }

/* Notes : l'en-tête repliable du croquis se lit comme une ligne de liste. */
.sidebar .sketch-collapse-btn {
  width: 100%;
  justify-content: flex-start !important;
  padding: 4px 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--vo-text) !important;
  font: 600 16px/22px var(--vo-font) !important;
  box-shadow: none !important;
}
.sidebar .sketch-collapse-btn .vo-btn-ico { color: var(--vo-notes); }


/* ── Bureau ────────────────────────────────────────────────────────── */
.vo-tab-icon { display: inline-flex; color: var(--vo-sec); }
.vo-tab-icon .vo-ico { width: 20px; height: 20px; }

@media (min-width: 769px) {
  /* En-tête : fond blanc, liseré tricolore, onglets en pilules teintées. */
  .app > .header {
    height: 60px;
    padding: 3px 16px 0 !important;
    background: var(--vo-tricolore) top / 100% 3px no-repeat, var(--vo-surface) !important;
    color: var(--vo-text) !important;
    border-bottom: 1px solid var(--vo-divider) !important;
    box-shadow: none !important;
    font-family: var(--vo-font);
  }
  .app > .header .header-logo-text { font: 700 19px/1 var(--vo-font) !important; color: var(--vo-carte) !important; letter-spacing: -0.01em; }
  .app > .header .header-logo-img { height: 30px !important; }
  .header-tabs { display: flex; align-items: center; gap: 4px !important; margin-left: 16px; }
  .header-tabs .sidebar-tab {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    height: 40px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 14px 0 10px !important;
    border: 0 !important;
    border-radius: 20px !important;
    background: transparent !important;
    color: var(--vo-text-nav) !important;
    font: 500 14px/1 var(--vo-font) !important;
    box-shadow: none !important;
    transform: none !important;
  }
  .header-tabs .sidebar-tab::after, .header-tabs .sidebar-tab::before { display: none !important; }
  .header-tabs .sidebar-tab:hover { background: var(--vo-plus-tint) !important; }
  .header-tabs .sidebar-tab.active { background: var(--vo-sec-tint) !important; color: var(--vo-sec-on) !important; font-weight: 700 !important; }

  .header-right { gap: 2px !important; align-items: center; }
  .header-right .icon-btn {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 20px !important;
    background: transparent !important;
    color: var(--vo-text-2) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
  }
  .header-right .icon-btn:hover { background: var(--vo-plus-tint) !important; }
  .header-right .icon-btn .vo-ico { width: 21px; height: 21px; }
  .header-right #headerSosBtn {
    width: auto !important;
    margin-right: 6px;
    padding: 0 16px !important;
    background: var(--vo-sos) !important;
    color: #ffffff !important;
    font: 800 13px/1 var(--vo-font) !important;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 6px rgba(230, 57, 70, 0.35) !important;
  }

  /* Recherche : une pilule blanche, raccourcis dessous. */
  .map-overlay-search { top: 16px !important; }
  .map-overlay-search .map-search-inner {
    flex-direction: column !important;
    align-items: stretch !important;
    width: min(560px, calc(100vw - 160px)) !important;
  }
  .map-overlay-search .search-row.vo-search { width: 100% !important; }
  .map-overlay-search .search-row.vo-search {
    height: 52px;
    gap: 2px !important;
    padding: 0 6px 0 18px;
    border-radius: 26px;
    background: var(--vo-surface);
    box-shadow: var(--vo-e2);
    box-sizing: border-box;
  }
  .vo-search #mapSearchInput {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 4px !important;
    font: 400 16px var(--vo-font);
    color: var(--vo-text);
  }
  .vo-search #mapSearchLocateBtn,
  .vo-search #mapSearchActionBtn {
    flex: none;
    width: 40px;
    height: 40px;
    min-width: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 20px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--vo-text-2) !important;
  }
  .vo-search #mapSearchActionBtn { color: var(--vo-primary-text) !important; }
  .vo-search #mapSearchLocateBtn svg, .vo-search #mapSearchActionBtn svg { width: 22px; height: 22px; }
  .vo-appbar { display: none !important; }

  /* Panneau des calques : carte ancrée sous le bouton, en haut à droite. */
  #layersSheet { align-items: flex-start; justify-content: flex-end; padding: 72px 16px 16px; background: rgba(15, 20, 25, 0.12); }
  #layersSheet .vo-sheet {
    width: 400px;
    max-height: calc(100vh - 88px);
    padding: 16px 16px 20px;
    border-radius: var(--vo-r-card);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    animation: vo-pop 0.16s ease-out;
  }
  #layersSheet .vo-sheet-handle { display: none; }
  @keyframes vo-pop { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }

  /* Fiche résultat : carte flottante, même contenu qu'en mobile. */
  .map-bottom-bar {
    left: 16px !important;
    right: auto !important;
    width: 440px !important;
    max-width: calc(100vw - 32px) !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: var(--vo-r-card) !important;
    background: var(--vo-surface) !important;
    box-shadow: var(--vo-e2) !important;
    font-family: var(--vo-font);
  }

  /* Panneaux de section : contenu centré, cartes sur fond clair. */
  .sidebar .sidebar-content { background: var(--vo-bg) !important; }
}

/* ── Corrections du contrôle UI/UX du 2026-12-06 ───────────────────── */
/* Itinéraire ouvert : la recherche laisse la place, raccourcis et bouton des
   calques aussi (ils chevauchaient le panneau). */
.map-overlay-search:has(.route-compact--open) .vo-chips,
.map-container:has(.route-compact--open) .map-overlay-controls { display: none !important; }
/* Jalonnage en cours : sa barre de capture se pose sous la recherche. */
body:has(#missionPlannerPanel.visible) .vo-chips { display: none; }

/* Zones tactiles : 40 px au minimum pour les boutons de fermeture et d'effacement. */
.dept-panel-close, .settings-close-btn, .emergency-panel-close, .mission-planner-close-btn {
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 20px !important;
}
.autocomplete-fav-btn { min-width: 36px !important; min-height: 36px !important; }
.route-core-remove { min-width: 32px !important; min-height: 32px !important; }
.vo-chip { height: 36px; border-radius: 18px; }
.map-bottom-bar .mb-brigade-action, .map-bottom-bar .vo-call { height: 40px; border-radius: 20px !important; }

/* Itinéraire : modes en icônes au trait, « Aperçu » en action principale. */
.route-mode .btn-mode { color: var(--vo-text-2) !important; }
.route-mode .btn-mode.active { background: var(--vo-primary-container) !important; color: var(--vo-on-primary-container) !important; border-color: transparent !important; }
.route-mode .btn-mode .vo-ico { margin: 0 auto; }
.route-compact .route-preview-btn {
  border: 0 !important;
  background: var(--vo-primary) !important;
  background-image: none !important;
  color: #ffffff !important;
  border-radius: 22px !important;
}
.route-compact .route-clear-btn { border-radius: 22px !important; }

/* Urgences : appel en bouton rouge plein, 112 dans la palette. */
.emergency-call-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0 !important;
  border-radius: 22px !important;
  background: var(--vo-sos) !important;
  color: #ffffff !important;
}
.emergency-call-btn .vo-ico { width: 20px; height: 20px; }
.em-112 { background: #1b2f6b !important; }

/* Croquis : les deux groupes de boutons ne se chevauchent plus sur petit canevas. */
.sketch-zoom-controls { flex-direction: row !important; }

@media (min-width: 769px) {
  /* Formulaires lisibles : colonne de 760 px au lieu de toute la largeur. */
  .sidebar .sidebar-panel { max-width: 760px; margin-left: auto !important; margin-right: auto !important; }
}
@media (max-width: 768px) {
  /* Barre de capture du jalonnage : sous la pilule de recherche. */
  #missionPlannerPanel.visible { top: 80px; }
}

/* Résultats NATINF : le bouton « Tout réduire » reste dans sa ligne. */
.sidebar .section-header:has(#natinfCollapseAllBtn) { display: flex; align-items: center; gap: 12px; text-transform: none; }
#natinfCollapseAllBtn {
  width: auto !important;
  min-height: 36px !important;
  margin: 0 0 0 auto !important;
  padding: 0 14px !important;
  border: 1px solid var(--vo-outline) !important;
  border-radius: 18px !important;
  background: var(--vo-surface) !important;
  color: var(--vo-primary-text) !important;
  font: 600 13px/1 var(--vo-font) !important;
}
@media (min-width: 769px) {
  .sidebar .sidebar-content > .sidebar-panel { max-width: 820px !important; margin-left: auto !important; margin-right: auto !important; }
}
.vo-basemap:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Fiche de compétence à l'ouverture de la carte ─────────────────── */
.vo-home-card {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 29;
  width: 380px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px 12px 12px;
  border-radius: var(--vo-r-card);
  background: var(--vo-surface);
  box-shadow: var(--vo-e2);
  font-family: var(--vo-font);
  color: var(--vo-text);
  animation: vo-rise 0.24s ease-out;
}
.vo-home-card[hidden] { display: none; }
@keyframes vo-rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.vo-home-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--vo-primary-soft);
  color: var(--vo-primary-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.vo-home-zone {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.vo-home-kicker { display: block; font: 600 12px/16px var(--vo-font); color: var(--vo-primary-text); letter-spacing: 0.02em; }
.vo-home-name { display: block; font: 600 17px/22px var(--vo-font); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vo-home-sub { display: block; font: 400 13px/18px var(--vo-font); color: var(--vo-text-2); }
.vo-home-call, .vo-home-close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.vo-home-call { background: var(--vo-primary); color: #ffffff; box-shadow: 0 2px 6px rgba(0, 85, 165, 0.3); }
.vo-home-call[hidden] { display: none; }
.vo-home-call .vo-ico { width: 20px; height: 20px; }
.vo-home-close { width: 36px; background: transparent; color: var(--vo-text-2); }
.vo-home-close .vo-ico { width: 18px; height: 18px; }
@media (max-width: 768px) {
  .vo-home-card { position: fixed; left: 8px; right: 8px; bottom: calc(77px + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; }
  /* « Ma position » remonte au-dessus de la fiche. */
  .map-container:has(.vo-home-card:not([hidden])) .vo-fab-locate { bottom: calc(176px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Mouvement : changement d'écran et attente ─────────────────────── */
@keyframes vo-panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sidebar .sidebar-panel.active { animation: vo-panel-in 0.2s ease-out; }
.vo-skeleton-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.vo-skeleton {
  height: 96px;
  border-radius: var(--vo-r-field);
  background: linear-gradient(100deg, var(--vo-divider) 30%, var(--vo-bg) 50%, var(--vo-divider) 70%);
  background-size: 300% 100%;
  animation: vo-shimmer 1.3s ease-in-out infinite;
}
@keyframes vo-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .vo-home-card, .sidebar .sidebar-panel.active, .vo-skeleton { animation: none; }
}

/* ── Composants hérités alignés sur le design system ───────────────── */
/* Fenêtres (réglages, urgences, aide, zones) : même carte, même typographie. */
.settings-modal, .emergency-panel, .help-modal-content, .header-dept-panel, .favorites-modal, .mission-planner-panel {
  border: 0 !important;
  border-radius: var(--vo-r-card) !important;
  background: var(--vo-surface) !important;
  background-image: none !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18) !important;
  font-family: var(--vo-font) !important;
  color: var(--vo-text) !important;
}
.settings-header h2, .emergency-panel-header h3, .help-modal-head h2, .help-modal-head h3 {
  font: 700 22px/28px var(--vo-font) !important;
  letter-spacing: -0.01em;
  color: var(--vo-text) !important;
}
.settings-group {
  border: 0 !important;
  border-radius: var(--vo-r-list) !important;
  background: var(--vo-bg) !important;
  box-shadow: none !important;
}
.settings-section-label, .emergency-separator {
  font: 600 13px/18px var(--vo-font) !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  color: var(--vo-text-2) !important;
}
.settings-modal select, .settings-modal .form-input {
  min-height: 44px;
  border: 1px solid var(--vo-outline) !important;
  border-radius: var(--vo-r-field) !important;
  background-color: var(--vo-surface) !important;
  color: var(--vo-text) !important;
  font: 400 16px var(--vo-font) !important;
}
.settings-modal .btn-primary {
  border: 0 !important;
  border-radius: 22px !important;
  background: var(--vo-primary) !important;
  background-image: none !important;
  color: #ffffff !important;
  font: 600 15px/1 var(--vo-font) !important;
}
.emergency-item { border: 0 !important; border-radius: var(--vo-r-field) !important; background: transparent !important; }
.emergency-number { border-radius: var(--vo-r-tile) !important; font-family: var(--vo-font) !important; }
.emergency-info-title { font: 600 16px/22px var(--vo-font) !important; color: var(--vo-text) !important; }
.emergency-info-desc { font: 400 13px/18px var(--vo-font) !important; color: var(--vo-text-2) !important; }

/* Zones : onglets en pilules, 40 px. */
.dept-panel-tab {
  min-height: 40px !important;
  border: 0 !important;
  border-radius: 20px !important;
  background: transparent !important;
  color: var(--vo-text-2) !important;
  font: 600 14px/1 var(--vo-font) !important;
}
.dept-panel-tab.active { background: var(--vo-primary-container) !important; color: var(--vo-on-primary-container) !important; }
.dept-panel-tabs { gap: 6px; padding: 0 12px 8px !important; border: 0 !important; }
.dept-search-input, .unit-search-results { font-family: var(--vo-font) !important; }
.dept-search-input { min-height: 44px; border-radius: var(--vo-r-field) !important; }

/* Itinéraire. */
.route-compact {
  border: 0 !important;
  border-radius: var(--vo-r-card) !important;
  background: var(--vo-surface) !important;
  box-shadow: var(--vo-e2) !important;
  font-family: var(--vo-font) !important;
}
.route-compact .form-input { border-radius: var(--vo-r-field) !important; font-family: var(--vo-font) !important; }
.route-compact .route-icon-btn, .route-compact .route-header-btn { min-width: 40px !important; min-height: 40px !important; border-radius: 20px !important; }
.route-compact .route-add-wp-btn { min-height: 40px; border-radius: 20px !important; font: 600 14px/1 var(--vo-font) !important; }

/* Résultats NATINF. */
.natinf-card {
  border: 1px solid var(--vo-divider) !important;
  border-radius: var(--vo-r-field) !important;
  background: var(--vo-surface) !important;
  box-shadow: none !important;
  font-family: var(--vo-font) !important;
}
.natinf-card:hover { border-color: var(--vo-outline) !important; }

/* Barre de jalonnage : boutons à hauteur de doigt. */
.mission-toolbar-btn { min-height: 40px !important; border-radius: 20px !important; font-family: var(--vo-font) !important; }

/* ── Fiche résultat réduite (glissée vers le bas) ──────────────────── */
@media (max-width: 768px) {
  .map-bottom-bar.vo-peek #mbBrigade,
  .map-bottom-bar.vo-peek .mb-sub { display: none !important; }
  .map-bottom-bar.vo-peek .mb-title {
    font: 600 17px/22px var(--vo-font) !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .map-bottom-bar.vo-peek .mb-left .mb-actions { margin-top: 10px !important; }
  .map-bottom-bar { touch-action: none; will-change: transform; }
  /* Fiche réduite : « Ma position » redevient utile. */
  .map-bottom-bar.vo-peek.visible ~ .vo-fab-locate { display: block; bottom: calc(232px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Page Infractions : recherche en vedette, outils en tuiles ─────── */
#panelInfra .vo-hero { position: relative; padding: 8px 8px 12px !important; }
#panelInfra .vo-hero > .collapsible-body { display: block !important; padding: 4px 16px 12px !important; }
#panelInfra .vo-hero-head { cursor: default !important; min-height: 0 !important; padding: 16px 16px 12px !important; border-bottom: 0 !important; }
#panelInfra .vo-hero-head .collapsible-chevron { display: none !important; }
#panelInfra .vo-hero-head .collapsible-icon { width: 48px !important; height: 48px !important; border-radius: 16px !important; }
#panelInfra .vo-hero-head .collapsible-icon .vo-ico { width: 24px; height: 24px; }
.vo-hero-title { display: block; font: 700 22px/28px var(--vo-font); letter-spacing: -0.01em; color: var(--vo-text); }
.vo-hero-title small { display: block; margin-top: 2px; font: 400 14px/20px var(--vo-font); letter-spacing: 0; color: var(--vo-text-2); }

/* Recherche / Favoris : interrupteur compact. */
#panelInfra .natinf-tabs {
  display: inline-flex !important;
  gap: 2px !important;
  width: auto !important;
  margin: 0 0 14px !important;
  padding: 3px !important;
  border: 0 !important;
  border-radius: 20px !important;
  background: var(--vo-bg) !important;
}
#panelInfra .natinf-tab-btn {
  flex: none !important;
  width: auto !important;
  min-height: 34px !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 17px !important;
  background: transparent !important;
  color: var(--vo-text-2) !important;
  font: 600 13px/1 var(--vo-font) !important;
  box-shadow: none !important;
}
#panelInfra .natinf-tab-btn.active { background: var(--vo-surface) !important; color: var(--vo-primary-text) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14) !important; }

/* Le champ : une seule barre, micro et bouton dedans. */
#natinfSearchPanel .form-group { margin: 0 0 12px !important; }
#natinfSearchPanel .autocomplete-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 60px;
  padding: 0 8px 0 50px;
  border: 1.5px solid var(--vo-outline);
  border-radius: 30px;
  background: var(--vo-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6368' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 18px center / 22px no-repeat;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#natinfSearchPanel .autocomplete-wrapper:focus-within { border-color: var(--vo-primary); box-shadow: 0 0 0 4px rgba(0, 85, 165, 0.14); }
#natinfSearchPanel #natinfSearch {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
  font: 400 17px var(--vo-font) !important;
  color: var(--vo-text) !important;
}
#natinfSearchPanel #natinfVoiceBtn {
  flex: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 22px !important;
  background: transparent !important;
  color: var(--vo-text-2) !important;
  font-size: 0 !important;
  overflow: hidden;
}
#natinfSearchPanel #natinfVoiceBtn:hover { background: var(--vo-bg) !important; }
#natinfSearchPanel #natinfVoiceBtn .vo-btn-ico { width: 22px; height: 22px; margin: 0; }
#natinfSearchPanel #natinfVoiceBtn[aria-pressed="true"] { background: var(--vo-sos) !important; color: #ffffff !important; }
#natinfSearchPanel #natinfVoiceBtn[aria-pressed="true"] .vo-btn-ico { fill: currentColor; }
#natinfSearchPanel .vo-ask-go { flex: none; height: 44px; min-height: 44px !important; padding: 0 20px 0 16px !important; border-radius: 22px !important; }
#natinfSearchPanel .natinf-voice-status { margin: 0 0 4px 4px; font: 400 12px/16px var(--vo-font); color: var(--vo-text-2); }

.vo-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0 4px; }
.vo-examples-label { font: 500 13px/1 var(--vo-font); color: var(--vo-text-2); margin-right: 2px; }
.vo-example {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 15px;
  background: var(--vo-infra-tint);
  color: var(--vo-infra-on);
  font: 500 13px/1 var(--vo-font);
  cursor: pointer;
}
.vo-example:hover { filter: brightness(0.96); }
#panelInfra .natinf-filter-chips { gap: 6px !important; margin: 0 0 8px 4px !important; }
#panelInfra .natinf-chip { height: 32px !important; border-radius: 16px !important; padding: 0 14px !important; }

/* Outils : tuiles, un seul ouvert à la fois. */
.vo-tools-title { margin: 22px 4px 10px; font: 600 16px/22px var(--vo-font); color: var(--vo-text); }
.vo-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.vo-tool {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1.5px solid transparent;
  border-radius: var(--vo-r-list);
  background: var(--vo-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.05);
  color: var(--vo-text);
  text-align: left;
  font-family: var(--vo-font);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.vo-tool:hover { transform: translateY(-1px); }
.vo-tool[aria-selected="true"] { border-color: var(--vo-infra); background: var(--vo-infra-tint); }
.vo-tool-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--vo-infra-tint); color: var(--vo-infra); display: flex; align-items: center; justify-content: center; }
.vo-tool[aria-selected="true"] .vo-tool-icon { background: var(--vo-surface); }
.vo-tool-name { display: block; font: 600 15px/20px var(--vo-font); }
.vo-tool-sub { display: block; margin-top: 2px; font: 400 13px/18px var(--vo-font); color: var(--vo-text-2); }
#panelInfra .collapsible-section:not(.vo-hero) > .collapsible-header { display: none !important; }
#panelInfra .collapsible-section:not(.vo-hero):not(.open) { display: none !important; }
#panelInfra .collapsible-section:not(.vo-hero) > .collapsible-body { padding: 20px !important; animation: vo-panel-in 0.2s ease-out; }

/* Formulaires des outils : libellés lisibles, champs blancs, anneau de focus. */
#panelInfra .form-label, #panelInfra label.form-label, #panelInfra .collapsible-body label {
  font: 600 13px/18px var(--vo-font) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--vo-text) !important;
}
#panelInfra .collapsible-section:not(.vo-hero) .form-input,
#panelInfra .collapsible-section:not(.vo-hero) select {
  min-height: 48px;
  border: 1.5px solid var(--vo-outline) !important;
  border-radius: 12px !important;
  background-color: var(--vo-surface) !important;
  font: 400 16px var(--vo-font) !important;
}
#panelInfra .collapsible-section:not(.vo-hero) .form-input:focus,
#panelInfra .collapsible-section:not(.vo-hero) select:focus {
  border-color: var(--vo-primary) !important;
  box-shadow: 0 0 0 4px rgba(0, 85, 165, 0.14) !important;
  outline: none;
}
#panelInfra .collapsible-section:not(.vo-hero) .btn-primary { width: 100%; height: 48px; margin-top: 4px; }
.speed-tooltip-trigger {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--vo-primary-soft);
  color: var(--vo-primary-text);
  font-size: 0 !important;
  vertical-align: middle;
  cursor: help;
}
.speed-tooltip-trigger::before { content: "i"; font: 700 11px/1 var(--vo-font); }
.speed-tooltip-trigger .speed-tooltip { font: 400 12px/17px var(--vo-font); }

@media (max-width: 768px) {
  .vo-tools { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .vo-tool { flex-direction: row; align-items: center; padding: 12px 14px; }
  #natinfSearchPanel .autocomplete-wrapper { min-height: 56px; padding-left: 44px; background-position: 14px center; }
  #natinfSearchPanel .vo-ask-go { width: 44px; padding: 0 !important; }
  #natinfSearchPanel .vo-ask-go .vo-ask-label { display: none; }
  #natinfSearchPanel .vo-ask-go .vo-btn-ico { margin: 0; }
  #panelInfra .vo-hero > .collapsible-body { padding: 4px 8px 8px !important; }
  #panelInfra .vo-hero-head { padding: 12px 8px 10px !important; }
  .vo-hero-title { font-size: 19px; line-height: 24px; }
  .vo-hero-title small { font-size: 13px; line-height: 18px; }
}
/* Le bouton garde sa largeur naturelle, le champ prend le reste. */
#natinfSearchPanel .autocomplete-wrapper > .vo-ask-go { flex: 0 0 auto !important; width: auto !important; max-width: none !important; margin: 0 !important; }
#natinfSearchPanel .autocomplete-wrapper > #natinfVoiceBtn { flex: 0 0 44px !important; margin: 0 !important; }
#natinfSearchPanel .autocomplete-wrapper > #natinfSearch { flex: 1 1 0 !important; width: auto !important; margin: 0 !important; }
@media (max-width: 768px) { #natinfSearchPanel .autocomplete-wrapper > .vo-ask-go { flex: 0 0 44px !important; width: 44px !important; } }

/* Notes : bouton d'export dans l'en-tête de la liste. */
.vo-notes-head { display: flex !important; align-items: center; gap: 12px; }
.vo-notes-export {
  margin-left: auto;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--vo-outline);
  border-radius: 18px;
  background: var(--vo-surface);
  color: var(--vo-primary-text);
  font: 600 13px/1 var(--vo-font);
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

/* Mention sous les résultats des calculateurs : indicatifs, pas opposables. */
.vo-calc-disclaimer { display: block; margin-top: 8px; font: 400 12px/17px var(--vo-font); color: var(--vo-text-2); }

/* ── Itinéraire : panneau redessiné (2026-12) ──────────────────────────
   En haut : les deux adresses et le mode. En bas : la durée et « Démarrer ».
   Une seule action par endroit, plus de boutons en double.
   Uniquement quand le panneau est ouvert : fermé, il doit rester replié
   (app-shell.css), sinon il pousse la barre de recherche au milieu de l'écran. */
.route-compact:not(.route-compact--open) { display: none !important; }
.route-compact.route-compact--open {
  width: min(420px, calc(100vw - 24px)) !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  resize: none !important;
  overflow: visible !important;
  padding: 10px 12px 12px !important;
  box-sizing: border-box;
}
.route-compact .route-compact-header { display: flex !important; align-items: center; gap: 10px; min-height: 40px; margin: 0 0 10px !important; padding: 0 !important; }
.route-compact .route-compact-grab { display: none !important; }
.route-compact .route-header-btn--back { flex: none; width: 40px; height: 40px; border: 0 !important; background: transparent !important; color: var(--vo-text) !important; box-shadow: none !important; font-size: 20px; }
.route-compact .route-header-btn--back:hover { background: var(--vo-bg) !important; }
.route-compact .route-mode { display: block !important; margin: 0 0 0 auto !important; padding: 0 !important; }
.vo-route-modes { display: flex; gap: 2px; padding: 3px; border-radius: 20px; background: var(--vo-bg); }
.route-compact .vo-route-modes .btn-mode {
  width: 52px !important;
  min-width: 0 !important;
  height: 34px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 17px !important;
  background: transparent !important;
  color: var(--vo-text-2) !important;
  box-shadow: none !important;
  flex: none !important;
}
.route-compact .vo-route-modes .btn-mode .vo-ico { width: 20px; height: 20px; }
.route-compact .vo-route-modes .btn-mode.active { background: var(--vo-surface) !important; color: var(--vo-primary-text) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18) !important; }

/* Départ et arrivée : un seul bloc, deux lignes. */
.route-compact .route-input-grid { display: flex !important; align-items: center; gap: 6px !important; margin: 0 !important; }
.route-compact .route-input-main { flex: 1; min-width: 0; display: block !important; border: 1.5px solid var(--vo-outline); border-radius: 16px; background: var(--vo-surface); }
.route-compact .route-input-main:focus-within { border-color: var(--vo-primary); }
.route-compact .route-core-row {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  min-height: 46px;
  margin: 0 !important;
  padding: 0 4px 0 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.route-compact .route-core-row + .route-core-row { border-top: 1px solid var(--vo-divider) !important; }
.route-compact .route-core-row .form-input {
  height: 44px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  font: 400 16px var(--vo-font) !important;
  color: var(--vo-text) !important;
}
.route-compact .route-core-drag-handle { display: none !important; }
.route-compact .route-core-remove { flex: none; width: 36px !important; height: 36px !important; border: 0 !important; background: transparent !important; color: var(--vo-text-2) !important; box-shadow: none !important; border-radius: 18px !important; font-size: 20px; }
.route-compact .route-core-remove:hover { background: var(--vo-bg) !important; }
.route-compact .route-input-side { display: flex !important; flex-direction: column; gap: 4px !important; }
.route-compact .route-input-side .route-icon-btn { width: 40px !important; height: 40px !important; padding: 0 !important; border: 0 !important; background: transparent !important; color: var(--vo-text-2) !important; box-shadow: none !important; }
.route-compact .route-input-side .route-icon-btn:hover { background: var(--vo-bg) !important; }
.route-compact .route-input-side .route-icon-btn--gps { color: var(--vo-primary-text) !important; }

.route-compact .route-add-wp-btn {
  display: inline-flex !important;
  align-items: center;
  width: auto !important;
  min-height: 36px !important;
  margin: 6px 0 0 !important;
  padding: 0 10px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--vo-primary-text) !important;
  font: 600 14px/1 var(--vo-font) !important;
  box-shadow: none !important;
}
.route-compact .route-add-wp-btn:hover { background: var(--vo-primary-soft) !important; }
.route-compact .route-actions { display: flex !important; margin: 8px 0 0 !important; }
.route-compact .route-actions .route-preview-btn { flex: 1 1 auto !important; width: auto !important; height: 46px; min-height: 0 !important; border-radius: 23px !important; font: 600 15px/1 var(--vo-font) !important; box-shadow: none !important; }
/* « Démarrer » et « Effacer » sont dans la fiche du bas : ici ils feraient doublon. */
.route-compact .route-actions .route-start-btn,
.route-compact .route-actions .route-clear-btn,
.route-compact #routeSummary { display: none !important; }
/* Itinéraire calculé : le recalcul est automatique, le bouton est retiré. */
.route-compact .route-actions:has(.route-start-btn.visible) { display: none !important; }

/* Fiche du bas : durée en grand, une action principale. */
.map-bottom-bar .mb-left .gm-route-sheet { gap: 10px !important; }
.map-bottom-bar .mb-left .gm-route-head { align-items: center !important; padding-right: 0 !important; }
.map-bottom-bar .mb-left .gm-route-title { display: flex !important; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font: 700 26px/30px var(--vo-font) !important; color: var(--vo-primary-text) !important; letter-spacing: -0.3px; }
.map-bottom-bar .mb-left .vo-route-dist { font: 500 16px/22px var(--vo-font); color: var(--vo-text-2); letter-spacing: 0; }
.map-bottom-bar .mb-left .gm-round-tool { width: 38px !important; height: 38px !important; border: 0 !important; background: var(--vo-bg) !important; color: var(--vo-text-2) !important; box-shadow: none !important; }
.map-bottom-bar .mb-left .gm-round-tool--danger { background: var(--vo-bg) !important; color: var(--vo-text-2) !important; }
.map-bottom-bar .mb-left .gm-round-tool--danger svg { color: inherit !important; }
.map-bottom-bar .mb-left .gm-route-tabs { display: none !important; }
.map-bottom-bar .mb-left .gm-route-main { margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.map-bottom-bar .mb-left .gm-route-sub { font: 400 14px/20px var(--vo-font) !important; color: var(--vo-text-2) !important; }
.map-bottom-bar .mb-left .gm-route-arrival strong { color: var(--vo-text); font-weight: 600; }
.map-bottom-bar .mb-left .gm-route-option { height: 34px; padding: 0 14px !important; border: 1px solid var(--vo-outline) !important; border-radius: 17px !important; background: var(--vo-surface) !important; color: var(--vo-text) !important; font: 500 13px/1 var(--vo-font) !important; box-shadow: none !important; }
.map-bottom-bar .mb-left .gm-route-option.active { border-color: transparent !important; background: var(--vo-primary-soft) !important; color: var(--vo-on-primary-container) !important; }
.map-bottom-bar .mb-left .gm-route-brigade:not(:empty) { padding-top: 10px; border-top: 1px solid var(--vo-divider); }
.map-bottom-bar .mb-left .gm-route-actions { display: flex !important; margin: 2px 0 0 !important; }
.map-bottom-bar .mb-left .gm-route-btn-start {
  flex: 1 1 auto !important;
  height: 48px !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: var(--vo-primary) !important;
  background-image: none !important;
  color: #ffffff !important;
  font: 600 16px/1 var(--vo-font) !important;
  box-shadow: none !important;
}
.map-bottom-bar .mb-left .gm-route-btn-alt { display: none !important; }
/* La croix de la fiche fait doublon avec celle de la ligne du haut. */
.map-bottom-bar .mb-left:has(.gm-route-sheet) .mb-close-inline { display: none !important; }
@media (max-width: 768px) {
  .route-compact.route-compact--open { width: calc(100vw - 24px) !important; }
}
/* Le conteneur imposait 420 px de haut : le panneau prend la hauteur de son contenu. */
.map-overlay-search .map-search-inner.route-open { height: auto !important; min-height: 0 !important; }
.map-overlay-search .map-search-inner .route-compact { align-self: flex-start !important; }
.map-overlay-search .route-compact .route-icon-btn.route-icon-btn--gps,
.map-overlay-search .route-compact .route-icon-btn.route-icon-btn--swap { border: 0 !important; background: transparent !important; box-shadow: none !important; }
.map-overlay-search .route-compact .route-icon-btn.route-icon-btn--swap { color: var(--vo-text-2) !important; }
.map-overlay-search .route-compact .route-icon-btn.route-icon-btn--gps:hover,
.map-overlay-search .route-compact .route-icon-btn.route-icon-btn--swap:hover { background: var(--vo-bg) !important; }
/* Ordre de lecture : durée, arrivée, option péages, unité, action. */
.map-bottom-bar .mb-left .gm-route-sheet { display: flex !important; flex-direction: column; }
.map-bottom-bar .mb-left .gm-route-main { order: 1; }
.map-bottom-bar .mb-left .gm-route-options { order: 2; margin: 0 !important; }
.map-bottom-bar .mb-left .gm-route-brigade { order: 3; }
.map-bottom-bar .mb-left .gm-route-actions { order: 4; }
.map-overlay-search:has(.route-compact--open) { height: auto !important; min-height: 0 !important; }
.map-overlay-search .map-search-inner .route-compact { flex: none !important; }

/* ── Profils : citoyen (VigiePaix) / réserviste (VigieOps) ─────────────
   js/profil.js pose html[data-profil]. Le mode citoyen masque les outils
   métier sans les supprimer : Missions, Notes, Interprète, procédure pénale,
   favoris NATINF. */
.vo-citoyen-only { display: none !important; }
html[data-profil="citoyen"] .vo-citoyen-only { display: revert !important; }
html[data-profil="citoyen"] .vo-row.vo-citoyen-only { display: flex !important; }
html[data-profil="citoyen"] .vo-reserviste-only,
html[data-profil="citoyen"] .sidebar-tab[data-section="mission"],
html[data-profil="citoyen"] .sidebar-tab[data-section="notes"],
html[data-profil="citoyen"] .sidebar-tab[data-section="interprete"],
html[data-profil="citoyen"] .header-tabs [data-section="mission"],
html[data-profil="citoyen"] .header-tabs [data-section="notes"],
html[data-profil="citoyen"] .header-tabs [data-section="interprete"],
html[data-profil="citoyen"] .mobile-nav-btn[data-section="mission"],
html[data-profil="citoyen"] #plusSheet .vo-tiles,
html[data-profil="citoyen"] .vo-tool[data-tool="collapsCpp"],
html[data-profil="citoyen"] #collapsCpp,
html[data-profil="citoyen"] #panelInfra .natinf-tabs,
html[data-profil="citoyen"] #natinfFilterChips,
html[data-profil="citoyen"] #natinfVoiceStatus { display: none !important; }
html[data-profil="citoyen"] .mobile-nav.vo-nav { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
@media (min-width: 769px) {
  html[data-profil="citoyen"] .vo-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Bouton de dictée : « Assistant vocal terrain » est un libellé métier. */
html[data-profil="citoyen"] #natinfVoiceBtn { font-size: 0 !important; gap: 0 !important; }
html[data-profil="citoyen"] #natinfVoiceBtn .vo-btn-ico { margin: 0 !important; }
.vo-row-sub { display: block; margin-top: 2px; font: 400 13px/18px var(--vo-font); color: var(--vo-text-2); }
.vo-citoyen-note {
  margin: 4px 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--vo-primary-soft);
  color: var(--vo-text);
  font: 400 13px/19px var(--vo-font);
}
.vo-citoyen-note a { color: var(--vo-primary-text); font-weight: 600; }

/* Résultats d'infraction en mode citoyen (natinf.js, window.VO_PROFIL). */
html[data-profil="citoyen"] .natinf-interpretation,
html[data-profil="citoyen"] .natinf-keywords,
html[data-profil="citoyen"] #natinfCollapseAllBtn,
html[data-profil="citoyen"] .natinf-fav-btn,
html[data-profil="citoyen"] .natinf-card .natinf-preview,
html[data-profil="citoyen"] .natinf-card .natinf-category-badge { display: none !important; }
.natinf-card .natinf-title-citoyen {
  flex: 1 1 100%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font: 600 16px/22px var(--vo-font) !important;
  color: var(--vo-text) !important;
}
.natinf-card .natinf-code-chip { font: 500 12px/18px var(--vo-font); color: var(--vo-text-2); }

/* Tchat officiel Ma Sécurité (fiche d'accueil citoyen, panneau SOS). */
.vo-home-tchat {
  flex: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: var(--vo-primary-soft);
  color: var(--vo-on-primary-container);
}
.vo-home-tchat[hidden] { display: none; }
.vo-home-tchat .vo-ico { width: 20px; height: 20px; }
.emergency-number.em-tchat { display: flex; align-items: center; justify-content: center; background: var(--vo-primary-soft) !important; color: var(--vo-on-primary-container) !important; }
.emergency-number.em-tchat .vo-ico, .emergency-item .emergency-call-btn .vo-ico { width: 20px; height: 20px; }
/* Le tchat n'est pas un appel d'urgence : bleu, pas rouge. */
.emergency-item:has(.em-tchat) .emergency-call-btn { background: var(--vo-primary) !important; color: #ffffff !important; }

/* Soutien au projet (Tipeee), en tête du menu Plus. */
.vo-soutien {
  display: flex; align-items: center; gap: 14px;
  margin: 4px 0 14px; padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fde8ea, #e8f0fc);
  color: var(--vo-text); text-decoration: none;
}
.vo-soutien[hidden] { display: none; }
[data-theme="dark"] .vo-soutien { background: linear-gradient(135deg, rgba(225, 0, 15, 0.18), rgba(11, 87, 176, 0.25)); }
.vo-soutien-icon { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px; background: #e1000f; color: #fff; }
.vo-soutien-icon .vo-ico { width: 22px; height: 22px; fill: #fff; stroke: none; }
.vo-soutien-title { display: block; font: 700 16px/22px var(--vo-font); }
.vo-soutien-sub { display: block; font: 400 13px/18px var(--vo-font); color: var(--vo-text-2); }
.vo-soutien .vo-chevron { margin-left: auto; flex: none; }

/* VigiePaix n'affiche pas le badge « BETA » (réservé à Vigie Ops). */
html[data-profil="citoyen"] .vo-beta { display: none !important; }
