/* ── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Backgrounds — layered depth (Confortable : slate doux au lieu du noir pur) */
    --bg:        #15151d;
    --bg2:       #1d1d27;
    --bg3:       #262631;
    --bg4:       #30303d;
    --bg5:       #3a3a49;
    /* Borders */
    --border:    #2c2c3a;
    --border2:   #3a3a4a;
    --border3:   #48485c;
    /* Brand — gold (Confortable : ton légèrement plus chaud, glow adouci) */
    --gold:      #f3cf57;
    --gold2:     #e3b93f;
    --gold3:     #ffe27a;
    --gold-glow: rgba(243,207,87,.12);
    --gold-glow-strong: rgba(243,207,87,.3);
    /* Accents */
    --red:       #ed5e5e;
    --red2:      #d04545;
    --red-glow:  rgba(237,94,94,.15);
    --orange:    #f59e4e;
    --green:     #5be08a;
    --green-glow:rgba(91,224,138,.15);
    --blue:      #5fb0eb;
    --blue-glow: rgba(95,176,235,.15);
    --purple:    #b276ee;
    /* Text (Confortable : muted plus clair pour une meilleure lisibilité) */
    --text:      #eaeaf3;
    --text2:     #c4c4d6;
    --muted:     #9090a8;
    --muted2:    #5c5c74;
    /* Geometry (Confortable : coins plus arrondis) */
    --radius:    13px;
    --radius-lg: 17px;
    --radius-xl: 22px;
    --sidebar-w: 240px;
    --topbar-h:  60px;
    /* Shadows (Confortable : plus diffuses, moins dures) */
    --shadow:     0 8px 30px rgba(0,0,0,.30);
    --shadow-sm:  0 3px 12px rgba(0,0,0,.20);
    --shadow-lg:  0 18px 50px rgba(0,0,0,.38);
    --shadow-gold:0 0 24px rgba(243,207,87,.16);
    /* Transitions */
    --tr-fast:   .12s cubic-bezier(.4,0,.2,1);
    --tr:        .2s cubic-bezier(.4,0,.2,1);
    --tr-slow:   .35s cubic-bezier(.4,0,.2,1);
    /* Spacing scale */
    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
    --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
}

html.light {
    --bg:      #f0f0f5;
    --bg2:     #ffffff;
    --bg3:     #e8e8f0;
    --bg4:     #dcdce8;
    --border:  #d0d0df;
    --border2: #c0c0d0;
    --text:    #1a1a2e;
    --text2:   #44445a;
    --muted:   #8080a0;
    --shadow:    0 4px 24px rgba(0,0,0,.08);
    --shadow-sm: 0 2px 8px  rgba(0,0,0,.06);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    line-height: 1.6;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: none; }
code { font-family: monospace; background: var(--bg3); padding: 2px 6px; border-radius: 4px; }

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    z-index: 200;
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 16px 14px;
}
.logo-img {
    width: 72px;
    height: auto;
    filter: invert(1);
}
html.light .logo-img { filter: none; }

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 0 14px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 10px;
    flex: 1;
}

.snav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text2);
    font-size: .88rem;
    font-weight: 500;
    transition: background .15s, color .15s;
    cursor: pointer;
    border: 1px solid transparent;
}
.snav-item:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.snav-item.active {
    background: var(--gold-glow);
    color: var(--gold);
    border-color: rgba(243,207,87,.2);
}

.snav-icon { font-size: 1.05rem; flex-shrink: 0; }

.snav-badge {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: 99px;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .5px;
}
.snav-badge.owner {
    background: rgba(224,82,82,.2);
    color: var(--red);
    border: 1px solid rgba(224,82,82,.3);
}

.sidebar-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin: 6px 10px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.online  { background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--red); }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 6px var(--green); }
    50%       { box-shadow: 0 0 12px var(--green); }
}
.status-info { display: flex; flex-direction: column; line-height: 1.25; }
.status-name { font-size: .78rem; font-weight: 600; color: var(--text); }
.status-sub  { font-size: .68rem; color: var(--green); }
.status-sub.offline { color: var(--red); }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}
.sidebar-avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border2); flex-shrink: 0; }
.sidebar-user-info { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sidebar-username { font-size: .82rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-role { font-size: .65rem; font-weight: 700; letter-spacing: .4px; }
.owner-role { color: var(--red); }
.admin-role { color: var(--gold); }
.sidebar-logout { color: var(--muted); font-size: 1rem; transition: color .15s; flex-shrink: 0; }
.sidebar-logout:hover { color: var(--red); }

/* ── MAIN WRAP ──────────────────────────────────────────── */
.main-wrap {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── TOP BAR ────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-h);
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}
.topbar-left { display: flex; flex-direction: column; }
.topbar-title { font-size: 1.05rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.topbar-sub   { font-size: .76rem; color: var(--muted); }
.topbar-sub strong { color: var(--gold); }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.theme-btn {
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: 99px;
    color: var(--text2);
    cursor: pointer;
    padding: 5px 14px;
    font-size: .78rem;
    transition: border-color .2s, color .2s;
}
.theme-btn:hover { border-color: var(--gold); color: var(--gold); }

.owner-pill {
    background: rgba(224,82,82,.12);
    border: 1px solid rgba(224,82,82,.35);
    color: var(--red);
    border-radius: 99px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .6px;
    padding: 4px 12px;
}

/* ── CONTENT ────────────────────────────────────────────── */
.content { padding: 34px; display: flex; flex-direction: column; gap: 28px; flex: 1; }

/* ── STATS ROW (nouvelle version avec icônes) ───────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}
@media (max-width: 1200px) { .stats-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .stats-row { grid-template-columns: repeat(2, 1fr); } }

.stat-tile {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color .2s, transform .2s;
}
.stat-tile:hover { border-color: var(--border2); transform: translateY(-1px); }
.stat-tile-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; flex-shrink: 0;
}
.stat-tile-body { flex: 1; }
.stat-tile-val { font-size: 1.4rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-tile-lbl { font-size: .7rem; color: var(--muted); margin-top: 2px; }
.stat-tile-trend { font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; white-space: nowrap; }
.stat-tile-trend.up   { background: rgba(82,224,122,.12); color: var(--green); }
.stat-tile-trend.down { background: rgba(224,82,82,.12);  color: var(--red); }

/* Ancienne version (compat) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--gold); }
.stat-label { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* ── SECTION HEADER ─────────────────────────────────────── */
.section { display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; }
.section-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.section-count {
    font-size: .78rem; color: var(--muted);
    background: var(--bg3); padding: 3px 10px;
    border-radius: 99px; border: 1px solid var(--border);
}

/* ── GUILD GRID (nouvelle version avec bannière) ────────── */
.guild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.guild-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .2s, transform .2s, box-shadow .2s;
    color: var(--text);
}
.guild-card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(243,207,87,.08);
    text-decoration: none;
}
.guild-card.featured { border-color: rgba(243,207,87,.3); }

