/* Investbuya — panel d'administration. Salle de contrôle sombre : verre discret, accent violet → cyan réservé aux éléments clés. */

:root {
  --bg: #07080f;
  --bg-2: #0b0c18;
  --panel: #0d0f1d;
  --surface: rgba(150, 160, 255, 0.05);
  --surface-2: rgba(150, 160, 255, 0.09);
  --surface-3: rgba(150, 160, 255, 0.14);
  --line: rgba(150, 162, 255, 0.13);
  --line-2: rgba(150, 162, 255, 0.24);
  --text: #e8eaf6;
  --text-2: #aab0c9;
  --text-3: #7f86a4;
  --violet: #8b6cff;
  --cyan: #3fd8f2;
  --grad: linear-gradient(120deg, var(--violet), var(--cyan));
  --ok: #4fdc9c;
  --warn: #f5b419;
  --danger: #ff5f7e;
  --r-card: 16px;
  --r-ctl: 10px;
  --sidebar: 248px;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --fast: 160ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #2a2e4a transparent; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14.5px/1.5 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Fond : deux halos fixes et une trame très légère, qui s'efface vers le bas. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(139, 108, 255, 0.17), transparent 62%),
    radial-gradient(760px 460px at 96% -4%, rgba(63, 216, 242, 0.09), transparent 60%),
    linear-gradient(rgba(150, 162, 255, 0.035) 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(90deg, rgba(150, 162, 255, 0.035) 1px, transparent 1px) 0 0 / 44px 100%;
  -webkit-mask-image: linear-gradient(#000, rgba(0, 0, 0, 0.25) 70%, transparent);
  mask-image: linear-gradient(#000, rgba(0, 0, 0, 0.25) 70%, transparent);
}

h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(139, 108, 255, 0.45); }

.icon { flex: none; display: block; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }
.strong { color: var(--text); font-weight: 600; }
.sub-line { display: block; color: var(--text-3); font-size: 12.5px; }
.center { text-align: center; padding-bottom: 24px; }
.up { color: var(--ok); }
.down { color: var(--danger); }
.warn-text { color: var(--warn); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-link { color: #b9a8ff; text-underline-offset: 3px; }
.text-link:hover { text-decoration: underline; color: #d5caff; }
code { font-family: var(--mono); font-size: 0.92em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
kbd { font: 11px var(--mono); color: var(--text-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; }
.noscript { padding: 40px; text-align: center; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--panel); border: 1px solid var(--line-2); padding: 8px 14px; border-radius: 10px; transition: top var(--fast); }
.skip:focus { top: 12px; }

/* ——— Démarrage ——— */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--text-3); }
.boot-mark { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--cyan); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ——— Logo ——— */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo-mark { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; }
.logo-mark i { width: 4px; border-radius: 2px; background: var(--grad); background-size: 400% 100%; }
.logo-mark i:nth-child(1) { height: 40%; background-position: 0 0; }
.logo-mark i:nth-child(2) { height: 62%; background-position: 33% 0; }
.logo-mark i:nth-child(3) { height: 100%; background-position: 66% 0; }
.logo-mark i:nth-child(4) { height: 48%; background-position: 100% 0; }
.logo-text { font: 600 13.5px var(--mono); letter-spacing: 0.24em; background: linear-gradient(100deg, #fff 20%, #c9bcff 60%, #9fe9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ——— Écrans de connexion ——— */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.gate-card { width: min(440px, 100%); padding: 36px 32px; border-radius: 22px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(150, 160, 255, 0.09), rgba(150, 160, 255, 0.03)); box-shadow: 0 40px 120px -40px rgba(139, 108, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.gate-card h1 { margin-top: 28px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.gate-text { margin-top: 10px; color: var(--text-2); }
.gate-error { margin-top: 18px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: rgba(255, 95, 126, 0.1); border: 1px solid rgba(255, 95, 126, 0.35); color: #ffc2ce; }
.gate-error .icon { margin-top: 3px; }
.gate-actions { margin-top: 26px; display: flex; }
.gate-actions .btn { flex: 1; }
.gate-form { width: 100%; display: grid; gap: 14px; }
.gate-form .gate-error { margin-top: 0; }
.gate-form .gate-actions { margin-top: 8px; }
.gate-error[hidden] { display: none; }
.gate-actions > .gate-form { flex: 1; }

/* ——— Coquille ——— */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40; display: flex; flex-direction: column; padding: 22px 14px 14px; background: rgba(9, 10, 20, 0.82); border-right: 1px solid var(--line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 22px; }
.logo-link { border-radius: 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; transition: background var(--fast), color var(--fast); }
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link.current { background: var(--surface-2); color: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.nav-link.current::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); box-shadow: 0 0 14px rgba(139, 108, 255, 0.8); }
.nav-link.current .icon { color: #b9a8ff; }
.nav-count { margin-left: auto; min-width: 22px; padding: 1px 7px; text-align: center; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #1c1400; background: var(--warn); }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; }
.fleet { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 12.5px; color: var(--text-3); }
.fleet-dots { display: inline-flex; gap: 4px; }
.fleet-dots i { width: 7px; height: 7px; border-radius: 50%; background: #3a3f5c; }
.fleet-dots i.on { background: var(--ok); box-shadow: 0 0 8px rgba(79, 220, 156, 0.7); }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.me .user-text { flex: 1; min-width: 0; }
.me-role { font-size: 12px; color: var(--text-3); }

.frame { margin-left: var(--sidebar); min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 14px 32px; background: linear-gradient(rgba(7, 8, 15, 0.92), rgba(7, 8, 15, 0.7)); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.icon-btn.burger { display: none; }
.scrim { display: none; }
.view { flex: 1; min-width: 0; }
.page { max-width: 1320px; margin: 0 auto; padding: 14px 32px 96px; display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }

/* ——— Recherche globale ——— */
.search { position: relative; flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-3); transition: border-color var(--fast), background var(--fast), box-shadow var(--fast); }
.search:focus-within { border-color: rgba(139, 108, 255, 0.7); background: rgba(150, 160, 255, 0.08); box-shadow: 0 0 0 4px rgba(139, 108, 255, 0.14); }
.search-input { flex: 1; min-width: 0; background: none; border: 0; height: 100%; color: var(--text); }
.search-input::placeholder { color: var(--text-3); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-input:focus-visible { outline: none; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); padding: 6px; border-radius: 14px; border: 1px solid var(--line-2); background: #101224; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.8); max-height: 60vh; overflow-y: auto; }
.search-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--text); }
.search-option.active, .search-option:hover { background: var(--surface-2); }
.search-ico { display: inline-flex; margin-right: -2px; color: var(--text-3); }
.search-option > span:nth-child(2) { flex: 1; }
.search-empty { padding: 14px; color: var(--text-3); }

/* ——— Boutons ——— */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-weight: 600; white-space: nowrap; transition: background var(--fast), border-color var(--fast), transform var(--fast), box-shadow var(--fast), opacity var(--fast); }
.btn:hover { background: var(--surface-3); border-color: rgba(170, 180, 255, 0.4); }
.btn:active { transform: translateY(1px); }
.btn.primary { border-color: transparent; color: #0a0716; background: var(--grad); box-shadow: 0 8px 26px -10px rgba(139, 108, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 10px 30px -8px rgba(99, 170, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn.danger { border-color: rgba(255, 95, 126, 0.55); background: rgba(255, 95, 126, 0.16); color: #ffc7d2; }
.btn.danger:hover { background: rgba(255, 95, 126, 0.28); }
.btn.ghost { background: none; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface); color: var(--text); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13.5px; }
.btn.big { height: 48px; font-size: 15.5px; border-radius: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; box-shadow: none; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; opacity: 0.85; }
.btn.loading > * { visibility: hidden; }
.btn.loading::after { content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 0.7s linear infinite; }
.btn.primary.loading::after { border-color: rgba(10, 7, 22, 0.3); border-top-color: #0a0716; }

.icon-btn { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 0; background: none; color: var(--text-3); transition: background var(--fast), color var(--fast); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.done { color: var(--ok); }

.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 500; white-space: nowrap; transition: background var(--fast), border-color var(--fast), color var(--fast); }
button.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.on { color: #fff; border-color: rgba(139, 108, 255, 0.75); background: rgba(139, 108, 255, 0.2); }
.chip.static { height: 30px; font-size: 13.5px; color: var(--text); }
.chip.static .icon { color: var(--text-3); }
.chip .pill-dot { background: var(--c); }
.chip-count { font-size: 12px; color: var(--text-3); }
.chip.on .chip-count { color: #d9d0ff; }
.chip-group { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ——— Formulaires ——— */
.input { width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: rgba(5, 6, 14, 0.6); color: var(--text); transition: border-color var(--fast), box-shadow var(--fast), background var(--fast); }
.input::placeholder { color: #666c8a; }
.input:hover { border-color: rgba(170, 180, 255, 0.4); }
.input:focus-visible { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 108, 255, 0.18); }
.input[readonly] { background: transparent; border-color: var(--line); cursor: default; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aab0c9' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
select.input option { background: #12142a; color: var(--text); }
input[type="number"].input { -moz-appearance: textfield; appearance: textfield; }
input[type="number"].input::-webkit-inner-spin-button { display: none; }
input[type="search"].input::-webkit-search-cancel-button { filter: invert(0.6); }
.field { display: grid; gap: 6px; }
.field-label { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.optional { font-weight: 400; font-size: 12px; color: var(--text-3); }
.field-hint { font-size: 12.5px; color: var(--text-3); }
.field.inline { min-width: 168px; }
.field.grow { flex: 1 1 240px; }
.input-icon { position: relative; display: block; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon .input { padding-left: 36px; }
.form-error { color: #ffb3c1; font-size: 13.5px; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--violet); }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.chips-row { gap: 8px; align-items: center; }
.filters .chip { height: 38px; }
.filters-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }

/* ——— Pastilles ——— */
.pill { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; height: 26px; padding: 0 10px 0 8px; border-radius: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; color: color-mix(in srgb, var(--c) 78%, #fff); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 34%, transparent); }
.pill-dot { flex: none; width: 8px; height: 8px; border-radius: 3px; background: var(--fill, var(--c)); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 70%, transparent); }
.pill.small { height: 22px; font-size: 12px; padding: 0 8px 0 6px; gap: 6px; }
.pill.small .pill-dot { width: 7px; height: 7px; }
.pill.prestige { color: #fff; border-color: color-mix(in srgb, var(--c) 60%, transparent); background: linear-gradient(120deg, rgba(139, 108, 255, 0.28), rgba(63, 216, 242, 0.2)); box-shadow: 0 0 18px -6px var(--c); }
.pill.none { color: var(--text-3); background: none; border-style: dashed; }
.pill.none .pill-dot { box-shadow: none; }
.pill.sub .pill-dot { border-radius: 50%; }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); }
.badge.ok { color: #9af0c8; background: rgba(79, 220, 156, 0.12); border-color: rgba(79, 220, 156, 0.32); }
.badge.warn { color: #ffd77a; background: rgba(245, 180, 25, 0.12); border-color: rgba(245, 180, 25, 0.34); }
.badge.danger { color: #ffb3c1; background: rgba(255, 95, 126, 0.13); border-color: rgba(255, 95, 126, 0.36); }
.badge.accent { color: #cdc1ff; background: rgba(139, 108, 255, 0.15); border-color: rgba(139, 108, 255, 0.4); }
.badge.muted { color: var(--text-3); background: none; }
.badge.demo { color: #9fe9ff; background: rgba(63, 216, 242, 0.1); border-color: rgba(63, 216, 242, 0.35); }
.badge.source { font-weight: 500; background: none; }
.badge.source.panel { color: #cdc1ff; border-color: rgba(139, 108, 255, 0.4); }
.badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }

.server-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-2); white-space: nowrap; }
.server-tag b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font: 600 11.5px var(--mono); color: var(--text); background: var(--surface-3); border: 1px solid var(--line-2); }
.server-tag.none { color: var(--text-3); }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; }
.status.on { color: #9af0c8; }
.status.on i { background: var(--ok); box-shadow: 0 0 0 3px rgba(79, 220, 156, 0.18), 0 0 12px rgba(79, 220, 156, 0.8); }
.status.off { color: var(--text-3); }
.status.off i { background: #454a68; }
.mention { display: inline-block; padding: 0 5px; border-radius: 5px; background: rgba(139, 108, 255, 0.22); color: #d5caff; font-weight: 500; }
a.mention:hover { background: rgba(139, 108, 255, 0.38); }

/* ——— Utilisateurs ——— */
.avatar { position: relative; flex: none; display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, hsl(var(--h) 55% 34%), hsl(calc(var(--h) + 50) 60% 22%)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.avatar-initials { font-size: calc(var(--s) * 0.38); font-weight: 600; color: rgba(255, 255, 255, 0.92); letter-spacing: 0.02em; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.user { display: inline-flex; align-items: center; gap: 11px; min-width: 0; max-width: 100%; border-radius: 8px; }
.user-text { display: grid; min-width: 0; line-height: 1.25; }
.user-name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-id { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; }
a.user:hover .user-name { color: #d5caff; }

/* ——— Toasts ——— */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 12px 10px 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: #12142a; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9); animation: toast-in 220ms var(--ease); transition: opacity 180ms, transform 180ms; }
.toast.leaving { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
.toast-icon { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; margin-top: 1px; background: var(--surface-3); color: var(--text); }
.toast.success { border-color: rgba(79, 220, 156, 0.45); }
.toast.success .toast-icon { background: rgba(79, 220, 156, 0.18); color: var(--ok); }
.toast.refus { border-color: rgba(245, 180, 25, 0.5); }
.toast.refus .toast-icon { background: rgba(245, 180, 25, 0.16); color: var(--warn); }
.toast.error { border-color: rgba(255, 95, 126, 0.55); }
.toast.error .toast-icon { background: rgba(255, 95, 126, 0.18); color: var(--danger); }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-weight: 600; }
.toast-text { color: var(--text-2); overflow-wrap: anywhere; }
.toast-text strong { color: var(--text); }

/* ——— Dialogues ——— */
.modal { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border-radius: 18px; border: 1px solid var(--line-2); background: #0f1122; color: var(--text); box-shadow: 0 50px 140px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(139, 108, 255, 0.1); overflow: hidden; }
.modal[open] { display: flex; flex-direction: column; animation: modal-in 200ms var(--ease); }
.modal.wide { width: min(860px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(4, 5, 12, 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 16px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; font-weight: 600; }
.modal-body { padding: 20px 22px 0; overflow-y: auto; }
.modal-actions { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 20px -22px 0; padding: 14px 22px; background: #0f1122; border-top: 1px solid var(--line); }
.confirm { display: grid; gap: 14px; }
.confirm-text { color: var(--text-2); }
.confirm-inline { flex: 1 1 260px; color: var(--text-2); font-size: 13.5px; }

/* ——— États ——— */
.empty { display: grid; justify-items: center; gap: 6px; padding: 44px 20px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; margin-bottom: 8px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); }
.empty-title { font-weight: 600; font-size: 15.5px; }
.empty-text { color: var(--text-3); max-width: 46ch; }
.empty .btn { margin-top: 14px; }
.card-head + .empty { grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; column-gap: 14px; row-gap: 0; padding: 2px 0; text-align: left; }
.card-head + .empty .empty-icon { grid-row: span 2; margin: 0; width: 40px; height: 40px; border-radius: 12px; }
.card-head + .empty .empty-title { font-size: 14.5px; }
.card-head + .empty .empty-icon:nth-last-child(2) { grid-row: auto; }
.card.flush-body > .card-head + .empty { padding: 2px 20px 14px; }
.skel { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, rgba(150, 160, 255, 0.07) 20%, rgba(150, 160, 255, 0.16) 45%, rgba(150, 160, 255, 0.07) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.skel-rows { display: grid; }
.skel-row { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.skel-row:last-child { border-bottom: 0; }

/* ——— Mise en page ——— */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; padding-top: 6px; }
.page-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.page-sub { margin-top: 6px; color: var(--text-2); max-width: 70ch; }
.page-actions { display: flex; align-items: center; gap: 10px; }
.back { justify-self: start; display: inline-flex; align-items: center; gap: 4px; margin-bottom: -6px; color: var(--text-3); font-size: 13.5px; border-radius: 6px; }
.back .icon { transform: rotate(180deg); }
.back:hover { color: var(--text); }

.card { min-width: 0; padding: 20px; border-radius: var(--r-card); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(150, 160, 255, 0.07), rgba(150, 160, 255, 0.028)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 20px 50px -34px rgba(0, 0, 0, 0.9); }
.card.flush { padding: 0; overflow: hidden; }
.card.flush-body { padding-left: 0; padding-right: 0; padding-bottom: 6px; }
.card.flush-body > .card-head { padding: 0 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 600; letter-spacing: -0.005em; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: 13.5px; }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid.hero { grid-template-columns: minmax(0, 1fr) 300px; }
.grid.todos { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stack-v { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-content: start; }
.block { display: grid; gap: 12px; }
.block-title { font-size: 15.5px; font-weight: 600; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; border-top: 1px solid var(--line); }
.pager-info { color: var(--text-2); font-size: 13.5px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 13.5px; }
.notice > .icon { margin-top: 2px; color: #b9a8ff; }
.notice.warn { border-color: rgba(245, 180, 25, 0.35); background: rgba(245, 180, 25, 0.07); color: #f1dca6; }
.notice.warn > .icon { color: var(--warn); }

/* ——— Tableaux ——— */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 11px 16px; text-align: left; font-size: 12.5px; font-weight: 500; color: var(--text-3); white-space: nowrap; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 16px; vertical-align: middle; border-bottom: 1px solid rgba(150, 162, 255, 0.08); }
.table tbody tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table .numeric { text-align: right; white-space: nowrap; }
.table tbody tr { transition: background var(--fast); }
.table tbody tr:hover { background: rgba(150, 160, 255, 0.045); }
.table.rows-link tbody tr { cursor: pointer; }
.table.compact th, .table.compact td { padding-top: 9px; padding-bottom: 9px; }
.row-actions { display: inline-flex; gap: 8px; }
.loan { display: inline-grid; justify-items: end; line-height: 1.3; color: #ffd77a; }
.loan-due { font-size: 12px; color: var(--text-3); }

/* ——— Vue d'ensemble ——— */
.readout { display: grid; gap: 2px; min-width: 0; }
.readout-label { font-size: 12.5px; color: var(--text-3); }
.readout-value { font-size: 21px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readout-hint { font-size: 12.5px; color: var(--text-3); }
.readout.big .readout-value { font-size: 42px; line-height: 1.1; font-weight: 500; letter-spacing: -0.03em; background: linear-gradient(100deg, #fff 30%, #cfc4ff 75%, #9fe9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.readout.warn .readout-value { color: #ffd77a; }
.stats.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hero-totals { display: grid; grid-template-columns: auto auto auto 1fr; align-items: end; gap: 16px 56px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.totals { display: grid; align-content: space-between; gap: 18px; }
.totals .readout:first-child .readout-value { font-size: 34px; letter-spacing: -0.03em; background: linear-gradient(100deg, #fff 30%, #cfc4ff 75%, #9fe9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.totals .readout + .readout { padding-top: 16px; border-top: 1px solid var(--line); }

.ladder-scroll { overflow-x: auto; margin: 0 -6px; padding: 0 6px 4px; }
.ladder { display: grid; grid-template-columns: repeat(var(--n), minmax(46px, 1fr)); gap: 6px; min-width: calc(var(--n) * 52px); }
.ladder-col { display: grid; grid-template-rows: auto 150px auto; justify-items: center; gap: 8px; padding: 6px 2px 8px; border-radius: 10px; transition: background var(--fast); }
.ladder-col:hover { background: var(--surface); }
.ladder-count { font-size: 13px; color: var(--text); }
.ladder-col.zero .ladder-count { color: var(--text-3); }
.ladder-track { position: relative; width: 100%; max-width: 30px; height: 100%; border-radius: 8px; background: rgba(150, 160, 255, 0.055); overflow: hidden; }
.ladder-track i { position: absolute; inset: auto 0 0 0; height: max(3px, calc(var(--v) * 100%)); border-radius: 8px; background: var(--fill); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 45%, transparent); transform-origin: bottom; animation: grow 700ms var(--ease) backwards; }
.ladder li:nth-child(n) .ladder-track i { animation-delay: calc(40ms * var(--i, 0)); }
@keyframes grow { from { transform: scaleY(0); } }
.ladder-name { font-size: 11.5px; line-height: 1.2; color: var(--text-2); text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.4em; }

.todo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon main arrow" "icon hint arrow"; align-items: center; column-gap: 12px; padding: 14px 14px 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); transition: border-color var(--fast), background var(--fast); }
a.todo:hover { border-color: var(--line-2); background: var(--surface-2); }
.todo > .icon { grid-area: arrow; color: var(--text-3); }
.todo-icon { grid-area: icon; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); color: var(--text-2); }
.todo-main { grid-area: main; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.todo-count { font-size: 20px; font-weight: 500; }
.todo-label { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-hint { grid-area: hint; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo.warn { border-color: rgba(245, 180, 25, 0.4); background: linear-gradient(120deg, rgba(245, 180, 25, 0.1), rgba(245, 180, 25, 0.02)); }
.todo.warn .todo-icon { background: rgba(245, 180, 25, 0.16); color: var(--warn); }
.todo.warn .todo-count { color: #ffd77a; }
.todo.danger .todo-icon { background: rgba(255, 95, 126, 0.14); color: var(--danger); }

.server-card { display: grid; gap: 0; align-content: start; }
.server-card.offline { border-style: dashed; }
.server-card.offline .readout-value { color: var(--text-2); }
.server-key { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-size: 12.5px; color: var(--text); background: var(--surface-3); border: 1px solid var(--line-2); }
.stack { display: flex; gap: 2px; height: 10px; margin-top: 18px; border-radius: 5px; overflow: hidden; }
.stack i { min-width: 3px; background: var(--fill); }
.stack i:hover { filter: brightness(1.25); }
.stack.empty-stack { height: auto; font-size: 13px; }

.sub-bars { display: grid; gap: 4px; }
.sub-bar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 44px; align-items: center; gap: 14px; padding: 7px 8px; margin: 0 -8px; border-radius: 9px; transition: background var(--fast); }
.sub-bar:hover { background: var(--surface); }
.sub-bar-name { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; }
.sub-bar-name .pill-dot { border-radius: 50%; background: var(--c); }
.sub-bar-track { height: 8px; border-radius: 4px; background: rgba(150, 160, 255, 0.06); }
.sub-bar-track i { display: block; height: 100%; width: max(4px, calc(var(--v) * 100%)); border-radius: 4px; background: var(--c); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 40%, transparent); }
.sub-bar-count { text-align: right; }

/* ——— Fiche ——— */
.profile { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 18px; }
.profile-id { flex: 1 1 220px; min-width: 0; }
.profile-id h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; }
.profile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 2px; }
.id-copy { display: inline-flex; align-items: center; gap: 2px; color: var(--text-2); font-size: 13px; }
.profile-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 16px; align-items: start; }
.profile-main { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.profile-aside { min-width: 0; }
@media (min-height: 1040px) and (min-width: 1181px) { .profile-aside { position: sticky; top: 78px; } }
.fortune { display: grid; gap: 22px; }
.fortune-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 40px; align-items: end; }

.rail-block { display: grid; gap: 12px; }
.rail-caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-2); }
.rail-caption > span { display: inline-flex; align-items: center; gap: 8px; }
.rail-missing strong { color: var(--text); font-weight: 600; }
.rail { position: relative; height: 10px; margin: 6px 7px; border-radius: 5px; background: rgba(150, 160, 255, 0.09); }
.rail-fill { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 5px; background: var(--grad); box-shadow: 0 0 20px rgba(120, 140, 255, 0.55); }
.rail-tick { position: absolute; left: var(--x); top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #1b1e36; box-shadow: 0 0 0 2px var(--bg-2), inset 0 0 0 1.5px color-mix(in srgb, var(--c) 70%, transparent); }
.rail-tick.reached { background: #fff; box-shadow: 0 0 0 2px rgba(10, 8, 26, 0.5); width: 6px; height: 6px; margin: -3px 0 0 -3px; opacity: 0.85; }
.rail-tick.next { width: 14px; height: 14px; margin: -7px 0 0 -7px; background: var(--fill); box-shadow: 0 0 0 3px var(--bg-2), 0 0 16px var(--c); }
.rail-cursor { position: absolute; left: var(--p); top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(63, 216, 242, 0.25), 0 0 18px rgba(63, 216, 242, 0.9); }
.rail-ends { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-3); }

.kv { display: grid; }
.kv-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid rgba(150, 162, 255, 0.08); color: var(--text-2); }
.kv-row:last-child { border-bottom: 0; padding-bottom: 0; }
.kv-row:first-child { padding-top: 0; }
.kv-val { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; color: var(--text); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.kv-val.mono { font-size: 13px; }
.follow { display: grid; gap: 14px; }
.follow li { display: flex; gap: 12px; align-items: flex-start; }
.follow-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); }
.follow-icon.accent { color: #b9a8ff; }
.follow-icon.danger { color: var(--danger); background: rgba(255, 95, 126, 0.12); }

.journal { display: grid; }
.journal-item { border-bottom: 1px solid rgba(150, 162, 255, 0.08); --tone: #b9a8ff; }
.journal-item:last-child { border-bottom: 0; }
.journal-item.tone-ok { --tone: var(--ok); }
.journal-item.tone-warn { --tone: var(--warn); }
.journal-item.tone-danger { --tone: var(--danger); }
.journal-item.tone-cyan { --tone: var(--cyan); }
.journal-item.tone-violet { --tone: #d48bff; }
.journal-item summary { display: flex; align-items: center; gap: 14px; padding: 11px 20px; cursor: pointer; list-style: none; transition: background var(--fast); }
.journal-item summary::-webkit-details-marker { display: none; }
.journal-item summary:hover { background: rgba(150, 160, 255, 0.045); }
.journal-item summary:focus-visible { outline-offset: -2px; }
.journal-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 10px color-mix(in srgb, var(--tone) 70%, transparent); }
.journal-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.journal-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.journal-sum { margin-left: 10px; font-weight: 400; color: var(--text-2); }
.journal-meta { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.journal-meta .strong { font-weight: 500; color: var(--text-2); }
.journal-meta .server-tag { font-size: 12.5px; margin-left: 6px; }
.journal-meta .server-tag b { width: 17px; height: 17px; font-size: 10.5px; }
.journal-side { flex: none; display: inline-flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12.5px; }
.journal-time { min-width: 86px; text-align: right; white-space: nowrap; }
.journal-side > .icon { transition: transform var(--fast); }
details[open] > summary .journal-side > .icon { transform: rotate(180deg); }
.journal-details { padding: 4px 20px 16px 42px; }
.details-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 20px; padding: 12px 14px; border-radius: 12px; background: rgba(5, 6, 14, 0.5); border: 1px solid var(--line); font-size: 13.5px; }
.details-list dt { color: var(--text-3); }
.details-list dd { overflow-wrap: anywhere; }

/* ——— Actions ——— */
.actions { display: grid; gap: 16px; }
.result { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(79, 220, 156, 0.4); background: rgba(79, 220, 156, 0.08); overflow-wrap: anywhere; }
.result.refus { border-color: rgba(245, 180, 25, 0.45); background: rgba(245, 180, 25, 0.08); }
.result-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.result.ok .result-head .icon { color: var(--ok); }
.result.refus .result-head .icon { color: var(--warn); }
.result-head .muted { font-weight: 400; margin-left: auto; }
.result p { color: var(--text-2); font-size: 13.5px; }
.result p strong { color: var(--text); }
.action-group { display: grid; gap: 4px; }
.action-group h3 { font-size: 12.5px; font-weight: 500; color: var(--text-3); margin-bottom: 2px; }
.action-item { border-radius: 11px; border: 1px solid transparent; transition: border-color var(--fast), background var(--fast); }
.action-item:has(> [aria-expanded="true"]) { border-color: var(--line-2); background: rgba(5, 6, 14, 0.45); }
.action-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 500; text-align: left; transition: background var(--fast); }
.action-toggle:hover { background: var(--surface-2); }
.action-toggle .icon { color: var(--text-3); transition: transform var(--fast); }
.action-toggle[aria-expanded="true"] { background: none; }
.action-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.action-toggle.danger { color: #ffb3c1; }
.action-panel { padding: 4px 12px 12px; }
.action-form { display: grid; gap: 12px; }
.danger-confirm { padding: 12px; border-radius: 10px; border: 1px solid rgba(255, 95, 126, 0.35); background: rgba(255, 95, 126, 0.07); }
.danger-confirm .field-label { color: #ffc7d2; }

/* ——— Onglets ——— */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); overflow-x: auto; justify-self: start; max-width: 100%; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font-weight: 500; white-space: nowrap; transition: background var(--fast), color var(--fast); }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--surface-3); color: #fff; box-shadow: inset 0 0 0 1px var(--line-2); }
.tab-count { padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #1c1400; background: var(--warn); }

/* ——— Prix ——— */
.grid.price-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.grid.price-grid > :nth-child(3) { grid-column: 1 / -1; }
.price-rows { display: grid; }
.price-row { display: grid; align-items: start; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(150, 162, 255, 0.07); }
.price-row:last-child { border-bottom: 0; }
.price-row.head { padding: 0 0 8px; font-size: 12.5px; color: var(--text-3); }
.tiers-rows .price-row { grid-template-columns: 14px minmax(0, 1fr) 124px; }
.rental-rows .price-row { grid-template-columns: minmax(0, 1fr) 104px 104px; }
.access-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
.access-rows .price-row { grid-template-columns: minmax(0, 1fr) 124px; }
.access-rows .price-row:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.tier-swatch { width: 10px; height: 38px; border-radius: 4px; background: var(--fill); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 45%, transparent); }
.price-name { align-self: center; min-width: 0; }
.pf { display: grid; gap: 3px; min-width: 0; }
.pf-input { position: relative; display: block; }
.pf.has-suffix .input { padding-right: 30px; text-align: right; }
.pf-suffix { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; pointer-events: none; }
.pf-was { font-size: 11.5px; color: #cdb96f; text-align: right; }
.pf.wide .pf-was { text-align: left; }
.pf.changed .input { border-color: rgba(245, 180, 25, 0.8); background: rgba(245, 180, 25, 0.09); box-shadow: 0 0 0 3px rgba(245, 180, 25, 0.1); }
.pf.invalid .input { border-color: var(--danger); background: rgba(255, 95, 126, 0.08); }
.pf.invalid .pf-was { color: #ffb3c1; }
.price-singles { display: grid; gap: 14px; }
.price-single { display: grid; grid-template-columns: minmax(0, 1fr) 110px; align-items: start; gap: 16px; }
.savebar { position: sticky; bottom: 16px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 12px 12px 20px; border-radius: 16px; border: 1px solid rgba(245, 180, 25, 0.45); background: rgba(20, 18, 30, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.9); animation: toast-in 200ms var(--ease); }
.savebar-text strong { color: #ffd77a; font-size: 16px; }
.savebar-error { color: #ffb3c1; }
.savebar-actions { display: flex; gap: 8px; margin-left: auto; }

.impact { display: grid; gap: 22px; }
.impact h3 { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; margin-bottom: 10px; }
.impact-stats { padding: 16px; border-radius: 14px; background: rgba(5, 6, 14, 0.5); border: 1px solid var(--line); }
.impact .table-wrap { border: 1px solid var(--line); border-radius: 12px; }
.impact-warn { padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(245, 180, 25, 0.4); background: rgba(245, 180, 25, 0.06); }
.impact-warn h3 { color: #ffd77a; margin-bottom: 4px; }
.impact-warn .icon { color: var(--warn); }
.diff-list { display: grid; gap: 6px; }
.diff-list li { display: flex; align-items: center; gap: 10px; }
.diff-list li > span:first-child { flex: 1; }
.diff-list .icon { color: var(--text-3); }
.move-list, .adjust-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 4px 24px; margin-top: 10px; }
.move-list li, .adjust-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; min-width: 0; }
.move-list .user, .adjust-list .user { flex: 1; }
.move-path { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); }

.history li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid rgba(150, 162, 255, 0.08); }
.history li:last-child { border-bottom: 0; }
.history li.reverted .history-tiers { opacity: 0.55; }
.history-main { display: grid; gap: 6px; min-width: 0; }
.history-when { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.history-tiers { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.history-tier { display: inline-flex; align-items: center; gap: 6px; }
.history-tier .icon { color: var(--text-3); }
.history-meta { font-size: 12.5px; color: var(--text-3); overflow-wrap: anywhere; }

/* ——— Serveurs ——— */
.wizard { display: grid; gap: 18px; border-color: rgba(139, 108, 255, 0.45); box-shadow: 0 30px 80px -40px rgba(139, 108, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.wizard .card-head { margin-bottom: 0; }
.stepper { display: flex; flex-wrap: wrap; gap: 8px 6px; counter-reset: none; }
.stepper li { display: inline-flex; align-items: center; gap: 9px; padding-right: 14px; color: var(--text-3); font-weight: 500; font-size: 13.5px; }
.stepper li:not(:last-child)::after { content: ""; width: 26px; height: 1px; margin-left: 5px; background: var(--line-2); }
.step-num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 12px; }
.stepper li.current { color: var(--text); }
.stepper li.current .step-num { border-color: transparent; background: var(--grad); color: #0a0716; font-weight: 700; }
.stepper li.done { color: var(--text-2); }
.stepper li.done .step-num { border-color: rgba(79, 220, 156, 0.5); color: var(--ok); }
.wizard-form { display: grid; gap: 16px; max-width: 640px; }
.check-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); font-weight: 500; font-family: var(--mono); font-size: 13px; }
.check-pill.ok { color: #9af0c8; border-color: rgba(79, 220, 156, 0.4); background: rgba(79, 220, 156, 0.08); }
.check-pill.accent { color: #cdc1ff; border-color: rgba(139, 108, 255, 0.45); background: rgba(139, 108, 255, 0.1); }
.check-pill.danger { color: #ffb3c1; border-color: rgba(255, 95, 126, 0.45); background: rgba(255, 95, 126, 0.08); }
.check-pill.muted { color: var(--text-3); }
.check-block { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(5, 6, 14, 0.45); }
.check-block h4 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.check-block ul { display: grid; gap: 5px; font-size: 13.5px; color: var(--text-2); }
.check-block li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.check-block.danger { border-color: rgba(255, 95, 126, 0.35); }
.check-block.danger h4 { color: #ffb3c1; }
.check-block.accent h4 { color: #cdc1ff; }
.check-block.warn { border-color: rgba(245, 180, 25, 0.35); }
.check-block.warn h4 { color: #ffd77a; }
.wizard-done { display: grid; gap: 12px; justify-items: start; max-width: 640px; }
.wizard-done h3 { font-size: 19px; }
.wizard-done p { color: var(--text-2); }
.wizard-done p strong { color: var(--text); }
.wizard-done .check-block, .wizard-done .form-actions { justify-self: stretch; }
.done-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(79, 220, 156, 0.14); color: var(--ok); border: 1px solid rgba(79, 220, 156, 0.4); }

/* ——— Adaptatif ——— */
@media (max-width: 1180px) {
  .grid.hero { grid-template-columns: minmax(0, 1fr); }
  .totals { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
  .totals .readout + .readout { padding-top: 0; border-top: 0; }
  .grid.todos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-grid { display: flex; flex-direction: column; align-items: stretch; }
  .profile-main { display: contents; }
  .profile-main > .fortune { order: -2; }
  .profile-aside { order: -1; }
  .grid.price-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-102%); transition: transform 220ms var(--ease); width: min(280px, 84vw); background: #0a0b17; box-shadow: 30px 0 80px rgba(0, 0, 0, 0.6); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(4, 5, 12, 0.66); }
  body.nav-open { overflow: hidden; }
  .frame { margin-left: 0; }
  .icon-btn.burger { display: inline-grid; width: 40px; height: 40px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
  .topbar { padding: 10px 16px; }
  .search { max-width: none; }
  .search kbd { display: none; }
  .page { padding: 8px 16px 96px; gap: 16px; }
  .page-head h1 { font-size: 25px; }
}

@media (max-width: 720px) {
  .card { padding: 16px; }
  .card.flush-body > .card-head { padding: 0 16px; }
  .grid.cards { grid-template-columns: minmax(0, 1fr); }
  .grid.todos { grid-template-columns: minmax(0, 1fr); }
  .totals { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .totals .readout { grid-template-columns: 1fr auto; align-items: baseline; }
  .totals .readout-hint { display: none; }
  .totals .readout:first-child .readout-value { font-size: 26px; }
  .stats.three { gap: 10px; }
  .readout-value { font-size: 17px; }
  .readout.big .readout-value { font-size: 36px; }
  .hero-totals { grid-template-columns: 1fr 1fr; gap: 12px 20px; }
  .hero-totals .readout.big { grid-column: 1 / -1; }
  .fortune-top { grid-template-columns: minmax(0, 1fr); }
  .filters .field.inline { flex: 1 1 150px; min-width: 0; }
  .filters .field.grow { flex-basis: 100%; }
  .filters .chip { height: 38px; }
.filters-sep { display: none; }
  .toasts { right: 16px; bottom: 16px; }
  .sub-bar { grid-template-columns: 92px minmax(0, 1fr) 34px; gap: 10px; }
  .access-rows { grid-template-columns: minmax(0, 1fr); }
  .access-rows .price-row:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid rgba(150, 162, 255, 0.07); }
  .tiers-rows .price-row { grid-template-columns: 10px minmax(0, 1fr) 104px; gap: 8px; }
  .rental-rows .price-row { grid-template-columns: minmax(0, 1fr) 84px 84px; gap: 8px; }
  .savebar { bottom: 10px; padding: 12px; }
  .savebar-actions { width: 100%; }
  .savebar-actions .btn { flex: 1; }
  .history li { flex-wrap: wrap; padding: 14px 16px; }
  .journal-item summary { padding: 11px 16px; gap: 10px; align-items: flex-start; }
  .journal-dot { margin-top: 7px; }
  .journal-title, .journal-meta { white-space: normal; }
  .journal-sum { display: block; margin-left: 0; }
  .journal-side { flex-direction: column; align-items: flex-end; gap: 4px; }
  .journal-side .badge { display: none; }
  .journal-time { min-width: 0; }
  .journal-details { padding: 0 16px 14px; }
  .details-list { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .details-list dd { margin-bottom: 8px; }
  .modal-body { padding: 16px 16px 0; }
  .modal-actions { margin: 16px -16px 0; padding: 12px 16px; }
  .move-list, .adjust-list { grid-template-columns: minmax(0, 1fr); }
  .stepper li:not(:last-child)::after { display: none; }
  .kv-row { align-items: flex-start; }

  /* Tableaux → cartes */
  .table.stackable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table.stackable, .table.stackable tbody { display: block; }
  .table.stackable tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table.stackable tr:last-child { border-bottom: 0; }
  .table.stackable td { display: grid; gap: 2px; padding: 0 !important; border: 0; text-align: left !important; min-width: 0; justify-items: start; white-space: normal; }
  .table.stackable td[data-label]::before { content: attr(data-label); font: 400 12px var(--sans); color: var(--text-3); letter-spacing: 0; }
  .table.stackable td.cell-user, .table.stackable td.cell-actions { grid-column: 1 / -1; }
  .table.stackable .loan { justify-items: start; }
  .table.stackable .row-actions { display: flex; width: 100%; }
  .table.stackable .row-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .skel { animation: none; }
}

/* ——— Suivi des gérants ——— */
.staff-totals { display: grid; grid-template-columns: auto auto auto auto 1fr; align-items: end; gap: 16px 56px; }
.podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.podium-card { position: relative; display: grid; gap: 16px; padding: 20px; border-radius: var(--r-card); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(150, 160, 255, 0.07), rgba(150, 160, 255, 0.028)); overflow: hidden; }
.podium-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); opacity: 0.35; }
.podium-card.rank-1 { border-color: rgba(139, 108, 255, 0.5); box-shadow: 0 0 44px rgba(139, 108, 255, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.podium-card.rank-1::before { opacity: 1; }
.podium-rank { position: absolute; top: 14px; right: 16px; font-size: 13px; color: var(--text-3); }
.podium-card.rank-1 .podium-rank { color: #cfc4ff; }
.podium-who { display: flex; align-items: center; gap: 12px; min-width: 0; padding-right: 34px; }
.podium-name { display: block; font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium-score { display: flex; align-items: baseline; gap: 8px; }
.podium-score-value { font-size: 34px; line-height: 1; letter-spacing: -0.03em; background: linear-gradient(100deg, #fff 30%, #cfc4ff 75%, #9fe9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.podium-score-label { font-size: 12.5px; color: var(--text-3); }
.podium-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.podium-facts dt { font-size: 12px; color: var(--text-3); }
.podium-facts dd { margin: 2px 0 0; font-size: 15px; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 28px; min-width: 96px; }
.spark i { flex: 1 1 0; min-width: 2px; height: max(2px, calc(var(--v) * 100%)); border-radius: 2px; background: linear-gradient(180deg, var(--cyan), var(--violet)); opacity: 0.9; }
.spark i.zero { background: var(--surface-3); opacity: 1; }
.podium-card .spark { height: 36px; }
.meter { display: block; height: 5px; margin-top: 6px; min-width: 70px; border-radius: 3px; background: rgba(150, 160, 255, 0.08); }
.meter i { display: block; height: 100%; width: max(3px, calc(var(--v) * 100%)); border-radius: 3px; background: var(--grad); }
.staff-rank { width: 30px; flex: none; color: var(--text-3); font-size: 12.5px; }
.staff-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 30px; }
.staff-top { display: grid; gap: 2px; font-size: 13px; color: var(--text-2); }
.staff-table tr.idle td { opacity: 0.62; }
.staff-table tr.idle td.cell-user { opacity: 1; }
.danger-text { color: #ffb3c1; }
@media (max-width: 900px) {
  .staff-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
  .staff-badges { margin-left: 0; }
}

/* ——— Gérants : classements et points ——— */
.staff-totals { grid-template-columns: auto auto auto auto auto 1fr; }
.block-sub { margin: 6px 0 14px; max-width: 86ch; font-size: 13.5px; }
.points-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 16px; font-size: 13px; color: var(--text-2); }
.points-legend-item { display: inline-flex; align-items: center; gap: 7px; }
.points-legend-item i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 55%, transparent); }
.points-bar { display: flex; gap: 2px; height: 8px; margin-top: 7px; width: max(10px, calc(var(--w) * 100%)); min-width: 10px; }
.points-bar i { min-width: 3px; border-radius: 2px; background: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 40%, transparent); }
.points-bar:empty { background: var(--surface-3); border-radius: 2px; width: 10px; }
.podium-card .points-bar { height: 10px; margin-top: 0; }
.staff-table td[data-label="Points"] { min-width: 150px; }
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.board { position: relative; overflow: hidden; }
.board::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--c); opacity: 0.75; }
.board .card-head { flex-wrap: wrap; }
.board-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); box-shadow: 0 0 12px var(--c); }
.board-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.board-row { display: grid; grid-template-columns: 30px 28px minmax(0, 1.1fr) minmax(40px, 1fr) auto 42px; align-items: center; gap: 10px; padding: 7px 8px; margin: 0 -8px; border-radius: 9px; }
.board-row.first { background: color-mix(in srgb, var(--c) 9%, transparent); }
.board-place { color: var(--text-3); font-size: 12.5px; }
.board-row.first .board-place { color: var(--c); }
.board-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-track { height: 6px; border-radius: 3px; background: rgba(150, 160, 255, 0.07); }
.board-track i { display: block; height: 100%; width: max(4px, calc(var(--v) * 100%)); border-radius: 3px; background: var(--c); }
.board-value { font-size: 13.5px; white-space: nowrap; }
.board-points { text-align: right; font-size: 12.5px; color: var(--c); }
.board-empty { margin: 0; }
@media (max-width: 900px) {
  .staff-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-row { grid-template-columns: 30px 28px minmax(0, 1fr) auto 42px; }
  .board-track { display: none; }
}

.staff-top-item { white-space: nowrap; }
.staff-actions { display: flex; align-items: center; gap: 12px; }
.staff-actions .spark { height: 22px; min-width: 90px; max-width: 130px; }
.board-row { grid-template-columns: 30px 28px minmax(0, 1.5fr) minmax(30px, 0.8fr) auto 42px; }
@media (max-width: 900px) { .board-row { grid-template-columns: 30px 28px minmax(0, 1fr) auto 42px; } }
.staff-table th, .staff-table td { padding-left: 10px; padding-right: 10px; }
.staff-table td[data-label="Points"] { min-width: 110px; }
.staff-table .staff-badges { max-width: 240px; }
@media (min-width: 901px) and (max-width: 1400px) { .staff-table th:nth-child(6), .staff-table td:nth-child(6) { display: none; } }

/* Mes stats (gérant) : graphique d'activité en pleine largeur, blocs de chiffres sans cadre propre */
.spark.wide { height: 64px; width: 100%; gap: 3px; }
.staff-totals.plain { grid-template-columns: repeat(auto-fit, minmax(150px, max-content)); gap: 16px 48px; }