/* ==========================================================
   Hycraft Ages — feuille de style principale (thème clair)
   Bleu clair · jaune · blanc
   ========================================================== */
:root {
    --bg: #f5f9ff;
    --bg-2: #eaf4ff;
    --surface: #ffffff;
    --surface-2: #f4f8fe;
    --surface-3: #e7f1fc;
    --border: #dce8f6;
    --border-strong: #c2d7ef;
    --heading: #10213f;
    --text: #263652;
    --muted: #5b6b86;
    --faint: #8a98b0;
    --blue: #2d9cec;
    --blue-2: #6fc3ff;
    --blue-dark: #1673b9;
    --gold: #f7b500;
    --gold-2: #ffd34d;
    --gold-ink: #3a2800;
    --gold-text: #a06e00;
    --green: #1a9d52;
    --red: #e0454a;
    --orange: #e98410;
    --purple: #7c55e6;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 16px 36px -18px rgba(22, 80, 150, .35);
    --shadow-sm: 0 4px 14px -8px rgba(22, 80, 150, .25);
    --font-head: 'Outfit', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --container: 1200px;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--bg); color: var(--text);
    font: 15px/1.6 var(--font-body);
    -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .6em; color: var(--heading); letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
code { background: var(--surface-3); padding: .1em .4em; border-radius: 5px; font-size: .9em; color: var(--blue-dark); overflow-wrap: anywhere; }
pre { background: #10213f; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; overflow-x: auto; }
pre code { background: none; padding: 0; color: #d6e9ff; }
::selection { background: var(--gold-2); color: var(--gold-ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: 20px; }
.section { padding-block: 56px; }
.section-sm { padding-block: 32px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .85rem; }
.center { text-align: center; }
.right { text-align: right; }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.grow { flex: 1; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt { margin-top: 24px; } .mb { margin-bottom: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.text-gold { color: var(--gold-text); } .text-green { color: var(--green); } .text-red { color: var(--red); } .text-blue { color: var(--blue-dark); }
.text-strong { color: var(--heading); font-weight: 600; }

/* ---------- Bandeau d'annonce ---------- */
.announce { background: linear-gradient(90deg, var(--gold), var(--gold-2), var(--gold)); color: var(--gold-ink); text-align: center; font-weight: 600; font-size: .9rem; padding: 8px 20px; }

/* ---------- Navigation ---------- */
.nav {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
    background: rgba(255, 255, 255, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border); box-shadow: 0 2px 16px -10px rgba(22, 80, 150, .3);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--heading); font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; letter-spacing: .02em; white-space: nowrap; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand span { color: var(--gold-text); }
.brand:hover { color: var(--heading); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; flex: 1; }
.nav-links > li, .nav-right > .has-menu { position: relative; }
.nav-links a, .nav-links button.nav-drop {
    display: flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 10px;
    color: var(--text); font-weight: 600; font-size: .95rem; background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav-links a:hover, .nav-links button.nav-drop:hover, .nav-links a.active, .nav-links .active > button.nav-drop { color: var(--blue-dark); background: var(--surface-3); }
.caret { width: 10px; height: 10px; opacity: .6; transition: transform .2s; }
.menu {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; padding: 8px;
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
    box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .18s;
}
.menu.right { left: auto; right: 0; }
.menu a, .menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 9px; color: var(--text); font-weight: 500; font-size: .93rem; background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-3); color: var(--blue-dark); }
.menu .menu-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-3); font-size: .9rem; }
.menu small { display: block; color: var(--muted); font-size: .78rem; font-weight: 400; }
.menu hr { margin: 6px 0; }
.has-menu:hover > .menu, .has-menu.open > .menu, .has-menu:focus-within > .menu { opacity: 1; visibility: visible; transform: none; }
.has-menu:hover .caret, .has-menu.open .caret { transform: rotate(180deg); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--heading); cursor: pointer; font: 600 .92rem var(--font-body); }
.user-chip img { width: 30px; height: 30px; border-radius: 8px; image-rendering: pixelated; }
.nav-toggle { display: none; background: var(--surface-2); border: 1px solid var(--border); color: var(--heading); border-radius: 10px; width: 42px; height: 42px; cursor: pointer; font-size: 1.2rem; }
.vote-pseudo { padding: 18px 20px; border-color: #f2d37a; background: linear-gradient(135deg, #fffbea, #fff); }
.vote-pseudo input { max-width: 320px; }
.bell { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--heading); cursor: pointer; }
.bell:hover, .has-menu.open > .bell { border-color: var(--blue); color: var(--blue-dark); }
.bell .count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.bell-menu { width: min(360px, calc(100vw - 32px)); max-height: min(520px, calc(100vh - 100px)); overflow-y: auto; }
.bell-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.bell-head form { display: inline; }
.menu .link-btn, .link-btn { width: auto; padding: 0; background: none; border: 0; color: var(--blue-dark); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.menu .link-btn:hover { background: none; text-decoration: underline; }
.bell-section { padding: 8px 12px 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.menu a.bell-item { align-items: flex-start; font-size: .88rem; }
.menu a.bell-item small { display: block; margin-top: 2px; }
.menu a.bell-item.unread { background: #eef7ff; font-weight: 600; }
.menu a.bell-item.unread::before { content: ""; width: 8px; height: 8px; margin-top: 6px; flex-shrink: 0; border-radius: 50%; background: var(--blue); }
.bell-empty { padding: 14px 12px; text-align: center; }
.menu a.bell-all { justify-content: center; margin-top: 6px; border-top: 1px solid var(--border); border-radius: 0 0 9px 9px; color: var(--blue-dark); font-weight: 600; font-size: .88rem; }
.topic.notif.unread { background: #eef7ff; }
.topic.notif.unread .t-title::before { content: "● "; color: var(--blue); }
.notif-ico { font-size: 1.3rem; }
.cart-link { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 1.15rem; }
.cart-link:hover { border-color: var(--blue); }
.cart-link .count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--gold); color: var(--gold-ink); font-size: .72rem; font-weight: 800; display: grid; place-items: center; }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 11px; border: 1px solid transparent;
    font: 700 .95rem var(--font-body); cursor: pointer; transition: .18s; white-space: nowrap;
    background: var(--surface-3); color: var(--heading); text-decoration: none;
}
.btn:hover { color: var(--heading); transform: translateY(-1px); background: #d9e9fa; }
.btn:active { transform: none; }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); box-shadow: 0 8px 20px -10px rgba(230, 160, 0, .8), inset 0 -3px 0 rgba(0, 0, 0, .1); }
.btn-gold:hover { color: var(--gold-ink); background: linear-gradient(180deg, #ffe07a, var(--gold-2)); }
.btn-blue { background: linear-gradient(180deg, var(--blue-2), var(--blue)); color: #fff; box-shadow: 0 8px 20px -10px rgba(45, 156, 236, .8), inset 0 -3px 0 rgba(0, 0, 0, .1); }
.btn-blue:hover { color: #fff; background: linear-gradient(180deg, #8ad0ff, var(--blue-2)); }
.btn-discord { background: #5865f2; color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.btn-discord:hover { background: #6d78f5; color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--blue); color: var(--blue-dark); }
.btn-success { background: #e9f8ef; color: #11643a; border-color: #a9dfbf; }
.btn-success:hover { background: var(--green); color: #fff; }
.answer { padding: 14px 0; border-bottom: 1px solid var(--border); }
.answer:first-child { padding-top: 0; }
.answer:last-child { border-bottom: 0; padding-bottom: 0; }
.answer-q { font-weight: 700; color: var(--heading); margin-bottom: 6px; }
.answer-a { color: var(--text); overflow-wrap: anywhere; }
.btn-danger { background: #fdecec; color: var(--red); border-color: #f5c2c3; }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-success { background: #e6f7ed; color: var(--green); border-color: #b5e4c8; }
.btn-success:hover { background: var(--green); color: #fff; }
.btn-microsoft { background: #fff; color: #1b1b1b; border-color: var(--border-strong); gap: 10px; box-shadow: var(--shadow-sm); }
.btn-microsoft:hover { background: #f4f4f4; color: #1b1b1b; }
.btn-sm { padding: 7px 13px; font-size: .85rem; border-radius: 9px; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; border-radius: 13px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: inherit; }
.link-btn:hover { color: var(--red); }

/* ---------- Héros ---------- */
.hero { position: relative; overflow: hidden; padding: 90px 0 70px; isolation: isolate; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -2;
    background:
        radial-gradient(45% 60% at 80% 25%, rgba(255, 211, 77, .45), transparent 70%),
        radial-gradient(50% 70% at 10% 90%, rgba(111, 195, 255, .35), transparent 70%),
        linear-gradient(180deg, #bfe4ff 0%, #e4f3ff 60%, var(--bg) 100%);
}
.hero-map { position: absolute; z-index: -1; right: -6%; top: 50%; transform: translateY(-50%); width: min(980px, 95%); opacity: .35; pointer-events: none; animation: float 9s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(calc(-50% - 10px)); } }
.hero-stars { display: none; }
.hero-content { max-width: 620px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #e3f7eb; border: 1px solid #b5e4c8; color: var(--green); font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 20px; }
.eyebrow.gold { background: #fff6d6; border-color: #f5d572; color: var(--gold-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(26, 157, 82, .18); animation: pulse 2s infinite; }
.dot.off { color: var(--red); animation: none; box-shadow: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(26, 157, 82, 0); } }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.02; margin-bottom: 18px; }
.hero h1 .accent { background: linear-gradient(90deg, #f0a500, #ff8a00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 540px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ip-box { display: inline-flex; align-items: stretch; border-radius: 13px; overflow: hidden; border: 1px solid #f5d572; background: #fff; cursor: pointer; font: inherit; color: inherit; padding: 0; transition: .18s; box-shadow: var(--shadow-sm); }
.ip-box:hover { border-color: var(--gold); transform: translateY(-1px); }
.ip-box .ip-label { padding: 14px 18px; text-align: left; }
.ip-box .ip-label small { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.ip-box .ip-label strong { font-family: var(--font-head); font-size: 1.1rem; color: var(--heading); }
.ip-box .ip-copy { display: grid; place-items: center; padding: 0 18px; background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: .85rem; }
.ip-box.copied .ip-copy { background: var(--green); color: #fff; }

.hero-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 44px; }
.hero-stat { padding: 14px 20px; border-radius: var(--radius); background: rgba(255, 255, 255, .85); border: 1px solid var(--border); backdrop-filter: blur(6px); min-width: 140px; box-shadow: var(--shadow-sm); }
.hero-stat strong { display: block; font-family: var(--font-head); font-size: 1.6rem; color: var(--heading); }
.hero-stat span { color: var(--muted); font-size: .85rem; }

/* ---------- En-têtes de pages ---------- */
.page-head { position: relative; padding: 54px 0 40px; border-bottom: 1px solid var(--border); overflow: hidden; isolation: isolate; }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 120% at 85% 0%, rgba(255, 211, 77, .35), transparent 70%), linear-gradient(180deg, #d4ecff, var(--bg-2)); }
.page-head::after { content: ""; position: absolute; z-index: -1; right: -60px; top: -20px; width: 520px; height: 200px; background: url("../img/world.svg") no-repeat center/contain; opacity: .18; }
.page-head h1 { margin-bottom: 8px; }
.page-head p { color: var(--muted); margin: 0; max-width: 640px; }
.crumbs { display: flex; gap: 8px; font-size: .85rem; color: var(--faint); margin-bottom: 12px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue-dark); }

/* ---------- Titres de section ---------- */
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-title h2 { margin: 0; font-size: 1.8rem; }
.section-title .kicker { display: block; color: var(--blue); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card-flat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; font-size: 1.02rem; }
.card-body { padding: 20px; }
.card-hover { transition: .2s; }
.card-hover:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
a.card { color: inherit; display: block; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.layout-side-left { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }

.feature { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.feature .ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 16px; background: #fff6d6; border: 1px solid #f5d572; }
.feature.blue .ico { background: #e3f2ff; border-color: #b6dcfb; }
.feature.green .ico { background: #e3f7eb; border-color: #b5e4c8; }
.feature.purple .ico { background: #efe9ff; border-color: #d3c5fb; }
.feature p { color: var(--muted); margin: 0; }

/* Cartes d'accès rapide : l'icône est placée au-dessus du texte (plus de chevauchement) */
.quick { display: flex; flex-direction: column; min-height: 200px; padding: 24px; border-radius: 18px; color: #fff; position: relative; overflow: hidden; isolation: isolate; transition: .25s; box-shadow: var(--shadow-sm); }
.quick::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--q, linear-gradient(135deg, var(--blue-2), var(--blue))); }
.quick::after { content: attr(data-icon); order: -1; font-size: 2.6rem; line-height: 1; margin-bottom: 14px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .2)); transition: .3s; align-self: flex-start; }
.quick:hover { color: #fff; transform: translateY(-4px); box-shadow: var(--shadow); }
.quick:hover::after { transform: scale(1.12) rotate(-6deg); }
.quick h3 { font-size: 1.35rem; margin-bottom: 4px; color: #fff; }
.quick p { margin: 0; color: rgba(255, 255, 255, .92); font-size: .92rem; flex: 1; }
.quick .go { margin-top: 12px; font-weight: 700; font-size: .85rem; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.quick.light { color: var(--gold-ink); }
.quick.light h3, .quick.light p, .quick.light .go { color: var(--gold-ink); }

/* Actualités */
.news-card { display: flex; flex-direction: column; overflow: hidden; color: inherit; }
.news-card .cover { height: 140px; position: relative; background: linear-gradient(135deg, var(--blue-2), var(--blue)); display: grid; place-items: center; overflow: hidden; }
.news-card .cover::before { content: ""; position: absolute; inset: -20%; background: url("../img/world.svg") no-repeat center/90%; opacity: .3; }
.news-card .cover .version { position: relative; font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; color: #fff; text-shadow: 0 4px 16px rgba(0, 40, 90, .35); }
.news-card .body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.news-card h3 { margin: 0; }
.news-card p { color: var(--muted); font-size: .92rem; margin: 0; flex: 1; }

/* Tutoriel de connexion (accueil) */
.tuto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 20px; counter-reset: step; }
.tuto-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.tuto-step .shot { aspect-ratio: 5 / 3; background: linear-gradient(135deg, var(--surface-3), #fff6d6); display: grid; place-items: center; color: var(--faint); font-size: .85rem; text-align: center; padding: 10px; border-bottom: 1px solid var(--border); }
.tuto-step .shot img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.tuto-step .shot.has-img { padding: 0; }
.tuto-step .txt { padding: 16px 18px 18px; }
.tuto-step h3 { display: flex; gap: 10px; align-items: center; font-size: 1.05rem; }
.tuto-step h3::before { counter-increment: step; content: counter(step); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--gold); color: var(--gold-ink); font-size: .9rem; font-weight: 800; }
.tuto-step p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- Pastilles / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; border: 1px solid; }
.pill-blue { color: #145f99; background: #e3f2ff; border-color: #b6dcfb; }
.pill-green { color: #157a41; background: #e3f7eb; border-color: #b5e4c8; }
.pill-orange { color: #a85a00; background: #fff0de; border-color: #f7cf9c; }
.pill-red { color: #b62f34; background: #fdecec; border-color: #f5c2c3; }
.pill-purple { color: #5b38c4; background: #efe9ff; border-color: #d3c5fb; }
.pill-grey { color: #5b6b86; background: #f0f3f8; border-color: #d8dfea; }
.pill-gold { color: #855b00; background: #fff6d6; border-color: #f5d572; }
.rank-badge { display: inline-block; padding: 2px 10px; border-radius: 7px; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: color-mix(in srgb, var(--rank) 75%, #000); background: color-mix(in srgb, var(--rank) 14%, #fff); border: 1px solid color-mix(in srgb, var(--rank) 45%, transparent); }
.user-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.user-link img { border-radius: 4px; image-rendering: pixelated; }
.avatar { border-radius: 10px; image-rendering: pixelated; background: var(--surface-3); }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label, .label { font-weight: 600; font-size: .88rem; color: var(--heading); }
.field .hint { font-size: .8rem; color: var(--faint); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea, select.input, textarea.input {
    width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border-strong);
    background: #fff; color: var(--text); font: inherit; transition: .15s;
}
.field input[type=file] { padding: 10px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface-2); font: inherit; color: var(--muted); }
.field textarea, textarea.input { min-height: 140px; resize: vertical; line-height: 1.55; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: .88rem; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45, 156, 236, .18); }
.field .is-invalid, .is-invalid { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(224, 69, 74, .18) !important; }
.field:has(> [required]) > label::after, .field:has(> * > [required]) > label::after { content: " *"; color: var(--red); }
.role-questions { border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px 2px; margin: 0 0 16px; background: var(--surface-2); }
.role-questions legend { padding: 0 8px; font-weight: 700; color: var(--heading); }
[data-role-locked][hidden], [data-role-section][hidden] { display: none; }
.modal-confirm .confirm-body { padding: 28px 26px 18px; text-align: center; }
.modal-confirm .confirm-ico { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; background: #fff6d6; box-shadow: 0 0 0 8px #fffbeb; }
.modal-confirm.is-danger .confirm-ico { background: #fdecec; box-shadow: 0 0 0 8px #fef6f6; }
.modal-confirm .confirm-title { margin: 0 0 8px; font-size: 1.25rem; }
.modal-confirm .confirm-text { margin: 0 0 6px; color: var(--text); overflow-wrap: anywhere; }
.modal-confirm .confirm-warn { margin: 0; color: var(--red); font-weight: 600; }
.modal-confirm .modal-foot { justify-content: center; }
.modal-confirm .modal-foot .btn { min-width: 130px; justify-content: center; }
.btn-danger-solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger-solid:hover { background: #c0353a; border-color: #c0353a; color: #fff; }
.form-actions .btn-cancel, .btn-cancel { color: var(--muted); }
dialog.modal.modal-sm { width: min(420px, calc(100vw - 32px)); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 18px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.qty-step { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 9px; background: var(--surface-3); flex-shrink: 0; }
.qty-step form { display: contents; }
.qty-step button { width: 26px; height: 26px; border: 0; border-radius: 7px; background: var(--surface); color: var(--heading); font-weight: 800; cursor: pointer; line-height: 1; box-shadow: var(--shadow-sm); }
.qty-step button:hover:not(:disabled) { background: var(--blue); color: #fff; }
.qty-step button:disabled { opacity: .4; cursor: not-allowed; }
.qty-val { min-width: 22px; text-align: center; font-weight: 700; font-size: .9rem; }
.notify-opt { align-items: flex-start; padding: 8px 0; }
.notify-opt input { margin-top: 3px; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.inline-form { display: inline; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; min-width: 0; }

.auth-wrap { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 50px 20px; position: relative; isolation: isolate; }
.auth-wrap::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(40% 50% at 50% 20%, rgba(255, 211, 77, .35), transparent 70%), url("../img/world.svg") no-repeat center 40%/min(1100px, 120%), linear-gradient(180deg, #cfeaff, var(--bg)); opacity: .9; }
.auth-card { width: 100%; max-width: 440px; padding: 34px; background: rgba(255, 255, 255, .96); border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.7rem; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 26px; }
.auth-card .auth-logo { display: block; width: 70px; margin: 0 auto 16px; border-radius: 50%; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.auth-card details summary { cursor: pointer; text-align: center; }

/* ---------- Alertes ---------- */
.flashes { position: fixed; top: 84px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: min(400px, calc(100vw - 40px)); }
.alert { padding: 13px 16px; border-radius: 12px; border: 1px solid; font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.flashes .alert { box-shadow: var(--shadow); animation: slidein .3s ease; }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } }
.alert-success { background: #e9f8ef; border-color: #a9dfbf; color: #11643a; }
.alert-error { background: #fdeeee; border-color: #f2b8ba; color: #9b2227; }
.alert-info { background: #e8f4ff; border-color: #b0d8f7; color: #145a8f; }
.alert-warning { background: #fff7dc; border-color: #f2d37a; color: #7a5300; }
.alert ul { margin: 0; padding-left: 18px; }
.alert .close { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; font-size: 1.1rem; line-height: 1; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.table, .prose table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .prose th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td, .prose td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.row-link { cursor: pointer; }
.table tbody tr:hover { background: var(--surface-2); }
.table .actions { text-align: right; white-space: nowrap; }

/* ---------- Listes de sujets (bugs, suggestions, tickets) ---------- */
.topic-list { display: flex; flex-direction: column; }
.topic { display: flex; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); color: inherit; transition: background .15s; }
.topic:last-child { border-bottom: 0; }
.topic:hover { background: var(--surface-2); color: inherit; }
.topic .t-main { flex: 1; min-width: 0; }
.topic .t-title { font-weight: 700; color: var(--heading); margin-bottom: 4px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic .t-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.topic .t-side { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.score { display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; color: var(--heading); }
.score small { font-family: var(--font-body); font-size: .65rem; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.score.pos { color: var(--green); } .score.neg { color: var(--red); }

.vote-box { display: flex; gap: 8px; align-items: center; }
.vote-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; font: 700 .9rem var(--font-body); }
.vote-btn.up.on, .vote-btn.up:hover { border-color: var(--green); color: var(--green); background: #e9f8ef; }
.vote-btn.down.on, .vote-btn.down:hover { border-color: var(--red); color: var(--red); background: #fdeeee; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filters a { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: .86rem; }
.filters a:hover { color: var(--blue-dark); border-color: var(--border-strong); }
.filters a.active { background: #fff6d6; border-color: #f2c94c; color: var(--gold-text); }

/* Fil de discussion */
.thread { display: flex; flex-direction: column; gap: 14px; }
.message { display: flex; gap: 14px; }
.message .avatar { flex-shrink: 0; }
.message .bubble { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 4px var(--radius) var(--radius) var(--radius); padding: 14px 18px; box-shadow: var(--shadow-sm); }
.message.staff .bubble { border-color: #f2d37a; background: linear-gradient(180deg, #fffaea, var(--surface)); }
.message .bubble-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; font-size: .85rem; }
.message .bubble-head time { color: var(--faint); }
.message .bubble-head form { margin-left: auto; }

/* Pièces jointes (images) */
.attachments { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.attachments a { display: block; width: 120px; height: 90px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.attachments a:hover { border-color: var(--blue); }
.attachments img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Contenu rédigé (Markdown) ---------- */
.prose { color: var(--text); line-height: 1.75; overflow-wrap: anywhere; }
.prose h2, .prose h3, .prose h4, .prose h5 { margin-top: 1.6em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }
.prose blockquote { margin: 1em 0; padding: 12px 18px; border-left: 3px solid var(--gold); background: #fffaea; border-radius: 0 10px 10px 0; color: #5c4a1a; }
.prose blockquote p:last-child { margin: 0; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 12px; margin: 14px auto; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.prose table { margin: 1em 0; border: 1px solid var(--border); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Boutique ---------- */
.balance { padding: 20px; border-radius: var(--radius); background: linear-gradient(135deg, #fff3c4, #fffaea); border: 1px solid #f2d37a; }
.balance strong { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--gold-text); line-height: 1.1; }
.product { display: flex; flex-direction: column; padding: 0; overflow: hidden; position: relative; }
.product .p-visual { height: 150px; display: grid; place-items: center; font-size: 4rem; position: relative; background: radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--pc, var(--blue)) 40%, transparent), transparent 70%), linear-gradient(180deg, #f0f8ff, #fff); border-bottom: 1px solid var(--border); }
.product .p-visual span { filter: drop-shadow(0 8px 12px rgba(0, 40, 90, .2)); transition: .3s; }
.product:hover .p-visual span { transform: scale(1.12) translateY(-4px); }
.product .p-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product h3 { margin: 0; }
.product .p-desc { color: var(--muted); font-size: .9rem; flex: 1; }
.product .p-desc p:last-child { margin: 0; }
.product .p-desc ul { padding-left: 1.1em; margin: 0; }
.product .p-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; color: var(--heading); white-space: nowrap; }
.price small { font-size: .7rem; color: var(--muted); font-weight: 600; }
.ribbon { position: absolute; top: 14px; left: -34px; transform: rotate(-45deg); background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: .7rem; padding: 4px 40px; letter-spacing: .08em; text-transform: uppercase; z-index: 1; }
.top-buyer { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--radius); background: linear-gradient(135deg, #fff3c4, #fffaea 60%, #fff); border: 1px solid #f2d37a; box-shadow: var(--shadow-sm); }
.top-buyer img { width: 64px; height: 64px; border-radius: 14px; image-rendering: pixelated; border: 3px solid var(--gold); background: #fff; }
.top-buyer .tb-label { display: block; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-text); }
.top-buyer strong { display: block; font-family: var(--font-head); font-size: 1.35rem; color: var(--heading); }
.cart-table td { vertical-align: middle; }
.cart-table .qty { width: 80px; }
.cart-sum { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; }
.cart-sum dt { color: var(--muted); }
.cart-sum dd { margin: 0; text-align: right; font-weight: 600; color: var(--heading); }
.cart-sum .total { font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; }

/* ---------- Vote ---------- */
.vote-site { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.vote-site .num { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; background: #fff6d6; color: var(--gold-text); flex-shrink: 0; }
.vote-site .info { flex: 1; min-width: 0; }
.vote-site .info strong { display: block; color: var(--heading); font-size: 1.05rem; }
.countdown { font-variant-numeric: tabular-nums; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; margin-bottom: 20px; }
.podium .step { text-align: center; padding: 18px 10px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.podium .step img { width: 64px; height: 64px; border-radius: 12px; image-rendering: pixelated; margin-bottom: 8px; }
.podium .step.first { padding-top: 28px; border-color: #f2d37a; background: linear-gradient(180deg, #fff3c4, var(--surface)); }
.podium .step.first img { width: 80px; height: 80px; }
.podium .medal { font-size: 1.6rem; display: block; }
.podium strong { display: block; color: var(--heading); overflow: hidden; text-overflow: ellipsis; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.rank-list li:last-child { border: 0; }
.rank-list .pos { width: 26px; color: var(--faint); font-weight: 800; font-family: var(--font-head); }

/* ---------- Wiki ---------- */
.wiki-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr) 220px; gap: 28px; align-items: start; }
.wiki-nav { position: sticky; top: 90px; }
.wiki-nav h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 6px; display: flex; gap: 8px; }
.wiki-nav h4:first-child { margin-top: 0; }
.wiki-nav a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--text); font-size: .92rem; border-left: 2px solid transparent; }
.wiki-nav a:hover { background: var(--surface-3); color: var(--blue-dark); }
.wiki-nav a.active { color: var(--blue-dark); border-left-color: var(--blue); background: #e3f2ff; }
.search-box { position: relative; }
.search-box input { padding-left: 40px !important; }
.search-box::before { content: "🔍"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: .9rem; opacity: .6; }

/* ---------- Profil ---------- */
.profile-head { position: relative; padding: 40px 0 0; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--border); }
.profile-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 100% at 20% 0%, color-mix(in srgb, var(--rank, #2d9cec) 25%, transparent), transparent 70%), linear-gradient(180deg, #d4ecff, var(--bg-2)); }
.profile-top { display: flex; gap: 26px; align-items: flex-end; flex-wrap: wrap; padding-bottom: 26px; }
.profile-skin { width: 120px; height: 120px; border-radius: 20px; border: 3px solid color-mix(in srgb, var(--rank, #2d9cec) 70%, transparent); background: #fff; image-rendering: pixelated; box-shadow: 0 10px 30px -10px var(--rank, #2d9cec); }
.profile-top h1 { margin: 8px 0 4px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; }
.tabs a { padding: 12px 18px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--blue-dark); }
.tabs a.active { color: var(--blue-dark); border-bottom-color: var(--gold); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; }
.kv dt { color: var(--muted); font-size: .88rem; }
.kv dd { margin: 0; font-weight: 600; text-align: right; color: var(--heading); }

/* ---------- Statistiques ---------- */
.stat { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
a.stat { display: block; color: inherit; transition: .2s; }
a.stat:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat .s-label { color: var(--muted); font-size: .84rem; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.stat .s-value { font-family: var(--font-head); font-size: 1.9rem; font-weight: 800; color: var(--heading); margin-top: 6px; line-height: 1.1; }
.stat .s-sub { font-size: .8rem; color: var(--faint); margin-top: 4px; }
.stat .s-sub .up { color: var(--green); } .stat .s-sub .down { color: var(--red); }
.stat::after { content: ""; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; border-radius: 50%; background: var(--sc, var(--gold)); opacity: .12; }

.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--blue); transition: .15s; }
.chart .bar:hover { fill: var(--gold); }
.chart .axis { fill: var(--faint); font-size: 10px; font-family: var(--font-body); }
.chart .grid-line { stroke: var(--border); }
.chart .line { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: url(#areaGrad); }
.chart .val { fill: var(--text); font-size: 10px; font-weight: 700; }
.legend { display: flex; gap: 16px; font-size: .82rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--mc, var(--gold)); }

/* ---------- Panel admin ---------- */
.admin { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 70px); }
.admin-side { background: var(--surface); border-right: 1px solid var(--border); padding: 22px 14px; position: sticky; top: 70px; height: calc(100vh - 70px); overflow-y: auto; }
.admin-side h5 { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin: 20px 12px 8px; font-family: var(--font-body); }
.admin-side h5:first-child { margin-top: 0; }
.admin-side a { display: flex; gap: 11px; align-items: center; padding: 9px 12px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: .91rem; }
.admin-side a:hover { background: var(--surface-3); color: var(--blue-dark); }
.admin-side a.active { background: #fff6d6; color: var(--gold-text); }
.admin-side a .badge { margin-left: auto; background: var(--red); color: #fff; font-size: .7rem; padding: 1px 7px; border-radius: 99px; }
.admin-main { padding: 30px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.admin-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-title h1 { font-size: 1.7rem; margin: 0; }
.admin-title p { margin: 4px 0 0; color: var(--muted); }
.perm-group { margin-bottom: 18px; }
.perm-group h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 8px; }
.perm-grid label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; font-size: .9rem; }
.perm-grid label:hover { border-color: var(--border-strong); }
.perm-grid input { accent-color: var(--blue); margin-top: 3px; }
.perm-grid code { font-size: .74rem; display: block; margin-top: 2px; background: none; padding: 0; color: var(--faint); }
.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; }

/* ---------- Pagination & états vides ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 600; }
.pagination a.active { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .e-ico { font-size: 2.6rem; display: block; margin-bottom: 10px; }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; border-radius: 22px; padding: 46px clamp(22px, 5vw, 56px); background: linear-gradient(120deg, var(--blue-2), var(--blue) 55%, var(--blue-dark)); isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; box-shadow: var(--shadow); }
.cta::after { content: ""; position: absolute; right: -40px; top: -30px; bottom: -30px; width: 60%; z-index: -1; background: url("../img/world.svg") no-repeat center/contain; opacity: .25; }
.cta h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 8px; color: #fff; }
.cta p { margin: 0; color: rgba(255, 255, 255, .9); max-width: 520px; }
.cta .btn-ghost { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .6); color: #fff; }
.cta .btn-ghost:hover { background: #fff; color: var(--blue-dark); }

/* ---------- Pied de page ---------- */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 50px 0 24px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 30px; }
.footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; font-family: var(--font-body); }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer ul a { color: var(--text); font-size: .93rem; }
.footer ul a:hover { color: var(--blue-dark); }
.footer .about { color: var(--muted); font-size: .92rem; max-width: 340px; margin-top: 14px; }
.socials { display: flex; gap: 8px; margin-top: 16px; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: .8rem; font-weight: 800; }
.socials a:hover { border-color: var(--gold); color: var(--gold-text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 36px; padding-top: 20px; font-size: .82rem; color: var(--faint); }

/* ---------- Page d'erreur ---------- */
.error-page { text-align: center; padding: 100px 20px; }
.error-page .error-ico { font-size: 3rem; line-height: 1; margin-bottom: 8px; }
.error-page .error-hint { max-width: 520px; margin: 8px auto 0; }
.error-page .error-actions { justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.error-page .code { font-family: var(--font-head); font-size: clamp(5rem, 15vw, 9rem); font-weight: 900; line-height: 1; background: linear-gradient(180deg, var(--gold-2), #d18a00); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .nav-toggle { display: grid; place-items: center; margin-left: auto; }
    .nav-links, .nav-right { display: none; }
    .nav.open .nav-links, .nav.open .nav-right { display: flex; }
    .nav.open .nav-inner { flex-wrap: wrap; height: auto; padding-block: 14px; }
    .nav.open .nav-links { order: 3; width: 100%; flex-direction: column; align-items: stretch; }
    .nav.open .nav-right { order: 4; width: 100%; padding-bottom: 6px; }
    .nav.open .menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; margin: 4px 0 8px 14px; }
    .nav.open .has-menu.open > .menu { display: block; }
    .layout-side, .layout-side-left { grid-template-columns: 1fr; }
    .wiki-nav { position: static; }
    .wiki-grid { grid-template-columns: 1fr; }
    .wiki-grid > aside { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .admin { grid-template-columns: 1fr; }
    .admin-side { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 4px; padding: 12px; }
    .admin-side h5 { display: none; }
    .admin-side a { padding: 7px 10px; font-size: .84rem; }
}
@media (max-width: 640px) {
    .container { padding-inline: 16px; }
    .section { padding-block: 40px; }
    .hero { padding: 60px 0 50px; }
    .hero-map { opacity: .2; right: -40%; width: 160%; }
    .footer-grid { grid-template-columns: 1fr; }
    .podium { grid-template-columns: 1fr; }
    .podium .step.first { order: -1; }
    .topic { flex-wrap: wrap; }
    .topic .t-title { white-space: normal; }
    .vote-site { flex-wrap: wrap; }
    .flashes { top: 74px; right: 16px; left: 16px; max-width: none; }
    .auth-card { padding: 26px 20px; }
    .input-group { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
.btn.copied { background: var(--green); color: #fff; }
.cart-box { border-color: #f2d37a; }
.tuto-step .shot a { display: block; width: 100%; height: 100%; }
.tuto-step .shot-ip { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 2.4rem; color: var(--blue); }
.tuto-step .shot-ip strong { font-family: var(--font-head); font-size: 1.1rem; color: var(--heading); }
.prose.rules h2 { padding-bottom: 8px; border-bottom: 2px solid var(--gold); }
.prose.rules h3 { color: var(--blue-dark); }
.prose h2, .prose h3 { scroll-margin-top: 90px; }

/* ---------- Vote : événements et classement ---------- */
.meter.big { height: 14px; }
.meter > span { transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.event-count { font-family: var(--font-head); font-size: 1.6rem; color: var(--heading); }
.event-count small { font-size: .95rem; color: var(--muted); }
.event-card.is-done { border-color: #f2d37a; background: linear-gradient(135deg, #fff3c4, #fff); }
.leaderboard { padding: 26px; border-radius: 22px; box-shadow: var(--shadow); }
.lb-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.lb-head h2 { margin: 0; font-size: 1.4rem; }
.lb-tabs { display: flex; gap: 4px; padding: 5px; border-radius: 14px; background: var(--surface-3); }
.lb-tabs a { padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.lb-tabs a:hover { color: var(--heading); }
.lb-tabs a.active { background: #fff; color: var(--heading); box-shadow: var(--shadow-sm); }
.lb-banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 16px; border-radius: 14px; background: linear-gradient(135deg, #fff6d6, #fffdf5); border: 1px solid #f2d37a; color: #5c4a1a; }
.lb-banner-ico { font-size: 1.8rem; }
.lb-list { display: flex; flex-direction: column; gap: 8px; }
.lb-row { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.lb-row.rewarded { background: linear-gradient(90deg, #eef7ff, #fffaea); border-color: #cfe4f8; }
.lb-row.top-1 { border-color: #f2c94c; box-shadow: 0 6px 20px -12px rgba(230, 160, 0, .6); }
.lb-row.me { outline: 2px solid var(--blue); outline-offset: 1px; }
.lb-row.empty-slot { opacity: .7; border-style: dashed; }
.lb-pos { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; font-family: var(--font-head); font-weight: 800; color: var(--muted); }
.top-1 .lb-pos { background: linear-gradient(180deg, #ffe58a, #f5b800); color: #6b4a00; font-size: 1.15rem; }
.top-2 .lb-pos { background: linear-gradient(180deg, #eef2f6, #c3ccd6); color: #4a5563; font-size: 1.15rem; }
.top-3 .lb-pos { background: linear-gradient(180deg, #fbe0cf, #e3a77f); color: #7a3f1c; font-size: 1.15rem; }
.lb-avatar { width: 36px; height: 36px; border-radius: 8px; image-rendering: pixelated; background: #fff; }
.lb-name { flex: 1; min-width: 0; font-weight: 700; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-reward { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: #fff; border: 1px solid #f2d37a; font-weight: 800; font-size: .85rem; color: var(--gold-text); white-space: nowrap; }
.lb-votes { min-width: 80px; text-align: right; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.lb-votes strong { color: var(--heading); }
.lb-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.lb-nav { padding: 14px; }
.lb-nav h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 6px; }
.lb-nav h4:first-child { margin-top: 0; }
.lb-nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: .93rem; }
.lb-nav a:hover { background: var(--surface-3); color: var(--blue-dark); }
.lb-nav a.active { background: #e3f2ff; color: var(--blue-dark); }
.lb-nav .menu-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); font-size: .95rem; }
@media (max-width: 640px) {
    .leaderboard { padding: 18px 14px; }
    .lb-row { gap: 10px; padding: 8px 10px; flex-wrap: wrap; }
    .lb-reward { order: 5; margin-left: 44px; }
}

/* ---------- Animations d'apparition (ajoutées par app.js) ---------- */
.reveal { opacity: 0; transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); will-change: opacity, transform; }
.reveal-left { transform: translateX(-48px); }
.reveal-right { transform: translateX(48px); }
.reveal.in { opacity: 1; transform: none; }

/* Sommaire collant avec section active (règlement, CGU) */
.layout-side-left > .wiki-nav { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; }
.wiki-nav a { transition: color .2s, background .2s, border-color .2s, padding .2s; }
.wiki-nav a.active { font-weight: 700; }
@media (max-width: 1080px) { .layout-side-left > .wiki-nav { position: static; max-height: none; } }

/* ---------- Fenêtres (modales) ---------- */
dialog.modal { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(16, 33, 63, .45); overflow: hidden; }
dialog.modal[open] { display: flex; flex-direction: column; animation: modal-in .22s cubic-bezier(.2, .8, .2, 1); }
dialog.modal::backdrop { background: rgba(16, 33, 63, .45); backdrop-filter: blur(3px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #eef7ff, var(--surface)); }
.modal-head h2 { margin: 0; font-size: 1.25rem; }
.modal-close { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 1.2rem; color: var(--muted); }
.modal-close:hover { color: var(--red); border-color: var(--red); }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal-section { margin-bottom: 18px; }
.modal-section > h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
@media (prefers-reduced-motion: reduce) { dialog.modal[open] { animation: none; } }

/* ---------- Tâches du staff (tableau type Notion) ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kanban-col { border-radius: var(--radius); padding: 10px; background: var(--surface-2); border: 1px solid var(--border); min-height: 160px; transition: box-shadow .15s, background .15s; }
.kanban-blue { background: #f1f8ff; } .kanban-gold { background: #fffbec; } .kanban-green { background: #f1fbf5; } .kanban-orange { background: #fff7ef; }
.kanban-col.drop-target { box-shadow: 0 0 0 2px var(--blue) inset; }
.kanban-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.kanban-count { color: var(--faint); font-weight: 600; font-size: .85rem; }
.kanban-add { margin-left: auto; width: 26px; height: 26px; border-radius: 7px; border: 0; background: none; color: var(--muted); font-size: 1.15rem; cursor: pointer; line-height: 1; }
.kanban-add:hover { background: var(--surface); color: var(--blue-dark); }
.kanban-cards { display: flex; flex-direction: column; gap: 8px; max-height: 72vh; overflow-y: auto; padding: 2px; }
.kanban-empty { margin: 0; padding: 14px; text-align: center; color: var(--faint); font-size: .85rem; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); }
.task-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 12px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 7px; }
.task-card { cursor: pointer; }
.task-card[draggable="true"]:active { cursor: grabbing; }
.task-card.dragging { opacity: .45; }
.task-card:hover { border-color: var(--border-strong); }
.task-title { color: var(--heading); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.task-title:hover { color: var(--blue-dark); }
.task-cat { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 6px; font-size: .75rem; font-weight: 600; color: var(--heading);
    background: color-mix(in srgb, var(--cat) 16%, #fff); border: 1px solid color-mix(in srgb, var(--cat) 40%, #fff); }
.task-cat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cat); }
.task-meta { margin: 0; display: flex; flex-direction: column; gap: 3px; font-size: .78rem; color: var(--muted); }
.task-meta > div { display: flex; gap: 7px; align-items: center; }
.task-meta dt { width: 16px; text-align: center; font-size: .72rem; }
.task-meta dd { margin: 0; display: flex; align-items: center; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.task-meta .avatar { border-radius: 4px; }
.task-info { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; margin: 0 0 12px; font-size: .9rem; align-items: center; }
.task-info dt { color: var(--muted); font-weight: 600; }
.task-info dd { margin: 0; }
.task-images { display: flex; gap: 12px; flex-wrap: wrap; }
.task-images figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.task-images a { display: block; width: 140px; height: 100px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.task-images img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .kanban { grid-auto-columns: 82vw; } }

/* ---------- Panel : menu de gauche repliable ---------- */
.admin { position: relative; }
.admin-side-toggle { position: absolute; top: 14px; left: 233px; z-index: 5; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 1rem; box-shadow: var(--shadow-sm); }
.admin-side-toggle:hover { color: var(--blue-dark); border-color: var(--border-strong); }
.admin.side-hidden { grid-template-columns: minmax(0, 1fr); }
.admin.side-hidden .admin-side { display: none; }
.admin.side-hidden .admin-side-toggle { left: 12px; }
.admin.side-hidden .admin-main { padding-left: 60px; }
@media (max-width: 1080px) {
    .admin-side-toggle { position: static; margin: 10px 12px 0; }
    .admin.side-hidden .admin-main { padding-left: clamp(16px, 3vw, 40px); }
}

/* ---------- Tâches : bouton Filtrer avec menu déroulant, vider les archives ---------- */
.split-btn { display: flex; align-items: stretch; position: relative; }
.split-btn > .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.filter-more > summary { list-style: none; height: 100%; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 1px solid rgba(58, 40, 0, .2); padding-inline: 12px; position: relative; }
.filter-more > summary::-webkit-details-marker { display: none; }
.filter-dot { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--blue); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; }
.filter-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 280px; padding: 16px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); }
.filter-panel .field { margin-bottom: 12px; }
.kanban-clear { margin-left: auto; display: flex; }
.kanban-clear + .kanban-add { margin-left: 0; }
.kanban-clear .kanban-add { font-size: .9rem; }
.kanban-clear .kanban-add:hover { color: var(--red); }

/* ---------- Notifications : bouton de suppression ---------- */
.notif-row { position: relative; }
.notif-row > a { padding-right: 40px; }
.notif-del { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); margin: 0; }
.menu .notif-del button, .notif-del button { width: 26px; height: 26px; padding: 0; display: grid; place-items: center; border-radius: 7px; border: 0; background: none; color: var(--faint); font-size: 1.1rem; line-height: 1; cursor: pointer; opacity: .55; }
.notif-row:hover .notif-del button, .notif-del button:focus-visible { opacity: 1; }
.menu .notif-del button:hover, .notif-del button:hover { color: var(--red); background: #fdecec; }

/* ---------- Statistiques du serveur de jeu ---------- */
.stats-totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.stats-total { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.stats-total:hover { border-color: var(--blue); color: var(--text); }
.stats-total.active { border-color: #f2c94c; background: #fff6d6; }
.stats-total .st-label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.stats-total strong { font-size: 1.25rem; color: var(--heading); font-family: var(--font-head); }
.table.cohort td, .table.cohort th { text-align: center; padding: 8px 6px; }
.table.cohort td:first-child, .table.cohort th:first-child { text-align: left; }
.cohort-cell[style] { background: color-mix(in srgb, var(--blue) calc(var(--p) * 1%), #fff); color: var(--heading); font-weight: 600; font-size: .82rem; }

/* ---------- Vote : un seul bouton, vérification automatique, popup de validation ---------- */
.vote-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin: 0; }
.vote-status:empty { display: none; }
.vote-status { max-width: 260px; text-align: right; }
.modal-vote .vote-ok-body { padding: 28px 26px 18px; text-align: center; }
.modal-vote .vote-ok-ico { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem; background: #e3f7eb; box-shadow: 0 0 0 8px #f1fbf5; }
.modal-vote h2 { margin: 0 0 8px; }
.modal-vote .modal-foot { justify-content: center; }

#cart-zone.is-loading { opacity: .6; transition: opacity .15s; }

/* Numéros uniques des bugs / suggestions */
.ref { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--surface-3); color: var(--blue-dark); font: 700 .75rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; vertical-align: middle; letter-spacing: .02em; }
.ref.ref-lg { font-size: .9rem; padding: 2px 9px; vertical-align: .35em; }

.danger-zone { border-color: #f5c2c3; }
.danger-zone h3 { color: var(--red); }

/* ---------- Messagerie privée ---------- */

/* ==========================================================
   Thème nuit — <html data-mode="dark"> (réglé par le compte, le cookie ou l'appareil : js/theme.js)
   ========================================================== */
:root[data-mode="dark"] {
    --bg: #0b1424;
    --bg-2: #0e1a2f;
    --surface: #121f35;
    --surface-2: #16253e;
    --surface-3: #1c2e4b;
    --border: #23365a;
    --border-strong: #31497a;
    --heading: #eef4ff;
    --text: #cad7ec;
    --muted: #93a4c2;
    --faint: #6d7f9f;
    --blue: #4fb3f6;
    --blue-2: #7cc8ff;
    --blue-dark: #7cc4ff;
    --gold-text: #ffcf4d;
    --green: #3ccf7f;
    --red: #ff6b70;
    --orange: #ffa94d;
    --purple: #a58bff;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
    --shadow-sm: 0 4px 16px -8px rgba(0, 0, 0, .55);
    /* Teintes de fond des pastilles, alertes et encadrés */
    --tint-gold: rgba(247, 181, 0, .13); --tint-gold-b: rgba(247, 181, 0, .38);
    --tint-blue: rgba(79, 179, 246, .13); --tint-blue-b: rgba(79, 179, 246, .38);
    --tint-green: rgba(60, 207, 127, .13); --tint-green-b: rgba(60, 207, 127, .38);
    --tint-red: rgba(255, 107, 112, .13); --tint-red-b: rgba(255, 107, 112, .4);
    --tint-orange: rgba(255, 169, 77, .13); --tint-orange-b: rgba(255, 169, 77, .38);
    --tint-purple: rgba(165, 139, 255, .14); --tint-purple-b: rgba(165, 139, 255, .4);
    color-scheme: dark;
}
.theme-anim, .theme-anim *, .theme-anim *::before { transition: background-color .3s, border-color .3s, color .3s !important; }

[data-mode="dark"] pre { background: #070d18; }
[data-mode="dark"] .nav { background: rgba(11, 20, 36, .88); box-shadow: 0 2px 16px -10px rgba(0, 0, 0, .8); }
[data-mode="dark"] .hero::before { background: radial-gradient(45% 60% at 80% 25%, rgba(247, 181, 0, .16), transparent 70%), radial-gradient(50% 70% at 10% 90%, rgba(79, 179, 246, .18), transparent 70%), linear-gradient(180deg, #0f2442 0%, #0c1a30 60%, var(--bg) 100%); }
[data-mode="dark"] .hero-map { opacity: .14; }
[data-mode="dark"] .page-head::before { background: radial-gradient(50% 120% at 85% 0%, rgba(247, 181, 0, .14), transparent 70%), linear-gradient(180deg, #102440, var(--bg-2)); }
[data-mode="dark"] .profile-head::before { background: radial-gradient(50% 100% at 20% 0%, color-mix(in srgb, var(--rank, #2d9cec) 22%, transparent), transparent 70%), linear-gradient(180deg, #102440, var(--bg-2)); }
[data-mode="dark"] .auth-wrap::before { background: radial-gradient(40% 50% at 50% 20%, rgba(247, 181, 0, .14), transparent 70%), linear-gradient(180deg, #102440, var(--bg)); }
[data-mode="dark"] .auth-card { background: rgba(18, 31, 53, .97); }
[data-mode="dark"] .hero-stat { background: rgba(18, 31, 53, .85); }
[data-mode="dark"] .ip-box, [data-mode="dark"] .btn-microsoft, [data-mode="dark"] .lb-reward, [data-mode="dark"] .lb-tabs a.active { background: var(--surface); }
[data-mode="dark"] .btn-microsoft, [data-mode="dark"] .btn-microsoft:hover { color: var(--heading); }
[data-mode="dark"] .btn:not(.btn-gold):not(.btn-blue):not(.btn-discord):not(.btn-danger):not(.btn-danger-solid):not(.btn-success):not(.btn-ghost):hover { background: var(--border); }
[data-mode="dark"] .btn-danger:not(:hover) { background: var(--tint-red); border-color: var(--tint-red-b); }
[data-mode="dark"] .btn-success:not(:hover) { background: var(--tint-green); border-color: var(--tint-green-b); color: var(--green); }
[data-mode="dark"] .input, [data-mode="dark"] .field input:not([type=checkbox]):not([type=radio]):not([type=file]),
[data-mode="dark"] .field select, [data-mode="dark"] .field textarea, [data-mode="dark"] select.input, [data-mode="dark"] textarea.input { background: #0d182b; }
[data-mode="dark"] ::placeholder { color: var(--faint); }

/* Pastilles, alertes, encadrés */
[data-mode="dark"] .pill-blue { color: var(--blue-dark); background: var(--tint-blue); border-color: var(--tint-blue-b); }
[data-mode="dark"] .pill-green { color: var(--green); background: var(--tint-green); border-color: var(--tint-green-b); }
[data-mode="dark"] .pill-orange { color: var(--orange); background: var(--tint-orange); border-color: var(--tint-orange-b); }
[data-mode="dark"] .pill-red { color: var(--red); background: var(--tint-red); border-color: var(--tint-red-b); }
[data-mode="dark"] .pill-purple { color: var(--purple); background: var(--tint-purple); border-color: var(--tint-purple-b); }
[data-mode="dark"] .pill-grey { color: var(--muted); background: var(--surface-3); border-color: var(--border-strong); }
[data-mode="dark"] .pill-gold { color: var(--gold-text); background: var(--tint-gold); border-color: var(--tint-gold-b); }
[data-mode="dark"] .rank-badge { color: color-mix(in srgb, var(--rank) 70%, #fff); background: color-mix(in srgb, var(--rank) 18%, var(--surface)); }
[data-mode="dark"] .alert-success { background: var(--tint-green); border-color: var(--tint-green-b); color: #9be8bd; }
[data-mode="dark"] .alert-error { background: var(--tint-red); border-color: var(--tint-red-b); color: #ffb3b6; }
[data-mode="dark"] .alert-info { background: var(--tint-blue); border-color: var(--tint-blue-b); color: #a9d8ff; }
[data-mode="dark"] .alert-warning { background: var(--tint-gold); border-color: var(--tint-gold-b); color: #ffdc85; }
[data-mode="dark"] .eyebrow { background: var(--tint-green); border-color: var(--tint-green-b); }
[data-mode="dark"] .eyebrow.gold, [data-mode="dark"] .feature .ico, [data-mode="dark"] .vote-site .num, [data-mode="dark"] .filters a.active,
[data-mode="dark"] .admin-side a.active, [data-mode="dark"] .stats-total.active { background: var(--tint-gold); border-color: var(--tint-gold-b); }
[data-mode="dark"] .feature.blue .ico, [data-mode="dark"] .wiki-nav a.active, [data-mode="dark"] .lb-nav a.active { background: var(--tint-blue); border-color: var(--tint-blue-b); }
[data-mode="dark"] .feature.green .ico { background: var(--tint-green); border-color: var(--tint-green-b); }
[data-mode="dark"] .feature.purple .ico { background: var(--tint-purple); border-color: var(--tint-purple-b); }
[data-mode="dark"] .menu a.bell-item.unread, [data-mode="dark"] .topic.notif.unread { background: var(--tint-blue); }
[data-mode="dark"] .vote-btn.up.on, [data-mode="dark"] .vote-btn.up:hover { background: var(--tint-green); }
[data-mode="dark"] .vote-btn.down.on, [data-mode="dark"] .vote-btn.down:hover { background: var(--tint-red); }
[data-mode="dark"] .menu .notif-del button:hover, [data-mode="dark"] .notif-del button:hover { background: var(--tint-red); }
[data-mode="dark"] .prose blockquote { background: var(--tint-gold); color: #f1dfae; }
[data-mode="dark"] .vote-pseudo, [data-mode="dark"] .balance, [data-mode="dark"] .top-buyer, [data-mode="dark"] .podium .step.first,
[data-mode="dark"] .event-card.is-done, [data-mode="dark"] .lb-banner, [data-mode="dark"] .message.staff .bubble {
    background: linear-gradient(135deg, rgba(247, 181, 0, .14), var(--surface) 75%); border-color: var(--tint-gold-b); color: var(--text);
}
[data-mode="dark"] .lb-row.rewarded { background: linear-gradient(90deg, var(--tint-blue), var(--tint-gold)); border-color: var(--border-strong); }
[data-mode="dark"] .top-2 .lb-pos { background: linear-gradient(180deg, #c3ccd6, #8693a3); color: #1e2632; }
[data-mode="dark"] .top-3 .lb-pos { background: linear-gradient(180deg, #e3a77f, #b6764d); color: #2c1407; }
[data-mode="dark"] .lb-avatar, [data-mode="dark"] .profile-skin, [data-mode="dark"] .top-buyer img { background: var(--surface-2); }
[data-mode="dark"] .tuto-step .shot { background: linear-gradient(135deg, var(--surface-3), var(--tint-gold)); }
[data-mode="dark"] .product .p-visual { background: radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--pc, var(--blue)) 40%, transparent), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
[data-mode="dark"] .modal-head { background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
[data-mode="dark"] dialog.modal::backdrop { background: rgba(2, 6, 14, .7); }
[data-mode="dark"] .modal-confirm .confirm-ico { background: var(--tint-gold); box-shadow: 0 0 0 8px rgba(247, 181, 0, .06); }
[data-mode="dark"] .modal-confirm.is-danger .confirm-ico { background: var(--tint-red); box-shadow: 0 0 0 8px rgba(255, 107, 112, .06); }
[data-mode="dark"] .modal-vote .vote-ok-ico { background: var(--tint-green); box-shadow: 0 0 0 8px rgba(60, 207, 127, .06); }
[data-mode="dark"] .kanban-blue { background: rgba(79, 179, 246, .06); } [data-mode="dark"] .kanban-gold { background: rgba(247, 181, 0, .06); }
[data-mode="dark"] .kanban-green { background: rgba(60, 207, 127, .06); } [data-mode="dark"] .kanban-orange { background: rgba(255, 169, 77, .06); }
[data-mode="dark"] .task-cat { color: color-mix(in srgb, var(--cat) 70%, #fff); background: color-mix(in srgb, var(--cat) 20%, var(--surface)); border-color: color-mix(in srgb, var(--cat) 45%, transparent); }
[data-mode="dark"] .cohort-cell[style] { background: color-mix(in srgb, var(--blue) calc(var(--p) * 1%), var(--surface)); }
[data-mode="dark"] .danger-zone { border-color: var(--tint-red-b); }
[data-mode="dark"] img[src$="logo.svg"], [data-mode="dark"] .hero-map { filter: brightness(.95); }

/* ---------- Bouton jour / nuit ---------- */
.theme-toggle-form { display: contents; }
.theme-toggle { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--heading); cursor: pointer; transition: .18s; }
.theme-toggle:hover { border-color: var(--gold); color: var(--gold-text); }
.theme-toggle .ico-sun { display: none; }
[data-mode="dark"] .theme-toggle .ico-sun { display: block; }
[data-mode="dark"] .theme-toggle .ico-moon { display: none; }

/* ---------- Paramètres : apparence, confidentialité, suppression ---------- */
.theme-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-opt { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface-2); cursor: pointer; transition: .15s; font-size: .9rem; }
.theme-opt:hover { border-color: var(--border-strong); }
.theme-opt:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(247, 181, 0, .18); }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt .small { font-size: .75rem; line-height: 1.3; }
.theme-preview { display: grid; grid-template-columns: 1fr 2fr; grid-template-rows: 10px 1fr; gap: 4px; height: 58px; padding: 6px; margin-bottom: 6px; border-radius: 8px; background: #f5f9ff; border: 1px solid #dce8f6; }
.theme-preview span { border-radius: 3px; background: #ffffff; border: 1px solid #dce8f6; }
.theme-preview span:first-child { grid-column: 1 / -1; background: #f7b500; border: 0; }
.theme-opt-dark .theme-preview { background: #0b1424; border-color: #23365a; }
.theme-opt-dark .theme-preview span { background: #16253e; border-color: #23365a; }
.theme-opt-auto .theme-preview { background: linear-gradient(110deg, #f5f9ff 50%, #0b1424 50%); }
.theme-opt-auto .theme-preview span:not(:first-child) { background: linear-gradient(110deg, #ffffff 50%, #16253e 50%); }
.privacy-hide { margin-bottom: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.privacy-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
#confidentialite:has(.privacy-hide input:checked) .privacy-list { opacity: .45; }
.delete-code-body .field, .delete-code-body .check { text-align: left; }
.delete-code-body .check { font-size: .9rem; }
.code-input { text-align: center; font: 800 1.6rem/1 ui-monospace, Consolas, monospace !important; letter-spacing: .45em; padding: 12px !important; }
.delete-resend { padding: 0 20px 16px; color: var(--muted); }
.profile-private { padding: 46px 22px; }
.profile-private .pp-ico { font-size: 2.6rem; margin-bottom: 8px; }

/* ---------- Pied de page : réseaux sociaux ---------- */
.socials { flex-wrap: wrap; }
.socials a { width: 40px; height: 40px; color: var(--muted); transition: .18s; }
.socials a:hover { transform: translateY(-2px); color: #fff; border-color: transparent; background: var(--sc, var(--blue)); }
.socials .social-discord { --sc: #5865f2; } .socials .social-youtube { --sc: #ff0000; } .socials .social-tiktok { --sc: #111111; }
.socials .social-twitter { --sc: #000000; } .socials .social-twitch { --sc: #9146ff; } .socials .social-facebook { --sc: #1877f2; }
.socials .social-instagram { --sc: linear-gradient(45deg, #f9ce34, #ee2a7b 50%, #6228d7); }

/* ---------- Tableau de bord : avancement des tâches ---------- */
.tp-top { display: flex; gap: 24px; align-items: center; }
.tp-ring { --p: 0; flex-shrink: 0; width: 112px; height: 112px; border-radius: 50%; display: grid; place-content: center; text-align: center;
    background: radial-gradient(closest-side, var(--surface) 76%, transparent 77%), conic-gradient(var(--green) calc(var(--p) * 1%), var(--surface-3) 0); }
.tp-ring span { font: 800 1.6rem/1 var(--font-head); color: var(--heading); }
.tp-ring small { font-size: .72rem; color: var(--muted); }
.tp-bar { display: flex; gap: 3px; height: 14px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.tp-seg { min-width: 6px; }
.tp-grey { background: #9aa5b1; } .tp-blue { background: var(--blue); } .tp-gold { background: var(--gold); } .tp-green { background: var(--green); } .tp-orange { background: var(--orange); } .tp-empty { background: var(--surface-3); }
.tp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: .86rem; }
.tp-legend a { color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.tp-legend a:hover { color: var(--blue-dark); }
.tp-dot { width: 10px; height: 10px; border-radius: 3px; }
.tp-facts { margin-top: 12px; }
.task-progress h4 { margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; font-family: var(--font-body); }

@media (max-width: 640px) {
    .theme-picker { grid-template-columns: 1fr; }
    .theme-opt { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
    .theme-preview { width: 70px; height: 40px; margin: 0; }
    .privacy-list { grid-template-columns: 1fr; }
    .tp-top { flex-direction: column; align-items: stretch; }
    .tp-ring { margin: 0 auto; }
}

/* ---------- Sanctions ---------- */
.nowrap { white-space: nowrap; }
.sanction-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 14px; align-items: end; padding: 16px 18px 0; }
.sanction-filters-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.sanction-running { margin: 0; }
.scale-cat { margin: 18px 0 2px; }
.scale-card h3 { margin-bottom: 12px; }
.scale-levels { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.scale-levels li { display: inline-flex; align-items: center; gap: 5px; }
.scale-search { position: sticky; top: 70px; z-index: 5; display: flex; flex-direction: column; gap: 6px; padding: 10px 0; background: var(--bg); }
.scale-group[hidden], .scale-card[hidden] { display: none; }
.scale-head { align-items: center; gap: 16px; flex-wrap: wrap; }
.scale-head h1 { margin-bottom: 0; }
.sanction-types { display: flex; flex-wrap: wrap; gap: 8px 20px; }
[data-sanction-custom][hidden], [data-sanction-template][hidden], [data-sanction-duration][hidden], [data-game-only][hidden], [data-discord-only][hidden] { display: none; }
/* Choix En jeu / Sur Discord : deux gros boutons */
.sanction-target { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sanction-target label { cursor: pointer; }
.sanction-target input { position: absolute; opacity: 0; pointer-events: none; }
.sanction-target span { display: block; padding: 12px; text-align: center; font-weight: 700; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); transition: border-color .15s, background .15s; }
.sanction-target input:checked + span { border-color: var(--blue); background: var(--surface-2); }
.sanction-target input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.scale-notes { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border-strong); color: var(--muted); }

/* ---------- Vote : « Comment ça marche ? » mis en avant ---------- */
.vote-steps { padding: 20px 22px; border-radius: var(--radius); background: linear-gradient(135deg, var(--surface), var(--surface-2)); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm); }
.vote-steps-title { font-size: 1.2rem; margin-bottom: 14px; }
.vote-steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.vote-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.vote-steps li strong { display: block; color: var(--heading); font-size: .95rem; }
.vote-steps li span:not(.vs-num) { display: block; font-size: .84rem; color: var(--muted); margin-top: 2px; }
.vs-num { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 .95rem var(--font-head); background: var(--blue); color: #fff; }
.vote-steps li.vs-offline { border: 2px solid var(--gold); background: linear-gradient(135deg, rgba(247, 181, 0, .14), var(--surface) 80%); }
.vote-steps li.vs-offline .vs-num { background: var(--gold); color: var(--gold-ink); }
.vote-steps li.vs-offline code { font-size: 1em; font-weight: 800; }
.vote-ok-offline { padding: 10px 12px; border-radius: 10px; background: rgba(247, 181, 0, .14); border: 1px solid var(--gold); font-weight: 600; }
.vote-offline-card code { font-weight: 800; }
@media (max-width: 900px) { .vote-steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .vote-steps ol { grid-template-columns: 1fr; } }

/* ---------- Fiche d'une sanction (admin) : preuves ---------- */
.proof-list { display: grid; gap: 12px; }
.proof { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.proof-main { min-width: 0; flex: 1; }
.proof-main a { overflow-wrap: anywhere; }
.proof-video { position: relative; width: 100%; max-width: 560px; aspect-ratio: 16 / 9; margin-top: 10px; border-radius: 10px; overflow: hidden; background: #000; }
.proof-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
