/* DeadZone Panel - thème sombre */
:root {
  --bg: #0e0f11;
  --bg-2: #121316;
  --panel: #17191d;
  --panel-2: #1d2025;
  --panel-3: #23262c;
  --border: #2a2d33;
  --border-2: #353941;
  --text: #e6e6e6;
  --text-2: #c3c6cc;
  --muted: #8b9099;
  --accent: #d83a3a;
  --accent-2: #e85656;
  --accent-soft: rgba(216, 58, 58, .14);
  --ok: #7bd148;
  --ok-soft: rgba(123, 209, 72, .14);
  --warn: #f0b429;
  --warn-soft: rgba(240, 180, 41, .14);
  --err: #ff5d5d;
  --err-soft: rgba(255, 93, 93, .13);
  --info: #5aa9e6;
  --info-soft: rgba(90, 169, 230, .14);
  --chart: #3f93d9;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r: 10px; --r-sm: 7px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Consolas", "SFMono-Regular", Menlo, monospace;
  --sidebar-w: 236px;
  --topbar-h: 56px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; }
h1 { font-size: 20px; }
h2 { font-size: 15px; }
h3 { font-size: 14px; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s4) 0; }
[hidden] { display: none !important; }
::selection { background: rgba(216, 58, 58, .35); }

:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; border-radius: 4px; }

