/* Urgence Kinshasa · maquette B « Carte d'abord ».
   Bleu ciel du drapeau pour l'interface, jaune de l'étoile pour la garde, rouge pour le SOS.
   Une couleur par niveau d'urgence (--n1 vital … --n9 quotidien) : la couleur porte l'information. */

/* ===== Jetons ===== */
:root {
  color-scheme: light;
  --texte: #0a1c3a; --doux: #4f6182; --trait: rgba(10, 28, 58, .11);
  --surface: rgba(255, 255, 255, .78); --surface-forte: #ffffff; --surface-douce: rgba(11, 99, 206, .06);
  --verre: rgba(255, 255, 255, .80); --verre-fort: rgba(255, 255, 255, .96);
  --ombre: 0 16px 40px -18px rgba(10, 40, 90, .38); --ombre-douce: 0 6px 18px -12px rgba(10, 40, 90, .35);
  --fond-panneau: linear-gradient(180deg, rgba(247,250,255,.94), rgba(236,243,252,.98));
  --bleu: #0b63ce; --bleu-doux: rgba(11, 99, 206, .10); --sur-bleu: #fff;
  --jaune: #f7d618; --sur-jaune: #3a2f00;
  --rouge: #d21f3c; --vert: #0f8a4b; --ambre: #b45309; --gris: #6b7a90;
  --heros: linear-gradient(135deg, #0b4fb3 0%, #0b63ce 45%, #1c8bff 100%);
  --fond-carte: #dfe8f3; --focus: #0b63ce; --tuiles: saturate(.85);
  --grappe: #0a1c3a; --sur-grappe: #fff;
  --n1: #d21f3c; --n2: #0e8a6a; --n3: #2f55d4; --n4: #a36100; --n5: #7c3aed; --n6: #be2f8a; --n7: #c2410c; --n8: #0e7490; --n9: #5b6473; --n10: #6b5b95;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) {
    color-scheme: dark;
    --texte: #eaf2ff; --doux: #a3b5d4; --trait: rgba(255, 255, 255, .10);
    --surface: rgba(255, 255, 255, .05); --surface-forte: #0f2347; --surface-douce: rgba(74, 168, 255, .08);
    --verre: rgba(10, 30, 62, .70); --verre-fort: rgba(9, 26, 54, .97);
    --ombre: 0 20px 50px -18px rgba(0, 0, 0, .85); --ombre-douce: 0 8px 20px -12px rgba(0, 0, 0, .7);
    --fond-panneau: linear-gradient(180deg, rgba(12, 32, 66, .93), rgba(6, 19, 41, .98));
    --bleu: #4aa8ff; --bleu-doux: rgba(74, 168, 255, .15); --sur-bleu: #04152e;
    --rouge: #ff5a6e; --vert: #3ddc8a; --ambre: #fbbf24; --gris: #94a3b8;
    --heros: linear-gradient(135deg, #0a3a8a 0%, #0b52b8 50%, #1b78e6 100%);
    --fond-carte: #0b1a30; --focus: #4aa8ff; --tuiles: invert(1) hue-rotate(195deg) brightness(.82) contrast(.92) saturate(.5);
    --grappe: #eaf2ff; --sur-grappe: #0a1c3a;
    --n1: #ff5a6e; --n2: #34d3a6; --n3: #7f9cff; --n4: #fbbf24; --n5: #b794ff; --n6: #f472c0; --n7: #ff9157; --n8: #38c7e6; --n9: #a3acba; --n10: #b8a7e0;
  }
}
:root[data-theme="sombre"] {
  color-scheme: dark;
  --texte: #eaf2ff; --doux: #a3b5d4; --trait: rgba(255, 255, 255, .10);
  --surface: rgba(255, 255, 255, .05); --surface-forte: #0f2347; --surface-douce: rgba(74, 168, 255, .08);
  --verre: rgba(10, 30, 62, .70); --verre-fort: rgba(9, 26, 54, .97);
  --ombre: 0 20px 50px -18px rgba(0, 0, 0, .85); --ombre-douce: 0 8px 20px -12px rgba(0, 0, 0, .7);
  --fond-panneau: linear-gradient(180deg, rgba(12, 32, 66, .93), rgba(6, 19, 41, .98));
  --bleu: #4aa8ff; --bleu-doux: rgba(74, 168, 255, .15); --sur-bleu: #04152e;
  --rouge: #ff5a6e; --vert: #3ddc8a; --ambre: #fbbf24; --gris: #94a3b8;
  --heros: linear-gradient(135deg, #0a3a8a 0%, #0b52b8 50%, #1b78e6 100%);
  --fond-carte: #0b1a30; --focus: #4aa8ff; --tuiles: invert(1) hue-rotate(195deg) brightness(.82) contrast(.92) saturate(.5);
  --grappe: #eaf2ff; --sur-grappe: #0a1c3a;
  --n1: #ff5a6e; --n2: #34d3a6; --n3: #7f9cff; --n4: #fbbf24; --n5: #b794ff; --n6: #f472c0; --n7: #ff9157; --n8: #38c7e6; --n9: #a3acba; --n10: #b8a7e0;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; line-height: 1.45; color: var(--texte); background: var(--fond-carte); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul { margin: 0; } ul { list-style: none; padding: 0; }
a { color: inherit; } button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; } button:disabled { cursor: not-allowed; opacity: .55; filter: grayscale(.4); }
[hidden] { display: none !important; }
.ic { width: 1.2em; height: 1.2em; flex: none; display: block; }
.ic-plein path { fill: currentColor; stroke: none; }
.doux { color: var(--doux); } .petit { font-size: 13px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: -999px; top: 8px; z-index: 5000; padding: 10px 14px; border-radius: 10px; background: var(--verre-fort); }
.evitement:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 0; } ::-webkit-scrollbar-thumb { background: var(--trait); border-radius: 8px; }

/* ===== Carte ===== */
.carte { position: fixed; inset: 0; z-index: 0; background: var(--fond-carte); }
.tuiles { filter: var(--tuiles); }
.leaflet-container { font: inherit; background: var(--fond-carte); }
.leaflet-top.leaflet-right { top: calc(var(--bas-haut, 120px) + 4px); }
.leaflet-bar { border: 0 !important; box-shadow: var(--ombre-douce) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-bar a { background: var(--verre-fort) !important; color: var(--texte) !important; border-color: var(--trait) !important; width: 38px !important; height: 38px !important; line-height: 38px !important; }
.leaflet-control-attribution { background: var(--verre) !important; color: var(--doux) !important; font-size: 11px; border-radius: 8px 0 0 0; }
.leaflet-control-attribution a { color: var(--bleu) !important; }
.repere span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; border: 2px solid var(--verre-fort); box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.repere.ouvert span { box-shadow: 0 0 0 3px var(--vert), 0 4px 12px rgba(0,0,0,.35); }
.repere .ic { width: 16px; height: 16px; }
.grappe span { display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 13px; color: var(--sur-grappe); background: var(--grappe); border: 2px solid var(--verre-fort); box-shadow: 0 0 0 5px color-mix(in srgb, var(--grappe) 22%, transparent), 0 6px 16px rgba(0,0,0,.3); }
.moi span { display: block; width: 22px; height: 22px; border-radius: 50%; background: #2f8cff; border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(47, 140, 255, .25); animation: moi 2.4s ease-out infinite; }
@keyframes moi { 70% { box-shadow: 0 0 0 16px rgba(47, 140, 255, 0); } }

/* ===== Haut ===== */
.haut { position: fixed; z-index: 800; top: 0; left: 0; right: 0; padding: calc(10px + env(safe-area-inset-top)) 12px 0; pointer-events: none; }
.haut > * { pointer-events: auto; }
.barre-recherche { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 20px; background: var(--verre); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6); border: 1px solid var(--trait); box-shadow: var(--ombre); }
.barre-recherche:focus-within { border-color: var(--bleu); box-shadow: 0 0 0 4px var(--bleu-doux), var(--ombre); }
.marque { width: 42px; height: 42px; flex: none; display: block; border-radius: 12px; }
.marque img { width: 42px; height: 42px; display: block; }
.champ { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--doux); }
.champ-ic .ic { width: 18px; height: 18px; }
.champ input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; font-weight: 500; padding: 10px 2px; color: var(--texte); }
.champ input::placeholder { color: var(--doux); }
.btn-rond { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--trait); background: var(--verre-fort); }
.si-clair { display: none; }
:root[data-theme="clair"] .si-sombre { display: none; } :root[data-theme="clair"] .si-clair { display: block; }
@media (prefers-color-scheme: light) { :root:not([data-theme="sombre"]) .si-sombre { display: none; } :root:not([data-theme="sombre"]) .si-clair { display: block; } }
/* Une seule ligne qui défile, à toutes les largeurs : elle ne recouvre jamais le panneau. */
.raccourcis { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px 12px; margin: 0 -12px; scrollbar-width: none; scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent 100%); }
.raccourcis::-webkit-scrollbar { display: none; }
.raccourci { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px 8px 10px; border-radius: 999px; border: 1px solid var(--trait); background: var(--verre-fort); font-weight: 650; font-size: 14px; box-shadow: var(--ombre-douce); white-space: nowrap; }
.raccourci .ic { color: var(--c); width: 18px; height: 18px; }
.raccourci[aria-pressed="true"] { background: var(--c); color: #fff; border-color: transparent; }
.raccourci[aria-pressed="true"] .ic { color: #fff; }
.raccourci-tout .ic { color: var(--doux); }

/* ===== Boutons flottants ===== */
.flottants { position: fixed; z-index: 700; right: 12px; bottom: calc(var(--h-panneau, 50vh) + 14px); display: grid; gap: 10px; justify-items: end; transition: bottom .3s, opacity .2s; }
body:has(.panneau[data-hauteur="bas"]) { --h-panneau: 190px; }
body:has(.panneau[data-hauteur="haut"]) .flottants { opacity: 0; pointer-events: none; }
.btn-viser { width: 52px; height: 52px; border-radius: 50%; color: var(--bleu); box-shadow: var(--ombre); }
.btn-viser[data-etat="chargement"] .ic { animation: tourne 1s linear infinite; }
.btn-viser[data-etat="ok"] { background: var(--bleu); color: var(--sur-bleu); }
@keyframes tourne { to { transform: rotate(360deg); } }
.btn-sos { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 18px 0 14px; border-radius: 999px; border: 0; background: var(--rouge); color: #fff; font-weight: 800; letter-spacing: .02em; box-shadow: 0 12px 26px -10px var(--rouge); }
.btn-sos .ic { width: 22px; height: 22px; }

/* ===== Panneau ===== */
.panneau { position: fixed; z-index: 750; left: 0; right: 0; bottom: 0; height: 50vh; display: flex; flex-direction: column;
  background: var(--fond-panneau); backdrop-filter: blur(26px) saturate(1.5); -webkit-backdrop-filter: blur(26px) saturate(1.5);
  border-radius: 28px 28px 0 0; border-top: 1px solid var(--trait); box-shadow: 0 -18px 40px -20px rgba(0,0,0,.5); transition: height .32s cubic-bezier(.2,.8,.2,1); outline: none; }
.panneau.glisse { transition: none; }
.panneau[data-hauteur="bas"] { height: 190px; } .panneau[data-hauteur="mi"] { height: 50vh; } .panneau[data-hauteur="haut"] { height: calc(100dvh - 64px); }
.poignee { flex: none; height: 24px; border: 0; background: none; position: relative; touch-action: none; cursor: grab; }
.poignee::before { content: ''; position: absolute; left: 50%; top: 9px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: var(--doux); opacity: .45; }
.defile { flex: 1; overflow-y: auto; padding: 0 16px calc(28px + env(safe-area-inset-bottom)); overscroll-behavior: contain; scroll-behavior: smooth; }
.titre-section { font-size: 17px; font-weight: 800; letter-spacing: -.02em; margin: 24px 2px 12px; }
.entete-section { display: flex; align-items: baseline; justify-content: space-between; }

/* Bandeau « maintenant » */
.maintenant { position: relative; overflow: hidden; padding: 14px 16px 14px; border-radius: 24px; color: #fff; background: var(--heros); box-shadow: 0 18px 36px -20px #0b63ce; }
.maintenant::after { content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(247, 214, 24, .35), transparent 65%); }
.maintenant-heure { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; opacity: .92; }
.point-vivant { width: 8px; height: 8px; border-radius: 50%; background: #5cf0a0; box-shadow: 0 0 0 0 rgba(92, 240, 160, .6); animation: vivant 2s infinite; flex: none; }
@keyframes vivant { 70% { box-shadow: 0 0 0 7px rgba(92, 240, 160, 0); } }
.maintenant h1 { font-size: 20px; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 4px; max-width: 22ch; position: relative; z-index: 1; }
.maintenant-sous { font-size: 13.5px; opacity: .9; max-width: 46ch; position: relative; z-index: 1; }
.btn-clair { margin-top: 10px; background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(8px); position: relative; z-index: 1; }
.btn-clair.actif { background: #fff; color: #0b4fb3; }

/* J'ai besoin… */
.situations { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.situation { width: 100%; height: 100%; display: grid; grid-template-columns: 1fr; align-content: start; gap: 10px; text-align: left; padding: 12px; border-radius: 20px; border: 1px solid var(--trait);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 13%, transparent), transparent 70%), var(--surface); box-shadow: var(--ombre-douce); transition: transform .14s, border-color .2s; }
.situation:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 45%, var(--trait)); }
.situation:active { transform: scale(.98); }
.situation-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--c); color: #fff; box-shadow: 0 8px 16px -10px var(--c); }
.situation-ic .ic { width: 22px; height: 22px; }
.situation-texte { display: grid; gap: 1px; min-width: 0; }
.situation-texte strong { font-size: 15px; font-weight: 750; line-height: 1.2; }
.situation-texte span { font-size: 12.5px; color: var(--doux); }

/* Ce soir à Kinshasa */
.collections { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.collections::-webkit-scrollbar { display: none; }
.collections li { flex: 0 0 172px; scroll-snap-align: start; }
.collection { width: 100%; height: 100%; display: grid; gap: 4px; align-content: start; text-align: left; padding: 14px; border-radius: 20px; border: 1px solid var(--trait); background: var(--surface); box-shadow: var(--ombre-douce); }
.collection-haut { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.collection-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }
.collection-nb { font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: var(--c); font-variant-numeric: tabular-nums; }
.collection strong { font-size: 14.5px; line-height: 1.25; }
.collection-sous { font-size: 12.5px; color: var(--doux); }
.collection.a-venir { border-style: dashed; background: linear-gradient(160deg, rgba(247, 214, 24, .14), transparent 70%), var(--surface); }
.pastille-bientot { padding: 3px 9px; border-radius: 999px; background: var(--jaune); color: var(--sur-jaune); font-size: 12px; font-weight: 800; }

/* Tout Kinshasa : grille façon écran d'accueil */
.niveau + .niveau { margin-top: 18px; }
.niveau-titre { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 750; color: var(--doux); margin: 0 2px 10px; }
.pastille-niveau { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.lanceur { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tuile { width: 100%; height: 100%; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 10px 4px; border-radius: 16px; border: 0; background: none; text-align: center; transition: background .15s; }
.tuile:hover { background: var(--surface-douce); }
.tuile-ic { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); }
.tuile-ic .ic { width: 24px; height: 24px; }
.tuile-nom { font-size: 12px; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tuile-nb { font-size: 11.5px; color: var(--doux); font-variant-numeric: tabular-nums; }
.vide-cat { opacity: .5; cursor: default; }
.vide-cat .tuile-ic { background: transparent; border-style: dashed; }

.engagement { margin-top: 24px; padding: 16px; border-radius: 20px; background: var(--surface-douce); border: 1px solid var(--trait); font-size: 14px; color: var(--doux); }
.engagement strong { color: var(--texte); display: block; margin-bottom: 4px; }
.credit { margin: 14px 2px 0; font-size: 12px; color: var(--doux); }
.credit a { color: var(--bleu); }

/* ===== Liste ===== */
.entete-liste { display: flex; align-items: center; gap: 10px; padding: 2px 0 10px; }
.entete-titre h2 { font-size: 21px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.entete-titre p { font-size: 13.5px; }
.filtres { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 12px; margin: 0 -16px; scrollbar-width: none; }
.filtres::-webkit-scrollbar { display: none; }
.select select { appearance: none; height: 38px; padding: 0 34px 0 14px; border-radius: 12px; border: 1px solid var(--trait); background: var(--surface-forte) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a8bab' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; font-weight: 600; font-size: 14px; color: var(--texte); }
.puce-filtre { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--trait); background: var(--surface-forte); font-weight: 600; font-size: 14px; white-space: nowrap; }
.puce-filtre .ic { width: 16px; height: 16px; }
.puce-filtre[aria-pressed="true"] { background: var(--texte); color: var(--fond-carte); border-color: transparent; }
.rond-jaune, .rond-vert, .rond-rouge { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.rond-jaune { background: var(--jaune); box-shadow: 0 0 0 3px rgba(247, 214, 24, .3); }
.rond-vert { background: var(--vert); box-shadow: 0 0 0 3px color-mix(in srgb, var(--vert) 25%, transparent); }
.rond-rouge { background: var(--rouge); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rouge) 25%, transparent); }
.liste { display: grid; gap: 8px; }
.ligne { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; border-radius: 18px; border: 1px solid var(--trait); background: var(--surface); cursor: pointer; transition: border-color .15s, transform .12s; }
.ligne:hover { border-color: color-mix(in srgb, var(--c) 40%, var(--trait)); }
.ligne:active { transform: scale(.99); }
.ligne-ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 13px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.ligne-corps { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ligne-corps strong { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sans-nom { color: var(--doux); font-weight: 600 !important; font-style: italic; }
.ligne-meta { font-size: 13px; color: var(--doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-etat { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; }
.ligne-dist { color: var(--doux); } .ligne-dist b { color: var(--texte); }
.etat { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.etat::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.etat-ouvert { color: var(--vert); } .etat-bientot { color: var(--ambre); } .etat-ferme { color: var(--rouge); } .etat-inconnu { color: var(--gris); font-weight: 600; }
.badge-garde { padding: 2px 8px; border-radius: 7px; background: var(--jaune); color: var(--sur-jaune); font-size: 12px; font-weight: 800; }
.ligne-action { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--trait); background: var(--surface-forte); color: var(--bleu); }
.ligne-action.appel { background: var(--bleu); color: var(--sur-bleu); border-color: transparent; }
.vide { padding: 24px 16px; display: grid; gap: 8px; justify-items: start; color: var(--doux); border-radius: 20px; border: 1px dashed var(--trait); }
.vide strong { color: var(--texte); font-size: 16px; }
.vide-ic .ic { width: 28px; height: 28px; color: var(--bleu); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 16px; border-radius: 16px; border: 0; font-weight: 750; font-size: 15.5px; text-decoration: none; white-space: nowrap; transition: transform .15s; }
.btn:hover { transform: translateY(-2px); } .btn:active { transform: scale(.98); }
.btn:disabled:hover { transform: none; }
.btn-petit { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn-petit .ic { width: 17px; height: 17px; }
.btn-primaire { background: var(--bleu); color: var(--sur-bleu); box-shadow: 0 12px 26px -14px var(--bleu); }
.btn-second { background: var(--surface-forte); border: 1px solid var(--trait); }
.btn-plein-largeur { width: 100%; margin-top: 12px; }
.btn-lien { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 0; color: var(--bleu); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.btn-lien .ic { width: 16px; height: 16px; }

/* ===== Feuilles : fiche et SOS ===== */
.feuille { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-end; background: rgba(0,0,0,0); transition: background .25s; }
.feuille.ouverte { background: rgba(0,0,0,.3); }
.feuille-corps { position: relative; width: 100%; max-height: 92dvh; overflow-y: auto; padding: 22px 18px calc(24px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0;
  background: var(--fond-panneau); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); border-top: 1px solid var(--trait); transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.feuille.ouverte .feuille-corps { transform: none; }
.fermer-x { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--trait); background: var(--surface-forte); }
.fiche-cat { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 8px; border-radius: 10px; font-size: 13px; font-weight: 750; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.fiche-cat .ic { width: 16px; height: 16px; }
#fiche-nom { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.12; margin: 10px 50px 4px 0; }
.fiche-etat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: 14.5px; }
.fiche-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 18px 0 6px; }
.fiche-actions.sans-tel { grid-template-columns: 2fr 1fr; }
.fiche-actions .btn { padding: 0 8px; font-size: 15px; }
.bloc { margin-top: 18px; }
.bloc h3 { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.semaine { border-radius: 16px; border: 1px solid var(--trait); overflow: hidden; }
.semaine li { display: flex; justify-content: space-between; padding: 9px 14px; font-size: 14px; background: var(--surface); }
.semaine li + li { border-top: 1px solid var(--trait); }
.semaine li span:first-child { text-transform: capitalize; color: var(--doux); }
.semaine li.aujourdhui { background: var(--bleu-doux); font-weight: 750; }
.semaine li.aujourdhui span:first-child { color: var(--texte); }
.fiche-infos { border-radius: 16px; border: 1px solid var(--trait); overflow: hidden; }
.fiche-infos li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; font-size: 15px; background: var(--surface); }
.fiche-infos li + li { border-top: 1px solid var(--trait); }
.fiche-infos li > :last-child:is(.btn-lien) { margin-left: auto; }
.fiche-infos .ic { color: var(--doux); }
.fiche-infos a { color: var(--bleu); font-weight: 650; text-decoration: none; }
.fiche-infos .manque { color: var(--doux); }
.terrain { padding: 16px; border-radius: 20px; background: var(--surface-douce); border: 1px solid var(--trait); }
.terrain h3 { margin-bottom: 2px; }
.terrain-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.terrain-boutons .btn { min-height: 46px; font-size: 14.5px; }
.fiche-pied { margin-top: 14px; display: grid; gap: 4px; }
.corriger { margin-top: 14px; padding: 16px; border-radius: 20px; background: var(--bleu-doux); display: grid; gap: 10px; }
.corriger h3 { font-size: 16px; }
.corriger label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.corriger select, .corriger textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--trait); background: var(--surface-forte); font-size: 16px; font-weight: 500; color: var(--texte); }

.feuille-sos .feuille-corps { border-top: 4px solid var(--rouge); }
.sos-sur { font-size: 13px; font-weight: 800; color: var(--rouge); }
#sos-titre { font-size: 27px; font-weight: 800; letter-spacing: -.03em; margin: 4px 0 14px; }
.sos-numeros { display: grid; gap: 8px; }
.sos-numero { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; border: 1px solid var(--trait); background: var(--surface); text-decoration: none; }
.sos-numero.indisponible { opacity: .78; }
.sos-ic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }
.sos-numero .appel { background: var(--rouge); color: #fff; }
.sos-position { margin-top: 18px; padding: 16px; border-radius: 20px; background: color-mix(in srgb, var(--rouge) 8%, transparent); border: 1px solid color-mix(in srgb, var(--rouge) 25%, transparent); }
.sos-position h3, .sos-proche h3 { font-size: 16px; font-weight: 800; }
.sos-position p { font-size: 14px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.sos-actions { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.sos-actions .btn { min-height: 48px; font-size: 14.5px; padding: 0 8px; }
.sos-actions.inactif { opacity: .5; }
.btn-whatsapp { background: #1f9d55; color: #fff; }
.sos-proche { margin-top: 18px; }
.sos-proche h3 { margin-bottom: 8px; }

/* Annonce */
.annonce { position: fixed; z-index: 3000; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translate(-50%, -160%); max-width: min(92vw, 460px); padding: 12px 16px; border-radius: 14px; background: var(--texte); color: var(--fond-carte); font-weight: 600; font-size: 14.5px; box-shadow: var(--ombre); transition: transform .3s; }
.annonce.visible { transform: translate(-50%, 0); }

/* ===== Ordinateur : panneau à gauche sous l'en-tête réel, carte à droite ===== */
@media (min-width: 1024px) {
  .situation { grid-template-columns: auto 1fr; align-items: center; align-content: center; }
  .haut { left: 24px; right: auto; width: 460px; top: 20px; padding: 0; }
  .raccourcis { margin: 0; padding: 10px 0 12px; }
  .panneau, .panneau[data-hauteur] { left: 24px; right: auto; top: var(--bas-haut, 140px); bottom: 24px; width: 460px; height: auto; border-radius: 26px; border: 1px solid var(--trait); }
  .poignee { display: none; }
  .defile { padding-top: 16px; }
  .flottants { right: 24px; bottom: 24px; }
  .leaflet-top.leaflet-right { top: 14px; right: 14px; }
  .feuille { align-items: stretch; justify-content: flex-start; pointer-events: none; background: transparent !important; }
  .feuille-corps { pointer-events: auto; position: absolute; left: 500px; top: 20px; width: 430px; max-height: calc(100dvh - 40px); border-radius: 26px; border: 1px solid var(--trait); transform: translateX(-16px); opacity: 0; transition: transform .25s, opacity .25s; box-shadow: var(--ombre); }
  .feuille.ouverte .feuille-corps { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ===== Écran d'ouverture ===== */
.ouverture { position: fixed; inset: 0; z-index: 6000; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; cursor: pointer;
  background: radial-gradient(70% 50% at 50% 40%, color-mix(in srgb, var(--bleu) 14%, transparent), transparent 70%), var(--fond-carte); transition: opacity .4s ease, visibility .4s; }
.ouverture.fini { opacity: 0; visibility: hidden; }
.ouverture-logo { width: 168px; height: 168px; display: grid; place-items: center; }
.ouverture-logo img { opacity: 0; }
.ouverture-nom { font-size: 26px; letter-spacing: -.03em; font-weight: 500; color: var(--texte); opacity: 0; transform: translateY(8px); transition: opacity .35s .55s, transform .35s .55s; }
.ouverture-nom b { font-weight: 800; }
.ouverture-sous { font-size: 14px; color: var(--doux); opacity: 0; transition: opacity .35s .75s; }
.ouverture.joue .ouverture-nom { opacity: 1; transform: none; }
.ouverture.joue .ouverture-sous { opacity: 1; }

.sos-source { margin-top: 8px; } .sos-source a { color: var(--bleu); }
.sos-numero.indisponible .ligne-meta { white-space: normal; }
.badge-nuit { padding: 2px 8px; border-radius: 7px; background: var(--bleu-doux); color: var(--bleu); font-size: 12px; font-weight: 800; }

/* ===== Mes lieux, confirmation datée, fiche d'urgence ===== */
.etoile { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--trait); background: var(--surface-forte); font-weight: 700; font-size: 13.5px; color: var(--doux); }
.etoile .ic { width: 17px; height: 17px; }
.etoile.active { background: var(--jaune); border-color: transparent; color: var(--sur-jaune); }
.etoile.active .ic path { fill: currentColor; }
.confirme { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; font-weight: 700; color: var(--vert); }
.confirme .ic { width: 18px; height: 18px; }
.sos-fiche { margin-top: 16px; }
.fu-invite { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px; border-radius: 18px; border: 1px dashed color-mix(in srgb, var(--bleu) 45%, var(--trait)); background: var(--bleu-doux); }
.fu-invite > .ic { width: 22px; height: 22px; color: var(--bleu); flex: none; }
.fu-invite span { display: grid; gap: 2px; }
.fu-carte { padding: 14px 16px; border-radius: 20px; border: 1px solid var(--trait); background: var(--surface); }
.fu-entete { display: flex; align-items: center; justify-content: space-between; }
.fu-entete h3 { font-size: 16px; font-weight: 800; }
.fu-carte dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 10px 0 0; }
.fu-carte dt { font-size: 12px; color: var(--doux); }
.fu-carte dd { margin: 0; font-weight: 700; }
.fu-groupe { font-size: 22px; color: var(--rouge); }
.fu-proche { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.fu-proche .btn { min-height: 46px; font-size: 14px; padding: 0 8px; }
.fu-titre { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; padding-right: 50px; }
.fu-form { display: grid; gap: 12px; margin-top: 14px; }
.fu-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.fu-form input, .fu-form select { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--trait); background: var(--surface-forte); color: var(--texte); font-size: 16px; }
.fu-form fieldset { border: 1px solid var(--trait); border-radius: 16px; padding: 10px 12px 12px; display: grid; gap: 10px; }
.fu-form legend { font-weight: 800; font-size: 14px; padding: 0 4px; }
.fu-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.fu-proche .btn { white-space: normal; line-height: 1.2; text-align: center; }

/* ===== Espace établissements sur la partie publique ===== */
.bandeau-fermeture { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 4px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--rouge) 10%, transparent); border: 1px solid color-mix(in srgb, var(--rouge) 35%, transparent); }
.bandeau-fermeture .ic { width: 22px; height: 22px; flex: none; color: var(--rouge); margin-top: 1px; }
.bandeau-fermeture div { display: grid; gap: 2px; font-size: 14px; }
.bandeau-fermeture strong { color: var(--texte); }
.bandeau-fermeture span { color: var(--doux); }

.banniere { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px; border-radius: 18px; text-decoration: none; color: var(--texte); background: linear-gradient(135deg, color-mix(in srgb, var(--jaune) 18%, transparent), var(--surface-douce)); border: 1px solid color-mix(in srgb, var(--jaune) 45%, var(--trait)); transition: transform .15s ease, box-shadow .15s ease; }
a.banniere:hover { transform: translateY(-1px); box-shadow: var(--ombre-douce); }
.banniere img { width: 58px; height: 58px; flex: none; border-radius: 12px; object-fit: cover; }
.banniere-ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--jaune); color: var(--sur-jaune); }
.banniere-ic .ic { width: 22px; height: 22px; }
.banniere-texte { display: grid; gap: 2px; min-width: 0; flex: 1; font-size: 14px; }
.banniere-texte span { color: var(--doux); }
.banniere-etiquette { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.banniere > .ic { width: 18px; height: 18px; flex: none; color: var(--doux); }

.gerant { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 16px; border: 1px dashed var(--trait); text-decoration: none; color: var(--texte); background: var(--surface); }
.gerant:hover { border-color: var(--bleu); }
.gerant > .ic:first-child { width: 22px; height: 22px; flex: none; color: var(--bleu); }
.gerant > .ic:last-child { width: 18px; height: 18px; flex: none; color: var(--doux); margin-left: auto; }
.gerant > span { display: grid; gap: 2px; font-size: 14px; }

.ajouter-etab { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 16px; border-radius: 20px; text-decoration: none; color: var(--texte); background: var(--surface-forte); border: 1px solid var(--trait); box-shadow: var(--ombre-douce); transition: transform .15s ease; }
.ajouter-etab:hover { transform: translateY(-2px); }
.ajouter-etab > span:nth-child(2) { display: grid; gap: 3px; font-size: 14px; flex: 1; }
.ajouter-etab-ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--bleu-doux); color: var(--bleu); }
.ajouter-etab-plus { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--bleu); color: var(--sur-bleu); }
.ajouter-etab .ic { width: 20px; height: 20px; }

/* ===== Annuaire (liens vers les pages servies sans JavaScript) ===== */
.annuaire { margin-top: 14px; }
.annuaire ul { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 8px; }
.annuaire a { display: inline-block; padding: 6px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--trait); color: var(--texte); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.annuaire a:hover { border-color: var(--bleu); }

/* ===== Partager une fiche ===== */
.feuille-partage { z-index: 2100; }
.partage-titre { font-size: 20px; font-weight: 800; margin-bottom: 12px; padding-right: 48px; }
.partage-apercu { font-size: 14px; padding: 10px 12px; border-radius: 12px; background: var(--surface-douce); overflow-wrap: anywhere; margin-bottom: 12px; }
.partage-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 12px; }
.choix { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; background: var(--surface-forte); border: 1px solid var(--trait); color: var(--texte); font-weight: 700; font-size: 14px; text-decoration: none; text-align: left; }
.choix:hover { border-color: var(--bleu); }
.choix .ic { color: var(--bleu); }
.partage-lien input { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--trait); background: var(--surface); color: var(--texte); font-size: 14px; }
/* Ordinateur : le panneau s'ouvre juste à droite de la fiche (fiche : left 500 px, largeur 430 px), aligné sur son haut,
   sans jamais sortir de l'écran sur un petit ordinateur. */
@media (min-width: 1024px) { .feuille-partage .feuille-corps { left: 946px; right: auto; width: 400px; } }
/* Petit ordinateur : pas la place à droite de la fiche ; le panneau prend la place de la liste, juste à gauche de la fiche. */
@media (min-width: 1024px) and (max-width: 1365px) { .feuille-partage .feuille-corps { left: 20px; width: 460px; } }

/* Messenger ne s'ouvre que dans l'application mobile : bouton masqué sur ordinateur (souris), où il ne ferait rien. */
@media (hover: hover) and (pointer: fine) { .partage-choix li:has(a[href^="fb-messenger:"]) { display: none; } }

/* ===== Panneau de partage v2 : vrais logos des plateformes, en pastilles, comme une feuille de partage de téléphone ===== */
.partage-apercu { display: grid; gap: 2px; font-size: 14px; line-height: 1.4; padding: 12px 14px; border-radius: 14px; background: var(--surface-douce); overflow-wrap: anywhere; }
.partage-apercu strong { font-size: 15px; color: var(--texte); }
.partage-apercu span { color: var(--doux); }
.partage-choix { list-style: none; margin: 0; padding: 4px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; }
.partage-choix .choix { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 100%; min-height: 0; padding: 4px 2px; border: 0; border-radius: 14px; background: none; color: var(--texte); font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transform: none; }
.partage-choix .choix:hover, .partage-choix .choix:focus-visible { border: 0; transform: none; background: var(--surface-douce); }
.partage-choix .choix:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }
.logo { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .45); transition: transform .15s ease; }
.choix:hover .logo { transform: translateY(-2px) scale(1.04); }
.logo svg { width: 26px; height: 26px; }
.logo-whatsapp { background: #25D366; }
.logo-facebook { background: #0866FF; }
.logo-messenger { background: linear-gradient(45deg, #0099FF 0%, #A033FF 60%, #FF5280 90%, #FF7061 100%); }
.logo-x { background: #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 6px 14px -8px rgba(0, 0, 0, .45); }
.logo-x svg { width: 22px; height: 22px; }
.logo-telegram { background: #26A5E4; }
.logo-linkedin { background: #0A66C2; }
.logo-sms { background: #34C759; }
.logo-courriel { background: #5B6473; }
.logo-plus { background: var(--surface-douce); color: var(--texte); box-shadow: inset 0 0 0 1px var(--trait); }
.partage-copie { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 14px; border: 1px solid var(--trait); background: var(--surface); }
.partage-copie input { flex: 1; min-width: 0; border: 0; background: none; color: var(--texte); font: inherit; font-size: 14px; padding: 8px 0; outline: none; text-overflow: ellipsis; }
.btn-copier { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--bleu); color: var(--sur-bleu); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn-copier:hover { filter: brightness(1.08); }
.btn-copier.ok { background: #0f8a4b; color: #fff; }
.partage-lien { display: none; }
@media (max-width: 380px) { .logo { width: 48px; height: 48px; } .partage-choix { gap: 12px 2px; } }
/* Messenger ne s'ouvre que dans l'application mobile : bouton masqué sur ordinateur (souris), où il ne ferait rien. */
@media (hover: hover) and (pointer: fine) { .partage-choix li:has(a[href^="fb-messenger:"]) { display: none; } }
#partage-contenu { display: grid; gap: 14px; }
