/* ═══════════════════════════════════════════════════════════════
   MODEX — modex-refresh.css  (v6 · refonte interface)
   À charger APRÈS style.css et light-theme.css.
   ═══════════════════════════════════════════════════════════════ */
/* ─── 1. Jetons de design ───────────────────────────────────── */
:root { --bg: #0B0B10; --bg-surface: #12121A; --bg-card: var(--bg-surface); --bg-elev: #191922; --bg-hover: #22222E; --border: rgba(255,255,255,0.08); --border-hi: rgba(255,255,255,0.16); --text: #EEEEF4; --text-soft: #A9A9BC; --text-mute: #8585A0; --accent: #7C7CFF; --accent-hi: #A5A5FF; --accent-soft: rgba(124,124,255,0.14); --accent-btn: #6464F0; --accent-btn-hi: #7676FF; --success: #34D399; --warning: #FBBF24; --danger: #F87171; --danger-btn: #DC2626; --radius: 10px; --radius-lg: 16px; --radius-sm: 7px; --shadow-sm: 0 1px 2px rgba(0,0,0,0.30); --shadow-md: 0 6px 18px rgba(0,0,0,0.34); --shadow-lg: 0 20px 48px rgba(0,0,0,0.46); --ease: cubic-bezier(.4,0,.2,1); --font-display: 'Bricolage Grotesque', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif; --font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif; --nav-h: 60px; --nav-bg: rgba(11,11,16,0.94); --wrap: 1240px; }
:root[data-theme="light"] { --bg: #F5F5FA; --bg-surface: #FFFFFF; --bg-elev: #F1F1F7; --bg-hover: #E7E7F0; --border: rgba(20,20,45,0.10); --border-hi: rgba(20,20,45,0.20); --text: #15151E; --text-soft: #4E4E63; --text-mute: #6C6C84; --accent: #5B5BFF; --accent-hi: #4444DC; --accent-soft: rgba(91,91,255,0.10); --accent-btn: #4F4FE8; --accent-btn-hi: #4141D6; --success: #047857; --warning: #B45309; --danger: #C81E1E; --danger-btn: #DC2626; --shadow-sm: 0 1px 2px rgba(20,20,45,0.06); --shadow-md: 0 6px 18px rgba(20,20,45,0.09); --shadow-lg: 0 20px 48px rgba(20,20,45,0.14); --nav-bg: rgba(245,245,250,0.94); }
/* ─── 2. Base ───────────────────────────────────────────────── */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
@supports (overflow: clip) {
html, body { overflow-x: clip; }
}
body { font-family: var(--font-body); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv02","cv03","cv04","cv11"; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(ellipse 70% 40% at 50% -15%, rgba(124,124,255,0.10), transparent 70%); }
html[data-theme="light"] body::before { background: radial-gradient(ellipse 70% 40% at 50% -15%, rgba(91,91,255,0.07), transparent 70%); }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.main { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 2.5rem 24px 4rem; }
body:has(.save-bar:not([hidden])) .main { padding-bottom: 7rem; }
/* ─── 3. Barre de navigation ────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 60; background: var(--nav-bg); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--border); padding-top: env(safe-area-inset-top, 0px); }
:root[data-theme="light"] .nav { background: var(--nav-bg); }
.nav-inner { position: relative; max-width: var(--wrap); height: var(--nav-h); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); min-height: 44px; }
img.brand-logo,
:root[data-theme="light"] .brand-logo,
header.nav img.brand-logo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: block; background: transparent !important; background-image: none !important; box-shadow: none !important; border: 0 !important; outline: 0 !important; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; }
.nav-main, .nav-tools, .nav-account { display: flex; align-items: center; gap: 4px; }
.nav-tools { gap: 8px; }
.nav-account { gap: 8px; padding-left: 18px; border-left: 1px solid var(--border); }
.nav-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--radius); color: var(--text-soft); font-weight: 500; transition: color .15s var(--ease), background .15s var(--ease); }
.nav-link:hover { color: var(--text); background: var(--bg-hover); }
.nav-link[aria-current="page"] { color: var(--text); background: var(--accent-soft); }
.nav-user { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; border: 0; }
.nav-user img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.nav-user-name { color: var(--text); font-weight: 500; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-logout { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; border-radius: var(--radius); color: var(--text-mute); font-size: 13px; transition: color .15s var(--ease), background .15s var(--ease); }
.nav-logout:hover { color: var(--danger); background: rgba(248,113,113,0.10); }
.lang-selector { position: relative; display: inline-flex; align-items: center; }
.lang-current { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; background: transparent; border: 1px solid var(--border-hi); border-radius: var(--radius); font-size: 18px; line-height: 1; color: var(--text); cursor: pointer; transition: background .15s var(--ease), border-color .15s var(--ease); }
.lang-current:hover { background: var(--bg-hover); }
.lang-menu { position: absolute; top: calc(100% + 8px); right: 0; display: none; z-index: 100; min-width: 190px; padding: 6px; background: var(--bg-card); border: 1px solid var(--border-hi); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.lang-menu.open { display: block; }
.lang-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 12px; background: transparent; border: 0; border-radius: var(--radius-sm); color: var(--text); font-size: 14.5px; text-align: left; cursor: pointer; }
.lang-menu button:hover { background: var(--bg-hover); }
.lang-menu button[aria-current="true"] { background: var(--accent-soft); color: var(--accent-hi); font-weight: 600; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 40px; height: 40px; padding: 0; background: transparent; border: 1px solid var(--border-hi); border-radius: var(--radius); color: var(--text-soft); cursor: pointer; flex-shrink: 0; transition: background .15s var(--ease), color .15s var(--ease); }
.theme-toggle:hover { background: var(--bg-hover); color: var(--text); }
.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; }
.theme-toggle-label { display: none; font-size: 15px; font-weight: 500; color: var(--text); }
.nav-links .theme-toggle::after { content: none !important; }
.btn-discord { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; font-size: 14px; font-weight: 600; background: #5865F2; color: #fff; border: 1px solid #5865F2; border-radius: var(--radius); cursor: pointer; line-height: 1; transition: background .15s var(--ease), transform .1s var(--ease); }
.btn-discord:hover { background: #4752C4; border-color: #4752C4; }
.btn-discord:active { transform: translateY(1px); }
:root[data-theme="light"] .btn-discord { background: #5865F2; color: #fff; }
.btn-discord.btn-lg { min-height: 50px; padding: 0 24px; font-size: 15.5px; }
.burger { display: none; width: 44px; height: 44px; padding: 0; margin-left: auto; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--border-hi); border-radius: var(--radius); color: var(--text); cursor: pointer; transition: background .15s var(--ease); }
.burger:hover { background: var(--bg-hover); }
body.menu-open .burger { background: var(--accent-soft); border-color: var(--accent); }
/* ─── 4. Menu mobile ────────────────────────────────────────── */
@media (max-width: 720px) {
:root { --nav-h: 56px; }
.nav-inner { padding: 0 16px !important; gap: 8px; }
.burger { display: inline-flex; }
.nav-links { position: absolute; top: 100%; left: 0; right: 0;
    max-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px));
    overflow-y: auto; overscroll-behavior: contain;
    flex-direction: column; align-items: stretch; gap: 0;
    margin: 0;
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-hi);
    box-shadow: 0 24px 48px -12px rgba(0,0,0,0.5);
    z-index: 40; }
.nav-main { flex-direction: column; align-items: stretch; gap: 2px; }
.nav-link { min-height: 50px; padding: 0 14px;
    font-size: 16px; border-radius: 12px; }
.nav-tools { flex-direction: column; align-items: stretch; gap: 10px;
    margin-top: 10px; padding-top: 14px;
    border-top: 1px solid var(--border); }
.lang-selector { display: block; width: 100%; }
.lang-current { display: none; }
.lang-menu { position: static; display: flex !important; flex-wrap: wrap; gap: 8px;
    min-width: 0; padding: 0;
    background: transparent; border: 0; box-shadow: none; }
.lang-menu button { flex: 1 1 calc(50% - 8px); width: auto; min-height: 46px;
    justify-content: center; padding: 0 12px;
    border: 1px solid var(--border-hi); border-radius: 12px;
    font-size: 15px; }
.lang-menu button[aria-current="true"] { border-color: var(--accent); }
.nav-links .theme-toggle { width: 100%; height: 50px; justify-content: flex-start;
    padding: 0 14px; border: 1px solid var(--border-hi); border-radius: 12px;
    background: transparent; font-size: 15px; }
.theme-toggle-label { display: inline; }
.nav-account { flex-direction: column; align-items: stretch; gap: 4px;
    margin-top: 10px; padding: 10px 0 0; border-left: 0;
    border-top: 1px solid var(--border); }
.nav-logout { min-height: 50px; padding: 0 14px;
    font-size: 15px; border-radius: 12px; color: var(--danger); }
.nav-account .btn-discord { width: 100%; min-height: 50px; font-size: 15.5px; }
.nav-account .nav-user { border: 0 !important; margin: 0 !important; padding: 8px 14px !important; background: transparent !important; }
}
/* ─── 5. Pied de page ───────────────────────────────────────── */
.footer { margin-top: 4rem; border-top: 1px solid var(--border); }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 1.75rem 24px calc(1.75rem + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; color: var(--text-mute); }
.footer-links { display: flex; gap: 8px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; color: var(--text-soft); border-radius: var(--radius-sm); transition: color .15s var(--ease), background .15s var(--ease); }
.footer-links a:hover { color: var(--text); background: var(--bg-hover); }
/* ─── 6. Boutons ────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; font-size: 14.5px; font-weight: 600; line-height: 1; letter-spacing: 0; border: 1px solid transparent; border-radius: 12px; cursor: pointer; white-space: nowrap; transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .1s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 15.5px; }
.btn-primary,
:root[data-theme="light"] .btn-primary { background: var(--accent-btn); color: #fff; border-color: var(--accent-btn); }
.btn-primary:hover,
:root[data-theme="light"] .btn-primary:hover { background: var(--accent-btn-hi); border-color: var(--accent-btn-hi); transform: none; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-hi); }
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--text-mute); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(248,113,113,0.45); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-danger:hover { background: var(--danger-btn); border-color: var(--danger-btn); color: #fff; }
/* ─── 7. En-têtes de page, fil d'Ariane, états vides ────────── */
.crumbs { display: flex; align-items: center; flex-wrap: nowrap; gap: 4px 8px; margin-bottom: 1.25rem; font-size: 13px; color: var(--text-mute); }
.crumbs a, .crumbs-sep { flex-shrink: 0; }
.crumbs > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--text-soft); transition: color .15s var(--ease); }
.crumbs a:hover { color: var(--text); }
.crumbs-sep { color: var(--border-hi); }
.page-head { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.page-title { font-family: var(--font-display); font-size: clamp(1.75rem, 4.5vw, 2.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 8px; color: var(--text); }
.page-desc { max-width: 62ch; margin: 0; font-size: 16px; line-height: 1.55; color: var(--text-soft); }
.page-desc strong { color: var(--text); font-weight: 600; }
.page-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 12px 6px 10px; font-size: 13px; color: var(--text-soft); background: var(--bg-surface); border: 1px solid var(--border); border-radius: 999px; }
.page-eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(52,211,153,0.22); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); }
.empty { padding: 3rem 1.5rem; text-align: center; background: var(--bg-surface); border: 1px dashed var(--border-hi); border-radius: var(--radius-lg); }
.empty-icon { width: 48px; height: 48px; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--bg-elev); color: var(--text-mute); }
.empty-title { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--text); }
.empty-desc { max-width: 44ch; margin: 0 auto; font-size: 14.5px; line-height: 1.55; color: var(--text-soft); }
.empty-desc strong { color: var(--text); font-weight: 600; }
/* ─── 8. Liste des serveurs (index.html) ────────────────────── */
.guild-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; background: none; border: 0; border-radius: 0; overflow: visible; }
.guild { display: flex; align-items: center; gap: 14px; min-height: 74px; padding: 12px 16px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color .15s var(--ease), background .15s var(--ease); }
.guild:hover { background: var(--bg-elev); border-color: var(--accent); }
.guild-icon { width: 48px; height: 48px; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg-elev); border: 1px solid var(--border); font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--accent-hi); }
.guild-icon img { width: 100%; height: 100%; object-fit: cover; }
.guild-body { flex: 1; min-width: 0; }
.guild-name { font-size: 15.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-meta { margin-top: 2px; font-size: 12.5px; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.guild-arrow { color: var(--text-mute); transition: color .15s var(--ease), transform .15s var(--ease); }
.guild:hover .guild-arrow { color: var(--accent-hi); transform: translateX(3px); }
/* ─── 9. Landing ────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); grid-template-areas: "copy visual" "stats stats"; gap: 2.5rem 3.5rem; align-items: center; max-width: none; padding: 2.5rem 0 1rem; }
.hero-copy { grid-area: copy; min-width: 0; }
.hero-visual { grid-area: visual; min-width: 0; }
.hero-title { font-family: var(--font-display); font-size: clamp(2.5rem, 6.4vw, 4.25rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; margin: 0 0 1.25rem; color: var(--text); }
.hero-sub { max-width: 52ch; margin: 0 0 2rem; font-size: 17.5px; line-height: 1.6; color: var(--text-soft); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-mock { position: relative; padding: 18px 18px 20px; background: #313338; border: 1px solid rgba(255,255,255,0.06); border-radius: 18px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.2); font-family: 'gg sans', 'Noto Sans', Helvetica, Arial, sans-serif; color: #DBDEE1; transform: rotate(1.2deg); }
.hero-mock-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.hero-mock-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #1E1F22; flex-shrink: 0; }
.hero-mock-name { font-weight: 600; font-size: 16px; color: #F2F3F5; }
.hero-mock-tag { margin-left: 6px; padding: 1px 5px; border-radius: 4px; background: #5865F2; color: #fff; font-size: 10.5px; font-weight: 700; vertical-align: 2px; }
.hero-mock-time { margin-left: 8px; font-size: 12px; color: #949BA4; }
.hero-mock .discord-embed { margin-left: 52px; max-width: none; background: #2B2D31; }
.hero-mock .discord-embed-bar { background: var(--accent); }
.hero-mock .discord-embed-title { font-size: 17px; }
.hero-mock-fields { display: flex; gap: 32px; margin-top: 12px; }
.hero-mock-field-name { font-size: 12px; font-weight: 700; color: #F2F3F5; }
.hero-mock-field-value { font-size: 14px; color: #DBDEE1; font-variant-numeric: tabular-nums; }
.stats-bar { grid-area: stats; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 1.5rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat,
.stat:hover { display: flex; flex-direction: column; gap: 4px; padding: 22px 20px; background: transparent; border: 0; border-left: 1px solid var(--border); border-radius: 0; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-value { font-family: var(--font-display); font-size: clamp(1.75rem, 4.5vw, 2.5rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--text); }
.stat-label { font-size: 13.5px; color: var(--text-mute); text-transform: none; letter-spacing: 0; font-weight: 500; }
.section { margin-top: 5.5rem; }
.section > .section-head { max-width: 60ch; margin: 0 0 2.25rem; padding: 0; border: 0; }
.section > .section-head .section-title { font-family: var(--font-display); font-size: clamp(1.6rem, 3.6vw, 2.25rem) !important; font-weight: 700; line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 10px; padding: 0; color: var(--text); }
.section > .section-head .section-desc { font-size: 16.5px !important; line-height: 1.55; color: var(--text-soft); max-width: none; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.5rem; }
.feature,
.feature:hover { padding: 26px 0 30px; background: transparent; border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.feature:hover { border-top-color: var(--accent); }
.feature-icon { width: 42px; height: 42px; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-hi); }
.feature-title { margin: 0 0 6px; font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
.feature-desc { margin: 0; max-width: 40ch; font-size: 15px; line-height: 1.6; color: var(--text-soft); }
.steps-grid .feature-icon { border-radius: 50%; background: transparent; border: 1.5px solid var(--accent); color: var(--accent-hi); font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.cta-final { position: relative; overflow: hidden; margin-top: 5.5rem; padding: 3.5rem 1.5rem; text-align: center; background: var(--bg-surface); border: 1px solid var(--border-hi); border-radius: 24px; }
:root[data-theme="light"] .cta-final { background: var(--bg-surface); }
.cta-final::before { content: ""; position: absolute; top: -60%; left: 50%; transform: translateX(-50%); width: 620px; max-width: 100%; height: 320px; pointer-events: none; background: radial-gradient(ellipse at center, var(--accent-soft), transparent 70%); }
.cta-final > * { position: relative; }
.cta-final h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: clamp(1.6rem, 3.6vw, 2.25rem); font-weight: 700; letter-spacing: -0.03em; color: var(--text); }
.cta-final p { max-width: 46ch; margin: 0 auto 1.75rem; font-size: 16.5px; color: var(--text-soft); }
.cta-final .hero-cta { justify-content: center; }
@media (max-width: 900px) {
.hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "visual" "stats"; gap: 2rem; padding-top: 1rem; }
.hero-mock { transform: none; max-width: 520px; }
.features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
.hero-sub { font-size: 16.5px; margin-bottom: 1.5rem; }
.hero-cta .btn { flex: 1 1 100%; }
.hero-mock { padding: 14px 12px 16px; }
.hero-mock .discord-embed { margin-left: 0; }
.stats-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat:nth-child(odd) { border-left: 0; padding-left: 0; }
.stat:nth-child(n+3) { border-top: 1px solid var(--border); }
.section, .cta-final { margin-top: 4rem; }
.features { grid-template-columns: minmax(0, 1fr); }
.feature { padding: 22px 0 24px; }
.cta-final { padding: 2.5rem 1.25rem; border-radius: 20px; }
.cta-final .hero-cta .btn { flex: 1 1 100%; }
}
/* ─── 10. Page serveur : en-tête + disposition ──────────────── */
.server-head { margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.server-identity { display: flex; align-items: center; gap: 16px; }
.server-icon { width: 54px; height: 54px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-elev); object-fit: cover; }
.server-icon.letter { display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--accent-hi); }
.server-identity h1 { margin: 0 0 2px; font-family: var(--font-display); font-size: clamp(1.35rem, 4vw, 1.85rem); font-weight: 700; letter-spacing: -0.025em; color: var(--text); }
.server-identity > div:last-child { min-width: 0; }
.server-identity h1 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.server-meta { font-size: 13.5px; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.server-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.server-content { min-width: 0; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: modex-panel-in .18s var(--ease) both; }
@keyframes modex-panel-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* ─── 11. Navigation latérale ───────────────────────────────── */
.server-nav { position: sticky; top: calc(var(--nav-h) + 20px); max-height: calc(100dvh - var(--nav-h) - 40px); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 4px; padding-right: 4px; scrollbar-width: thin; }
.nav-search-wrap { position: relative; margin: 0 0 8px; }
.nav-search { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; background: var(--bg-elev); border: 1px solid var(--border-hi); border-radius: var(--radius); color: var(--text-mute); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.nav-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--accent-hi); }
.nav-search input,
.nav-search input[type="text"] { flex: 1; min-width: 0; min-height: 0; padding: 0 !important; margin: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none; color: var(--text); font-family: inherit; font-size: 15px !important; }
.nav-search input::placeholder { color: var(--text-mute); }
.nav-search-suggestions { display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 100; max-height: 300px; overflow-y: auto; padding: 4px; background: var(--bg-card); border: 1px solid var(--border-hi); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.nav-search-suggestions.open { display: block; }
.nav-search-suggestion { display: block; width: 100%; min-height: 44px; padding: 8px 12px; background: transparent; border: 0; border-radius: var(--radius-sm); color: var(--text); font-family: inherit; font-size: 14.5px; text-align: left; cursor: pointer; }
.nav-search-suggestion:hover,
.nav-search-suggestion.active { background: var(--accent-soft); color: var(--accent-hi); }
.nav-search-suggestion .sugg-cat { display: block; margin-top: 1px; font-size: 12px; color: var(--text-mute); }
.nav-search-suggestion mark { background: transparent; color: var(--accent-hi); font-weight: 700; }
.nav-group.hidden-by-search { display: none !important; }
.nav-item.hidden-by-search { display: none !important; }
.nav-group { margin: 0; }
.nav-group-title { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; background: transparent; border: 0; border-radius: var(--radius); color: var(--text-soft); font-family: inherit; font-size: 14.5px; font-weight: 600; letter-spacing: 0; text-transform: none; text-align: left; cursor: pointer; transition: color .15s var(--ease), background .15s var(--ease); }
.nav-group-title:hover { background: var(--bg-hover); color: var(--text); }
.nav-group-title > svg:first-child { color: var(--text-mute); }
.nav-group-title .nav-group-chevron { margin-left: auto; opacity: .7; transition: transform .2s var(--ease); }
.nav-group.open .nav-group-title { color: var(--text); }
.nav-group.open .nav-group-title > svg:first-child { color: var(--accent-hi); }
.nav-group.open .nav-group-title .nav-group-chevron { transform: rotate(180deg); }
.nav-group-items { display: none; flex-direction: column; gap: 2px; margin: 2px 0 10px 22px; padding: 2px 0 2px 10px; border-left: 1px solid var(--border); }
.nav-group.open .nav-group-items { display: flex; }
.nav-item { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 0 12px; background: transparent; border: 0; border-radius: var(--radius-sm); color: var(--text-soft); font-family: inherit; font-size: 14.5px; font-weight: 500; text-align: left; cursor: pointer; transition: color .15s var(--ease), background .15s var(--ease); }
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-hi); font-weight: 600; }
.server-nav-toggle { display: none; }
@media (max-width: 900px) {
.server-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.server-nav { position: static; max-height: none; overflow: visible;
    flex-direction: column !important; flex-wrap: nowrap !important;
    gap: 4px !important; padding: 6px !important; margin: 0 !important;
    background: var(--bg-surface);
    border: 1px solid var(--border) !important; border-radius: var(--radius-lg); }
.server-nav .nav-item { width: 100% !important; flex: none !important;
    min-height: 46px; padding: 0 14px !important;
    font-size: 15px !important; white-space: normal !important; }
.server-nav .nav-group-items { margin-left: 18px; }
.server-nav-toggle { display: flex; align-items: center; gap: 12px;
    width: 100%; min-height: 50px; padding: 0 14px;
    background: transparent; border: 0; border-radius: calc(var(--radius-lg) - 4px);
    color: var(--text); font-family: inherit; font-size: 16px; font-weight: 600; text-align: left; cursor: pointer; }
.server-nav-toggle:hover { background: var(--bg-hover); }
.server-nav-toggle > svg:first-child { color: var(--accent-hi); }
.server-nav-toggle-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-nav-toggle .chev { color: var(--text-mute); transition: transform .2s var(--ease); }
.server-nav.nav-open .server-nav-toggle .chev { transform: rotate(180deg); }
.server-nav.js-collapsible:not(.nav-open) > *:not(.server-nav-toggle) { display: none; }
.server-nav.nav-open .server-nav-toggle { margin-bottom: 4px; border-bottom: 1px solid var(--border); border-radius: calc(var(--radius-lg) - 4px) calc(var(--radius-lg) - 4px) 0 0; }
.server-content, .tab-panel { scroll-margin-top: calc(var(--nav-h) + 12px); }
}
/* ─── 12. Panneaux : titres, cartes ─────────────────────────── */
.tab-panel > .section-head,
.tab-panel .section-head { max-width: none; margin: 0 0 1.5rem; padding: 0 0 1.1rem; border-bottom: 1px solid var(--border); }
.tab-panel .section-title { margin: 0 0 6px; padding: 0; font-family: var(--font-display); font-size: clamp(1.4rem, 3.4vw, 1.75rem) !important; font-weight: 700; letter-spacing: -0.025em; color: var(--text); }
.tab-panel .section-desc { max-width: 64ch; font-size: 14.5px !important; line-height: 1.55; color: var(--text-soft); }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: start; }
.card { position: relative; padding: 22px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: none; transition: border-color .2s var(--ease); }
.card::after { content: none; }
.card:hover { border-color: var(--border-hi); }
.card-info { background: transparent; border-style: dashed; }
.card-preview { background: var(--bg); }
.card-title { margin: 0 0 4px; font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
.card-desc { margin: 0 0 18px; font-size: 14px; line-height: 1.55; color: var(--text-soft); }
.card form { display: flex; flex-direction: column; gap: 14px; }
/* ─── 13. Formulaires ───────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { display: block; margin: 0; font-size: 14px; font-weight: 500; color: var(--text); }
.field-grid, .two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.tag-opt, .tag-req { display: inline; margin-left: 6px; padding: 0; background: none; border: 0; font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none; vertical-align: baseline; }
.tag-opt { color: var(--text-mute); }
.tag-req { color: var(--danger); }
input[type="text"], input[type="number"], input[type="search"], input[type="password"],
input[type="url"], input[type="email"], textarea, select { width: 100%; min-height: 44px; padding: 10px 12px; font-family: inherit; font-size: 15px; line-height: 1.4; color: var(--text); background-color: var(--bg-elev); border: 1px solid var(--border-hi); border-radius: var(--radius); outline: none; transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s var(--ease); }
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); background-color: var(--bg-surface); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: var(--text-mute); }
select { padding-right: 34px; cursor: pointer; }
select option { background: var(--bg-card); color: var(--text); }
input[type="color"] { min-height: 44px; padding: 4px; border-radius: var(--radius); border: 1px solid var(--border-hi); background: var(--bg-elev); cursor: pointer; }
input[type="checkbox"] { -webkit-appearance: none; appearance: none; position: relative; flex-shrink: 0; width: 20px; height: 20px; margin: 0; padding: 0 !important; background: var(--bg-elev); border: 1.5px solid var(--border-hi); border-radius: 6px; cursor: pointer; transition: background .15s var(--ease), border-color .15s var(--ease); }
input[type="checkbox"]:hover { border-color: var(--accent); }
input[type="checkbox"]:checked { background: var(--accent-btn); border-color: var(--accent-btn); }
input[type="checkbox"]:checked::after { content: ""; position: absolute; left: 5.5px; top: 1.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.switch { display: flex !important; flex-direction: row-reverse !important; align-items: center; justify-content: space-between !important; gap: 16px; min-height: 54px; padding: 10px 14px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease); }
.switch:hover { border-color: var(--border-hi); }
.switch > span { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; line-height: 1.35; color: var(--text); }
.switch input[type="checkbox"] { width: 44px; height: 26px; border-radius: 999px; border-width: 1px; background: var(--bg-hover); border-color: var(--border-hi); }
.switch input[type="checkbox"]::after,
.switch input[type="checkbox"]:checked::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--text-mute); transform: none; transition: transform .18s var(--ease), background .18s var(--ease); }
.switch input[type="checkbox"]:checked { background: var(--accent-btn); border-color: var(--accent-btn); }
.switch input[type="checkbox"]:checked::after { background: #fff; transform: translateX(18px); }
.kv { display: flex; flex-direction: column; }
.kv > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; font-size: 14.5px; border-bottom: 1px solid var(--border); }
.kv > div:last-child { border-bottom: 0; }
.kv span { color: var(--text-soft); }
.kv strong { color: var(--text); font-weight: 600; }
.kv strong.ok { color: var(--success); }
.hint { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-mute); }
.hint.warn { margin-top: 12px; padding: 12px 14px; color: var(--text-soft); background: color-mix(in srgb, var(--danger) 8%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); border-radius: var(--radius); }
.hint code, .card-desc code, .switch-block code { padding: 2px 6px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 5px; color: var(--accent-hi); }
.code-block { margin: 0 0 12px; padding: 14px 16px; overflow-x: auto; white-space: pre; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; line-height: 1.75; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-soft); }
.steps { list-style: none; counter-reset: step; margin: 0 0 4px; padding: 0; }
.steps li { position: relative; counter-increment: step; padding: 7px 0 7px 32px; font-size: 14px; line-height: 1.55; color: var(--text-soft); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 7px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; color: var(--accent-hi); border: 1.5px solid var(--accent); border-radius: 50%; }
.color-preview { width: 100%; height: 40px; border: 1px solid var(--border-hi); border-radius: var(--radius); transition: background .15s var(--ease); }
.color-palette button { min-width: 36px; min-height: 36px; }
.upload-zone { position: relative; padding: 22px; text-align: center; cursor: pointer; background: var(--bg-elev); border: 2px dashed var(--border-hi); border-radius: var(--radius); transition: border-color .15s var(--ease), background .15s var(--ease); }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone input[type="file"] { display: none; }
.upload-zone-text { font-size: 14px; line-height: 1.5; color: var(--text-soft); }
.upload-zone-text strong { display: block; margin-bottom: 4px; font-size: 15px; color: var(--text); }
.upload-zone-text small { font-size: 12.5px; color: var(--text-mute); }
.upload-preview { display: block; max-width: 100%; max-height: 200px; margin-top: 12px; object-fit: cover; border: 1px solid var(--border); border-radius: var(--radius); }
.upload-progress { height: 5px; margin-top: 10px; overflow: hidden; background: var(--bg-hover); border-radius: 3px; }
.upload-progress-bar { width: 0; height: 100%; background: var(--accent); transition: width .2s var(--ease); }
.discord-preview-wrap { padding: 16px; background: #313338; border: 1px solid var(--border); border-radius: var(--radius); max-width: 100%; }
:root[data-theme="light"] .discord-preview-wrap { background: #E3E5E8; }
.test-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 1.25rem; padding: 12px 14px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); }
.test-bar-label { font-size: 13.5px; font-weight: 500; color: var(--text-mute); }
.test-select { min-width: 180px; max-width: 260px; }
.notify-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; padding: 12px 14px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .15s var(--ease); }
.notify-row:hover { border-color: var(--border-hi); }
.notify-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.notify-name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.notify-meta { margin-top: 2px; font-size: 12.5px; color: var(--text-mute); }
.notify-actions { display: flex; gap: 6px; }
.btn-toggle, .btn-remove { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: background .15s var(--ease), border-color .15s var(--ease); }
.btn-toggle:hover { background: var(--bg-hover); border-color: var(--border-hi); }
.btn-remove:hover { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.45); }
/* ─── 14. Retours : toast + barre d'enregistrement ──────────── */
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 999; max-width: min(92vw, 420px); padding: 13px 18px; font-size: 14.5px; font-weight: 500; color: var(--text); background: var(--bg-card); border: 1px solid var(--border-hi); border-radius: var(--radius); box-shadow: var(--shadow-lg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 45%, transparent); background: color-mix(in srgb, var(--success) 10%, var(--bg-card)); }
.toast.err { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 10%, var(--bg-card)); }
.save-bar { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 500; display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 20px; background: var(--bg-card); border: 1px solid var(--border-hi); border-radius: 999px; box-shadow: var(--shadow-lg); transform: translateX(-50%); }
.save-bar[hidden] { display: none !important; }
.save-bar-status { font-size: 14.5px; color: var(--text-soft); }
.save-bar-status.ok { color: var(--success); }
.save-bar-status.err { color: var(--danger); }
@media (max-width: 720px) {
.toast { top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 10px); bottom: auto; left: 12px; right: 12px; max-width: none;
    transform: translateY(-12px); }