.guild-card-banner { height: 68px; position: relative; flex-shrink: 0; }
.guild-card-body   { padding: 0 14px 12px; display: flex; flex-direction: column; gap: 8px; }

.guild-icon-wrap { position: relative; width: 48px; height: 48px; margin-top: -24px; flex-shrink: 0; }
.guild-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    border: 3px solid var(--bg2);
    object-fit: cover;
    background: var(--bg3);
}
.guild-online-dot {
    position: absolute; bottom: 2px; right: 2px;
    width: 11px; height: 11px;
    background: var(--green); border-radius: 50%;
    border: 2px solid var(--bg2);
    box-shadow: 0 0 6px var(--green);
}
.guild-info  { display: flex; flex-direction: column; gap: 2px; }
.guild-name  { font-weight: 700; font-size: .9rem; color: var(--text); }
.guild-meta  { font-size: .76rem; color: var(--muted); }
.guild-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.guild-badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 99px;
    font-size: .66rem; font-weight: 600;
    background: rgba(243,207,87,.1); color: var(--gold2);
    border: 1px solid rgba(243,207,87,.2);
}
.guild-id-bar {
    padding: 6px 14px;
    background: var(--bg3); border-top: 1px solid var(--border);
    font-size: .63rem; color: var(--muted);
    font-family: 'Courier New', monospace; letter-spacing: .2px;
}

/* ── TABS ──────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; flex-wrap: wrap; }
.tab {
    background: none; border: none; color: var(--muted);
    padding: 10px 18px; cursor: pointer; font-size: .9rem;
    border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── FORMS ─────────────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px; margin-bottom: 20px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .85rem; color: var(--muted); }
.field input, .field textarea, .field select {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text);
    padding: 9px 12px; font-size: .9rem; outline: none; transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); }

/* ── SEARCHABLE SELECT ─────────────────────────────────── */
.select-wrap {
    display: flex;
    flex-direction: column;
}
.select-search {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-bottom: 1px solid var(--border2);
    border-radius: var(--radius) var(--radius) 0 0;
    color: var(--text);
    padding: 7px 12px;
    font-size: .85rem;
    outline: none;
    transition: border-color .2s;
    font-family: inherit;
    width: 100%;
}
.select-search:focus { border-color: var(--gold); }
.select-wrap .searchable-select {
    border-radius: 0 0 var(--radius) var(--radius) !important;
    border-top-color: var(--border2) !important;
    width: 100%;
    cursor: pointer;
}
.select-wrap .searchable-select:focus { border-color: var(--gold); }
/* Indicateur visuel que c'est un select */
.select-wrap::after {
    content: '';
    position: absolute;
    right: 12px; bottom: 12px;
    pointer-events: none;
}
.field .select-wrap { position: relative; }

.inline-form { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.inline-form input {
    flex: 1; min-width: 200px;
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text); padding: 9px 12px;
    font-size: .9rem; outline: none;
}
.inline-form input:focus { border-color: var(--gold); }

