/* Logiciel d'État : cartes, tableaux et chiffres à angles droits ; champs et boutons à peine arrondis. */
:root:root { --r-card: 0; --r-field: 2px; --r-sheet: 0; }
/* Champs et boutons compacts : 36 px sur ordinateur, 42 px au doigt. */
.input, .select { min-height: 42px; padding: 0 12px; font-size: 14px; }
.select { padding-right: 34px; background-position: right 8px center; }
.btn { min-height: 42px; border-radius: var(--r-field); }
.btn-sm { min-height: 32px; border-radius: var(--r-field); }
.field { gap: 4px; }
.card.stack, form.card { gap: 12px; }
.kpi { padding: 10px 14px; }
.kpi-value { font-size: 22px; }
.kpi-hero .kpi-value { font-size: 28px; }
@media (min-width: 900px) {
  .input, .select, .btn { min-height: 36px; }
  .btn-sm { min-height: 30px; }
}
/* Écrans SIRB : carte hors ligne, histogramme, compléments compacts. Couleurs : tokens uniquement. */
.map { display: block; width: 100%; height: auto; max-height: 460px; }
.map .land { fill: var(--surface-2); stroke: var(--border); stroke-width: 2; }
.map .hot { fill: var(--danger); opacity: .16; }
.map .pin { fill: var(--text-2); stroke: var(--surface); stroke-width: 3; }
.map .pin.success { fill: var(--success); } .map .pin.warning { fill: var(--warning); } .map .pin.danger { fill: var(--danger); }
.map text { font: 600 13px var(--font); fill: var(--text-2); }
.bars { display: block; width: 100%; height: 200px; }
.bars rect { fill: var(--brand); } .bars rect:last-of-type { fill: var(--brand-press, var(--brand)); }
.bars text { font: 500 11px var(--font); fill: var(--text-2); }
.kpis .kpi:not(.kpi-hero) { background: var(--surface); box-shadow: var(--shadow-1); }
.card .empty, .table .empty { min-height: 0; padding: var(--s4); }
.kv-grid { display: grid; grid-template-columns: auto 1fr; align-items: baseline; }
.kpi .kpi-value.danger { color: var(--danger-text); }
.score { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 26px; padding: 0 8px;
  border-radius: var(--r-pill); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; }
.score.success { background: var(--success-soft); color: var(--success-text); }
.score.warning { background: var(--warning-soft); color: var(--warning-text); }
.score.danger { background: var(--danger-soft); color: var(--danger-text); }
.verdict { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s5) var(--s4);
  border-radius: var(--r-card); text-align: center; }
