/* Angor Intelligence – interface */
:root {
  --bg: #F4F6F8; --surface: #FFFFFF; --surface-2: #F0F3F6; --ink: #111B27; --ink-2: #3E4C5B;
  --muted: #6B7886; --line: #E1E6EB; --line-2: #CFD6DD;
  --accent: #1F5FD1; --accent-soft: #E6EEFC; --navy: #13263D;
  --sev1: #3F86C6; --sev2: #E0A21B; --sev3: #E0622B; --sev4: #B0182E;
  --risk1: #5FA37C; --risk2: #B3C75A; --risk3: #F0BE4A; --risk4: #EA8639; --risk5: #C73E4D; --risk0: #C9D1D9;
  --sea: #DCE4EA; --land: #F7F8F6; --land-line: #C9D1D9;
  --shadow: 0 1px 2px rgba(17,27,39,.06), 0 8px 24px rgba(17,27,39,.08);
  --radius: 10px;
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0D141C; --surface: #141D27; --surface-2: #1A2531; --ink: #E7EDF3; --ink-2: #B7C3CF;
  --muted: #8494A4; --line: #233140; --line-2: #2E3E4F;
  --accent: #6A9BF4; --accent-soft: #1B2B45; --navy: #E7EDF3;
  --risk0: #33414F; --risk1: #2FD08F; --risk2: #B8E04A; --risk3: #FFC93C; --risk4: #FF8C42; --risk5: #FF4D6A;
  --sea: #0B1828; --land: #1A2536; --land-line: #2E3E52;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app { display: grid; grid-template-columns: 372px 1fr; grid-template-rows: 56px 1fr; height: 100vh; height: 100dvh; }

/* ---------- barre du haut ---------- */
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 14px;
  background: var(--surface); border-bottom: 1px solid var(--line); z-index: 1100; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--navy);
  display: grid; place-items: center; }
.brand-mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px var(--navy), 0 0 0 5px var(--bg); }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.search { position: relative; flex: 1; max-width: 460px; }
.search input { width: 100%; height: 36px; border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 8px; padding: 0 12px 0 34px; color: var(--ink); font: inherit; }
.search input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.search-ico { position: absolute; left: 10px; top: 9px; width: 18px; height: 18px; color: var(--muted); }
.search-results { position: absolute; top: 42px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); max-height: 60vh; overflow: auto; padding: 6px; }
.search-results button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 8px 10px;
  border: 0; background: none; border-radius: 6px; }
.search-results button:hover, .search-results button.active { background: var(--surface-2); }
.search-results .kind { font-size: 11px; color: var(--muted); margin-left: auto; text-transform: uppercase; letter-spacing: .04em; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: none; padding: 5px 11px; white-space: nowrap; border-radius: 6px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.top-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn { width: 34px; height: 34px; border: 1px solid transparent; background: none; border-radius: 8px;
  display: inline-grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.text { font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.icon-btn svg { width: 18px; height: 18px; }
.health { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--line);
  background: var(--surface); border-radius: 999px; font-size: 12px; color: var(--ink-2); }
.health .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--risk1); }
.health.warn .dot { background: var(--sev2); }
.health.bad .dot { background: var(--sev4); }
.only-mobile { display: none; }

/* ---------- panneau gauche ---------- */
.panel { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; z-index: 1000; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); padding: 0 8px; }
.tabs button { border: 0; background: none; padding: 12px 2px 10px; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px;
  background: var(--sev4); color: #fff; font-size: 11px; line-height: 18px; }
.tab-body { flex: 1; overflow-y: auto; padding: 14px 14px 24px; display: flex; flex-direction: column; gap: 12px; }
.tab-body > * { flex-shrink: 0; }
.hint { margin: 0; color: var(--muted); font-size: 12.5px; }

.sev-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sev-tile { border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px 7px; background: var(--surface); text-align: left; }
.sev-tile .n { font: 600 20px/1 var(--font); font-variant-numeric: tabular-nums; }
.sev-tile .l { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.sev-tile .l i { width: 8px; height: 8px; border-radius: 50%; }
.sev-tile[aria-pressed="false"] { opacity: .45; }

.filters { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; }
.filters summary { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; cursor: pointer;
  font-weight: 600; font-size: 13px; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filter-count { font-weight: 500; color: var(--muted); font-size: 12px; }
.filter-groups { display: grid; gap: 10px; padding-bottom: 10px; }
.fgroup-title { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.fgroup-title button { border: 0; background: none; color: var(--accent); font-size: 11.5px; text-transform: none; letter-spacing: 0; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-2); background: var(--surface);
  border-radius: 999px; padding: 3px 9px 3px 6px; font-size: 12.5px; color: var(--ink-2); }
.chip svg { width: 14px; height: 14px; }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.chip .c { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.switch { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; cursor: pointer; }
.switch input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.filters .switch:last-child { padding-bottom: 12px; }

.list-head { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.list-head select { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 6px; padding: 3px 6px; font: inherit; font-size: 12.5px; }

.alert-list, .country-list, .news-list, .site-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.alert { display: grid; grid-template-columns: 4px 32px 1fr; gap: 0 10px; align-items: start; padding: 10px 10px 10px 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; overflow: hidden; }
.alert:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.alert.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.alert .stripe { align-self: stretch; margin: -10px 0; }
.alert .ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.alert .ico svg { width: 17px; height: 17px; }
.alert .t { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.alert .m { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.alert .m .near { color: var(--sev3); font-weight: 600; }
.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; font-size: 11px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.tag.auto { border-style: dashed; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11.5px;
  font-weight: 600; color: #fff; white-space: nowrap; }
.empty { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 13px; }
.more { border: 1px dashed var(--line-2); background: none; border-radius: 8px; padding: 8px; color: var(--ink-2); font-size: 12.5px; }

.country-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--surface); }
.country-row:hover { border-color: var(--line-2); }
.country-row .lvl { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; }
.country-row .n { font-weight: 600; font-size: 13.5px; }
.country-row .s { font-size: 12px; color: var(--muted); }
.field { width: 100%; height: 34px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 8px; padding: 0 10px; font: inherit; }
.news-item a { display: block; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); }
.news-item a:hover { border-color: var(--line-2); }
.news-item .t { font-weight: 500; font-size: 13.5px; line-height: 1.35; }
.news-item .m { font-size: 12px; color: var(--muted); margin-top: 3px; }

.site-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--surface); font-size: 13px; font-weight: 500; }
.btn svg { width: 15px; height: 15px; }
a.btn { text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: var(--surface); }
.btn:hover { filter: brightness(.97); }
.site-form { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); }
.site-form label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; }
.site-row { padding: 10px; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 4px; cursor: pointer; }
.site-row .h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.site-row .n { font-weight: 600; font-size: 13.5px; }
.site-row .s { font-size: 12px; color: var(--muted); }
.site-row .del { border: 0; background: none; color: var(--muted); padding: 2px; }
.site-row .del svg { width: 15px; height: 15px; }
.site-row .hits { font-size: 12px; font-weight: 600; }

/* ---------- carte ---------- */
.map-wrap { position: relative; min-width: 0; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--sea); }
:root[data-theme="dark"] #map { background: #1A2536; }  /* = terres du fond « Angor Night » : pas de trou noir au déplacement */
#map.osm-light .leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.06); }
#map.osm-dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) grayscale(1) brightness(.78) contrast(.95); }
.leaflet-gl-layer { z-index: 1; }
.leaflet-container { font: inherit; }
.map-card { position: absolute; z-index: 800; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px 12px; }
.layers { top: 12px; right: 12px; min-width: 190px; }
.card-title { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.legend { left: 12px; bottom: 26px; display: grid; gap: 8px; font-size: 12px; }
.legend .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.legend .k { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.legend .sw { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.legend .sq { width: 14px; height: 10px; border-radius: 2px; }
.legend-note { color: var(--muted); font-size: 11px; }

.leaflet-control-attribution { font-size: 10.5px; background: color-mix(in srgb, var(--surface) 85%, transparent) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--ink-2); }
.leaflet-control-zoom { border: 1px solid var(--line) !important; box-shadow: var(--shadow) !important; border-radius: 8px !important; overflow: hidden; }
.leaflet-control-zoom a { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; }

.mk { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); transition: transform .12s; }
.mk svg { width: 13px; height: 13px; }
.mk.s4 { width: 32px; height: 32px; }
.mk.s4 svg { width: 16px; height: 16px; }
.mk.s4::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--sev4); opacity: .6;
  animation: pulse 2.4s ease-out infinite; }