/* ── BUTTONS ───────────────────────────────────────────── */
.btn {
    display: inline-block; padding: 9px 18px;
    border-radius: var(--radius); border: none;
    cursor: pointer; font-size: .9rem; font-weight: 500;
    transition: opacity .2s, transform .1s;
}
.btn:hover { opacity: .85; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--gold);  color: #000; }
.btn-danger  { background: var(--red);   color: #fff; }
.btn-ghost   { background: var(--bg3);   color: var(--text); border: 1px solid var(--border); }
.btn-sm      { padding: 5px 12px; font-size: .82rem; }
.btn-full    { width: 100%; text-align: center; }
.btn-discord { background: #5865F2; color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1rem; padding: 12px; }
.btn-discord:hover { opacity: .9; }

/* ── BADGES ────────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 600; letter-spacing: .5px; }
.badge-green  { background: rgba(82,224,122,.15);  color: var(--green); }
.badge-red    { background: rgba(224,82,82,.15);   color: var(--red); }
.badge-orange { background: rgba(224,140,82,.15);  color: var(--orange); }
.badge-yellow { background: rgba(243,207,87,.15);   color: var(--gold); }

/* ── ALERTS ────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: .9rem; }
.alert-success { background: rgba(82,224,122,.1); border: 1px solid rgba(82,224,122,.3); color: var(--green); }
.alert-error   { background: rgba(224,82,82,.1);  border: 1px solid rgba(224,82,82,.3);  color: var(--red); }

/* ── TABLE ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; padding: 10px 14px; color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 500; }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ── MOD LIST ──────────────────────────────────────────── */
.mod-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.mod-item {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 10px 16px;
}

/* ── TRANSCRIPT ────────────────────────────────────────── */
.transcript-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.transcript-link {
    display: block; padding: 10px 16px;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text); font-size: .88rem; transition: border-color .2s;
}
.transcript-link:hover { border-color: var(--gold); }
.transcript-box {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    font-size: .82rem; line-height: 1.6; white-space: pre-wrap;
    word-break: break-word; max-height: 80vh; overflow-y: auto; color: #c8c8e0;
}

/* ── OWNER BANNER ──────────────────────────────────────── */
.owner-banner {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(224,82,82,.08); border: 1px solid rgba(224,82,82,.3);
    border-radius: var(--radius); padding: 10px 18px; margin-bottom: 20px;
    font-size: .88rem; color: var(--red); font-weight: 600; letter-spacing: .5px;
}
.owner-tag {
    font-size: .65rem; background: var(--red); color: #fff;
    padding: 2px 6px; border-radius: 4px; margin-left: 8px;
    vertical-align: middle; font-weight: 700; letter-spacing: 1px;
}

/* ── LOGIN PAGE ────────────────────────────────────────── */
.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; width: 100%;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, var(--bg) 70%);
}
.login-box {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 14px; padding: 40px; width: 100%; max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo img { width: 90px; height: auto; filter: invert(1); }
html.light .login-logo img { filter: none; }
.login-logo h1 { font-size: 1.6rem; margin-top: 10px; }
.login-logo .version { color: var(--gold); }
.tagline { color: var(--muted); font-size: .75rem; letter-spacing: 2px; margin-top: 4px; }
.login-desc { text-align: center; color: var(--muted); font-size: .88rem; margin-bottom: 24px; line-height: 1.6; }

/* ── EMPTY STATE ───────────────────────────────────────── */
.empty-state {
    text-align: center; padding: 48px 24px; color: var(--muted);
    background: var(--bg2); border: 1px dashed var(--border); border-radius: var(--radius);
}

/* ── FEATURE CARDS / TOGGLES ────────────────────────────── */
.feature-category { margin-bottom: 32px; }
.cat-title { font-size: 1rem; color: var(--gold); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); letter-spacing: .5px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.feature-card {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 16px; transition: border-color .2s, opacity .2s;
}
.feature-card.inactive { opacity: .55; }
.feature-card.active   { border-color: rgba(243,207,87,.25); }
.feature-info  { display: flex; flex-direction: column; gap: 3px; }
.feature-label { font-size: .9rem; font-weight: 500; }
.feature-key-badge { font-size: .7rem; color: var(--muted); font-family: monospace; }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0; background: var(--bg3);
    border: 1px solid var(--border); border-radius: 99px; cursor: pointer; transition: background .2s;
}
.toggle-slider::before {
    content: ''; position: absolute;
    width: 16px; height: 16px; left: 3px; bottom: 3px;
    background: var(--muted); border-radius: 50%; transition: transform .2s, background .2s;
}
.toggle input:checked + .toggle-slider { background: rgba(243,207,87,.15); border-color: var(--gold); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); background: var(--gold); }

/* ── TOAST ──────────────────────────────────────────────── */
.toast {
    position: fixed; bottom: 24px; right: 24px;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 20px; font-size: .88rem;
    opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s;
    pointer-events: none; z-index: 999;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.toast-error { border-color: var(--red); color: var(--red); }

/* ── NOTIFICATION BADGE ─────────────────────────────────── */
.notif-wrap { position: relative; display: inline-flex; align-items: center; }
.notif-badge {
    position: absolute; top: -6px; right: -8px;
    min-width: 17px; height: 17px; background: var(--red); color: #fff;
    font-size: .62rem; font-weight: 700; border-radius: 99px; padding: 0 4px;
    display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.notif-badge.hidden { display: none; }

/* ── CONFIG PAGES ───────────────────────────────────────── */
.config-section {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px 24px; margin-bottom: 20px;
}
.config-section h3 { color: var(--gold); font-size: 1rem; margin-bottom: 16px; }
.config-hint { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--gold); }
.range-val { min-width: 40px; text-align: right; color: var(--gold); font-weight: 700; }

/* ── LOG FEED ───────────────────────────────────────────── */
.log-feed { display: flex; flex-direction: column; gap: 6px; }
.log-entry {
    display: flex; align-items: flex-start; gap: 12px;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 10px 14px; font-size: .85rem;
}
.log-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.log-body { flex: 1; }
.log-time { color: var(--muted); font-size: .75rem; margin-top: 2px; }
.log-entry.log-ban  { border-left: 3px solid var(--red); }
.log-entry.log-warn { border-left: 3px solid var(--gold); }
.log-entry.log-kick { border-left: 3px solid var(--orange); }
.log-entry.log-afk  { border-left: 3px solid var(--blue); }

/* ── POLL CARD ──────────────────────────────────────────── */
.poll-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px; }
.poll-question { font-weight: 600; margin-bottom: 10px; }
.poll-option { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: .85rem; }
.poll-bar { flex: 1; height: 6px; background: var(--bg3); border-radius: 99px; overflow: hidden; }
.poll-fill { height: 100%; background: var(--gold); border-radius: 99px; }

/* ── GIVEAWAY CARD ──────────────────────────────────────── */
.giveaway-card {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.giveaway-prize { font-weight: 700; color: var(--gold); font-size: 1rem; }
.giveaway-meta  { color: var(--muted); font-size: .82rem; margin-top: 4px; }

/* ── QUICK LINKS ────────────────────────────────────────── */
.quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 24px; }
.quick-link {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 16px;
    display: flex; align-items: center; gap: 10px;
    color: var(--text); font-size: .88rem; font-weight: 500;
    transition: border-color .2s, transform .15s;
}
.quick-link:hover { border-color: var(--gold); transform: translateY(-2px); }
.quick-link .ql-icon { font-size: 1.3rem; }

/* ── PAGE HEADER (compat) ───────────────────────────────── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header h2 { font-size: 1.5rem; color: var(--gold); }

/* ── UTILS ──────────────────────────────────────────────── */
.text-muted { color: var(--muted); }
.small { font-size: .8rem; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }

/* ── PREVIEW MODE TOGGLE ────────────────────────────────── */
.preview-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: .82rem;
    color: var(--muted);
    border: 1px dashed var(--border2);
    transition: all .2s;
    cursor: pointer;
}
.preview-toggle:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.preview-toggle.preview-on {
    background: rgba(82,168,224,.1);
    border-color: var(--blue);
    color: var(--blue);
    border-style: solid;
}
.preview-badge {
    margin-left: auto;
    background: var(--blue);
    color: #fff;
    font-size: .6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 99px;
    letter-spacing: .5px;
    animation: pulse-blue 2s infinite;
}
@keyframes pulse-blue {
    0%,100% { box-shadow: 0 0 4px var(--blue); }
    50%      { box-shadow: 0 0 10px var(--blue); }
}

