/* ==========================================================================
   Sigma Panel - feuille de style (v8)
   Systeme : gris graphite neutre, bordures fines, bleu Sigma (logo) en accent.
   ========================================================================== */
:root {
  /* identite Sigma : couleurs du logo */
  --sigma: #70a0c8;
  --sigma-strong: #3a73a4;
  --sigma-deep: #306898;
  --sigma-light: #b8c8e0;
  --sigma-soft: rgba(112, 160, 200, .12);

  /* surfaces */
  --bg: #0b0c0e;
  --bg2: #0f1013;
  --panel: #131417;
  --panel2: #18191d;
  --hover: #1e2024;
  --border: rgba(255, 255, 255, .07);
  --border2: rgba(255, 255, 255, .11);
  --text: #ececef;
  --muted: #9a9ca4;
  --dim: #63666e;

  /* compatibilite avec les anciennes variables */
  --accent: var(--sigma-strong);
  --accent2: var(--sigma);
  --accent-bg: var(--sigma-soft);

  /* etats */
  --ok: #3ecf8e;
  --warn: #f2b14b;
  --danger: #f06464;
  --purple: #a78bfa;

  --radius: 12px;
  --r-ctl: 8px;
  --shadow: 0 16px 48px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .3);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'tnum' 0;
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sigma); text-decoration: none; }
a:hover { color: var(--sigma-light); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3, h4 { letter-spacing: -.015em; }
::selection { background: rgba(112, 160, 200, .32); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .18); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--sigma); outline-offset: 2px; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(4px); opacity: 0; } }
@keyframes pop { from { transform: scale(.98); opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
@keyframes flash { from { background: rgba(112, 160, 200, .16); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(62, 207, 142, .55); } 70% { box-shadow: 0 0 0 7px rgba(62, 207, 142, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); } }

/* ==========================================================================
   STRUCTURE
   ========================================================================== */
.layout { display: grid; grid-template-columns: 248px 1fr; height: 100vh; }
.sidebar { background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.brand { display: flex; align-items: center; gap: 11px; padding: 16px 16px 12px; font-weight: 650; font-size: 15px; letter-spacing: -.02em; }
.brand .logo { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--sigma-soft); display: grid; place-items: center; overflow: hidden; }
.brand .logo img { width: 112%; height: 112%; object-fit: contain; }
.brand small { display: block; font-weight: 500; color: var(--dim); font-size: 12px; letter-spacing: 0; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.nav-section { color: var(--dim); font-size: 11.5px; font-weight: 550; padding: 16px 10px 6px; }
.nav a { position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--r-ctl); color: var(--muted); font-weight: 500; font-size: 13.5px; transition: background .12s, color .12s; }
.nav a:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.nav a.active { background: rgba(255, 255, 255, .06); color: var(--text); font-weight: 550; }
.nav a.active::before { content: ''; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 2px; border-radius: 0 2px 2px 0; background: var(--sigma); }
.nav a svg { width: 17px; height: 17px; flex: none; opacity: .8; }
.nav a.active svg { color: var(--sigma); opacity: 1; }
.nav a .count { margin-left: auto; color: var(--dim); font-size: 11.5px; font-weight: 550; font-variant-numeric: tabular-nums; }
.sidebar-foot { border-top: 1px solid var(--border); padding: 10px; display: flex; align-items: center; gap: 6px; }
.sidebar-foot .who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--r-ctl); color: inherit; }
.sidebar-foot .who:hover { background: rgba(255, 255, 255, .04); }
.sidebar-foot .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 600; }
.sidebar-foot .who span { color: var(--dim); font-size: 12px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { position: relative; z-index: 4; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 28px; border-bottom: 1px solid var(--border); background: rgba(11, 12, 14, .8); backdrop-filter: blur(12px) saturate(140%); }
.topbar h1 { font-size: 15px; margin: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.content { flex: 1; overflow: auto; padding: 28px 32px 56px; min-height: 0; }
.content.full { padding: 0; overflow: hidden; position: relative; }
.content > * { animation: rise .22s var(--ease); }
.content.full > * { animation: none; }
.menu-btn { display: none; }

.status-pill { display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); font-size: 12.5px; white-space: nowrap; color: var(--muted); }
.status-pill b { color: var(--text); }

.topsearch { display: inline-flex; align-items: center; gap: 9px; height: 32px; min-width: 280px; padding: 0 6px 0 11px; border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--panel); color: var(--dim); cursor: pointer; font-size: 13px; transition: border-color .12s, color .12s; }
.topsearch:hover { border-color: var(--border2); color: var(--muted); }
.topsearch svg { width: 15px; height: 15px; }
.topsearch span { flex: 1; text-align: left; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 50; transform: translateX(-100%); transition: transform .2s var(--ease); }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .menu-btn { display: inline-flex; }
  .content { padding: 18px 16px 40px; }
  .topbar { padding: 0 12px; }
  .topsearch { min-width: 0; }
  .topsearch span, .topsearch kbd, .status-pill .hide-sm { display: none; }
}

/* ==========================================================================
   COMPOSANTS DE BASE
   ========================================================================== */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.card-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-h h3 { margin: 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-h h3 svg { width: 16px; height: 16px; color: var(--dim); }
.card-h .spacer { flex: 1; }
.card-b { padding: 18px; }

.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .g4, .g3, .g2 { grid-template-columns: 1fr; } }

