/* ═══════════════════════════════════════════════════════════
   MODEX — clean minimal theme
   ═══════════════════════════════════════════════════════════ */
:root { --bg: #0A0A0C; --bg-surface: #0F0F12; --bg-elev: #141418; --bg-hover: #1A1A1F; --border: rgba(255,255,255,0.06); --border-hi: rgba(255,255,255,0.12); --text: #F5F5F7; --text-soft: #A1A1AA; --text-mute: #71717A; --accent: #7C7CFF; --accent-hi: #9A9AFF; --accent-soft: rgba(124,124,255,0.1); --success: #4ADE80; --danger: #F87171; --radius: 8px; --radius-lg: 12px; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif; font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
button { font-family: inherit; }
/* ─── NAV ─── */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(10,10,12,0.8); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; }
.brand-logo { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), #A78BFA); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; }
.nav-links { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.nav-link { padding: 7px 12px; border-radius: 6px; color: var(--text-soft); font-weight: 500; transition: color 0.12s, background 0.12s; }
.nav-link:hover { color: var(--text); background: var(--bg-hover); }
.nav-user { display: flex; align-items: center; gap: 10px; margin-left: 8px; padding-left: 14px; border-left: 1px solid var(--border); font-size: 13px; }
.nav-user img { width: 24px; height: 24px; border-radius: 50%; }
.nav-user-name { color: var(--text-soft); }
.nav-logout { color: var(--text-mute); font-size: 12px; padding: 6px 10px; border-radius: 6px; transition: color 0.12s, background 0.12s; }
.nav-logout:hover { color: var(--danger); background: rgba(248,113,113,0.08); }
/* ─── BUTTONS ─── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; font-size: 13.5px; font-weight: 500; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; white-space: nowrap; line-height: 1; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.btn-primary { background: #fff; color: #0A0A0C; border-color: #fff; }
.btn-primary:hover { background: #E4E4E7; transform: translateY(-1px); }
.btn-secondary { background: var(--bg-elev); color: var(--text); border-color: var(--border-hi); }
.btn-secondary:hover { background: var(--bg-hover); border-color: rgba(255,255,255,0.18); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 11px 20px; font-size: 14px; }
/* ─── MAIN ─── */
.main { max-width: 1120px; margin: 0 auto; padding: 4rem 24px 6rem; }
/* ─── PAGE HEADER ─── */
.page-head { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.page-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-mute); margin-bottom: 14px; }
.page-eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 8px; color: var(--text); }
.page-desc { font-size: 15px; color: var(--text-soft); max-width: 560px; margin: 0; line-height: 1.55; }
/* ─── FOOTER ─── */
.footer { border-top: 1px solid var(--border); margin-top: 6rem; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 1.75rem 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--text-mute); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-mute); transition: color 0.12s; }
.footer-links a:hover { color: var(--text-soft); }
/* ─── RESPONSIVE ─── */
@media (max-width: 720px) {
.nav-inner { padding: 0 16px; height: 54px; }
.nav-link { padding: 6px 9px; font-size: 12.5px; }
.nav-user-name { display: none; }
.nav-user { padding-left: 10px; margin-left: 4px; gap: 6px; }
.main { padding: 2.5rem 16px 4rem; }
.page-title { font-size: 22px; }
.page-desc { font-size: 14px; }
}
/* ─── HERO ─── */
.hero { padding: 3rem 0 4rem; max-width: 720px; }
.hero-title { font-size: clamp(2.25rem, 5.5vw, 3.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.04em; margin: 0 0 1.25rem; color: #fff; }
.hero-title em { font-style: normal; background: linear-gradient(135deg, #7C7CFF 0%, #A78BFA 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { font-size: 1.0625rem; color: var(--text-soft); line-height: 1.6; max-width: 540px; margin: 0 0 2rem; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
/* ─── STATS BAR ─── */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 4rem; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color 0.15s, background 0.15s; }
.stat:hover { border-color: var(--border-hi); background: var(--bg-elev); }
.stat-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; color: #fff; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
/* ─── SECTIONS ─── */
.section { margin-top: 6rem; }
.section-head { margin-bottom: 2.5rem; max-width: 560px; }
.section-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.025em; margin: 0 0 8px; color: #fff; }
.section-desc { font-size: 15px; color: var(--text-soft); margin: 0; line-height: 1.55; }
/* ─── FEATURES (3 only) ─── */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.feature { padding: 1.5rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color 0.15s, background 0.15s; }
.feature:hover { border-color: var(--border-hi); background: var(--bg-elev); }
.feature-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-hi); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.feature-title { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; color: #fff; }
.feature-desc { font-size: 13.5px; color: var(--text-soft); margin: 0; line-height: 1.55; }
/* ─── CTA FINAL ─── */
.cta-final { margin-top: 6rem; padding: 3rem 2rem; border: 1px solid var(--border); border-radius: 20px; background: var(--bg-surface); text-align: center; position: relative; overflow: hidden; }
.cta-final::before { content: ''; position: absolute; top: -50%; left: 50%; transform: translateX(-50%); width: 600px; height: 300px; background: radial-gradient(ellipse at center, rgba(124,124,255,0.12), transparent 70%); pointer-events: none; }
.cta-final > * { position: relative; }
.cta-final h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.025em; margin: 0 0 8px; color: #fff; }
.cta-final p { font-size: 15px; color: var(--text-soft); margin: 0 0 1.75rem; }
.cta-final .hero-cta { justify-content: center; }
/* ─── RESPONSIVE LANDING ─── */
@media (max-width: 720px) {
.hero { padding: 2rem 0 3rem; }
.hero-sub { font-size: 1rem; }
.stats-bar { grid-template-columns: repeat(2, 1fr); gap: 10px; }
.section { margin-top: 4rem; }
.section-title { font-size: 1.25rem; }
.features { grid-template-columns: 1fr; }
.cta-final { padding: 2rem 1.5rem; margin-top: 4rem; }
.cta-final h2 { font-size: 1.25rem; }
}
/* ─── CRUMBS ─── */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-mute); margin-bottom: 1.5rem; }
.crumbs a { color: var(--text-mute); transition: color 0.12s; }
.crumbs a:hover { color: var(--text-soft); }
.crumbs-sep { color: var(--border-hi); }
/* ─── LISTE SERVEURS (dashboard) ─── */
.guild-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.guild { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--bg-surface); transition: background 0.12s; }
.guild:hover { background: var(--bg-elev); }
.guild-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-elev); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--accent-hi); overflow: hidden; flex-shrink: 0; }
.guild-icon img { width: 100%; height: 100%; object-fit: cover; }
.guild-body { flex: 1; min-width: 0; }
.guild-name { font-size: 14px; font-weight: 500; color: var(--text); letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-meta { font-size: 12px; color: var(--text-mute); margin-top: 2px; font-variant-numeric: tabular-nums; }
.guild-arrow { color: var(--text-mute); transition: color 0.12s, transform 0.15s; }
.guild:hover .guild-arrow { color: var(--accent-hi); transform: translateX(2px); }
/* ─── EMPTY STATE ─── */
.empty { padding: 3rem 2rem; background: var(--bg-surface); border: 1px dashed var(--border-hi); border-radius: var(--radius-lg); text-align: center; }
.empty-icon { width: 44px; height: 44px; margin: 0 auto 1rem; border-radius: 10px; background: var(--bg-elev); display: flex; align-items: center; justify-content: center; color: var(--text-mute); }
.empty-title { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.empty-desc { font-size: 13px; color: var(--text-soft); max-width: 420px; margin: 0 auto; line-height: 1.55; }
/* ─── PAGE SERVEUR — header ─── */
.server-head { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.server-identity { display: flex; align-items: center; gap: 14px; }
.server-icon { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-elev); object-fit: cover; flex-shrink: 0; }
.server-icon.letter { display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; color: var(--accent-hi); }
.server-identity h1 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 3px; color: var(--text); }
.server-meta { font-size: 12.5px; color: var(--text-mute); font-variant-numeric: tabular-nums; }
/* ─── LAYOUT SERVEUR ─── */
.server-layout { display: grid; grid-template-columns: 190px 1fr; gap: 2.5rem; align-items: start; }
.server-nav { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 8px 11px; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--text-soft); background: transparent; border: none; border-radius: 6px; cursor: pointer; text-align: left; width: 100%; transition: color 0.12s, background 0.12s; }
.nav-item:hover { color: var(--text); background: var(--bg-hover); }
.nav-item.active { color: var(--text); background: var(--bg-elev); }
.nav-item.active svg { color: var(--accent-hi); }
.server-content { min-width: 0; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
/* ─── SECTIONS SERVEUR ─── */
.section-head { margin-bottom: 1.75rem; }
.section-title { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 5px; color: var(--text); }
.section-desc { font-size: 13px; color: var(--text-soft); margin: 0; line-height: 1.55; }
/* ─── CARDS ─── */
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.card { padding: 1.25rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card-info { background: var(--bg); border-style: dashed; }
.card-preview { background: var(--bg); }
.card-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; color: var(--text); }
.card-desc { font-size: 12.5px; color: var(--text-soft); margin: 0 0 1.25rem; line-height: 1.55; }
/* ─── FORMULAIRES ─── */
.card form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 12px; font-weight: 500; color: var(--text-soft); }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
input[type="text"], input[type="number"], input[type="search"],
input[type="password"], textarea, select { width: 100%; padding: 8px 11px; font-family: inherit; font-size: 13px; color: var(--text); background: var(--bg-elev); border: 1px solid var(--border-hi); border-radius: 6px; outline: none; transition: border-color 0.12s, background 0.12s, box-shadow 0.12s; -webkit-appearance: none; appearance: none; line-height: 1.4; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); background: var(--bg-surface); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: var(--text-mute); }
textarea { resize: vertical; min-height: 72px; font-family: inherit; }
select { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; cursor: pointer; }
select option { background: var(--bg-elev); color: var(--text); }
input[type="checkbox"] { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border: 1px solid var(--border-hi); background: var(--bg-elev); border-radius: 4px; cursor: pointer; position: relative; flex-shrink: 0; transition: background 0.12s, border-color 0.12s; }
input[type="checkbox"]:hover { border-color: var(--accent); }
input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::after { content: ''; position: absolute; left: 5px; top: 1px; width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.switch { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text); transition: background 0.12s, border-color 0.12s; }
.switch:hover { background: var(--bg-hover); border-color: var(--border-hi); }
.switch input[type="checkbox"] { margin: 0; }
.tag-opt, .tag-req { display: inline-block; font-size: 10px; font-weight: 500; padding: 2px 6px; border-radius: 4px; margin-left: 6px; text-transform: uppercase; letter-spacing: 0.03em; vertical-align: middle; }
.tag-opt { color: var(--text-mute); background: var(--bg-elev); border: 1px solid var(--border); }
.tag-req { color: var(--danger); background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.25); }
.kv { display: flex; flex-direction: column; }
.kv > div { display: flex; align-items: center; justify-content: space-between; font-size: 13px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.kv > div:last-child { border-bottom: none; }
.kv span { color: var(--text-soft); }
.kv strong { color: var(--text); font-weight: 500; }
.kv strong.ok { color: var(--success); }
.hint { font-size: 11.5px; color: var(--text-mute); margin: 0; line-height: 1.6; }
.hint.warn { padding: 10px 12px; background: rgba(248,113,113,0.06); border: 1px solid rgba(248,113,113,0.15); border-radius: 6px; color: var(--text-soft); margin-top: 12px; }
.hint code, .card-desc code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; padding: 1px 5px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 4px; color: var(--accent-hi); }
.code-block { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; line-height: 1.75; padding: 12px 14px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 6px; color: var(--text-soft); margin: 0 0 12px; overflow-x: auto; white-space: pre; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 4px; }
.steps li { counter-increment: step; position: relative; padding: 6px 0 6px 28px; font-size: 12.5px; color: var(--text-soft); line-height: 1.55; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 6px; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 50%; color: var(--text-soft); }
.color-preview { width: 100%; height: 34px; border-radius: 6px; border: 1px solid var(--border-hi); transition: background 0.15s; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
/* ─── RESPONSIVE SERVEUR ─── */
@media (max-width: 900px) {
.server-layout { grid-template-columns: 1fr; gap: 1rem; }
.server-nav { position: static; flex-direction: row !important;
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    gap: 4px !important;
    padding-bottom: 12px !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid var(--border) !important; }
.nav-item { width: auto !important; flex: 0 0 auto !important;
    white-space: nowrap !important;
    font-size: 12.5px !important;
    padding: 6px 10px !important; }
.nav-item svg { display: none; }
.panel-grid, .field-grid, .two-col { grid-template-columns: 1fr; }
}
/* ─── APERÇU DISCORD EMBED ─── */
.discord-embed { display: flex; background: #2B2D31; border-radius: 4px; overflow: hidden; font-family: 'gg sans', 'Noto Sans', Helvetica, Arial, sans-serif; font-size: 14px; color: #DBDEE1; line-height: 1.375; }
.discord-embed-bar { width: 4px; flex-shrink: 0; background: #5865F2; transition: background 0.15s; }
.discord-embed-body { padding: 12px 16px; flex: 1; min-width: 0; }
.discord-embed-author { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: #F2F3F5; margin-bottom: 8px; }
.discord-embed-avatar { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #5865F2, #7C7CFF); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; }
.discord-embed-title { font-size: 16px; font-weight: 600; color: #F2F3F5; margin-bottom: 8px; }
.discord-embed-content { color: #DBDEE1; font-size: 14px; line-height: 1.375; white-space: pre-wrap; word-wrap: break-word; }
.discord-embed-content strong { color: #F2F3F5; font-weight: 700; }
.discord-embed-footer { font-size: 12px; color: #949BA4; margin-top: 12px; }
/* ─── AUTONOTIFY ─── */
.notify-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; transition: border-color 0.12s, background 0.12s; }
.notify-row:hover { border-color: var(--border-hi); background: var(--bg-hover); }
.notify-info { display: flex; align-items: center; gap: 12px; }
.notify-icon { font-size: 18px; }
.notify-name { font-size: 13px; font-weight: 500; color: var(--text); }
.notify-meta { font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.notify-actions { display: flex; gap: 6px; }
.btn-toggle, .btn-remove { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 13px; background: transparent; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; transition: background 0.12s, border-color 0.12s; }
.btn-toggle:hover { background: var(--bg-surface); border-color: var(--border-hi); }
.btn-remove:hover { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.4); }
/* ─── TOAST ─── */
.toast { position: fixed; bottom: 24px; right: 24px; padding: 12px 18px; font-size: 13px; font-weight: 500; border-radius: 8px; background: var(--bg-elev); border: 1px solid var(--border-hi); color: var(--text); box-shadow: 0 12px 32px -8px rgba(0,0,0,0.7); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 999; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { border-color: rgba(74,222,128,0.4); background: rgba(74,222,128,0.08); color: var(--success); }
.toast.err { border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.08); color: var(--danger); }
/* ─── SAVE BAR ─── */
.save-bar { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 20px; background: var(--bg-elev); border: 1px solid var(--border-hi); border-radius: 999px; box-shadow: 0 12px 32px -8px rgba(0,0,0,0.7); z-index: 500; animation: saveBarIn 0.2s cubic-bezier(0.4,0,0.2,1); }
@keyframes saveBarIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.save-bar[hidden] { display: none; }
.save-bar-status { font-size: 13px; color: var(--text-soft); }
.save-bar-status.ok { color: var(--success); }
.save-bar-status.err { color: var(--danger); }
/* ─── RESPONSIVE FINAL ─── */
@media (max-width: 720px) {
.toast { bottom: 16px; right: 16px; left: 16px; }
.save-bar { left: 16px; right: 16px; transform: none; border-radius: 10px; }
.save-bar[hidden] { display: none; }
@keyframes saveBarIn { from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); } }
}
/* ─── APERÇU DISCORD RÉALISTE ─── */
.discord-preview-wrap { background: #313338; padding: 16px; border-radius: 8px; border: 1px solid var(--border); }
.discord-preview-wrap .discord-embed { max-width: none; }
.discord-embed-bar { width: 4px; flex-shrink: 0; background: #5865F2; transition: background 0.15s; border-radius: 4px 0 0 4px; }
.discord-embed-body { padding: 12px 16px 14px; flex: 1; min-width: 0; }
.discord-embed-main { min-width: 0; }
.discord-embed-author { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: #F2F3F5; margin-bottom: 8px; line-height: 1.2; }
.discord-embed-avatar { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #5865F2, #7C7CFF); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; }
.discord-embed-title { font-size: 16px; font-weight: 600; color: #F2F3F5; margin-bottom: 8px; line-height: 1.3; }
.discord-embed-fields { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.discord-embed-field { flex: 1 1 100%; min-width: 0; }
.discord-embed-field.inline { flex: 1 1 calc(33.33% - 6px); }
.discord-embed-field-name { font-size: 13.5px; font-weight: 600; color: #F2F3F5; margin-bottom: 2px; }
.discord-embed-field-value { font-size: 13.5px; color: #DBDEE1; line-height: 1.3; }
.discord-embed-footer { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #949BA4; margin-top: 12px; line-height: 1.2; }
.discord-embed-footer-icon { width: 20px; height: 20px; border-radius: 50%; background: #5865F2; flex-shrink: 0; }
.discord-embed-timestamp { color: #949BA4; }
/* ─── BARRE DE TEST ─── */
.test-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.5rem; flex-wrap: wrap; }
.test-bar-label { font-size: 12.5px; color: var(--text-mute); font-weight: 500; }
.test-select { padding: 6px 10px !important; font-size: 12.5px !important; min-width: 180px; max-width: 240px; }
@media (max-width: 720px) {
.test-bar { padding: 8px 10px; }
.test-select { min-width: 0; flex: 1; }
}
/* ═══════════════════════════════════════════
   THÈME CLAIR
   ═══════════════════════════════════════════ */
:root[data-theme="light"] { --bg: #FAFAFA; --bg-surface: #FFFFFF; --bg-elev: #F4F4F5; --bg-hover: #ECECEE; --border: rgba(0,0,0,0.08); --border-hi: rgba(0,0,0,0.14); --text: #18181B; --text-soft: #52525B; --text-mute: #A1A1AA; --accent: #6366F1; --accent-hi: #4F46E5; --accent-soft: rgba(99,102,241,0.1); --success: #16A34A; --danger: #DC2626; }
:root[data-theme="light"] body { background: var(--bg); color: var(--text); }
:root[data-theme="light"] .nav { background: rgba(250,250,250,0.85); }
:root[data-theme="light"] .brand-logo { background: linear-gradient(135deg, #6366F1, #A78BFA); }
:root[data-theme="light"] .btn-primary { background: #18181B; color: #FAFAFA; border-color: #18181B; }
:root[data-theme="light"] .btn-primary:hover { background: #27272A; }
:root[data-theme="light"] .hero-title,
:root[data-theme="light"] .page-title,
:root[data-theme="light"] .section-title,
:root[data-theme="light"] .card-title,
:root[data-theme="light"] .stat-value,
:root[data-theme="light"] .feature-title,
:root[data-theme="light"] .empty-title,
:root[data-theme="light"] .server-identity h1 { color: var(--text); }
:root[data-theme="light"] .hero-title em { background: linear-gradient(135deg, #6366F1, #8B5CF6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
:root[data-theme="light"] .cta-final { background: #F4F4F5; }
:root[data-theme="light"] .discord-preview-wrap { background: #E8E8EA; }
:root[data-theme="light"] .toast { background: #FFFFFF; }
:root[data-theme="light"] .save-bar { background: #FFFFFF; }
/* ─── BOUTON TOGGLE ─── */
.theme-toggle { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; background: transparent; border: 1px solid var(--border-hi); border-radius: 7px; color: var(--text-soft); cursor: pointer; transition: background 0.12s, color 0.12s, border-color 0.12s; flex-shrink: 0; }
.theme-toggle:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-hi); }
.theme-toggle svg { pointer-events: none; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
/* ─── BOUTON DISCORD ─── */
.btn-discord { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; font-size: 13px; font-weight: 500; background: #5865F2; color: #fff; border: 1px solid #5865F2; border-radius: 7px; cursor: pointer; transition: background 0.15s, transform 0.1s; line-height: 1; }
.btn-discord:hover { background: #4752C4; border-color: #4752C4; transform: translateY(-1px); }
:root[data-theme="light"] .btn-discord { background: #5865F2; color: #fff; }
:root[data-theme="light"] .btn-discord:hover { background: #4752C4; }
/* ═══════════════════════════════════════════
   FIX MOBILE — pleine largeur, pas de zoom
   ═══════════════════════════════════════════ */
html, body { width: 100%; max-width: 100vw; overflow-x: hidden; }
.main { width: 100%; max-width: 100%; }
input, select, textarea, button { max-width: 100%; font-size: 16px; /* évite le zoom auto sur iOS */ }
pre, .code-block { max-width: 100%; overflow-x: auto; }
.discord-embed, .discord-preview-wrap { max-width: 100%; }
img, video, svg { max-width: 100%; height: auto; }
@media (max-width: 720px) {
.main { max-width: 100% !important;
    padding: 1.5rem 12px 4rem !important; }
.nav-inner { max-width: 100% !important;
    padding: 0 12px !important; }
.footer-inner { padding: 1.5rem 12px !important; }
.panel-grid { grid-template-columns: 1fr !important;
    gap: 12px !important; }
.card { padding: 16px !important; }
.field-grid { grid-template-columns: 1fr !important; }
input, select, textarea { font-size: 15px !important;
    padding: 10px 12px !important; }
.server-nav { gap: 4px !important;
    margin-bottom: 16px !important; }
.nav-item { font-size: 12px !important;
    padding: 6px 9px !important; }
.section-title { font-size: 15px !important; }
.section-desc { font-size: 12.5px !important; }
}
/* ═══════════════════════════════════════════
   NAV MOBILE — burger menu
   ═══════════════════════════════════════════ */
.burger { display: none; width: 38px; height: 38px; padding: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; color: var(--text); cursor: pointer; align-items: center; justify-content: center; transition: background 0.12s, border-color 0.12s; }
.burger:hover { background: var(--bg-hover); border-color: var(--border-hi); }
@media (max-width: 720px) {
.nav-inner { height: 56px;
    position: relative; }
.burger { display: flex; }
.nav-links { display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px -8px rgba(0,0,0,0.5);
    z-index: 40; }
body.menu-open .nav-links { display: flex !important; }
.nav-links > a,
  .nav-links > .btn,
  .nav-links > .btn-discord { display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    text-align: left;
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text);
    box-sizing: border-box; }
.nav-links > a:hover,
  .nav-links > .btn:hover,
  .nav-links > .btn-discord:hover { background: var(--bg-hover); }
.nav-links .btn-discord { background: #5865F2 !important;
    color: #fff !important;
    justify-content: center;
    margin-top: 4px; }
.nav-links .btn-discord:hover { background: #4752C4 !important; }
.nav-links .btn-primary { background: #fff !important;
    color: #0A0A0C !important;
    border-color: #fff !important;
    justify-content: center;
    margin-top: 4px; }
.nav-links .btn-primary:hover { background: #E4E4E7 !important; }
.nav-links .theme-toggle { width: 100%;
    height: 44px;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: none;
    background: transparent;
    font-size: 14px;
    border-radius: 8px; }
.nav-links .theme-toggle::after { content: 'Basculer le thème';
    font-size: 14px;
    font-weight: 500;
    margin-left: 4px; }
.nav-links .theme-toggle:hover { background: var(--bg-hover); }
  /* User avatar dans le menu */
.nav-links .nav-user { display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 8px; }
.nav-links .nav-user img { display: none; }
.nav-links .nav-user-name { display: block;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 500; }
.nav-links .nav-user-logout { display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--danger) !important; }
.nav-links .nav-user-logout:hover { background: rgba(248,113,113,0.1); }
}
/* ═══════════════════════════════════════════
   FIX NAV MOBILE — user visible
   ═══════════════════════════════════════════ */
@media (max-width: 720px) {
body.menu-open .nav-links { display: flex !important; }
  /* Bloc utilisateur en bas du menu */
.nav-links .nav-user { display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin: 6px 0 0 0 !important;
    padding: 12px 14px !important;
    border-left: none !important;
    border-top: 1px solid var(--border) !important;
    border-radius: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important; }
  /* Avatar visible */
.nav-links .nav-user img { display: block !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important; }
  /* Pseudo visible */
.nav-links .nav-user-name { display: block !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--text) !important;
    flex: 1 !important;
    padding: 0 !important; }
  /* Déconnexion visible en dessous */
.nav-links .nav-user-logout { display: block !important;
    position: absolute !important;
    /* On le met en bas du menu */ }
  /* En fait, on va plutôt le mettre après le pseudo, en dessous */
.nav-links .nav-user-logout { position: static !important;
    display: block !important;
    width: 100% !important;
    padding: 12px 14px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: var(--danger) !important;
    background: transparent !important;
    text-align: left !important;
    margin-top: 4px !important;
    box-sizing: border-box !important; }
.nav-links .nav-user-logout:hover { background: rgba(248,113,113,0.1) !important; }
}
/* ─── UPLOAD D'IMAGES ─── */
.upload-zone { border: 2px dashed var(--border-hi); border-radius: var(--radius); padding: 20px; text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; background: var(--bg-elev); position: relative; }
.upload-zone:hover { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone input[type="file"] { display: none; }
.upload-zone-text { font-size: 13px; color: var(--text-soft); line-height: 1.5; }
.upload-zone-text strong { color: var(--text); display: block; margin-bottom: 4px; font-size: 14px; }
.upload-zone-text small { font-size: 11px; color: var(--text-mute); }
.upload-preview { margin-top: 12px; border-radius: var(--radius); border: 1px solid var(--border); max-width: 100%; max-height: 200px; object-fit: cover; display: block; }
.upload-preview[hidden] { display: none; }
.upload-progress { margin-top: 10px; height: 4px; background: var(--bg-hover); border-radius: 2px; overflow: hidden; }
.upload-progress[hidden] { display: none; }
.upload-progress-bar { height: 100%; background: var(--accent); width: 0; transition: width 0.2s; }
/* ═══ STATS ═══ */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { padding: 20px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; }
.stat-card-label { font-size: 12px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; font-weight: 500; }
.stat-card-value { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; color: #fff; }
.chart-wrap { padding: 20px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 16px; }
@media (max-width: 720px) {
.stats-grid { grid-template-columns: 1fr; }
.stat-card-value { font-size: 24px; }
}
.chart-title { font-size: 0.95rem; color: #aaa; margin: 0 0 10px 0; font-weight: 500; }
.chart-wrap { max-height: 260px; height: 260px; padding: 10px 0; }
.chart-wrap canvas { max-height: 220px !important; height: 220px !important; }
.stat-card { padding: 12px 16px; }
.stat-card-value { font-size: 1.5rem; }
.stats-grid { gap: 10px; }