/* HYPHA : feuille de style unique. Jetons d'abord, puis mise en page, puis composants. */

/* ── Jetons ─────────────────────────────────────────────────────────────── */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f0e;
  --surface: #1a1a19;
  --surface-2: #21211f;
  --surface-3: #2a2a27;
  --overlay: rgba(0, 0, 0, .55);
  --hover: rgba(255, 255, 255, .045);
  --selected: rgba(57, 135, 229, .16);
  --border: #2c2c2a;
  --border-strong: #3a3a37;
  --text: #f0efec;
  --text-2: #c3c2b7;
  --muted: #898781;
  --accent: #3987e5;
  --accent-hover: #5598e7;
  --accent-ink: #ffffff;
  --accent-soft: rgba(57, 135, 229, .14);
  --focus: #86b6ef;

  --ok: #0ca30c;
  --warn: #fab219;
  --serious: #ec835a;
  --crit: #d03b3b;
  --nodata: #6f6d68;
  --ok-soft: rgba(12, 163, 12, .14);
  --warn-soft: rgba(250, 178, 25, .14);
  --crit-soft: rgba(208, 59, 59, .16);
  --ink-on-status: #ffffff;
  --ink-on-warn: #0b0b0b;

  --chart-grid: #2c2c2a;
  --chart-axis: #383835;
  --chart-text: #898781;

  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767;
  --s-other: #5c5b57;

  --log-emergency: #9b2c2c;
  --log-alert: #9b2c2c;
  --log-critical: #b83232;
  --log-error: #d03b3b;
  --log-warning: #fab219;
  --log-notice: #86b6ef;
  --log-info: #3987e5;
  --log-debug: #6f6d68;

  --hex-1: #0a7d2c; --hex-2: #3ba33b; --hex-3: #fab219; --hex-4: #ec835a; --hex-5: #d03b3b;
  --hex-down: #3a3a37;

  --code-bg: #121211;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f3f1;
  --surface: #fcfcfb;
  --surface-2: #f6f6f4;
  --surface-3: #ecebe7;
  --overlay: rgba(20, 20, 18, .35);
  --hover: rgba(11, 11, 11, .04);
  --selected: rgba(42, 120, 214, .12);
  --border: #e1e0d9;
  --border-strong: #c9c8c0;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #6e6c67;
  --accent: #2a78d6;
  --accent-hover: #256abf;
  --accent-ink: #ffffff;
  --accent-soft: rgba(42, 120, 214, .10);
  --focus: #2a78d6;

  --ok: #0ca30c;
  --warn: #fab219;
  --serious: #ec835a;
  --crit: #d03b3b;
  --nodata: #a3a19a;
  --ok-soft: rgba(12, 163, 12, .10);
  --warn-soft: rgba(250, 178, 25, .16);
  --crit-soft: rgba(208, 59, 59, .10);

  --chart-grid: #e8e7e1;
  --chart-axis: #c3c2b7;
  --chart-text: #6e6c67;

  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --s-other: #b9b7b0;

  --log-notice: #5598e7;
  --log-info: #2a78d6;
  --log-debug: #a3a19a;
  --hex-down: #d6d5cf;

  --code-bg: #f1f0ec;
  --shadow: 0 10px 30px rgba(20, 20, 18, .14);
  --shadow-sm: 0 2px 8px rgba(20, 20, 18, .10);
}

:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-xxl: 28px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --r-sm: 4px;
  --r: 6px;
  --r-lg: 10px;
  --sidebar-w: 212px;
  --sidebar-w-collapsed: 52px;
  --topbar-h: 48px;
  --row-h: 30px;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--fs)/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; }