/* chiffre cle */
.stat { padding: 18px 20px; }
.stat .label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat .label svg { width: 16px; height: 16px; color: var(--sigma); }
.stat .value { margin-top: 10px; font-size: 26px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat .sub { margin-top: 4px; color: var(--dim); font-size: 12px; }

/* boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--border2); background: rgba(255, 255, 255, .04); color: var(--text); font-size: 13px; font-weight: 550; white-space: nowrap; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: var(--text); }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; flex: none; }
a.btn { color: var(--text); }
.btn.primary { background: var(--sigma-strong); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.primary:hover { background: #4682b6; }
.btn.danger { background: rgba(240, 100, 100, .1); border-color: rgba(240, 100, 100, .28); color: #f8a5a5; }
.btn.danger:hover { background: rgba(240, 100, 100, .18); border-color: rgba(240, 100, 100, .45); }
.btn.danger.solid { background: #d94a4a; border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.danger.solid:hover { background: #e25656; }
.btn.warn.solid { background: var(--warn); border-color: transparent; color: #241703; }
.btn.ok { background: rgba(62, 207, 142, .1); border-color: rgba(62, 207, 142, .28); color: #7ee2b4; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { height: 40px; padding: 0 18px; font-size: 14px; }
.btn.icon { width: 32px; padding: 0; }
.btn.sm.icon { width: 28px; }

/* champs */
.input, select.input, textarea.input { width: 100%; min-width: 0; height: 34px; padding: 0 11px; border-radius: var(--r-ctl); border: 1px solid var(--border2); background: rgba(255, 255, 255, .03); outline: none; transition: border-color .12s, box-shadow .12s, background .12s; }
.input::placeholder { color: var(--dim); }
.input:hover { border-color: rgba(255, 255, 255, .16); }
.input:focus { border-color: var(--sigma); background: rgba(255, 255, 255, .04); box-shadow: 0 0 0 3px rgba(112, 160, 200, .18); }
textarea.input { height: auto; min-height: 80px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
select.input { padding-right: 28px; }
.input.sm { height: 30px; font-size: 13px; }
.search { position: relative; flex: 1; max-width: 380px; min-width: 200px; }
.search svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; color: var(--dim); pointer-events: none; }
.search .input { padding-left: 34px; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.err { color: #f8a5a5; font-size: 13px; min-height: 18px; margin: 6px 0; }

/* utilitaires */
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0; }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
kbd { display: inline-block; padding: 0 5px; margin: 0 1px; border-radius: 5px; border: 1px solid var(--border2); border-bottom-width: 2px; background: rgba(255, 255, 255, .04); color: var(--muted); font-family: var(--mono); font-size: 10.5px; font-weight: 600; line-height: 1.6; }

/* pastilles */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--muted); font-size: 11.5px; font-weight: 550; white-space: nowrap; }
.badge svg { width: 11px; height: 11px; flex: none; }
.badge.ok { color: #7ee2b4; background: rgba(62, 207, 142, .12); }
.badge.warn { color: #f7cb7f; background: rgba(242, 177, 75, .12); }
.badge.danger { color: #f8a5a5; background: rgba(240, 100, 100, .12); }
.badge.info { color: var(--sigma-light); background: var(--sigma-soft); }
.badge.purple { color: #c9b8fd; background: rgba(167, 139, 250, .12); }
.badge.gold { color: #f6d77c; background: rgba(234, 190, 60, .12); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--dim); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(62, 207, 142, .18); }
.dot.danger { background: var(--danger); box-shadow: 0 0 0 3px rgba(240, 100, 100, .18); }
.catbadge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 6px; border: 1px solid; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.staff-tag { font-size: 11.5px; font-weight: 600; color: var(--sigma-light); background: var(--sigma-soft); padding: 2px 8px; border-radius: 6px; }
.jobchip { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.jobchip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sidlink { font-family: var(--mono); font-size: 12px; color: var(--sigma); cursor: pointer; }
.sidlink:hover { color: var(--sigma-light); }

/* onglets, puces, controle segmente */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; margin-bottom: -1px; padding: 10px 12px; border: none; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 13.5px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color .12s; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--sigma); font-weight: 550; }
.tabs button svg { width: 15px; height: 15px; }
.tabs button .n { padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.tabs button.active .n { background: var(--sigma-soft); color: var(--sigma-light); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border2); background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all .12s; }
.chip:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.chip.active { color: var(--text); border-color: rgba(112, 160, 200, .5); background: var(--sigma-soft); }
.chip svg { width: 14px; height: 14px; }
.chip .n { color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg2); }
.seg button { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border: none; border-radius: 7px; background: none; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color .12s, background .12s; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--hover); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .35), inset 0 0 0 1px var(--border); }
.seg button svg { width: 14px; height: 14px; }
.seg button .n { color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }

/* tableaux */
.table-wrap { overflow: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { position: sticky; top: 0; z-index: 1; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--panel); color: var(--dim); font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; }
table.t th.sortable { cursor: pointer; user-select: none; }
table.t th.sortable:hover { color: var(--text); }
table.t td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: none; }
table.t tbody tr { transition: background .1s; }
table.t tbody tr:hover td { background: rgba(255, 255, 255, .02); }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover td { background: rgba(112, 160, 200, .05); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); }

