/* Console « Salle de veille ». Les jetons sont en tête : un nouvel écran réutilise les composants ci-dessous. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.77bc02670657.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.f7016cd446d2.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.196e3cbc5fee.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.79936b18df9f.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.b1c8a895f5fd.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #0a0d12; --panel: #10141b; --raise: #171d27; --line: #212a38; --line2: #313d50;
  --text: #e8edf4; --dim: #a6b2c2; --faint: #8593a7;
  --accent: #56c8f5; --on-accent: #03141d;
  --ok: #3fd68f; --ok-dim: #27855d; --warn: #f5c84c; --high: #ff9447; --bad: #ff6b5e; --stale: #a78bfa;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
h2 { margin: 0; font-size: 16px; font-weight: 600; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code { font-size: .92em; }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lbl { font: 500 11px/1.2 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.empty { padding: 18px 16px; color: var(--dim); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Structure : barre latérale, bandeau, page. */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 16px 12px; background: var(--panel); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1.5px solid var(--accent); border-radius: 4px; color: var(--accent); font: 500 11px/1 var(--mono); }
.brand-name { display: flex; flex-direction: column; gap: 2px; font-weight: 600; }
.sidebar select { width: 100%; background: var(--raise); }
.nav-groups { display: flex; flex-direction: column; gap: 16px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group > .lbl { padding: 0 10px 6px; }
.nav { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 4px; color: var(--dim); }
.nav:hover { color: var(--text); text-decoration: none; }
.nav[aria-current] { background: var(--raise); color: var(--text); }
.nav[aria-current] .ic { color: var(--accent); }
.cnt { margin-left: auto; font: 500 11px/1 var(--mono); padding: 3px 6px; border-radius: 3px; background: var(--line); color: var(--text); }
.cnt.stale { background: transparent; border: 1px solid var(--stale); color: var(--stale); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.sidebar-foot form { margin: 0; }
.sidebar-foot button.nav { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px 24px; background: var(--bg); border-bottom: 1px solid var(--line); }
.crumb { display: flex; align-items: baseline; gap: 10px; flex: 1 1 200px; min-width: 0; font-weight: 600; }
.crumb .sep { color: var(--line2); }
.search { display: flex; align-items: center; gap: 8px; flex: 1 1 280px; max-width: 440px; margin: 0; padding: 0 10px; background: var(--panel); border: 1px solid var(--line2); border-radius: 4px; color: var(--faint); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0; }
.search input:focus-visible { outline: 0; }
.page { display: flex; flex-direction: column; gap: 16px; padding: 20px 24px 32px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.page-head .push { margin-left: auto; }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cols > * { min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; align-items: start; }
.center { max-width: 440px; margin: 12vh auto 0; padding: 0 16px; display: flex; flex-direction: column; gap: 20px; }

/* Briques. */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; }
.panel-body { padding: 0 16px 16px; }
.panel-foot { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 500 13px/1 var(--sans); padding: 9px 12px; border-radius: 4px; border: 1px solid var(--line2); background: var(--raise); color: var(--text); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--faint); text-decoration: none; }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.block { width: 100%; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 500 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 4px 7px; border-radius: 3px; border: 1px solid var(--line2); color: var(--dim); white-space: nowrap; }
a.chip:hover { color: var(--text); text-decoration: none; }
.chip.on, .chip[aria-current] { border-color: var(--accent); color: var(--accent); }
.chip.ok { border-color: var(--ok); color: var(--ok); }
.chip.bad { border-color: var(--bad); color: var(--bad); }
.chip.warn { border-color: var(--warn); color: var(--warn); }
.chip.stale { border-color: var(--stale); color: var(--stale); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.segs { display: flex; flex-wrap: wrap; border: 1px solid var(--line2); border-radius: 4px; overflow: hidden; }
.seg { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; font-weight: 500; color: var(--dim); border-right: 1px solid var(--line2); }
.seg:last-child { border-right: 0; }
.seg:hover { color: var(--text); text-decoration: none; }
.seg[aria-current] { background: var(--raise); color: var(--text); }
kbd { font: 500 11px/1 var(--mono); padding: 3px 5px; border: 1px solid var(--line2); border-radius: 3px; color: var(--dim); }
.keys { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 12px; color: var(--dim); }
.keys span { display: inline-flex; align-items: center; gap: 6px; }
.flash { padding: 10px 14px; border: 1px solid var(--ok); border-radius: 4px; color: var(--ok); background: var(--panel); }
.flash.error { border-color: var(--bad); color: var(--bad); }

/* Formulaires. */
input, select, textarea, button { font: inherit; }
input, select, textarea { color: var(--text); background: var(--bg); border: 1px solid var(--line2); border-radius: 4px; padding: 8px 10px; }
input::placeholder { color: var(--faint); }
input[type=radio], input[type=checkbox] { padding: 0; margin: 3px 0 0; accent-color: var(--accent); }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld > span:first-child, .fld > legend { font-size: 13px; color: var(--dim); }
.fld input:not([type=radio]):not([type=checkbox]), .fld select { width: 100%; }
.fld .help { font-size: 12px; color: var(--faint); }
.fld .pair { display: flex; align-items: center; gap: 6px; }
.fld .pair input[type=number] { flex: 0 0 84px; width: 84px; }
.fld .pair select { flex: 1; min-width: 0; }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--bad); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 14px; }
.step { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.step-head { display: flex; align-items: center; gap: 10px; }
.step-num { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border: 1px solid var(--accent); border-radius: 4px; color: var(--accent); font: 500 12px/1 var(--mono); }
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 8px; }
.kind { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line2); border-radius: 4px; background: var(--bg); cursor: pointer; }
.kind input { position: absolute; opacity: 0; }
.kind:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.kind:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.kind-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 500; }
.kind:has(input:checked) .kind-title { color: var(--accent); }
.choice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 4px; background: var(--bg); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); }
.choice > span { display: flex; flex-direction: column; gap: 2px; }
.schema { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px; background: var(--bg); border: 1px dashed var(--line2); border-radius: 4px; font: 500 12px/1 var(--mono); }
.schema .span { flex: 8 1 150px; display: flex; align-items: center; justify-content: center; height: 28px; padding: 0 10px; border: 1px solid var(--accent); border-radius: 3px; color: var(--accent); white-space: nowrap; }
.schema .grace { flex: 3 1 130px; border-color: var(--warn); color: var(--warn); border-style: dashed; }
.summary { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.summary-text { font-size: 16px; line-height: 1.45; }
.summary-text strong { color: var(--accent); font-weight: 500; }
.snippet { display: flex; flex-direction: column; gap: 2px; padding: 12px; font: 12px/1.5 var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; overflow-x: auto; white-space: nowrap; }
.snippet .c { color: var(--faint); }
.copy { display: flex; gap: 6px; }
.copy input { flex: 1; min-width: 0; font: 12px/1.4 var(--mono); }
[hidden] { display: none !important; }

/* Gravité (jauge à 4 crans) et états (formes distinctes, pas la couleur seule). */
.sev { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); white-space: nowrap; }
.sev .m { display: inline-flex; gap: 2px; }
.sev .m span { width: 4px; height: 12px; border-radius: 1px; background: var(--line2); }
.s4 { color: var(--bad); } .s4 .m span { background: var(--bad); }
.s3 { color: var(--high); } .s3 .m span:nth-child(-n+3) { background: var(--high); }
.s2 { color: var(--warn); } .s2 .m span:nth-child(-n+2) { background: var(--warn); }
.s1 { color: var(--dim); } .s1 .m span:nth-child(1) { background: var(--dim); }
.s0 { color: var(--faint); }
.g { display: inline-block; width: 9px; height: 9px; flex: none; }
.g.ok { background: var(--ok); border-radius: 50%; }
.g.deg { background: var(--warn); transform: rotate(45deg) scale(.85); }
.g.down { background: var(--bad); }
.g.stale { border: 2px solid var(--stale); border-radius: 50%; }
.g.unk { border: 1.5px dashed var(--faint); border-radius: 50%; }
.st { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); white-space: nowrap; }
.st.ok { color: var(--ok); } .st.deg { color: var(--warn); } .st.down { color: var(--bad); } .st.stale { color: var(--stale); } .st.unk { color: var(--dim); }

