/* ─── NexéoBot — site & dashboard ─────────────────────────────────────────── */
:root {
  --bg: #0e0f13;
  --bg-2: #15161b;
  --panel: #1c1d24;
  --panel-2: #23252e;
  --panel-3: #2b2d38;
  --border: #2f3240;
  --border-2: #3b3e4f;
  --text: #f2f3f7;
  --muted: #b3b7c6;
  --faint: #7d8297;
  --accent: #7c6cff;
  --accent-2: #22c3ee;
  --accent-soft: rgba(124, 108, 255, .14);
  --good: #3ecf8e;
  --warn: #f5b84a;
  --bad: #f2555a;
  --grad: linear-gradient(135deg, #7c6cff 0%, #4f8dff 50%, #22c3ee 100%);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[x-cloak] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─── Boutons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: 600 14px var(--font); color: var(--text); background: var(--panel-3);
  cursor: pointer; transition: transform .12s, background .15s, border-color .15s, opacity .15s; white-space: nowrap;
}
.btn:hover { background: #343747; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); }
.btn-primary:hover { background: #8b7dff; }
.btn-grad { background: var(--grad); box-shadow: 0 6px 24px rgba(124, 108, 255, .35); }
.btn-grad:hover { filter: brightness(1.08); background: var(--grad); }
.btn-ghost { background: transparent; border-color: var(--border-2); }
.btn-ghost:hover { background: var(--panel-2); }
.btn-danger { background: transparent; color: var(--bad); border-color: rgba(242, 85, 90, .4); }
.btn-danger:hover { background: rgba(242, 85, 90, .12); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 16px; border-radius: 12px; }
.icon-btn { width: 32px; height: 32px; padding: 0; border-radius: 8px; background: transparent; border: none; color: var(--faint); cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--panel-3); color: var(--text); }

/* ─── Barre de navigation (site) ──────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 40; background: rgba(14, 15, 19, .8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 0 16px; height: 64px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; font-size: 16px; color: #fff; box-shadow: 0 4px 14px rgba(124, 108, 255, .4); }
.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--panel-2); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-3); object-fit: cover; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); font-weight: 600; font-size: 14px; }
@media (max-width: 720px) { .nav-links { display: none; } .user-chip span { display: none; } .user-chip { padding: 4px; } }

/* ─── Page d'accueil ──────────────────────────────────────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.hero { position: relative; overflow: hidden; padding: 96px 0 72px; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 640px; z-index: -1;
  background: radial-gradient(closest-side, rgba(124, 108, 255, .28), transparent 70%), radial-gradient(closest-side, rgba(34, 195, 238, .16), transparent 70%);
  background-position: 30% 50%, 70% 40%; background-size: 60% 100%, 50% 90%; background-repeat: no-repeat;
}
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); border: 1px solid rgba(124, 108, 255, .35); color: #cfc8ff; font-size: 13px; font-weight: 600; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.05; letter-spacing: -.03em; margin: 22px auto 18px; max-width: 820px; font-weight: 800; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 640px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 760px; margin: 56px auto 0; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 12px; }
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; }
.stat span { color: var(--faint); font-size: 13px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } .hero { padding-top: 64px; } }

.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.02em; margin: 0 0 10px; }
.section-head p { color: var(--muted); margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.feature { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: border-color .15s, transform .15s; }
.feature:hover { border-color: var(--border-2); transform: translateY(-2px); }
.feature-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-3); font-size: 22px; margin-bottom: 12px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.cat-title { color: var(--faint); text-transform: uppercase; font-size: 12px; letter-spacing: .08em; font-weight: 700; margin: 28px 0 12px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.step-n { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }
.step h3 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.cta-band { margin: 24px 0 80px; padding: 48px 24px; border-radius: 20px; text-align: center; background: linear-gradient(135deg, rgba(124, 108, 255, .22), rgba(34, 195, 238, .12)); border: 1px solid rgba(124, 108, 255, .35); }
.cta-band h2 { margin: 0 0 10px; font-size: clamp(24px, 3.5vw, 34px); letter-spacing: -.02em; }
.cta-band p { color: var(--muted); margin: 0 0 24px; }
.footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--faint); font-size: 14px; }
.footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ─── Mes serveurs ────────────────────────────────────────────────────────── */
.page-head { padding: 48px 0 24px; }
.page-head h1 { margin: 0 0 6px; font-size: 32px; letter-spacing: -.02em; }
.page-head p { margin: 0; color: var(--muted); }
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding-bottom: 80px; }
.guild-card { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 22px 18px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.guild-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 70px; background: var(--bg-img, var(--grad)); background-size: cover; background-position: center; filter: blur(18px) saturate(1.3); opacity: .45; }
.guild-icon { position: relative; width: 72px; height: 72px; border-radius: 22px; background: var(--panel-3); display: grid; place-items: center; font-weight: 800; font-size: 24px; border: 3px solid var(--panel); object-fit: cover; }
.guild-card h3 { position: relative; margin: 0; font-size: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-card .btn { width: 100%; }
.empty { text-align: center; color: var(--muted); padding: 60px 16px; background: var(--panel); border: 1px dashed var(--border-2); border-radius: 16px; }

/* ─── Message ─────────────────────────────────────────────────────────────── */
.message-box { max-width: 520px; margin: 96px auto; text-align: center; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 40px 28px; }
.message-box h1 { margin: 0 0 10px; font-size: 24px; }
.message-box p { color: var(--muted); margin: 0 0 24px; }

/* ─── Dashboard : structure ───────────────────────────────────────────────── */
.dash { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg-2); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.side-top { padding: 14px; border-bottom: 1px solid var(--border); }
.guild-switch { position: relative; }
.guild-switch > button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); color: var(--text); cursor: pointer; font: 600 14px var(--font); text-align: left; }
.guild-switch > button:hover { border-color: var(--border-2); }
.guild-switch img, .guild-switch .gi { width: 36px; height: 36px; border-radius: 10px; flex: none; background: var(--panel-3); display: grid; place-items: center; font-weight: 800; }
.guild-switch .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-switch .sub { display: block; color: var(--faint); font-weight: 500; font-size: 12px; }
.dropdown { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); z-index: 30; max-height: 320px; overflow-y: auto; }
.dropdown a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.dropdown a:hover { background: var(--panel-3); }
.dropdown img, .dropdown .gi { width: 28px; height: 28px; border-radius: 8px; background: var(--panel-3); display: grid; place-items: center; font-size: 12px; font-weight: 800; }