/* etats vides et chargement */
.empty { padding: 48px 16px; text-align: center; color: var(--muted); font-size: 13.5px; }
.empty svg { display: block; width: 32px; height: 32px; margin: 0 auto 12px; color: var(--dim); opacity: .8; }
.skel { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, rgba(255, 255, 255, .04) 0%, rgba(255, 255, 255, .08) 40%, rgba(255, 255, 255, .04) 80%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.skel i:nth-child(2n) { width: 82%; }
.skel i:nth-child(3n) { width: 64%; }

/* joueurs : avatar, nom, barres */
.pname { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: var(--panel2); box-shadow: inset 0 0 0 1px var(--border); color: var(--muted); font-size: 12px; font-weight: 600; }
.avatar img { width: 100%; height: 100%; object-fit: cover; animation: fade .25s; }
.avatar.xs { display: inline-grid; width: 18px; height: 18px; border-radius: 5px; font-size: 8px; vertical-align: -4px; margin-right: 5px; }
.avatar.sm { width: 26px; height: 26px; border-radius: 7px; font-size: 10px; }
.avatar.lg { width: 64px; height: 64px; border-radius: 16px; font-size: 22px; }
.avatar.xl { width: 88px; height: 88px; border-radius: 22px; font-size: 30px; box-shadow: inset 0 0 0 1px var(--border2), 0 10px 30px rgba(0, 0, 0, .45); }
.pav { position: relative; flex: none; }
.pav .on { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--panel); }
.bar { width: 74px; height: 6px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, .07); }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--ok); }
.bar.ar > i { background: var(--sigma); }
.hpbar { display: flex; flex-direction: column; gap: 1px; width: 90px; height: 6px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, .07); }
.hpbar i { display: block; height: 100%; border-radius: 4px; }
.hpbar:has(.ar) i { height: 2.5px; }
.hpbar i.ar { background: var(--sigma); }
.ping { font-variant-numeric: tabular-nums; }
.ping.mid { color: var(--warn); }
.ping.bad { color: var(--danger); }
.pflags { display: flex; gap: 6px; color: var(--dim); }
.pflags i { display: inline-flex; }
.pflags svg { width: 15px; height: 15px; }

/* listes cle / valeur */
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv > div:nth-child(odd) { color: var(--muted); }
.section-title { display: flex; align-items: center; gap: 8px; margin: 24px 0 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.section-title .n { color: var(--dim); }
.list-item { margin-bottom: 8px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); }
.actions-grid { display: flex; flex-wrap: wrap; gap: 6px; }

/* ==========================================================================
   SURCOUCHES : menus, fenetres, notifications, info-bulles
   ========================================================================== */
.menu, .ctxmenu { position: fixed; z-index: 130; min-width: 230px; max-height: 70vh; overflow: auto; padding: 5px; border-radius: 11px; border: 1px solid var(--border2); background: #1a1b1f; box-shadow: var(--shadow); animation: pop .12s var(--ease); }
.menu .m-sec { padding: 8px 10px 4px; color: var(--dim); font-size: 11.5px; font-weight: 550; }
.menu .m-sec:first-child { padding-top: 4px; }
.menu button, .ctxmenu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 10px; border: none; border-radius: 7px; background: none; font-size: 13px; text-align: left; cursor: pointer; }
.menu button svg { width: 15px; height: 15px; flex: none; color: var(--dim); }
.menu button:hover, .ctxmenu button:hover { background: rgba(255, 255, 255, .06); }
.menu button:hover svg { color: var(--text); }
.menu button.danger { color: #f8a5a5; }
.menu button.danger svg { color: #f07a7a; }
.menu hr { margin: 5px 4px; border: none; border-top: 1px solid var(--border); }

.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); animation: fade .15s; }
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal { display: flex; flex-direction: column; width: min(480px, 100%); max-height: calc(100vh - 32px); border-radius: 16px; border: 1px solid var(--border2); background: #151619; box-shadow: var(--shadow); animation: pop .16s var(--ease); }
.modal.wide { width: min(720px, 100%); }
.modal.xwide { width: min(900px, 100%); }
.modal-h { padding: 20px 22px 6px; font-size: 16px; font-weight: 600; }
.modal-b { padding: 10px 22px 14px; overflow: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); background: rgba(255, 255, 255, .015); border-radius: 0 0 16px 16px; }

#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: flex-start; gap: 10px; max-width: 400px; padding: 11px 14px; border-radius: 11px; border: 1px solid var(--border2); background: #1a1b1f; box-shadow: var(--shadow); font-size: 13.5px; animation: rise .2s var(--ease); }
.toast svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--sigma); }
.toast.error svg { color: var(--danger); }
.toast.ok svg { color: var(--ok); }

.tip { position: fixed; z-index: 150; max-width: 260px; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--border2); background: #1a1b1f; box-shadow: var(--shadow); font-size: 12.5px; pointer-events: none; animation: fade .1s; }
.tip b { display: block; margin-bottom: 2px; font-size: 14px; }
.tip .r { font-size: 11px; font-weight: 650; letter-spacing: .02em; }
.tip p { margin: 6px 0 0; color: var(--muted); }
.tip .mono { display: block; margin-top: 6px; color: var(--dim); font-size: 11px; }