/* Tableaux. */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { font: 500 11px/1.2 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--faint); text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody:last-child > tr:last-child > td { border-bottom: 0; }
tr.hover:hover > td { background: var(--raise); }
.two { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.two > :last-child { font-size: 12px; color: var(--dim); }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.facts { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px 12px; margin: 0; }
.facts dt { font: 500 11px/1.6 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.feed li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
.feed time { font-family: var(--mono); color: var(--faint); font-variant-numeric: tabular-nums; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.list li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.list .end { margin-left: auto; font-family: var(--mono); color: var(--dim); white-space: nowrap; }

/* Vue d'ensemble. */
.headline { font-size: 30px; line-height: 1.12; font-weight: 600; letter-spacing: -.02em; max-width: 26ch; }
.lede { font-size: 15px; color: var(--dim); max-width: 78ch; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 16px; color: var(--text); }
a.tile:hover { border-color: var(--line2); text-decoration: none; }
.tile-figure { display: flex; align-items: baseline; gap: 10px; }
.tile-figure b { font: 500 40px/1 var(--mono); font-variant-numeric: tabular-nums; }
.tile-figure b i { font-style: normal; color: var(--faint); }
.bar { display: flex; gap: 2px; height: 6px; background: var(--line); }
.bar span { min-width: 3px; }
.bar .crit, .bar .down { background: var(--bad); } .bar .high { background: var(--high); } .bar .med, .bar .deg { background: var(--warn); }
.bar .low { background: var(--line2); } .bar .ok { background: var(--ok-dim); } .bar .stale { background: var(--stale); } .bar .unk { background: var(--line2); }
.queue-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); color: var(--text); }
.queue-row:hover { background: var(--raise); text-decoration: none; }
.queue-row .meta { display: flex; align-items: center; gap: 12px; }
.wall { display: flex; flex-direction: column; gap: 9px; padding: 4px 16px 14px; }
.wall-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wall-row > a { font: 12px/1.3 var(--mono); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wall-row.calm > a { color: var(--dim); }
.wall-cells { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.wall-cells .g { width: 13px; height: 13px; }
.wall-cells .g.ok { background: var(--ok-dim); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.beat { display: flex; flex-direction: column; gap: 6px; }
.beat-head { display: flex; justify-content: space-between; gap: 12px; font: 13px/1.3 var(--mono); }
.beat-head a { color: var(--text); }
.track { height: 4px; background: var(--line); }
.track > span { display: block; height: 4px; background: var(--accent); }
.track.late { background: var(--bad); }

/* Alertes : une ligne se déplie en contexte, chronologie et actions. */
tbody.alert.open > tr > td { background: var(--raise); }
tbody.alert.open > tr:first-child > td { border-bottom-color: transparent; }
.alert-open { display: inline; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.alert-open:hover { color: var(--accent); text-decoration: none; }
.detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.detail > section { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; min-width: 0; }
.plain { font-size: 15px; line-height: 1.5; color: var(--text); max-width: 80ch; }
.resolve { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.resolve > * { flex: 1 1 150px; min-width: 0; }
.resolve > select, .resolve > button { flex-basis: 100%; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav-groups { flex-direction: row; flex-wrap: wrap; }
  .nav-group { flex: 1 1 150px; }
  .topbar { position: static; padding: 12px 16px; }
  .page { padding: 16px; }
  .summary { position: static; }
  .headline { font-size: 24px; }
  .queue-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .facts dd { margin-bottom: 8px; }
}

/* Liste de choix commune à la création et à la fiche d’actif. */
.perimeter-choices { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); }
.perimeter-choices label { display: inline-flex; align-items: center; gap: 6px; }
.perimeter-choices legend { padding: 0 4px; }

/* Compléments de mise en page. */
.intro { display: flex; flex-direction: column; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
#dns-discovery { padding-top: 16px; }
#dns-names tr:target { outline: 1px solid var(--accent); outline-offset: -1px; }
.dns-review > form { margin-top: 12px; }
.dns-choices { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.dns-choices legend { margin-bottom: 8px; }
.dns-choices .choice { overflow-wrap: anywhere; }
.dns-review button:disabled { opacity: .55; cursor: default; }
.filters input[type=search] { min-width: min(260px, 100%); }
.notice { max-width: 520px; }
.workspace { padding: 0 10px; }
.backlink { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 13px; }
.silent { color: var(--stale); }
.beat-head .late { color: var(--bad); font-weight: 500; }
.beat-head .ok { color: var(--ok); }
.wall-cells a.g:hover { outline: 2px solid var(--text); outline-offset: 1px; }
.step form, .step .copy { margin: 0; }
.step form[data-confirm] { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.feed li { grid-template-columns: max-content minmax(0, 1fr); }
.list a, .list li > .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
