/* Carte des pistes DFCI (/carte-dfci) — préfixe md-carte-dfci-. Socle : pages.css.
 * Les sélecteurs #kd-dfci-* / .kd-* sont ceux de la carte MapLibre (script inline de la vue) : ne pas les renommer. */

.md-carte-dfci-hero { padding-bottom: 26px; }
.md-carte-dfci-hero h1 { font-size: clamp(32px, 4.6vw, 52px); }
.md-carte-dfci-hero .pg-hero-grid.solo { max-width: var(--maxw, 1280px); }
.md-carte-dfci-hero .pg-hero-grid.solo > div { max-width: 860px; }

/* ── Outil ── */
.md-carte-dfci-tool { padding: 0 0 10px; scroll-margin-top: calc(var(--top) + 12px); }
.md-carte-dfci-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 10px; font-size: 12.5px; color: var(--text-muted); }
.md-carte-dfci-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.md-carte-dfci-legend i { position: relative; display: inline-block; width: 34px; height: 14px; border-radius: 4px; background: #eef1ea; }
.md-carte-dfci-legend i::after { content: ""; position: absolute; left: 5px; right: 5px; top: 50%; transform: translateY(-50%); }
.md-carte-dfci-legend i.c1::after { height: 6px; border-top: 2px solid #FF2A20; border-bottom: 2px solid #FF2A20; background: #fff; box-sizing: border-box; }
.md-carte-dfci-legend i.c2::after { border-top: 3px solid #FF2A20; }
.md-carte-dfci-legend i.c3::after { border-top: 3px dashed #FF2A20; }
.md-carte-dfci-legend i.hc::after { border-top: 3px dashed #111; }
#kd-dfci-status { margin-left: auto; font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

#kd-dfci-wrap { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(242,76,192,.08); }
#kd-dfci-map { height: 74vh; min-height: 460px; width: 100%; background: #0a0e14; }
.kd-panel { position: absolute; z-index: 5; background: rgba(10,19,34,.88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 12px; color: #eaf0f7; font: 13px/1.4 Inter, system-ui, sans-serif;
  box-shadow: 0 8px 30px rgba(0,0,0,.4); }
#kd-dfci-ctl { top: 12px; right: 12px; padding: 10px 12px; width: 200px; }
/* Titres du panneau : h2 (hiérarchie h1 → h2), rendu identique à l'ancien h4. */
#kd-dfci-ctl h2 { margin: 0 0 6px; font-size: 11px; font-weight: 700; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; color: #9fb0c3; }
#kd-dfci-ctl label { display: flex; align-items: center; gap: 7px; padding: 3px 0; cursor: pointer; }
#kd-dfci-ctl input { accent-color: #f24cc0; }
#kd-dfci-ctl .kd-sep { height: 1px; background: rgba(255,255,255,.1); margin: 8px 0; }
#kd-dfci-tip { position: absolute; z-index: 6; pointer-events: none; padding: 3px 7px; background: #FF3b30; color: #fff;
  font: 600 12px/1.3 'JetBrains Mono', ui-monospace, monospace; border-radius: 5px; transform: translate(-50%, -140%); white-space: nowrap;
  display: none; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
#kd-dfci-sheet { bottom: 12px; left: 12px; width: 300px; max-width: calc(100% - 24px); padding: 14px 16px; display: none; border-color: rgba(242,76,192,.35); }
#kd-dfci-sheet .kd-code { font: 700 18px/1.1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .02em; }
#kd-dfci-sheet .kd-cat { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; margin-left: 6px; vertical-align: middle; }
#kd-dfci-sheet dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 10px 0 0; }
#kd-dfci-sheet dt { color: #9fb0c3; }
#kd-dfci-sheet dd { margin: 0; text-align: right; }
#kd-dfci-sheet .kd-close { position: absolute; top: 8px; right: 10px; cursor: pointer; color: #9fb0c3; font-size: 18px; line-height: 1; background: none; border: 0; }
#kd-dfci-sheet .kd-close:hover { color: #fff; }
.md-carte-dfci-tool .maplibregl-ctrl-attrib { font-size: 10px; }
.md-carte-dfci-attrib { margin: 10px 0 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.55; }

/* ── Catégories ── */
.md-carte-dfci-cat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.md-carte-dfci-sw { width: 120px; height: 18px; flex: 0 0 auto; padding: 2px 0; border-radius: 5px; background: #eef1ea; }
.md-carte-dfci-sw path { fill: none; stroke-linecap: round; }
.md-carte-dfci-sw.c1 path { stroke: #FF2A20; stroke-width: 8; }
.md-carte-dfci-sw.c1 path.in { stroke: #fff; stroke-width: 3; }
.md-carte-dfci-sw.c2 path { stroke: #FF2A20; stroke-width: 4; }
.md-carte-dfci-sw.c3 path { stroke: #FF2A20; stroke-width: 4; stroke-dasharray: 8 6; stroke-linecap: butt; }
.md-carte-dfci-sw.hc path { stroke: #111; stroke-width: 4; stroke-dasharray: 8 6; stroke-linecap: butt; }
.md-carte-dfci-sw path.in { stroke: none; }
.md-carte-dfci-sw.c1 path.in { stroke: #fff; }

.md-carte-dfci-badges { margin-top: 20px; }

/* ── Autres modules ── */
.md-carte-dfci-others { margin-top: 34px; }
.md-carte-dfci-others > b { display: block; font: 700 12px Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.md-carte-dfci-others .pg-card h3 { font-size: 16px; margin-bottom: 4px; }
.md-carte-dfci-others .pg-card p { font-size: 13.5px; }

@media (max-width: 640px) {
  #kd-dfci-map { height: 68vh; min-height: 380px; }
  #kd-dfci-ctl { width: 168px; padding: 8px 10px; font-size: 12px; }
  #kd-dfci-status { margin-left: 0; width: 100%; }
}

/* Colonne de contenu : laisse les tableaux défiler au lieu d'élargir la page sur mobile. */
.md-carte-dfci .pg-layout > * { min-width: 0; }

/* H1 orienté requête ; la phrase narrative passe en sous-titre juste dessous (oct. 2026). */
.kd-h1s { font-size: clamp(21px, 2.7vw, 30px); line-height: 1.2; letter-spacing: -.015em; font-weight: 700; color: #e6edf6;
  margin: -4px 0 18px; max-width: 680px; text-wrap: balance; }

/* Maillage interne en pied de page : termes du glossaire et autres modules (modules/_liens.php). */
.kd-rel { display: grid; gap: 10px; margin-top: 22px; }
.kd-rel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.kd-rel-row > b { font: 700 12px Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim, #6f809b); }
.kd-rel-row .pg-meta { margin-top: 0; gap: 6px; }
.kd-rel-row .pg-meta a { padding: 5px 10px; font-size: 12.5px; }