/* barres de défilement */
* { scrollbar-width: thin; scrollbar-color: #3a3e46 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #33363d; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.noscript { padding: 24px; text-align: center; }

/* ---------- chargement initial ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: var(--s4); color: var(--muted); }
.boot-logo { width: 48px; height: 48px; border-radius: 12px; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- structure ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--bg-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 40;
}
.brand { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s4) var(--s3); }
.brand-logo { width: 34px; height: 34px; flex: none; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: .3px; }
.brand-name span { color: var(--accent); }
.brand-sub { color: var(--muted); font-size: 11.5px; }
.nav { flex: 1; overflow-y: auto; padding: var(--s2) var(--s3) var(--s4); }
.nav-group { margin-top: var(--s4); }
.nav-group:first-child { margin-top: var(--s2); }
.nav-title { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 0 var(--s3) var(--s2); }
.nav a {
  display: flex; align-items: center; gap: var(--s3); padding: 8px var(--s3); margin: 1px 0;
  color: var(--text-2); border-radius: var(--r-sm); font-weight: 500; position: relative;
}
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav a .icon { color: var(--muted); }
.nav a.active .icon { color: var(--accent-2); }
.side-foot { border-top: 1px solid var(--border); padding: var(--s3); display: flex; align-items: center; gap: var(--s2); }
.side-user { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s3); padding: 6px var(--s2); border-radius: var(--r-sm); color: var(--text); }
.side-user:hover { background: var(--panel); text-decoration: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-3); border: 1px solid var(--border-2); display: grid; place-items: center; font-weight: 700; color: var(--accent-2); flex: none; text-transform: uppercase; }
.side-user .who { min-width: 0; }
.side-user .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.side-user .who small { color: var(--muted); font-size: 11.5px; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s5);
  background: rgba(14, 15, 17, .86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.topbar .menu-btn, .topbar .brand-mini { display: none; }
.topbar h1 { font-size: 16px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-status { display: flex; align-items: center; gap: var(--s2); flex-wrap: nowrap; }
.content { padding: var(--s5); width: 100%; max-width: 1480px; margin: 0 auto; min-width: 0; }
.page { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.page-head .lead { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.page-head .lead p { color: var(--muted); }
.page-head .actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.backdrop { display: none; }

@media (max-width: 899px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow); width: min(280px, 86vw); }
  .layout.nav-open .sidebar { transform: none; }
  .layout.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 35; }
  .main { margin-left: 0; }
  .topbar { padding: 0 var(--s3); }
  .topbar .menu-btn { display: inline-flex; }
  .topbar .brand-mini { display: block; width: 26px; height: 26px; flex: none; }
  .content { padding: var(--s4) var(--s3); }
  .top-status .pill-label-long { display: none; }
}
@media (max-width: 520px) {
  .topbar h1 { font-size: 15px; }
  .top-status .hide-sm { display: none; }
}

/* ---------- icônes ---------- */
.icon { display: inline-flex; width: 18px; height: 18px; flex: none; align-items: center; justify-content: center; }
.icon svg { width: 100%; height: 100%; display: block; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--border-2); background: var(--panel-2); color: var(--text);
  font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; user-select: none;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover:not(:disabled) { background: var(--panel-3); border-color: #444955; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-2); border-color: var(--accent-2); }
.btn.danger { color: #ff8a8a; border-color: rgba(255, 93, 93, .35); background: var(--err-soft); }
.btn.danger:hover:not(:disabled) { background: rgba(255, 93, 93, .22); border-color: rgba(255, 93, 93, .55); }
.btn.success { color: var(--ok); border-color: rgba(123, 209, 72, .35); background: var(--ok-soft); }
.btn.success:hover:not(:disabled) { background: rgba(123, 209, 72, .22); }
.btn.warn { color: var(--warn); border-color: rgba(240, 180, 41, .35); background: var(--warn-soft); }
.btn.warn:hover:not(:disabled) { background: rgba(240, 180, 41, .22); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover:not(:disabled) { background: var(--panel-2); color: var(--text); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; gap: 5px; }
.btn.icon-only { width: 34px; padding: 0; }
.btn.sm.icon-only { width: 28px; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy > * { visibility: hidden; }
.btn.busy::after {
  content: ""; position: absolute; width: 16px; height: 16px; left: calc(50% - 8px); top: calc(50% - 8px);
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
}
.btn-group { display: inline-flex; gap: var(--s2); flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 2px; }
.seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 5px; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--panel-3); color: var(--text); box-shadow: 0 0 0 1px var(--border-2) inset; }

/* ---------- formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.field .hint { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12px; color: var(--err); }
.input, select.input, textarea.input {
  width: 100%; min-width: 0; height: 36px; padding: 0 11px; border-radius: var(--r-sm);
  background: var(--bg); color: var(--text); border: 1px solid var(--border-2); font: inherit;
  transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.input::placeholder { color: #626771; }
.input:hover { border-color: #444955; }
.input:focus { outline: none; border-color: var(--info); box-shadow: 0 0 0 3px rgba(90, 169, 230, .2); }
.input:disabled { opacity: .6; }
.input.invalid { border-color: var(--err); }
select.input { padding-right: 30px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%238b9099'%3E%3Cpath d='M5.5 7.5l4.5 4.5 4.5-4.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; }
.input.sm { height: 30px; font-size: 13px; }
.input-icon { position: relative; display: flex; align-items: center; min-width: 0; }
.input-icon .icon { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s3) var(--s4); }
.form-row { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: flex-end; }
.form-row > .field { flex: 1 1 160px; }
.form-actions { display: flex; gap: var(--s2); justify-content: flex-end; flex-wrap: wrap; margin-top: var(--s2); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; color: var(--text-2); }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.switch { display: flex; align-items: flex-start; gap: var(--s3); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 38px; height: 22px; border-radius: 11px; background: var(--panel-3); border: 1px solid var(--border-2); position: relative; flex: none; transition: background .15s; margin-top: 1px; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + .track { background: rgba(123, 209, 72, .3); border-color: rgba(123, 209, 72, .6); }
.switch input:checked + .track::after { transform: translateX(16px); background: var(--ok); }
.switch input:focus-visible + .track { outline: 2px solid var(--info); outline-offset: 2px; }
.switch .txt b { display: block; font-weight: 500; }
.switch .txt small { color: var(--muted); font-size: 12.5px; }

/* ---------- cartes ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); min-width: 0; display: flex; flex-direction: column; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); min-height: 52px; flex-wrap: wrap; }
.card-head .t { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.card-head .t .icon { color: var(--muted); }
.card-head .t small { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.card-head .tools { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.card-body { padding: var(--s4); min-width: 0; flex: 1; }
.card-body.flush { padding: 0; }
.card-foot { padding: var(--s3) var(--s4); border-top: 1px solid var(--border); display: flex; gap: var(--s2); justify-content: flex-end; flex-wrap: wrap; }
.grid { display: grid; gap: var(--s4); min-width: 0; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s3); }
@media (max-width: 1100px) { .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); } }

.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; }
.stat .k { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat .k .icon { width: 15px; height: 15px; }
.stat .v { font-size: 22px; font-weight: 650; letter-spacing: -.2px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat .sub { color: var(--muted); font-size: 12px; min-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.ok .v { color: var(--ok); }
.stat.warn .v { color: var(--warn); }
.stat.err .v { color: var(--err); }
@media (max-width: 420px) { .stat { padding: var(--s3); } .stat .v { font-size: 18px; } }

.bar { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 3px; background: var(--info); transition: width .4s ease; }
.bar.ok > span { background: var(--ok); }
.bar.warn > span { background: var(--warn); }
.bar.err > span { background: var(--err); }
.mini-bar { display: inline-flex; align-items: center; gap: 8px; min-width: 90px; }
.mini-bar .bar { flex: 1; min-width: 40px; }

/* ---------- pastilles ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--panel-3); color: var(--text-2); border: 1px solid transparent; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--err-soft); color: var(--err); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.accent { background: var(--accent-soft); color: var(--accent-2); }
.pill.muted { background: var(--panel-3); color: var(--muted); }
.pill.lg { height: 28px; padding: 0 12px; font-size: 13px; border-radius: 14px; }
.pill.live .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.badge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .02em; background: var(--panel-3); color: var(--muted); text-transform: uppercase; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.err { background: var(--err-soft); color: var(--err); }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- tableaux ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; }
.table-tools { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.table-tools .input-icon { flex: 1 1 200px; max-width: 340px; }
.table-tools .count { color: var(--muted); font-size: 12.5px; margin-left: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 9px var(--s4); text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: var(--panel); position: sticky; top: 0; z-index: 1; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--text); }
.tbl th .sort-ind { display: inline-block; width: 10px; margin-left: 4px; opacity: .8; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.tbl tr.clickable { cursor: pointer; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.wrap { white-space: normal; min-width: 220px; word-break: break-word; }
.tbl td.actions { text-align: right; }
.tbl td.actions .btn-group { justify-content: flex-end; flex-wrap: nowrap; }
.tbl td.muted, .muted { color: var(--muted); }
.tbl tr.lvl-error td { background: rgba(255, 93, 93, .05); }
.tbl tr.lvl-warn td { background: rgba(240, 180, 41, .04); }
.tbl tr.flash td { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: rgba(90, 169, 230, .18); } to { background: transparent; } }
.name-cell { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.name-cell .avatar { width: 24px; height: 24px; font-size: 11px; }

/* ---------- états ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--s2); padding: var(--s6) var(--s4); color: var(--muted); }
.empty .icon { width: 30px; height: 30px; color: #4a4f58; }
.empty b { color: var(--text-2); font-weight: 600; }
.empty.sm { padding: var(--s5) var(--s4); }
.skel { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--panel-2) 0%, var(--panel-3) 50%, var(--panel-2) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skel-lines { display: flex; flex-direction: column; gap: 10px; padding: var(--s4); }
.skel-lines .skel { height: 14px; }
.notice { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r); border: 1px solid var(--border); background: var(--panel); }
.notice .icon { margin-top: 1px; }
.notice.warn { border-color: rgba(240, 180, 41, .35); background: var(--warn-soft); color: #f6d27a; }
.notice.err { border-color: rgba(255, 93, 93, .35); background: var(--err-soft); color: #ffb0b0; }
.notice.info { border-color: rgba(90, 169, 230, .35); background: var(--info-soft); color: #b9dcf7; }
.notice.ok { border-color: rgba(123, 209, 72, .35); background: var(--ok-soft); color: #c3ef9f; }
.notice .grow { flex: 1; min-width: 0; }
.notice .btn { margin-left: auto; }
.alerts { display: flex; flex-direction: column; gap: var(--s2); }

/* ---------- bannière de redémarrage ---------- */
.countdown { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s3) var(--s4); border-radius: var(--r); background: linear-gradient(90deg, rgba(240, 180, 41, .16), rgba(240, 180, 41, .05)); border: 1px solid rgba(240, 180, 41, .4); }
.countdown .time { font-size: 22px; font-weight: 700; color: var(--warn); font-variant-numeric: tabular-nums; }
.countdown .grow { flex: 1; min-width: 180px; }
.countdown small { color: var(--muted); display: block; }

/* ---------- graphiques ---------- */
.chart { position: relative; width: 100%; height: 190px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: #24272c; stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .hover-line { stroke: #5b616c; stroke-width: 1; stroke-dasharray: 3 3; }
.chart .hover-dot { fill: var(--chart); stroke: var(--panel); stroke-width: 2; }
.chart .limit-line { stroke: var(--warn); stroke-width: 1; stroke-dasharray: 4 4; opacity: .6; }
.chart-tip { position: absolute; top: 0; pointer-events: none; background: #0b0c0e; border: 1px solid var(--border-2); border-radius: 7px; padding: 6px 9px; font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; z-index: 2; }
.chart-tip b { display: block; font-size: 13px; font-variant-numeric: tabular-nums; }
.chart-tip span { color: var(--muted); }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s2); }
.chart-head .now { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.chart-head .now small { color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 4px; }

/* ---------- console ---------- */
.console {
  background: #0a0b0d; font-family: var(--mono); font-size: 12.5px; line-height: 1.55;
  height: calc(100vh - 320px); min-height: 280px; overflow: auto; padding: var(--s3) var(--s4);
  border-radius: 0 0 var(--r) var(--r); white-space: pre-wrap; word-break: break-word;
}
.console .ln { color: #c9ccd1; }
.console .ln .ts { color: #5d626b; margin-right: 10px; user-select: none; }
.console .ln.error { color: #ff7b7b; }
.console .ln.warn { color: #f3c55a; }
.console-input { display: flex; gap: var(--s2); padding: var(--s3); border-top: 1px solid var(--border); background: var(--panel); border-radius: 0 0 var(--r) var(--r); flex-wrap: wrap; }
.console-input .prompt { display: flex; align-items: center; flex: 1 1 260px; position: relative; min-width: 0; }
.console-input .prompt::before { content: ">"; position: absolute; left: 12px; color: var(--accent-2); font-family: var(--mono); font-weight: 700; }
.console-input .prompt .input { font-family: var(--mono); padding-left: 28px; }
.console-wrap { position: relative; }
.resume-btn { position: absolute; right: 20px; bottom: 16px; box-shadow: var(--shadow); }
.console-wrap.has-input .console { border-radius: 0; }
@media (max-width: 899px) { .console { height: calc(100vh - 340px); } }

/* ---------- onglets ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { background: var(--panel-3); color: var(--text-2); border-radius: 9px; padding: 0 7px; font-size: 11.5px; }

/* ---------- divers ---------- */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px var(--s4); font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s4); border-bottom: 1px solid var(--border); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.list-item .txt { overflow: hidden; text-overflow: ellipsis; }
.mc-lines { font-family: var(--mono); font-size: 12.5px; background: #0a0b0d; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; white-space: pre-wrap; word-break: break-word; min-height: 40px; }
.mc-lines div + div { margin-top: 2px; }
.mc-obf { filter: blur(1.5px); }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: var(--s2); }
.actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s3); }
.action-box { border: 1px solid var(--border); border-radius: var(--r); padding: var(--s3) var(--s4); background: var(--panel-2); display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.action-box h3 { display: flex; align-items: center; gap: 8px; }
.action-box h3 .icon { color: var(--muted); }
.action-box p { color: var(--muted); font-size: 12.5px; }
.action-box .btn-group { margin-top: auto; padding-top: 4px; }
.player-head { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.player-head .avatar { width: 52px; height: 52px; font-size: 20px; border-radius: 12px; }
.player-head .info { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.player-head .info .row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.back:hover { color: var(--text); text-decoration: none; }
.inv { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; max-width: 560px; }
.inv-sep { grid-column: 1 / -1; height: 6px; }
.slot { aspect-ratio: 1; background: #101114; border: 1px solid var(--border); border-radius: 6px; position: relative; display: flex; align-items: center; justify-content: center; padding: 3px; overflow: hidden; min-width: 0; }
.slot.filled { background: var(--panel-2); border-color: var(--border-2); }
.slot .nm { font-size: 9.5px; line-height: 1.1; text-align: center; color: var(--text-2); overflow-wrap: anywhere; hyphens: auto; overflow: hidden; max-height: 100%; }
.slot .qty { position: absolute; right: 3px; bottom: 1px; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }
.slot .sl { position: absolute; left: 3px; top: 1px; font-size: 8.5px; color: #4f545d; }
.inv-armor { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; max-width: 250px; }
@media (max-width: 480px) { .slot .nm { font-size: 8px; } .slot .sl { display: none; } }
.breadcrumb { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; }
.breadcrumb button { background: none; border: 0; color: var(--info); font: inherit; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.breadcrumb button:hover { background: var(--panel-2); }
.breadcrumb .sep { color: var(--muted); }
.editor { width: 100%; min-height: 420px; height: calc(100vh - 330px); font-family: var(--mono); font-size: 13px; line-height: 1.55; background: #0a0b0d; color: #dcdfe4; border: 0; border-radius: 0 0 var(--r) var(--r); padding: var(--s3) var(--s4); resize: vertical; tab-size: 2; white-space: pre; overflow: auto; }
.editor:focus { outline: none; box-shadow: inset 0 0 0 1px var(--info); }
.file-name { display: inline-flex; align-items: center; gap: 8px; }
.file-name .icon { color: var(--muted); }
.file-name.dir .icon { color: var(--warn); }
button.linklike { background: none; border: 0; padding: 0; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
button.linklike:hover { color: var(--info); }
button.linklike:disabled { color: var(--muted); cursor: default; }
.secret { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.secret .input { font-family: var(--mono); flex: 1 1 220px; }
ol.steps { margin: 0; padding-left: 20px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }
ol.steps code { background: var(--panel-3); padding: 1px 5px; border-radius: 4px; }
.role-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s3); }
.role-card { border: 1px solid var(--border); border-radius: var(--r); padding: var(--s3) var(--s4); background: var(--panel-2); display: flex; flex-direction: column; gap: 6px; }
.role-card p { color: var(--muted); font-size: 12.5px; }
.filters { display: flex; flex-direction: column; gap: var(--s3); }
.type-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.type-checks label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border-2); border-radius: 15px; cursor: pointer; font-size: 12.5px; color: var(--text-2); background: var(--panel-2); user-select: none; }
.type-checks label:has(input:checked) { border-color: rgba(90, 169, 230, .5); background: var(--info-soft); color: #cfe6f8; }
.type-checks input { accent-color: var(--info); margin: 0; }
.load-more { display: flex; justify-content: center; padding: var(--s3); border-top: 1px solid var(--border); }
.share { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; }
.share .bar { flex: 1; }
.share small { color: var(--muted); width: 38px; text-align: right; }
.row-gap { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.text-ok { color: var(--ok); } .text-warn { color: var(--warn); } .text-err { color: var(--err); } .text-muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.denied { max-width: 460px; margin: 60px auto; }

/* ---------- connexion ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: var(--s5) var(--s4); background: radial-gradient(900px 500px at 50% -10%, rgba(216, 58, 58, .14), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: var(--s6) var(--s5); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: var(--s4); }
.auth-card .brand { padding: 0; justify-content: center; flex-direction: column; text-align: center; gap: var(--s2); }
.auth-card .brand-logo { width: 52px; height: 52px; }
.auth-card .brand-name { font-size: 20px; }
.auth-card form { display: flex; flex-direction: column; gap: var(--s3); }
.auth-card .btn { height: 40px; }
.auth-foot { color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: var(--s4); bottom: var(--s4); z-index: 100; display: flex; flex-direction: column; gap: var(--s2); width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s3) var(--s3) var(--s4); border-radius: var(--r); background: #1c1f24; border: 1px solid var(--border-2); border-left: 3px solid var(--info); box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }
.toast.warn { border-left-color: var(--warn); }
.toast .icon { margin-top: 1px; }
.toast.ok > .icon { color: var(--ok); } .toast.err > .icon { color: var(--err); } .toast.warn > .icon { color: var(--warn); } .toast.info > .icon { color: var(--info); }
.toast .msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast .msg b { display: block; }
.toast .x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; width: 20px; height: 20px; }
.toast .x:hover { color: var(--text); }
.toast.out { animation: toast-out .18s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ---------- modales ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(5, 6, 8, .7); display: flex; align-items: center; justify-content: center; padding: var(--s4); animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); animation: pop .16s ease-out; }
.modal.wide { max-width: 640px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border); }
.modal-head h2 { flex: 1; font-size: 16px; }
.modal-head .danger-ico { color: var(--err); }
.modal-body { padding: var(--s4) var(--s5); overflow-y: auto; display: flex; flex-direction: column; gap: var(--s3); }
.modal-body p { color: var(--text-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--s2); padding: var(--s3) var(--s5) var(--s4); flex-wrap: wrap; }
.confirm-word { font-family: var(--mono); background: var(--err-soft); color: #ff9c9c; padding: 1px 6px; border-radius: 4px; user-select: all; }
@media (max-width: 480px) {
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 14px 14px 0 0; max-height: 92vh; }
  .modal-head, .modal-body, .modal-foot { padding-left: var(--s4); padding-right: var(--s4); }
  .modal-foot .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- détail des journaux (actions des joueurs) ---------- */
.log-detail { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.log-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--muted); }
.log-items { color: var(--text-2); }
.log-pos { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.log-pos .icon { width: 13px; height: 13px; }
.btn.sm.log-around { height: 22px; padding: 0 8px; font-size: 11.5px; }
.type-group { display: flex; flex-direction: column; gap: 6px; }
.type-group-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.type-group-head .btn.sm { height: 24px; padding: 0 8px; font-size: 12px; }