h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }
h4 { font-size: var(--fs); }
p { margin: 0 0 var(--sp-2); }
code, pre, .mono { font-family: var(--mono); font-size: 12px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
::selection { background: var(--selected); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: var(--fs-sm); }
.xsmall { font-size: var(--fs-xs); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: var(--sp-2); }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.spacer { flex: 1 1 auto; }

.boot { display: grid; place-items: center; height: 100vh; }
.boot-mark {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border-strong); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Coquille de l'application ──────────────────────────────────────────── */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0;
}
.app.nav-collapsed .sidebar { width: var(--sidebar-w-collapsed); flex-basis: var(--sidebar-w-collapsed); }
.app.nav-collapsed .nav-label, .app.nav-collapsed .brand-name, .app.nav-collapsed .nav-section { display: none; }
.brand {
  display: flex; align-items: center; gap: 10px; height: var(--topbar-h);
  padding: 0 14px; border-bottom: 1px solid var(--border); color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { width: 24px; height: 24px; flex: 0 0 24px; }
.brand-name { font-weight: 700; letter-spacing: .08em; font-size: var(--fs-md); }
.brand-name small { display: block; font-weight: 400; letter-spacing: 0; font-size: 10px; color: var(--muted); }
.nav { flex: 1 1 auto; overflow-y: auto; padding: var(--sp-2) 0; }
.nav-section { padding: 10px 16px 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 14px 0 16px;
  color: var(--text-2); border-left: 2px solid transparent; white-space: nowrap;
}
.nav-item:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.nav-item.active { color: var(--text); background: var(--selected); border-left-color: var(--accent); }
.nav-item svg { flex: 0 0 16px; }
.nav-sub { display: none; }
.nav-item.active + .nav-sub, .nav-sub.open { display: block; }
.nav-sub a {
  display: block; padding: 4px 14px 4px 42px; font-size: var(--fs-sm); color: var(--muted);
}
.nav-sub a:hover { color: var(--text); text-decoration: none; }
.nav-sub a.active { color: var(--text); }
.app.nav-collapsed .nav-sub { display: none !important; }
.nav-foot { border-top: 1px solid var(--border); padding: var(--sp-2); }
.nav-foot button { width: 100%; justify-content: flex-start; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); flex: 0 0 var(--topbar-h);
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 0 var(--sp-4); background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar .crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-md); }
.topbar .crumbs a { color: var(--muted); }
.topbar .crumbs .sep { color: var(--muted); }
.topbar .crumbs .cur { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { flex: 1 1 auto; overflow: auto; padding: var(--sp-4); min-height: 0; }
.content.flush { padding: 0; }
.page-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); flex-wrap: wrap; }
.page-head h1 { font-size: var(--fs-lg); }
.page-head .desc { color: var(--muted); font-size: var(--fs-sm); }