.toast.show { transform: translateY(0); }
.save-bar { left: 0; right: 0; bottom: 0; transform: none;
    justify-content: space-between;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-width: 1px 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: none; }
.save-bar .btn { min-height: 46px; }
}
/* ─── 15. Statistiques ──────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; text-align: left; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.stat-card-label { margin: 0; font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-mute); }
.stat-card-value { font-family: var(--font-display); font-size: clamp(1.4rem, 5vw, 2rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--text); }
.chart-wrap { padding: 14px 16px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: none; }
.chart-title { margin: 0 0 10px; font-size: 14.5px; font-weight: 600; color: var(--text-soft); }
@media (max-width: 720px) {
.stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat-card { padding: 12px 12px; }
}
/* ─── 16. Composants alimentés par le JS ───────────────────── */
.shop-item, .perm-row, .as-row, .species-row, .pet-top-row, .tr-row, .partner-row, .tournoi-match, .ref-top-item { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .15s var(--ease); }
.shop-item:hover, .perm-row:hover, .as-row:hover, .tr-row:hover, .partner-row:hover { border-color: var(--border-hi); }
.shop-manager { margin-top: 12px; }
.shop-manager-head { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.shop-items-list { display: flex; flex-direction: column; gap: 10px; }
.shop-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.shop-item-emoji { width: 46px; height: 46px; flex-shrink: 0; font-size: 1.6rem; display: flex; align-items: center; justify-content: center; background: var(--bg-surface); border-radius: var(--radius); }
.shop-item-info { flex: 1; min-width: 0; }
.shop-item-name { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.shop-item-price { color: var(--accent-hi); font-weight: 600; }
.shop-item-desc { margin-top: 2px; font-size: 13.5px; color: var(--text-soft); }
.shop-item-id { margin-top: 2px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--text-mute); }
.shop-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.partners-list { display: flex; flex-direction: column; gap: 10px; }
.partner-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; }
.partner-info { flex: 1; min-width: 0; }
.partner-info strong { font-weight: 600; color: var(--text); }
.partner-url { margin-top: 2px; font-size: 13px; color: var(--accent-hi); overflow-wrap: anywhere; }
.partner-desc { margin-top: 4px; font-size: 13.5px; color: var(--text-soft); }
.shop-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.shop-modal-bg { position: absolute; inset: 0; background: rgba(6,6,12,0.66); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.shop-modal-box { position: relative; z-index: 1; display: flex; flex-direction: column; overflow: hidden; width: 100%; max-width: 520px; max-height: 88vh; max-height: 88dvh; background: var(--bg-card); border: 1px solid var(--border-hi); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.shop-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.shop-modal-header h3 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.shop-modal-close { width: 44px; height: 44px; margin: -6px -10px -6px 0; padding: 0; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; border-radius: var(--radius-sm); font-size: 1.7rem; line-height: 1; color: var(--text-mute); cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.shop-modal-close:hover { background: var(--bg-hover); color: var(--text); }
.shop-modal-form { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.shop-modal-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px; }
.shop-modal-body .field { margin-bottom: 14px; }
.shop-modal-body .field-label { margin-bottom: 6px; }
.shop-sep { margin: 18px 0; border: 0; border-top: 1px solid var(--border); }
.shop-modal-footer { display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--bg-card); border-top: 1px solid var(--border); }
.shop-eff { animation: modex-panel-in .2s var(--ease) both; }
.switch-block { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; cursor: pointer; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .15s var(--ease); }
.switch-block:hover { border-color: var(--border-hi); }
.switch-block input { flex-shrink: 0; margin: 2px 0 0; }
.switch-block span { font-size: 14.5px; line-height: 1.4; color: var(--text); }
.switch-block small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-mute); }
.banner-preview { width: 100%; aspect-ratio: 16 / 9; margin-bottom: 14px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); }
.banner-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.banner-preview .hint { padding: 20px; text-align: center; font-size: 14px; }
.logs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg-elev); border-bottom: 1px solid var(--border); }
.logs-view { margin: 0; padding: 16px; max-height: 70vh; overflow: auto; font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace; font-size: 12.5px; line-height: 1.65; color: var(--text-soft); background: var(--bg-surface); white-space: pre-wrap; overflow-wrap: anywhere; }
.discord-embed-thumbnail { float: right; max-width: 80px; max-height: 80px; margin-left: 12px; overflow: hidden; border-radius: 6px; }
.discord-embed-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.discord-embed-image { max-height: 300px; margin-top: 12px; overflow: hidden; border-radius: 6px; }
.discord-embed-image img { display: block; width: 100%; height: auto; }
.tournoi-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.tournoi-cashprize { margin: 6px 0 12px; padding: 10px 14px; font-size: 14.5px; color: var(--text); background: var(--accent-soft); border-radius: var(--radius); }
.tournoi-players { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.tournoi-player { padding: 6px 12px; font-size: 13.5px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; }
.tournoi-bracket { display: flex; gap: 16px; padding: 12px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tournoi-round { flex-shrink: 0; min-width: 190px; }
.tournoi-round h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--text-mute); }
.tournoi-match { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; padding: 10px 12px; font-size: 14px; }
.tournoi-side { padding: 5px 8px; border-radius: 6px; }
.tournoi-side.win { color: var(--success); font-weight: 600; background: color-mix(in srgb, var(--success) 14%, transparent); }
.tournoi-win { color: var(--success); font-weight: 600; }
.tournoi-vs, .tournoi-match .vs { margin: 2px 0; font-size: 12px; text-align: center; color: var(--text-mute); }
.tournoi-match-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.tournoi-match-actions .btn { min-height: 36px; padding: 0 10px; font-size: 13px; }
.tournoi-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.tournoi-add { display: flex; gap: 8px; margin-top: 12px; }
.tournoi-add input { flex: 1; }
.btn-x { min-width: 36px; min-height: 36px; padding: 0 6px; font-size: 1.2rem; line-height: 1; color: var(--text-mute); background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer; }
.btn-x:hover { color: var(--danger); background: rgba(248,113,113,0.10); }
.tournoi-add-wrap { position: relative; margin-top: 12px; }
.tournoi-search-box { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; color: var(--text-mute); background: var(--bg-elev); border: 1px solid var(--border-hi); border-radius: var(--radius); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.tournoi-search-box:focus-within { color: var(--accent-hi); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tournoi-search-box input, .tournoi-search-box input[type="text"] { flex: 1; min-width: 0; min-height: 0; padding: 0 !important; color: var(--text); background: transparent !important; border: 0 !important; box-shadow: none !important; outline: none; }
.tournoi-search-dropdown { display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50; max-height: 280px; overflow-y: auto; padding: 4px; background: var(--bg-card); border: 1px solid var(--border-hi); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.tournoi-search-dropdown.open { display: block; }
.tournoi-search-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 10px; color: var(--text); font-family: inherit; font-size: 14.5px; text-align: left; background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer; }
.tournoi-search-item:hover, .tournoi-search-item.active { background: var(--accent-soft); }
.tournoi-search-avatar { width: 30px; height: 30px; flex-shrink: 0; background: var(--bg-hover) center/cover no-repeat; border: 1px solid var(--border); border-radius: 50%; }
.tournoi-search-info { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.tournoi-search-info strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tournoi-search-info span { font-size: 12.5px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tournoi-search-info mark { color: var(--accent-hi); font-weight: 700; background: transparent; }
.tournoi-empty { margin: 0; padding: 12px; font-size: 14px; text-align: center; color: var(--text-mute); }
.stat-inline { padding: 9px 0; font-size: 14.5px; border-bottom: 1px solid var(--border); }
.stat-inline:last-child { border-bottom: 0; }
.stat-inline strong { font-size: 1.1rem; color: var(--accent-hi); }
.ref-top-title { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text-mute); }
.ref-top-item { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; padding: 8px 12px; font-size: 14.5px; }
.ref-top-rank { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; font-size: 12.5px; font-weight: 700; color: var(--accent-hi); background: var(--accent-soft); border-radius: 50%; }
.ref-top-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ref-top-count { font-weight: 600; color: var(--accent-hi); }
.game-stats { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.notify-commands { font-size: 14px; line-height: 1.8; color: var(--text-soft); }
.notify-commands p { margin: 4px 0; }
.notify-commands code { padding: 2px 6px; font-size: 12.5px; color: var(--accent-hi); background: var(--bg-elev); border-radius: 5px; }
.dash-cmds-card { grid-column: 1 / -1; }
.dash-cmds-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dash-cmds-list code { padding: 6px 12px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; color: var(--accent-hi); background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; transition: border-color .15s var(--ease); }
.dash-cmds-list code:hover { border-color: var(--accent); }
.notify-platforms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.notify-platform { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 72px; padding: 12px 6px; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-soft); background: var(--bg-elev); border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease); }
.notify-platform:hover { border-color: var(--border-hi); }
.notify-platform.active { color: var(--text); background: var(--accent-soft); border-color: var(--accent); }
.notify-logo { width: 30px !important; height: 30px !important; background: transparent !important; border: 0 !important; }
.notify-del-btn { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; line-height: 1; color: var(--text-mute); background: transparent; border: 1px solid var(--border-hi); border-radius: 50%; cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease); }
.notify-del-btn:hover { color: #fff; background: var(--danger-btn); border-color: var(--danger-btn); }
.perms-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.perms-toolbar > input, .perms-toolbar > select { flex: 1 1 220px; }
.perms-toolbar > button { flex: 0 0 auto; }
.perm-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 8px; padding: 12px 14px; }
.perm-info { flex: 1 1 220px; min-width: 0; }
.perm-name { display: inline-block; padding: 3px 8px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13.5px; font-weight: 600; color: var(--accent-hi); background: var(--bg-surface); border-radius: 6px; overflow-wrap: anywhere; }
.perm-desc { display: block; margin-top: 6px; font-size: 13px; color: var(--text-mute); overflow-wrap: anywhere; }
.perm-controls { display: flex; flex: 1 1 260px; flex-wrap: wrap; gap: 8px; }
.perm-controls select { flex: 1 1 150px; min-height: 40px; font-size: 14px !important; }
.autosanctions-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.as-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; }
.as-info { flex: 1; min-width: 0; font-size: 14.5px; }
.as-info strong { color: var(--accent-hi); }
.as-action { font-weight: 500; color: var(--text); }
.autosanctions-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pets-species, .pets-top { display: flex; flex-direction: column; gap: 8px; }
.pets-top { margin-top: 8px; }
.species-row, .pet-top-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.species-emoji { font-size: 1.4rem; }
.species-name { flex: 1; font-size: 14.5px; }
.species-count { font-weight: 700; color: var(--accent-hi); font-variant-numeric: tabular-nums; }
.pet-top-rank { min-width: 26px; font-weight: 700; color: var(--text-mute); }
.pet-top-emoji { font-size: 1.5rem; }
.pet-top-info { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.pet-top-info strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pet-top-owner { font-size: 12.5px; color: var(--text-mute); }
.pet-top-level { padding: 3px 9px; font-size: 13px; font-weight: 600; color: var(--accent-hi); background: var(--accent-soft); border-radius: 6px; }
.pet-top-xp { font-size: 13px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.tickets-reasons-head { display: block; margin-bottom: 14px; }
.tickets-reasons-head button { margin-top: 10px; }
.tr-row { display: block; width: 100%; margin-bottom: 8px; padding: 14px; }
.tr-info { width: 100%; margin-bottom: 10px; }
.tr-name { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.tr-emoji { display: inline-block; width: 22px; height: 22px; margin-right: 6px; vertical-align: middle; }
.tr-emoji img { width: 22px; height: 22px; vertical-align: middle; }
.tr-meta { margin-top: 6px; font-size: 12.5px; color: var(--text-mute); overflow-wrap: anywhere; }
.tr-actions { display: flex; gap: 8px; width: 100%; }
.tr-actions .btn { flex: 1; min-width: 0; }
.embed-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 12px; }
.embed-editor-form, .embed-editor-preview { min-width: 0; }
.preview-label { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--text-mute); }
/* ─── 17. Responsive : composants ───────────────────────────── */
@media (max-width: 900px) {
.embed-editor { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
.main { padding: 1.5rem 16px 3rem !important; }
.footer-inner { padding: 1.5rem 16px calc(1.5rem + env(safe-area-inset-bottom, 0px)) !important; }
.card { padding: 18px !important; }
.panel-grid { gap: 12px !important; grid-template-columns: minmax(0, 1fr) !important; }
.field-grid, .two-col { grid-template-columns: minmax(0, 1fr) !important; }
select { padding-right: 36px !important; }
.shop-modal { align-items: flex-end; padding: 0; }
.shop-modal-box { max-width: none; max-height: 92vh; max-height: 92dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.shop-item { flex-wrap: wrap; }
.shop-item-actions { width: 100%; }
.shop-item-actions .btn { flex: 1; }
.partner-row, .as-row { flex-wrap: wrap; }
.partner-row .btn { width: 100%; }
.notify-platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pet-top-row { flex-wrap: wrap; }
.pet-top-info { flex: 1 1 100%; margin: 2px 0; }
.autosanctions-actions { flex-direction: column; }
.autosanctions-actions .btn { width: 100%; }
.tournoi-add { flex-direction: column; }
.test-select { max-width: none; min-width: 0; flex: 1; }
}
/* ─── 18. Sélecteur natif : flèche stable ──────────────────── */
:root { --chev: 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='%238585A0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); }
select, select:focus { -webkit-appearance: none; appearance: none; background-image: var(--chev); background-repeat: no-repeat; background-position: right 12px center; }
/* ─── 19. Accessibilité & finitions ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (hover: none) {
.card:hover, .guild:hover, .feature:hover { transform: none; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hi); background-clip: content-box; border: 2px solid transparent; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); background-clip: content-box; }
@media print {
.nav, .footer, .save-bar, .toast, .server-nav, .burger { display: none !important; }
body { background: #fff; color: #000; }
}
/* ─── 20. Connexion + pages d'erreur ───────────────────────── */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - var(--nav-h) - 240px); min-height: calc(100dvh - var(--nav-h) - 240px); padding: 1rem 0; }
.login-card { width: 100%; max-width: 420px; padding: 2.5rem 2rem; text-align: center; background: var(--bg-surface); border: 1px solid var(--border-hi); border-radius: 24px; box-shadow: var(--shadow-md); }
.login-logo { display: block; width: 56px; height: 56px; margin: 0 auto 1.25rem; border-radius: 50%; object-fit: cover; }
.login-title { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; color: var(--text); }
.login-desc { margin: 0 0 1.75rem; font-size: 15.5px; line-height: 1.55; color: var(--text-soft); }
.login-btn { width: 100%; }
.error-page { max-width: 560px; margin: 0 auto; padding: 4rem 0; text-align: center; }
.error-code { margin-bottom: 1rem; font-family: var(--font-display); font-size: clamp(4.5rem, 22vw, 7rem); font-weight: 800; line-height: 1; letter-spacing: -0.05em; color: var(--accent-hi); }
.error-code.is-danger { color: var(--danger); }
.error-title { margin: 0 0 10px; font-family: var(--font-display); font-size: clamp(1.4rem, 5vw, 1.85rem); font-weight: 700; letter-spacing: -0.025em; color: var(--text); }
.error-desc { max-width: 46ch; margin: 0 auto 2rem; font-size: 15.5px; line-height: 1.6; color: var(--text-soft); }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@media (max-width: 720px) {
.login-card { padding: 2rem 1.25rem; }
.error-page { padding: 2.5rem 0; }
.error-actions .btn { flex: 1 1 100%; }
}
/* ─── 14. Retours : toast + barre d'enregistrement ──────────── */
/* ─── 15. Statistiques ──────────────────────────────────────── */
/* ─── 16. Composants alimentés par le JS ───────────────────── */
/* ─── 17. Responsive : composants ───────────────────────────── */
/* ─── 18. Sélecteur natif : flèche stable ──────────────────── */
/* ─── 19. Accessibilité & finitions ────────────────────────── */
/* ─── 20. Connexion + pages d'erreur ───────────────────────── */
/* ═══════════════════════════════════════════════════════════════
   Watermark logo derriere le hero
   ═══════════════════════════════════════════════════════════════ */
.hero { position: relative !important; isolation: isolate !important; }
.hero::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 560px; height: 560px; background-image: url('/static/logo-512.png'); background-size: contain; background-repeat: no-repeat; background-position: center; opacity: 0.08; filter: blur(1px); pointer-events: none; z-index: 0; }
:root[data-theme="light"] .hero::before { opacity: 0.06; }
.hero > * { position: relative; z-index: 1; }
@media (max-width: 900px) {
.hero::before { width: 400px;
    height: 400px;
    opacity: 0.10; }
}
@media (max-width: 500px) {
.hero::before { width: 300px;
    height: 300px;
    opacity: 0.12;
    top: 45%; }
}
/* ═══════════════════════════════════════════════════════════════
   Animation d'entrée du hero + gradient animé sur le titre
   ═══════════════════════════════════════════════════════════════ */
@keyframes heroFadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes watermarkFloat { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -52%) scale(1.02); } }
/* Entrée du hero */
.hero-copy { animation: heroFadeUp .8s cubic-bezier(.4,0,.2,1) both; }
.hero-visual { animation: heroFadeUp .8s .15s cubic-bezier(.4,0,.2,1) both; }
.stats-bar > .stat:nth-child(1) { animation: heroFadeUp .6s .30s cubic-bezier(.4,0,.2,1) both; }
.stats-bar > .stat:nth-child(2) { animation: heroFadeUp .6s .38s cubic-bezier(.4,0,.2,1) both; }
.stats-bar > .stat:nth-child(3) { animation: heroFadeUp .6s .46s cubic-bezier(.4,0,.2,1) both; }
.stats-bar > .stat:nth-child(4) { animation: heroFadeUp .6s .54s cubic-bezier(.4,0,.2,1) both; }
/* Gradient animé sur le titre */
.hero-title { background-size: 200% 200% !important; animation: gradientShift 8s ease-in-out infinite; }
/* Watermark flottant subtilement */
.hero::before { animation: watermarkFloat 12s ease-in-out infinite; }
/* Sections : fade in au scroll (JS ajoute .is-visible) */
.section, .cta-final { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1); }
.section.is-visible, .cta-final.is-visible { opacity: 1; transform: none; }
/* Respecte prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
.hero-copy, .hero-visual, .stat, .hero-title, .hero::before { animation: none !important; }
.section, .cta-final { opacity: 1 !important;
    transform: none !important; }
}
/* ═══════════════════════════════════════════════════════════════
   Bandeau roadmap dismissible
   ═══════════════════════════════════════════════════════════════ */