.mk.auto { border-style: dashed; }
.mk.sel { transform: scale(1.25); box-shadow: 0 0 0 3px var(--accent), 0 1px 4px rgba(0,0,0,.35); }
@keyframes pulse { from { transform: scale(.7); opacity: .7; } to { transform: scale(1.5); opacity: 0; } }
.cl { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700;
  font-size: 12.5px; border: 3px solid rgba(255,255,255,.85); box-shadow: 0 1px 5px rgba(0,0,0,.3); font-variant-numeric: tabular-nums; }
.site-mk { width: 22px; height: 22px; border-radius: 6px; background: var(--navy); color: var(--surface); display: grid; place-items: center;
  border: 2px solid var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.site-mk svg { width: 12px; height: 12px; }
.leaflet-tooltip.vs-tip { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-radius: 8px; padding: 8px 11px; font: 13px/1.4 var(--font); width: max-content; min-width: 220px; max-width: 360px; white-space: normal; }
.leaflet-tooltip.vs-tip::before { display: none; }
.picking #map { cursor: crosshair; }
.picking .leaflet-interactive { cursor: crosshair; }

/* ---------- fiche détail ---------- */
.drawer { position: absolute; z-index: 900; top: 12px; right: 12px; bottom: 12px; width: 380px; max-width: calc(100% - 24px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow-y: auto; }
.drawer-close { position: absolute; top: 10px; right: 10px; }
.d-head { padding: 18px 18px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.d-kicker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding-right: 36px; }
.d-title { margin: 0; font-size: 18px; line-height: 1.25; letter-spacing: -.01em; text-wrap: balance; }
.d-sec { padding: 14px 18px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.d-sec:last-child { border-bottom: 0; }
.d-sec h3 { margin: 0; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.kv { display: grid; grid-template-columns: 118px 1fr; gap: 6px 10px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.mono { font-family: var(--mono); font-size: 12px; }
.src-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.src-list a { word-break: break-word; }
.notice { font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 8px; padding: 8px 10px; }
.risk-big { display: flex; align-items: center; gap: 12px; }
.risk-big .lvl { width: 46px; height: 46px; border-radius: 10px; color: #fff; display: grid; place-items: center; font: 700 22px/1 var(--font); }
.risk-big .name { font-weight: 700; font-size: 16px; }
.risk-big .desc { font-size: 12.5px; color: var(--muted); }
.bar { display: grid; grid-template-columns: 130px 1fr 38px; gap: 8px; align-items: center; font-size: 12.5px; }
.bar .track { display: block; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--ink-2); border-radius: 3px; }
.bar .v { text-align: right; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mini-list li { display: flex; gap: 8px; align-items: baseline; font-size: 13px; cursor: pointer; }
.mini-list li:hover .t { text-decoration: underline; }
.mini-list .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; transform: translateY(-1px); }
.mini-list .w { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }

.toast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 950; background: var(--navy); color: var(--surface);
  padding: 8px 14px; border-radius: 8px; font-size: 13px; box-shadow: var(--shadow); }
.empty-state { position: absolute; inset: 0; z-index: 960; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 88%, transparent); }
.empty-state .box { max-width: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: var(--shadow); }
.empty-state h2 { margin: 0 0 8px; font-size: 18px; }
.empty-state code { font-family: var(--mono); background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .only-mobile { display: inline-grid; }
  .brand { min-width: 0; }
  .brand-name { display: none; }
  .topbar { gap: 8px; padding: 0 8px; }
  .seg button { padding: 4px 6px; font-size: 12px; }
  .health { padding: 0 8px; }
  .health .lbl, .health .src-word { display: none; }
  #btn-theme { display: none; }
  .panel { position: fixed; top: 56px; left: 0; bottom: 0; width: min(92vw, 380px); transform: translateX(-102%);
    transition: transform .2s ease; box-shadow: var(--shadow); }
  .app.panel-open .panel { transform: none; }
  .layers { top: 10px; right: 10px; min-width: 0; padding: 8px 10px; }
  .layers .card-title { display: none; }
  .legend { display: none; }
  .drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 70%; }
}
@media (max-width: 520px) {
  .search { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mk.s4::before { animation: none; } .panel { transition: none; } }

/* ---------- ajouts v0.2 ---------- */
.btn.ghost { border-color: var(--line); background: var(--surface); height: 32px; }
.btn.ghost.on { background: var(--navy); color: var(--surface); border-color: var(--navy); }
.btn.small { height: 26px; padding: 0 8px; font-size: 12px; }
.list-actions { display: inline-flex; gap: 6px; align-items: center; }
.alert .d { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.alert .m.src { margin-top: 5px; }
.alert .m.src .tag { gap: 4px; }
.d-sum { display: grid; gap: 4px; }
.d-desc { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.d-sum-kind { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.d-source { display: flex; gap: 7px; align-items: center; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 7px 10px; }
.d-head .btn.primary { justify-self: start; text-decoration: none; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; }
.stat .n { font: 600 18px/1 var(--font); font-variant-numeric: tabular-nums; }
.stat .l { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.news-item .m .ctx { display: inline-block; margin-left: 4px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 11px; line-height: 16px; color: var(--muted); }
.news-item .m .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.basemap-row { display: grid; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.basemap-row select { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 12.5px; }

.analytics { position: absolute; inset: 12px; z-index: 910; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); overflow-y: auto; padding: 18px 20px 24px; display: grid; gap: 16px; align-content: start; }
.a-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.a-head h2 { margin: 0 0 2px; font-size: 18px; letter-spacing: -.01em; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.kpi .n { font: 700 24px/1 var(--font); font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12px; color: var(--muted); margin-top: 6px; }
.a-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.a-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.a-card.wide { grid-column: 1 / -1; }
.a-card h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.cv { position: relative; height: 240px; }
.cv.short { height: 200px; }

.print-area { display: none; }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body.printing .app { display: none !important; }
  body.printing .print-area { display: block; color: #111; background: #fff; font: 10.5px/1.4 var(--font); }
  .p-head { margin-bottom: 10px; }
  .p-brand { font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #13263D; }
  .p-head h1 { margin: 2px 0 4px; font-size: 18px; }
  .p-meta { color: #555; }
  .p-table { width: 100%; border-collapse: collapse; }
  .p-table th { text-align: left; border-bottom: 1.5px solid #13263D; padding: 5px 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
  .p-table td { border-bottom: 1px solid #ddd; padding: 5px 6px; vertical-align: top; }
  .p-table tr { break-inside: avoid; }
  .p-sev { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
  .p-url { color: #666; font-size: 9px; }
}
@media (max-width: 860px) {
  #btn-analytics span { display: none; }
  .analytics { inset: 6px; padding: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- v0.3 : barre verticale, périodes, en cours, filtres analytiques ---------- */
.app { grid-template-columns: 430px 1fr; }
.panel { display: grid; grid-template-columns: 72px 1fr; grid-template-rows: minmax(0, 1fr); }
.tabs { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 4px; padding: 10px 6px; border-bottom: 0; border-right: 1px solid var(--line); overflow-y: auto; }
.tabs button { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 2px 8px; border: 0; border-radius: 10px; font-size: 11px; font-weight: 600; color: var(--muted); white-space: normal; text-align: center; line-height: 1.15; }
.tabs button:hover { background: var(--surface-2); color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--ink); border-bottom: 0; }
.tabs button svg { width: 20px; height: 20px; }
.tabs .badge { position: absolute; top: 2px; right: 2px; margin: 0; min-width: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }
.tab-body { grid-column: 2; grid-row: 1; min-height: 0; }
.period { position: relative; }
/* période : menu déroulant */
.period-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px 0 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; transition: border-color .15s, background .15s; }
.period-btn:hover, .period-btn[aria-expanded="true"] { border-color: var(--line-2); background: var(--surface); }
.period-btn svg { color: var(--muted); flex: none; }
.period-btn svg:last-child { transition: transform .15s; }
.period-btn[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
.period-btn .pb-s { display: none; }
.period-menu { position: absolute; top: 42px; left: 0; z-index: 1200; min-width: 230px; padding: 5px; display: grid; gap: 1px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); }
.period-menu button { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 0; background: none; text-align: left;
  padding: 7px 10px; border-radius: 7px; font-size: 13px; color: var(--ink-2); }
.period-menu button:hover, .period-menu button:focus-visible { background: var(--surface-2); color: var(--ink); outline: none; }
.period-menu button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.period-menu .pm-short { font: 500 11px var(--mono); color: var(--muted); }
.period-menu #btn-range { justify-content: flex-start; gap: 8px; }
.period-menu #btn-range svg { color: var(--muted); }
.pm-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.range-pop { position: absolute; top: 42px; left: 0; z-index: 1200; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 12px; display: grid; gap: 8px; width: 280px; }
.range-pop label { display: grid; grid-template-columns: 30px 1fr 36px; gap: 6px; align-items: center; font-size: 12.5px; }
.range-pop .pick { width: 36px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); padding: 0 4px; }
.crisis-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.crisis { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: grid; gap: 8px; }
.c-head { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; cursor: pointer; }
.c-head .lvl { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 700; }
.c-head .n { font-weight: 700; }
.c-head .s { font-size: 12px; color: var(--muted); }
.a-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.a-filters label:not(.switch) { display: grid; gap: 3px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.a-filters select { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 13px; font-weight: 400; min-width: 150px; max-width: 240px; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .panel { width: min(96vw, 430px); }
}
.crisis-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; vertical-align: 2px; color: #fff; }
.crisis-tag.major { background: var(--sev4); } .crisis-tag.crisis { background: var(--sev3); } .crisis-tag.alert { background: var(--muted); }

/* Avis des ministères : carte officielle en vignette */
.mini-list li.adv > span:nth-child(2) { display: grid; gap: 6px; }
.adv-map { display: block; margin-top: 4px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; max-width: 240px; background: var(--surface-2, #f3f4f6); }
.adv-map img { display: block; width: 100%; height: auto; max-height: 170px; object-fit: contain; }

/* Drapeaux et couverture des sources */
.flag { width: 20px; height: auto; margin-right: 7px; vertical-align: -2px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.d-title .flag { width: 26px; vertical-align: -3px; margin-right: 9px; }
.cov-low { display: inline-block; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--sev3) 18%, transparent); color: var(--sev3); vertical-align: 1px; }

/* Légende repliable */
.legend-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; border: 0; background: none; padding: 0; font: inherit;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.legend-toggle:hover { color: var(--ink); }
.legend-toggle .chev { display: inline-flex; transition: transform .15s; }
.legend.collapsed { padding: 8px 12px; }
.legend.collapsed .legend-toggle .chev { transform: rotate(180deg); }

/* My travel buddy */
.tab-body.buddy { gap: 10px; }
.buddy-head { display: flex; align-items: center; justify-content: space-between; }
.buddy-head h3 { margin: 0; font-size: 15px; }
.buddy-log { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 220px; overflow-y: auto; }
.bmsg { padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; max-width: 100%; overflow-wrap: anywhere; }
.bmsg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; max-width: 88%; }
.bmsg.bot { background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 4px; }
.bmsg.bot h4 { margin: 2px 0 6px; font-size: 13.5px; display: flex; align-items: center; }
.bmsg.bot p { margin: 6px 0; }
.bmsg.bot ul { margin: 4px 0 8px; padding-left: 18px; }
.bmsg.bot li { margin: 2px 0; }
.bmsg.bot blockquote { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--accent); font-size: 12.5px; color: var(--ink-2); }
.bmsg.bot hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.bmsg .muted, .bmode { color: var(--muted); font-size: 11.5px; }
.bmode { margin-top: 6px; }
.bmsg.typing { color: var(--muted); font-style: italic; }
.buddy-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.buddy-suggest .chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.buddy-suggest .chip:hover { border-color: var(--accent); color: var(--ink); }
.buddy-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.buddy-form textarea { resize: vertical; min-height: 44px; font: inherit; font-size: 13px; }

/* ---------- v0.8 : Pulse, cotation, vérification, suivis, partage, mode analyste ---------- */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.pulse-chip { display: inline-flex; align-items: center; gap: 4px; font: 600 12px/1 var(--mono, var(--font)); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pulse-chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pulse-chip .tr { font-size: 10.5px; font-weight: 700; }
.pulse-chip .tr.down { color: var(--sev4); } .pulse-chip .tr.up { color: var(--risk1); }
.country-row .s > div { margin-top: 2px; text-align: right; }
.pulse-big { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.pulse-big .pv { width: 46px; height: 46px; border-radius: 50%; color: #fff; display: grid; place-items: center; font: 700 17px/1 var(--font); }
.pulse-big .name { font-weight: 700; } .pulse-big .desc { font-size: 12.5px; color: var(--muted); }
.spark { display: block; margin: 4px 0 8px; background: var(--surface-2); border-radius: 6px; }
ul.plain { margin: 4px 0 8px; padding-left: 18px; font-size: 12.5px; }
.adm { display: inline-grid; place-items: center; min-width: 24px; height: 18px; padding: 0 4px; border-radius: 4px; font: 700 10.5px/1 var(--mono, monospace);
  color: #fff; background: #5E6B78; letter-spacing: .02em; cursor: help; }
.adm.big { height: 22px; min-width: 30px; font-size: 12px; }
.adm-a { background: #1E7F4F; } .adm-b { background: #2F6FB3; } .adm-c { background: #7A6A2E; } .adm-d { background: #9A6A1F; } .adm-e { background: #A33A3A; } .adm-f { background: #5E6B78; }
.tag.verified { border-color: #1E7F4F; color: #1E7F4F; font-weight: 600; gap: 3px; }
.tag.verified svg { width: 11px; height: 11px; }
.verified-notice { border: 1px solid #1E7F4F !important; background: color-mix(in srgb, #1E7F4F 9%, var(--surface)); display: block; }
.verified-notice svg { width: 15px; height: 15px; vertical-align: -3px; color: #1E7F4F; }
.alert.is-false { opacity: .45; } .alert.is-false .t { text-decoration: line-through; }
.star-btn { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 4px; margin-left: 6px; vertical-align: middle; }
.star-btn svg { width: 18px; height: 18px; }
.star-btn.on { color: #E3A008; } .star-btn.on svg { fill: currentColor; }
.star-mini { color: #E3A008; margin-left: 4px; } .star-mini svg { width: 11px; height: 11px; fill: currentColor; vertical-align: -1px; }
.country-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.country-tools select { height: 28px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; }
.country-tools .chip svg { width: 13px; height: 13px; }
.views-wrap { position: relative; }
.views-pop { position: absolute; right: 0; top: 38px; z-index: 1200; width: 300px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 12px; display: grid; gap: 8px; }
.views-pop[hidden] { display: none; }
.view-form { display: grid; gap: 6px; }
.views-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.views-list li { display: flex; align-items: center; gap: 4px; }
.views-list a { flex: 1; font-size: 13px; text-decoration: none; padding: 4px 6px; border-radius: 6px; }
.views-list a:hover { background: var(--surface-2); }
.icon-btn.small { width: 26px; height: 26px; }
.icon-btn.small svg { width: 13px; height: 13px; }
.btn.danger { color: var(--sev4); border-color: color-mix(in srgb, var(--sev4) 45%, var(--line-2)); }
.analyst-panel { border: 1px solid var(--accent); border-radius: 10px; background: var(--accent-soft); padding: 10px 12px; margin: 8px 0; display: grid; gap: 8px; }
.analyst-panel h3 { margin: 0; }
.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .an-grid label { display: grid; gap: 2px; font-size: 11.5px; color: var(--muted); }
.an-st { padding: 1px 6px; border-radius: 4px; color: #fff; font-size: 11px; }
.an-verified { background: #1E7F4F; } .an-corrected { background: #2F6FB3; } .an-false { background: var(--sev4); }
.analyst-bar { position: absolute; left: 12px; top: 12px; z-index: 900; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--accent); border-radius: 999px; padding: 5px 6px 5px 12px; box-shadow: 0 6px 20px rgba(0,0,0,.15); font-size: 12.5px; max-width: calc(100% - 24px); }
.analyst-bar .btn { white-space: nowrap; }
.analyst-bar svg { width: 15px; height: 15px; color: var(--accent); }
@media (max-width: 1100px) { #btn-share span, #btn-views span, #btn-analytics span { display: none; } }
@media (max-width: 860px) { .views-pop { position: fixed; right: 16px; left: 16px; width: auto; top: 56px; } }
@media (max-width: 520px) {
  #btn-analytics, .views-wrap { display: none; }
  .health > span:not(.dot) { display: none; }
  .health { padding: 0 8px; }
  .topbar { gap: 6px; }
}
@media (max-width: 860px) { .period-btn .pb-l { display: none; } .period-btn .pb-s { display: inline; } .period-btn { padding: 0 8px; gap: 5px; } }
@media (max-width: 380px) { #btn-lang { display: none; } }

/* ---------- v0.9 : chronologies, agenda, trajets, go/no-go ---------- */
.chrono-head { margin-top: 14px; }
.chrono-list, .agenda-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.chrono { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); cursor: pointer; }
.chrono:hover { border-color: var(--line-2); }
.chrono .lvl { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; }
.chrono .n { font-weight: 600; font-size: 13px; line-height: 1.3; }
.chrono .s { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
svg.bars { display: block; }
.trend { display: inline-block; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--muted); line-height: 17px; }
.trend.t-escalating { background: var(--sev4); } .trend.t-new { background: var(--sev3); } .trend.t-stable { background: #5E6B78; }
.trend.t-declining, .trend.t-calmed { background: #2E9E5B; }
.focus-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin: 4px 0; border: 1px solid var(--accent); border-radius: 10px;
  background: var(--accent-soft); font-size: 12.5px; }
.focus-bar[hidden] { display: none; }
.focus-bar span { flex: 1; } .focus-bar svg { width: 14px; height: 14px; color: var(--accent); }
.timeline { display: grid; gap: 10px; }
.tl-date { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.crisis-link { display: block; font-size: 12.5px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; text-decoration: none; color: var(--ink); }
.crisis-link:hover { border-color: var(--accent); } .crisis-link svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--accent); }
.ag-day { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 8px 2px 0; }
.ag-item { display: grid; grid-template-columns: 86px 1fr; gap: 8px; align-items: start; padding: 7px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); }
.ag-item[data-country] { cursor: pointer; } .ag-item[data-country]:hover { border-color: var(--line-2); }
.ag-item .n { font-weight: 600; font-size: 13px; } .ag-item .s { font-size: 12.5px; color: var(--ink-2); }
.ag-type { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 5px; color: #fff; text-align: center; background: #5E6B78; }
.ag-holiday { background: #2F6FB3; } .ag-election { background: #B0182E; } .ag-religious { background: #7D5BA6; } .ag-other { background: #9A6A1F; }
.dot.ag-holiday, .dot.ag-election, .dot.ag-religious, .dot.ag-other { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
#ag-types { margin: 6px 0; }
.corridor-row .n { font-weight: 600; }
.draw-bar { position: absolute; left: 50%; transform: translateX(-50%); top: 12px; z-index: 950; display: flex; gap: 8px; align-items: center;
  background: var(--surface); border: 1px solid var(--accent); border-radius: 999px; padding: 6px 8px 6px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.15); font-size: 12.5px; max-width: calc(100% - 24px); }
.draw-bar[hidden] { display: none; }
.buddy-tools { display: inline-flex; gap: 6px; }
.buddy-tools .btn svg { width: 13px; height: 13px; }
.gng-panel { display: grid; gap: 8px; }
.gng-panel[hidden] { display: none; }
.gng-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gng-form label { display: grid; gap: 3px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.gng-form .wide { grid-column: 1 / -1; }
.gng-form select, .gng-form input { font-size: 12.5px; }
.gng-res { display: grid; gap: 8px; margin: 6px 0; }
.gng-dec { display: flex; align-items: center; gap: 8px; border: 2px solid; border-radius: 10px; padding: 6px 10px; }
.gng-dec .dl { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.gng-grid { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: var(--ink-2); }
.gng-nums { display: grid; gap: 6px; font-size: 12px; } .gng-nums span { color: var(--muted); display: block; font-size: 11px; } .gng-nums strong { font-size: 16px; }
.buddy-actions { margin-top: 8px; flex-wrap: wrap; }
.bmsg .btn { font-size: 12px; }
.buddy-head { flex-wrap: wrap; gap: 6px; }
.buddy-tools .btn { white-space: nowrap; }
.buddy-actions .btn { height: auto; min-height: 26px; white-space: normal; padding: 4px 8px; text-align: left; }
.health { white-space: nowrap; }
@media (max-width: 1500px) { .health .lbl { display: none; } }

/* ---------- v0.10 : mobile d'abord (barre de navigation basse), compte, safety check ---------- */
.mnav, .mmenu, .layers-toggle { display: none; }
.account-btn .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--surface); display: grid; place-items: center;
  font: 700 11px/1 var(--font); letter-spacing: .02em; }
.account-btn .avatar.pending { background: #E3A008; color: #111; }
.safety { position: fixed; z-index: 3000; left: 50%; top: 70px; transform: translateX(-50%); width: min(460px, calc(100% - 24px));
  background: var(--surface); border: 2px solid #D7263D; border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,.28); padding: 16px; display: grid; gap: 8px; }
.safety .sc-k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #D7263D; display: flex; gap: 6px; align-items: center; }
.safety .sc-k svg { width: 16px; height: 16px; }
.safety .sc-t { font-size: 17px; font-weight: 700; } .safety .sc-m { font-size: 14px; color: var(--ink-2); }
.safety .sc-b { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .safety .sc-b2 { display: flex; gap: 8px; justify-content: flex-end; }
.safety .sc-b .btn { height: 48px; justify-content: center; font-size: 15px; font-weight: 700; color: #fff; border: 0; }
.safety .sc-safe { background: #2E9E5B; } .safety .sc-help { background: #D7263D; }

@media (max-width: 860px) {
  .app { grid-template-rows: 52px 1fr; }
  .topbar { height: 52px; padding-top: env(safe-area-inset-top); }
  #btn-panel { display: none !important; }
  .map-wrap { margin-bottom: calc(62px + env(safe-area-inset-bottom)); }
  /* panneau = page plein écran au-dessus de la carte, ouverte depuis la barre basse */
  .panel { position: fixed; top: 52px; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); width: 100% !important; transform: translateY(104%);
    transition: transform .22s ease; display: block !important; border-right: 0; box-shadow: none; overflow: hidden; z-index: 1150; }
  .app.panel-open .panel { transform: none; }
  .panel > .tabs { display: none !important; }
  .panel > .tab-body { height: 100%; overflow-y: auto; padding: 12px 14px 24px; -webkit-overflow-scrolling: touch; }
  .mnav { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; z-index: 1400; left: 0; right: 0; bottom: 0;
    height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
  .mnav button { position: relative; border: 0; background: none; display: grid; justify-items: center; align-content: center; gap: 2px; color: var(--muted);
    font: 600 10.5px/1.1 var(--font); -webkit-tap-highlight-color: transparent; }
  .mnav button svg { width: 22px; height: 22px; }
  .mnav button.on { color: var(--accent); }
  .mnav button.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .mnav .nb { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #D7263D; color: #fff;
    font: 700 10px/17px var(--font); text-align: center; }
  .mmenu:not([hidden]) { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; position: fixed; z-index: 1450; left: 8px; right: 8px;
    bottom: calc(70px + env(safe-area-inset-bottom)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,.22); }
  .mmenu .mm { display: grid; justify-items: center; gap: 4px; padding: 12px 4px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--ink);
    font: 600 12px/1.2 var(--font); text-decoration: none; text-align: center; }
  .mmenu .mm svg { width: 20px; height: 20px; color: var(--accent); }
  /* fiche (incident, pays, chronologie) = feuille en bas d'écran */
  .drawer { left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important; width: 100% !important; max-width: none !important; max-height: 78% !important;
    border-radius: 18px 18px 0 0 !important; padding-top: 18px; box-shadow: 0 -8px 30px rgba(0,0,0,.2); }
  .drawer::before { content: ""; position: absolute; top: 7px; left: 50%; width: 42px; height: 5px; margin-left: -21px; border-radius: 3px; background: var(--line-2); }
  /* couches : bouton flottant qui s'ouvre */
  .layers { top: 10px !important; right: 10px !important; padding: 0 !important; min-width: 0 !important; background: none; border: 0; box-shadow: none; }
  .layers > *:not(.layers-toggle) { display: none; }
  .layers.open { background: var(--surface); border: 1px solid var(--line); padding: 10px 12px !important; box-shadow: var(--shadow); min-width: 220px !important; }
  .layers.open > *:not(.layers-toggle):not(.card-title) { display: flex; }
  .layers-toggle { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 20px; border: 1px solid var(--line);
    background: var(--surface); color: var(--ink); font: 600 13px var(--font); box-shadow: 0 2px 10px rgba(0,0,0,.12); }
  .layers.open .layers-toggle { margin-bottom: 6px; box-shadow: none; }
  .analyst-bar { top: 60px; }
  .safety { top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
  #btn-share span, #btn-views span { display: none; }
  .views-wrap { display: none; }
}

@media (max-width: 860px) { .toast { top: 112px; max-width: calc(100% - 32px); text-align: center; } }

/* pas de cadre de focus autour des pays cliqués (le contour surligné suffit) */
.leaflet-interactive:focus, .leaflet-container path:focus { outline: none; }

/* ------------------------------------------------------------------ v0.11 : rapports */
.rep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rep-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px 12px; }
.rep-item > a { color: inherit; text-decoration: none; display: grid; gap: 4px; }
.rep-item > a:hover .t { color: var(--accent); }
.rep-item .m { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.rep-item .t { font-weight: 600; line-height: 1.3; }
.rep-item .s { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rep-org { font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); padding: 1px 7px; border-radius: 999px; }
.rep-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rep-geo, .rep-th { font-size: 11.5px; border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 7px; background: var(--surface-2); color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; }
.rep-geo { cursor: pointer; } .rep-geo:hover { border-color: var(--accent); color: var(--accent); }
.rep-geo img { width: 14px; height: auto; }
.rep-list.compact .rep-item { padding: 8px 10px; }
.rep-list.compact .s { -webkit-line-clamp: 2; }
#rep-count { margin-top: -4px; }

/* ------------------------------------------------------------------ v0.11 : alerte précoce */
.ew-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ew-controls label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.ew-controls select { height: 32px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.ew-datasets { display: grid; gap: 8px; }
.ew-group { display: grid; gap: 3px; }
.ew-ds { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 13px; background: var(--surface); }
.ew-ds input { accent-color: var(--accent); margin: 0; }
.ew-ds.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.ew-legend { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; background: var(--surface); }
.ew-legend .row { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 12px; }
.ew-legend .k { display: inline-flex; align-items: center; gap: 5px; }
.ew-legend .sq { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0,0,0,.08); }
.ew-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ew-rank li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; padding: 6px 6px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.ew-rank li:hover, .ew-rank li.on { background: var(--surface-2); }
.ew-rank .sw { width: 12px; height: 12px; border-radius: 3px; }
.ew-rank .t { display: flex; gap: 6px; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ew-rank .w { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ew-method summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.ew-drivers { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 13px; }
.ew-chart { margin: 0 0 12px; }
.ew-chart figcaption { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 2px; }
.ew-chart svg { width: 100%; height: auto; display: block; }
.ew-chart text { font-size: 9px; fill: var(--muted); font-family: var(--font); }
.ew-chart .grid { stroke: var(--line); stroke-width: 1; }
.ew-chart .band { fill: var(--ink-2); opacity: .12; }
.ew-chart .avg { fill: none; stroke: var(--ink-2); stroke-width: 1.4; stroke-dasharray: 4 3; }
.ew-key { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.ew-key i { display: inline-block; width: 12px; height: 8px; margin-right: 4px; vertical-align: middle; border-radius: 2px; }
.ew-key .k-avg { height: 0; border-top: 1.5px dashed var(--ink-2); }
.ew-key .k-band { background: var(--ink-2); opacity: .2; }

/* ------------------------------------------------------------------ v0.12 : actualiser, traduction */
#btn-refresh.spin svg { animation: vs-spin 1.1s linear infinite; }
@keyframes vs-spin { to { transform: rotate(360deg); } }
#btn-autotr.on { color: var(--accent); background: var(--accent-soft); }
.trd { text-decoration: underline dotted color-mix(in srgb, var(--muted) 55%, transparent); text-underline-offset: 3px; }
.tr-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; margin: -2px 0 6px; }
.toast-act { margin-left: 8px; border: 0; border-radius: 6px; padding: 3px 10px; background: var(--accent); color: #fff; font-weight: 600; }
@media (max-width: 860px) { #btn-autotr { display: none; } }

/* ------------------------------------------------------------------ v0.13 : espaces, sous-onglets, fiches */
.panel { grid-template-rows: auto minmax(0, 1fr); }
.panel > .tabs { grid-row: 1 / span 2; }
.subtabs { grid-column: 2; grid-row: 1; display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subtabs button { border: 0; background: none; padding: 8px 10px 9px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.subtabs button svg { width: 15px; height: 15px; }
.subtabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.subtabs .badge, .tabs .badge { position: static; margin-left: 2px; }
.panel > .tab-body { grid-column: 2; grid-row: 2; }
.tabs button .badge { position: absolute; top: 4px; right: 6px; }
@media (max-width: 860px) {
  .panel { grid-template-columns: 1fr !important; }
  .panel.fs, .app.panel-open .panel { display: flex !important; flex-direction: column; }
  .subtabs { padding: 4px 10px 0; background: var(--surface); flex-shrink: 0; }
  .panel > .tab-body { height: auto; flex: 1; min-height: 0; }
}
.reliable-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; font-size: 12px;
  background: var(--surface); color: var(--ink-2); cursor: pointer; }
.reliable-chip.on { border-color: color-mix(in srgb, var(--risk1) 60%, transparent); background: color-mix(in srgb, var(--risk1) 12%, var(--surface)); color: var(--ink); }
.reliable-chip svg { width: 14px; height: 14px; }
.alert .why { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 3px 0 2px; }
.alert .why svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 2px; }
.alert .why.site { color: var(--sev3); }
.alert .why.watch { color: var(--accent); }
.alert .m .rel { margin-left: auto; }
.an-quick { display: flex; gap: 6px; margin: 8px 0 2px; }
.search-results .sr-h { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px 2px; }
.analytics-intro { display: grid; gap: 10px; }
.ew-valid { margin-top: 10px; }
.ew-vt { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.ew-vt th, .ew-vt td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.ew-vt .sq { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
.tabs button[data-space] span:not(.badge) { font-size: 10.5px; letter-spacing: -.1px; }

/* v0.15 : analyses — sélection multiple de catégories */
.ms-wrap { position: relative; display: grid; gap: 3px; }
.ms-lab { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ms-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 190px; max-width: 280px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); border-radius: 6px; padding: 5px 8px; font-size: 13px; text-align: left; }
.ms-btn svg { color: var(--muted); flex: none; }
.ms-pop { position: absolute; top: 100%; left: 0; margin-top: 4px; z-index: 30; width: 300px; max-height: 60vh; overflow: auto; padding: 6px; display: grid; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.ms-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); padding: 2px 4px 4px; border-bottom: 1px solid var(--line); }
.ms-grp { display: grid; padding: 2px 0 4px; border-bottom: 1px solid var(--line); }
.ms-grp:last-child { border-bottom: 0; }
.a-filters .ms-grp label, .ms-grp label { display: flex; grid-template-columns: none; font-weight: 400; align-items: center; gap: 7px; padding: 3px 6px 3px 22px; border-radius: 6px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.a-filters .ms-grp label.ms-g, .ms-grp label.ms-g { padding-left: 6px; font-weight: 700; color: var(--ink); }
.ms-grp input { margin: 0; flex: none; }
.ms-grp label:hover { background: var(--surface-2); }
.ms-grp label i { width: 9px; height: 9px; border-radius: 2px; flex: none; }

/* v0.15 : espace Trafic (aérien, maritime) */
.tr-intro { display: grid; gap: 8px; padding: 12px 14px 4px; }
.tr-view { display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px var(--mono); color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; width: fit-content; }
.tr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tr-list li { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: var(--surface); }
.tr-list li > div:first-child { display: grid; gap: 2px; }
.tr-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tr-zones { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.traffic-view { position: absolute; inset: 12px; z-index: 915; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.tv-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); }
.tv-head strong { display: inline-flex; align-items: center; gap: 6px; }
.tv-head .hint { flex: 1; }
.traffic-view iframe { width: 100%; height: 100%; border: 0; background: var(--surface-2); }
@media (max-width: 860px) { .traffic-view { inset: 6px 6px 70px; } .tv-head .hint { display: none; } .tr-list li { grid-template-columns: 1fr; } .tr-act { justify-content: flex-start; } }

/* v0.16 : calques trafic */
.ac { width: 20px; height: 20px; display: grid; place-items: center; filter: drop-shadow(0 0 1.5px rgba(0,0,0,.7)); transition: transform .3s; }
.ac.em { animation: acpulse 1.2s ease-in-out infinite; }
@keyframes acpulse { 50% { filter: drop-shadow(0 0 6px #FF3355); } }
.tr-toggles { display: grid; gap: 6px; margin-bottom: 6px; }
.zc { font: 600 10.5px var(--mono); color: var(--accent); margin-left: 4px; }
.tr-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.tr-legend span { display: inline-flex; align-items: center; gap: 4px; }
.tr-legend i { width: 8px; height: 8px; border-radius: 50%; }

/* Prestataires (fiche pays) : pastille = fiabilité du meilleur prestataire de la catégorie (vert → rouge) */
.pv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 12.5px;
  color: var(--ink, inherit); background: color-mix(in srgb, var(--pv) 16%, transparent); border: 1px solid color-mix(in srgb, var(--pv) 60%, transparent); }
.pv-chip b { font-weight: 700; }
.pv-chip:hover { background: color-mix(in srgb, var(--pv) 28%, transparent); }
.pv-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--pv); flex: none; }
.pv-legend { margin-top: 8px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pv-list { margin-top: 8px; } .pv-list-h { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.pv-sub { font-size: 11.5px; color: var(--muted); }
.pv-join { display: inline-block; margin-top: 8px; font-size: 12.5px; }

/* ================================================================== v0.21 – mode visiteur (carte seule, sans compte validé) */
body.guest .app { grid-template-columns: 1fr !important; }
body.guest #panel, body.guest .search, body.guest .period, body.guest #btn-analytics, body.guest .views-wrap, body.guest #btn-share,
body.guest #btn-refresh, body.guest #health, body.guest #btn-autotr, body.guest #btn-help, body.guest #btn-panel, body.guest #btn-account,
body.guest #layers, body.guest #legend, body.guest #mnav, body.guest #mmenu, body.guest #analyst-bar, body.guest #drawer, body.guest #analytics,
body.guest #traffic-view, body.guest #safety, body.guest #draw-bar { display: none !important; }
body.guest .map-wrap { margin-bottom: 0 !important; }
body.guest .top-right { margin-left: auto; }
.guest-cta { display: flex; gap: 8px; align-items: center; }
.guest-cta .btn svg { width: 15px; height: 15px; }
.guest-tag { font-size: 12.5px; color: var(--muted); padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--line); white-space: nowrap; }
@media (max-width: 860px) {
  .guest-tag, .guest-cta .g-signup { display: none; }
  body.guest .brand-name { display: inline; }
  .guest-cta .btn { height: 34px; }
}
.vs-gpop .leaflet-popup-content-wrapper { background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: 0 12px 40px rgba(8,20,36,.28); border: 1px solid var(--line); }
.vs-gpop .leaflet-popup-tip { background: var(--surface); }
.vs-gpop .leaflet-popup-content { margin: 14px 16px; font: 13px/1.45 var(--font); }
.vs-gpop a.leaflet-popup-close-button { color: var(--muted); top: 6px; right: 6px; }
.gp { display: grid; gap: 7px; }
.gp-k { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); padding-right: 14px; }
.gp-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.gp-ico svg { width: 13px; height: 13px; }
.gp-sev { margin-left: auto; font-size: 11px; padding: 1px 8px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); white-space: nowrap; }
.gp-t { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.gp-m { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 4px; }
.gp-m svg { width: 12px; height: 12px; }
.gp-lock { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; color: var(--ink-2); background: var(--soft, rgba(127,127,127,.08));
  border-radius: 9px; padding: 8px 9px; }
.gp-lock svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.gp-b { display: flex; gap: 8px; justify-content: flex-end; }
.gp-b .btn { text-decoration: none; }
.gp-b .btn.primary { color: var(--surface); }

/* ================================================================== v0.21 – fond « Réaliste » */
/* carte physique un peu plus saturée (teintes d'altitude plus lisibles), étiquettes « atlas » plus foncées */
.bm-phys { filter: saturate(1.4) contrast(1.06); }
[data-theme="dark"] .bm-phys { filter: saturate(1.3) contrast(1.08) brightness(.8); }
.bm-atlas { filter: contrast(1.6) brightness(.72); }

/* ================================================================== v0.21 – marqueurs et groupes animés */
.mk2-wrap, .clx-wrap { background: none; border: 0; }
.mk2 { position: relative; width: 100%; height: 100%; animation: mk-in .5s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: var(--d, 0ms); }
.mk2-core { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--c);
  background: radial-gradient(circle at 32% 26%, color-mix(in srgb, var(--c) 42%, #fff) 0%, var(--c) 50%, color-mix(in srgb, var(--c) 68%, #000) 100%);
  box-shadow: 0 0 0 2px rgba(255,255,255,.96), 0 0 0 5px color-mix(in srgb, var(--c) 26%, transparent), 0 4px 10px rgba(6,16,30,.38);
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), box-shadow .22s ease; }
.mk2-core svg { width: 52%; height: 52%; stroke-width: 2.25; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.mk2-wrap:hover .mk2-core { transform: translateY(-2px) scale(1.16);
  box-shadow: 0 0 0 2px #fff, 0 0 0 8px color-mix(in srgb, var(--c) 34%, transparent), 0 10px 20px rgba(6,16,30,.38); }
.mk2-halo { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.mk2-halo::before, .mk2-halo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c);
  opacity: 0; animation: mk-ripple 2.8s cubic-bezier(.2, .6, .35, 1) infinite; }
.mk2-halo::after { animation-delay: 1.4s; }
.mk2.s3 .mk2-halo::before { animation-duration: 3.6s; } .mk2.s3 .mk2-halo::after { display: none; }
.mk2.s4 .mk2-halo { background: radial-gradient(circle, color-mix(in srgb, var(--c) 35%, transparent) 0, transparent 70%); animation: mk-glow 2.8s ease-in-out infinite; }
.mk2.auto .mk2-core::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1.6px dashed color-mix(in srgb, var(--c) 85%, #fff); }
.mk2.new::before { content: ""; position: absolute; z-index: 2; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 2px var(--accent, #2F6FB3); animation: mk-new 1.8s ease-in-out infinite; }
.mk2.sel .mk2-core { transform: scale(1.24); box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--accent, #2F6FB3), 0 8px 18px rgba(6,16,30,.42); }
@keyframes mk-in { from { transform: scale(.25); opacity: 0; } 60% { opacity: 1; } to { transform: scale(1); opacity: 1; } }
@keyframes mk-ripple { 0% { transform: scale(1); opacity: .75; } 100% { transform: scale(2.5); opacity: 0; } }
@keyframes mk-glow { 0%, 100% { transform: scale(1.2); opacity: .55; } 50% { transform: scale(1.75); opacity: .2; } }
@keyframes mk-new { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }

/* groupes : nombre sur disque « verre » sombre, anneau découpé par gravité */
.clx { position: relative; z-index: 2; width: var(--s); height: var(--s); display: grid; place-items: center; cursor: pointer;
  animation: mk-in .45s cubic-bezier(.34, 1.56, .64, 1) both; }
.clx-ring { position: absolute; inset: 0; overflow: visible; filter: drop-shadow(0 3px 6px rgba(6,16,30,.35)); }
.clx-ring circle { fill: none; stroke-width: 5; stroke-linecap: butt; }
.clx-core { position: relative; z-index: 1; width: calc(var(--s) - 13px); height: calc(var(--s) - 13px); border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 28%, #3A5170 0%, #1A2B42 55%, #0D1828 100%); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -2px 6px rgba(0,0,0,.35); transition: transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.clx-core b { font: 800 13px/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.02em; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.clx-wrap:hover .clx-core, .clx-open .clx-core { transform: scale(1.1); }
.clx-halo { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.clx-halo::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c); opacity: 0; animation: mk-ripple 3.2s cubic-bezier(.2, .6, .35, 1) infinite; }

/* étoile des catégories */
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 1; }
.burst-disk { position: absolute; left: calc(var(--w) / -2); top: calc(var(--w) / -2); width: var(--w); height: var(--w); border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, color-mix(in srgb, var(--surface, #fff) 70%, transparent) 0%, color-mix(in srgb, var(--surface, #fff) 38%, transparent) 55%, transparent 72%);
  animation: burst-disk .3s ease-out both; }
.burst-links { position: absolute; left: calc(var(--w) / -2); top: calc(var(--w) / -2); overflow: visible; pointer-events: none; }
.burst-links line { stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .75;
  animation: burst-line .35s ease-out forwards; animation-delay: calc(var(--i) * 35ms + 60ms); }
.bb { position: absolute; left: 0; top: 0; width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; color: #fff;
  transform: translate(-50%, -50%) translate(var(--x), var(--y)); animation: bb-in .42s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(var(--i) * 35ms); }
.bb-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c); background: radial-gradient(circle at 32% 26%, color-mix(in srgb, var(--c) 42%, #fff) 0%, var(--c) 52%, color-mix(in srgb, var(--c) 70%, #000) 100%);
  box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(6,16,30,.35); transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s; }
.bb-ico svg { width: 16px; height: 16px; stroke-width: 2.25; }
.bb-ico small { font: 800 11px/1 var(--font); }
.bb > b { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center;
  background: #0D1828; color: #fff; font: 700 10.5px/1 var(--font); font-variant-numeric: tabular-nums; box-shadow: 0 0 0 1.5px #fff; }
.bb-l { position: absolute; white-space: nowrap; pointer-events: none; padding: 3px 8px; border-radius: 999px; font: 600 11.5px/1.2 var(--font);
  background: var(--surface, #fff); color: var(--ink, #13263D); box-shadow: 0 3px 10px rgba(6,16,30,.22); border: 1px solid var(--line, #dde3ea);
  opacity: 0; transition: opacity .15s, transform .15s; }
.bb-l.dn { top: calc(100% + 6px); left: 50%; transform: translate(-50%, -3px); }
.bb-l.up { bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 3px); }
.bb-l.rt { left: calc(100% + 8px); top: 50%; transform: translate(-3px, -50%); }
.bb-l.lt { right: calc(100% + 8px); top: 50%; transform: translate(3px, -50%); }
.bb:hover .bb-ico, .bb:focus-visible .bb-ico { transform: scale(1.18); box-shadow: 0 0 0 2px #fff, 0 0 0 6px color-mix(in srgb, var(--c) 35%, transparent), 0 6px 14px rgba(6,16,30,.35); }
.bb:hover .bb-l, .bb:focus-visible .bb-l { opacity: 1; }
.bb:hover .bb-l.dn, .bb:hover .bb-l.up { transform: translate(-50%, 0); } .bb:hover .bb-l.rt, .bb:hover .bb-l.lt { transform: translate(0, -50%); }
.burst.out { animation: burst-out .15s ease-in forwards; }
@keyframes bb-in { from { transform: translate(-50%, -50%) translate(0, 0) scale(.2); opacity: 0; } to { transform: translate(-50%, -50%) translate(var(--x), var(--y)) scale(1); opacity: 1; } }
@keyframes burst-line { to { stroke-dashoffset: 0; } }
@keyframes burst-disk { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes burst-out { to { opacity: 0; transform: scale(.85); } }
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow { transition: transform .35s cubic-bezier(.22, .9, .3, 1), opacity .3s ease-in; }

@media (prefers-reduced-motion: reduce) {
  .mk2, .clx, .bb, .burst-disk, .burst-links line, .mk2-halo, .mk2-halo::before, .mk2-halo::after, .clx-halo::before, .mk2.new::before { animation: none !important; }
  .burst-links line { stroke-dashoffset: 0; }
}

/* ================================================================== v0.22 – onglet Prestataires */
#pb { display: grid; gap: 10px; }
.pb-ctrl { display: grid; gap: 8px; }
.pb-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--muted); }
.pb-search svg { width: 15px; height: 15px; flex: none; }
.pb-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; font-size: 13.5px; color: var(--ink); }
.pb-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.pb-sel { width: 100%; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; padding: 0 6px; }
.pb-scope { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
.pb-scope button { padding: 5px 2px; font-size: 12px; display: grid; justify-items: center; gap: 1px; line-height: 1.15; min-width: 0; }
.pb-scope b { font-weight: 800; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pb-scope button[aria-pressed="true"] b { color: var(--accent); }
.pb-sum { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.pb-sum .btn { margin-left: auto; }
.pb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pb-list .empty { color: var(--muted); font-size: 13px; padding: 16px 4px; text-align: center; }
.pb-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); display: grid; gap: 7px;
  transition: border-color .15s, box-shadow .15s; }
.pb-card:hover { border-color: var(--line-2); box-shadow: 0 4px 14px rgba(8,20,36,.08); }
.pb-h { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: center; }
.pb-tier { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff;
  background: var(--pv); box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.pb-name { font-weight: 700; font-size: 14px; line-height: 1.25; }
.pb-name a { color: var(--ink); text-decoration: none; } .pb-name a:hover { text-decoration: underline; }
.pb-m { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pb-scope-b { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; }
.pb-scope-b.s-local { background: color-mix(in srgb, #2E9E5B 16%, transparent); color: #2E9E5B; }
.pb-scope-b.s-regional { background: color-mix(in srgb, #2F6FB3 16%, transparent); color: #3F86C6; }
.pb-scope-b.s-global { background: color-mix(in srgb, #7D5BA6 16%, transparent); color: #8E6CB8; }
.pb-unv { color: #d73027; }
.pb-cats { display: flex; flex-wrap: wrap; gap: 4px; }
.pb-cat { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.pb-cat.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.pb-cat.more { color: var(--muted); }
.pb-cov { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.pb-cov > svg { width: 13px; height: 13px; color: var(--muted); flex: none; }
.pb-cov > span { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.pb-flag { border: 0; padding: 0; background: none; cursor: pointer; line-height: 0; border-radius: 3px; }
.pb-flag img { border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.pb-more { font-size: 11px; color: var(--muted); }
.pb-note { font-size: 12px; color: var(--muted); line-height: 1.4; }
.pb-a { display: flex; gap: 6px; flex-wrap: wrap; }
.pb-a .btn { text-decoration: none; } .pb-a .btn svg { width: 12px; height: 12px; }
.pb-foot { border-top: 1px dashed var(--line); padding-top: 8px; }
.pb-foot .pv-legend { gap: 6px; font-size: 12px; }
.pv-all { margin-top: 8px; }
.pb-m svg { width: 11px; height: 11px; vertical-align: -1px; }

/* contrôle des événements (État des sources, v0.24) */
.triage .tg-counts .w { white-space: normal; text-align: right; }
.triage .tg-alarms li { color: var(--sev4); font-size: 12px; display: flex; gap: 6px; align-items: center; }
.triage .tg-recent summary { cursor: pointer; font-size: 13px; font-weight: 600; margin: 6px 0; }
.triage .tg-recent .t a { color: inherit; text-decoration: none; }
.triage .tg-recent .t a:hover { text-decoration: underline; }
.triage .tg-why { color: var(--muted); font-size: 12px; }
.triage .tg-ok { color: var(--risk1); font-size: 12px; white-space: nowrap; }

/* recoupement (fiche incident, v0.25) */
.notice.disputed-notice { border-color: var(--sev3); background: color-mix(in srgb, var(--sev3) 10%, transparent); }
.notice.disputed-notice a { color: inherit; }


/* ------------------------------------------------------------------ v0.26 : tendances de risques (espace Anticipation) */
#fs-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
#fs-body > * { min-width: 0; }
.fs-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fs-controls select { width: 100%; min-width: 0; }
.fs-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fs-lab { font-size: 12px; color: var(--muted); min-width: 74px; }
.fs-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--surface); }
.fs-seg button { border: 0; background: none; padding: 5px 10px; font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.fs-seg button + button { border-left: 1px solid var(--line); }
.fs-seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.fs-outlook { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); display: grid; gap: 8px; }
.fs-text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink); }
.fs-fams { display: grid; gap: 3px; }
.fs-fam { display: grid; grid-template-columns: minmax(0, 1fr) 90px 26px; gap: 8px; align-items: center; border: 0; background: none; padding: 4px 6px; border-radius: 6px;
  font: inherit; font-size: 12.5px; color: var(--ink); text-align: left; cursor: pointer; }
.fs-fam:hover, .fs-fam.on { background: var(--surface-2); }
.fs-fam .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-fam .track { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.fs-fam .fill { display: block; height: 100%; border-radius: 3px; }
.fs-fam .v { text-align: right; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.fs-matrix { margin: 0; }
.fs-matrix figcaption { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.fs-matrix svg { width: 100%; max-width: 360px; height: auto; display: block; }
.fs-matrix .ax { font-size: 9px; fill: var(--muted); }
.fs-matrix .lab { font-size: 9.5px; fill: var(--muted); }
.fs-dot { cursor: pointer; }
.fs-dot text { font-size: 8px; font-weight: 700; fill: #fff; pointer-events: none; }
.fs-dot:hover circle, .fs-dot:focus circle { stroke: var(--ink); stroke-width: 2; }
.fs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.fs-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 7px 6px; border-radius: 7px; cursor: pointer; }
.fs-list li:hover { background: var(--surface-2); }
.fs-list li.empty { cursor: default; color: var(--muted); font-size: 13px; display: block; }
.fs-list .n { width: 22px; height: 22px; border-radius: 6px; color: #fff; display: grid; place-items: center; font: 700 11px/1 var(--font); }
.fs-list .body { display: grid; gap: 3px; min-width: 0; }
.fs-list .t { font-size: 13px; font-weight: 600; line-height: 1.3; }
.fs-list .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11.5px; color: var(--muted); }
.fs-list .meta .chip, .fs-chips .chip { padding: 1px 7px; font-size: 11px; }
.fs-list .meta .chip.ghost { background: none; border-style: dashed; }
.fs-list .meta .chip img { width: 14px; height: auto; }
.fs-list .flag { color: #C0263B; display: inline-flex; }
.fs-list .w { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 2px; }
.fs-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.fs-signals { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; line-height: 1.45; }
.fs-signals .dt { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.fs-src { font-size: 11px; margin-left: 2px; text-decoration: none; vertical-align: super; }
.fs-sources { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 12.5px; line-height: 1.4; }
.fs-flags p { margin: 0 0 4px; font-size: 12.5px; color: #C0263B; display: flex; gap: 6px; align-items: flex-start; }
.fs-scale { margin: -2px 0 6px 138px; font-size: 11.5px; }
@media (max-width: 860px) { .fs-scale { margin-left: 0; } }
/* v0.27 : tendances et alerte précoce fusionnées */
.chip.warn { border-color: #E8A0A8; background: color-mix(in srgb, #C0263B 10%, var(--surface)); color: var(--ink); }
.fs-ind .w { font-family: var(--mono); font-size: 12px; }
#fs-ew { display: grid; gap: 12px; min-width: 0; }
#fs-see-units { margin-left: 4px; vertical-align: middle; }