/* Bannière preview visible en haut de page */
.preview-banner {
    background: rgba(82,168,224,.12);
    border-bottom: 2px solid var(--blue);
    color: var(--blue);
    text-align: center;
    font-size: .8rem;
    font-weight: 700;
    padding: 6px;
    letter-spacing: .5px;
}

/* ── MOBILE SIDEBAR ─────────────────────────────────────── */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 14px; left: 14px;
    z-index: 300;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text);
    font-size: 1.1rem;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 190;
    backdrop-filter: blur(2px);
}
@media (max-width: 820px) {
    .sidebar-toggle { display: flex; }
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: none; }
    .sidebar.open { transform: translateX(0); box-shadow: 4px 0 32px rgba(0,0,0,.5); }
    .sidebar-overlay.show { display: block; }
    .main-wrap { margin-left: 0; }
    .topbar { padding-left: 58px; }
}

/* ── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── SANCTION FILTER CHIPS ──────────────────────────────── */
.sanction-chip {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 99px; padding: 4px 12px; font-size: .78rem;
    color: var(--muted); cursor: pointer; transition: all .18s;
    white-space: nowrap;
}
.sanction-chip:hover  { border-color: var(--gold); color: var(--text); }
.sanction-chip.active { background: rgba(243,207,87,.12); border-color: var(--gold); color: var(--gold); font-weight: 600; }

/* ── TAB TRANSITION ─────────────────────────────────────── */
@keyframes tabFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── CONFIRM MODAL ──────────────────────────────────────── */
#cynConfirmOverlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
    z-index: 1000; align-items: center; justify-content: center;
}
#cynConfirmOverlay.show { display: flex; }
.cyn-confirm-box {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px 32px;
    max-width: 400px; width: 90%; box-shadow: 0 8px 40px rgba(0,0,0,.5);
    animation: confirmIn .18s ease;
}
@keyframes confirmIn { from { transform: scale(.93); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.cyn-confirm-msg {
    font-size: .95rem; color: var(--text); margin-bottom: 20px; line-height: 1.5;
}
.cyn-confirm-btns { display: flex; gap: 10px; justify-content: flex-end; }

/* ── CODE IDs (clickable) ───────────────────────────────── */
code { cursor: pointer; transition: background .2s; }
code:hover { background: rgba(243,207,87,.1); }

/* ── CARD (conteneur générique) ─────────────────────────── */
.card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
}
.card + .card { margin-top: 16px; }

/* ── BOUTON XS ──────────────────────────────────────────── */
.btn-xs { padding: 4px 10px; font-size: .75rem; border-radius: 6px; }

/* ── BADGE SUPPLÉMENTAIRES ──────────────────────────────── */
.badge-grey  { background: rgba(90,90,117,.2);  color: var(--muted); border: 1px solid var(--border); }
.badge-blue  { background: rgba(82,168,224,.15); color: var(--blue); }
.badge-purple{ background: rgba(160,102,224,.15);color: var(--purple); }

/* ── SKELETON LOADER ────────────────────────────────────── */
.skeleton-loader {
    background: linear-gradient(
        90deg,
        var(--bg3) 25%,
        var(--bg4) 50%,
        var(--bg3) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius);
}
@keyframes shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}
/* Variantes de skeleton */
.skeleton-line {
    height: 14px; border-radius: 99px; margin-bottom: 8px;
}
.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 65%; }

/* ── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: .78rem; color: var(--muted);
    margin-bottom: 20px; flex-wrap: wrap;
}
.breadcrumb-item { display: flex; align-items: center; gap: 6px; }
.breadcrumb-item a { color: var(--muted); transition: color .15s; }
.breadcrumb-item a:hover { color: var(--gold); }
.breadcrumb-item.active { color: var(--text); }
.breadcrumb-sep { color: var(--border2); font-size: .85rem; }

/* ── PAGE LOADING BAR ───────────────────────────────────── */
.page-load-bar {
    position: fixed; top: 0; left: 0; right: 0;
    height: 3px; z-index: 9999; background: transparent;
}
.page-load-bar::after {
    content: '';
    position: absolute; top: 0; left: 0;
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--gold), #fff8a0, var(--gold));
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px var(--gold);
    transition: width .3s ease;
}
body.loading .page-load-bar::after { width: 75%; }
body.load-done .page-load-bar::after {
    width: 100%;
    transition: width .15s ease;
    animation: loadDone .3s .1s forwards;
}
@keyframes loadDone {
    to { opacity: 0; }
}

/* ── SORTABLE TABLE HEADERS ─────────────────────────────── */
th[data-sort], table[data-sortable] th {
    cursor: pointer;
    user-select: none;
    transition: color .15s;
    white-space: nowrap;
}
th[data-sort]:hover, table[data-sortable] th:hover { color: var(--text); }
.sort-asc::after  { content: ' ▲'; color: var(--gold); font-size: .7rem; }
.sort-desc::after { content: ' ▼'; color: var(--gold); font-size: .7rem; }

/* ── MODAL GLOBAL (remplacement inline) ─────────────────── */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.65); backdrop-filter: blur(3px);
    z-index: 1000; align-items: center; justify-content: center;
    padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px 32px;
    width: 100%; max-width: 500px;
    box-shadow: 0 8px 40px rgba(0,0,0,.5);
    animation: confirmIn .18s ease;
    position: relative;
}
.modal-box h3 { color: var(--gold); margin-bottom: 18px; font-size: 1.05rem; }

