:root {
  --navy: #17375e;
  --navy-deep: #102a47;
  --navy-soft: #e9eff5;
  --orange: #e95d2a;
  --green: #55a630;
  --green-dark: #347a28;
  --lime: #87b940;
  --yellow: #f2c230;
  --blue: #168aad;
  --red: #c53b38;
  --ink: #18212f;
  --muted: #5f6b7a;
  --line: #dbe2e8;
  --surface: #ffffff;
  --surface-alt: #f5f7f8;
  --warning-bg: #fff7dd;
  --danger-bg: #fff0ef;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(16, 42, 71, 0.08);
  --sidebar-width: 248px;
}

/* Structure générale : en-tête, menu latéral et contenu principal */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface-alt);
  font-family: Marianne, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
.filter-panel[hidden] { display: none; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  color: white;
  background: var(--navy);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  min-height: 84px;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr auto auto;
  align-items: center;
  color: white;
  background: var(--navy-deep);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.brand {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: var(--ink);
  background: white;
}

.brand strong { display: block; font-size: 1.45rem; letter-spacing: -0.04em; }
.brand small { display: block; max-width: 120px; font-size: 0.63rem; line-height: 1.2; text-transform: uppercase; }

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  transform: skewY(-12deg);
}

.brand-mark span:nth-child(1) { background: var(--orange); }
.brand-mark span:nth-child(2) { background: var(--green); }
.brand-mark span:nth-child(3) { background: var(--yellow); }
.brand-mark span:nth-child(4) { background: var(--blue); }
.brand-mark span:nth-child(5) { background: var(--lime); }

.header-title { padding: 13px 28px; }
.header-title p { margin: 0 0 2px; color: #b9d1e5; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.header-title h1 { margin: 0; font-size: clamp(1.1rem, 2vw, 1.55rem); font-weight: 650; }
.mobile-menu-button { display: none; }
.language-switch { display: flex; gap: 3px; margin-right: 18px; padding: 3px; border: 1px solid rgba(255, 255, 255, 0.38); border-radius: 5px; }
.language-switch button { min-width: 36px; padding: 5px 7px; border: 0; border-radius: 3px; color: white; background: transparent; font-size: 0.72rem; font-weight: 750; }
.language-switch button.active { color: var(--navy); background: white; }

.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }

.sidebar {
  position: fixed;
  z-index: 40;
  top: 84px;
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  color: white;
  background: var(--navy);
}

.nav-label {
  padding: 24px 20px 8px;
  color: #b9d1e5;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-button {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border: 0;
  border-left: 4px solid transparent;
  color: #eef6fb;
  background: transparent;
  text-align: left;
}

.nav-button:hover { background: rgba(255, 255, 255, 0.08); }
.nav-button.active { border-left-color: var(--yellow); color: white; background: rgba(255, 255, 255, 0.13); font-weight: 700; }
.nav-icon { font-size: 1.15rem; text-align: center; }

.sidebar-footnote {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px;
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: #d8e5ef;
}

.sidebar-footnote strong, .sidebar-footnote small { display: block; }
.sidebar-footnote strong { font-size: 0.78rem; }
.sidebar-footnote small { margin-top: 3px; font-size: 0.68rem; }
.status-dot { flex: 0 0 auto; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: #73c751; box-shadow: 0 0 0 4px rgba(115, 199, 81, 0.16); }

main { grid-column: 2; min-width: 0; padding: 24px 28px 10px; }

/* Filtres communs à toutes les pages d'analyse */

.filter-panel {
  margin-bottom: 24px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.filter-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.filter-heading strong { display: block; color: var(--navy); font-size: 1.04rem; }
.eyebrow { display: block; margin-bottom: 2px; color: var(--muted); font-size: 0.68rem; font-weight: 750; letter-spacing: 0.11em; text-transform: uppercase; }
.text-button { padding: 4px; border: 0; border-bottom: 1px solid currentColor; color: var(--navy); background: none; font-size: 0.82rem; }

.filter-grid { display: grid; grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr)) auto; gap: 12px; align-items: end; }
.filter-grid label > span:first-child { display: block; margin-bottom: 5px; color: var(--muted); font-size: 0.75rem; font-weight: 650; }
.filter-grid input[type="search"], .filter-grid select {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #aeb9c4;
  border-radius: 6px;
  color: var(--ink);
  background: white;
}
.filter-grid input:focus, .filter-grid select:focus, button:focus-visible { outline: 3px solid rgba(22, 138, 173, 0.33); outline-offset: 2px; }