.verdict.ok { background: var(--success-soft); color: var(--success-text); }
.verdict.bad { background: var(--danger-soft); color: var(--danger-text); }
.verdict .big { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.public { max-width: 460px; margin: 0 auto; padding: var(--s5) var(--gutter); display: flex; flex-direction: column; gap: var(--s4); }
.public-brand { display: flex; align-items: center; gap: var(--s3); font-weight: 600; font-size: 18px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
.inline-form { display: flex; gap: var(--s2); align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1; min-width: 140px; }
.input-kg { width: 110px; }
.map-legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); padding-top: var(--s2); font-size: 13px; color: var(--text-2); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pin-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-2); display: inline-block; }
.pin-dot.success { background: var(--success); } .pin-dot.warning { background: var(--warning); } .pin-dot.danger { background: var(--danger); }
.pin-dot.hot { background: var(--danger); opacity: .3; }
.parcours { display: flex; gap: var(--s2); overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.parcours .step { flex: 1 0 auto; display: flex; align-items: center; gap: var(--s2); padding: 8px 12px; border-radius: 0; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); text-decoration: none; min-width: 0; }
.parcours a.step:hover { border-color: var(--brand); }
.parcours .step.current { border-color: var(--brand); background: var(--brand-soft, var(--surface-2)); color: var(--text); }
.parcours .step-n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--font); background: var(--surface-2); }
.parcours .step.current .step-n { background: var(--brand); color: #fff; }
.parcours .step-text { display: grid; line-height: 1.15; }
.parcours .step-label { font-weight: 600; font-size: 13px; }
.parcours .step-who { font-size: 11px; color: var(--text-2); }
.row-pending td { background: var(--warning-soft); }
.kpis-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.record-form { display: grid; grid-template-columns: 130px minmax(120px, 1fr) 90px 64px auto auto; gap: 6px; align-items: center; }
@media (max-width: 899px) { .record-form { grid-template-columns: 1fr 1fr; } }
.bars rect { fill: var(--brand); }
.bars text { font: 500 11px var(--font); fill: var(--text-2); }
/* Logo typographique : le nom, rien d'autre. */
.app .sidebar .sidebar-head img.brand-mark, .drawer .drawer-head img { display: none; }
.brand-name, .wordmark { font-weight: 800; letter-spacing: .16em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand-name::before, .wordmark::before { content: ""; width: 4px; height: 1.05em; background: var(--brand); flex: none; }
.app.is-collapsed .brand-name { display: inline-flex; font-size: 12px; letter-spacing: .06em; gap: 4px; }
.wordmark { font-size: 22px; }
.wordmark-sub { font-size: 12px; color: var(--text-2); letter-spacing: 0; }
/* Connexion */
.login { min-height: 100dvh; display: grid; place-items: center; padding: var(--s4) var(--gutter); background: var(--bg); }
.login-card { width: min(380px, 100%); display: grid; gap: 14px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--brand); }
.login-card h1 { margin: 6px 0 0; font-size: 17px; font-weight: 600; }
.login-foot { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.login-foot a { color: var(--text-2); }
/* Vérification publique */
.public { max-width: 520px; gap: var(--s3); padding-top: var(--s4); }
.public-head { display: grid; gap: 2px; padding-bottom: var(--s2); border-bottom: 1px solid var(--border); }
.inline-check { display: flex; gap: 8px; }
.inline-check .input { flex: 1; font-size: 18px; letter-spacing: .08em; }
.verdict { padding: var(--s4); }
.open-box { background: var(--surface); border: 1px solid var(--border); }
.open-box > summary { padding: 12px 14px; cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; display: flex; justify-content: space-between; }
.open-box > summary::-webkit-details-marker { display: none; }
.open-box > summary::after { content: "+"; color: var(--text-2); }
.open-box[open] > summary::after { content: "–"; }
.open-box form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px 14px; }
.open-box form .btn { grid-column: 1 / -1; }
@media (max-width: 480px) { .open-box form { grid-template-columns: 1fr; } }
/* Lignes fines et compactes (toute l'application). */
.card, .kpi, .table-wrap { box-shadow: none; border: 1px solid var(--border); }
.table { font-size: 13px; }
.table th { padding: 7px 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.table td { padding: 6px 12px; line-height: 1.3; white-space: nowrap; box-shadow: none; border-top: 1px solid var(--border); }
.table tbody tr:first-child td { border-top: 0; }
.table td.small, .table td.wrap { white-space: normal; min-width: 160px; }
.table td .muted.small, .table td .small { font-size: 11.5px; }
.table td br + .muted, .table td br + .small { display: inline-block; margin-top: 1px; }
.table td .btn-sm { min-height: 26px; padding: 0 10px; font-size: 12px; }
@media (hover: hover) { .table tbody tr:hover td { background: var(--surface-2); } }
.badge { min-height: 20px; padding: 0 7px; font-size: 11px; }
.list-row { min-height: 40px; padding: 7px 12px; gap: 10px; }
.list-row .title { font-size: 13px; }
.list-row .meta { font-size: 11.5px; }
.feed-item { padding: 6px 0 6px 16px; font-size: 13px; }
.feed-item::before { top: 12px; width: 6px; height: 6px; }
.section { gap: 6px; }
.section-head h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.dash { gap: 18px; }
.empty { padding: 14px; }
.empty p { font-size: 13px; }
/* Rapport croisé et cartes */
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; align-items: end; padding: 12px; background: var(--surface); border: 1px solid var(--border); }
.filters-actions { display: flex; justify-content: flex-end; }
.kpis-8 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.measure-chips { flex-wrap: wrap; }
.measure-chips .chip { min-height: 28px; font-size: 12px; }
.geo { height: 440px; border: 1px solid var(--border); background: var(--surface-2); z-index: 0; }
.geo.tall { height: 560px; }
.geo.offline { background: var(--surface); }
.leaflet-container { font: 12px var(--font); }
.leaflet-tooltip { border-radius: 0; border: 1px solid var(--border); box-shadow: none; padding: 6px 8px; }
.ranking { padding: 6px 12px; display: grid; gap: 2px; }
.rank-row { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 70px; gap: 10px; align-items: center; min-height: 26px; font-size: 13px; }
.rank-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { width: 100%; height: 10px; background: var(--surface-2); }
.rank-bar rect { fill: var(--brand); }
.rank-bar rect.tone-info { fill: var(--info, #6A9BCC); } .rank-bar rect.tone-success { fill: var(--success); }
.rank-bar rect.tone-warning { fill: var(--warning); } .rank-bar rect.tone-danger { fill: var(--danger); }
.rank-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.pivot th a { color: inherit; text-decoration: none; }
.pivot .sel { background: var(--brand-soft); }
.pivot tfoot td { border-top: 2px solid var(--border-strong, var(--border)); background: var(--surface-2); }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .map-layout { grid-template-columns: 1fr; } .geo.tall { height: 420px; } }
