/* Analyse PA — feuille de style unique. Sobre, dense, pensée pour les tableaux. */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --border: #dde3e8;
  --border-strong: #c5ced6;
  --text: #1c2630;
  --text-2: #4d5b68;
  --text-3: #5c6873; /* contraste AA sur blanc */
  --accent: #0e6178;
  --accent-hover: #0a4d60;
  --accent-soft: #e3f0f3;
  --ok: #1d7a46;
  --ok-soft: #e4f3ea;
  --warn: #a35d00;
  --warn-soft: #fbf0dd;
  --bad: #b3261e;
  --bad-soft: #fbe6e4;
  --info-soft: #eef2f5;
  --radius: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0 0 4px; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 15px; margin: 0 0 10px; font-weight: 650; }
h3 { font-size: 13px; margin: 0 0 8px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
p { margin: 0 0 10px; }
code, pre { font-family: var(--mono); font-size: 12.5px; }
pre { background: #f1f4f6; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* ---- Barre supérieure ---------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  height: 48px; padding: 0 20px;
  background: #13222c; color: #dfe7ec;
}
.brand { font-weight: 650; color: #fff; white-space: nowrap; }
.brand span { color: #7cc3d4; font-weight: 500; }
.nav { display: flex; gap: 2px; overflow-x: auto; flex: 1; }
.nav a { color: #b9c7d0; padding: 6px 10px; border-radius: 5px; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(124,195,212,.16); color: #fff; }
.who { display: flex; align-items: center; gap: 10px; white-space: nowrap; color: #b9c7d0; }
.who form { margin: 0; }
.linkbtn { background: none; border: 0; color: #b9c7d0; cursor: pointer; font: inherit; padding: 4px 6px; border-radius: 4px; }
.linkbtn:hover { color: #fff; background: rgba(255,255,255,.07); }

/* ---- Mise en page ---------------------------------------------------------- */
.page { max-width: 1440px; margin: 0 auto; padding: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.sub { color: var(--text-2); font-size: 13px; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-side { grid-template-columns: minmax(320px, 420px) 1fr; }
@media (max-width: 1000px) { .grid-2, .grid-3, .grid-side { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; min-width: 0; }
.card.flush { padding: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card-head h2 { margin: 0; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---- Indicateurs ------------------------------------------------------------ */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; }
.kpi .label { font-size: 12px; color: var(--text-2); }
.kpi .value { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi.bad .value { color: var(--bad); }

/* ---- Boutons et formulaires ----------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; line-height: 1.3;
}
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: #aab6c0; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.sm { padding: 3px 8px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
input[type=text], input[type=password], input[type=date], input[type=search], select, textarea {
  font: inherit; color: var(--text); background: #fff;
  border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 6px 9px; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(14,97,120,.45); outline-offset: 1px; border-color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible, .btn:focus-visible { outline: 3px solid #1a7f9a; outline-offset: 2px; border-radius: 4px; }
.topbar a:focus-visible, .topbar button:focus-visible { outline-color: #9fd9e6; }
textarea { width: 100%; min-height: 90px; resize: vertical; }
label.field { display: grid; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.filters select, .filters input { max-width: 220px; }

/* ---- Tableaux --------------------------------------------------------------- */
.table-wrap { overflow: auto; max-height: 70vh; border-top: 1px solid var(--border); }
.card > .table-wrap:first-child { border-top: 0; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data th, table.data td { padding: 5px 10px; border-bottom: 1px solid #edf0f3; text-align: left; vertical-align: top; }
table.data thead th {
  position: sticky; top: 0; z-index: 2; background: #eef2f5; color: var(--text-2);
  font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data tbody tr:hover td { background: #f6fafb; }
table.data .num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td.name { max-width: 460px; word-break: break-word; }
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--text); }
table.data th.sorted-asc::after { content: " \2191"; }
table.data th.sorted-desc::after { content: " \2193"; }
table.data tfoot td { font-weight: 650; background: #f4f7f9; position: sticky; bottom: 0; }
.neg { color: var(--bad); }
.table-tools { display: flex; gap: 8px; align-items: center; padding: 10px 16px; flex-wrap: wrap; }
.table-tools select { max-width: 190px; }
table.data.nowrap td, table.data.nowrap th { white-space: nowrap; }
.doc-body pre.prose { font-family: var(--font); font-size: 13.5px; line-height: 1.5; background: var(--surface-2); }
.loading { padding: 26px; text-align: center; color: var(--text-3); }

/* ---- Pastilles ----------------------------------------------------------------- */
.tag { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11.5px; background: var(--info-soft); color: var(--text-2); white-space: nowrap; }
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.status { font-weight: 600; }
.status.done { color: var(--ok); }
.status.running, .status.pending { color: var(--warn); }
.status.error { color: var(--bad); }

/* ---- Messages ------------------------------------------------------------------ */
.notice { border: 1px solid var(--border); border-left: 4px solid var(--accent); background: var(--surface); padding: 10px 14px; border-radius: var(--radius); }
.notice.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.notice.bad { border-left-color: var(--bad); background: var(--bad-soft); }
.notice.ok { border-left-color: var(--ok); background: var(--ok-soft); }
.alerts { list-style: none; margin: 0; padding: 0; }
.alerts li { padding: 6px 10px; border-left: 3px solid var(--border-strong); background: var(--surface-2); margin-bottom: 4px; border-radius: 0 4px 4px 0; }
.alerts li.bad { border-left-color: var(--bad); background: var(--bad-soft); }
.alerts li.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.alerts li.ok { border-left-color: var(--ok); background: var(--ok-soft); }
.secret { font-family: var(--mono); font-size: 14px; background: #fff; border: 1px dashed var(--accent); padding: 8px 10px; border-radius: 4px; word-break: break-all; user-select: all; }

/* ---- Dépôt --------------------------------------------------------------------- */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: 8px; background: var(--surface-2);
  padding: 22px; text-align: center; color: var(--text-2); cursor: pointer; transition: background .15s, border-color .15s;
}
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone strong { color: var(--text); }
.uploads { list-style: none; margin: 10px 0 0; padding: 0; }
.uploads li { display: grid; grid-template-columns: 1fr 160px 220px; gap: 10px; align-items: center; padding: 4px 0; font-size: 13px; border-bottom: 1px solid #edf0f3; }
.uploads .bar { height: 6px; background: #e6ebef; border-radius: 3px; overflow: hidden; }
.uploads .bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.uploads li.ok .bar > i { background: var(--ok); }
.uploads li.err .bar > i { background: var(--bad); }

/* ---- Documentation ---------------------------------------------------------------- */
.doc-layout { display: grid; grid-template-columns: minmax(340px, 460px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .doc-layout { grid-template-columns: 1fr; } }
.doc-list { max-height: calc(100vh - 190px); overflow: auto; }
.doc-group { border-bottom: 1px solid var(--border); }
.doc-group > summary { list-style: none; cursor: pointer; padding: 9px 14px; font-weight: 650; display: flex; justify-content: space-between; align-items: center; background: var(--surface-2); position: sticky; top: 0; z-index: 1; }
.doc-group > summary::-webkit-details-marker { display: none; }
.doc-group > summary::before { content: "\25B8"; color: var(--text-3); margin-right: 8px; }
.doc-group[open] > summary::before { content: "\25BE"; }
.doc-group > summary .t { flex: 1; }
.doc-item { display: block; padding: 6px 14px 6px 30px; border-top: 1px solid #f0f3f5; color: var(--text); }
.doc-item:hover { background: #f3f8f9; text-decoration: none; }
.doc-item.active { background: var(--accent-soft); }
.doc-item .n { display: block; word-break: break-word; }
.doc-item .m { display: block; font-size: 11.5px; color: var(--text-3); }
.doc-preview { position: sticky; top: 64px; }
.doc-preview .frame { width: 100%; height: calc(100vh - 230px); min-height: 480px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.doc-preview img.full { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.doc-body { max-height: calc(100vh - 260px); overflow: auto; }
.md { line-height: 1.55; }
.md h2, .md h3, .md h4 { margin: 16px 0 8px; text-transform: none; letter-spacing: 0; color: var(--text); }
.md h2 { font-size: 17px; } .md h3 { font-size: 15px; } .md h4 { font-size: 14px; }
.md blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid var(--border-strong); color: var(--text-2); }
.md ul, .md ol { padding-left: 22px; margin: 6px 0 10px; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; font-size: 12.5px; margin: 0 0 12px; }
.meta dt { color: var(--text-3); }
.meta dd { margin: 0; word-break: break-word; }

/* ---- Notes ----------------------------------------------------------------------- */
.notes { list-style: none; margin: 0 0 12px; padding: 0; }
.notes li { border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; margin-bottom: 8px; background: var(--surface-2); }
.notes .by { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.notes .body { white-space: pre-wrap; word-break: break-word; }

/* ---- Connexion -------------------------------------------------------------------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 26px; }
.login-card h1 { margin-bottom: 4px; }
.login-card form { display: grid; gap: 12px; margin-top: 18px; }
.login-card input { width: 100%; }

.empty { padding: 26px; text-align: center; color: var(--text-3); }
.inline-form { display: inline; margin: 0; }
details.reclass > summary { cursor: pointer; color: var(--accent); list-style: none; font-size: 12.5px; }
details.reclass > summary::-webkit-details-marker { display: none; }
details.reclass[open] { background: var(--surface-2); padding: 8px; border-radius: 6px; border: 1px solid var(--border); }
details.reclass form { display: grid; gap: 6px; margin-top: 6px; min-width: 220px; }
.hidden { display: none !important; }


/* ==== Accessibilité ===================================================== */
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: #fff; color: var(--accent); padding: 8px 12px; border-radius: 6px; border: 2px solid var(--accent); }
.skip:focus { top: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main:focus { outline: none; }
.warn-text { color: var(--warn); }
ul.tight { margin: 4px 0 8px; padding-left: 20px; }
ul.tight li { margin: 3px 0; }
ul.tight ol { margin: 4px 0; padding-left: 20px; }

/* ==== Navigation ========================================================= */
.nav-sep { width: 1px; background: rgba(255,255,255,.18); margin: 6px 6px; flex: none; }
.nav a.quiet { color: #a3b4bf; font-size: 13px; }
.nav a.quiet.active { color: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tabs a { padding: 7px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; color: var(--text-2); margin-bottom: -1px; }
.tabs a.active { background: var(--surface); border-color: var(--border); color: var(--text); font-weight: 600; }
.tabs a.quiet { margin-left: auto; color: var(--text-3); font-size: 13px; }
.tabs a:hover { text-decoration: none; color: var(--text); }

/* ==== Encarts « Comment ça marche / Comment lire » ======================= */
details.howto { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; }
details.howto > summary { cursor: pointer; padding: 10px 16px; font-weight: 650; list-style: none; display: flex; align-items: center; gap: 8px; }
details.howto > summary::-webkit-details-marker { display: none; }
details.howto > summary::before { content: "\25B8"; color: var(--accent); }
details.howto[open] > summary::before { content: "\25BE"; }
details.howto > summary::after { content: "afficher"; margin-left: auto; font-weight: 400; font-size: 12px; color: var(--text-3); }
details.howto[open] > summary::after { content: "masquer"; }
.howto-body { padding: 0 16px 14px; font-size: 13.5px; }
.howto-body h3 { margin-top: 6px; }
details.howto.intro { margin-bottom: 16px; }
.intro-grid { display: grid; grid-template-columns: 1fr minmax(300px, 520px); gap: 20px; align-items: center; }
@media (max-width: 1000px) { .intro-grid { grid-template-columns: 1fr; } }
.schema { margin: 0; }
.schema svg { width: 100%; height: auto; display: block; }
.sch-box { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 1.5; }
.sch-accent { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.sch-t { fill: var(--text); font: 650 15px var(--font); }
.sch-s { fill: var(--text-2); font: 400 12.5px var(--font); }
.sch-line { stroke: var(--accent); stroke-width: 2; }
.sch-arrowhead { fill: var(--accent); }
.step-cards { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 1000px) { .step-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .step-cards { grid-template-columns: 1fr; } }
.step-cards li { display: flex; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.step-cards .n, .step-n { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; }
.step-cards p { margin: 4px 0 0; color: var(--text-2); }
h2 .step-n { margin-right: 6px; vertical-align: 1px; }
.tip-inline { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border-strong); font-size: 11px; color: var(--text-2); }

/* ==== Où en êtes-vous =================================================== */
.next-card { border-left: 4px solid var(--ok); }
.mini-steps { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mini-steps li { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 14px; background: var(--info-soft); font-size: 13px; }
.mini-steps li > span:first-child { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #6b7783; color: #fff; font-size: 11.5px; font-weight: 700; }
.mini-steps li.done { background: var(--ok-soft); }
.mini-steps li.done > span:first-child { background: var(--ok); }
.mini-steps li.wait > span:first-child { background: var(--warn); }
.next-action { margin: 6px 0 12px; }

/* ==== Parcours de session ================================================ */
.stepper { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 800px) { .stepper { grid-template-columns: 1fr 1fr; } }
.stepper a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text-2); }
.stepper a:hover { text-decoration: none; border-color: var(--accent); }
.stepper .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #6b7783; color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.stepper li.done .n { background: var(--ok); }
.stepper li.done .t::after { content: " (fait)"; color: var(--ok); font-size: 12px; }
.stepper li.current a { border-color: var(--accent); background: var(--accent-soft); color: var(--text); font-weight: 600; }
.stepper li.current .n { background: var(--accent); }
.card.step.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.card.step { scroll-margin-top: 64px; }
.inline-edit > summary, .lib-pick > summary, details.how > summary, details.history > summary { cursor: pointer; color: var(--accent); font-size: 13px; }
details.history { padding: 12px 16px; }
details.history > summary { color: var(--text); }
.source-choice { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.source-choice .choice { display: grid; gap: 2px; text-align: left; min-width: 260px; padding: 10px 14px; border: 2px solid var(--border-strong); border-radius: 8px; background: var(--surface); font: inherit; color: var(--text); cursor: pointer; }
.source-choice .choice span { font-size: 12.5px; color: var(--text-2); }
.source-choice .choice:hover { border-color: var(--accent); }
.source-choice .choice.selected { border-color: var(--accent); background: var(--accent-soft); }
.source-choice .choice.selected strong::before { content: "\2713\00a0"; color: var(--accent); }
.checklist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.check-item { border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: 8px; padding: 10px 14px; background: var(--surface); }
.check-item.ok { border-left-color: var(--ok); }
.check-item.warn { border-left-color: var(--warn); }
.check-item.bad { border-left-color: var(--bad); }
.check-item.info { border-left-color: var(--accent); }
.check-item.dim { background: var(--surface-2); }
.check-head { display: flex; gap: 12px; align-items: flex-start; }
.check-title { display: grid; gap: 3px; }
.check-title .small { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.why { margin: 6px 0 4px; color: var(--text-2); }
.pill { flex: none; display: inline-block; min-width: 118px; text-align: center; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 650; background: var(--info-soft); color: var(--text-2); border: 1px solid transparent; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: #b9dfc8; }
.pill.warn { background: var(--warn-soft); color: #8a4f00; border-color: #ecd3a6; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: #efc0bb; }
.pill.info { background: var(--accent-soft); color: var(--accent); border-color: #b7d8e0; }
.pill.muted { background: var(--info-soft); color: var(--text-2); }
.req { font-weight: 650; }
.req.global, .req.pn { color: var(--bad); }
.req.maitre { color: var(--accent); }
.req.option { color: var(--text-2); }
.tag.src-conex { background: #e8eefb; color: #2b4a8a; }
.tag.src-sap { background: #eef3e4; color: #3f5d1c; }
.tag.src-excel { background: #f2ecf7; color: #5b3a78; }
.att-files { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; }
.att-files li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.att-files .name, .lib-item .name { word-break: break-word; font-weight: 550; }
.lib-hint { background: var(--accent-soft); border-radius: 6px; padding: 6px 10px; margin: 6px 0; display: grid; gap: 4px; }
.lib-item { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
details.how { margin-top: 4px; }
details.how ol { margin: 6px 0 4px; padding-left: 20px; }
.pn-search { align-items: flex-end; }

/* ==== Transit ============================================================ */
.notice.parked { border-left-color: #6b7783; background: repeating-linear-gradient(135deg, #f3f5f7, #f3f5f7 12px, #edf0f3 12px, #edf0f3 24px); }

/* ==== Infobulles ========================================================= */
.th-l { vertical-align: middle; }
button.tip { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 5px; padding: 0; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font: 600 11px var(--font); cursor: help; vertical-align: middle; line-height: 1; }
button.tip:hover, button.tip[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.tooltip { position: fixed; z-index: 90; max-width: 320px; padding: 8px 10px; border-radius: 6px; background: #13222c; color: #f2f6f8; font-size: 12.5px; line-height: 1.45; box-shadow: 0 4px 14px rgba(0,0,0,.18); pointer-events: none; }
.kpi .label .tip { margin-left: 3px; }
@media (max-width: 700px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 8px 12px; }
  .page { padding: 14px 12px; }
  .pill { min-width: 0; }
}

/* Décomposition du solde d'un PN (60 = 16 + 24 + 20) */
.decompo-line { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 6px 0 12px; }
.dbox { display: flex; flex-direction: column; justify-content: center; min-width: 110px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.dbox .dv { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dbox .dl { font-size: 12px; color: var(--text-2); }
.dbox.ok { background: var(--ok-soft); border-color: #b9dfc8; } .dbox.ok .dv { color: var(--ok); }
.dbox.warn { background: var(--warn-soft); border-color: #ecd3a6; } .dbox.warn .dv { color: #8a4f00; }
.dbox.bad { background: var(--bad-soft); border-color: #efc0bb; } .dbox.bad .dv { color: var(--bad); }
.dop { align-self: center; font-size: 22px; font-weight: 700; color: var(--text-3); }
table.kv th[scope=row] { text-align: left; font-weight: 500; color: var(--text-2); width: 45%; }