.toggle-field { min-height: 42px; display: flex; align-items: center; gap: 8px; padding-bottom: 2px; white-space: nowrap; }
.toggle-field > span:last-child { color: var(--ink) !important; font-size: 0.78rem !important; }
.toggle-field input { position: absolute; opacity: 0; }
.toggle-control { position: relative; flex: 0 0 auto; width: 39px; height: 22px; margin: 0 !important; border-radius: 20px; background: #aeb9c4; transition: 0.2s; }
.toggle-control::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: 0.2s; }
.toggle-field input:checked + .toggle-control { background: var(--green-dark); }
.toggle-field input:checked + .toggle-control::after { transform: translateX(17px); }

/* Titres, KPI, cartes et messages */

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 2px 0 20px; }
.page-heading h2 { margin: 2px 0 4px; color: var(--navy); font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.12; }
.data-scope { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--navy); background: white; font-size: 0.78rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi-card { position: relative; min-height: 137px; overflow: hidden; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.kpi-card::after { content: ""; position: absolute; right: -17px; bottom: -22px; width: 82px; height: 82px; border-radius: 50%; background: var(--accent, var(--navy)); opacity: 0.08; }
.kpi-card .kpi-icon { float: right; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--accent, var(--navy)); background: color-mix(in srgb, var(--accent, var(--navy)) 12%, white); }
.kpi-card small { display: block; max-width: 80%; color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.kpi-card strong { display: block; margin: 11px 0 2px; color: var(--navy); font-size: 2rem; line-height: 1; }
.kpi-card p { margin: 6px 0 0; color: var(--muted); font-size: 0.76rem; }

.dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.card { grid-column: span 6; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.card.wide { grid-column: span 8; }
.card.narrow { grid-column: span 4; }
.card.full { grid-column: 1 / -1; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.card-header h3 { margin: 0; color: var(--navy); font-size: 1rem; }
.card-header p { margin: 3px 0 0; color: var(--muted); font-size: 0.76rem; }
.card-tag { flex: 0 0 auto; padding: 4px 7px; border-radius: 4px; color: var(--navy); background: var(--navy-soft); font-size: 0.68rem; font-weight: 700; }

.notice { display: flex; gap: 12px; margin-bottom: 18px; padding: 14px 16px; border-left: 4px solid var(--yellow); border-radius: 4px var(--radius) var(--radius) 4px; background: var(--warning-bg); font-size: 0.84rem; }
.notice.danger { border-left-color: var(--red); background: var(--danger-bg); }
.notice.info { border-left-color: var(--blue); background: #eaf7fb; }
.notice strong { color: var(--navy); }
.notice-icon { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 50%; font-weight: 800; }

/* Graphiques génériques */

.bar-chart { display: grid; gap: 12px; }
.bar-row { min-width: 0; }
.bar-label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; font-size: 0.78rem; }
.bar-label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label strong { flex: 0 0 auto; color: var(--navy); }
.bar-label small { color: var(--muted); font-weight: 500; }
.bar-track { height: 7px; overflow: hidden; border-radius: 10px; background: #edf1f4; }
.bar-track span { display: block; height: 100%; border-radius: inherit; }

.donut-layout { width: fit-content; max-width: 100%; display: grid; grid-template-columns: auto auto; gap: 18px; align-items: center; justify-content: start; }
.donut { width: 150px; height: 150px; display: grid; place-items: center; border-radius: 50%; }
.donut > div { width: 94px; height: 94px; display: grid; place-content: center; border-radius: 50%; background: white; text-align: center; }
.donut strong { color: var(--navy); font-size: 1.55rem; line-height: 1; }
.donut span { max-width: 70px; margin-top: 4px; color: var(--muted); font-size: 0.67rem; line-height: 1.15; }
.legend { width: fit-content; max-width: 100%; display: grid; gap: 9px; }
.legend > div { display: grid; grid-template-columns: 9px minmax(70px, 190px) auto; gap: 8px; align-items: center; font-size: 0.76rem; }
.legend i { width: 9px; height: 9px; border-radius: 2px; }
.legend strong { color: var(--navy); }

.insight-list { display: grid; gap: 11px; }
.insight { padding: 13px 14px; border-left: 3px solid var(--accent, var(--blue)); background: var(--surface-alt); }
.insight strong { display: block; color: var(--navy); font-size: 0.87rem; }
.insight span { display: block; margin-top: 3px; color: var(--muted); font-size: 0.74rem; }

/* Carte mondiale et panneau des points regroupés */

.world-map { position: relative; max-width: 960px; margin: 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #edf7fa; aspect-ratio: 960 / 440; }
.world-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-grid path { fill: none; stroke: #bdd4dc; stroke-width: 1; stroke-dasharray: 4 6; }
.countries path { stroke: #ffffff; stroke-width: 0.65; vector-effect: non-scaling-stroke; fill-rule: evenodd; transition: fill 0.15s, stroke 0.15s; }
.countries .country-with-data { cursor: pointer; stroke: #f7fafb; stroke-width: 0.9; }
.countries .country-with-data:hover, .countries .country-with-data:focus { fill: var(--yellow) !important; stroke: var(--navy); outline: none; }
.map-svg-point { cursor: pointer; fill: var(--orange); stroke: white; stroke-width: 2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 2px rgba(16, 42, 71, 0.55)); }
.map-svg-point:hover, .map-svg-point:focus { fill: var(--yellow); stroke: var(--navy); stroke-width: 2.5; outline: none; }
.map-cluster { cursor: pointer; filter: drop-shadow(0 1px 3px rgba(16, 42, 71, 0.55)); }
.map-cluster circle { fill: var(--navy); stroke: white; stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.map-cluster text { fill: white; font-size: 9px; font-weight: 800; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.map-cluster:hover circle, .map-cluster:focus circle { fill: var(--yellow); stroke: var(--navy); }
.map-cluster:hover text, .map-cluster:focus text { fill: var(--navy); }
.map-controls { position: absolute; z-index: 4; top: 10px; left: 10px; display: flex; gap: 3px; align-items: center; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, 0.94); box-shadow: 0 2px 10px rgba(16, 42, 71, 0.14); }
.map-controls button { min-width: 31px; height: 31px; padding: 0 7px; border: 1px solid #b8c4cf; border-radius: 4px; color: var(--navy); background: white; font-weight: 750; line-height: 1; }
.map-controls button:hover { color: white; background: var(--navy); }
.map-control-separator { width: 1px; height: 22px; margin: 0 2px; background: var(--line); }
.map-zoom-level { position: absolute; z-index: 3; top: 54px; left: 10px; padding: 4px 7px; border-radius: 4px; color: var(--navy); background: rgba(255, 255, 255, 0.9); font-size: 0.65rem; font-weight: 700; }
.map-cluster-panel { position: absolute; z-index: 6; top: 10px; right: 10px; width: min(340px, calc(100% - 20px)); max-height: calc(100% - 70px); overflow-y: auto; padding: 14px; border: 1px solid var(--line); border-top: 4px solid var(--yellow); border-radius: 7px; background: rgba(255, 255, 255, 0.98); box-shadow: 0 8px 26px rgba(16, 42, 71, 0.25); }
.map-cluster-panel header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.map-cluster-panel h4 { margin: 0; color: var(--navy); font-size: 0.88rem; }
.map-cluster-panel p { margin: 3px 0 0; color: var(--muted); font-size: 0.7rem; }
.map-cluster-panel .cluster-close { flex: 0 0 auto; width: 27px; height: 27px; padding: 0; border: 0; border-radius: 50%; color: var(--navy); background: var(--navy-soft); font-size: 1.1rem; }
.cluster-solution-list { display: grid; gap: 7px; }
.cluster-solution { width: 100%; display: block; padding: 9px 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--navy); background: white; text-align: left; }
.cluster-solution:hover { border-color: var(--navy); background: var(--navy-soft); }
.cluster-solution strong, .cluster-solution small { display: block; }
.cluster-solution small { margin-top: 2px; color: var(--muted); }
.map-caption { position: absolute; right: 10px; bottom: 10px; padding: 6px 9px; border-radius: 4px; color: var(--navy); background: rgba(255, 255, 255, 0.9); font-size: 0.7rem; box-shadow: 0 2px 8px rgba(16, 42, 71, 0.1); }
.map-legend { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 4px; color: var(--navy); background: rgba(255, 255, 255, 0.9); font-size: 0.67rem; box-shadow: 0 2px 8px rgba(16, 42, 71, 0.1); }
.map-legend span { width: 13px; height: 9px; margin-right: 2px; border: 1px solid white; background: #168aad; }
.map-legend i { width: 9px; height: 9px; margin: 0 2px 0 7px; border: 1px solid white; border-radius: 50%; background: var(--orange); }
.map-legend b { min-width: 18px; height: 18px; display: inline-grid; place-items: center; margin-left: 7px; border-radius: 50%; color: white; background: var(--navy); font-size: 0.58rem; }
.domain-analysis { display: grid; grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.8fr); gap: 28px; align-items: start; }
.domain-analysis h4 { margin: 0 0 13px; color: var(--navy); font-size: 0.82rem; }
.domain-analysis .donut-layout { grid-template-columns: auto auto; gap: 14px; }
.domain-analysis .donut { width: 132px; height: 132px; }
.domain-analysis .donut > div { width: 82px; height: 82px; }

.completion-list { display: grid; gap: 13px; }
.completion-row > div:first-child { display: flex; justify-content: space-between; gap: 12px; font-size: 0.78rem; }
.completion-row > div:first-child strong { color: var(--navy); }
.completion-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.67rem; text-align: right; }
.completion-track { height: 8px; margin-top: 5px; overflow: hidden; border-radius: 10px; background: #edf1f4; }
.completion-track span { display: block; height: 100%; border-radius: inherit; }
.completion-track .good { background: var(--green); }
.completion-track .medium { background: var(--yellow); }
.completion-track .low { background: var(--orange); }

/* Catalogue, tableaux et pagination */

.data-table-wrapper { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.data-table th { position: sticky; top: 0; padding: 10px 12px; color: white; background: var(--navy); text-align: left; white-space: nowrap; }
.data-table td { max-width: 280px; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f2f7fa; }
.data-table .missing { color: var(--muted); font-style: italic; }
.row-button { padding: 5px 8px; border: 1px solid var(--navy); border-radius: 4px; color: var(--navy); background: white; font-size: 0.7rem; font-weight: 700; }
.row-button:hover { color: white; background: var(--navy); }
.quality-pill, .status-pill { display: inline-block; padding: 3px 7px; border-radius: 20px; font-size: 0.68rem; font-weight: 700; white-space: nowrap; }
.quality-good { color: #195b21; background: #e6f4e4; }
.quality-medium { color: #6e5300; background: #fff3c4; }
.quality-low { color: #8b2c24; background: #fde7e4; }
.status-operational { color: #195b21; background: #e6f4e4; }
.status-development { color: #6e5300; background: #fff3c4; }
.status-other { color: var(--navy); background: var(--navy-soft); }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; color: var(--muted); font-size: 0.76rem; }
.pagination div { display: flex; gap: 7px; }
.pagination button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--navy); background: white; }
.pagination button:disabled { cursor: default; opacity: 0.4; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; gap: 7px; align-items: center; padding: 6px 9px; border-radius: 5px; color: var(--navy); background: var(--navy-soft); font-size: 0.73rem; }
.tag strong { padding-left: 7px; border-left: 1px solid #bdcad6; }

.source-quality { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.source-card { padding: 15px; border: 1px solid var(--line); border-top: 4px solid var(--accent, var(--blue)); border-radius: 7px; background: var(--surface-alt); }
.source-card strong { display: block; color: var(--navy); }
.source-card > span { display: block; margin: 7px 0; color: var(--navy); font-size: 1.7rem; font-weight: 750; }
.source-card small { color: var(--muted); }

.empty-state { min-height: 120px; display: grid; place-content: center; justify-items: center; color: var(--muted); text-align: center; }
.empty-state span { width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid var(--yellow); border-radius: 50%; color: var(--navy); font-weight: 800; }
.empty-state p { max-width: 340px; margin: 8px 0 0; font-size: 0.8rem; }

/* Fenêtre de détail d'une solution */

.dialog-backdrop { position: fixed; z-index: 100; inset: 0; padding: 30px; overflow-y: auto; background: rgba(10, 26, 45, 0.66); }
.detail-dialog { position: relative; width: min(820px, 100%); margin: 0 auto; padding: 28px; border-radius: var(--radius); background: white; box-shadow: 0 22px 70px rgba(0, 0, 0, 0.3); }
.dialog-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--navy); background: var(--navy-soft); font-size: 1.5rem; }
.detail-title { padding-right: 50px; }
.detail-title h2 { margin: 3px 0 5px; color: var(--navy); font-size: 1.55rem; }
.detail-title p { margin: 0; color: var(--muted); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 20px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-field { padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.detail-field.wide { grid-column: 1 / -1; }
.detail-field dt { margin-bottom: 4px; color: var(--muted); font-size: 0.69rem; font-weight: 700; text-transform: uppercase; }
.detail-field dd { margin: 0; font-size: 0.84rem; white-space: pre-wrap; }
.missing-data { display: inline-flex; gap: 5px; align-items: center; color: #8b2c24; font-style: italic; }

footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; margin-top: 28px; padding: 18px 2px 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.68rem; }

/* Formulaire de contribution */

.submission-form { display: grid; gap: 18px; }
.submission-section { margin: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.submission-section legend { padding: 0 8px; color: var(--navy); font-size: 1.05rem; font-weight: 750; }
.submission-section > p { margin: -3px 0 18px; color: var(--muted); font-size: 0.8rem; }
.submission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.submission-field { display: grid; align-content: start; gap: 6px; color: var(--navy); font-size: 0.78rem; font-weight: 700; }
.submission-field.field-wide { grid-column: span 2; }
.submission-field > input, .submission-field > select, .submission-field > textarea { width: 100%; padding: 10px 12px; border: 1px solid #b8c4cf; border-radius: 5px; color: var(--ink); background: white; font-size: 0.88rem; font-weight: 400; }
.submission-field textarea { min-height: 82px; resize: vertical; }
.submission-field > input:focus, .submission-field > select:focus, .submission-field > textarea:focus { border-color: var(--blue); outline: 3px solid rgba(22, 138, 173, 0.18); }
.multi-picker { border: 1px solid #b8c4cf; border-radius: 5px; background: white; font-weight: 400; }
.multi-picker summary { padding: 10px 12px; color: var(--ink); cursor: pointer; }
.multi-picker[open] summary { border-bottom: 1px solid var(--line); }
.multi-picker-panel { padding: 10px; }
.multi-picker-panel > input { width: 100%; margin-bottom: 8px; padding: 8px 10px; border: 1px solid #b8c4cf; border-radius: 4px; }
.multi-options { max-height: 230px; overflow-y: auto; border: 1px solid var(--line); border-radius: 4px; }
.multi-option { display: flex; gap: 9px; align-items: flex-start; padding: 7px 9px; color: var(--ink); font-size: 0.8rem; font-weight: 400; cursor: pointer; }
.multi-option + .multi-option { border-top: 1px solid #edf0f2; }
.multi-option:hover { background: var(--surface-alt); }
.multi-option input { flex: 0 0 auto; margin-top: 3px; }
.required-mark { color: var(--red); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.form-actions small { flex-basis: 100%; color: var(--muted); }
.primary-button, .secondary-button { padding: 10px 16px; border-radius: 5px; font-weight: 700; }
.primary-button { border: 1px solid var(--navy); color: white; background: var(--navy); }
.primary-button:hover { background: var(--navy-deep); }
.primary-button:disabled { cursor: not-allowed; opacity: 0.48; }
.secondary-button { border: 1px solid var(--navy); color: var(--navy); background: white; }

/* Adaptation aux écrans plus petits */

@media (max-width: 1180px) {
  .filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .search-field { grid-column: span 2; }
  .toggle-field { grid-column: span 2; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --sidebar-width: 224px; }
  .card, .card.wide, .card.narrow { grid-column: 1 / -1; }
  .source-quality { grid-template-columns: 1fr; }
  .domain-analysis { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .app-header { grid-template-columns: 1fr auto auto; min-height: 72px; }
  .brand { min-height: 72px; }
  .header-title { display: none; }
  .language-switch { margin-right: 0; }
  .mobile-menu-button { width: 48px; height: 48px; display: grid; align-content: center; gap: 5px; margin-right: 10px; padding: 10px; border: 0; background: transparent; }
  .mobile-menu-button span { display: block; height: 2px; background: white; }
  .app-shell { display: block; }
  .sidebar { top: 72px; width: min(86vw, 300px); transform: translateX(-105%); transition: transform 0.2s; box-shadow: 12px 0 30px rgba(0, 0, 0, 0.2); }
  .sidebar.open { transform: translateX(0); }
  main { padding: 18px 14px; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .search-field, .toggle-field { grid-column: 1 / -1; }
  .page-heading { display: block; }
  .data-scope { display: inline-block; margin-top: 10px; }
  .donut-layout { grid-template-columns: 1fr; justify-items: center; }
  .legend { width: fit-content; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-field.wide { grid-column: auto; }
  .submission-grid { grid-template-columns: 1fr; }
  .submission-field.field-wide { grid-column: auto; }
  .submission-section { padding: 18px 14px; }
  .map-controls { flex-wrap: wrap; max-width: 205px; }
  .map-zoom-level { top: 90px; }
  .map-caption { display: none; }
}

@media (max-width: 480px) {
  .kpi-grid, .filter-grid { grid-template-columns: 1fr; }
  .search-field, .toggle-field { grid-column: auto; }
  .dialog-backdrop { padding: 12px; }
  .detail-dialog { padding: 20px 16px; }
}

@media print {
  .app-header { position: static; }
  .sidebar, .filter-panel, .mobile-menu-button, .row-button, .pagination { display: none !important; }
  .app-shell, main { display: block; padding: 0; }
  .card, .kpi-card { break-inside: avoid; box-shadow: none; }
}