.side-nav { padding: 10px; flex: 1; }
.side-group { color: var(--faint); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 14px 10px 6px; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 14px; cursor: pointer; width: 100%; background: none; border: none; text-align: left; font-family: var(--font); }
.side-item:hover { background: var(--panel); color: var(--text); }
.side-item.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.side-item .ico { width: 22px; text-align: center; font-size: 16px; }
.side-item .dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.side-item .dot.on { background: var(--good); box-shadow: 0 0 0 3px rgba(62, 207, 142, .15); }
.side-foot { padding: 12px 14px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; font-size: 14px; }
.side-foot .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

.main { min-width: 0; padding: 28px clamp(16px, 4vw, 44px) 120px; }
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 290px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: var(--shadow); }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 50; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; padding: 10px 16px; background: rgba(14, 15, 19, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); font-weight: 700; }
  .main { padding-top: 20px; }
}

/* ─── Dashboard : contenu ─────────────────────────────────────────────────── */
.mod-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.mod-head .big-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 26px; flex: none; }
.mod-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.mod-head p { margin: 4px 0 0; color: var(--muted); }
.mod-head .grow { flex: 1; min-width: 220px; }
.cmds { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.cmd { font: 500 12px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
.enable-box { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); font-weight: 600; }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 16px; position: relative; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h2 { margin: 0; font-size: 16px; flex: 1; }
.card-body { padding: 18px 20px 20px; }
.card-help { color: var(--faint); font-size: 13px; margin: -4px 0 14px; }
.card.disabled-mod { opacity: .55; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.badge-starter { background: rgba(62, 207, 142, .14); color: #6fe0ae; }
.badge-pro { background: rgba(124, 108, 255, .18); color: #b3a9ff; }
.badge-ultimate { background: rgba(245, 184, 74, .16); color: #f7cc7c; }
.badge-free { background: var(--panel-3); color: var(--muted); }
.badge-on { background: rgba(62, 207, 142, .14); color: #6fe0ae; }
.badge-off { background: var(--panel-3); color: var(--faint); }

.lock-veil { position: absolute; inset: 52px 0 0; border-radius: 0 0 14px 14px; background: rgba(28, 29, 36, .72); backdrop-filter: blur(1.5px); display: grid; place-items: center; text-align: center; padding: 16px; z-index: 2; }
.lock-veil div { max-width: 340px; }
.lock-veil b { display: block; font-size: 15px; margin-bottom: 4px; }
.lock-veil span { color: var(--muted); font-size: 13px; }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.field { min-width: 0; }
.field.wide, .field.t-textarea, .field.t-strings, .field.t-roles, .field.t-channels { grid-column: 1 / -1; }
.field.t-toggle { padding: 10px 14px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; align-self: start; }
.tg { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.tg .lbl { margin: 0; color: var(--text); font-size: 14px; }
@media (max-width: 720px) { .fields { grid-template-columns: 1fr; } }
.lbl { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.help { color: var(--faint); font-size: 12px; margin-top: 6px; }
.field.locked .input, .field.locked select, .field.locked textarea { opacity: .5; }

.input, select.input, textarea.input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border-2);
  background: var(--bg-2); color: var(--text); font: 14px var(--font); transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input:disabled { cursor: not-allowed; }
select.input { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath stroke='%237d8297' stroke-width='1.6' d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.color-row { display: flex; gap: 8px; }
.color-row input[type=color] { width: 44px; height: 40px; padding: 3px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--bg-2); cursor: pointer; }

.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--border-2); cursor: pointer; transition: background .15s, border-color .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #c9cdda; transition: transform .15s, background .15s; }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); background: #fff; }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; min-height: 44px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--bg-2); align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 7px; background: var(--panel-3); font-size: 13px; font-weight: 500; max-width: 100%; }
.chip .sw { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { border: none; background: none; color: var(--faint); cursor: pointer; padding: 0 2px; font-size: 15px; line-height: 1; }
.chip button:hover { color: var(--bad); }
.chips select, .chips input { flex: 1; min-width: 160px; height: 30px; border: none; background: transparent; color: var(--muted); font: 13px var(--font); padding: 0 6px; }
.chips select:focus, .chips input:focus { outline: none; color: var(--text); }

.list-item { border: 1px solid var(--border); background: var(--bg-2); border-radius: 12px; margin-bottom: 10px; }
.list-item-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; cursor: pointer; }
.list-item-head .t { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item-head .n { color: var(--faint); font-size: 12px; font-weight: 700; }
.list-item-body { padding: 4px 16px 16px; border-top: 1px solid var(--border); padding-top: 16px; }
.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.list-foot small { color: var(--faint); }

.overview-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 860px) { .overview-top { grid-template-columns: 1fr; } }
.guild-hero { display: flex; align-items: center; gap: 16px; padding: 22px; background: linear-gradient(135deg, rgba(124, 108, 255, .18), rgba(34, 195, 238, .08)); border: 1px solid rgba(124, 108, 255, .3); border-radius: 16px; }
.guild-hero img, .guild-hero .gi { width: 64px; height: 64px; border-radius: 18px; background: var(--panel-3); display: grid; place-items: center; font-size: 24px; font-weight: 800; flex: none; }
.guild-hero h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.guild-hero p { margin: 2px 0 0; color: var(--muted); }
.plan-card { padding: 20px 22px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.plan-card .k { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.plan-card .v { font-size: 22px; font-weight: 800; text-transform: capitalize; }
.plan-card .s { color: var(--muted); font-size: 13px; }

.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mod-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s; }
.mod-card:hover { border-color: var(--border-2); }
.mod-card .top { display: flex; align-items: center; gap: 12px; }
.mod-card .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--panel-3); display: grid; place-items: center; font-size: 20px; flex: none; }
.mod-card h3 { margin: 0; font-size: 15px; flex: 1; }
.mod-card p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
.mod-card .btn { align-self: flex-start; }

.warn-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(245, 184, 74, .1); border: 1px solid rgba(245, 184, 74, .35); color: #f7d79b; font-size: 14px; margin-bottom: 16px; }
.info-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid rgba(124, 108, 255, .3); color: #d5cfff; font-size: 14px; margin-bottom: 16px; }

/* Vues */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--faint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 0 10px 10px; }
.table td { padding: 10px; border-top: 1px solid var(--border); vertical-align: middle; }
.table .who { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.table .who img { width: 28px; height: 28px; border-radius: 50%; }
.rank { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--panel-3); }
.rank.r1 { background: rgba(245, 184, 74, .2); color: #f7cc7c; }
.rank.r2 { background: rgba(200, 205, 220, .15); color: #dfe3ee; }
.rank.r3 { background: rgba(214, 140, 90, .18); color: #eab08a; }
.table-wrap { overflow-x: auto; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 10px; }
.bars div { flex: 1; min-width: 4px; border-radius: 4px 4px 0 0; background: var(--grad); opacity: .85; position: relative; }
.bars div:hover { opacity: 1; }
.bars-legend { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin-top: 8px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* Barre de sauvegarde */
.savebar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70; width: min(720px, calc(100vw - 32px)); display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 14px; background: #0b0c10; border: 1px solid var(--border-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .55); font-weight: 600; }
.savebar span { flex: 1; }
@media (min-width: 901px) { .savebar { left: calc(50% + 140px); width: min(720px, calc(100vw - 280px - 48px)); } }
@keyframes shake { 10%, 90% { transform: translateX(calc(-50% - 1px)); } 20%, 80% { transform: translateX(calc(-50% + 3px)); } 30%, 50%, 70% { transform: translateX(calc(-50% - 6px)); } 40%, 60% { transform: translateX(calc(-50% + 6px)); } }
.savebar.shake { animation: shake .4s; border-color: var(--bad); }

/* Toasts */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border-2); box-shadow: var(--shadow); font-size: 14px; font-weight: 500; display: flex; gap: 8px; align-items: center; max-width: 380px; }
.toast.ok { border-color: rgba(62, 207, 142, .45); }
.toast.err { border-color: rgba(242, 85, 90, .5); }

.skeleton { background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 14px; height: 120px; margin-bottom: 16px; }
@keyframes sk { to { background-position: -200% 0; } }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Panel admin ─────────────────────────────────────────────────────────── */
.admin { padding-bottom: 60px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tabs { display: inline-flex; padding: 4px; gap: 4px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.tabs button { height: 36px; padding: 0 14px; border: none; border-radius: 9px; background: transparent; color: var(--muted); font: 600 14px var(--font); cursor: pointer; }
.tabs button.on { background: var(--panel-3); color: var(--text); }
.term-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.live.ok i { background: var(--good); box-shadow: 0 0 0 4px rgba(62, 207, 142, .15); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(62, 207, 142, 0); } }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { height: 28px; padding: 0 10px; border: none; border-radius: 7px; background: transparent; color: var(--muted); font: 600 12px var(--font); cursor: pointer; }
.seg button.on { background: var(--panel-3); color: var(--text); }
.term-search { flex: 1; min-width: 180px; height: 34px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.quick-btn { cursor: pointer; }
.quick-btn:hover { color: var(--text); border-color: var(--border-2); }
.term {
  height: min(60vh, 560px); overflow-y: auto; padding: 12px 0; border-radius: 14px 14px 0 0;
  background: #07080b; border: 1px solid var(--border); border-bottom: none;
  font: 13px/1.55 ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace;
}
.tl { display: flex; gap: 12px; padding: 1px 16px; white-space: pre-wrap; word-break: break-word; }
.tl:hover { background: rgba(255, 255, 255, .03); }
.tt { color: #4c5164; flex: none; user-select: none; }
.tm { color: #c9cedb; min-width: 0; }
.lv-warn .tm { color: #f5c26b; }
.lv-error .tm { color: #ff7b7f; }
.lv-debug .tm { color: #6b7086; }
.lv-input .tm { color: #a99dff; font-weight: 700; }
.lv-output .tm { color: #7fe3b4; }
.term-input { position: relative; display: flex; flex-direction: column; padding: 0; background: #0b0c10; border: 1px solid var(--border); border-radius: 0 0 14px 14px; }
.term-line { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; }
.sig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--border); font: 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--faint); }
.sig span { padding: 1px 6px; border-radius: 5px; }
.sig span.cmdname { color: var(--text); font-weight: 700; padding-left: 0; }
.sig span.on { color: #fff; background: var(--accent); }
.sig em { font: italic 12px var(--font); color: var(--faint); margin-left: 6px; }
.quick-btn.run { color: #9fe8c6; }
.suggest { max-height: 340px; overflow-y: auto; }
.suggest button { align-items: center; }
.suggest button .v { font: 11px ui-monospace, monospace; color: var(--faint); }
.suggest button .h { margin-left: auto; color: var(--faint); font-size: 12px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.suggest button.dis { cursor: default; opacity: .6; }
.suggest button.dis:hover { background: transparent; }
.suggest-foot { padding: 8px 10px 4px; border-top: 1px solid var(--border); margin-top: 4px; color: var(--faint); font-size: 11.5px; }
kbd { display: inline-block; padding: 0 5px; margin: 0 1px; border-radius: 4px; border: 1px solid var(--border-2); background: var(--panel-3); font: 11px ui-monospace, monospace; color: var(--muted); }
.term-input .prompt { color: var(--accent); font: 700 18px ui-monospace, monospace; }
.term-input input { flex: 1; min-width: 0; height: 36px; border: none; background: transparent; color: var(--text); font: 14px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.term-input input:focus { outline: none; }
.suggest { position: absolute; left: 10px; right: 10px; bottom: calc(100% + 6px); background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); z-index: 5; }
.suggest button { display: flex; width: 100%; gap: 14px; align-items: baseline; padding: 8px 10px; border: none; border-radius: 8px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; font: 13px var(--font); }
.suggest button b { font: 600 13px ui-monospace, monospace; color: var(--text); white-space: nowrap; }
.suggest button:hover, .suggest button.on { background: var(--panel-3); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-row .stat { text-align: center; }
@media (max-width: 640px) { .stat-row { grid-template-columns: repeat(2, 1fr); } .term { height: 55vh; } .tt { display: none; } }
.guild-term .term { height: min(52vh, 460px); }
.term-preview { height: 150px !important; border-radius: 14px; border-bottom: 1px solid var(--border); filter: blur(1px); opacity: .6; }
.lv-past .tm { color: #6f7590; }
.lv-past-err .tm { color: #8a5a5d; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.plan-form { display: flex; gap: 6px; align-items: center; }
.plan-form select { width: 120px; height: 32px; }
.plan-form input { width: 70px; height: 32px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