/* recherche rapide (Ctrl + K) */
.cmdk { position: fixed; inset: 0; z-index: 160; }
.cmdk-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); animation: fade .12s; }
.cmdk-win { position: relative; width: min(640px, calc(100vw - 32px)); margin: 12vh auto 0; overflow: hidden; border-radius: 16px; border: 1px solid var(--border2); background: #151619; box-shadow: var(--shadow); animation: pop .14s var(--ease); }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.cmdk-in svg { width: 18px; height: 18px; flex: none; color: var(--dim); }
.cmdk-in input { flex: 1; border: none; outline: none; background: none; font-size: 15.5px; }
.cmdk-list { max-height: 52vh; overflow: auto; padding: 6px; }
.cmdk-sec { padding: 8px 10px 4px; color: var(--dim); font-size: 11.5px; font-weight: 550; }
.cmdk-it { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.cmdk-it b { font-weight: 550; }
.cmdk-it .ci { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: rgba(255, 255, 255, .05); color: var(--muted); }
.cmdk-it .ci svg { width: 15px; height: 15px; }
.cmdk-it .cmdk-act { margin-left: auto; color: var(--dim); font-size: 11.5px; opacity: 0; }
.cmdk-it.on { background: rgba(255, 255, 255, .06); }
.cmdk-it.on .cmdk-act { opacity: 1; }
.cmdk-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--border); color: var(--dim); font-size: 11.5px; }

/* ==========================================================================
   CONNEXION
   ========================================================================== */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(700px 420px at 50% -5%, rgba(58, 115, 164, .22), transparent 70%), var(--bg); }