/* ── SCROLL TO TOP ──────────────────────────────────────── */
.scroll-top-btn {
    position: fixed; bottom: 72px; right: 24px;
    width: 38px; height: 38px;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: var(--muted);
    opacity: 0; pointer-events: none;
    transition: opacity .25s, border-color .2s, color .2s, transform .2s;
    z-index: 500;
}
.scroll-top-btn.visible { opacity: 1; pointer-events: auto; }
.scroll-top-btn:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* ── TOOLTIP CSS ────────────────────────────────────────── */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute; bottom: calc(100% + 6px); left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e; border: 1px solid var(--border);
    color: var(--text); font-size: .75rem; white-space: nowrap;
    padding: 5px 10px; border-radius: 6px;
    opacity: 0; pointer-events: none; transition: opacity .15s;
    z-index: 500; box-shadow: var(--shadow-sm);
}
[data-tooltip]:hover::after { opacity: 1; }

/* ── INPUT GROUP ────────────────────────────────────────── */
.input-group {
    display: flex; align-items: stretch;
}
.input-group input {
    border-radius: var(--radius) 0 0 var(--radius) !important;
    border-right: none !important;
    flex: 1;
}
.input-group .btn {
    border-radius: 0 var(--radius) var(--radius) 0;
    padding-left: 16px; padding-right: 16px;
}

/* ── DIVIDER ────────────────────────────────────────────── */
.divider {
    border: none; border-top: 1px solid var(--border);
    margin: 20px 0;
}
.divider-text {
    display: flex; align-items: center; gap: 12px;
    color: var(--muted); font-size: .78rem; margin: 20px 0;
}
.divider-text::before, .divider-text::after {
    content: ''; flex: 1; border-top: 1px solid var(--border);
}

/* ── PROGRESS BAR ───────────────────────────────────────── */
progress {
    appearance: none; height: 6px; width: 100%;
    border: none; border-radius: 99px; background: var(--bg3);
}
progress::-webkit-progress-bar { background: var(--bg3); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--gold); border-radius: 99px; transition: width .3s; }

/* ── TAB FADE IN (scope correct) ────────────────────────── */
.tab-content.active { animation: tabFadeIn .2s ease both; }

/* ── FOCUS RING ACCESSIBILITÉ ───────────────────────────── */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ── PLACEHOLDER COLOR ──────────────────────────────────── */
::placeholder { color: var(--muted); opacity: 1; }

/* ── RESPONSIVE GRILLE CONTENT ───────────────────────────── */
@media (max-width: 700px) {
    .content { padding: 16px; gap: 16px; }
    .quick-links { grid-template-columns: repeat(2, 1fr); }
    .card { padding: 14px 16px; }
    .modal-box { padding: 20px 18px; }
    .topbar { padding: 0 16px 0 58px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .guild-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .tabs { overflow-x: auto; flex-wrap: nowrap; }
    .tab { white-space: nowrap; font-size: .82rem; padding: 9px 13px; }
    .topbar-right .theme-btn { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   ▓ CYN V3 — CYBERPUNK POLISH LAYER (extension)
   ═══════════════════════════════════════════════════════════ */

/* ── AMBIENT BACKGROUND : grille subtile + glow radial ───── */
body {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(243,207,87,.03), transparent 70%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(95,176,235,.025), transparent 70%),
        var(--bg);
    background-attachment: fixed;
}
html.light body {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(243,207,87,.08), transparent 70%),
        var(--bg);
    background-attachment: fixed;
}

/* ── TYPOGRAPHY POLISH ──────────────────────────────────── */
body {
    font-feature-settings: 'cv11', 'ss01', 'ss03';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.005em;
}
h1, h2, h3, h4, h5 { letter-spacing: -0.015em; }

/* ── SIDEBAR : glow + meilleure hiérarchie ───────────────── */
.sidebar {
    background: linear-gradient(180deg, var(--bg2) 0%, #14141c 100%);
    box-shadow: 1px 0 0 var(--border), 4px 0 24px rgba(0,0,0,.3);
}
.sidebar-logo { padding: 22px 16px 12px; }
.logo-img { transition: filter var(--tr), transform var(--tr); }
.sidebar-logo:hover .logo-img { transform: scale(1.05); filter: invert(1) drop-shadow(0 0 12px var(--gold)); }

.snav-item {
    position: relative;
    overflow: hidden;
}
.snav-item::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    width: 3px; height: 0;
    background: var(--gold);
    border-radius: 0 3px 3px 0;
    transform: translateY(-50%);
    transition: height var(--tr);
    box-shadow: 0 0 8px var(--gold);
}
.snav-item.active::before { height: 60%; }
.snav-item.active {
    background: linear-gradient(90deg, rgba(243,207,87,.12), rgba(243,207,87,.04));
    border-color: rgba(243,207,87,.18);
    box-shadow: inset 0 0 0 1px rgba(243,207,87,.06);
}
.snav-item:hover { transform: translateX(2px); }

/* ── TOPBAR : glassmorphism subtil ──────────────────────── */
.topbar {
    background: linear-gradient(180deg, rgba(29,29,39,.92), rgba(29,29,39,.80));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.topbar-title {
    background: linear-gradient(90deg, var(--text), var(--text2));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── CARDS génériques : profondeur + hover gold-glow ────── */
.card {
    background: linear-gradient(180deg, var(--bg2), var(--bg2) 60%, rgba(21,21,29,.6));
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--tr), box-shadow var(--tr), transform var(--tr);
}
.card:hover {
    border-color: var(--border3);
    box-shadow: var(--shadow);
}
.card.elevate { box-shadow: var(--shadow); }
.card.gold-edge {
    border-color: rgba(243,207,87,.25);
    box-shadow: 0 0 0 1px rgba(243,207,87,.08), var(--shadow);
}

/* ── BOUTONS : meilleurs états + glow ───────────────────── */
.btn {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: opacity var(--tr-fast), transform var(--tr-fast), box-shadow var(--tr), background var(--tr);
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.12), transparent 50%);
    opacity: 0;
    transition: opacity var(--tr);
    pointer-events: none;
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: translateY(1px) scale(.98); }

