﻿@charset "UTF-8";
/* ══════════════════════════════════════════════════════════════
   UàG — Feuille de style principale
   CSSv7_LB_001.css (ex uagv8.css, renommé le 11 sept. 2026) — mise à jour mars 2026
   Fusion : styles hérités (v5) + interface apprb (DM Sans / dark mode)
══════════════════════════════════════════════════════════════ */

/* ── Import polices ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ────────────────────────────────────────────────────────────
   1. HÉRITAGE UAG v5 (styles originaux)
──────────────────────────────────────────────────────────── */
﻿
/* CSS Document v5 modifié le 25/09/18*/


body {padding: 0;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 100%;background-color: rgb(20,35,60);}
a {color : #954202;}

.Page_Globale #container {text-align: left;background-color: #FFF;margin-top: 0;margin-right: auto;margin-bottom: 0;margin-left: auto;  border-radius: 10px}
.Page_Globale #header {padding-top: 0;padding-right: 5px;padding-bottom: 0;padding-left: 5px;background-color: #FFF;}
.Page_Globale #header p {margin: 0;padding: 7px;}
.Page_Globale #header h1 {margin: 0;padding-top: 10px;padding-right: 0;padding-bottom: 5px;padding-left: 0;}
.Page_Globale #mainContent {padding: 5px 5px 5px 5px;align:left}
.Page_Globale #footer { padding-top: 0px;padding-right: 10px;padding-bottom: 10px;padding-left: 10px;height: 15px} 
.Page_Globale #footer p {margin: 0;padding: 3px;}
.entete {background-color : rgb(20,35,60);color:#F7F7F7;}
.entete td {border-top:2px solid #B9AFA4; border-bottom: 2px solid #B9AFA4;}
.titre_Carte {background-color : rgb(20,35,60);color:#F7F7F7;border-radius:10px}/*;heigth:37px}*/
.logo {margin-top: 4px;margin-left: 4px;}
.Sous_Titre {float:left;height: 37px;margin-top: 5px;}
.MenuGeneral {width: 100% ; height: 37px;}
.Intervale {height:3px}
.Central {height: 600px; border: 1px #48301E;background-color: rgb(20,35,60);border-radius: 10px;padding: 5px;}

.entete_Recap {font-family: Verdana, Arial, sans-serif;font-size: 9px;font-style: normal;font-weight: bold;background-color : rgb(20,35,60);color:#F7F7F7;}
.RLA {font-family: Verdana, Arial, sans-serif;font-size: 10px;font-style: normal;background-color: #EDDCCB;color: #000;}
#conteneurInfoBulle{margin:0;padding:0; font-family : Verdana, Arial, sans-serif; font-size : 10px; font-weight: normal; line-height: 10px;color:#000; overflow:hidden}
#EmplacementStreetView{margin:0 auto;padding:0;width:100% !important;max-width:100% !important;box-sizing:border-box;}   /* largeur inline 550px ignorée : suit la bulle (9 sept. 2026) */

.Agglo_lien {background-color : #fff;color:#337ab7;font-size: 10px;font-weight: bold;}

.Agglo_Resume {background-color : #D0C6A2;color:#333;font-size: 10px;font-weight: bold;}
.Agglo_Alterne{background-color : #D0C6A2;color:#333;font-size: 10px;font-weight: bold;}

.Carte {font-family: Verdana,Arial, sans-serif;font-size:  10px;font-style: normal;background-color :#FFF ;color:#000; border-radius: 10px;} /*border: 1px solid #48301E;}*/
.Carte td {border-top:2x solid #B9AFA4; border-bottom: 2px solid #B9AFA4;}

.CE {font-family: Verdana,Arial, sans-serif;font-size: medium;font-style: normal;font-weight: bold;background-color: #CFB392;color: #000;line-height: 30px;border: thin solid #48301E;}/*Commune enseigne*/
.Co {font-family: Verdana, Arial, sans-serif;font-size: 12px;font-style: normal;font-weight: bold;background-color : rgb(20,35,60);color:#F7F7F7;}/*Commune alterné*/
.Co td {border-top:2x solid #B9AFA4; border-bottom: 2px solid #B9AFA4;}
.Iris {font-family: Verdana, Arial, sans-serif;font-size: 12px;font-style: normal;font-weight: bold;background-color : #72492C;color:#F7F7F7;}
.Iris td {border-top:2x solid #B9AFA4; border-bottom: 2px solid #B9AFA4;}

.MC {font-family: Verdana,Arial,sans-serif;font-size: 14px;font-style: normal;font-weight: bold;background-color: #1fb714;color: #000000;}/*magasins / commune | Iris*/
.Mz {font-family: Verdana, Arial, sans-serif;font-size: 14px;font-style: normal;font-weight: bold;background-color: #FC0;color: #000;}/*magasins / zone*/
.Za {font-family: Verdana, Arial, sans-serif;font-size: 10px;font-style: normal;background-color: #FFF4C8;}/*Zone alterné*/
.HZ {font-family: Verdana, Arial, sans-serif;font-size: 10px;font-style: normal;background-color: #FFB7BD;}/*Hors zone*/
.BA {font-family: Verdana, Arial, sans-serif;font-size: 10px;font-style: normal;background-color: #FFF;color: #000;}/*Blanc alterné*/
.FA {font-family: Verdana, Arial, sans-serif;font-size: 10px;font-style: normal;background-color: #D8CE9F;color: #000;}/*Face alterné*/
.Ma {font-family: Verdana, Arial, sans-serif;font-size: 14px;font-style: normal;background-color: #fff;color: #000;}/*magasins alterné*/

.H2 {font-family: Verdana, Arial, sans-serif;font-size: 10px;font-style: normal;background-color: #FFDFDA;}
.M2 {	font-family: Verdana,Arial,sans-serif;font-size: 10px;font-style: normal;background-color: #FFEC87;color: #000000;}
.M3 {font-family: Verdana,Arial,sans-serif;font-size: 10px;font-style: normal;background-color: #CBDFCB;color: #000000;}

/* 
.marker {transition: all 0.3s ease-in-out;}
.marker.drop {transform: translateY(-10px);opacity: 0.7;}
.marker.drop.animate {animation: drop 0.5s ease-in-out;}

@keyframes drop {
0% {transform: translateY(-10px);opacity: 0.7;}
100% {transform: translateY(0);opacity: 1;}
}
 */


.PF {font-family: Verdana, Arial, sans-serif;font-size: 14px;background-color: #fff;font-weight: bold;font-style: normal;line-height: inherit;color: #000;}/*Performances*/

.QB {font-family: Verdana, Arial, sans-serif;font-size: 14px;font-style: normal;font-weight: bold;color: #ffffff;background-color: rgb(20,35,60);}/*Qunatitatifs*/
.AOC {font-family: Verdana, Arial, sans-serif;font-size: 14px;font-style: normal;background-color: #A6E35C; color: #243114;}/*Affimetrie Orange Clair*/
.AOM {font-family: Verdana, Arial, sans-serif;font-size: 14px;font-style: normal;background-color: #326099; color: #fff;}/*Affimetrie Orange Middle*/
.afm {font-family: Verdana, Arial, sans-serif;font-size: 14px;background-color: #6092DF;font-weight: bold;font-style: normal;line-height: inherit;color: #FFFFFF}/*2e4466;}Affimetrie*/
li {margin: 0; padding: 0;}
td, tr, h1, h2, h3, h4, h5 {font-family:Verdana, Arial, sans-serif;letter-spacing:0;}
h1, h2, h3, h4, h5, form {display:inline;line-height: inherit;}

h1 {font-size:150%;font-weight:normal; color:	#000}
h2 {font-size:89%;font-weight:normal;color:	#000}
h3 {font-size:83%;font-weight:normal;color:	#000}
h4 {font-family : Verdana, arial,  sans-serif; font-size : 10px; font-weight: normal; line-height: 12px;color:	#000;  }
h5 {font-family : Verdana, arial,  sans-serif; font-size : 9px; font-weight:normal;line-height: 12px; color:	#000}
.bold {font-weight:bold}

hr	{height: 0px; border: solid #CCCCCC 0px; border-top-width: 1px;}

a:link {text-decoration: none; color:#333}
a:visited {text-decoration: none;color:#333}
a:hover {text-decoration: underline;}
a:active {	text-decoration: none;}
#calque_Tableau {position: relative;top: 0px;left: 0px;height: 400px; overflow-x: hide;overflow-y: hide ;visibility:inherit}
#calque_TabSD {position: relative;top: 0px;left: 0px;height: 250px;overflow-x: hide;overflow-y: auto;visibility:inherit;border: thin solid #48301E;}

/* ;border: thin solid #48301E;} */
#CW {overflow: auto; height:200px; padding: 0px 2px 1px 0px;border: 1px solid #48301E; margin-right: 5px}

/* ────────────────────────────────────────────────────────────
   2. INTERFACE APPRB — Reset, variables, layout
──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Thème clair (défaut) ── */
:root {
  --bg-0:#eef1f6; --bg-1:#ffffff; --bg-2:#f5f7fa; --bg-3:#e8ecf2;
  --border:#d0d9e6; --border-hi:#b0bdcf;
  --txt-0:#1a2535; --txt-1:#4a6280; --txt-2:#7a93b0;
  --blue:#1a7de0; --green:#1a9e6a; --orange:#d96820;
  --purple:#6d4ec0; --red:#c83040; --yellow:#b08010;
  /* Largeur du bandeau : fluide sur la largeur du viewport — défaut 310px sur
     grand écran (≥ ~1410px), rétrécit jusqu'à 230px sur écran étroit (plus de
     carte, damier 2 colonnes qui se resserre). Repli = 0 via #sidebar.collapsed. */
  --sidebar-w:clamp(230px, 22vw, 310px); --hdr-h:46px; --status-h:34px; --panel-h:340px; --radius:7px;
}

/* ── Thème sombre ── */
:root[data-theme="dark"] {
/*   --bg-0:#0c1017; --bg-1:#141b24; --bg-2:#f5f7fa; --bg-3:#e8ecf2; */
  --bg-0:#0c1017; --bg-1:#141b24; --bg-2:#1c2533; --bg-3:#243040;
  --border:#2a3a4e; --border-hi:#3a5068;
  --txt-0:#e2eaf4; --txt-1:#8fa5c0; --txt-2:#5a7290;
  --blue:#4da6ff; --green:#3ecf8e; --orange:#ff8c42;
  --purple:#9d7bea; --red:#f06070; --yellow:#f5c542;
}

html, body {
  height:100%; width:100%; overflow:hidden;
  font-family:'DM Sans',sans-serif; font-size:13px;
  color:var(--txt-0); background:var(--bg-0);
  transition:background-color .3s, color .25s;
}

/* ── Topbar navy fixe ── */
#topbar {
  height:var(--hdr-h); background:#0d1b3e; border-bottom:1px solid #162550;
  display:flex; align-items:center; padding:0 12px; gap:10px;
  z-index:200; flex-shrink:0;
}
.tb-logo { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.tb-logo img { height:21px; border-radius:3px; opacity:.9; }
.tb-brand { font-size:14px; font-weight:600; color:#c8d8f0; }
.tb-sep { width:1px; height:17px; background:#1e3060; flex-shrink:0; }
#Sous_Titre { font-size:13px; color:#8aabcc; }
.tb-spacer { flex:1; }
.tb-chip {
  background:#132040; border:1px solid #1e3060; border-radius:20px;
  padding:3px 11px; font-size:11px; font-family:'DM Sans',sans-serif; color:#6688aa; flex-shrink:0;
}
.tb-btn {
  display:flex; align-items:center; gap:6px; height:28px; padding:0 11px;
  background:#132040; border:1px solid #1e3060; border-radius:var(--radius);
  color:#8aabcc; font-size:12px; font-family:'DM Sans',sans-serif; font-weight:500;
  cursor:pointer; flex-shrink:0; transition:background .15s,color .15s,border-color .15s;
}
.tb-btn:hover { background:#1c3060; color:#c8d8f0; border-color:#2a4a80; }
.tb-btn.active { background:#1a4aaa; border-color:#2a60cc; color:#fff; }
.tb-btn svg { width:12px; height:12px; flex-shrink:0; }

/* Bouton Mobimétrie (logo sur pastille) : le fond bleu « actif » est masqué par
   la pastille → on distingue l'état via le LOGO lui-même : grisé/estompé au
   repos, pleine couleur quand le mode est actif (survol = aperçu couleur). */
#btn-perf-mode img { filter:grayscale(1); opacity:.5; transition:filter .18s,opacity .18s; }
#btn-perf-mode:hover img { filter:grayscale(0); opacity:.82; }
#btn-perf-mode.active img { filter:grayscale(0); opacity:1; }

/* ── Layout ── */
#workspace { display:flex; height:calc(100vh - var(--hdr-h) - var(--status-h)); overflow:hidden; }

/* ── Sidebar ── */
#sidebar {
  width:var(--sidebar-w); min-width:var(--sidebar-w); height:100%;
  background:var(--bg-1); border-right:1px solid var(--border);
  display:flex; flex-direction:column; overflow:hidden;
  transition:width .3s cubic-bezier(.4,0,.2,1), min-width .3s cubic-bezier(.4,0,.2,1),
             background-color .3s, border-color .3s;
  flex-shrink:0;
}
#sidebar.collapsed { width:0; min-width:0; }
.sb-head {
  padding:0 14px; border-bottom:1px solid var(--border);
  display:flex; align-items:center; flex-shrink:0; height:36px;
}
.sb-head-label {
  font-size:9px; font-weight:700; text-transform:uppercase;
  letter-spacing:.14em; color:var(--txt-2);
}
.sb-body { flex:1; overflow-y:auto; overflow-x:hidden; position:relative; }
/* Bloc Pilotage (menus de navigation + lien retour) FIGÉ en haut du volet
   pendant le défilement — il sert à tout moment, à tous les niveaux */
#menus-sidebar-section {
  position:sticky; top:0; z-index:5; background:var(--bg-1);
  box-shadow:0 6px 8px -7px rgba(0,0,0,.35);
}
.sb-body::-webkit-scrollbar { width:3px; }
.sb-body::-webkit-scrollbar-thumb { background:var(--border); border-radius:2px; }
.sb-section { padding:9px 14px 11px; border-bottom:1px solid var(--border); transition:border-color .3s; }
#agglo-section { padding:8px 10px !important; }
#Barre_Menus { width:100%; min-height:28px; }
#Barre_Menus select {
  width:100%; font-family:inherit; font-size:12px;
  background:var(--bg-2); color:var(--txt-0);
  border:1.5px solid var(--border); border-radius:6px;
  padding:5px 8px; cursor:pointer; outline:none;
  -webkit-appearance:auto; appearance:auto;
}
#Barre_Menus select:focus { border-color:var(--blue); }
/* Boutons UAG style natif */
#Barre_Menus a, #Barre_Menus span[onclick], #Barre_Menus div[onclick] {
  display:inline-block; padding:4px 10px; margin:2px 2px 0;
  border-radius:5px; font-size:11px; cursor:pointer;
  background:var(--bg-3); border:1px solid var(--border);
  color:var(--txt-0); text-decoration:none;
}

.sb-section:last-child { border-bottom:none; }
/* Section repliable (générique) : en-tête bouton + résumé (visible replié) + chevron */
.sb-fold-hd {
  display:flex; flex-wrap:wrap; align-items:center; gap:0 7px; width:100%; margin:0; padding:2px 0;
  background:none; border:0; cursor:pointer; font-family:inherit; color:inherit; text-align:left;
}
.sb-fold-hd .sb-sec-label { margin:0; flex:0 0 auto; }
.sb-fold-hd:hover .sb-sec-label { color:var(--txt-0); }
.sb-fold-ico { width:12px; height:12px; flex-shrink:0; color:var(--txt-2); }
/* Résumé des réglages actifs : 2e ligne pleine largeur, sous le titre, replié seulement */
.sb-fold-sum {
  flex:0 0 100%; min-width:0; font-size:10px; color:var(--txt-1); text-align:left;
  margin-top:4px; padding-left:19px; line-height:1.3;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.sb-fold:not(.closed) .sb-fold-sum { display:none; }
.sb-fold-chev { width:10px; height:10px; flex-shrink:0; color:var(--txt-2); transition:transform .2s; margin-left:auto; }
.sb-fold.closed .sb-fold-chev { transform:rotate(-90deg); }
.sb-fold-bd { margin-top:4px; }
.sb-fold-bd > .op-row:first-child { margin-top:6px; }
.sb-fold.closed .sb-fold-bd { display:none; }
/* Variante imbriquée (Réglages d'affichage dans le bloc Pilotage figé) */
.sb-fold-inner { margin-top:9px; padding-top:7px; border-top:1px solid var(--border); }
.sb-fold-inner .sb-fold-bd { padding-bottom:2px; }
.sb-sec-label { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.14em; color:var(--txt-2); margin-bottom:8px; }

/* Stat cards */
.stat-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.stat-card { background:var(--bg-2); border:1px solid var(--border); border-radius:6px; padding:8px 10px; transition:background .3s,border-color .3s; }
.stat-val { font-size:15px; font-weight:600; font-family:'DM Sans',sans-serif; color:var(--txt-0); line-height:1;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-variant-numeric:tabular-nums; }
.stat-lbl { font-size:9px; color:var(--txt-2); text-transform:uppercase; letter-spacing:.06em; margin-top:3px; }

/* Localisation */
.loc-badge { background:var(--bg-2); border:1px solid var(--border); border-radius:6px; padding:7px 10px; font-size:12px; color:var(--txt-0); line-height:1.4; }
.loc-area  { font-weight:600; color:var(--blue); }
.loc-iris  { font-size:10px; color:var(--txt-2); margin-top:2px; font-family:'DM Sans',sans-serif; }

/* Zone pills */
.zone-pills { display:flex; flex-wrap:wrap; gap:5px; }
.zone-pill  { display:flex; align-items:center; gap:5px; padding:3px 9px; border-radius:10px; font-size:11px; font-weight:500; border:1px solid; }

/* Layer rows */
.layer-row  { display:flex; align-items:center; justify-content:space-between; padding:4px 0; }
.layer-info { display:flex; align-items:center; gap:7px; }
.layer-dot  { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.layer-name { font-size:12px; color:var(--txt-0); white-space:nowrap; }

/* Opacity slider */
.op-row { display:flex; align-items:center; gap:8px; margin-top:8px; }
.op-lbl { font-size:11px; color:var(--txt-2); flex-shrink:0; min-width:52px; }
/* Le curseur prend l'espace restant et PEUT rétrécir (sinon sa largeur
   intrinsèque fait déborder la ligne quand le bandeau est étroit). */
.op-row input[type=range] { flex:1 1 auto; min-width:0; width:auto; }

/* Toggle switch (on/off) — remplace les cases natives, plus lisibles/élégants */
input.uag-switch {
  -webkit-appearance:none; appearance:none; margin:0 0 0 auto;
  width:34px; height:20px; flex-shrink:0; border-radius:20px; position:relative;
  background:var(--bg-3); border:1px solid var(--border); cursor:pointer;
  transition:background .18s, border-color .18s;
}
input.uag-switch::before {
  content:''; position:absolute; top:2px; left:2px; width:14px; height:14px;
  border-radius:50%; background:var(--txt-2);
  transition:transform .18s, background .18s;
}
input.uag-switch:hover { border-color:var(--border-hi); }
input.uag-switch:checked { background:var(--blue); border-color:var(--blue); }
input.uag-switch:checked::before { transform:translateX(14px); background:#fff; }

/* Contrôle segmenté (choix à N options) */
.uag-seg { display:inline-flex; margin-left:auto; border:1px solid var(--border);
  border-radius:6px; overflow:hidden; }
.uag-seg button {
  border:0; background:var(--bg-2); color:var(--txt-2); font-family:inherit;
  font-size:11px; padding:4px 10px; cursor:pointer;
  transition:background .15s, color .15s;
}
.uag-seg button + button { border-left:1px solid var(--border); }
.uag-seg button.active { background:var(--blue); color:#fff; }
.uag-seg button:not(.active):hover { background:var(--bg-3); color:var(--txt-0); }
.op-slider { flex:1; height:3px; -webkit-appearance:none; background:var(--border); border-radius:2px; cursor:pointer; }
.op-slider::-webkit-slider-thumb {
  -webkit-appearance:none; width:13px; height:13px; border-radius:50%;
  background:var(--blue); border:2px solid var(--bg-1); cursor:pointer;
}
.op-val { font-size:11px; font-family:'DM Sans',sans-serif; color:var(--txt-1); min-width:32px; text-align:right; }

/* ── Damier catégories ── */
/* Dimensionnement FLUIDE piloté par la hauteur du viewport (clamp) : le défaut
   prescripteur (icône 100×50, padding 10px) est préservé sur grand écran, et se
   compacte EN CONTINU sur petit écran (portables), sans paliers. Ratio 2:1 tenu
   (largeur = 2× la hauteur à chaque point : mêmes bornes ×2, même coefficient vh).
   Les icônes sont vectorielles → mise à l'échelle nette, aucune régénération. */
.cat-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:clamp(3px, 0.5vh, 5px); }
.cat-btn {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:clamp(2px, 0.4vh, 4px); padding:clamp(2px, 0.6vh, 5px) 4px;
  background:var(--bg-2); border:1.5px solid var(--border); border-radius:var(--radius);
  cursor:pointer; text-align:center;
  transition:background .15s, border-color .15s;
}
.cat-btn:hover { background:var(--bg-3); border-color:var(--border-hi); }
.cat-btn.active { background:var(--blue); border-color:var(--blue); }
.cat-btn.active .cat-lbl { color:#fff; }
.cat-btn.active .cat-ico { stroke:#fff; }
.cat-ico { width:clamp(34px, 5vh, 52px); height:clamp(17px, 2.5vh, 26px); max-width:100%; stroke:white; fill:none; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; transition:stroke .15s; flex-shrink:0; }
.cat-lbl { font-size:clamp(8px, 0.95vh, 10px); font-weight:600; color:var(--txt-1); line-height:1.2; }
/* 9e bouton « données d'import » (chantier 10) : grisé/inerte tant qu'aucune
   donnée importée n'est fournie ; complète le damier 3×3 (8 familles + 1). */
.cat-btn.cat-import.is-disabled { opacity:.45; cursor:default; pointer-events:none; border-style:dashed; }
.cat-btn.cat-import.is-disabled .cat-lbl { color:var(--txt-2); font-weight:500; }

/* Icônes socio-démo DEUX TONS (cf. _icoTheme) : forme = `color` (currentColor),
   accent découpé = `--ico-ko` (couleur du FOND derrière l'icône → contraste
   garanti). Réglés par conteneur : thème-adaptatif en sidebar, foncé/blanc fixe
   sur les surfaces toujours claires (infobulle, légende). */
#sd-analysis-section { --ico-ko: var(--bg-1); }        /* fond sidebar (suit le thème) */
#sd-analysis-section svg { color: var(--txt-0); }
#cat-grid .cat-btn.active svg { color:#fff; }          /* famille active (fond bleu) */
.subcat-btn.active svg { color:var(--blue); }          /* sous-catégorie active */
.ib-ico-block { color:#1a3358; --ico-ko:#fff; }        /* infobulle blanche → forme foncée, accent blanc */

/* Sous-catégorie */
.subcat-wrap {
  margin-top:8px; background:var(--bg-2); border:1px solid var(--border);
  border-radius:var(--radius); padding:8px 10px;
  transition:background .3s, border-color .3s;
}
.subcat-title { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.12em; color:var(--blue); margin-bottom:6px; }

/* ── Map ── */
#map-container { flex:1; display:flex; flex-direction:column; overflow:hidden; position:relative; }
#map { flex:1; min-height:0; background:var(--bg-3); }
#map h4 { color:var(--txt-2); padding:20px; font-weight:300; font-style:italic; }
#sb-toggle {
  position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:16px; height:48px; background:var(--bg-2); border:1px solid var(--border); border-left:none;
  border-radius:0 6px 6px 0; display:flex; align-items:center; justify-content:center;
  cursor:pointer; color:var(--txt-2); transition:background .15s,color .15s; z-index:60;
}
#sb-toggle:hover { background:var(--bg-3); color:var(--txt-0); }

/* ── Bottom panel ── */
#bottom-panel {
  height:var(--panel-h); background:var(--bg-1); border-top:1px solid var(--border);
  display:flex; flex-direction:column; flex-shrink:0; overflow:hidden;
  transition:height .35s cubic-bezier(.4,0,.2,1), background .3s, border-color .3s;
}
#bottom-panel.closed { height:0; }
.bp-tabs {
  display:flex; align-items:center; border-bottom:1px solid var(--border);
  padding:0 10px; flex-shrink:0; height:36px; gap:2px;
}
.bp-tab {
  display:flex; align-items:center; gap:5px; padding:0 13px; height:100%;
  font-size:12px; font-weight:500; cursor:pointer; color:var(--txt-2);
  border-bottom:2px solid transparent; transition:color .15s,border-color .15s; white-space:nowrap;
}
.bp-tab.active { color:var(--blue); border-bottom-color:var(--blue); }
.bp-tab:hover:not(.active) { color:var(--txt-0); }
.bp-tab svg { width:12px; height:12px; flex-shrink:0; }
.bp-tabs-spacer { flex:1; }
#ctx-label { font-size:13px; font-weight:700; color:var(--blue); font-style:normal; max-width:480px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; letter-spacing:.01em; }
.bp-content { flex:1; overflow:hidden; position:relative; }
.bp-pane { position:absolute; inset:0; display:none; padding:8px; gap:8px; }
.bp-pane.active { display:flex; }

.chart-card {
  flex:1; display:flex; flex-direction:column;
  background:var(--bg-2); border:1px solid var(--border); border-radius:var(--radius);
  padding:10px 12px; overflow:hidden; min-width:0;
  transition:background .3s,border-color .3s;
}
.chart-card-title { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.12em; color:var(--txt-2); margin-bottom:5px; flex-shrink:0; }
.chart-wrap { flex:1; min-height:0; }

/* ── Status bar ── */
#statusbar {
  height:var(--status-h); background:var(--bg-0); border-top:1px solid var(--border);
  display:flex; align-items:center; padding:0 12px; gap:8px;
  font-size:10px; color:var(--txt-2); transition:background .3s,border-color .3s;
}
#statusbar a { color:var(--blue); text-decoration:none; }

/* ── Enclaves logo partenaire ─────────────────────────────────── */
.logo-enclave {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  background: #fff;
  flex-shrink: 0;
  box-sizing: border-box;
}
/* Footer : même hauteur que le statusbar, flush sur les 4 côtés */
.logo-enclave-footer {
  height: var(--status-h);     /* hauteur explicite = hauteur du statusbar */
  margin-top: 1px;             /* laisse visible la ligne de séparation carte/statusbar */
  margin-bottom: -1px;
  margin-left: 8px;
  margin-right: -12px;         /* flush bord droit */
  padding: 0 10px;
  border-radius: 0;
  align-self: auto;            /* ne pas laisser stretch interférer avec height */
}
/* Variante topbar : occupe toute la hauteur, flush bord droit */
.logo-enclave-tb {
  align-self: stretch;
  margin-left: 4px;
  margin-right: -12px;          /* compense padding:0 12px du #topbar */
  padding: 4px 10px;
  border-radius: 0;
}
/* sb-right : centrage vertical de tous les éléments */
.sb-right { margin-left:auto; display:flex; align-items:center; gap:8px; }
.sb-dot { color:var(--border); }
.status-indicator { display:flex; align-items:center; gap:4px; }
.status-led { width:6px; height:6px; border-radius:50%; background:var(--green); animation:pulse-led 2.5s ease-in-out infinite; }
@keyframes pulse-led { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ── Index bar dans le tableau ── */
.idx-cell { display:flex; align-items:center; gap:6px; justify-content:center; height:100%; }
.idx-val  { font-family:'DM Sans',sans-serif; font-size:11px; font-weight:600; min-width:36px; text-align:right; }
.idx-bar  { height:5px; border-radius:3px; min-width:3px; flex-shrink:0; }

/* ── DevExtreme overrides ── */
.dx-widget, .dx-overlay-content { font-family:'DM Sans',sans-serif !important; }
/* Texte uniquement — exclure les icônes DevExtreme */
.dx-datagrid .dx-row td, .dx-datagrid .dx-header-row td,
.dx-datagrid .dx-group-row td, .dx-datagrid .dx-total-footer td,
.dx-datagrid .dx-filter-row td, .dx-datagrid-search-panel input,
.dx-datagrid .dx-texteditor-input { font-family:'DM Sans',sans-serif !important; }
.dx-switch { height:19px; }

/* Layout général */
.dx-datagrid {
  background:transparent !important;
  font-size:11px !important;
  color:var(--txt-0) !important;
}
.dx-datagrid-content { background:transparent !important; }

/* En-têtes */
.dx-datagrid-headers { background:var(--bg-2) !important; border-color:var(--border) !important; }
.dx-datagrid-headers td, .dx-datagrid-headers .dx-datagrid-table .dx-row > td {
  font-size:10px !important; font-weight:600 !important;
  text-transform:uppercase !important; letter-spacing:.04em !important;
  background:var(--bg-2) !important; color:var(--txt-1) !important;
  border-color:var(--border) !important;
}

/* Lignes normales */
.dx-datagrid-rowsview .dx-data-row > td,
.dx-datagrid-rowsview .dx-row:not(.dx-row-alt):not(.dx-freespace-row) > td {
  background-color:var(--bg-1) !important;
  border-color:var(--border) !important;
  color:var(--txt-0) !important;
  padding:3px 7px !important;
  vertical-align:middle !important;
  font-size:11px !important;
}

/* Lignes alternées */
.dx-datagrid-rowsview .dx-row-alt > td,
.dx-datagrid-rowsview .dx-row-alt.dx-data-row > td {
  background-color:var(--bg-2) !important;
}

/* Hover */
.dx-datagrid-rowsview .dx-row:hover > td,
.dx-datagrid-rowsview .dx-data-row:hover > td {
  background-color:rgba(26,125,224,.07) !important;
}

/* Groupe (ligne pliable) : gras */
.dx-datagrid-rowsview .dx-group-row > td {
  background-color:var(--bg-3) !important;
  font-weight:700 !important;
  font-size:11px !important;
  color:var(--txt-0) !important;
  border-color:var(--border) !important;
}
/* Lignes de détail : poids normal */
.dx-datagrid-rowsview .dx-data-row > td {
  font-weight:400 !important;
}

/* Footer / summary */
.dx-datagrid-total-footer > .dx-datagrid-content td {
  background:var(--bg-2) !important; border-color:var(--border) !important;
  font-weight:600 !important; color:var(--txt-1) !important;
}

/* Inputs filtres */
:root[data-theme="dark"] .dx-texteditor.dx-editor-outlined {
  background:var(--bg-2) !important; border-color:var(--border) !important;
}
:root[data-theme="dark"] .dx-texteditor-input { color:var(--txt-0) !important; background:transparent !important; }
:root[data-theme="dark"] .dx-overlay-content { background:var(--bg-2) !important; border-color:var(--border) !important; color:var(--txt-0) !important; }
:root[data-theme="dark"] .dx-datagrid-rowsview .dx-row:not(.dx-row-alt) > td { background-color:var(--bg-1) !important; }
:root[data-theme="dark"] .dx-datagrid-rowsview .dx-row-alt > td { background-color:rgba(255,255,255,.025) !important; }

@keyframes fadeIn { from{opacity:0;transform:translateY(-5px)} to{opacity:1;transform:translateY(0)} }
#topbar  { animation:fadeIn .3s ease both; }
#sidebar { animation:fadeIn .3s ease .07s both; }

/* ══════════════════════════════════════
   INFOBULLE IRIS ENRICHIE
══════════════════════════════════════ */
#conteneurInfoBulle {
  font-family:'DM Sans',system-ui,sans-serif !important;
  width:100% !important; max-width:100% !important;
  padding:0 !important; margin:0;
  border-radius:10px; overflow:hidden;
  background:#ffffff; color:#1a2535;
  animation:ibPop .18s cubic-bezier(.4,0,.2,1);
  position:relative; top:0 !important; /* colle en haut */
}
.ib-ico-row {
  display:flex; align-items:center; gap:5px; margin-bottom:7px;
}
.ib-ico-sep {
  font-size:10px; color:#b0bdcf; line-height:1; flex-shrink:0;
}
#conteneurInfoBulle h4 { display:none !important; } /* masque le h4 original */
@keyframes ibPop { from{opacity:0;transform:scale(.96)} to{opacity:1;transform:scale(1)} }

.ib-hd {
  padding:11px 14px 9px; border-bottom:1px solid #e8ecf2;
}
.ib-name {
  font-size:13px; font-weight:700; color:#1a2535; line-height:1.25; margin-bottom:2px;
}
.ib-agglo {
  font-size:10px; color:#7a93b0; line-height:1.3;
}
.ib-zone-badge {
  display:inline-flex; align-items:center; gap:5px; margin-top:6px;
  padding:2px 9px; border-radius:10px; font-size:10px; font-weight:600; border:1px solid;
}
.ib-bd { padding:10px 14px 12px; }
.ib-cat {
  font-size:9px; color:#7a93b0; text-transform:uppercase; letter-spacing:.08em; margin-bottom:3px;
}
.ib-item {
  font-size:12px; font-weight:600; color:#1a2535; line-height:1.3; margin-bottom:8px;
}
.ib-val-row { display:flex; align-items:baseline; gap:5px; margin-bottom:10px; }
.ib-val  { font-size:22px; font-weight:700; font-family:'DM Sans',sans-serif; color:#1a2535; line-height:1; }
.ib-unit { font-size:11px; color:#7a93b0; }

/* Jauge indice */
.ib-gauge-hd { display:flex; justify-content:space-between; align-items:center; margin-bottom:5px; }
.ib-gauge-lbl { font-size:9px; color:#7a93b0; text-transform:uppercase; letter-spacing:.08em; }
.ib-gauge-num { font-size:16px; font-weight:700; font-family:'DM Sans',sans-serif; }
.ib-gauge-qual { font-size:9px; font-weight:400; color:#7a93b0; margin-left:4px; }
.ib-track {
  height:9px; background:#e8ecf2; border-radius:5px;
  position:relative; overflow:hidden; margin-bottom:3px;
}
.ib-fill { height:100%; border-radius:5px; transition:width .35s cubic-bezier(.4,0,.2,1); }
.ib-ref  {
  position:absolute; top:0; bottom:0; width:2px;
  background:rgba(100,120,150,.5); pointer-events:none;
}
.ib-ticks {
  display:flex; justify-content:space-between;
  font-size:9px; color:#b0bdcf; font-family:'DM Sans',sans-serif;
}

/* Bulle PASTILLE AGGLO (N1 + voisines) : titre dans la chrome, corps en tuiles
   2 colonnes aérées (retour : « tassé, fouillis »). Fond blanc quel que soit le thème. */
.ib-sy { padding:2px 12px 12px; font-family:'DM Sans',system-ui,sans-serif; color:#1a2535; }
.ib-sy-sub { font-size:9px; color:#7a93b0; text-transform:uppercase; letter-spacing:.08em; margin:0 0 8px; }
.ib-sy-grid { display:grid; grid-template-columns:1fr 1fr; gap:5px; }
.ib-sy-tile { background:#f3f5f9; border-radius:7px; padding:6px 8px 5px; min-width:0; }
.ib-sy-lbl { font-size:8.5px; color:#7a93b0; text-transform:uppercase; letter-spacing:.06em; line-height:1.2; margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ib-sy-val { display:flex; align-items:center; justify-content:space-between; gap:4px; font-size:12.5px; font-weight:700; color:#1a2535; line-height:1.2; white-space:nowrap; }
.ib-sy-val > span:first-child { overflow:hidden; text-overflow:ellipsis; }
.ib-sy-sec { font-size:10px; font-weight:700; color:#1a2535; margin:12px 0 6px; padding-top:9px; border-top:1px solid #e8ecf2; }
.ib-sy-sec em { font-style:normal; font-weight:500; color:#7a93b0; }
.ib-sy-ext { font-size:10px; color:#8a6d1a; margin:0 0 6px; }
.ib-sy-note { font-size:8.5px; color:#9aa9bd; margin-top:7px; line-height:1.35; }
.ib-sy-btn { display:inline-block; margin-top:10px; background:#1a7de0; color:#fff !important; font-size:11px; font-weight:700; padding:6px 14px; border-radius:6px; text-decoration:none; }
.ib-sy-btn:hover { background:#1667ba; }

/* Logo+zone dans la bande titre InfoWindow (gm-style-iw-chr) */
.ib-chr-logo {
  display:inline-flex; align-items:center; gap:7px;
  padding:0 10px 0 4px;
  flex-shrink:0; min-width:0;
}
.ib-chr-logo-img {
  max-height:26px; max-width:52px;
  object-fit:contain; flex-shrink:0;
  border-radius:3px;
}
.ib-chr-logo-name {
  font-size:11px; font-weight:700; line-height:1.2;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  max-width:140px;
  font-family:'DM Sans',sans-serif;
}
/* Forcer flex + centrage vertical dans la barre titre InfoWindow */
.gm-style-iw-chr {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap;
  padding: 0 !important;
}
.gm-style-iw-chr .ib-chr-logo {
  flex: 1; min-width: 0; align-self: center;
}

/* Camembert mini */
.ib-pie-wrap {
  display:inline-flex; align-items:center; gap:4px;
  margin-left:8px; vertical-align:middle;
}
.ib-pie { display:block; flex-shrink:0; }
.ib-pie-pct {
  font-size:11px; font-weight:600; color:#1a7de0;
  font-family:'DM Sans',sans-serif; white-space:nowrap;
}
/* Largeur min infobulle élargie */
/* #conteneurInfoBulle occupe 100% du conteneur InfoWindow — pas de min-width fixe */
.ib-gauge-block {
  background:#f0f2f7; border-radius:7px; padding:8px 10px 6px; margin-top:8px;
}
[data-theme=dark] .ib-gauge-block { background:rgba(255,255,255,.07); }
.ib-agglo-bar {
  font-size:12px; font-weight:700; color:#1a7de0;
  padding:9px 14px 7px; letter-spacing:.01em;
  background:linear-gradient(90deg,#1a7de012 0%,transparent 100%);
  border-bottom:2px solid #1a7de025;
}
.ib-sep { display:none; }
.ib-ico-block { padding:6px 14px 4px; display:flex; flex-direction:column; gap:3px; }
.ib-ico-line { display:flex; align-items:center; gap:0; }
.ib-ico-txt { font-size:10px; color:#4a5568; }
.ib-ico-item .ib-ico-item-txt { font-weight:600; color:#1a2535; font-size:11px; }
.ib-ref-row { display:flex; align-items:baseline; gap:4px; margin-top:3px; }
.ib-ref-lbl { font-size:9px; color:#8090a8; text-transform:uppercase; letter-spacing:.06em; }
.ib-ref-val { font-size:11px; font-weight:600; color:#4a5568; font-family:'DM Sans',sans-serif; }
/* Ligne de comparaison */
.ib-row { display:flex; gap:6px; margin-top:9px; }
.ib-cell {
  flex:1; background:#f5f7fa; border-radius:6px;
  padding:6px 8px; text-align:center;
}
.ib-cell-lbl { font-size:9px; color:#7a93b0; text-transform:uppercase; letter-spacing:.06em; margin-bottom:2px; }
.ib-cell-val { font-size:13px; font-weight:600; font-family:'DM Sans',sans-serif; color:#1a2535; }


.zone-sel-link {
  font-size:10px; color:var(--blue); cursor:pointer; text-decoration:none; background:none; border:none; padding:0;
}
.zone-sel-link:hover { text-decoration:underline; }
.zone-btn {
  display:flex; align-items:center; gap:7px; padding:5px 9px;
  border-radius:6px; border:1.5px solid var(--border); background:var(--bg-2);
  cursor:pointer; transition:background .15s, border-color .15s;
  text-align:left; width:100%;
}
.zone-btn:hover { background:var(--bg-3); border-color:var(--border-hi); }
.zone-btn.active { border-color:var(--blue); background:var(--blue)18; }
.zone-btn.inactive { opacity:.45; }
.zone-dot  { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.zone-label { font-size:11px; font-weight:600; color:var(--txt-0); flex:1; }
.zone-count { font-size:10px; font-family:'DM Sans',sans-serif; color:var(--txt-2); }


/* ── Grille sous-catégories (même style que cat-grid) ── */
/* ── Grille sous-catégories (1 par ligne) ── */
.subcat-grid { display:flex; flex-direction:column; gap:4px; margin-top:4px; }
.subcat-btn {
  display:flex; flex-direction:row; align-items:center;
  gap:8px; padding:7px 10px; border-radius:6px; cursor:pointer; width:100%;
  background:var(--bg-3); border:1.5px solid var(--border);
  transition:background .15s,border-color .15s; text-align:left;
}
.subcat-btn:hover { background:var(--bg-2); border-color:var(--blue)55; }
.subcat-btn.active { background:var(--blue)18; border-color:var(--blue); }
.subcat-ico-sm { width:18px; height:18px; stroke:none; fill:none;
  stroke-width:1.4; stroke-linecap:round; stroke-linejoin:round;
  flex-shrink:0; transition:stroke .15s; }
.subcat-btn.active .subcat-ico-sm { stroke:var(--blue); }
.subcat-lbl { font-size:11px; font-weight:500; color:var(--txt-1); line-height:1.3;
  transition:color .15s; }
.subcat-btn.active .subcat-lbl { color:var(--blue); font-weight:600; }

/* ── Grille items carte (1 par ligne) ── */
.item-grid { display:flex; flex-direction:column; gap:3px; margin-top:4px; }
.item-btn {
  display:flex; flex-direction:row; align-items:center;
  gap:8px; padding:6px 10px; border-radius:5px; cursor:pointer; width:100%;
  background:var(--bg-3); border:1.5px solid var(--border);
  transition:background .15s,border-color .15s; text-align:left;
}
.item-btn:hover { background:var(--bg-2); border-color:var(--blue)55; }
.item-btn.active { background:var(--blue)18; border-color:var(--blue); }
.item-ico-sm { width:25px; height:28px; stroke:var(--txt-2); fill:none;
  stroke-width:1.4; stroke-linecap:round; stroke-linejoin:round;
  flex-shrink:0; transition:stroke .15s; }
.item-btn.active .item-ico-sm { stroke:var(--blue); }
.item-lbl { font-size:11px; font-weight:500; color:var(--txt-1); line-height:1.3;
  transition:color .15s; }
.item-btn.active .item-lbl { color:var(--blue); font-weight:600; }

/* ── Barre Menus agglomération ── */
#agglo-section select, #agglo-section .barre-menus-select {
  width:100%; font-family:inherit; font-size:12px;
  background:var(--bg-2); color:var(--txt-0);
  border:1px solid var(--border); border-radius:5px; padding:5px 8px;
}
.stat-pop { background:var(--bg-2); border:1px solid var(--border); border-radius:6px; padding:7px 10px; }
.stat-pop-lbl { font-size:9px; color:var(--txt-2); text-transform:uppercase; letter-spacing:.06em; }
.stat-pop-val { font-size:18px; font-weight:700; font-family:'DM Sans',sans-serif; color:var(--blue); margin-top:2px; }
#Barre_Menus_agglo_wrap select {
  width:100%; font-family:inherit; font-size:12px;
  background:var(--bg-2); color:var(--txt-0);
  border:1px solid var(--border); border-radius:5px;
  padding:5px 8px; cursor:pointer;
}
#Barre_Menus_agglo_wrap .BtnMenu, #Barre_Menus_agglo_wrap button {
  display:inline-flex; align-items:center; padding:4px 8px;
  margin:2px; border-radius:4px; font-size:11px; cursor:pointer;
  background:var(--bg-3); border:1px solid var(--border); color:var(--txt-0);
}
#Barre_Menus_agglo_wrap .BtnMenu.active, #Barre_Menus_agglo_wrap button.active {
  background:var(--blue)18; border-color:var(--blue); color:var(--blue);
}
/* Barre_Menus — caché, conservé pour Menus.js */
#Barre_Menus { display:none !important; position:absolute; }

.dx-datagrid-content .dx-datagrid-table .dx-group-row > td {
  background-color:var(--bg-3) !important; font-weight:700 !important;
}
.ib-hd-agglo { display:block; font-size:13px; font-weight:700; color:#1a2535; line-height:1.4; }
.ib-hd-iris  { display:block; font-size:11px; color:#4a6280; font-style:italic; line-height:1.4; margin-top:1px; }
.ib-zone-row { display:flex !important; align-items:center; gap:6px; margin-top:6px; }
.ib-zone-name { font-size:11px; font-weight:700; line-height:1; }

/* ────────────────────────────────────────────────────────────
   3. CLASSES EXTRAITES DES ATTRIBUTS STYLE= DU HTML
──────────────────────────────────────────────────────────── */

/* Bouton thème */
#btn-theme { min-width: 76px; }

/* Icône lune (cachée par défaut, affichée en dark mode) */
#icon-moon { display: none; }

/* Sélecteur agglomération */
#agglo-select {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  background: var(--bg-2);
  color: var(--txt-0);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
  outline: none;
  -webkit-appearance: auto;
  appearance: auto;
}

/* Bloc population (caché jusqu'au chargement) */
#stat-pop-wrap { margin-top: 7px; display: none; }
#stat-item-wrap { margin-top: 7px; display: none; }
#stat-item-ind  { font-size:18px; font-weight:700; font-family:'DM Sans',sans-serif; margin-top:2px; }

/* Panneau sous-catégories (caché par défaut) */
#subcat-wrap { display: none; }

/* Section sélecteur d'item (cachée par défaut) */
#item-selector-section { display: none; margin-top: 8px; }

/* Label "Item affiché sur la carte" */
.item-sel-lbl {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--txt-2);
  margin-bottom: 4px;
}

/* Div de compatibilité scripts (cachée) */
.hidden-compat { display: none; }

/* Séparateur vertical dans la barre d'onglets */
.bp-tab-sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, .1);
  margin: 0 6px;
  flex-shrink: 0;
}

/* Bouton Fermer du panneau */
.tb-btn-close {
  height: 24px;
  font-size: 11px;
  color: #8aabcc;
}

/* Grille données */
#uag-grid { flex: 1; overflow: hidden; }
#dispositif-grid { flex: 1; overflow: hidden; min-height: 0; width: 100%; }

/* Première carte graphique (plus étroite) */
.chart-card-first { max-width: 380px; }

/* Coordonnées et zoom dans la barre de statut */
#map-coords,
#zoom-display { font-family: 'DM Sans', sans-serif; }

/* Éléments cachés (compat scripts hérités) */
#Barre_Menus  { display: none; position: absolute; }
#calque_Tb    { display: none; }
#Menus_SD     { display: none; }

/* ═══════════════════════════════════════════════════════
   LÉGENDE SOCIO-DÉMO — incrustation carte
═══════════════════════════════════════════════════════ */
#sd-legend {
  display: none;          /* masqué par défaut, affiché par JS */
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 260px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #d8e2ef);
  border-radius: 8px;
  padding: 10px 12px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
  font-family: 'DM Sans', sans-serif;
  pointer-events: none;   /* ne capture pas les clics carte */
}
#sd-legend.visible { display: block; }

/* En-tête légende : icône à gauche + titre */
.sdl-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
.sdl-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;   /* largeur variable, ne compresse pas */
  height: 22px;
  color: #1a3358;      /* forme foncée fixe (cartouche TOUJOURS blanc, même en dark) */
  --ico-ko: #fff;      /* accent découpé = blanc (le fond du cartouche) */
}
.sdl-icon svg {
  height: 22px;
  width: auto;      /* largeur naturelle du SVG */
  display: block;
}
.sdl-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--txt-2, #6b7a99);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Barre dégradé */
.sdl-scale { position: relative; }
.sdl-bar {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(to right,
    #CC000C  0%,
    #EE000E  13%,
    #EE525A  20%,
    #EE9AA1  27%,
    #EEBDC4  38%,
    #F36F33  48%,
    #00CC00  52%,
    #009900  70%,
    #006600  100%
  );
}

/* Graduation (ticks) */
.sdl-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
}
.sdl-ticks span {
  font-size: 9px;
  color: var(--txt-2, #6b7a99);
  line-height: 1;
}

/* Labels bas / milieu / haut */
.sdl-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}
.sdl-lbl {
  font-size: 9px;
  font-weight: 600;
  color: var(--txt-1, #2c3e5a);
}
.sdl-lbl-low  { color: #CC000C; }
.sdl-lbl-mid  { color: #d96820; }
.sdl-lbl-high { color: #009900; }

.uag-loader-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--txt-1, #2a3550);
  margin-bottom: 14px;
}
.uag-loader-bar-track {
  height: 6px;
  background: var(--border, #d0d6e4);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.uag-loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--blue, #1a7de0);
  border-radius: 3px;
  transition: width .12s ease-out;
}
.uag-loader-info {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--txt-2, #7a8aaa);
}

/* ═══════════════════════════════════════════════════════
   MODE RÉSEAU — synthèse sidebar
═══════════════════════════════════════════════════════ */
.reseau-synth { display:flex; flex-direction:column; gap:4px; }
.rs-row {
  display:flex; justify-content:space-between; align-items:baseline;
  padding:4px 8px; background:var(--bg-2); border:1px solid var(--border);
  border-radius:6px;
}
.rs-lbl { font-size:10px; color:var(--txt-2); text-transform:uppercase; letter-spacing:.05em; }
.rs-val { font-size:13px; font-weight:700; font-family:'DM Sans',sans-serif; font-variant-numeric:tabular-nums;
  color:var(--txt-0); white-space:nowrap; text-align:right; }   /* une seule ligne (Stan, 8 sept. 2026 : plus de mono) */
.rs-row .rs-lbl { flex:1 1 auto; min-width:0; }
/* Distribution des faces par distance (fiche réseau) */
.rs-dist { margin-top:8px; padding-top:6px; border-top:1px solid var(--border); }
.rs-dist-wrap { display:flex; align-items:center; gap:10px; margin-top:4px; }
.rs-dist-svg { flex:0 0 auto; }
.rs-dist-tot { font-size:11px; font-weight:700; fill:var(--txt-0); font-family:'DM Sans',sans-serif; }
.rs-dist-legend { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.rs-dist-row { display:flex; align-items:center; gap:5px; font-size:10px; color:var(--txt-1); }
.rs-dist-dot { width:8px; height:8px; border-radius:50%; flex:0 0 auto; }
.rs-dist-lbl { flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rs-dist-n { font-weight:700; color:var(--txt-0); font-variant-numeric:tabular-nums; }
.rs-dist-p { color:var(--txt-2); min-width:30px; text-align:right; font-variant-numeric:tabular-nums; }
.rs-dist-bg { stroke:var(--bg-3); }
.rs-zbar { display:flex; height:7px; border-radius:4px; overflow:hidden; background:var(--bg-3); margin:4px 0 5px; }
.rs-zone-cur .rs-dist-lbl { font-weight:700; color:var(--txt-0); }
#conteneurInfoBulle .rs-zbar { background:#e8ecf2; }
#conteneurInfoBulle .rs-zone-cur .rs-dist-lbl { color:#1a2535; }
.rs-sep { font-size:9px; color:var(--txt-2); text-transform:uppercase; letter-spacing:.08em; margin:8px 0 2px; padding-top:6px; border-top:1px solid var(--border); }
.rs-sub { font-style:normal; font-weight:500; color:var(--txt-2); font-size:11px; }
/* Bloc Couverture dans les bulles (fond blanc, couleurs fixes comme .ib-sy-*) */
#conteneurInfoBulle .ib-sy-bilan { margin-top:4px; }
#conteneurInfoBulle .ib-sy-bilan .ib-sy-sec { margin-top:8px; }
#conteneurInfoBulle .rs-dist { border-top:0; margin-top:6px; padding-top:0; }
#conteneurInfoBulle .rs-lbl { color:#7a93b0; font-size:8.5px; text-transform:uppercase; letter-spacing:.06em; }
#conteneurInfoBulle .rs-dist-row { color:#4a6280; }
#conteneurInfoBulle .rs-dist-n { color:#1a2535; }
#conteneurInfoBulle .rs-dist-p { color:#7a93b0; }
#conteneurInfoBulle .rs-dist-tot { fill:#1a2535; }
#conteneurInfoBulle .rs-dist-bg { stroke:#e8ecf2; }
.reseau-agglo-link {
  display:inline-block; margin-top:8px; font-size:11px; font-weight:600;
  color:var(--blue); text-decoration:none;
}
.reseau-agglo-link:hover { text-decoration:underline; }

/* Liens retour empilés (synthèse nationale + agglomération au N3) */
.reseau-back-link {
  display:block; margin-bottom:6px; font-size:11px; font-weight:600;
  color:var(--blue); text-decoration:none; cursor:pointer;
}
.reseau-back-link:hover { text-decoration:underline; }

/* Sélecteur de navigation (fallback natif) */
.nav-select {
  width:100%; padding:6px 8px; font-size:12px; font-family:'DM Sans',sans-serif;
  border:1px solid var(--border); border-radius:6px; background:var(--bg-2); color:var(--txt-0);
}

/* ═══════════════════════════════════════════════════════
   PERFORMANCES MOBIMÉTRIE (chantiers 3 & 4)
   Section volet latéral + légende dégradé incrustée carte
═══════════════════════════════════════════════════════ */
.perf-target { font-size:11px; color:var(--txt-1); margin-bottom:8px; line-height:1.4; }
.perf-target b { color:var(--txt-0); }

/* Sélecteur de critère */
.perf-crit-grid { display:grid; grid-template-columns:1fr 1fr; gap:4px; margin-bottom:10px; }
.perf-crit-btn {
  display:block; padding:4px 5px; font-family:inherit; font-size:10px; font-weight:600;
  color:var(--txt-1); background:var(--bg-2); border:1.5px solid var(--border);
  border-radius:5px; cursor:pointer; text-align:center; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis; transition:background .15s,border-color .15s,color .15s;
}
.perf-crit-btn:hover { background:var(--bg-3); border-color:var(--border-hi); }
.perf-crit-btn.active { background:var(--blue)18; border-color:var(--blue); color:var(--blue); }

/* Jauges radiales */
.perf-gauges { display:flex; justify-content:space-around; gap:6px; margin-bottom:8px; }
.perf-gauge { text-align:center; }
.perf-gauge svg circle { transition:stroke-dasharray .4s ease; }
.perf-gauge-val { font-family:'DM Sans',sans-serif; font-size:11px; font-weight:700; fill:var(--txt-0); }
.perf-gauge-lbl {
  font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.08em;
  color:var(--txt-2); margin-top:-4px;
}

/* Grands chiffres (réutilise stat-card/stat-val/stat-lbl) */
.perf-big-grid { margin-bottom:4px; }
.perf-big-grid .stat-val { font-size:12px; }

/* Barres local vs national */
.perf-bars { margin-top:2px; }
.pb-row { margin-bottom:7px; }
.pb-lbl {
  display:flex; justify-content:space-between; gap:6px;
  font-size:10px; color:var(--txt-1); margin-bottom:2px;
}
.pb-lbl em { font-style:normal; color:var(--txt-2); }
/* Trois couleurs d'IDENTITÉ pleines et franches (Local orange, Strate violet,
   National bleu) — jamais grisées (retour : « fades, tristes »), et jamais
   une couleur de VALEUR sur l'une des barres (retour : « une seule barre
   porteuse de sens sur les 3 »). Le sens (indice) est porté par la puce. */
.pb-track { position:relative; height:8px; background:var(--bg-3); border-radius:4px; margin-bottom:3px; overflow:hidden; }
.pb-fill { position:absolute; left:0; top:0; bottom:0; border-radius:4px; transition:width .4s ease; }
.pb-loc { background:var(--orange); }
.pb-str { background:var(--purple); }
.pb-nat { background:var(--blue); }
.pb-caption { display:flex; align-items:center; gap:5px; font-size:9px; color:var(--txt-2); margin-top:4px; }
.pb-dot { width:7px; height:7px; border-radius:50%; display:inline-block; }
.pb-dot-loc { background:var(--orange); }
.pb-dot-str { background:var(--purple); margin-left:8px; }
.pb-dot-nat { background:var(--blue); margin-left:8px; }

/* Puce « hors périmètre de la campagne » (pan lointain au N2/N3) */
#uag-lost-chip {
  display:none; position:absolute; top:14px; left:50%; transform:translateX(-50%);
  z-index:60; align-items:center; gap:8px; padding:7px 14px;
  background:var(--bg-1); border:1px solid var(--border); border-radius:9px;
  box-shadow:0 4px 16px rgba(0,0,0,.18); font-family:'DM Sans',sans-serif;
  font-size:12px; white-space:nowrap;
}
#uag-lost-chip.visible { display:flex; }
#uag-lost-chip .ulc-txt { color:var(--txt-2); }
#uag-lost-chip .ulc-sep { color:var(--border-hi); }
#uag-lost-chip a { color:var(--blue); font-weight:600; text-decoration:none; }
#uag-lost-chip a:hover { text-decoration:underline; }

/* Curseur de maille (mode « toutes les faces ») */
#uag-faces-mesh {
  display:none; position:absolute; top:14px; left:50%; transform:translateX(-50%);
  z-index:60; align-items:center; gap:10px; padding:7px 14px;
  background:var(--bg-1); border:1px solid var(--border); border-radius:9px;
  box-shadow:0 4px 16px rgba(0,0,0,.18); font-family:'DM Sans',sans-serif;
  font-size:12px; white-space:nowrap;
}
#uag-faces-mesh.visible { display:flex; }
#uag-faces-mesh .ufm-lbl { color:var(--txt-2); font-weight:600; }
#uag-faces-mesh input[type=range] { width:130px; accent-color:var(--blue); cursor:pointer; }
#uag-faces-mesh .ufm-val { color:var(--txt-0); font-variant-numeric:tabular-nums; min-width:52px; }
#uag-faces-mesh .ufm-hint { color:var(--txt-2); }

/* Classement agglos (niveau national) */
.perf-rank-title {
  font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.12em;
  color:var(--txt-2); margin:10px 0 6px;
}
.pr-row { display:flex; align-items:center; gap:6px; margin-bottom:4px; font-size:10px; }
.pr-row.pr-click { cursor:pointer; }
.pr-row.pr-click:hover .pr-nom { color:var(--blue); text-decoration:underline; }
.pr-nom { flex:0 0 84px; color:var(--txt-0); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pr-track { flex:1; height:7px; background:var(--bg-3); border-radius:4px; overflow:hidden; position:relative; }
.pr-fill { height:100%; border-radius:4px; }
.pr-val { flex:0 0 auto; min-width:46px; text-align:right; font-family:'DM Sans',sans-serif; color:var(--txt-1); }
/* Classement DIVERGENT (critères pondérés) : barre depuis l'axe 100, indice en gras + valeur brute */
.pr-div .pr-fill { position:absolute; top:0; bottom:0; border-radius:2px; }
.pr-div::before { content:''; position:absolute; left:50%; top:0; bottom:0; width:1px; background:var(--txt-2); opacity:.7; z-index:1; }
.pr-val b { color:var(--txt-0); }
.pr-val small { display:block; font-size:8px; color:var(--txt-2); line-height:1.1; font-weight:400; }
.pr-more { margin:2px 0 6px; text-align:center; }
/* Équilibre de la campagne (part des faces sous / équilibre / sur) */
.perf-balance { display:flex; height:10px; border-radius:4px; overflow:hidden; background:var(--bg-3); }
.pfb-seg { height:100%; }
/* Contrôles Mobimétrie : base 100 de l'indice, contenu des pastilles */
.perf-ctl-row { display:flex; align-items:center; gap:6px; margin:-4px 0 8px; }
.perf-ctl-lbl { font-size:10px; color:var(--txt-2); flex:0 0 auto; }
.perf-seg button { font-size:10px; padding:3px 7px; }
.perf-select { flex:1; min-width:0; padding:3px 6px; font-size:11px; font-family:inherit; border:1px solid var(--border); border-radius:5px; background:var(--bg-2); color:var(--txt-0); }

.perf-note { font-size:10px; color:var(--orange); margin-bottom:8px; line-height:1.4; }

/* Bloc « Apports extérieurs » (volet Mobimétrie) : titre + compteur, segmenté pleine largeur */
.perf-ext-block { margin:6px 0 2px; }
.perf-ext-block .perf-ctl-lbl { display:block; margin-bottom:3px; }
.perf-ext-block .perf-ctl-sub { color:var(--txt-2); font-weight:400; }
.perf-ext-block #perf-ext-count { color:var(--txt-1); }
.perf-ext-block .uag-seg { display:flex; margin-left:0; }
.perf-ext-block .uag-seg button { flex:1; padding:3px 4px; white-space:nowrap; }

/* Légende carte — dégradé du critère courant (pastilles N1) */
#perf-legend {
  display:none; position:absolute; left:12px; bottom:24px; z-index:10; width:240px;
  background:var(--bg-1); border:1px solid var(--border); border-radius:8px;
  padding:10px 12px; box-shadow:0 2px 8px rgba(0,0,0,.14);
  font-family:'DM Sans',sans-serif; pointer-events:none;
  transition:background-color .3s,border-color .3s;
}
#perf-legend.visible { display:block; }
.pfl-title {
  font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em;
  color:var(--txt-2); margin-bottom:6px; line-height:1.3;   /* 2 lignes possibles : « Contacts (ODV) · indice GRP vs national » */
}
/* Volumes : 5 classes (quintiles, = PERF_SEQ_COLS du moteur) — pavés via .pfl-bands, bornes via .pfl-cls */
.pfl-cls { display:flex; font-size:8px; color:var(--txt-1); margin-top:3px; }
.pfl-cls span { flex:1; text-align:center; white-space:nowrap; }
/* Critères pondérés : 9 bandes divergentes autour de 100 (= PERF_BANDS) */
.pfl-bands { display:flex; height:10px; border-radius:4px; overflow:hidden; }
.pfl-bands span { flex:1; }
.pfl-ticks { display:flex; justify-content:space-between; font-size:9px; color:var(--txt-1); margin-top:3px; }
.pfl-words { display:flex; justify-content:space-between; font-size:8px; color:var(--txt-2); margin-top:1px; text-transform:uppercase; letter-spacing:.05em; }

/* ═══════════════════════════════════════════════════════════════
   #dispositif-grid — RESTAURATION de l'aspect dx.light.compact
   d'origine (pages 4D) : les overrides sombres/DM Sans ci-dessus
   ne s'appliquent pas aux listbox du dispositif d'affichage.
═══════════════════════════════════════════════════════════════ */
#dispositif-grid .dx-datagrid,
#dispositif-grid .dx-datagrid .dx-row td,
#dispositif-grid .dx-datagrid .dx-header-row td,
#dispositif-grid .dx-datagrid .dx-group-row td,
#dispositif-grid .dx-datagrid .dx-total-footer td,
#dispositif-grid .dx-datagrid .dx-filter-row td,
#dispositif-grid .dx-datagrid-search-panel input,
#dispositif-grid .dx-datagrid .dx-texteditor-input {
  font-family: "Helvetica Neue","Segoe UI",Helvetica,Verdana,sans-serif !important;
  font-size: 12px !important;
}
#dispositif-grid .dx-datagrid { background-color:#fff !important; color:#333 !important; }
#dispositif-grid .dx-datagrid-content { background:#fff !important; }
#dispositif-grid .dx-datagrid-headers { background:#fff !important; border-color:#ddd !important; }
#dispositif-grid .dx-datagrid-headers td,
#dispositif-grid .dx-datagrid-headers .dx-datagrid-table .dx-row > td {
  background:#fff !important; color:#959595 !important;
  font-weight:400 !important; text-transform:none !important; letter-spacing:normal !important;
}
#dispositif-grid .dx-datagrid-rowsview .dx-data-row > td,
#dispositif-grid .dx-datagrid-rowsview .dx-row:not(.dx-row-alt):not(.dx-freespace-row) > td {
  background:#fff !important; color:#333 !important; border-color:#e0e0e0 !important;
}
#dispositif-grid .dx-datagrid-rowsview .dx-row-alt > td,
#dispositif-grid .dx-datagrid-rowsview .dx-row-alt.dx-data-row > td {
  background:#f5f5f5 !important; color:#333 !important;
}
#dispositif-grid .dx-datagrid-rowsview .dx-row:hover > td,
#dispositif-grid .dx-datagrid-rowsview .dx-data-row:hover > td {
  background:#ebebeb !important;
}
#dispositif-grid .dx-datagrid-rowsview .dx-group-row > td {
  background:#fff !important; color:#333 !important; font-weight:600;
}
#dispositif-grid .dx-datagrid-total-footer > .dx-datagrid-content td {
  background:#fff !important; color:#333 !important; font-weight:600;
}
#dispositif-grid .dx-datagrid a, #dispositif-grid .dx-datagrid a:visited {
  color:#337ab7 !important; text-decoration:none;
}
#dispositif-grid .dx-datagrid a:hover { text-decoration:underline; }
/* Thème sombre : la listbox dispositif suit désormais le thème (variables) */
:root[data-theme="dark"] #dispositif-grid .dx-datagrid { background-color:var(--bg-1) !important; color:var(--txt-0) !important; }
:root[data-theme="dark"] #dispositif-grid .dx-datagrid-content { background:var(--bg-1) !important; }
:root[data-theme="dark"] #dispositif-grid .dx-datagrid-headers { background:var(--bg-2) !important; border-color:var(--border) !important; }
:root[data-theme="dark"] #dispositif-grid .dx-datagrid-headers td,
:root[data-theme="dark"] #dispositif-grid .dx-datagrid-headers .dx-datagrid-table .dx-row > td { background:var(--bg-2) !important; color:var(--txt-2) !important; }
:root[data-theme="dark"] #dispositif-grid .dx-datagrid-rowsview .dx-data-row > td,
:root[data-theme="dark"] #dispositif-grid .dx-datagrid-rowsview .dx-row:not(.dx-row-alt):not(.dx-freespace-row) > td { background:var(--bg-1) !important; color:var(--txt-0) !important; border-color:var(--border) !important; }
:root[data-theme="dark"] #dispositif-grid .dx-datagrid-rowsview .dx-row-alt > td,
:root[data-theme="dark"] #dispositif-grid .dx-datagrid-rowsview .dx-row-alt.dx-data-row > td { background:var(--bg-2) !important; color:var(--txt-0) !important; }
:root[data-theme="dark"] #dispositif-grid .dx-datagrid-rowsview .dx-row:hover > td,
:root[data-theme="dark"] #dispositif-grid .dx-datagrid-rowsview .dx-data-row:hover > td { background:var(--bg-3) !important; }
:root[data-theme="dark"] #dispositif-grid .dx-datagrid-rowsview .dx-group-row > td { background:var(--bg-2) !important; color:var(--txt-0) !important; }
:root[data-theme="dark"] #dispositif-grid .dx-datagrid-total-footer > .dx-datagrid-content td { background:var(--bg-2) !important; color:var(--txt-0) !important; }
:root[data-theme="dark"] #dispositif-grid .dx-datagrid a, :root[data-theme="dark"] #dispositif-grid .dx-datagrid a:visited { color:var(--blue) !important; }
:root[data-theme="dark"] #dispositif-grid .dx-datagrid-search-panel input,
:root[data-theme="dark"] #dispositif-grid .dx-datagrid .dx-texteditor-input { color:var(--txt-0) !important; }
:root[data-theme="dark"] #dispositif-grid .dx-texteditor.dx-editor-outlined { background:var(--bg-2) !important; border-color:var(--border) !important; }

/* Ventilation en barre empilée dans les grilles (colonne UAG_GRID t:'bar') */
.uag-vbar-wrap { display:flex; align-items:center; gap:6px; min-width:96px; }
.uag-vbar { flex:1; display:flex; height:10px; border-radius:3px; overflow:hidden; background:var(--bg-3, #e6e8ec); }
.uag-vbar i { display:block; height:100%; }
.uag-vbar-wrap b { font-weight:500; font-size:11px; min-width:2.4em; text-align:right; color:var(--txt-1, inherit); }
.uag-vbar-legend { display:flex; flex-wrap:wrap; gap:2px 8px; margin-top:3px; font-size:10px; font-weight:400; color:var(--txt-2, #666); }
.uag-vbar-legend i { display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:3px; vertical-align:middle; }
.uag-vbar-wrap { cursor:default; }
.uag-vbar-tip { position:fixed; z-index:100000; pointer-events:none; opacity:0; transition:opacity .12s;
  background:var(--bg-1, #fff); color:var(--txt-0, #222); border:1px solid var(--border, #cfd3da); border-radius:6px;
  box-shadow:0 4px 14px rgba(0,0,0,.18); padding:6px 8px; font-size:11px; line-height:1.5; min-width:150px; }
.uag-vbar-tip.on { opacity:1; }
.uag-vbar-tip .row { display:grid; grid-template-columns:10px 1fr auto auto; gap:0 8px; align-items:center; white-space:nowrap; }
.uag-vbar-tip .row i { width:8px; height:8px; border-radius:2px; }
.uag-vbar-tip .row b { font-weight:600; text-align:right; }
.uag-vbar-tip .row em { font-style:normal; color:var(--txt-2, #777); text-align:right; min-width:3.5em; }
.uag-vbar-tip .row.total { border-top:1px solid var(--border, #e2e5ea); margin-top:3px; padding-top:3px; }

/* Cartouche : liste des points de vente d'un élément (couverture) */
.rs-pv-list { margin-top:4px; border-top:1px dashed var(--border, #e2e5ea); padding-top:4px; }
.rs-pv-row .rs-lbl { font-size:11px; }

.uag-zpin { display:inline-block; vertical-align:middle; line-height:0; }