/* ── Boutons et champs ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: var(--r);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  cursor: pointer; white-space: nowrap; font-size: var(--fs); line-height: 1;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--crit); }
.btn.danger.solid { background: var(--crit); border-color: var(--crit); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.sm { height: 24px; padding: 0 8px; font-size: var(--fs-sm); }
.btn.icon { width: 30px; padding: 0; }
.btn.sm.icon { width: 24px; }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.btn .dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.btn.on .dot-live { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r) 0 0 var(--r); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--r) var(--r) 0; }

.input, select.input, textarea.input {
  height: 30px; padding: 0 10px; border-radius: var(--r);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  min-width: 0;
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.4; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.input.mono { font-family: var(--mono); font-size: 12px; }
.input.sm { height: 24px; font-size: var(--fs-sm); padding: 0 8px; }
select.input { padding-right: 24px; }
.input.invalid { border-color: var(--crit); }
.search {
  position: relative; display: flex; align-items: center; min-width: 0;
}
.search svg { position: absolute; left: 9px; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 30px; width: 100%; }
.search .kbd { position: absolute; right: 8px; }
.kbd {
  display: inline-block; padding: 0 5px; border: 1px solid var(--border-strong); border-radius: 3px;
  font: 10px/16px var(--mono); color: var(--muted); background: var(--surface);
}
label.field { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); color: var(--text-2); }
label.field > span.lbl { font-weight: 500; }
label.field .hint { color: var(--muted); font-size: var(--fs-xs); }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: var(--fs); color: var(--text); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-3); }
.form-grid .full { grid-column: 1 / -1; }
.form-section { border-top: 1px solid var(--border); padding-top: var(--sp-4); margin-top: var(--sp-4); }
.form-section > h3 { margin-bottom: var(--sp-3); display: flex; align-items: center; gap: 8px; }
.step-num {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: var(--fs-xs); font-weight: 700;
}

/* ── Panneaux, cartes, grilles ──────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); min-width: 0; }
.panel-head {
  display: flex; align-items: center; gap: var(--sp-2); min-height: 38px;
  padding: 6px var(--sp-3); border-bottom: 1px solid var(--border);
}
.panel-head h2, .panel-head h3 { font-size: var(--fs); font-weight: 600; }
.panel-head .sub { color: var(--muted); font-size: var(--fs-xs); }
.panel-body { padding: var(--sp-3); min-width: 0; }
.panel-body.flush { padding: 0; }
.grid { display: grid; gap: var(--sp-3); }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.grid.side { grid-template-columns: 240px minmax(0, 1fr); }
@media (max-width: 1100px) {
  .grid.c3, .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .grid.c2, .grid.c3, .grid.c4, .grid.side { grid-template-columns: minmax(0, 1fr); }
}

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--sp-3); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: var(--sp-3); }
.tile .t-label { color: var(--muted); font-size: var(--fs-sm); display: flex; align-items: center; gap: 6px; }
.tile .t-value { font-size: var(--fs-xxl); font-weight: 600; line-height: 1.15; margin-top: 4px; }
.tile .t-sub { color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
a.tile { color: inherit; display: block; }
a.tile:hover { border-color: var(--border-strong); text-decoration: none; }

/* ── Tableaux ───────────────────────────────────────────────────────────── */
.table-wrap { overflow: auto; max-width: 100%; }
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs); }
.tbl th, .tbl td { padding: 0 10px; height: var(--row-h); text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl th {
  position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--muted);
  font-weight: 500; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; user-select: none;
}
.tbl th.sortable { cursor: pointer; }
.tbl th.sortable:hover { color: var(--text); }
.tbl th .arrow { display: inline-block; width: 10px; margin-left: 2px; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl td.wrap { white-space: normal; }
.tbl td.trunc { max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
.tbl tbody tr:hover { background: var(--hover); }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.selected { background: var(--selected); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .bar-cell { display: flex; align-items: center; gap: 6px; min-width: 110px; }
.tbl .bar-cell .bar { flex: 1 1 auto; height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; min-width: 40px; }
.tbl .bar-cell .bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.tbl .bar-cell .v { width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.tbl-foot { padding: 8px 10px; color: var(--muted); font-size: var(--fs-xs); border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }

/* ── Pastilles, étiquettes, états ───────────────────────────────────────── */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; background: var(--muted); }
.dot.ok, .dot.up { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.alert, .dot.down, .dot.crit { background: var(--crit); }
.dot.nodata, .dot.unknown { background: var(--nodata); }
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px;
  border-radius: 10px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.alert, .badge.crit { background: var(--crit-soft); color: var(--crit); }
.badge.nodata, .badge.muted { background: var(--surface-3); color: var(--muted); }
.badge.info { background: var(--accent-soft); color: var(--accent); }
:root[data-theme="light"] .badge.warn { color: #8a5a00; }
.badge svg { width: 12px; height: 12px; }
.tag {
  display: inline-flex; align-items: center; max-width: 260px; height: 20px; padding: 0 6px;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); font-size: var(--fs-xs);
  color: var(--text-2); background: var(--surface-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tag b { font-weight: 500; color: var(--muted); margin-right: 1px; }
button.tag { cursor: pointer; }
button.tag:hover { border-color: var(--accent); color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 4px 0 8px;
  border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: var(--fs-sm);
  border: 1px solid transparent;
}
.chip.neg { background: var(--crit-soft); }
.chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; }
.chip button:hover { color: var(--text); background: var(--hover); }
.status-bar { display: inline-block; width: 3px; align-self: stretch; border-radius: 2px; }

.state { padding: var(--sp-6) var(--sp-4); text-align: center; color: var(--muted); }
.state.sm { padding: var(--sp-4); }
.state h3 { color: var(--text); margin-bottom: 6px; font-size: var(--fs-md); }
.state .actions { margin-top: var(--sp-3); display: flex; justify-content: center; gap: var(--sp-2); }
.state.error { color: var(--crit); }
.state.error .detail { color: var(--muted); font-size: var(--fs-sm); margin-top: 4px; }
.spinner {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite;
  vertical-align: middle;
}
.loading-line { height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 50% 100%; animation: slide 1s linear infinite; }
@keyframes slide { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.skeleton { background: var(--surface-2); border-radius: var(--r-sm); min-height: 14px; }
.callout {
  display: flex; gap: var(--sp-2); padding: var(--sp-3); border-radius: var(--r);
  background: var(--accent-soft); border: 1px solid transparent; font-size: var(--fs);
}
.callout.warn { background: var(--warn-soft); }
.callout.crit { background: var(--crit-soft); }
.callout svg { flex: 0 0 16px; margin-top: 1px; }

/* ── Onglets ────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button, .tabs a {
  border: 0; background: transparent; color: var(--muted); padding: 8px 12px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: var(--fs);
}
.tabs button:hover, .tabs a:hover { color: var(--text); text-decoration: none; }
.tabs .active { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { margin-left: 6px; color: var(--muted); font-size: var(--fs-xs); }

/* ── Menus déroulants, fenêtres, notifications ──────────────────────────── */
.dropdown { position: relative; display: inline-flex; }
.menu {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 50; min-width: 200px; max-height: 70vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 4px;
}
.menu.left { left: 0; right: auto; }
.menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border: 0; background: transparent;
  color: var(--text); text-align: left; border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs); white-space: nowrap;
}
.menu-item:hover, .menu-item.hl { background: var(--hover); text-decoration: none; }
.menu-item.sel { color: var(--accent); }
.menu-item .check-mark { width: 14px; display: inline-flex; }
.menu-sep { height: 1px; background: var(--border); margin: 4px 0; }
.menu-head { padding: 6px 10px; font-size: var(--fs-xs); color: var(--muted); }

.modal-back {
  position: fixed; inset: 0; z-index: 100; background: var(--overlay);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh var(--sp-4) var(--sp-4); overflow: auto;
}
.modal {
  width: 560px; max-width: 100%; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; max-height: 88vh;
}
.modal.wide { width: 920px; }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: var(--fs-md); }
.modal-body { padding: 16px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }

.drawer-back { position: fixed; inset: 0; z-index: 90; background: var(--overlay); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 91; width: min(720px, 96vw);
  background: var(--surface); border-left: 1px solid var(--border-strong); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.drawer-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); min-height: 48px; }
.drawer-body { flex: 1 1 auto; overflow: auto; padding: 16px; }

.toasts { position: fixed; bottom: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 240px; max-width: 420px; padding: 10px 14px; border-radius: var(--r); background: var(--surface-3);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm); font-size: var(--fs);
  border-left: 3px solid var(--accent);
}
.toast.ok { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--crit); }