.roadmap-banner { max-width: 1200px; margin: 0 auto 1.5rem; padding: 0 24px; }
.roadmap-inner { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: var(--radius-lg); animation: heroFadeUp .6s cubic-bezier(.4,0,.2,1) both; }
.roadmap-badge { flex-shrink: 0; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; background: var(--accent-btn); }
.roadmap-text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; color: var(--text); }
.roadmap-close { flex-shrink: 0; width: 32px; height: 32px; padding: 0; font-size: 20px; line-height: 1; color: var(--text-soft); background: transparent; border: 0; border-radius: 8px; cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.roadmap-close:hover { background: rgba(255,255,255,.08); color: var(--text); }
:root[data-theme="light"] .roadmap-close:hover { background: rgba(0,0,0,.06); }
@media (max-width: 720px) {
.roadmap-banner { padding: 0 16px; margin-bottom: 1rem; }
.roadmap-inner { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
.roadmap-text { font-size: 13px; flex: 1 1 100%; order: 2; }
.roadmap-badge { order: 1; }
.roadmap-close { order: 1; margin-left: auto; }
}
/* ═══════════════════════════════════════════════════════════════
   Widget Avant/Après (slider draggable)
   ═══════════════════════════════════════════════════════════════ */
.before-after { position: relative; max-width: 900px; margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden; background: #313338; border: 1px solid var(--border); user-select: none; -webkit-user-select: none; }
:root[data-theme="light"] .before-after { background: #E3E5E8; }
.ba-frame { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: 340px; }
.ba-side { padding: 24px 22px; min-width: 0; }
.ba-before { background: #2B2D31; clip-path: inset(0 var(--ba-clip, 50%) 0 0); }
.ba-after { background: #313338; clip-path: inset(0 0 0 var(--ba-clip, 50%)); }
:root[data-theme="light"] .ba-before { background: #D4D7DC; }
:root[data-theme="light"] .ba-after { background: #E3E5E8; }
.ba-label { display: inline-block; margin-bottom: 14px; padding: 3px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; color: #fff; }
.ba-before .ba-label { background: #DC2626; }
.ba-after .ba-label { background: #10B981; }
.ba-embed { display: flex; gap: 10px; margin-bottom: 12px; padding: 10px; background: rgba(0,0,0,.15); border-radius: 8px; font-family: 'gg sans', 'Noto Sans', Helvetica, Arial, sans-serif; font-size: 13.5px; color: #DBDEE1; line-height: 1.4; position: relative; overflow: hidden; }
.ba-embed-rich { padding-left: 16px; }
.ba-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #7C7CFF; }
.ba-avatar { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: #4F545C; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.ba-content { min-width: 0; flex: 1; }
.ba-name { font-weight: 600; color: #F2F3F5; font-size: 13px; }
.ba-bot { margin-left: 4px; padding: 1px 4px; font-size: 9px; font-weight: 700; background: #5865F2; border-radius: 3px; vertical-align: 1px; }
.ba-time { font-size: 11px; color: #949BA4; }
.ba-title { margin-top: 6px; font-size: 15px; font-weight: 700; color: #F2F3F5; }
.ba-text { margin-top: 4px; font-size: 13.5px; color: #DBDEE1; }
.ba-fields { display: flex; gap: 20px; margin-top: 10px; font-size: 12px; }
.ba-fields strong { color: #F2F3F5; font-weight: 600; display: block; margin-bottom: 2px; }
.ba-fields span { color: #DBDEE1; font-size: 13.5px; }
.ba-slider { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #7C7CFF; cursor: ew-resize; z-index: 10; transform: translateX(-1px); }
.ba-handle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: #7C7CFF; color: #fff; border-radius: 50%; box-shadow: 0 8px 24px rgba(124,124,255,0.5); pointer-events: none; }
@media (max-width: 720px) {
.ba-frame { grid-template-columns: 1fr; min-height: 480px; }
.ba-before { clip-path: inset(0 0 var(--ba-clip, 50%) 0); }
.ba-after { clip-path: inset(var(--ba-clip, 50%) 0 0 0); }
.ba-slider { left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 2px; cursor: ns-resize; transform: translateY(-1px); }
.ba-handle { transform: translate(-50%, -50%) rotate(90deg); }
}
/* ═══════════════════════════════════════════════════════════════
   Curseur lumineux (desktop)
   ═══════════════════════════════════════════════════════════════ */
.cursor-glow { position: fixed; top: 0; left: 0; width: 400px; height: 400px; border-radius: 50%; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .4s var(--ease); background: radial-gradient(circle, rgba(124,124,255,0.10) 0%, rgba(124,124,255,0.04) 35%, transparent 70%); mix-blend-mode: screen; will-change: transform; }
:root[data-theme="light"] .cursor-glow { background: radial-gradient(circle, rgba(124,124,255,0.14) 0%, rgba(124,124,255,0.05) 35%, transparent 70%); mix-blend-mode: multiply; }
@media (pointer: coarse) {
.cursor-glow { display: none; }
}
/* ═══════════════════════════════════════════════════════════════
   AVANT/APRÈS V2 — deux colonnes statiques, pas de slider
   ═══════════════════════════════════════════════════════════════ */
.before-after { position: relative !important; max-width: 980px !important; margin: 0 auto !important; border-radius: var(--radius-lg) !important; overflow: hidden !important; background: #2B2D31 !important; border: 1px solid var(--border) !important; }
:root[data-theme="light"] .before-after { background: #D4D7DC !important; }
.ba-frame { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 0 !important; min-height: 380px !important; }
.ba-side { padding: 26px 24px !important; min-width: 0 !important; }
.ba-before { background: #232428 !important; border-right: 1px solid rgba(255,255,255,0.06) !important; clip-path: none !important; }
.ba-after { background: #2B2D31 !important; clip-path: none !important; }
:root[data-theme="light"] .ba-before { background: #C9CCD1 !important; border-right-color: rgba(0,0,0,0.08) !important; }
:root[data-theme="light"] .ba-after { background: #D4D7DC !important; }
.ba-label { display: inline-block !important; margin-bottom: 16px !important; padding: 4px 12px !important; font-size: 11px !important; font-weight: 700 !important; letter-spacing: 0.08em !important; text-transform: uppercase !important; border-radius: 999px !important; color: #fff !important; }
.ba-before .ba-label { background: #DC2626 !important; }
.ba-after .ba-label { background: #10B981 !important; }
.ba-embed { display: flex !important; gap: 12px !important; margin-bottom: 12px !important; padding: 12px 14px !important; background: rgba(0,0,0,.18) !important; border-radius: 8px !important; font-family: 'gg sans', 'Noto Sans', Helvetica, Arial, sans-serif !important; font-size: 13.5px !important; color: #DBDEE1 !important; line-height: 1.5 !important; position: relative !important; overflow: hidden !important; }
.ba-embed-rich { padding-left: 18px !important; }
.ba-bar { position: absolute !important; left: 0 !important; top: 0 !important; bottom: 0 !important; width: 3px !important; background: #7C7CFF !important; }
.ba-avatar { width: 36px !important; height: 36px !important; flex-shrink: 0 !important; border-radius: 50% !important; background: #4F545C !important; color: #fff !important; display: flex !important; align-items: center !important; justify-content: center !important; font-weight: 700 !important; font-size: 15px !important; }
.ba-content { min-width: 0 !important; flex: 1 !important; }
.ba-name { font-weight: 600 !important; color: #F2F3F5 !important; font-size: 13px !important; }
.ba-bot { margin-left: 4px !important; padding: 1px 4px !important; font-size: 9px !important; font-weight: 700 !important; background: #5865F2 !important; border-radius: 3px !important; vertical-align: 1px !important; }
.ba-time { font-size: 11px !important; color: #949BA4 !important; }
.ba-title { margin-top: 8px !important; font-size: 16px !important; font-weight: 700 !important; color: #F2F3F5 !important; }
.ba-text { margin-top: 6px !important; font-size: 13.5px !important; color: #DBDEE1 !important; }
.ba-fields { display: flex !important; gap: 24px !important; margin-top: 12px !important; padding-top: 12px !important; border-top: 1px solid rgba(255,255,255,0.06) !important; font-size: 12px !important; }
.ba-fields strong { color: #F2F3F5 !important; font-weight: 600 !important; display: block !important; margin-bottom: 3px !important; }
.ba-fields span { color: #DBDEE1 !important; font-size: 13.5px !important; }
/* On cache le slider s'il reste dans le DOM */
.ba-slider, .ba-handle { display: none !important; }
@media (max-width: 720px) {
.ba-frame { grid-template-columns: 1fr !important; }
.ba-before { border-right: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important; }
.ba-side { padding: 20px 18px !important; }
}
/* ═══════════════════════════════════════════════════════════════
   CARROUSEL HERO — plusieurs mockups qui défilent
   ═══════════════════════════════════════════════════════════════ */
.hero-visual { position: relative !important; min-height: 340px !important; }
.hero-carousel { position: relative !important; width: 100% !important; min-height: 320px !important; }
.hc-slide { position: absolute !important; inset: 0 !important; opacity: 0 !important; transform: translateY(8px) !important; transition: opacity .5s ease, transform .5s ease !important; pointer-events: none !important; }
.hc-slide.active { opacity: 1 !important; transform: translateY(0) !important; pointer-events: auto !important; }
/* On réutilise .hero-mock mais on neutralise sa rotation */
.hc-slide .hero-mock { transform: rotate(0deg) !important; margin: 0 !important; }
/* Petits points indicateurs */
.hc-dots { position: absolute !important; bottom: -28px !important; left: 50% !important; transform: translateX(-50%) !important; display: flex !important; gap: 6px !important; padding: 6px 10px !important; background: var(--bg-surface) !important; border: 1px solid var(--border) !important; border-radius: 999px !important; z-index: 5 !important; }
.hc-dot { width: 6px !important; height: 6px !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: var(--text-mute) !important; opacity: .4 !important; cursor: pointer !important; transition: all .25s ease !important; }
.hc-dot:hover { opacity: .7 !important; }
.hc-dot.active { width: 20px !important; border-radius: 999px !important; background: var(--accent) !important; opacity: 1 !important; }
/* Variation d'embeds pour rendre les slides différents */
.hc-slide .discord-embed-bar { background: #5865F2 !important; }
.hc-slide[data-topic="levels"] .discord-embed-bar { background: #FBBF24 !important; }
.hc-slide[data-topic="economy"] .discord-embed-bar { background: #10B981 !important; }
.hc-slide[data-topic="ticket"] .discord-embed-bar { background: #7C7CFF !important; }
.hc-slide[data-topic="ai"] .discord-embed-bar { background: #EC4899 !important; }
.hc-slide[data-topic="rep"] .discord-embed-bar { background: #F472B6 !important; }
@media (max-width: 720px) {
.hero-visual { min-height: 300px !important; }
.hero-carousel { min-height: 280px !important; }
.hc-dots { bottom: -22px !important; }
}
/* ═══ PERMISSIONS : badges ═══ */
.perm-danger { display: inline-block; font-size: 10.5px; font-family: var(--font-mono); font-weight: 600; color: #F87171; background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.3); padding: 2px 8px; border-radius: 4px; margin-left: 8px; vertical-align: middle; letter-spacing: 0.04em; }
.perm-default { display: inline-block; font-size: 10px; font-family: var(--font-mono); font-weight: 500; color: #7B9EFF; background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.25); padding: 2px 8px; border-radius: 4px; margin-left: 6px; vertical-align: middle; letter-spacing: 0.03em; opacity: 0.85; }
/* ═══ BANDEAU COOKIES ═══ */
.cookie-banner { position: fixed; bottom: 20px; left: 20px; right: 20px; max-width: 520px; margin: 0 auto; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); z-index: 9999; display: flex; align-items: center; gap: 14px; animation: cookie-in 0.5s cubic-bezier(0.16,1,0.3,1); }
.cookie-banner.hide { animation: cookie-out 0.4s cubic-bezier(0.16,1,0.3,1) forwards; }
@keyframes cookie-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cookie-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(30px); } }
.cookie-banner .cookie-icon { font-size: 22px; flex-shrink: 0; }
.cookie-banner .cookie-text { flex: 1; font-size: 12.5px; color: var(--text-soft); line-height: 1.5; }
.cookie-banner .cookie-text a { color: var(--accent-hi); text-decoration: underline; }
.cookie-banner .cookie-btn { background: var(--accent); color: #fff; border: none; padding: 8px 18px; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; flex-shrink: 0; transition: background 0.2s; }
.cookie-banner .cookie-btn:hover { background: var(--accent-hi); }
@media (max-width: 600px) {
.cookie-banner { left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 14px 16px;
    flex-wrap: wrap; }
.cookie-banner .cookie-btn { width: 100%; }
}
/* === MODEX RESPONSIVE PRO === */
/* Bloc propre pour uniformiser les cartes et les grids sur mobile et PC */
/* 1) Fix global : empêche les enfants flex/grid de déborder */
.panel-grid > *,
.grid > *,
.stats-grid > *,
.sec-modules-grid > *,
.sec-module-fields > *,
.sec-module-field { min-width: 0; }
/* 2) Grilles auto-adaptatives (remplace repeat(N, 1fr) figés) */
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
/* 3) Inputs et selects : toujours dans leur conteneur */
input[type="text"],
input[type="number"],
input[type="url"],
input[type="email"],
input[type="password"],
select,
textarea,
.field-input { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
/* 4) Textes longs : coupure propre */
.card-desc,
.card-title,
.field-label,
.sec-module-desc,
.sec-module-title,
.sec-module-label { overflow-wrap: anywhere; word-break: break-word; }


/* 5) Cartes modules (Sécurité) — design propre */
.sec-modules-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.sec-modules-count {
  font-size: 12px;
  color: var(--text-soft, #8b9bc7);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ade80;
  font-weight: 600;
}

.sec-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.sec-module {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(14, 23, 48, 0.9), rgba(11, 18, 38, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.sec-module::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #22c55e, transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sec-module.is-active {
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.08), 0 4px 20px rgba(34, 197, 94, 0.06);
}

.sec-module.is-active::before { opacity: 1; }

.sec-module:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 124, 255, 0.35);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.sec-module-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sec-module-info { flex: 1; min-width: 0; }

.sec-module-title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text, #eaeaff);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sec-module-status {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.06);
  color: #6b7ba8;
}

.sec-module.is-active .sec-module-status {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.sec-module-desc {
  font-size: 12px;
  color: var(--text-soft, #8b9bc7);
  margin-top: 4px;
  line-height: 1.45;
}

.sec-module-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
  margin-top: 2px;
  border: 0;
  outline: none;
}

.sec-module-toggle::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.sec-module-toggle:checked {
  background: #22c55e;
}

.sec-module-toggle:checked::after {
  transform: translateX(18px);
}

.sec-module-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.sec-module-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sec-module-label {
  flex: 1;
  font-size: 11.5px;
  color: var(--text-soft, #8b9bc7);
  min-width: 90px;
  font-weight: 500;
}

.sec-module-field input[type="number"],
.sec-module-field input[type="text"],
.sec-module-field select {
  padding: 5px 10px;
  background: rgba(14, 23, 48, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text, #eaeaff);
  font-size: 12px;
  box-sizing: border-box;
  min-width: 70px;
  transition: border-color 0.15s ease;
}

.sec-module-field input[type="number"]:focus,
.sec-module-field input[type="text"]:focus,
.sec-module-field select:focus {
  outline: none;
  border-color: rgba(124, 124, 255, 0.5);
}

.sec-module-field input[type="number"] { width: 75px; }
.sec-module-field select { min-width: 100px; }

.sec-module-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #22c55e;
  flex-shrink: 0;
  cursor: pointer;
}

/* Mobile : 1 colonne, toggle plus gros */
@media (max-width: 640px) {
  .sec-modules-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .sec-module {
    padding: 14px;
    gap: 12px;
  }
  .sec-module-title { font-size: 15px; }
  .sec-module-desc { font-size: 12.5px; }
  .sec-module-toggle { width: 44px; height: 24px; }
  .sec-module-toggle::after { width: 18px; height: 18px; }
  .sec-module-toggle:checked::after { transform: translateX(20px); }
  .sec-module-fields { padding: 10px; }
}

/* 6) Tablette : sidebar et layout 2 colonnes -> 1 colonne */
@media (max-width: 900px) {
.panel-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px; }
.stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.notify-platforms { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
/* 7) Mobile : tout en 1 colonne, boutons full width, touch targets propres */
@media (max-width: 640px) {
.panel-grid { grid-template-columns: 1fr;
    gap: 12px; }
.sec-modules-grid { grid-template-columns: 1fr;
    gap: 10px; }
.stats-grid { grid-template-columns: 1fr !important; }
.notify-platforms { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.card { padding: 14px; }
.card-title { font-size: 15px; }
.card-desc { font-size: 12px; }
.field-label { font-size: 12px; }
.field-input { padding: 9px 12px; font-size: 14px; }
.btn { width: 100%; }
.sec-module-field label,
  .sec-module-field .field-label { min-width: 0; }
.sec-module-field input[type="number"],
  .sec-module-field input[type="text"],
  .sec-module-field select { max-width: 100%;
    flex: 1 1 100px; }
.nav-user-name { display: none; }
.section-title { font-size: 18px; }
.crumbs { font-size: 12px; }
}
/* 8) Très petit mobile */
@media (max-width: 420px) {
.card { padding: 12px; }
.btn { padding: 9px 14px; font-size: 13px; }
.sec-module { padding: 12px; }
.nav-user-name { display: none; }
}
/* 9) Fix débordement horizontal global (sécurité) */
html, body { max-width: 100%; overflow-x: hidden; }
.main-content, .server-main, .content-area { min-width: 0; }
/* === FIN MODEX RESPONSIVE PRO === */
/* === MODEX GLOBAL POLISH === */
:root {
  --radius-sm: 8px;
  --radius: 12px;
  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --focus-ring: 0 0 0 3px rgba(124, 124, 255, 0.25);
}

/* 1) Scrollbar custom */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 124, 255, 0.3) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(124, 124, 255, 0.25);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 124, 255, 0.5);
  background-clip: padding-box;
  border: 2px solid transparent;
}

/* 2) Focus visible (accessibilité) */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* 3) Header sticky avec backdrop blur */
header, .site-header, .navbar, .topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  background: rgba(6, 10, 26, 0.75) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* 4) Sidebar : hover + actif */
.nav-item {
  transition: background var(--transition), color var(--transition), transform 0.1s ease;
  border-radius: var(--radius-sm);
  position: relative;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #eaeaff);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(124, 124, 255, 0.18), rgba(124, 124, 255, 0.06));
  color: #fff;
  font-weight: 600;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #7c7cff;
}
.nav-group-title {
  transition: color var(--transition);
  cursor: pointer;
  user-select: none;
}
.nav-group-title:hover { color: var(--text, #eaeaff); }

/* 5) Cards hover */
.card {
  border-radius: var(--radius) !important;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color var(--transition), box-shadow var(--transition), transform 0.15s ease;
}
.card:hover {
  border-color: rgba(124, 124, 255, 0.2);
}
.card-title {
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.card-desc {
  line-height: 1.55;
  opacity: 0.85;
}

/* 6) Boutons */
.btn {
  border-radius: var(--radius-sm) !important;
  transition: background var(--transition), transform 0.1s ease, box-shadow var(--transition), border-color var(--transition);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: linear-gradient(135deg, #7c7cff, #3b82f6) !important;
  border: 1px solid rgba(124, 124, 255, 0.4);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #8f8fff, #4f91ff) !important;
  box-shadow: 0 6px 20px rgba(124, 124, 255, 0.3);
}

/* 7) Inputs */
input[type="text"],
input[type="number"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea,
.field-input {
  border-radius: var(--radius-sm) !important;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  font-size: 14px;
}
input[type="text"]:hover,
input[type="number"]:hover,
input[type="url"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="search"]:hover,
select:hover,
textarea:hover {
  border-color: rgba(255, 255, 255, 0.15);
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(124, 124, 255, 0.6) !important;
  background: rgba(124, 124, 255, 0.04);
}

/* 8) Badges unifiés */
.badge, .tag, [class*="badge-"] {
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 9) Empty states */
.empty, .hint {
  padding: 24px;
  text-align: center;
  color: var(--text-soft, #8b9bc7);
  font-size: 13px;
  font-style: italic;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

/* 10) Titres de section */
.section-title {
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 4px;
}
.section-desc {
  color: var(--text-soft, #8b9bc7);
  line-height: 1.55;
  margin-bottom: 20px;
}

/* 11) Options dropdown */
select option {
  background: #0e1730;
  color: #eaeaff;
  padding: 8px;
}

/* 12) Liens inline */
.card a:not(.btn),
.section-desc a {
  color: #7c7cff;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}
.card a:not(.btn):hover,
.section-desc a:hover {
  color: #a0a0ff;
  border-bottom-color: currentColor;
}

/* 13) Responsive padding */
@media (max-width: 900px) {
  .main-content, .server-main { padding: 16px !important; }
}
@media (max-width: 640px) {
  .main-content, .server-main { padding: 12px !important; }
  .section-desc { font-size: 13px; margin-bottom: 14px; }
  .btn { min-height: 40px; }
  .nav-item { padding: 10px 12px !important; }
}

/* 14) Accessibility : reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === FIN MODEX GLOBAL POLISH === */

/* === MODEX POLISH V2 === */

/* 1) Arrière-plan global : mesh gradient subtil */
body {
  background-color: #060a1a !important;
  background-image:
    radial-gradient(at 0% 0%, rgba(124, 124, 255, 0.06) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(124, 124, 255, 0.04) 0px, transparent 50%) !important;
  background-attachment: fixed !important;
}

/* 2) Cartes : fond plus profond + bordure dégradée subtile */
.card {
  background: linear-gradient(180deg, rgba(14, 23, 48, 0.95), rgba(11, 18, 38, 0.98)) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(124, 124, 255, 0.15) !important;
}

/* 3) En-tête de page plus aéré */
.section-head {
  margin-bottom: 24px !important;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.section-title {
  font-size: 26px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  background: linear-gradient(180deg, #fff, #96a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px !important;
}

/* 4) Sidebar : icônes alignées + survol */
.nav-item {
  padding: 9px 14px !important;
  margin: 1px 8px !important;
  font-size: 13.5px !important;
}
.nav-group-title {
  padding: 8px 14px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  opacity: 0.6;
}
.nav-group-title:hover { opacity: 1; }

/* 5) Boutons : taille et lisibilité */
.btn {
  padding: 10px 18px !important;
  font-size: 13.5px !important;
  line-height: 1.2 !important;
}

/* 6) Inputs : hauteur standardisée */
input[type="text"],
input[type="number"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
  min-height: 40px !important;
  padding: 8px 12px !important;
}

/* 7) Titres de cartes */
.card-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  margin-bottom: 10px !important;
}
.card-desc {
  font-size: 13px !important;
  margin-bottom: 16px !important;
}

/* 8) Tableaux (si présents) */
table {
  border-collapse: collapse;
  width: 100%;
}
th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13.5px;
}

/* 9) Animation d'entrée des cartes au chargement */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.card {
  animation: cardFadeIn 0.4s ease-out both;
}
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }

/* 10) Badges "live" / statuts : plus pétants */
.badge-live, .status-live {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
}

/* 11) Scrollbar macOS-like (plus discrète) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* 12) Focus ring : plus visible */
:focus-visible {
  outline: 2px solid #7c7cff;
  outline-offset: 2px;
}

/* 13) Correctif mobile global */
@media (max-width: 640px) {
  .section-title { font-size: 22px !important; }
  .card-title { font-size: 15px !important; }
  .btn { padding: 10px 14px !important; }
}

/* === FIN MODEX POLISH V2 === */
