:root {
  /* Charte Cils Expert, relevée dans la configuration du thème (stthemeeditor) :
     magenta #cc2e72 (boutons, liens, prix), graphite #282f37 (menu, barre collante),
     gris #e4e4e8 (barre du haut), texte #444444, rose #f5b9c1 (liens du pied de page), Roboto. */
  color-scheme: light;
  --brand: #cc2e72;
  --brand-ink: #a3245b;
  --brand-soft: #fbe3ea;
  --rose: #f5b9c1;
  --graphite: #282f37;
  --topbar: #e4e4e8;
  --bg: #fafafa;
  --surface: #ffffff;
  --line: #e4e4e8;
  --line-strong: #c9c9cf;
  --text: #282f37;
  --text-2: #444444;
  --muted: #6b6b72;
  --accent: #cc2e72;
  --accent-ink: #a3245b;
  --s1: #cc2e72; --s2: #282f37; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --cmp: #85858e;
  --pos: #1f7a52;
  --neg: #b42318;
  --good: #1f7a52; --warning: #fab219; --serious: #ec835a; --critical: #b42318;
  --layer-obs: #e9ebef; --layer-obs-ink: #282f37;
  --layer-dec: #fbe3ea; --layer-dec-ink: #a3245b;
  --layer-cst: #e3f3ea; --layer-cst-ink: #1f6f4a;
  --radius: 6px;
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}
@font-face { font-family: Roboto; font-weight: 400; font-style: normal; font-display: swap; src: url(/assets/fonts/roboto-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Roboto; font-weight: 500; font-style: normal; font-display: swap; src: url(/assets/fonts/roboto-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Roboto; font-weight: 700; font-style: normal; font-display: swap; src: url(/assets/fonts/roboto-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: Roboto; font-weight: 900; font-style: normal; font-display: swap; src: url(/assets/fonts/roboto-latin-900-normal.woff2) format("woff2"); }
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #1b2027; --surface: #232a33; --line: #343c47; --line-strong: #4a5360;
    --text: #f2f2f4; --text-2: #d5d6da; --muted: #a3a6ad;
    --brand: #e0528f; --accent: #e0528f; --accent-ink: #f5b9c1; --brand-soft: #4a2235;
    --s1: #e0528f; --s2: #c9ced6; --cmp: #8d929b; --pos: #3fb37f; --neg: #ef6b5e;
    --good: #3fb37f; --critical: #ef6b5e;
    --layer-obs: #343c47; --layer-obs-ink: #e4e4e8;
    --layer-dec: #4a2235; --layer-dec-ink: #f5b9c1;
    --layer-cst: #17392b; --layer-cst-ink: #a7e3c8;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--accent-ink); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; color: var(--text); }
.card h2 { font-weight: 900; text-transform: uppercase; letter-spacing: .03em; font-size: .95rem; }
.card h2::before { content: ''; display: inline-block; width: 4px; height: .95em; background: var(--brand); margin-right: .5rem; vertical-align: -1px; border-radius: 2px; }
h1 { font-size: 1.4rem; } h2 { font-size: 1.12rem; } h3 { font-size: .98rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.btn { font: inherit; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); padding: .45rem .9rem; border-radius: 6px; cursor: pointer; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.btn.ghost { background: transparent; }
.btn.small { padding: .25rem .6rem; font-size: .85rem; }
.btn.danger { color: var(--critical); border-color: var(--critical); background: transparent; }
.btn:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; padding: .35rem .5rem; }
label { display: inline-flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--text-2); }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.stack label { font-size: .9rem; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.alert { background: #fdecea; color: #8a1f1f; border-radius: 6px; padding: .5rem .75rem; margin: 0; }
@media (prefers-color-scheme: dark) { .alert { background: #4a1c1c; color: #f5c6c6; } }

/* écran de connexion */
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 2rem; width: min(440px, 100%); }
.auth-card .brand { margin: 0 0 1.5rem; }
.auth-card .brand img { height: 40px; }
.enrol { background: var(--bg); border-radius: 8px; padding: .8rem 1rem; font-size: .9rem; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: .05em; word-break: break-all; }
.codes { font-family: ui-monospace, Menlo, Consolas, monospace; columns: 2; padding-left: 1.2rem; }

/* entête */
.demo-band { background: repeating-linear-gradient(135deg, #fab219 0 14px, #f7c95a 14px 28px); color: #2b1d00; font-weight: 700; text-align: center; padding: .4rem; letter-spacing: .04em; position: sticky; top: 0; z-index: 20; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1.5rem; background: var(--surface); gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 1rem; font-weight: 700; font-size: 1.05rem; }
.brand img { height: 46px; width: auto; display: block; }
.brand .product { border-left: 2px solid var(--brand); padding-left: 1rem; line-height: 1.15; }
.brand .product b { display: block; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; font-size: 1rem; color: var(--graphite); }
.brand .product span { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); margin: 0; }
@media (prefers-color-scheme: dark) { .brand img { filter: invert(1); mix-blend-mode: screen; } .brand .product b { color: var(--text); } }
.top-right { display: flex; align-items: center; gap: 1rem; }
.dataset { flex-direction: row; align-items: center; gap: .4rem; }
#logout-form { margin: 0; }
.tabs { display: flex; gap: .1rem; padding: 0 1.5rem; background: var(--graphite); overflow-x: auto; }
.tabs button { font: inherit; font-size: .82rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; background: none; border: 0; border-bottom: 3px solid transparent; padding: .8rem .85rem .65rem; color: #e4e4e8; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: #fff; }
.tabs button.active { color: #fff; border-bottom-color: var(--brand); font-weight: 700; }
.tabs button:focus-visible { outline: 2px solid var(--rose); outline-offset: -2px; }

/* filtres */
.filters { padding: .8rem 1.5rem .2rem; display: flex; flex-direction: column; gap: .6rem; }
.f-row { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; }
.presets { display: flex; gap: .2rem; }
.presets button { font: inherit; font-size: .82rem; border: 1px solid var(--line-strong); background: var(--surface); padding: .3rem .5rem; border-radius: 6px; cursor: pointer; color: var(--text-2); }
.multi { position: relative; }
.multi summary { list-style: none; cursor: pointer; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 6px; padding: .4rem .6rem; font-size: .88rem; }
.multi summary::after { content: " ▾"; color: var(--muted); }
.multi[open] .opts { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: .5rem; min-width: 260px; max-height: 340px; overflow: auto; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.multi.wide[open] .opts { min-width: 360px; }
.multi .opts label { flex-direction: row; align-items: center; gap: .45rem; font-size: .88rem; color: var(--text); padding: .15rem 0; }
.multi .opts .n { color: var(--muted); margin-left: auto; font-size: .78rem; }
.opt-search { width: 100%; margin-bottom: .4rem; }
.active-filters { margin: 0; font-size: .82rem; color: var(--text-2); min-height: 1.2em; }
.chip { display: inline-block; background: var(--brand-soft); color: var(--brand-ink); border-radius: 999px; padding: .05rem .55rem; margin-right: .3rem; }

/* contenu */
.view { padding: .6rem 1.5rem 3rem; display: flex; flex-direction: column; gap: 1.1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.card > header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 1.1rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.kpi .label { font-size: .8rem; color: var(--text-2); display: flex; gap: .4rem; align-items: center; }
.kpi .value { font-size: 1.6rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; margin: .15rem 0; }
.kpi .delta { font-size: .82rem; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--good); } .delta.down { color: var(--critical); } .delta.flat { color: var(--muted); }
.kpi .sub { font-size: .78rem; color: var(--muted); }
.layer { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-radius: 4px; padding: .05rem .35rem; white-space: nowrap; }
.layer.cst { background: var(--layer-cst); color: var(--layer-cst-ink); }
.layer.obs { background: var(--layer-obs); color: var(--layer-obs-ink); }
.layer.dec { background: var(--layer-dec); color: var(--layer-dec-ink); }
.layer.unk { background: var(--line); color: var(--text-2); }
.note { font-size: .84rem; color: var(--text-2); border-left: 3px solid var(--line-strong); padding: .2rem .7rem; margin: .5rem 0 0; }
.note.warn { border-left-color: var(--warning); }
.note.crit { border-left-color: var(--critical); }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { padding: .42rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-weight: 600; color: var(--text-2); font-size: .8rem; position: sticky; top: 0; background: var(--surface); cursor: pointer; user-select: none; }
th.num { text-align: right; }
tbody tr:hover { background: var(--bg); }
tr.clickable { cursor: pointer; }
tr.selected { background: var(--layer-obs); }
tfoot td { font-weight: 650; border-top: 2px solid var(--line-strong); }
.table-wrap { overflow: auto; max-height: 560px; }
.unknown { color: var(--muted); font-style: italic; }
.status { display: inline-flex; gap: .3rem; align-items: center; font-size: .82rem; font-weight: 600; }
.status::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--good); } .status.file { color: #8a5a00; } .status.missing { color: var(--critical); } .status.demo { color: #7a5800; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--text-2); margin: .2rem 0 .4rem; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: .35rem; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--cmp) 0 4px, transparent 4px 7px) !important; }
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.chart .ann line { stroke: var(--text-2); stroke-dasharray: 2 3; }
.chart .ann circle { fill: var(--surface); stroke: var(--text-2); stroke-width: 1.5; }
.tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--text); color: var(--surface); border-radius: 6px; padding: .45rem .6rem; font-size: .8rem; max-width: 320px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.tooltip b { font-weight: 650; }
.hbar { display: grid; grid-template-columns: minmax(150px, 220px) 1fr 90px; gap: .4rem .6rem; align-items: center; font-size: .86rem; }
.hbar .track { position: relative; height: 14px; }
.hbar .bar { position: absolute; top: 0; height: 14px; border-radius: 4px; }
.hbar .axis0 { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--line-strong); }
.empty { padding: 1.4rem; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.form-inline { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; }
.pill { display: inline-block; font-size: .75rem; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 .45rem; color: var(--text-2); }
dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); padding: 1.4rem; width: min(380px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.35); }
.loading { opacity: .55; transition: opacity .15s; }
@media (max-width: 720px) {
  .topbar, .filters, .view, .tabs { padding-left: .8rem; padding-right: .8rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 110px 1fr 70px; }
}
@media print { .filters, .tabs, .top-right { display: none; } }

/* bandeau période et couverture */
.period-info { font-size: .84rem; color: var(--text-2); display: flex; flex-direction: column; gap: .2rem; }
.period-info .period { color: var(--text); font-weight: 600; }
.period-info .cov { display: flex; gap: .4rem; align-items: baseline; }
.period-info .cov b { font-weight: 600; }
.cov-ok::before { content: "✓"; color: var(--good); font-weight: 700; }
.cov-warn::before { content: "⚠"; color: #8a5a00; font-weight: 700; }
.cov-none::before { content: "✕"; color: var(--critical); font-weight: 700; }

/* filtres repliables (mobile) */
.filters-box > summary { list-style: none; cursor: pointer; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; color: var(--graphite); padding: .2rem 0; }
.filters-box > summary::-webkit-details-marker { display: none; }
.filters-box > summary::after { content: " ▾"; color: var(--muted); }
.filters-box[open] > summary::after { content: " ▴"; }
.filters-box > .f-row + .f-row { margin-top: .6rem; }
.filters-box > summary + .f-row { margin-top: .4rem; }
.period-info { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: .55rem .8rem; }
.period-info:empty { display: none; }
.period-info .missing { color: var(--text-2); }
.period-info .missing b { color: var(--critical); }
@media (max-width: 720px) {
  .statusbar { padding: .3rem .8rem; }
  .brand img { height: 34px; }
  .brand .product { padding-left: .7rem; }
  .brand .product b { font-size: .86rem; }
  .top-right { width: 100%; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
  .kpis { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .kpi { padding: .6rem .7rem; }
  .kpi .value { font-size: 1.3rem; }
  .card { padding: .8rem; }
  .period-info .cov { flex-wrap: wrap; }
}

/* ===== Direction graphique v2 : barre latérale, en-tête de page, cartes hiérarchisées =====
   Inspirations (structure seulement, aucune marque reprise) : voir docs/DIRECTION-GRAPHIQUE.md */
body.app { background: var(--bg); }
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 1.2rem 1rem; display: flex; flex-direction: column; gap: .6rem; position: sticky; top: 0; height: 100vh; overflow: auto; }
.sidebar .logo img { width: 100%; max-width: 210px; height: auto; display: block; }
.sidebar .product { margin: 0 0 .6rem; padding-top: .55rem; border-top: 2px solid var(--brand); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--graphite); }
.tabs { display: flex; flex-direction: column; gap: .15rem; padding: 0; background: none; overflow: visible; }
.tabs .nav-group { margin: .8rem .6rem .25rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.tabs button { display: flex; align-items: center; gap: .65rem; width: 100%; text-align: left; font: inherit; font-size: .9rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-2); background: none; border: 0; border-radius: 6px; padding: .55rem .7rem; cursor: pointer; border-bottom: 0; }
.tabs button svg { width: 18px; height: 18px; flex: none; fill: currentColor; opacity: .75; }
.tabs button:hover { background: var(--bg); color: var(--text); }
.tabs button.active { background: var(--graphite); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
.tabs button.active svg { opacity: 1; fill: var(--rose); }
.side-status { margin-top: auto; background: var(--graphite); color: #e4e4e8; border-radius: 8px; padding: .8rem .85rem; font-size: .78rem; line-height: 1.4; }
.side-status:empty { display: none; }
.side-status h3 { color: #fff; font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .45rem; }
.side-status ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.side-status li { display: flex; gap: .45rem; align-items: baseline; }
.side-status .dot { width: .55rem; height: .55rem; border-radius: 50%; flex: none; transform: translateY(1px); }
.side-status .dot.file { background: #fab219; } .side-status .dot.api { background: #3fb37f; } .side-status .dot.demo { background: #fab219; } .side-status .dot.missing { background: transparent; border: 1.5px solid #ef6b5e; }
.side-status .lbl-missing { color: #f5c6c6; }
.side-status .foot { margin-top: .55rem; color: #f5b9c1; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); padding: .9rem 1.6rem; }
.topbar h1 { font-size: 1.55rem; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; margin: .1rem 0 0; color: var(--graphite); }
.eyebrow { margin: 0; }
.proto { display: inline-block; background: var(--topbar); color: var(--graphite); border: 1px solid var(--line-strong); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; border-radius: 3px; padding: .1rem .45rem; }
.filters { padding: 1rem 1.6rem 0; gap: .7rem; }
.filters-box { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .65rem .9rem .8rem; }
.view { padding: 1rem 1.6rem 3rem; gap: 1rem; }
.card { border-radius: 8px; box-shadow: 0 1px 2px rgba(40, 47, 55, .05); }
.kpi { border-radius: 8px; box-shadow: 0 1px 2px rgba(40, 47, 55, .05); position: relative; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis .kpi:first-child { grid-row: span 2; background: var(--graphite); border-color: var(--graphite); color: #fff; display: flex; flex-direction: column; justify-content: center; }
.kpis .kpi:first-child .label { color: #e4e4e8; font-size: .85rem; }
.kpis .kpi:first-child .value { color: #fff; font-size: 2.6rem; font-weight: 900; letter-spacing: -.01em; }
.kpis .kpi:first-child .sub { color: #c9c9cf; font-size: .85rem; }
.kpis .kpi:first-child .delta.up { color: #7fd8ac; } .kpis .kpi:first-child .delta.down { color: #ffb3a8; }
.kpis .kpi:first-child .layer.cst { background: #3d4652; color: #a7e3c8; }
.kpis .kpi:first-child::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--brand); border-radius: 0 0 8px 8px; }
.kpi .label { text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; font-weight: 700; }
.chart-xl .chart { min-height: 300px; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.demo-band { z-index: 40; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis .kpi:first-child { grid-row: auto; grid-column: span 2; }
  .layout-2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: column; padding: .8rem .8rem .4rem; gap: .3rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .logo img { max-width: 170px; }
  .sidebar .product { margin: 0; border-top: 0; padding-top: 0; }
  .tabs { flex-direction: row; overflow-x: auto; gap: .3rem; padding-bottom: .3rem; }
  .tabs .nav-group { display: none; }
  .tabs button { width: auto; white-space: nowrap; padding: .45rem .65rem; font-size: .84rem; }
  .side-status { order: 3; margin-top: .3rem; }
  .topbar { padding: .7rem .8rem; }
  .topbar h1 { font-size: 1.2rem; }
  .filters { padding: .7rem .8rem 0; }
  .view { padding: .8rem .8rem 2rem; }
  .kpis .kpi:first-child .value { font-size: 2rem; }
  .chart-xl .chart { min-height: 0; }
}
@media (prefers-color-scheme: dark) {
  .sidebar .logo img { filter: invert(1); mix-blend-mode: screen; }
  .tabs button.active { background: #3d4652; }
}

.auth-card .brand img { width: 100%; max-width: 260px; height: auto; }
.auth-card { border-top: 4px solid var(--brand); }
.auth-sub { margin: -.8rem 0 1.2rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; font-size: .72rem; }

.period-info .cov { display: block; padding-left: 1.2rem; text-indent: -1.2rem; }
.period-info .cov::before { display: inline-block; width: 1.2rem; text-indent: 0; }
.period-info .cov b { margin-right: .35rem; }
/* fond de la colonne latérale prolongé sur toute la hauteur de page */
.shell { background: linear-gradient(to right, var(--surface) 0, var(--surface) 247px, var(--line) 247px, var(--line) 248px, var(--bg) 248px); }
.sidebar { border-right: 0; background: transparent; }
@media (max-width: 820px) { .shell { background: var(--bg); } .sidebar { background: var(--surface); } }
@media (max-width: 820px) { .side-status { display: none; } } /* le bandeau de période porte déjà ces informations */

/* écran Connexions */
.conn-list { display: flex; flex-direction: column; gap: 1rem; }
.conn-badges { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.cstate { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: .15rem .6rem; border: 1px solid currentColor; }
.cstate.ok { color: var(--good); } .cstate.ok::before { content: "✓"; }
.cstate.warn { color: #8a5a00; } .cstate.warn::before { content: "◐"; }
.cstate.crit { color: var(--critical); } .cstate.crit::before { content: "✕"; }
.cstate.none { color: var(--muted); } .cstate.none::before { content: "○"; }
.conn-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.4rem; }
.conn-guide { font-size: .86rem; color: var(--text-2); background: var(--bg); border-radius: 8px; padding: .7rem .9rem; }
.conn-guide p { margin: .35rem 0; } .conn-guide ul { margin: .2rem 0 .5rem; padding-left: 1.1rem; }
.conn-guide code, .conn-form code, .card code { font-size: .8rem; background: var(--topbar); border-radius: 3px; padding: 0 .25rem; word-break: break-all; }
.conn-form label { font-size: .85rem; }
.conn-form input:not([type=radio]) { width: 100%; }
.conn-form .methods { border: 1px solid var(--line); border-radius: 6px; padding: .4rem .7rem .55rem; margin: 0; }
.conn-form .methods legend { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 .3rem; }
.conn-form .radio { flex-direction: row; align-items: center; gap: .4rem; color: var(--text); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.note.crit { border-left-color: var(--critical); color: var(--critical); }
/* mobile : la pastille de mesure passe sous l'intitulé au lieu de déborder */
.kpi .label { flex-wrap: wrap; row-gap: .25rem; }
@media (max-width: 820px) {
  .conn-grid { grid-template-columns: 1fr; }
  .kpi .label { flex-direction: column; align-items: flex-start; }
  .kpi .label .layer { font-size: .62rem; }
}

[hidden] { display: none !important; }
.conn-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .5rem; margin: .7rem 0 .2rem; }
.conn-summary div { border: 1px solid var(--line); border-radius: 6px; padding: .45rem .6rem; font-size: .84rem; display: flex; flex-direction: column; gap: .25rem; }
.conn-summary b { color: var(--text); }
.qr { text-align: center; margin: .6rem 0; }
.qr img { display: inline-block; background: #fff; border-radius: 6px; image-rendering: pixelated; max-width: 100%; height: auto; }