.login .card { width: min(400px, 100%); padding: 34px 32px 28px; border-radius: 18px; border-color: var(--border2); background: rgba(19, 20, 23, .9); box-shadow: var(--shadow); }
.login h2 { margin: 14px 0 4px; font-size: 22px; font-weight: 650; }
.steam-btn { width: 100%; height: 46px; gap: 12px; border-color: rgba(102, 192, 244, .25); background: linear-gradient(180deg, #1e3a52, #16202c); color: #fff; font-size: 14.5px; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.steam-btn:hover { background: linear-gradient(180deg, #24496a, #1a2736); border-color: rgba(102, 192, 244, .55); }
.steam-btn svg { width: 21px; height: 21px; }
.login-err { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; padding: 11px 13px; border-radius: 10px; border: 1px solid rgba(240, 100, 100, .3); background: rgba(240, 100, 100, .08); color: #f8a5a5; font-size: 13px; }
.login-err svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.pw-login { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.pw-login summary { margin-bottom: 12px; color: var(--dim); font-size: 12.5px; cursor: pointer; }

/* ==========================================================================
   ACCUEIL
   ========================================================================== */
.dash { max-width: 1480px; margin: 0 auto; }
.dash-hello { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(100deg, rgba(58, 115, 164, .16), transparent 55%), var(--panel); }
.dash-hello h2 { margin: 0 0 4px; font-size: 22px; font-weight: 650; }
.dash-hello img { width: 72px; height: 72px; object-fit: contain; }
.dash-sec { margin: 30px 0 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.todo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
@media (min-width: 1250px) { .todo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.todo { position: relative; display: flex; flex-direction: column; min-height: 184px; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); }
.todo::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: var(--tc); opacity: .8; }
.todo-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.todo-i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--tc) 14%, transparent); color: var(--tc); }
.todo-i svg { width: 16px; height: 16px; }
.todo-h b { flex: 1; font-size: 13.5px; font-weight: 600; }
.todo-n { color: var(--tc); font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.todo.zero .todo-n { color: var(--dim); }
.todo-b { flex: 1; padding: 0 10px 12px; }
.todo-row { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; cursor: pointer; }
.todo-row:hover { background: rgba(255, 255, 255, .04); }
.todo-ok { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 90px; color: var(--dim); font-size: 13px; }
.todo-more { display: block; padding: 6px; font-size: 12.5px; }
.chart { display: block; width: 100%; height: 180px; }
.chart text { fill: var(--dim); font-size: 10px; }
@media (max-width: 700px) { .dash-hello img { display: none; } .todo { min-height: 0; } .todo-ok { min-height: 56px; } }

/* ==========================================================================
   JOUEURS : liste
   ========================================================================== */
.plist-page { max-width: 1480px; margin: 0 auto; }
.plist-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.plist-bar .search { max-width: 340px; }
.plist-card { overflow: hidden; }
.plist-help { margin-top: 12px; text-align: center; }
table.plist td { padding: 10px 16px; }
table.plist tbody tr.cur td { background: var(--sigma-soft); }
.pl-n { max-width: 240px; font-weight: 550; }

/* ==========================================================================
   FICHE JOUEUR (page entiere)
   ========================================================================== */
.pp { max-width: 1400px; margin: 0 auto; }
.pp-top { display: flex; align-items: center; gap: 10px; min-width: 0; margin-bottom: 16px; font-size: 13.5px; }
.pp-back { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: var(--r-ctl); color: var(--muted); font-weight: 500; }
.pp-back:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.pp-back svg { width: 16px; height: 16px; }
.pp-hero { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 20px; overflow: hidden; padding: 26px 28px; border-radius: 16px; border: 1px solid var(--border);
  background: linear-gradient(100deg, rgba(58, 115, 164, .18), transparent 60%), var(--panel); }
.pp-hero::after { content: ''; position: absolute; right: -36px; top: -40px; width: 220px; height: 220px; background: url(/logo.png) center / contain no-repeat; opacity: .05; pointer-events: none; }
.pp-id { position: relative; z-index: 1; display: flex; align-items: center; gap: 20px; flex: 1; min-width: 280px; }
.pp-name { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.pp-actions { position: relative; z-index: 1; }
.pp-actions .ph-bar { padding: 0; justify-content: flex-end; }
.pp-tabs { margin: 20px 0; }
.pp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.pp-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 14px; }
#pf-alerts .ph-alert { margin-top: 12px; }
@media (max-width: 1100px) { .pp-grid { grid-template-columns: 1fr; } .pp-side { position: static; } }

.ph-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ph-links { display: flex; align-items: center; gap: 14px; margin-top: 8px; font-size: 12.5px; }
.ph-links a, .ph-links .sidlink { display: inline-flex; align-items: center; gap: 5px; }
.ph-links svg { width: 13px; height: 13px; }
.ph-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 16px; }
.ph-alert { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 11px 14px; border-radius: 10px; border: 1px solid rgba(240, 100, 100, .3); background: rgba(240, 100, 100, .07); font-size: 13px; }
.ph-alert svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--danger); }
.ph-alert.warn { border-color: rgba(242, 177, 75, .3); background: rgba(242, 177, 75, .06); }
.ph-alert.warn svg { color: var(--warn); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.tile { min-width: 0; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); }
.tile .l { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 500; }
.tile .l svg { width: 14px; height: 14px; color: var(--sigma); }
.tile .v { margin-top: 6px; font-size: 18px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .s { margin-top: 2px; color: var(--dim); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .bar { width: 100%; margin-top: 10px; }

.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .cols2 { grid-template-columns: 1fr; } }
.info-card { border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); }
.info-card h4 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 13px 16px 4px; color: var(--text); font-size: 13px; font-weight: 600; }
.info-card h4 svg { width: 15px; height: 15px; color: var(--dim); }
.info-card h4 a { font-weight: 500; }
.info-card .ic-b { padding: 4px 16px 10px; }
.irow { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.irow:last-child { border-bottom: none; }
.irow > span:first-child { color: var(--muted); }
.irow > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.session-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.asset { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.asset:last-child { border-bottom: none; }
.asset .ai { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .05); color: var(--muted); }
.asset .ai svg { width: 18px; height: 18px; }
.asset .at { flex: 1; min-width: 0; }
.asset .at b { display: block; font-weight: 550; }
.asset .at span { color: var(--dim); font-size: 12px; }
.plate { display: inline-flex; align-items: stretch; height: 22px; overflow: hidden; border-radius: 5px; border: 1.5px solid #c9ced8; background: #f4f5f7; color: #111; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .5px; }
.plate::before { content: 'F'; width: 13px; display: grid; place-items: center; background: #1d4ed8; color: #fff; font-family: Inter, sans-serif; font-size: 9px; }
.plate span { display: grid; place-items: center; padding: 0 7px; }
.wchip { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 6px 0; padding: 4px 10px; border-radius: 7px; border: 1px solid var(--border); background: rgba(255, 255, 255, .03); font-family: var(--mono); font-size: 12px; }
.wchip svg { width: 13px; height: 13px; color: var(--dim); }

.side-count { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 6px; padding: 8px 0 12px; border-bottom: 1px solid var(--border); text-align: center; }
.side-count b { display: block; font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.side-count span { color: var(--dim); font-size: 11.5px; }
.side-sx { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.side-note { padding: 8px 0; border-bottom: 1px solid var(--border); }
.side-note-t { margin-top: 2px; font-size: 13px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* inventaire */
.inv { padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); }
.inv-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.inv-head .cap { flex: 1; min-width: 180px; }
.inv-head .cap .bar { width: 100%; height: 6px; margin-top: 8px; }
.inv-grid { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); gap: 8px; max-width: 760px; }
.slot { position: relative; min-width: 0; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; border-radius: 11px; border: 1px solid var(--border); background: rgba(255, 255, 255, .025); transition: transform .12s, border-color .12s; }
.slot.empty-slot { background: rgba(255, 255, 255, .015); }
.slot.filled { background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rc) 20%, transparent), transparent 70%), rgba(255, 255, 255, .03); border-color: color-mix(in srgb, var(--rc) 45%, transparent); box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--rc) 65%, transparent); }
.slot.filled:hover { transform: translateY(-2px); border-color: var(--rc); }
.slot.locked { border-style: dashed; background: transparent; color: rgba(255, 255, 255, .15); }
.slot.locked svg { width: 17px; height: 17px; }
.slot .ico { width: 44%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--cc) 16%, transparent); color: var(--cc); }
.slot .ico svg { width: 62%; height: 62%; }
.slot .nm { max-width: 100%; padding: 0 2px; overflow: hidden; font-size: 11px; font-weight: 550; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.slot .qty { position: absolute; top: 5px; right: 6px; padding: 0 6px; border-radius: 6px; background: rgba(0, 0, 0, .55); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.slot .num { position: absolute; top: 5px; left: 7px; color: rgba(255, 255, 255, .18); font-size: 9.5px; font-weight: 700; }
.inv-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.inv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.inv-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }

/* casier */
.casier-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.tl { position: relative; padding-left: 26px; }
.tl::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--border2); }
.tl-item { position: relative; margin-bottom: 12px; }
.tl-item::before { content: ''; position: absolute; left: -23px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--tc, var(--dim)); box-shadow: 0 0 0 4px var(--bg); }
.tl-card { padding: 13px 15px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); }
.tl-card .tl-reason { margin-top: 7px; font-size: 14px; }
.tl-card .tl-meta { color: var(--dim); font-size: 12px; }