.btn-primary {
    background: linear-gradient(180deg, var(--gold3), var(--gold) 50%, var(--gold2));
    color: #1a1a00;
    box-shadow: 0 2px 0 var(--gold2), 0 0 0 1px rgba(0,0,0,.1), 0 0 24px rgba(243,207,87,.16);
    text-shadow: 0 1px 0 rgba(255,255,255,.2);
}
.btn-primary:hover {
    box-shadow: 0 2px 0 var(--gold2), 0 0 0 1px rgba(0,0,0,.1), 0 0 32px rgba(243,207,87,.28);
    opacity: 1;
}

.btn-danger {
    background: linear-gradient(180deg, #ff7676, var(--red) 50%, var(--red2));
    box-shadow: 0 2px 0 var(--red2), 0 0 24px rgba(237,94,94,.2);
}
.btn-danger:hover { box-shadow: 0 2px 0 var(--red2), 0 0 32px rgba(237,94,94,.4); opacity: 1; }

.btn-ghost {
    background: var(--bg3);
    border: 1px solid var(--border2);
}
.btn-ghost:hover {
    background: var(--bg4);
    border-color: var(--border3);
}

.btn-success {
    background: linear-gradient(180deg, #7df0a4, var(--green) 50%, #3fb368);
    color: #001a08;
    box-shadow: 0 2px 0 #3fb368, 0 0 24px var(--green-glow);
}

/* ── FORMULAIRES : meilleur focus + transitions ─────────── */
.field input, .field textarea, .field select, .inline-form input,
input[type=text], input[type=number], input[type=password], input[type=email],
input[type=datetime-local], input[type=date], input[type=time],
textarea, select {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 10px 13px;
    font-size: .9rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--tr), background var(--tr), box-shadow var(--tr);
}
.field input:hover, .field textarea:hover, .field select:hover,
input:hover, textarea:hover, select:hover {
    border-color: var(--border3);
}
.field input:focus, .field textarea:focus, .field select:focus,
input:focus, textarea:focus, select:focus {
    border-color: var(--gold);
    background: var(--bg2);
    box-shadow: 0 0 0 3px rgba(243,207,87,.12);
}
textarea { line-height: 1.5; resize: vertical; min-height: 80px; }

/* Champs invalides */
input:invalid:not(:placeholder-shown),
input.is-invalid, select.is-invalid, textarea.is-invalid {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(237,94,94,.12);
}

/* ── LABELS améliorés ───────────────────────────────────── */
.field label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 2px;
}

/* ── TOGGLE switch agrandi avec animation ───────────────── */
.toggle-slider::before {
    box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.toggle input:checked + .toggle-slider {
    box-shadow: 0 0 12px rgba(243,207,87,.2);
}
.toggle input:checked + .toggle-slider::before {
    box-shadow: 0 1px 4px rgba(0,0,0,.4), 0 0 6px var(--gold);
}

/* ── TABS : underline glow ──────────────────────────────── */
.tab {
    position: relative;
    font-weight: 600;
    transition: color var(--tr);
}
.tab.active {
    text-shadow: 0 0 12px rgba(243,207,87,.3);
}
.tab.active::after {
    content: '';
    position: absolute;
    left: 18px; right: 18px; bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    box-shadow: 0 0 8px var(--gold);
}

/* ── BADGES améliorés ───────────────────────────────────── */
.badge {
    border: 1px solid currentColor;
    border-color: transparent;
    font-weight: 700;
    text-transform: uppercase;
    font-size: .68rem;
    letter-spacing: .06em;
    padding: 3px 9px;
}
.badge-green  { background: var(--green-glow); color: var(--green); border-color: rgba(91,224,138,.3); }
.badge-red    { background: var(--red-glow);   color: var(--red);   border-color: rgba(237,94,94,.3); }
.badge-orange { background: rgba(245,158,78,.15); color: var(--orange); border-color: rgba(245,158,78,.3); }
.badge-yellow { background: var(--gold-glow); color: var(--gold); border-color: rgba(243,207,87,.3); }
.badge-blue   { background: var(--blue-glow); color: var(--blue); border-color: rgba(95,176,235,.3); }
.badge-purple { background: rgba(178,118,238,.15); color: var(--purple); border-color: rgba(178,118,238,.3); }
.badge-grey   { background: rgba(106,106,130,.15); color: var(--text2); border-color: var(--border2); }

/* ── GUILD CARDS : effet hologramme au hover ────────────── */
.guild-card {
    position: relative;
    isolation: isolate;
}
.guild-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, transparent, rgba(243,207,87,.4), transparent 50%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--tr);
    z-index: 1;
    pointer-events: none;
}
.guild-card:hover::before { opacity: 1; }
.guild-card-banner {
    background:
        linear-gradient(135deg, var(--bg4) 0%, var(--bg3) 50%, var(--bg4) 100%);
    position: relative;
    overflow: hidden;
}
.guild-card-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(45deg, transparent 0 12px, rgba(255,255,255,.015) 12px 24px);
}
.guild-card.featured .guild-card-banner {
    background:
        linear-gradient(135deg, rgba(243,207,87,.08), rgba(243,207,87,.02));
}

/* ── STAT TILES : icônes colorées + glow ────────────────── */
.stat-tile { position: relative; overflow: hidden; }
.stat-tile::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 80px; height: 80px;
    background: radial-gradient(circle, var(--gold-glow), transparent 70%);
    opacity: 0;
    transition: opacity var(--tr);
}
.stat-tile:hover::before { opacity: 1; }
.stat-tile-icon {
    background: linear-gradient(135deg, var(--bg3), var(--bg4));
    border: 1px solid var(--border2);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.stat-tile-val {
    background: linear-gradient(180deg, #fff, var(--text2));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
}

/* ── TABLE : meilleures séparations + hover ─────────────── */
table { font-variant-numeric: tabular-nums; }
th {
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .06em;
    font-weight: 700;
    color: var(--muted);
    background: linear-gradient(180deg, var(--bg2), transparent);
    position: sticky; top: 0; z-index: 1;
}
tbody tr { transition: background var(--tr-fast); }
tbody tr:hover td { background: rgba(243,207,87,.025); }

/* ── FEATURE CARDS améliorées ───────────────────────────── */
.feature-card {
    position: relative;
    transition: border-color var(--tr), background var(--tr), transform var(--tr);
}
.feature-card:hover { transform: translateY(-1px); border-color: var(--border3); }
.feature-card.active {
    background: linear-gradient(180deg, var(--bg2), rgba(243,207,87,.02));
    border-color: rgba(243,207,87,.3);
    box-shadow: 0 0 0 1px rgba(243,207,87,.05);
}
.feature-card.inactive { background: var(--bg2); }

/* ── QUICK LINKS améliorés ──────────────────────────────── */
.quick-link {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg2), var(--bg2) 60%, var(--bg3));
}
.quick-link::after {
    content: '→';
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%) translateX(8px);
    color: var(--gold);
    opacity: 0;
    transition: opacity var(--tr), transform var(--tr);
    font-weight: 700;
}
.quick-link:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }
.quick-link .ql-icon {
    transition: transform var(--tr);
}
.quick-link:hover .ql-icon { transform: scale(1.15) rotate(-5deg); }