/* ── Sélecteur de période ───────────────────────────────────────────────── */
.timepicker .btn { gap: 8px; }
.timepicker .menu { width: 300px; }
.timepicker .custom { padding: 8px 10px; display: grid; gap: 6px; border-top: 1px solid var(--border); margin-top: 4px; }
.timepicker .custom input { width: 100%; }

/* ── Code et copie ──────────────────────────────────────────────────────── */
.code {
  position: relative; background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--r);
  padding: 10px 48px 10px 12px; font: 12px/1.55 var(--mono); white-space: pre-wrap; word-break: break-all; color: var(--text);
}
.code .copy { position: absolute; top: 6px; right: 6px; }
.secret {
  font: 13px/1.5 var(--mono); padding: 10px 12px; border-radius: var(--r); background: var(--code-bg);
  border: 1px dashed var(--accent); word-break: break-all; user-select: all;
}

/* ── Arbre JSON ─────────────────────────────────────────────────────────── */
.jtree { font: 12px/1.6 var(--mono); }
.jtree ul { list-style: none; margin: 0; padding-left: 16px; }
.jtree > ul { padding-left: 0; }
.jtree .k { color: var(--text-2); }
.jtree .k.clickable { cursor: pointer; }
.jtree .k.clickable:hover { color: var(--accent); text-decoration: underline; }
.jtree .s { color: var(--s3); word-break: break-all; }
.jtree .n { color: var(--s4); }
.jtree .b { color: var(--s7); }
.jtree .z { color: var(--muted); }
.jtree .tog { cursor: pointer; color: var(--muted); display: inline-block; width: 12px; user-select: none; }

