:root {
  --bg: #0f0c0e;
  --bg-2: #140f12;
  --panel: #1a1418;
  --panel-2: #221a1f;
  --line: #2f252b;
  --line-2: #3d3037;
  --text: #ece6da;
  --muted: #9a93a3;
  --faint: #6c6574;
  --accent: #e8325f;
  --accent-2: #ff8aa3;
  --accent-ink: #fff;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 32%, transparent);
  --hover: #2a2026;
  --pop: #251c22;
  --label: #d8d1c4;
  --knob: #cfc8bb;
  --console: #0b090a;
  --console-ink: #d6d0c4;
  --shadow: var(--shadow);
  --glow-2: rgba(125, 158, 240, .05);
  --fs: 15px;
  --gap-scale: 1;
  --danger: #e36a5f;
  --danger-soft: rgba(227, 106, 95, .12);
  --ok: #6cc08b;
  --ok-soft: rgba(108, 192, 139, .12);
  --info: #7d9ef0;
  --radius: 10px;
  --serif: 'Sora', system-ui, sans-serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: dark;
}

/* ---------- Apparence : thème clair ---------- */
:root[data-theme="light"] {
  --bg: #f6f3ef;
  --bg-2: #fbf9f6;
  --panel: #ffffff;
  --panel-2: #f1ece6;
  --line: #e6dfd7;
  --line-2: #d6cdc3;
  --text: #221c20;
  --muted: #625a64;
  --faint: #8d8590;
  --accent-2: color-mix(in srgb, var(--accent) 78%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --danger: #c0392b;
  --danger-soft: rgba(192, 57, 43, .09);
  --ok: #2e8b57;
  --ok-soft: rgba(46, 139, 87, .1);
  --info: #3d63c9;
  --hover: #efe9e2;
  --pop: #ffffff;
  --label: #3a3238;
  --knob: #ffffff;
  --console: #1b1619;
  --console-ink: #e6e0d6;
  --shadow: rgba(60, 40, 50, .16);
  --glow-2: rgba(61, 99, 201, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    --bg: #f6f3ef; --bg-2: #fbf9f6; --panel: #ffffff; --panel-2: #f1ece6; --line: #e6dfd7; --line-2: #d6cdc3;
    --text: #221c20; --muted: #625a64; --faint: #8d8590;
    --accent-2: color-mix(in srgb, var(--accent) 78%, #000); --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
    --danger: #c0392b; --danger-soft: rgba(192, 57, 43, .09); --ok: #2e8b57; --ok-soft: rgba(46, 139, 87, .1); --info: #3d63c9;
    --hover: #efe9e2; --pop: #ffffff; --label: #3a3238; --knob: #ffffff; --console: #1b1619; --console-ink: #e6e0d6;
    --shadow: rgba(60, 40, 50, .16); --glow-2: rgba(61, 99, 201, .05);
    color-scheme: light;
  }
}
/* thème « nuit » : noir profond (OLED) */
:root[data-theme="oled"] {
  --bg: #000; --bg-2: #07070a; --panel: #0d0d11; --panel-2: #15151b; --line: #1f1f27; --line-2: #2b2b35;
  --hover: #1a1a22; --pop: #111117; --console: #000;
}
/* couleurs d'accent */
:root[data-accent="bleu"]   { --accent: #4f7cff; }
:root[data-accent="violet"] { --accent: #9a5cff; }
:root[data-accent="vert"]   { --accent: #27b36a; }
:root[data-accent="orange"] { --accent: #f07a24; }
:root[data-accent="cyan"]   { --accent: #12a8c4; }
:root[data-accent="or"]     { --accent: #d2a12a; --accent-ink: #1a1408; }
:root[data-accent]:not([data-accent="rose"]) { --accent-2: color-mix(in srgb, var(--accent) 65%, #fff); }
:root[data-theme="light"][data-accent]:not([data-accent="rose"]) { --accent-2: color-mix(in srgb, var(--accent) 78%, #000); }
/* taille du texte et densité */
:root[data-font="s"] { --fs: 14px; }
:root[data-font="l"] { --fs: 16.5px; }
:root[data-density="compact"] .card { padding: 14px 16px; }
:root[data-density="compact"] .field { margin-bottom: 10px; }
:root[data-density="compact"] .page { padding-top: 18px; }
:root[data-density="compact"] .nav a { padding-top: 5px; padding-bottom: 5px; }
:root[data-motion="off"] *, :root[data-motion="off"] *::before, :root[data-motion="off"] *::after { transition: none !important; animation: none !important; }
:root[data-glow="off"] body { background: var(--bg); }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--glow-2), transparent 60%),
    var(--bg);
  color: var(--text);
  font: var(--fs)/1.5 var(--sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; margin: 0; }
code, .mono { font-family: var(--mono); font-size: .88em; }

/* ── Sigil (logo) ───────────────────────────── */
.sigil { width: 44px; height: 44px; flex: none; display: block; filter: drop-shadow(0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent)); }
.boot { display: grid; place-items: center; height: 100vh; }
.boot .sigil { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; transform: scale(.94); } }

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--panel-2); cursor: pointer; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--faint); background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--danger); border-color: rgba(227, 106, 95, .35); background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ── Login ──────────────────────────────────── */
.login {
  min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center;
}
.login-card { max-width: 420px; }
.login .sigil { width: 84px; height: 84px; margin: 0 auto 18px; }
.login h1 { font-size: 40px; margin-bottom: 8px; }
.login p { color: var(--muted); margin: 0 0 28px; }
.login .btn { padding: 12px 22px; font-size: 16px; }
.tagline { color: var(--faint); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; margin-top: 36px; }

/* ── Top bar ────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 24px;
  border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.topbar .sigil { width: 30px; height: 30px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.topbar .spacer { flex: 1; }
.user { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); object-fit: cover; flex: none; }

/* ── Guild list ─────────────────────────────── */
.page { max-width: 1080px; margin: 0 auto; padding: 36px 24px 80px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 28px; }
.page-head p { color: var(--muted); margin: 6px 0 0; }
.guilds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.guild-card {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  transition: border-color .15s, transform .15s;
}
.guild-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.guild-card.off { opacity: .7; }
.guild-card.off:hover { border-color: var(--line-2); }
.gicon {
  width: 48px; height: 48px; border-radius: 14px; flex: none; display: grid; place-items: center;
  background: var(--panel-2); font-family: var(--serif); font-weight: 700; color: var(--accent); overflow: hidden;
}
.gicon img { width: 100%; height: 100%; object-fit: cover; }
.guild-card .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-card .sub { font-size: 13px; color: var(--muted); }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* ── Guild layout ───────────────────────────── */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 61px); }
.side {
  border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 61px;
  height: calc(100vh - 61px); overflow-y: auto; background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}
.side-guild { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.side-guild .gicon { width: 40px; height: 40px; border-radius: 12px; }
.side-guild .name { font-weight: 600; line-height: 1.2; }
.side-guild a { font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: var(--muted);
  font-weight: 500; font-size: 14px;
}
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.active { color: var(--text); background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.nav .ic { width: 18px; text-align: center; color: var(--accent); font-size: 15px; }
.nav .dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.nav .dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }

.main { padding: 28px 32px 120px; max-width: 1120px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: 26px; }
.section-head p { color: var(--muted); margin: 4px 0 0; max-width: 620px; }

/* ── Cards / groups ─────────────────────────── */
.group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.group-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.group-head h3 { font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.group-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.group-head .grow { flex: 1; }
.group-body { padding: 18px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.group.disabled .group-body { opacity: .45; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label, .field .lbl { font-size: 13px; font-weight: 600; color: var(--label); }
.field .help { font-size: 12px; color: var(--faint); }
.field.row { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; }
.field.row .txt { display: flex; flex-direction: column; gap: 2px; }

input[type=text], input[type=search], input[type=number], input[type=url], input[type=password], select, textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
optgroup { color: var(--muted); }
.suffix { display: flex; align-items: center; gap: 8px; }
.suffix span { color: var(--muted); font-size: 13px; white-space: nowrap; }

.color { display: flex; gap: 8px; }
.color input[type=color] { width: 44px; height: 40px; padding: 3px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; }
.color input[type=text] { font-family: var(--mono); }

/* switch */
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--knob); transition: transform .15s, background .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--accent-ink); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

/* chips (multi-select) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; min-height: 42px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 9px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 13px; }
.chip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: 15px; line-height: 1; }
.chip button:hover { color: var(--danger); }
.chips select { flex: 1; min-width: 150px; border: 0; background-color: transparent; padding: 4px 30px 4px 6px; box-shadow: none; }

/* list editors */
.items { display: flex; flex-direction: column; gap: 10px; }
.item { border: 1px solid var(--line-2); border-radius: 8px; padding: 14px; background: var(--bg-2); display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.item .wide { grid-column: 1 / -1; }
.item textarea { min-height: 60px; }
.item .field > label { font-size: 12px; font-weight: 500; color: var(--muted); }
.threshold { grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) auto; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.stat .v { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1.2; margin-top: 4px; }
.stat .s { color: var(--faint); font-size: 12px; }
.modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 18px 20px; }
.stats + .stats { margin-top: -4px; }
.module { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); }
.module a { color: var(--text); font-weight: 500; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.module .ic { color: var(--accent); width: 16px; text-align: center; }
.module a:hover { color: var(--accent); }

.raid { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.raid .state { font-weight: 600; }
.raid.on { background: var(--danger-soft); }
.raid.on .state { color: var(--danger); }
.raid .grow { flex: 1; color: var(--muted); font-size: 14px; }

/* preview (welcome) */
.preview { background: #313338; border-radius: 8px; padding: 14px 16px; display: flex; gap: 14px; font-family: 'gg sans', var(--sans); color: #dbdee1; font-size: 14.5px; }
.preview .pav { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); flex: none; }
.preview .pname { font-weight: 600; color: #f2f3f5; }
.preview .pname small { background: #5865f2; color: #fff; font-size: 10px; padding: 1px 4px; border-radius: 3px; margin-left: 4px; font-weight: 600; vertical-align: 1px; }
.preview .pem { margin-top: 6px; border-left: 4px solid var(--accent); background: #2b2d31; border-radius: 4px; padding: 10px 14px; max-width: 440px; display: grid; grid-template-columns: 1fr 64px; gap: 10px; }
.preview .pem b.t { display: block; color: #f2f3f5; margin-bottom: 4px; }
.preview .pthumb { width: 64px; height: 64px; border-radius: 50%; background: #5c5e66; }
.preview .pimg { grid-column: 1 / -1; width: 100%; max-height: 200px; object-fit: cover; border-radius: 4px; }
.preview .mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.vars { display: flex; flex-wrap: wrap; gap: 6px; }
.vars code { background: var(--bg-2); border: 1px solid var(--line-2); padding: 2px 6px; border-radius: 5px; cursor: pointer; color: var(--accent-2); }
.vars code:hover { border-color: var(--accent); }

/* cases table */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input { max-width: 300px; }
.toolbar select { max-width: 200px; }
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td .sub { color: var(--faint); font-size: 12px; font-family: var(--mono); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--panel-2); border: 1px solid var(--line-2); }
.badge.warn { color: var(--accent-2); background: var(--accent-soft); border-color: var(--accent-line); }
.badge.mute, .badge.kick { color: #f0a07a; background: rgba(240, 160, 122, .1); border-color: rgba(240, 160, 122, .3); }
.badge.ban { color: var(--danger); background: var(--danger-soft); border-color: rgba(227, 106, 95, .3); }
.badge.unmute, .badge.unban { color: var(--ok); background: var(--ok-soft); border-color: rgba(108, 192, 139, .3); }
.reason { max-width: 340px; overflow-wrap: anywhere; }

/* save bar */
.savebar {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%); z-index: 30;
  display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 20px; border-radius: 12px;
  background: var(--pop); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.2); width: min(560px, calc(100vw - 32px));
}
.savebar.show { transform: translate(-50%, 0); }
.savebar span { flex: 1; font-weight: 500; }

/* ── Notifications ───────────────────────────── */
#toast { position: fixed; top: 76px; right: 20px; z-index: 60; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; max-width: calc(100vw - 32px); }
.toast {
  pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; min-width: 240px; max-width: 420px;
  padding: 12px 12px 14px 14px; border-radius: 12px; background: var(--pop); border: 1px solid var(--line-2); box-shadow: 0 14px 34px var(--shadow);
  animation: toast-in .42s cubic-bezier(.2, 1.3, .4, 1) both;
}
.toast.out { animation: toast-out .26s ease-in forwards; }
.toast-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: var(--ok); animation: toast-pop .5s .08s cubic-bezier(.2, 1.6, .4, 1) both; }
.toast.err .toast-ic { background: var(--danger); animation-name: toast-pop, toast-shake; animation-duration: .5s, .45s; animation-delay: .08s, .3s; }
.toast.warn .toast-ic { background: #e8a33c; }
.toast.info .toast-ic { background: var(--info); font-family: var(--serif); }
.toast.err { border-color: color-mix(in srgb, var(--danger) 55%, var(--line-2)); }
.toast.ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line-2)); }
.toast-msg { flex: 1; font-size: 14px; line-height: 1.4; }
.toast-x { flex: none; border: 0; background: none; color: var(--faint); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.toast-x:hover { color: var(--text); background: var(--hover); }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--ok); transform-origin: left; animation: toast-bar linear forwards; opacity: .8; }
.toast.err .toast-bar { background: var(--danger); }
.toast.warn .toast-bar { background: #e8a33c; }
.toast.info .toast-bar { background: var(--info); }
.toast.paused .toast-bar { animation-play-state: paused; }
@keyframes toast-in { from { opacity: 0; transform: translateX(60px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px) scale(.96); margin-top: -58px; } }
@keyframes toast-pop { from { transform: scale(0) rotate(-45deg); } to { transform: none; } }
@keyframes toast-shake { 0%, 100% { translate: 0; } 25% { translate: -3px; } 50% { translate: 3px; } 75% { translate: -2px; } }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 520px) { #toast { left: 16px; right: 16px; top: 66px; align-items: stretch; } .toast { max-width: none; } }

/* ── Petites animations ─────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#main > * { animation: rise .35s ease-out both; }
#main > *:nth-child(2) { animation-delay: .04s; }
#main > *:nth-child(3) { animation-delay: .08s; }
#main > *:nth-child(4) { animation-delay: .12s; }
#main > *:nth-child(n+5) { animation-delay: .16s; }
.stats .stat { animation: rise .4s ease-out both; transition: transform .15s, border-color .15s; }
.stats .stat:nth-child(2) { animation-delay: .05s; } .stats .stat:nth-child(3) { animation-delay: .1s; } .stats .stat:nth-child(4) { animation-delay: .15s; }
.stats .stat:nth-child(n+5) { animation-delay: .2s; }
.stats .stat:hover { transform: translateY(-2px); border-color: var(--line-2); }
.btn:active, button.chip:active { transform: scale(.96); }
.btn { transition: background .15s, border-color .15s, transform .08s; }
.switch span::after { transition: transform .2s cubic-bezier(.3, 1.5, .5, 1), background .15s; }
.nav a { transition: background .15s, color .15s, padding-left .15s; }
.nav a:hover { padding-left: 14px; }
@media (prefers-reduced-motion: reduce) { #main > *, .stats .stat, .toast, .toast-ic { animation: none !important; } }
:root[data-motion="off"] .toast-bar { animation: toast-bar linear forwards !important; }

.note { padding: 12px 16px; border-radius: 8px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-2); font-size: 14px; margin-bottom: 18px; }
.inline { display: flex; gap: 10px; align-items: center; }
.inline select { flex: 1; }


/* ── Navigation groupée ─────────────────────── */
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); font-weight: 600; padding: 14px 10px 6px; }
.nav-title:first-child { padding-top: 2px; }

/* ── Éditeurs de listes ─────────────────────── */
.item.role-item { grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr) auto; }
.item.reward-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.item.question-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; background: var(--panel); }
.item.mode-item { grid-template-columns: 64px 70px minmax(0, 1fr) minmax(0, 170px) auto; }
.item.embed-field { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto auto; margin-bottom: 10px; }
.nested { padding: 0 !important; }
.nested .items { gap: 8px; }
.q-toggles { display: flex; flex-direction: column; gap: 6px; }
.mini-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.mini-toggle .switch { width: 34px; height: 20px; }
.mini-toggle .switch span::after { width: 14px; height: 14px; }
.mini-toggle .switch input:checked + span::after { transform: translateX(14px); }
.inline-toggle { display: flex; align-items: center; gap: 10px; }
.panel-card { background: var(--bg-2); }
.panel-card .group-head { background: var(--panel); }
.gif-thumb { width: 64px; height: 42px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); display: grid; place-items: center; overflow: hidden; color: var(--faint); font-size: 11px; align-self: end; }
.gif-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cmds { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.cmds code { background: var(--bg-2); border: 1px solid var(--line-2); padding: 3px 8px; border-radius: 6px; color: var(--accent-2); }

/* ── Tableaux & listes de données ───────────── */
.table-wrap.flat { border: 0; border-radius: 0; background: transparent; }
.stats.inner { padding: 18px 20px 4px; margin: 0; }
.stats.inner .stat { background: var(--bg-2); }
.stats.inner .v { font-size: 24px; }
.person { display: inline-flex; align-items: center; gap: 8px; }
.person img, .person i { width: 24px; height: 24px; border-radius: 50%; background: var(--panel-2); flex: none; }
.progress { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; width: 140px; margin-top: 6px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; }
.ping-result { display: flex; align-items: center; min-height: 38px; flex-wrap: wrap; }

.games { display: flex; flex-direction: column; }
.game { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.game:last-child { border-bottom: 0; }
.game-head { display: flex; align-items: flex-start; gap: 12px; }
.game-head .grow { flex: 1; min-width: 0; }
.game-title a { color: var(--text); font-weight: 600; font-size: 15px; }
.game-title a:hover { color: var(--accent-2); }
.game .sub { color: var(--faint); font-size: 12.5px; }
.game-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.regs summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.regs ol { margin: 8px 0 0; padding-left: 22px; columns: 2; column-gap: 24px; font-size: 13.5px; }
.regs li { margin-bottom: 3px; break-inside: avoid; }

/* ── Graphiques & statistiques ─────────────── */
.period { width: auto; min-width: 190px; }
.chart-box { padding: 16px 20px 14px; }
.chart { margin: 0; }
.chart .legend { display: flex; gap: 16px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.chart .legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.plot { position: relative; margin-left: 46px; }
.gl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.gl span { position: absolute; right: calc(100% + 8px); top: -8px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cols { position: absolute; inset: 0; display: flex; }
.col { flex: 1; position: relative; display: flex; align-items: flex-end; justify-content: center; cursor: default; outline: none; }
.col:hover, .col:focus-visible { background: color-mix(in srgb, var(--text) 4%, transparent); }
.bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; width: 72%; max-width: 26px; }
.bars i { flex: 1; border-radius: 4px 4px 0 0; min-width: 2px; transition: filter .15s; }
.col:hover .bars i { filter: brightness(1.2); }
.line-svg, .line-svg svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.col .dot { position: absolute; left: 50%; width: 9px; height: 9px; margin: 0 0 -4.5px -4.5px; border-radius: 50%; background: var(--panel); border: 2px solid; opacity: 0; transition: opacity .1s; }
.col:hover .dot, .col:focus-visible .dot { opacity: 1; }
.chart-tip { position: absolute; top: 4px; transform: translateX(-50%); background: var(--pop); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; pointer-events: none; opacity: 0; transition: opacity .1s; white-space: nowrap; z-index: 2; box-shadow: 0 8px 24px var(--shadow); }
.chart-tip.show { opacity: 1; }
.chart-tip b { display: block; margin-bottom: 3px; color: var(--muted); font-weight: 500; }
.chart-tip div { display: flex; align-items: center; gap: 6px; }
.xl { display: flex; margin: 6px 0 0 46px; }
.xl span { flex: 1; text-align: center; font-size: 11px; color: var(--faint); white-space: nowrap; overflow: visible; }
.chart-table { margin-top: 10px; }
.chart-table summary { font-size: 12.5px; color: var(--faint); cursor: pointer; }
.chart-table table { font-size: 13px; }
.chart-table td, .chart-table th { padding: 6px 10px; }
.chart-table .table-wrap { max-height: 260px; overflow-y: auto; }
.two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.three-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.two-cols > .group, .three-cols > .group { margin-bottom: 18px; }
td.rank { width: 36px; color: var(--faint); }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item.counter-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) 110px auto; }
.create-counters { border-top: 1px solid var(--line); }
.picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.pick { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); font-size: 13px; cursor: pointer; }
.pick input { accent-color: var(--accent); }
.game-win { font-size: 13.5px; color: var(--accent-2); }
.game-prep { font-size: 13px; color: var(--ok); }
.game-prep.err { color: var(--danger); }

@media (max-width: 1000px) {
  .three-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .two-cols { grid-template-columns: 1fr; }
  .item.counter-item { grid-template-columns: 1fr 1fr; }
  .bars { width: 86%; }
}

/* ── Serveur Minecraft ───────────────────────── */
.env { display: flex; flex-direction: column; gap: 6px; }
.env .lbl { font-size: 13px; font-weight: 600; color: var(--label); }
.env-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.env-item span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.env-item.ok span { background: var(--ok-soft); color: var(--ok); }
.env-item.ko span { background: var(--accent-soft); color: var(--accent-2); }
.srv-state { display: flex; align-items: center; gap: 8px; }
.srv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.console { background: var(--console); border: 1px solid var(--line-2); border-radius: 8px; padding: 12px 14px; margin: 0; height: 280px; overflow: auto; font: 12.5px/1.5 var(--mono); color: var(--console-ink); white-space: pre-wrap; word-break: break-word; }
.console-input { margin-top: 8px; }
.console-input .prompt { font-family: var(--mono); color: var(--accent); font-weight: 600; }
.console-input input { font-family: var(--mono); }
td.row-actions { white-space: nowrap; text-align: right; }
td.row-actions .btn + .btn { margin-left: 6px; }

/* ── Modes de jeu ───────────────────────────── */
.link-card { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--text); margin-bottom: 18px; transition: border-color .15s; }
.link-card:hover { border-color: var(--accent); }
.link-card .ic { font-size: 22px; }
.link-card .grow { flex: 1; }
.mode-list { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.mode-list > details { width: 100%; margin: 0; }
.mode-card > summary { cursor: pointer; list-style: none; border-bottom: 0; }
.mode-card > summary::-webkit-details-marker { display: none; }
.mode-card[open] > summary { border-bottom: 1px solid var(--line); }
.mode-card > summary .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mode-card > summary h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode-card.off > summary .grow { opacity: .5; }
.mode-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(255,255,255,.05); }
.mode-actions { display: flex; gap: 4px; }
.mode-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 0; }
.mode-body > .group-body { border-right: 1px solid var(--line); align-content: start; }
.mode-card > summary .help { font-size: 13px; color: var(--muted); }
.mode-preview { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.mode-preview .lbl { font-size: 13px; font-weight: 600; color: var(--label); }
.field-pair { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; }
.preview .pfield { margin-top: 8px; font-size: 14px; }
.preview .pfield code { background: #1e1f22; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.preview .pfield code.block { display: block; padding: 6px 8px; margin-top: 2px; }
.preview .q { color: #4e5058; }
.preview a { color: #00a8fc; }
.preview .pimg-empty { margin-top: 10px; border: 1px dashed #4e5058; border-radius: 4px; padding: 18px; text-align: center; font-size: 12.5px; color: #949ba4; }
.pbuttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pbuttons .pb { background: #4e5058; color: #fff; font-size: 13px; padding: 5px 10px; border-radius: 4px; }
.pbuttons .pb.ok { background: #248046; }

@media (max-width: 1000px) {
  .mode-body { grid-template-columns: 1fr; }
  .mode-body > .group-body { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .mode-actions .btn[title="Dupliquer"] { display: none; }
}

/* ── Créateur d'embed ───────────────────────── */
.embed-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 20px; align-items: start; }
.embed-side { position: sticky; top: 85px; }
.embed-side .lbl { font-size: 13px; font-weight: 600; color: var(--label); }
.preview .pauthor { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #f2f3f5; margin-bottom: 6px; }
.preview .pauthor img, .preview .pfooter img { width: 20px; height: 20px; border-radius: 50%; }
.preview .pfields { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.preview .pfields > div { flex: 1 1 100%; font-size: 14px; }
.preview .pfields > div.inline { flex: 1 1 28%; display: block; }
.preview .pfooter { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #b5bac1; margin-top: 8px; }
.preview img.pthumb { width: 80px; height: 80px; border-radius: 4px; object-fit: cover; }
.preview img.pav { object-fit: cover; }

@media (max-width: 1100px) {
  .embed-layout { grid-template-columns: 1fr; }
  .embed-side { position: static; order: -1; }
}
@media (max-width: 900px) {
  .nav-title { display: none; }
}
@media (max-width: 640px) {
  .item.role-item, .item.reward-item, .item.question-item, .item.mode-item, .item.embed-field { grid-template-columns: 1fr 1fr; }
  .regs ol { columns: 1; }
  .stats.inner { grid-template-columns: 1fr 1fr; }
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .side-guild { padding-bottom: 12px; margin-bottom: 10px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .nav a { white-space: nowrap; }
  .nav a.active { box-shadow: inset 0 -2px 0 var(--accent); }
  .nav .dot { display: none; }
  .main { padding: 22px 16px 120px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modules { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .group-body { grid-template-columns: 1fr; padding: 16px; }
  .group-head { padding: 14px 16px; }
  .topbar { padding: 12px 16px; }
  .user .uname { display: none; }
  .page { padding: 24px 16px 80px; }
  .item, .threshold { grid-template-columns: 1fr 1fr; }
  .item > :nth-child(1) { grid-column: auto; }
  .modules { grid-template-columns: 1fr; }
  .raid { flex-wrap: wrap; }
  .savebar { padding-left: 14px; gap: 6px; }
  .savebar span { font-size: 13px; }
  .preview .pem { grid-template-columns: 1fr; }
  .preview .pthumb { display: none; }
}

/* Historique, whitelist, plugin */
.srv-actions .grow { flex: 1; }
tr.row-err td { background: var(--danger-soft); }
a.btn { color: var(--text); text-decoration: none; }
a.btn:hover { text-decoration: none; }
.token-row { flex-wrap: wrap; }
.token-row input { flex: 1 1 220px; width: auto; font-family: var(--mono); }
.preview .pbtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.preview .pbtns span { background: #4e5058; color: #fff; border-radius: 4px; padding: 5px 12px; font-size: 13.5px; font-weight: 500; }
.card-preview { width: 100%; max-width: 560px; aspect-ratio: 1024 / 360; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); object-fit: cover; }
.card-preview:not([src]) { visibility: hidden; height: 0; border: 0; }
.reset-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.reset-row:last-child { border-bottom: 0; }
.reset-row select { width: auto; min-width: 200px; flex: 0 1 260px; }
.comments { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.comments li { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.stars { color: #e8b84a; letter-spacing: 1px; }
dialog.modal { background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; padding: 22px; max-width: 520px; width: calc(100% - 32px); }
dialog.modal::backdrop { background: rgba(0, 0, 0, .6); }
dialog.modal h3 { margin: 0 0 6px; }
label.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
label.check input { margin-top: 3px; accent-color: var(--accent); }
label.check span { display: flex; flex-direction: column; gap: 2px; }
label.check small { color: var(--muted); }
.shop-item { grid-template-columns: 70px 1.3fr 110px 120px 1.3fr 140px auto; }
.shop-item .wide { grid-column: 1 / -2; }
@media (max-width: 900px) { .shop-item { grid-template-columns: 1fr 1fr; } .shop-item .wide { grid-column: 1 / -1; } }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.badge-card { display: flex; gap: 10px; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.badge-card .be { font-size: 22px; }
.badge-card > div:nth-child(2) { flex: 1; min-width: 0; }
.badge-card .bm { text-align: right; color: var(--accent); font-weight: 600; font-size: 13px; display: flex; flex-direction: column; }
.badge-card .bm small { color: var(--muted); font-weight: 400; }
details.sheet { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--bg-2); }
details.sheet > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
details.sheet > summary::-webkit-details-marker { display: none; }
details.sheet .se { font-size: 18px; width: 24px; text-align: center; }
details.sheet .grow { flex: 1; }
details.sheet .group-body { border-top: 1px solid var(--line); }

/* Onglets (plugin : serveur UHC / lobby) */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 9px; }
.tab { border: 0; background: none; color: var(--muted); padding: 6px 14px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 14px; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
/* Puces à cocher (modes des parties à la demande) */
button.chip { cursor: pointer; padding: 5px 11px; color: var(--muted); font: inherit; font-size: 13px; }
button.chip.on { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.note.warn-note { margin: 0 0 12px; }

/* ── Menu Apparence ─────────────────────────── */
.appear { position: relative; }
.appear-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 300px; z-index: 40;
  background: var(--pop); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px;
  box-shadow: 0 16px 40px var(--shadow); display: grid; gap: 12px;
}
.appear-pop[hidden] { display: none; }
.appear-pop h4 { margin: 0; font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.seg { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--bg-2); }
.seg button { flex: 1; border: 0; background: none; padding: 6px 4px; border-radius: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; outline-offset: 2px; }
.swatches button.on { border-color: var(--text); }
.appear-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; }
@media (max-width: 520px) { .appear-label { display: none; } .appear-pop { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; } }
.sub-title { font: 600 13px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }

/* ── Stats par joueur ───────────────────────── */
.player-results { display: flex; flex-wrap: wrap; gap: 8px; }
.player-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--bg-2); color: var(--text); transition: border-color .15s, transform .15s; }
.player-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.player-chip.on { border-color: var(--accent); background: var(--accent-soft); }
.player-chip img, .player-chip i { width: 28px; height: 28px; border-radius: 50%; background: var(--panel-2); }
.player-chip span { display: flex; flex-direction: column; line-height: 1.15; }
.player-chip b { font-size: 13.5px; font-weight: 600; }
.player-chip small { font-size: 11.5px; color: var(--faint); }
.player-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 18px; margin-bottom: 18px; align-items: stretch; }
.player-hero {
  --pc: var(--accent); position: relative; overflow: hidden; display: flex; gap: 18px; align-items: flex-start; padding: 22px;
  border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, color-mix(in srgb, var(--pc) 22%, var(--panel)), var(--panel) 60%);
}
.player-avatar { width: 92px; height: 92px; border-radius: 50%; flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--pc) 70%, transparent), 0 10px 30px var(--shadow); animation: toast-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.player-id { min-width: 0; flex: 1; }
.player-id h3 { margin: 2px 0 4px; font: 700 26px/1.15 var(--serif); }
.player-id h3 small { font: 400 14px var(--sans); color: var(--muted); }
.player-title { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--pc); }
.player-bio { margin: 0 0 10px; color: var(--muted); font-style: italic; }
.player-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--muted); }
.player-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.role-chip { --rc: var(--faint); display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--bg-2); }
.role-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--rc); }
.player-figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; min-height: 120px; }
.player-card { width: 100%; height: auto; display: block; }
.player-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.player-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.player-cols > .group { margin-bottom: 18px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 16px 20px; }
.badge-tile { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line-2); font-size: 13px; animation: rise .35s ease-out both; }
.badge-tile .e { font-size: 18px; }
.chart-box + .chart-box, .chart-box > * + * { margin-top: 10px; }
@media (max-width: 1100px) { .player-top { grid-template-columns: 1fr; } .player-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .player-cols { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .player-hero { flex-direction: column; } .player-avatar { width: 72px; height: 72px; } }
.player-top.solo { grid-template-columns: 1fr; }

/* ── Grades du lobby ────────────────────────── */
.grades { display: grid; gap: 8px; }
.grade-row { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); }
.grade-img { height: 22px; width: auto; image-rendering: pixelated; justify-self: start; }
.grade-name { display: flex; align-items: center; gap: 10px; }
.grade-name span { color: var(--muted); font-size: 13px; }
.grade-roles { display: grid; gap: 4px; }
@media (max-width: 520px) { .grade-row { grid-template-columns: 1fr; } }

.skin-grades { display: flex; flex-wrap: wrap; gap: 8px; }
.skin-grade { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); cursor: pointer; }
.skin-grade input { accent-color: var(--accent); margin: 0; }
.skin-grade:has(input:checked) { border-color: var(--accent); }
.skin-grade .grade-img { height: 18px; }

/* Serveurs & consoles */
.srv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 14px; }
.srv-card { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: inherit; cursor: pointer; font: inherit; transition: border-color .15s, transform .15s; }
.srv-card:hover { border-color: var(--accent); }
.srv-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.srv-card-head { display: flex; align-items: center; gap: 8px; }
.srv-card-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-ic { width: 22px; text-align: center; }
.srv-card .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); opacity: .5; }
.srv-card .dot.on { background: #3ecf6e; opacity: 1; box-shadow: 0 0 8px #3ecf6e88; }
.srv-card-sub { color: var(--muted); font-size: 12.5px; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-card-kpis { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--muted); align-items: center; }
.srv-info { margin: 0 0 12px; display: grid; gap: 10px; }
.srv-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.srv-kpis .kpi { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line-2); }
.srv-kpis .kpi span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.srv-kpis .kpi b { font-size: 16px; }
.srv-kpis .kpi.good b { color: #3ecf6e; } .srv-kpis .kpi.warn b { color: #e0a21b; } .srv-kpis .kpi.bad b { color: var(--danger); }
.srv-players { display: flex; flex-wrap: wrap; gap: 6px; }
.srv-players .chip { padding: 3px 9px; }
[hidden] { display: none !important; }

.banner-input input[type=text] { flex: 1; min-width: 0; }
@media (max-width: 520px) { .banner-input { flex-wrap: wrap; } .banner-input input[type=text] { flex-basis: 100%; } }

/* Site web */
.site-modes { display: grid; gap: 8px; }
.site-mode { border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); }
.site-mode summary { cursor: pointer; padding: 10px 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.site-mode .group-body { padding-top: 0; }
.site-item { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; align-items: end; }
.site-item .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .site-item { grid-template-columns: 1fr; } }
.site-item > .btn.danger { grid-column: 1 / -1; justify-self: end; width: auto; }
.inline-toggles { display: flex; flex-wrap: wrap; gap: 10px 26px; }