/* ── ALERTS améliorés ───────────────────────────────────── */
.alert {
    /* IMPORTANT : pas de display:flex sinon chaque <strong>/<code>/<em>
       devient une colonne au lieu de rester inline dans le texte. */
    display: block !important;
    padding: 14px 18px;
    border-radius: var(--radius);
    border-width: 1px;
    border-style: solid;
    font-weight: 500;
    line-height: 1.55;
    animation: alertSlide .3s ease;
}
/* Securite : forcer le texte a rester inline meme si quelqu'un applique flex */
.alert p, .alert > p { margin: 0; line-height: 1.6; display: block; }
.alert code, .alert strong, .alert em { display: inline; white-space: normal; }
@keyframes alertSlide { from { opacity: 0; transform: translateY(-6px); } }
.alert-success { background: var(--green-glow); border-color: rgba(91,224,138,.3); color: var(--green); }
.alert-error   { background: var(--red-glow);   border-color: rgba(237,94,94,.3);  color: var(--red); }
.alert-info    { background: var(--blue-glow);  border-color: rgba(95,176,235,.3); color: var(--blue); }
.alert-warning { background: var(--gold-glow);  border-color: rgba(243,207,87,.3); color: var(--gold); }

/* ── TOAST polish ───────────────────────────────────────── */
.toast {
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(21,21,29,.92);
    padding: 14px 20px;
    font-weight: 500;
    min-width: 240px;
    display: flex; align-items: center; gap: 10px;
    border-left: 3px solid var(--gold);
    border-radius: 8px;
}
.toast.toast-error { border-left-color: var(--red); }
.toast.toast-success { border-left-color: var(--green); }
.toast.toast-info { border-left-color: var(--blue); }

/* ── EMPTY STATES améliorés ─────────────────────────────── */
.empty-state {
    background: var(--bg2);
    border: 1px dashed var(--border2);
    border-radius: var(--radius-lg);
    padding: 60px 24px;
}
.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: .6;
    animation: float 4s ease-in-out infinite;
    display: inline-block;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ── LOGIN PAGE polish ──────────────────────────────────── */
.login-page {
    background:
        radial-gradient(circle at 20% 30%, rgba(243,207,87,.06), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(178,118,238,.05), transparent 50%),
        radial-gradient(ellipse at center, #1a1a2e 0%, var(--bg) 70%);
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent 0 60px, rgba(243,207,87,.02) 60px 61px),
        repeating-linear-gradient(90deg, transparent 0 60px, rgba(243,207,87,.02) 60px 61px);
    pointer-events: none;
}
.login-box {
    background: linear-gradient(180deg, var(--bg2), var(--bg2) 60%, rgba(243,207,87,.02));
    border: 1px solid var(--border2);
    box-shadow: var(--shadow-lg), 0 0 80px rgba(243,207,87,.05);
    position: relative;
    animation: loginIn .6s cubic-bezier(.2,.8,.2,1);
}
@keyframes loginIn {
    from { opacity: 0; transform: translateY(20px) scale(.97); }
}
.login-box::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(243,207,87,.3), transparent 50%, rgba(178,118,238,.2));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

/* ── SCROLLBAR plus jolie ───────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--border2), var(--border));
    border-radius: 99px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold), var(--gold2));
}

/* ── KBD style ──────────────────────────────────────────── */
kbd {
    display: inline-block;
    padding: 2px 7px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: .78rem;
    color: var(--text2);
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-bottom-width: 2px;
    border-radius: 5px;
    box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
}

/* ── SECTION TITLES améliorés ───────────────────────────── */
.section-title, .cat-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}
.section-title::before {
    content: '';
    width: 3px; height: 14px;
    background: linear-gradient(180deg, var(--gold), var(--gold2));
    border-radius: 2px;
    box-shadow: 0 0 6px var(--gold-glow);
}

/* ── CODE blocks (IDs, etc.) ─────────────────────────────── */
code {
    font-family: 'JetBrains Mono', 'SF Mono', 'Courier New', monospace;
    font-size: .82em;
    padding: 2px 7px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text2);
    transition: background var(--tr-fast), color var(--tr-fast), border-color var(--tr-fast);
}
code:hover { background: var(--gold-glow); color: var(--gold); border-color: rgba(243,207,87,.3); }

/* ── PAGE HEADER amélioré ───────────────────────────────── */
.page-header {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.page-header h2 {
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--gold3), var(--gold));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── FORM CARD (réutilisable) ────────────────────────────── */
.form-card {
    background: linear-gradient(180deg, var(--bg2), var(--bg2) 60%, rgba(21,21,29,.4));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}