/* ── Graphiques ─────────────────────────────────────────────────────────── */
.chart { position: relative; min-width: 0; }
.chart .uplot { font-family: var(--font); }
.chart .u-over { cursor: crosshair; }
.chart .u-select { background: var(--accent-soft); }
.chart-empty { display: grid; place-items: center; color: var(--muted); font-size: var(--fs-sm); border: 1px dashed var(--border); border-radius: var(--r); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; font-size: var(--fs-xs); color: var(--text-2); max-height: 64px; overflow: auto; }
.chart-legend .li { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; max-width: 280px; user-select: none; }
.chart-legend .li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-legend .li.off { opacity: .4; }
.chart-legend .sw { width: 10px; height: 3px; border-radius: 2px; flex: 0 0 10px; }
.chart-legend .more { color: var(--muted); }
.chart-tip {
  position: absolute; z-index: 20; pointer-events: none; min-width: 160px; max-width: 360px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 6px 8px; font-size: var(--fs-xs); color: var(--text);
}
.chart-tip .tt { color: var(--muted); margin-bottom: 4px; white-space: nowrap; }
.chart-tip .tr { display: flex; align-items: center; gap: 6px; line-height: 18px; }
.chart-tip .tr .sw { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 8px; }
.chart-tip .tr .l { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.chart-tip .tr .v { font-variant-numeric: tabular-nums; font-weight: 600; padding-left: 10px; white-space: nowrap; }
.chart-tip .tr.hl .l { color: var(--text); }
.chart-title { font-size: var(--fs-sm); font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.chart-title .unit { color: var(--muted); font-weight: 400; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: var(--sp-3); }
@media (max-width: 900px) { .charts-grid { grid-template-columns: minmax(0, 1fr); } }

/* ── Carte des hôtes ────────────────────────────────────────────────────── */
.hexmap { width: 100%; }
.hexmap svg { display: block; width: 100%; height: auto; }
.hexmap .hex { cursor: pointer; stroke: var(--surface); stroke-width: 2; }
.hexmap .hex:hover { stroke: var(--text); }
.hexmap .group-title { fill: var(--text-2); font-size: 12px; font-weight: 600; }
.hexmap .hex-label { fill: #fff; font-size: 10px; pointer-events: none; text-anchor: middle; }
.hexmap-legend { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-2); }
.hexmap-legend .sw { width: 14px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 4px; vertical-align: -1px; }
.map-tip { position: fixed; z-index: 120; pointer-events: none; }

/* ── Journaux ───────────────────────────────────────────────────────────── */
.logs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
@media (max-width: 900px) { .logs-layout { grid-template-columns: minmax(0, 1fr); } }
.facets { position: sticky; top: 0; }
.facet { border-bottom: 1px solid var(--border); padding: 8px 10px; }
.facet:last-child { border-bottom: 0; }
.facet h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.facet-row {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 2px 4px; border-radius: var(--r-sm);
  font-size: var(--fs-sm); cursor: pointer; border: 0; background: transparent; color: var(--text-2); text-align: left;
}
.facet-row:hover { background: var(--hover); color: var(--text); }
.facet-row.on { color: var(--text); background: var(--accent-soft); }
.facet-row .cnt { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.facet-row .ex { visibility: hidden; color: var(--muted); padding: 0 2px; }
.facet-row:hover .ex { visibility: visible; }
.facet-row .ex:hover { color: var(--crit); }
.log-list { font-size: 12px; }
.log-row { display: grid; grid-template-columns: 3px 150px 88px 130px 120px minmax(0, 1fr); gap: 10px; align-items: center; padding: 0 10px 0 0; min-height: 26px; border-bottom: 1px solid var(--border); cursor: pointer; }
.log-row:hover { background: var(--hover); }
.log-row.open { background: var(--selected); }
.log-row.new { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: var(--accent-soft); } to { background: transparent; } }
.log-row > .sbar { align-self: stretch; }
.log-row .msg { font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.log-row .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.log-head { display: grid; grid-template-columns: 3px 150px 88px 130px 120px minmax(0, 1fr); gap: 10px; padding: 0 10px 0 0; height: 28px; align-items: center; background: var(--surface-2); color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; z-index: 1; }
@media (max-width: 1100px) {
  .log-row, .log-head { grid-template-columns: 3px 130px 80px minmax(0, 1fr); }
  .log-row .c-host, .log-row .c-svc, .log-head .c-host, .log-head .c-svc { display: none; }
}
.log-detail { padding: 10px 14px 14px 13px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.log-detail pre { margin: 0 0 10px; white-space: pre-wrap; word-break: break-word; font: 12px/1.5 var(--mono); max-height: 360px; overflow: auto; }
.st-emergency, .st-alert { background: var(--log-emergency); }
.st-critical { background: var(--log-critical); }
.st-error { background: var(--log-error); }
.st-warning, .st-warn { background: var(--log-warning); }
.st-notice { background: var(--log-notice); }
.st-info { background: var(--log-info); }
.st-debug { background: var(--log-debug); }
.st-text-error, .st-text-critical, .st-text-alert, .st-text-emergency { color: var(--crit); }
.st-text-warning { color: var(--warn); }
:root[data-theme="light"] .st-text-warning { color: #8a5a00; }
.st-text-info, .st-text-notice { color: var(--accent); }
.st-text-debug { color: var(--muted); }
.querybar { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; margin-bottom: var(--sp-3); }
.querybar .search { flex: 1 1 380px; }
.querybar .input { font-family: var(--mono); font-size: 12px; }

/* ── Explorateur de métriques ───────────────────────────────────────────── */
.mq { display: grid; grid-template-columns: 26px 80px minmax(180px, 1.2fr) minmax(200px, 2fr) minmax(130px, 1fr) 160px 96px auto; gap: 6px; align-items: start; padding: 8px 0 4px; }
.mq > * { min-width: 0; }
.mq .qid { width: 22px; height: 22px; margin-top: 4px; border-radius: 4px; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; color: #fff; }
@media (max-width: 1100px) { .mq { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr); } .mq > input.mono { grid-column: span 2 !important; } }
.tagbox { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 30px; padding: 2px 4px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface-2); }
.tagbox input { border: 0; background: transparent; outline: none; flex: 1 1 80px; min-width: 80px; height: 24px; font-size: var(--fs-sm); }
.ac { position: relative; }
.ac .menu { left: 0; right: auto; min-width: 100%; max-height: 260px; }
.ac .menu-item { font-family: var(--mono); font-size: 12px; }

/* ── APM : cascade ──────────────────────────────────────────────────────── */
.wf { font-size: var(--fs-sm); }
.wf-head { display: grid; grid-template-columns: minmax(260px, 36%) minmax(0, 1fr); border-bottom: 1px solid var(--border); background: var(--surface-2); height: 26px; align-items: center; position: sticky; top: 0; z-index: 2; }
.wf-ticks { position: relative; height: 26px; }
.wf-ticks span { position: absolute; top: 5px; transform: translateX(-50%); color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; }
.wf-ticks span:first-child { transform: none; }
.wf-row { display: grid; grid-template-columns: minmax(260px, 36%) minmax(0, 1fr); height: 26px; align-items: center; cursor: pointer; border-bottom: 1px solid transparent; }
.wf-row:hover { background: var(--hover); }
.wf-row.sel { background: var(--selected); }
.wf-name { display: flex; align-items: center; gap: 4px; min-width: 0; padding-right: 8px; white-space: nowrap; overflow: hidden; }
.wf-name .tw { width: 14px; flex: 0 0 14px; color: var(--muted); text-align: center; cursor: pointer; user-select: none; }
.wf-name .svc { font-weight: 600; }
.wf-name .op { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.wf-track { position: relative; height: 100%; }
.wf-track .grid-l { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--chart-grid); }
.wf-bar { position: absolute; top: 6px; height: 14px; border-radius: 3px; min-width: 2px; }
.wf-bar.err { box-shadow: inset 0 0 0 2px var(--crit); }
.wf-dur { position: absolute; top: 5px; font-size: var(--fs-xs); color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.svc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-xs); }
.svc-legend .sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 5px; vertical-align: -1px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; font-size: var(--fs-sm); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* ── Tableaux de bord ───────────────────────────────────────────────────── */
.dash-grid { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 72px; gap: 10px; }
.dash-grid.editing { background-image: linear-gradient(to right, var(--border) 1px, transparent 1px); background-size: calc((100% + 10px) / 12) 100%; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.widget-head { display: flex; align-items: center; gap: 6px; padding: 6px 10px; min-height: 30px; }
.widget-head h3 { font-size: var(--fs-sm); font-weight: 600; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-body { flex: 1 1 auto; min-height: 0; padding: 0 10px 8px; overflow: hidden; position: relative; }
.widget-body.scroll { overflow: auto; }
.editing .widget-head { cursor: move; background: var(--surface-2); border-bottom: 1px solid var(--border); border-radius: var(--r) var(--r) 0 0; }
.widget .resize { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; display: none; }
.widget .resize::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); }
.editing .widget .resize { display: block; }
.widget.dragging { opacity: .85; box-shadow: var(--shadow); z-index: 5; outline: 2px solid var(--accent); }
.widget-tools { display: none; gap: 2px; }
.editing .widget-tools { display: flex; }
.qv { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.qv .v { font-size: clamp(22px, 4vw, 44px); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.qv .u { color: var(--muted); font-size: var(--fs-sm); }
.toplist .tl-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 8px; align-items: center; height: 24px; font-size: var(--fs-sm); }
.toplist .tl-bar { position: relative; height: 18px; border-radius: 3px; overflow: hidden; background: var(--surface-2); }
.toplist .tl-bar > i { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); border-right: 2px solid var(--accent); }
.toplist .tl-bar > span { position: relative; padding: 0 6px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.note-body { font-size: var(--fs); color: var(--text-2); }
.note-body h1, .note-body h2, .note-body h3 { color: var(--text); margin: 4px 0 6px; font-size: var(--fs-md); }
.tv-bar { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; margin-bottom: var(--sp-3); }
.tv-bar label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.tv-bar label b { color: var(--text-2); font-family: var(--mono); font-weight: 500; }
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .dash-grid .widget { grid-column: 1 / -1 !important; grid-row: auto !important; min-height: 260px; }
}
.type-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.type-pick button { text-align: left; padding: 10px; border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--surface-2); cursor: pointer; }
.type-pick button:hover, .type-pick button.sel { border-color: var(--accent); background: var(--accent-soft); }
.type-pick b { display: block; font-size: var(--fs); }
.type-pick span { font-size: var(--fs-xs); color: var(--muted); }

/* ── Synthétiques : bande de disponibilité ──────────────────────────────── */
.uptime-strip { display: flex; gap: 1px; height: 18px; align-items: stretch; min-width: 120px; }
.uptime-strip i { flex: 1 1 0; border-radius: 1px; background: var(--surface-3); }
.uptime-strip i.ok { background: var(--ok); }
.uptime-strip i.ko { background: var(--crit); }

/* ── Événements ─────────────────────────────────────────────────────────── */
.ev-day { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px 4px; }
.ev { display: grid; grid-template-columns: 4px 70px minmax(0, 1fr); gap: 10px; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--border); }
.ev:last-child { border-bottom: 0; }
.ev .ev-bar { border-radius: 2px; }
.ev .ev-time { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.ev .ev-title { font-weight: 600; }
.ev .ev-text { color: var(--text-2); font-size: var(--fs-sm); white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.ev-info { background: var(--accent); }
.ev-success { background: var(--ok); }
.ev-warning { background: var(--warn); }
.ev-error { background: var(--crit); }

/* ── Accueil public ─────────────────────────────────────────────────────── */
.public { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.public-top { display: flex; align-items: center; gap: 12px; padding: 16px max(16px, 4vw); }
.public-top .brand { border: 0; height: auto; padding: 0; }
.public-main { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 48px; align-items: center; padding: 32px max(16px, 6vw) 56px; max-width: 1280px; margin: 0 auto; width: 100%; }
@media (max-width: 900px) { .public-main { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 8px; } }
.hero h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.12; letter-spacing: -.01em; margin-bottom: 16px; }
.hero .lead { font-size: var(--fs-lg); color: var(--text-2); max-width: 620px; margin-bottom: 24px; }
.hero .points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin-top: 28px; }
@media (max-width: 560px) { .hero .points { grid-template-columns: minmax(0, 1fr); } }
.hero .point { display: flex; gap: 10px; }
.hero .point svg { flex: 0 0 18px; color: var(--accent); margin-top: 2px; }
.hero .point b { display: block; font-size: var(--fs-md); margin-bottom: 2px; }
.hero .point span { color: var(--muted); font-size: var(--fs); }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.login-card h2 { font-size: var(--fs-lg); margin-bottom: 6px; }
.login-card .btn { height: 38px; width: 100%; font-size: var(--fs-md); }
.login-card .input { height: 36px; width: 100%; }
.login-card form { display: grid; gap: 12px; margin-top: 12px; }
.login-card .or { text-align: center; color: var(--muted); font-size: var(--fs-sm); margin: 14px 0 0; }
.public-cover { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.public-foot { padding: 16px max(16px, 4vw); color: var(--muted); font-size: var(--fs-sm); border-top: 1px solid var(--border); display: flex; gap: 16px; flex-wrap: wrap; }

/* ── Divers ─────────────────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--sp-3); align-items: start; }
@media (max-width: 1200px) { .split { grid-template-columns: minmax(0, 1fr); } }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 6px 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; min-width: 0; }
.list-plain li:last-child { border-bottom: 0; }
.list-plain li a { color: var(--text); }
.hr { height: 1px; background: var(--border); margin: var(--sp-3) 0; }
.pill-group { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r); overflow: hidden; }
.pill-group button { border: 0; background: var(--surface-2); padding: 0 10px; height: 28px; cursor: pointer; color: var(--text-2); font-size: var(--fs-sm); border-left: 1px solid var(--border-strong); }
.pill-group button:first-child { border-left: 0; }
.pill-group button.on { background: var(--accent-soft); color: var(--text); }
.pill-group button:hover { color: var(--text); }
.bar-inline { display: inline-block; height: 6px; border-radius: 3px; background: var(--accent); vertical-align: middle; }
.user-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; }
.split-v { display: flex; flex-direction: column; gap: var(--sp-3); }
@media (max-width: 760px) {
  :root { --sidebar-w: 52px; }
  .sidebar .nav-label, .sidebar .brand-name, .sidebar .nav-section, .sidebar .nav-sub { display: none !important; }
  .topbar { padding: 0 var(--sp-2); }
  .topbar .crumbs { display: none; }
  .content { padding: var(--sp-3); }
}

/* ── Expliquer (IA) ─────────────────────────────────────────────────────── */
.btn.explain-btn { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn.explain-btn:hover { background: var(--accent); color: var(--accent-ink); }
.explain { display: flex; flex-direction: column; min-height: 100%; }
.explain-content { flex: 1 1 auto; }
.explain-wait { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.explain-wait .spinner { margin-top: 2px; flex: 0 0 16px; }
.explain-foot { position: sticky; bottom: -16px; margin: 16px -16px -16px; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.explain-meta { font-size: var(--fs-xs); }
.md { font-size: var(--fs-md); line-height: 1.6; color: var(--text); }
.md h3 { font-size: var(--fs-md); margin: 18px 0 6px; }
.md h4 { font-size: var(--fs); margin: 14px 0 4px; color: var(--text-2); }
.md > :first-child { margin-top: 0; }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 2px 0; }
.md li > ul, .md li > ol { margin: 2px 0 0; }
.md code { font: 12px/1.4 var(--mono); background: var(--code-bg); border: 1px solid var(--border); border-radius: 3px; padding: 0 4px; word-break: break-word; }
.md .md-pre { position: relative; margin: 0 0 12px; }
.md .md-pre pre { margin: 0; padding: 10px 44px 10px 12px; background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--r); overflow: auto; }
.md .md-pre pre code { background: none; border: 0; padding: 0; white-space: pre; word-break: normal; }
.md .md-pre .copy { position: absolute; top: 6px; right: 6px; }
.md blockquote { margin: 0 0 10px; padding: 6px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
.md strong { font-weight: 600; }

/* ── Filtres de journaux ────────────────────────────────────────────────── */
.lf-row[draggable="true"] { cursor: grab; }
.lf-row.dragging { opacity: .5; }
.lf-row.off td { color: var(--muted); }
.lf-row.drop-before td { box-shadow: inset 0 2px 0 var(--accent); }
.lf-row.drop-after td { box-shadow: inset 0 -2px 0 var(--accent); }
.lf-grip { color: var(--muted); display: inline-flex; }