@media (max-width: 700px) {
  .pp-hero { padding: 18px; }
  .avatar.xl { width: 64px; height: 64px; font-size: 22px; }
  .pp-name { font-size: 22px; }
  .pp .tiles { grid-template-columns: 1fr 1fr; }
  .pp-actions .ph-bar { justify-content: flex-start; }
  .session-grid { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  table.plist th:nth-child(n+4):not(:last-child), table.plist td:nth-child(n+4):not(:last-child) { display: none; }
}

/* ==========================================================================
   SANCTIONS
   ========================================================================== */
.sx-target { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: rgba(255, 255, 255, .025); }
.sx-target .sx-rec { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.sx-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.sx-type { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border-radius: var(--radius); border: 1px solid var(--border2); background: rgba(255, 255, 255, .025); text-align: left; cursor: pointer; transition: all .12s; }
.sx-type:hover { background: rgba(255, 255, 255, .05); }
.sx-type .sxi { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; background: color-mix(in srgb, var(--tc) 14%, transparent); color: var(--tc); }
.sx-type .sxi svg { width: 18px; height: 18px; }
.sx-type b { display: block; font-size: 14px; font-weight: 600; }
.sx-type span { color: var(--dim); font-size: 11.5px; }
.sx-type.active { border-color: color-mix(in srgb, var(--tc) 70%, transparent); background: color-mix(in srgb, var(--tc) 8%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 14%, transparent); }
.sx-type:disabled { opacity: .4; cursor: not-allowed; }
.sx-label { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.sx-reasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.sx-reason { padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border2); background: transparent; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; transition: all .1s; }
.sx-reason:hover { background: rgba(255, 255, 255, .05); }
.sx-reason.active { border-color: rgba(112, 160, 200, .55); background: var(--sigma-soft); color: #fff; }
.sx-durs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sx-summary { display: flex; align-items: flex-start; gap: 11px; margin-top: 16px; padding: 13px 15px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent); background: color-mix(in srgb, var(--tc) 7%, transparent); font-size: 13.5px; }
.sx-summary svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--tc); }
.sx-hint { display: flex; align-items: flex-start; gap: 9px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(242, 177, 75, .25); background: rgba(242, 177, 75, .06); color: #f7cb7f; font-size: 12.5px; }
.sx-hint svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
@media (max-width: 640px) { .sx-types { grid-template-columns: 1fr; } }
.pick-list { max-height: 320px; overflow: auto; margin-top: 10px; border-radius: 10px; border: 1px solid var(--border); }
.pick-list > div { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.pick-list > div:last-child { border-bottom: none; }
.pick-list > div:hover { background: rgba(255, 255, 255, .04); }

/* ==========================================================================
   LOGS
   ========================================================================== */
.logs { display: grid; grid-template-columns: 290px minmax(0, 1fr); align-items: start; gap: 18px; max-width: 1600px; margin: 0 auto; }
.logs-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 110px); overflow: auto; }
.lg-box { padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); }
.lg-t { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 600; }
.lg-t svg { width: 15px; height: 15px; color: var(--dim); }
.lg-sel { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 9px 10px; border-radius: 10px; background: var(--sigma-soft); box-shadow: inset 2px 0 0 var(--sigma); }
.lg-players { max-height: 330px; overflow: auto; margin: 8px -6px 0; }
.lg-sub { display: flex; justify-content: space-between; padding: 8px 8px 4px; color: var(--dim); font-size: 11.5px; font-weight: 550; }
.lg-p { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.lg-p:hover { background: rgba(255, 255, 255, .04); }
.lg-p.on { background: var(--sigma-soft); }
.lg-p > svg { width: 15px; height: 15px; color: var(--dim); }
.lg-p .pav .on { width: 9px; height: 9px; border-width: 2px; }
.lg-p .ps { color: var(--dim); font-size: 11.5px; }
.lg-cats { display: flex; flex-direction: column; gap: 1px; }
.lg-cat { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 8px; border: none; border-radius: 7px; background: none; color: var(--muted); font-size: 13px; text-align: left; cursor: pointer; }
.lg-cat:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.lg-cat.on { background: rgba(255, 255, 255, .06); color: var(--text); font-weight: 550; }
.lg-cat .n { margin-left: auto; color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.logs-main { min-width: 0; }
.lg-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.live-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--border2); background: rgba(255, 255, 255, .03); color: var(--muted); font-size: 13px; font-weight: 550; cursor: pointer; }
.live-btn .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.live-btn.on { border-color: rgba(62, 207, 142, .35); background: rgba(62, 207, 142, .07); color: #7ee2b4; }
.live-btn.on .pulse { background: var(--ok); animation: pulse 1.6s infinite; }
.lg-active { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fchip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 4px 0 10px; border-radius: 8px; background: var(--sigma-soft); color: var(--sigma-light); font-size: 12.5px; font-weight: 550; }
.fchip svg { width: 13px; height: 13px; }
.fchip button { display: inline-flex; padding: 3px; border: none; border-radius: 5px; background: none; color: inherit; opacity: .7; cursor: pointer; }
.fchip button:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.lg-card { overflow: hidden; }
.lg-day { position: sticky; top: 0; z-index: 2; padding: 8px 18px; border-bottom: 1px solid var(--border); background: #16171a; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: capitalize; }
.lg-row { display: grid; grid-template-columns: 74px 110px minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 9px 18px 9px 15px; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; font-size: 13.5px; cursor: pointer; transition: background .1s; }
.lg-row:hover { background: rgba(255, 255, 255, .02); border-left-color: var(--cc); }
.lg-row.open { background: rgba(255, 255, 255, .035); border-left-color: var(--cc); }
.lg-row.new { animation: flash 1.8s; }
.lg-time { color: var(--dim); font-family: var(--mono); font-size: 11.5px; }
.lg-msg { line-height: 1.65; word-break: break-word; }
.lg-detail { grid-column: 2 / -1; padding: 4px 0; }
.pchip { display: inline-flex; align-items: center; margin: 0 1px; padding: 1px 8px 1px 2px; border: none; border-radius: 6px; background: var(--sigma-soft); color: var(--sigma-light); font-size: inherit; font-weight: 550; vertical-align: 1px; cursor: pointer; }
.pchip:hover { background: rgba(112, 160, 200, .22); color: #fff; }
.pchip .avatar.xs { margin-right: 6px; vertical-align: 0; }
.log-row td { font-size: 13px; }
.log-row td.msg { word-break: break-word; }
.log-row.new td { animation: flash 1.5s; }
@media (max-width: 1000px) { .logs { grid-template-columns: 1fr; } .logs-side { position: static; max-height: none; } .lg-players { max-height: 200px; } }
@media (max-width: 600px) { .lg-row { grid-template-columns: 1fr; gap: 2px; } .lg-detail { grid-column: 1; } }

/* ==========================================================================
   IMMOBILIER
   ========================================================================== */
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.hcard { position: relative; display: flex; flex-direction: column; gap: 14px; overflow: hidden; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); transition: border-color .15s, transform .15s; }
.hcard::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: var(--sigma); opacity: .8; }
.hcard.free::before { background: var(--ok); }
.hcard:hover { border-color: var(--border2); transform: translateY(-1px); }
.hc-top { display: flex; align-items: center; gap: 12px; }
.hc-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--sigma-soft); color: var(--sigma); }
.hc-ic svg { width: 19px; height: 19px; }
.hc-price { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hc-owner { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
.hc-free { display: flex; align-items: center; gap: 8px; color: #7ee2b4; font-size: 13px; font-weight: 550; }
.hc-free svg { width: 16px; height: 16px; }
.hc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hc-tags span { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 6px; background: rgba(255, 255, 255, .05); color: var(--muted); font-size: 12px; }
.hc-tags span svg { width: 12px; height: 12px; }
.hc-tags span.on { background: var(--sigma-soft); color: var(--sigma-light); }
.hc-tags span.warn { background: rgba(242, 177, 75, .12); color: #f7cb7f; }
.hc-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

/* ==========================================================================
   CARTE
   ========================================================================== */
.map-wrap { position: absolute; inset: 0; background: #08090b; }
.map-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.map-wrap canvas.drag { cursor: grabbing; }
.map-panel { position: absolute; top: 14px; left: 14px; width: 272px; max-height: calc(100% - 28px); overflow: auto; padding: 12px; border-radius: 14px; border: 1px solid var(--border2); background: rgba(19, 20, 23, .92); backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.map-panel h4 { margin: 4px 0 8px; color: var(--dim); font-size: 12px; font-weight: 550; }
.map-panel label { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; cursor: pointer; }
.map-panel .plist { max-height: 260px; overflow: auto; margin-top: 6px; }
.map-panel .plist div { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 7px; font-size: 13px; cursor: pointer; }
.map-panel .plist div:hover { background: rgba(255, 255, 255, .05); }
.map-tools { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; }
.map-tools .btn { background: rgba(19, 20, 23, .92); backdrop-filter: blur(10px); }
.map-tip { position: absolute; z-index: 5; max-width: 260px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--border2); background: rgba(19, 20, 23, .96); font-size: 12.5px; pointer-events: none; }
.map-card { position: absolute; right: 14px; bottom: 14px; width: 300px; padding: 14px; border-radius: 14px; border: 1px solid var(--border2); background: rgba(19, 20, 23, .96); backdrop-filter: blur(10px); box-shadow: var(--shadow); }

/* fond de carte */
.bg-cur { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--border); background: rgba(255, 255, 255, .025); }
.bg-cur img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border2); }
.bg-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bg-opt { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border2); background: rgba(255, 255, 255, .025); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: all .12s; }
.bg-opt:hover:not([disabled]) { border-color: rgba(112, 160, 200, .55); background: rgba(255, 255, 255, .05); }
.bg-opt[disabled] { opacity: .45; cursor: not-allowed; }
.bg-opt span:last-child { color: var(--dim); font-size: 12px; line-height: 1.45; }
.bg-i { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 4px; border-radius: 9px; background: var(--sigma-soft); color: var(--sigma); }
.bg-i svg { width: 18px; height: 18px; }
@media (max-width: 640px) { .bg-opts { grid-template-columns: 1fr; } }
.cal { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; }
.cal-tools { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 12.5px; }
.cal-scroll { height: 58vh; overflow: auto; border-radius: 10px; border: 1px solid var(--border); background: #08090b; }
.cal-img { position: relative; width: 100%; cursor: crosshair; }
.cal-img img { display: block; width: 100%; user-select: none; -webkit-user-drag: none; }
.cal-img svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cal-pt { margin-bottom: 10px; padding: 12px; border-radius: 10px; border: 1px solid var(--border2); background: rgba(255, 255, 255, .025); cursor: pointer; }
.cal-pt.on { border-color: rgba(242, 177, 75, .7); box-shadow: 0 0 0 3px rgba(242, 177, 75, .14); }
.cal-n { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--warn); color: #241703; font-size: 12px; font-weight: 800; }
.cal-ok { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(62, 207, 142, .3); background: rgba(62, 207, 142, .07); font-size: 12.5px; }
.cal-ok svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--ok); }
@media (max-width: 800px) { .cal { grid-template-columns: 1fr; } .cal-scroll { height: 45vh; } }