.form-card h3 {
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

/* ── DIVIDER renforcé ───────────────────────────────────── */
.divider {
    border-top: 1px solid var(--border);
    background: linear-gradient(90deg, transparent, var(--border2), transparent);
    height: 1px;
    border: none;
}

/* ── LOG ENTRY améliorations ────────────────────────────── */
.log-entry {
    transition: border-color var(--tr-fast), background var(--tr-fast), transform var(--tr-fast);
}
.log-entry:hover {
    background: var(--bg3);
    transform: translateX(2px);
}

/* ── MOD-LIST améliorations ──────────────────────────────── */
.mod-item {
    transition: border-color var(--tr-fast), background var(--tr-fast);
}
.mod-item:hover { border-color: var(--border3); background: var(--bg3); }

/* ── ENTRÉE DE PAGE animée ──────────────────────────────── */
.content > * {
    animation: contentIn .35s cubic-bezier(.2,.8,.2,1) backwards;
}
.content > *:nth-child(1) { animation-delay: 0ms; }
.content > *:nth-child(2) { animation-delay: 30ms; }
.content > *:nth-child(3) { animation-delay: 60ms; }
.content > *:nth-child(4) { animation-delay: 90ms; }
.content > *:nth-child(5) { animation-delay: 120ms; }
.content > *:nth-child(6) { animation-delay: 150ms; }
@keyframes contentIn {
    from { opacity: 0; transform: translateY(8px); }
}

/* ── PREFERS-REDUCED-MOTION : on coupe tout ─────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ── UTILITAIRES additionnels ───────────────────────────── */
.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.flex { display: flex; } .flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.flex-1 { flex: 1; } .flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-red  { color: var(--red); }
.text-green{ color: var(--green); }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* ── CHIP / TAG ─────────────────────────────────────────── */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: 99px;
    font-size: .78rem;
    color: var(--text2);
    transition: all var(--tr-fast);
}
.chip:hover { border-color: var(--gold); color: var(--text); }
.chip.active { background: var(--gold-glow); border-color: var(--gold); color: var(--gold); font-weight: 600; }

/* ── DROPDOWN MENU générique ────────────────────────────── */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px); right: 0;
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    min-width: 180px;
    z-index: 100;
    display: none;
    animation: dropIn .15s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-4px); } }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text);
    font-size: .87rem;
    cursor: pointer;
    transition: background var(--tr-fast);
}
.dropdown-item:hover { background: var(--bg3); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: var(--red-glow); }

/* ── SPINNER ────────────────────────────────────────────── */
.spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid var(--border2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.spinner.lg { width: 32px; height: 32px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FOCUS visible refined ──────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 4px;
}
button:focus-visible, a:focus-visible {
    box-shadow: 0 0 0 3px rgba(243,207,87,.25);
}

/* ── DETAILS / SUMMARY ──────────────────────────────────── */
details {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
summary {
    cursor: pointer;
    padding: 12px 16px;
    font-weight: 600;
    background: var(--bg2);
    list-style: none;
    transition: background var(--tr-fast);
}
summary::-webkit-details-marker { display: none; }
summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 8px;
    color: var(--gold);
    transition: transform var(--tr);
}
details[open] summary::before { transform: rotate(90deg); }
summary:hover { background: var(--bg3); }
details > *:not(summary) { padding: 14px 16px; border-top: 1px solid var(--border); }

/* ── MODAL polish ───────────────────────────────────────── */
.modal-overlay { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal-box {
    background: linear-gradient(180deg, var(--bg2), var(--bg2) 70%, rgba(243,207,87,.02));
    box-shadow: var(--shadow-lg), 0 0 60px rgba(243,207,87,.06);
}

/* ── PREVIEW BANNER amélioré ─────────────────────────────── */
.preview-banner {
    background: linear-gradient(90deg, transparent, var(--blue-glow), transparent);
    border-bottom: 1px solid var(--blue);
    box-shadow: 0 0 20px rgba(95,176,235,.15);
}
.owner-banner {
    background: linear-gradient(90deg, var(--red-glow), transparent 50%, var(--red-glow));
    border: 1px solid rgba(237,94,94,.3);
    box-shadow: 0 0 30px rgba(237,94,94,.05);
}

/* ── SANCTION CHIPS (déjà existants) — boost ────────────── */
.sanction-chip.active {
    background: linear-gradient(180deg, var(--gold-glow), rgba(243,207,87,.06));
    box-shadow: 0 0 12px rgba(243,207,87,.15);
}

/* ── PROGRESS bar avec glow ─────────────────────────────── */
progress::-webkit-progress-value {
    background: linear-gradient(90deg, var(--gold2), var(--gold), var(--gold3));
    box-shadow: 0 0 8px var(--gold-glow);
}

/* ── GUILD CARD readonly (visiteur / sans permissions) ───── */
.guild-card.readonly {
    opacity: .72;
    filter: saturate(.7);
}
.guild-card.readonly:hover {
    opacity: 1;
    filter: saturate(.9);
    border-color: var(--muted);
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.guild-card.readonly .guild-card-banner {
    filter: grayscale(.5);
}

/* ── SIDEBAR : section labels ───────────────────────────── */
.snav-section-label {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    padding: 14px 14px 6px;
}
.snav-section-label:first-child { padding-top: 4px; }

/* ── SIDEBAR : navigation par-serveur ───────────────────── */
/* La nav scrolle en interne → le pied (statut/user) reste épinglé en bas */
.sidebar-nav { overflow-y: auto; }
.server-back {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 10px 14px 2px; padding: 4px 0;
    font-size: .72rem; font-weight: 600; color: var(--muted);
    transition: color var(--tr), transform var(--tr);
}
.server-back:hover { color: var(--gold); transform: translateX(-2px); }
.server-head {
    display: flex; align-items: center; gap: 9px;
    padding: 2px 16px 12px; margin: 2px 0 4px;
    border-bottom: 1px solid var(--border);
}
.server-head-icon {
    font-size: 1.05rem; flex-shrink: 0;
    filter: drop-shadow(0 0 8px var(--gold-glow));
}
.server-head-name {
    font-size: .95rem; font-weight: 800; color: var(--text);
    letter-spacing: -0.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── LIGHT MODE polish ──────────────────────────────────── */
html.light .topbar-title,
html.light .stat-tile-val,
html.light .page-header h2 {
    -webkit-text-fill-color: var(--text);
    background: none;
}
html.light .btn-primary { color: #1a1a00; }
html.light body {
    background:
        radial-gradient(ellipse at top, rgba(243,207,87,.1), transparent 50%),
        var(--bg);
}