/* ==========================================================================
   CONFIGS DES ADDONS
   ========================================================================== */
.cfg-layout { display: grid; grid-template-columns: 260px 1fr; align-items: start; gap: 16px; }
@media (max-width: 900px) { .cfg-layout { grid-template-columns: 1fr; } }
.cfg-list a { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: var(--r-ctl); color: var(--muted); font-size: 13.5px; }
.cfg-list a:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.cfg-list a.active { background: rgba(255, 255, 255, .06); color: var(--text); font-weight: 550; }
.cfg-list a.off { opacity: .45; }
.cfg-info { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255, 255, 255, .025); }
.tree { font-size: 13.5px; }
.node { margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--border); }
.node-row { position: relative; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 5px 6px; border-radius: 7px; }
.node-row:hover { background: rgba(255, 255, 255, .025); }
.node-row .key { min-width: 150px; max-width: 260px; overflow: hidden; color: #b9a8f5; font-family: var(--mono); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.node-row .key.idx { min-width: 40px; color: var(--dim); }
.node-row .val { flex: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.node-row .tools { display: flex; gap: 2px; opacity: 0; transition: opacity .1s; }
.node-row:hover .tools { opacity: 1; }
.node-row.dirty { background: rgba(242, 177, 75, .06); }
.node-row.dirty .key::after { content: ' \2022'; color: var(--warn); }
.node-row .ovr { position: absolute; left: -4px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--sigma); }
.toggle-h { cursor: pointer; user-select: none; }
.caret { display: inline-block; width: 14px; color: var(--dim); font-size: 10px; transition: transform .1s; }
.caret.open { transform: rotate(90deg); }
.preview { color: var(--dim); font-size: 12px; }
.val input[type=number] { width: 130px; }
.val input.text { width: min(420px, 100%); }
.val .vec input { width: 90px; }
.colorbox { display: inline-flex; align-items: center; gap: 6px; }
.colorbox input[type=color] { width: 34px; height: 26px; padding: 0; border-radius: 6px; border: 1px solid var(--border2); background: none; cursor: pointer; }
.colorbox input[type=range] { width: 80px; }
.switch { position: relative; flex: none; width: 36px; height: 20px; }
.switch input { width: 0; height: 0; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, .12); cursor: pointer; transition: .15s; }
.switch span::before { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #d4d6db; transition: .15s var(--ease); }
.switch input:checked + span { background: var(--sigma-strong); }
.switch input:checked + span::before { transform: translateX(16px); background: #fff; }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid rgba(242, 177, 75, .5); background: #1c1a15; box-shadow: var(--shadow); }
.sf-nav { margin: 14px 0 4px; }
.sf-section { margin-top: 20px; }
.sf-section h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.sf-section > p { margin: 0 0 8px; }
.sf-row { display: grid; grid-template-columns: minmax(220px, 38%) 1fr auto; align-items: center; gap: 14px; margin-top: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255, 255, 255, .02); }
.sf-row.block { grid-template-columns: 1fr auto; }
.sf-row.block .sf-label { grid-column: 1; }
.sf-row.block .sf-tools { grid-column: 2; grid-row: 1; }
.sf-row.block .sf-input { grid-column: 1 / -1; }
.sf-row.dirty { border-color: rgba(242, 177, 75, .5); background: rgba(242, 177, 75, .05); }
.sf-title { font-weight: 550; line-height: 1.35; }
.sf-key { margin-top: 2px; color: var(--dim); font-size: 11.5px; }
.sf-ovr { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--sigma); vertical-align: middle; }
.sf-input { min-width: 0; }
.sf-sub { padding-left: 12px; border-left: 2px solid var(--border2); }
.sf-sub .sf-row { background: transparent; }
.sf-hint { white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; border: 1px solid var(--border2); background: rgba(255, 255, 255, .03); font-size: 13px; }
.tag.on { border-color: rgba(112, 160, 200, .5); background: var(--sigma-soft); }
.tag button { padding: 0 4px; border: none; background: none; color: var(--dim); font-size: 15px; line-height: 1; cursor: pointer; }
.tag button:hover { color: var(--danger); }
.tag-input { width: 170px !important; }
.sf-table .table-wrap { max-height: 520px; border-radius: 8px; border: 1px solid var(--border); }
.sf-grid td { padding: 4px 6px; }
.sf-grid th { padding: 8px 6px; }
@media (max-width: 800px) { .sf-row { grid-template-columns: 1fr; } .sf-row .sf-tools { justify-self: end; } }

/* ==========================================================================
   CONSOLE
   ========================================================================== */
.console-out { height: 340px; overflow: auto; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: #070809; font-family: var(--mono); font-size: 12.5px; }
.console-out div { padding: 1px 0; }
.console-out .c-ok { color: #7ee2b4; }
.console-out .c-err { color: #f8a5a5; }
