/* =========================================================
   Lobby — refonte "console de commandement".
   Chargé après styles-compte.css : gagne le cascade sur les
   mêmes noms de classes, sans toucher aux modales
   (speed-lobby-*, planet-choice-*, speed-emblem-*).
   ========================================================= */
:root {
    --lobby-bg: #04070d;
    --lobby-panel: rgba(9, 16, 30, 0.92);
    --lobby-panel-strong: rgba(6, 11, 22, 0.97);
    --lobby-border: rgba(90, 155, 255, 0.20);
    --lobby-border-strong: rgba(125, 195, 255, 0.45);
    --lobby-text: #f2f7ff;
    --lobby-text-soft: #a9b8d2;
    --lobby-text-faint: #66779a;
    --lobby-accent: #4577ff;
    --lobby-accent-2: #7fb4ff;
    --lobby-success: #57c97a;
    --lobby-warning: #ffb454;
    --lobby-danger: #e0616e;
    --lobby-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(69, 119, 255, 0.06);
    --lobby-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
}

body.console-page {
    font-family: Inter, Arial, sans-serif;
    background: var(--lobby-bg);
}
body.console-page .page-overlay {
    background-image:
        radial-gradient(circle at 12% -10%, rgba(69, 119, 255, 0.16), transparent 34%),
        radial-gradient(circle at 96% 0%, rgba(125, 180, 255, 0.10), transparent 30%),
        radial-gradient(ellipse 65% 55% at 55% -5%, rgba(80, 140, 255, 0.14), transparent 62%),
        linear-gradient(180deg, rgba(4,7,13,0.72) 0%, rgba(4,7,13,0.92) 38%, rgba(4,7,13,0.99) 74%),
        url('../images/lobby/background.webp');
    background-repeat: no-repeat;
    background-position: 0 0, 0 0, 0 0, 0 0, center 6%;
    background-size: auto, auto, auto, auto, cover;
    background-attachment: fixed, fixed, fixed, fixed, fixed;
}
body.rail-page .console-rail::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(180deg, rgba(4,7,13,0.55) 0%, rgba(4,7,13,0.88) 55%, rgba(4,7,13,0.98) 100%),
        url('../images/lobby/background.webp');
    background-size: cover;
    background-position: center 15%;
    opacity: 0.9;
}
body.rail-page .console-rail { position: sticky; overflow: hidden; }
.console-grid-texture {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(120, 170, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 170, 255, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 85%);
}
#hud-fx-canvas {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    mask-image: radial-gradient(ellipse 75% 60% at 50% 0%, #000 35%, transparent 82%);
}

body.lobby-page .eyebrow { color: var(--lobby-accent-2); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11.5px; font-weight: 800; }
body.lobby-page .account-view-hidden { display: none !important; }

/* ================= PERSONNALISATION ================= */
.personalisation-view { display: grid; gap: 14px; }
.personalisation-block .management-form,
.personalisation-block .rename-account-form { display: grid; gap: 10px; max-width: 420px; }
.personalisation-block .management-form label,
.personalisation-block .rename-account-form label { display: grid; gap: 4px; font-size: 12px; color: var(--lobby-text-faint); }
.personalisation-block input[type="text"],
.personalisation-block input[type="password"] {
    min-height: 38px; padding: 0 11px; background: rgba(0,0,0,0.3); border: 1px solid var(--lobby-border); color: var(--lobby-text); font-size: 13px;
}
.personalisation-danger .security-card.danger { border-color: rgba(224,97,110,0.4); background: rgba(161,57,71,0.08); }

/* ---------- Cadre HUD : coins coupés + accroche technique ---------- */
body.lobby-page .panel-shell,
body.lobby-page .console-panel {
    position: relative;
    clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px) !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg, rgba(9, 17, 32, 0.94), rgba(4, 9, 18, 0.97)) !important;
    border: 1px solid var(--lobby-border) !important;
    box-shadow: var(--lobby-shadow) !important;
    backdrop-filter: blur(10px);
}
body.lobby-page .panel-shell::before { display: none; }
body.lobby-page .console-panel::after {
    content: '';
    position: absolute; top: 8px; left: 8px; width: 10px; height: 10px;
    border-top: 1px solid var(--lobby-border-strong); border-left: 1px solid var(--lobby-border-strong);
    opacity: 0.6; pointer-events: none;
}

/* ================= TOPBAR ================= */
body.console-page .console-topbar {
    position: relative; z-index: 2;
    width: min(1520px, calc(100% - 16px));
    margin: 14px auto 0;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    padding: 10px 16px;
    background: var(--lobby-panel-strong);
    border: 1px solid var(--lobby-border);
    clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px);
    box-shadow: var(--lobby-shadow);
}
body.console-page .console-brand { display: flex; align-items: center; gap: 10px; }
body.console-page .brand-mark {
    width: 38px; height: 38px; flex: 0 0 auto; object-fit: contain; display: block;
}
body.console-page .brand-text strong { display: block; font-size: 13px; letter-spacing: 0.04em; color: var(--lobby-text); }
body.console-page .brand-text small { display: block; font-size: 10.5px; color: var(--lobby-text-faint); font-family: var(--lobby-mono); }

body.console-page .console-nav { display: flex; flex-wrap: wrap; gap: 6px; }
body.console-page .console-nav button {
    position: relative;
    display: inline-flex; align-items: center; gap: 7px;
    min-height: 38px; padding: 0 13px;
    font-weight: 700; font-size: 12.5px; color: var(--lobby-text-soft);
    background: rgba(255,255,255,0.03); border: 1px solid var(--lobby-border);
    clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
    cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
body.console-page .console-nav button:hover { border-color: var(--lobby-border-strong); color: var(--lobby-text); background: rgba(255,255,255,0.06); }
body.console-page .console-nav button.active,
body.console-page .console-nav button.is-active,
body.console-page .console-nav button.is-active-nav {
    background: linear-gradient(180deg, #3a7bff, #1352db); border-color: rgba(125,195,255,0.6); color: #fff;
    box-shadow: 0 0 18px rgba(22, 146, 255, 0.28);
}
body.console-page .console-nav .btn-danger { background: linear-gradient(180deg, #a13947, #6e1e28); border-color: rgba(224, 97, 110, 0.5); color: #ffe4e6; }
body.console-page .console-nav .btn-danger:hover { border-color: rgba(255, 140, 150, 0.7); }
body.console-page .console-nav-icon { font-size: 14px; }
body.console-page #chat-launcher { position: relative; }
body.console-page #chat-launcher.is-active { border-color: var(--lobby-border-strong); background: rgba(69,119,255,0.16); color: #fff; }
.chat-launcher-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 4px;
    font-size: 10px; font-weight: 900; font-family: var(--lobby-mono); color: #fff;
    background: var(--lobby-danger); border-radius: 50%; box-shadow: 0 0 0 2px rgba(4,7,13,0.9);
}
#worlds-nav-badge.chat-launcher-badge:empty { min-width: 9px; width: 9px; height: 9px; padding: 0; background: var(--lobby-success); }
.chat-launcher-badge--online { background: var(--lobby-success); }

/* Pastille + pouls (2026-09-13, retour utilisateur) : le compteur seul passe inaperçu, ce coup
   d'oeil bref attire vraiment l'attention à l'arrivée d'un nouveau message, tiroir fermé. */
@keyframes chatLauncherPop { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }
#chat-launcher.has-new-message .chat-launcher-badge { animation: chatLauncherPop 0.5s ease; }
#chat-launcher.has-new-message { animation: chatLauncherPop 0.5s ease; }

/* ================= STATUS READOUT ================= */
body.console-page .console-status {
    position: relative; z-index: 1;
    width: min(1520px, calc(100% - 16px));
    margin: 10px auto 0;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto auto;
    align-items: center; gap: 0;
    background: var(--lobby-panel-strong);
    border: 1px solid var(--lobby-border);
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}
body.console-page .status-rank-pill {
    display: flex; align-items: center; gap: 9px; padding: 0 16px; height: 100%;
    border-left: 1px solid rgba(90,155,255,0.16); background: none; border-top: 0; border-right: 0; border-bottom: 0;
    cursor: pointer; font: inherit; text-align: left; white-space: nowrap;
    transition: background 0.15s ease;
}
body.console-page .status-rank-pill:hover { background: rgba(255,255,255,0.03); }
body.console-page .status-rank-icon {
    width: 26px; height: 26px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; font-family: Georgia, serif; font-weight: 900; font-size: 12px;
    border: 1.5px solid var(--rank-color, var(--lobby-text-faint)); color: var(--rank-color, var(--lobby-text-faint));
    box-shadow: 0 0 10px color-mix(in srgb, var(--rank-color, transparent) 55%, transparent);
}
body.console-page .status-rank-pill strong { display: block; font-size: 12px; color: var(--rank-color, var(--lobby-text)); }
body.console-page .status-rank-pill span#status-rank-elo { display: block; font-size: 9.5px; color: var(--lobby-text-faint); font-family: var(--lobby-mono); margin-top: 1px; }
body.console-page .status-rank-pill.rank-bronze { --rank-color: #ddb08a; }
body.console-page .status-rank-pill.rank-silver { --rank-color: #dce6ef; }
body.console-page .status-rank-pill.rank-gold { --rank-color: #f0d387; }
body.console-page .status-rank-pill.rank-platinum { --rank-color: #7fe0d0; }
body.console-page .status-rank-pill.rank-diamond { --rank-color: #7fc4ff; }
body.console-page .status-rank-pill.rank-master { --rank-color: #d9a4ff; }
body.console-page .status-rank-pill.rank-placement { --rank-color: #7fa0c4; }

/* Emblème de rang Rocket (module "Parties classées") : la couleur suit vraiment le palier */
body.console-page .speed-ranked-mini.rank-bronze { --rank-color: #ddb08a; }
body.console-page .speed-ranked-mini.rank-silver { --rank-color: #dce6ef; }
body.console-page .speed-ranked-mini.rank-gold { --rank-color: #f0d387; }
body.console-page .speed-ranked-mini.rank-platinum { --rank-color: #7fe0d0; }
body.console-page .speed-ranked-mini.rank-diamond { --rank-color: #7fc4ff; }
body.console-page .speed-ranked-mini.rank-master { --rank-color: #d9a4ff; }
body.console-page .speed-ranked-mini.rank-placement { --rank-color: #7fa0c4; }
body.console-page .speed-ranked-mini-emblem {
    color: var(--rank-color, #dce8f3) !important;
    border-color: color-mix(in srgb, var(--rank-color, #dce8f3) 45%, transparent) !important;
    background: color-mix(in srgb, var(--rank-color, #dce8f3) 14%, transparent) !important;
    box-shadow: 0 0 14px color-mix(in srgb, var(--rank-color, transparent) 40%, transparent);
}
body.console-page .speed-ranking-row:nth-child(1) .speed-ranking-position { color: #f1d487 !important; background: rgba(177,132,33,0.16) !important; box-shadow: 0 0 10px rgba(241,212,135,0.35); }
body.console-page .speed-ranking-row:nth-child(2) .speed-ranking-position { color: #dce6ef !important; background: rgba(190,205,220,0.14) !important; }
body.console-page .speed-ranking-row:nth-child(3) .speed-ranking-position { color: #ddb08a !important; background: rgba(205,132,81,0.14) !important; }

body.console-page .status-friends-online {
    display: flex; align-items: center; gap: 8px; padding: 0 16px; height: 100%;
    border-left: 1px solid rgba(90,155,255,0.16); white-space: nowrap;
}
body.console-page .status-friends-avatars { display: flex; align-items: center; }
body.console-page .status-friends-avatars .friend-mini-avatar {
    width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-size: 9.5px; font-weight: 900; color: #fff; font-family: var(--lobby-mono);
    background: linear-gradient(160deg, var(--lobby-accent), var(--lobby-accent-2));
    border: 2px solid var(--lobby-panel-strong); margin-left: -8px; box-shadow: 0 0 0 1px rgba(87,201,122,0.7);
}
body.console-page .status-friends-avatars .friend-mini-avatar:first-child { margin-left: 0; }
body.console-page .status-friends-online span { font-size: 11px; font-weight: 700; color: var(--lobby-text-soft); }
body.console-page .status-item { position: relative; padding: 10px 18px; }
body.console-page .status-item + .status-item::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: rgba(90,155,255,0.16); }
body.console-page .status-label { display: block; font-family: var(--lobby-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--lobby-text-faint); }
body.console-page .status-value { display: block; font-size: 14px; font-weight: 800; color: var(--lobby-text); margin-top: 2px; font-family: var(--lobby-mono); }
body.console-page .status-sub { display: block; font-size: 10.5px; color: var(--lobby-text-faint); margin-top: 1px; }
body.console-page .status-live {
    display: flex; align-items: center; gap: 7px; padding: 0 18px; height: 100%;
    font-family: var(--lobby-mono); font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lobby-success);
    border-left: 1px solid rgba(90,155,255,0.16); white-space: nowrap;
}
body.console-page .status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: consolePulse 2s ease-in-out infinite; }
@keyframes consolePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { body.console-page .status-dot { animation: none; } }

/* ================= MODE SWITCH ================= */
body.console-page .console-modes {
    position: relative; z-index: 1;
    width: min(1520px, calc(100% - 16px));
    margin: 10px auto 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
    position: sticky; top: 8px; z-index: 20;
}
body.console-page .console-modes button {
    display: flex; align-items: baseline; gap: 10px;
    padding: 10px 16px;
    background: var(--lobby-panel-strong); border: 1px solid var(--lobby-border); color: var(--lobby-text-faint);
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
    cursor: pointer; font-size: 13px; font-weight: 800; text-align: left;
    box-shadow: var(--lobby-shadow); backdrop-filter: blur(10px);
    transition: border-color 0.15s ease, color 0.15s ease;
}
body.console-page .console-modes button:hover { border-color: var(--lobby-border-strong); color: var(--lobby-text-soft); }
body.console-page .console-modes .mode-index { font-family: var(--lobby-mono); font-size: 11px; color: var(--lobby-accent-2); }
body.console-page .console-modes button.is-active { color: #fff; border-color: rgba(104,209,255,0.55); background: linear-gradient(135deg, rgba(19,91,176,0.32), rgba(8,16,34,0.95)); box-shadow: 0 0 22px rgba(50,152,255,0.18); }
#worlds-mode-button { position: relative; }
#worlds-mode-button #worlds-nav-badge { position: absolute; top: 10px; right: 10px; margin: 0; }
body.console-page .console-modes button.is-active .mode-index { color: #fff; }

body.console-page .console-shell {
    width: min(1520px, calc(100% - 16px));
    margin: 14px auto 60px;
    position: relative; z-index: 1;
}

/* ================= BENTO GRID ================= */
body.console-page .console-bento:not(.console-bento-parties):not(.console-bento-worlds-view) {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    grid-template-areas:
        "command command power"
        "news news prestige"
        "admin admin admin";
    gap: 14px;
}
body.console-page .bento-onboarding { grid-area: command; }
body.console-page .bento-command { grid-area: command; }
body.console-page .bento-power { grid-area: power; }
body.console-page .bento-news { grid-area: news; }
body.console-page .bento-prestige { grid-area: prestige; }
body.console-page .bento-admin { grid-area: admin; }
body.console-page .console-bento-worlds-view {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.85fr);
    grid-template-areas:
        "overview overview"
        "fresh fresh"
        "available available"
        "mine upcoming";
    gap: 14px;
    align-items: start;
}
body.console-page .bento-worlds-overview { grid-area: overview; }
body.console-page .bento-worlds-fresh { grid-area: fresh; }
body.console-page .bento-worlds-available { grid-area: available; }
body.console-page .bento-worlds-mine { grid-area: mine; }
body.console-page .bento-worlds-upcoming { grid-area: upcoming; }
@media (max-width: 1180px) {
    body.console-page .console-bento-worlds-view {
        grid-template-columns: 1fr;
        grid-template-areas: "overview" "fresh" "available" "mine" "upcoming";
    }
}
body.console-page [hidden] { display: none !important; }

body.console-page .console-panel { padding: 20px 22px; }
body.console-page .panel-head { margin-bottom: 14px; }
body.console-page .panel-head.between { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
body.console-page .panel-head h2 { margin: 2px 0 0; font-size: 16px; font-weight: 800; color: var(--lobby-text); }
body.console-page .panel-subtitle { margin: 4px 0 0; color: var(--lobby-text-faint); font-size: 12px; line-height: 1.4; }
body.console-page .status-pill {
    display: inline-flex; align-items: center; min-height: 22px; padding: 0 10px; font-size: 10.5px; font-weight: 800;
    color: var(--lobby-accent-2); background: rgba(69,119,255,0.14); border: 1px solid rgba(69,119,255,0.28);
    font-family: var(--lobby-mono);
}

/* Onboarding */
body.console-page .bento-onboarding { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
body.console-page .onboarding-copy h2 { margin: 4px 0 6px; font-size: 17px; color: var(--lobby-text); }
body.console-page .onboarding-copy p { margin: 0; color: var(--lobby-text-soft); font-size: 13px; }
body.console-page .onboarding-world { padding: 10px 16px; background: rgba(69,119,255,0.08); border: 1px solid rgba(69,119,255,0.24); font-size: 12.5px; color: var(--lobby-text-soft); }
body.console-page .onboarding-world strong { display: block; color: var(--lobby-text); font-size: 14px; }
body.console-page #new-player-start-button { min-height: 42px; padding: 0 18px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #3a7bff, #1352db); border: 1px solid rgba(125,195,255,0.5); cursor: pointer; }
body.console-page .onboarding-wiki-link { color: var(--lobby-accent-2); font-size: 12.5px; font-weight: 700; text-decoration: none; }
body.console-page .onboarding-worlds-button {
    min-height: 42px; padding: 0 16px; font-weight: 800; color: var(--lobby-text);
    background: rgba(255,255,255,0.04); border: 1px solid var(--lobby-border-strong); cursor: pointer;
}
body.console-page .onboarding-worlds-button:hover { border-color: rgba(104,209,255,0.7); background: rgba(69,119,255,0.1); }
body.console-page .onboarding-world-list {
    flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 8px; order: 2;
}
body.console-page .onboarding-world-choice {
    min-width: 0; padding: 10px 12px; text-align: left; cursor: pointer; color: var(--lobby-text);
    border: 1px solid var(--lobby-border); background: rgba(255,255,255,.025);
}
body.console-page .onboarding-world-choice:hover { border-color: var(--lobby-border-strong); background: rgba(69,119,255,.08); }
body.console-page .onboarding-world-choice.is-recommended { border-color: rgba(87,201,122,.38); background: rgba(87,201,122,.07); }
body.console-page .onboarding-world-choice > span { display: block; color: var(--lobby-success); font: 800 9px/1.2 var(--lobby-mono); text-transform: uppercase; letter-spacing: .06em; }
body.console-page .onboarding-world-choice > strong { display: block; margin-top: 3px; color: #fff; font-size: 13px; }
body.console-page .onboarding-world-choice > small { display: block; margin-top: 2px; color: var(--lobby-text-soft); font-size: 10.5px; }
body.console-page .onboarding-world-list-empty { padding: 10px 12px; color: var(--lobby-text-soft); border: 1px dashed var(--lobby-border); font-size: 11px; }
body.console-page .world-opportunity-strip {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px;
    border: 1px solid rgba(87,201,122,0.38);
    background: linear-gradient(90deg, rgba(87,201,122,0.10), rgba(69,119,255,0.08));
    box-shadow: inset 3px 0 0 rgba(87,201,122,0.8);
}
body.console-page .world-opportunity-strip > div { min-width: 0; }
body.console-page .world-opportunity-kicker { display: block; color: var(--lobby-success); font: 800 9.5px/1.2 var(--lobby-mono); letter-spacing: .08em; }
body.console-page .world-opportunity-strip strong { display: block; margin-top: 3px; color: #fff; font-size: 13px; }
body.console-page .world-opportunity-strip small { display: block; margin-top: 2px; color: var(--lobby-text-soft); font-size: 11px; }
body.console-page .world-opportunity-strip button {
    flex: 0 0 auto; min-height: 36px; padding: 0 13px; color: #fff; font-weight: 900; font-size: 11px;
    background: linear-gradient(180deg, #2c9b63, #176642); border: 1px solid rgba(107,231,162,0.5); cursor: pointer;
}

/* Command console */
body.console-page .bento-command-grid { display: grid; gap: 16px; }
body.console-page .bento-command-head h1 { margin: 6px 0 8px; font-size: clamp(19px, 2vw, 24px); font-weight: 800; color: var(--lobby-text); letter-spacing: -0.01em; }
body.console-page .hero-description { margin: 0; color: var(--lobby-text-soft); font-size: 13.5px; line-height: 1.5; max-width: 62ch; }
body.console-page .selector-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
body.console-page .selector-card label { display: grid; gap: 6px; font-family: var(--lobby-mono); font-size: 10.5px; color: var(--lobby-text-faint); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
body.console-page .selector-card select {
    height: 42px; padding: 0 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--lobby-border); color: var(--lobby-text);
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    font-size: 13.5px;
}
body.console-page .quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
body.console-page .quick-actions button {
    min-height: 38px; padding: 0 16px; font-weight: 800; font-size: 12px; color: var(--lobby-text);
    background: rgba(255,255,255,0.04); border: 1px solid var(--lobby-border);
    clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
    cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
body.console-page .quick-actions button:hover:not(:disabled) { border-color: var(--lobby-border-strong); background: rgba(255,255,255,0.07); transform: translateY(-1px); }
body.console-page .quick-actions button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Village actif */
body.console-page .active-village-main { display: flex; gap: 12px; align-items: center; }
body.console-page .village-emblem {
    width: 46px; height: 46px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-size: 21px;
    background: var(--lobby-panel-strong); border: 1px solid var(--lobby-border-strong);
    clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
body.console-page .panel-kicker { margin: 0 0 4px; color: var(--lobby-text-faint); font-family: var(--lobby-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
body.console-page .village-meta-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
body.console-page .village-meta-row span {
    display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; font-size: 11px; font-weight: 700;
    background: rgba(255,255,255,0.04); border: 1px solid var(--lobby-border); font-family: var(--lobby-mono);
}
body.console-page .active-village-actions { margin-top: 14px; }
body.console-page .active-village-actions button,
body.console-page .active-village-actions .badge.success {
    display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; font-weight: 800; font-size: 12px;
    background: linear-gradient(180deg, #3a7bff, #1352db); color: #fff; border: 1px solid rgba(125,195,255,0.5);
    clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 7px 100%, 0 50%);
    cursor: pointer;
}

/* Puissance de l'empire */
body.console-page .bento-power {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: 16px;
    padding: 24px 24px 26px;
    border-color: rgba(69,119,255,0.28) !important;
    box-shadow: var(--lobby-shadow), 0 0 40px rgba(58,123,255,0.12) !important;
}
body.console-page .empire-power-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        linear-gradient(160deg, rgba(6,12,24,0.5) 0%, rgba(5,9,18,0.82) 55%, rgba(4,8,16,0.96) 100%),
        url('../images/lobby/background.webp');
    background-size: cover; background-position: center 30%;
}
body.console-page .empire-power-glow {
    position: absolute; z-index: 0; pointer-events: none;
    width: 260px; height: 260px; right: -80px; top: -100px;
    background: radial-gradient(circle, rgba(104,209,255,0.28), transparent 70%);
    filter: blur(8px);
}
body.console-page .bento-power > *:not(.empire-power-bg):not(.empire-power-glow) { position: relative; z-index: 1; }
body.console-page .empire-power-eyebrow h2 { margin: 4px 0 0; font-size: 20px; font-weight: 900; color: #fff; letter-spacing: -0.01em; }
body.console-page .empire-power-score { display: flex; align-items: baseline; gap: 8px; font-family: var(--lobby-mono); margin-top: 4px; }
body.console-page .empire-power-score strong { font-size: 38px; font-weight: 900; color: #fff; letter-spacing: -0.02em; text-shadow: 0 0 24px rgba(104,209,255,0.55); }
body.console-page .empire-power-score span { font-size: 14px; color: var(--lobby-text-faint); }
body.console-page .empire-power-bar {
    position: relative; height: 12px; background: rgba(255,255,255,0.06);
    border: 1px solid var(--lobby-border); overflow: visible; margin-top: 2px;
}
body.console-page .empire-power-bar::before {
    content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.03);
}
body.console-page .empire-power-bar i {
    position: relative; display: block; height: 100%; width: 0%; overflow: hidden;
    background: linear-gradient(90deg, var(--lobby-accent), var(--lobby-accent-2));
    box-shadow: 0 0 16px 2px rgba(104,209,255,0.65), 0 0 34px 6px rgba(69,119,255,0.35);
    transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.console-page .empire-power-bar i::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
    width: 40%; animation: empirePowerShine 2.6s ease-in-out infinite;
}
@keyframes empirePowerShine { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) { body.console-page .empire-power-bar i::after { animation: none; display: none; } }
body.console-page .empire-power-metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin-top: 6px; }
body.console-page .empire-power-metrics > div {
    display: flex; align-items: center; gap: 8px; padding: 11px 9px;
    background: rgba(255,255,255,0.045); border: 1px solid var(--lobby-border);
    transition: border-color 0.15s ease, background 0.15s ease;
}
body.console-page .empire-power-metrics > div:hover { border-color: rgba(104,209,255,0.4); background: rgba(69,119,255,0.08); }
body.console-page .empire-power-metric-icon {
    font-size: 18px; flex: 0 0 auto; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(69,119,255,0.12); border: 1px solid rgba(69,119,255,0.25);
}
body.console-page .empire-power-metrics strong { display: block; font-size: 14px; color: #fff; line-height: 1.1; }
body.console-page .empire-power-metrics small { display: block; margin-top: 2px; color: var(--lobby-text-faint); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.03em; }

/* Sélecteur de mondes V1 — lisibilité accès / nouveaux départs */
body.console-page .bento-worlds-overview {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(480px, .9fr); gap: 20px; align-items: center;
    border-color: rgba(104,209,255,0.28);
    background: radial-gradient(circle at 12% 15%, rgba(69,119,255,.14), transparent 40%), rgba(4,10,24,.86);
}
body.console-page .worlds-overview-copy h2 { margin: 4px 0 5px; color: #fff; font-size: clamp(18px,2vw,24px); }
body.console-page .worlds-overview-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
body.console-page .worlds-overview-stat {
    min-width: 0; padding: 11px 10px; border: 1px solid var(--lobby-border); background: rgba(255,255,255,.025);
}
body.console-page .worlds-overview-stat span,
body.console-page .worlds-overview-stat small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.console-page .worlds-overview-stat span { color: var(--lobby-text-faint); font: 800 9px/1.2 var(--lobby-mono); text-transform: uppercase; letter-spacing: .05em; }
body.console-page .worlds-overview-stat strong { display: block; margin: 4px 0 1px; color: #fff; font: 900 22px/1 var(--lobby-mono); }
body.console-page .worlds-overview-stat small { color: var(--lobby-text-faint); font-size: 9px; }
body.console-page .worlds-overview-stat--available { border-color: rgba(87,201,122,.38); background: rgba(87,201,122,.075); }
body.console-page .worlds-overview-stat--available strong { color: #72e8a2; }
body.console-page .worlds-overview-stat--locked { border-color: rgba(255,105,105,.2); }
body.console-page .worlds-joinable-pill { color: #72e8a2; border-color: rgba(87,201,122,.32); background: rgba(87,201,122,.08); }
body.console-page .bento-worlds-available,
body.console-page .bento-worlds-fresh { border-color: rgba(87,201,122,.28); }
body.console-page .world-list-available { grid-template-columns: repeat(2,minmax(0,1fr)); }
body.console-page .world-access-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -14px -16px 12px; padding: 8px 14px 8px 16px;
    border-bottom: 1px solid var(--lobby-border); background: rgba(255,255,255,.035);
}
body.console-page .world-access-banner strong { font: 900 10px/1.2 var(--lobby-mono); letter-spacing: .07em; }
body.console-page .world-access-banner span { color: var(--lobby-text-soft); font-size: 10.5px; text-align: right; }
body.console-page .world-access-banner.is-joinable { background: linear-gradient(90deg, rgba(87,201,122,.16), rgba(87,201,122,.04)); border-bottom-color: rgba(87,201,122,.25); }
body.console-page .world-access-banner.is-joinable strong { color: #72e8a2; }
body.console-page .world-access-banner.is-owned { background: linear-gradient(90deg, rgba(69,119,255,.18), rgba(69,119,255,.04)); border-bottom-color: rgba(104,209,255,.25); }
body.console-page .world-access-banner.is-owned strong { color: var(--lobby-accent-2); }
body.console-page .world-access-banner.is-upcoming,
body.console-page .world-access-banner.is-reserved { background: linear-gradient(90deg, rgba(255,180,84,.14), rgba(255,180,84,.035)); border-bottom-color: rgba(255,180,84,.24); }
body.console-page .world-access-banner.is-upcoming strong,
body.console-page .world-access-banner.is-reserved strong { color: var(--lobby-warning); }
body.console-page .world-access-banner.is-locked { background: linear-gradient(90deg, rgba(255,91,91,.11), rgba(255,91,91,.025)); border-bottom-color: rgba(255,91,91,.18); }
body.console-page .world-access-banner.is-locked strong { color: #ff8d8d; }
body.console-page .world-card.world-access-joinable { border-color: rgba(87,201,122,.42); box-shadow: inset 0 0 0 1px rgba(87,201,122,.04); }
body.console-page .world-card.world-access-joinable::before { background: linear-gradient(180deg,#72e8a2,#2c9b63); opacity: 1; }
body.console-page .world-card.world-access-owned { border-color: rgba(104,209,255,.34); }
body.console-page .world-card.world-access-full,
body.console-page .world-card.world-access-locked { opacity: .82; }
body.console-page .badge.danger { background: rgba(255,91,91,.12); color: #ff8d8d; border-color: rgba(255,91,91,.28); }
body.console-page .world-action-row .primary-join-button,
body.console-page .world-action-row .primary-reserve-button {
    color: #fff; background: linear-gradient(180deg,#2c9b63,#176642); border-color: rgba(107,231,162,.58); box-shadow: 0 0 16px rgba(44,155,99,.14);
}
body.console-page .world-action-row .primary-resume-button {
    color: #fff; background: linear-gradient(180deg,#3a7bff,#1352db); border-color: rgba(125,195,255,.55);
}
body.console-page .world-action-row button:disabled { cursor: not-allowed; filter: saturate(.55); }
@media (max-width: 980px) {
    body.console-page .bento-worlds-overview { grid-template-columns: 1fr; }
    body.console-page .world-list-available { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    body.console-page .worlds-overview-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
    body.console-page .world-access-banner { align-items: flex-start; flex-direction: column; gap: 3px; }
    body.console-page .world-access-banner span { text-align: left; }
    body.console-page .world-opportunity-strip { align-items: stretch; flex-direction: column; }
    body.console-page .world-opportunity-strip button { width: 100%; }
}

/* Mondes */
body.console-page .world-list { display: grid; gap: 9px; }
body.console-page .world-card {
    position: relative; padding: 14px 16px; overflow: hidden;
    background: linear-gradient(90deg, rgba(255,255,255,0.015), rgba(28, 87, 196, 0.06));
    border: 1px solid var(--lobby-border);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px) !important;
    border-radius: 0 !important;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
body.console-page .world-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, var(--lobby-accent), var(--lobby-accent-2)); opacity: 0.7;
}
body.console-page .world-card:hover { transform: translateY(-2px); border-color: var(--lobby-border-strong); box-shadow: 0 10px 26px rgba(0,0,0,0.35); }
body.console-page .world-card.speed-world { border-color: rgba(255, 180, 84, 0.28); }
body.console-page .world-card.speed-world::before { background: linear-gradient(180deg, #ffd574, #ffb454); }
body.console-page .world-card-top { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
body.console-page .world-card h3 { margin: 9px 0 4px; font-size: 15px; font-weight: 800; color: var(--lobby-text); }
body.console-page .world-card > p { margin: 0; color: var(--lobby-text-soft); font-size: 12.5px; line-height: 1.4; }
body.console-page .world-id { margin-left: auto; font-family: var(--lobby-mono); color: var(--lobby-text-faint); font-size: 11px; }

body.console-page .badge {
    display: inline-flex; align-items: center; min-height: 20px; padding: 0 9px; font-size: 10px; font-weight: 900;
    letter-spacing: 0.03em; background: rgba(87, 201, 122, 0.14); color: var(--lobby-success); border: 1px solid rgba(87,201,122,0.28);
    clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px) !important;
    border-radius: 0 !important; font-family: var(--lobby-mono);
}
body.console-page .badge.warning { background: rgba(255, 180, 84, 0.14); color: var(--lobby-warning); border-color: rgba(255,180,84,0.3); }

body.console-page .world-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 11px; }
body.console-page .world-meta-box { padding: 8px 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--lobby-border); }
body.console-page .world-meta-box.highlight { border-color: rgba(69,119,255,0.28); background: rgba(69,119,255,0.06); }
body.console-page .world-meta-box span { display: block; color: var(--lobby-text-faint); font-family: var(--lobby-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.04em; }
body.console-page .world-meta-box strong { display: block; margin-top: 2px; font-size: 12.5px; color: var(--lobby-text); font-family: var(--lobby-mono); }
body.console-page .world-meta-box em { display: block; margin-top: 1px; font-style: normal; color: var(--lobby-text-faint); font-size: 10px; }

body.console-page .world-action-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
body.console-page .secondary-button,
body.console-page .world-action-row button {
    min-height: 34px; padding: 0 13px; font-weight: 800; font-size: 11.5px; color: var(--lobby-text);
    background: rgba(255,255,255,0.04); border: 1px solid var(--lobby-border); cursor: pointer;
    clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 7px 100%, 0 50%);
}
body.console-page .secondary-button:hover, body.console-page .world-action-row button:hover { border-color: var(--lobby-border-strong); }

/* Communauté (tiroir Amis) */
body.console-page .friends-drawer-body { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; padding-right: 2px; flex: 1; min-height: 0; }
body.console-page .panel-head.compact { margin-bottom: 10px; }
body.console-page .friend-status-strip {
    padding: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--lobby-border); flex: 0 0 auto;
}
body.console-page .social-friends-card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
body.console-page .social-referral-card { flex: 0 0 auto; }
body.console-page .social-referral-card h3, body.console-page .social-friends-card h3 { margin: 0 0 8px; font-size: 13.5px; color: var(--lobby-text); }
body.console-page .referral-link-row { display: flex; gap: 8px; }
body.console-page .referral-link-row input { flex: 1; height: 36px; padding: 0 10px; background: rgba(0,0,0,0.3); border: 1px solid var(--lobby-border); color: var(--lobby-text-soft); font-size: 11.5px; font-family: var(--lobby-mono); }
body.console-page .referral-link-row button, body.console-page .friend-request-form button {
    min-height: 36px; padding: 0 14px; font-weight: 800; font-size: 11.5px; color: #fff;
    background: linear-gradient(180deg, #3a7bff, #1352db); border: 1px solid rgba(125,195,255,0.5); cursor: pointer;
}
body.console-page .friend-request-form { display: flex; gap: 8px; margin-bottom: 10px; flex: 0 0 auto; }
body.console-page .friend-request-form input { flex: 1; height: 36px; padding: 0 10px; background: rgba(0,0,0,0.3); border: 1px solid var(--lobby-border); color: var(--lobby-text); font-size: 12px; }
body.console-page .social-list { display: grid; gap: 7px; max-height: 320px; overflow-y: auto; }
body.console-page .social-friends-card .social-list { flex: 1 1 auto; max-height: none; }

body.console-page .empty-state { padding: 13px; color: var(--lobby-text-faint); border: 1px dashed var(--lobby-border); font-size: 12px; text-align: center; }

/* Boutique */
body.console-page .shop-empty-state {
    display: grid; justify-items: center; gap: 6px; text-align: center; padding: 32px 16px;
    border: 1px dashed var(--lobby-border); background: rgba(255,255,255,0.015); margin-bottom: 14px;
}
body.console-page .shop-empty-icon { font-size: 30px; line-height: 1; opacity: 0.85; }
body.console-page .shop-empty-state h3 { margin: 2px 0 0; font-size: 14px; color: var(--lobby-text); }
body.console-page .shop-empty-state p { margin: 0; font-size: 12px; color: var(--lobby-text-faint); max-width: 40ch; }
body.console-page .shop-category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
body.console-page .shop-category-card {
    display: grid; justify-items: center; gap: 5px; padding: 16px 10px; text-align: center;
    border: 1px solid var(--lobby-border); background: rgba(255,255,255,0.02); color: var(--lobby-text-faint);
}
body.console-page .shop-category-icon { font-size: 20px; opacity: 0.8; }
body.console-page .shop-category-card strong { color: var(--lobby-text-soft); font-size: 12.5px; }
body.console-page .shop-category-status {
    font-family: var(--lobby-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--lobby-accent-2); background: rgba(69,119,255,0.14); border: 1px solid rgba(69,119,255,0.28);
    padding: 2px 8px; border-radius: 999px; margin-top: 2px;
}

/* Actualités */
body.console-page .news-list { display: grid; gap: 9px; max-height: 460px; overflow-y: auto; padding-right: 2px; }
body.console-page .news-card {
    display: grid; grid-template-columns: 62px 1fr; gap: 11px; padding: 9px; cursor: pointer;
    border: 1px solid var(--lobby-border); background: rgba(255,255,255,0.015);
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
    border-radius: 0 !important;
    transition: border-color 0.15s ease, background 0.15s ease;
}
body.console-page .news-card:hover { border-color: var(--lobby-border-strong); background: rgba(255,255,255,0.035); }
body.console-page .news-head-actions { display: flex; align-items: center; gap: 8px; }
body.console-page .news-unread-pill { color: var(--lobby-success); background: rgba(87,201,122,0.14); border-color: rgba(87,201,122,0.28); }
body.console-page .news-card.is-unread { border-color: rgba(104,209,255,0.35); }
body.console-page .news-card-new-badge {
    display: inline-flex; align-items: center; margin-left: 7px; padding: 1px 7px;
    font-family: var(--lobby-mono); font-size: 8.5px; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase;
    color: #04101f; background: var(--lobby-accent-2); vertical-align: middle;
}
body.console-page .news-image { background-size: cover; background-position: center; }
body.console-page .news-icon { display: flex; align-items: center; justify-content: center; font-size: 20px; background: rgba(255,255,255,0.04); }
body.console-page .news-card h3 { margin: 0 0 3px; font-size: 12.5px; color: var(--lobby-text); }
body.console-page .news-meta { display: flex; gap: 8px; color: var(--lobby-text-faint); font-family: var(--lobby-mono); font-size: 9.5px; margin-bottom: 3px; }
body.console-page .news-open-hint { color: var(--lobby-accent-2); font-size: 10.5px; font-weight: 700; }
body.console-page .news-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; color: var(--lobby-text-faint); font-size: 12px; font-family: var(--lobby-mono); }
body.console-page .news-pagination button { width: 26px; height: 26px; border: 1px solid var(--lobby-border); background: rgba(255,255,255,0.03); color: var(--lobby-text-soft); cursor: pointer; }

/* Prestiges */
body.console-page .prestige-filter-tabs { display: flex; gap: 6px; }
body.console-page .prestige-filter { min-height: 28px; padding: 0 11px; font-size: 11px; font-weight: 700; color: var(--lobby-text-soft); background: rgba(255,255,255,0.03); border: 1px solid var(--lobby-border); cursor: pointer; }
body.console-page .prestige-filter.active { color: #fff; background: rgba(69,119,255,0.22); border-color: rgba(69,119,255,0.4); }
body.console-page .prestige-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; max-height: 460px; overflow-y: auto; padding-right: 2px; }
body.console-page .prestige-modal .prestige-grid { grid-template-columns: repeat(2, minmax(0,1fr)); max-height: none; }
@media (max-width: 760px) { body.console-page .prestige-modal .prestige-grid { grid-template-columns: 1fr; } }
body.console-page .prestige-card {
    padding: 12px; background: rgba(255,255,255,0.02); border: 1px solid var(--lobby-border);
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
    border-radius: 0 !important;
}
body.console-page .prestige-card-head { display: flex; gap: 9px; align-items: center; margin-bottom: 7px; }
body.console-page .prestige-title { font-weight: 800; font-size: 12.5px; color: var(--lobby-text); }
body.console-page .prestige-meta { display: flex; justify-content: space-between; font-family: var(--lobby-mono); font-size: 9.5px; color: var(--lobby-text-faint); margin-top: 6px; }
body.console-page .prestige-desc { margin: 0 0 8px; color: var(--lobby-text-soft); font-size: 11.5px; line-height: 1.4; }
body.console-page .prestige-bar { height: 5px; background: rgba(255,255,255,0.06); overflow: hidden; }
body.console-page .prestige-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--lobby-accent), var(--lobby-accent-2)); }

/* Admin */
body.console-page .admin-stats { display: flex; gap: 8px; }
body.console-page .admin-note { margin: 10px 0 14px; color: var(--lobby-text-faint); font-size: 11.5px; }
body.console-page .list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; }
body.console-page .admin-user-card { padding: 9px 11px; background: rgba(255,255,255,0.02); border: 1px solid var(--lobby-border); font-size: 12px; }
body.console-page .admin-user-meta { color: var(--lobby-text-faint); font-size: 10.5px; margin-top: 4px; }

/* ================= CENTRE DES PARTIES (bento) =================
   Layout inspiré des lobbys RTS (StarCraft II / AoE / client LoL) :
   1) intro   — bandeau de page fin, compact (pas une grosse carte)
   2) ranked  — carte "hero" identitaire (qui suis-je en compétitif),
                traitement glow/hero identique à .bento-power du Lobby
   3) lobby   — bannière CTA pleine largeur : créer/rejoindre (l'action
                la plus importante de la page doit sauter aux yeux)
   4) quick + details — colonnes jumelles façon "browser de lobby" :
                matchs en direct à gauche, classement/coffre à droite
   5) history — bande secondaire/archive, compacte, tout en bas
   ================================================================= */
body.console-page .console-bento-parties {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
        "intro intro intro intro"
        "ranked ranked ranked ranked"
        "lobby lobby lobby lobby"
        "quick quick details details"
        "history history history history";
    gap: 14px;
}
body.console-page .bento-parties-intro { grid-area: intro; }
body.console-page .bento-parties-ranked { grid-area: ranked; }
body.console-page .bento-parties-lobby { grid-area: lobby; }
body.console-page .bento-parties-quick { grid-area: quick; }
body.console-page .bento-parties-history { grid-area: history; }
body.console-page .bento-parties-details { grid-area: details; }

/* -- 1) Bandeau de page compact -- */
body.console-page .bento-parties-header { padding: 14px 22px; }
body.console-page .bento-parties-header .panel-head { margin-bottom: 0; }
body.console-page .bento-parties-header h2 { font-size: 15.5px; margin-top: 2px; }
body.console-page .bento-parties-header .panel-subtitle { font-size: 11px; margin-top: 2px; }

/* -- 2) Carte hero "Parties classées" (identité compétitive) -- */
body.console-page .bento-parties-hero {
    position: relative; overflow: hidden;
    padding: 26px 26px 28px;
    border-color: rgba(255,213,116,0.28) !important;
    box-shadow: var(--lobby-shadow), 0 0 40px rgba(255,180,84,0.10) !important;
}
body.console-page .parties-hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        linear-gradient(160deg, rgba(6,12,24,0.55) 0%, rgba(5,9,18,0.85) 55%, rgba(4,8,16,0.97) 100%),
        url('../images/lobby/background.webp');
    background-size: cover; background-position: center 25%;
}
body.console-page .parties-hero-glow {
    position: absolute; z-index: 0; pointer-events: none;
    width: 300px; height: 300px; right: -100px; top: -120px;
    background: radial-gradient(circle, rgba(255,213,116,0.22), transparent 70%);
    filter: blur(8px);
}
body.console-page .bento-parties-hero > *:not(.parties-hero-bg):not(.parties-hero-glow) { position: relative; z-index: 1; }
body.console-page .bento-parties-hero .speed-hub-module-head h3 { font-size: 21px; }
body.console-page .bento-parties-hero .speed-hub-copy { font-size: 12.5px; max-width: 56ch; }
body.console-page .bento-parties-hero .speed-ranked-mini { gap: 18px; }
body.console-page .bento-parties-hero .speed-ranked-mini-main { gap: 18px; }
body.console-page .bento-parties-hero .speed-ranked-mini-emblem { width: 74px; height: 74px; font-size: 30px; }
body.console-page .bento-parties-hero .speed-ranked-mini-main strong { font-size: 25px; }
body.console-page .bento-parties-hero .speed-ranked-mini-main small { font-size: 11px; }
body.console-page .bento-parties-hero .speed-ranked-mini-main em { font-size: 12px; }
body.console-page .bento-parties-hero .speed-ranked-mini-stats { gap: 10px; }
body.console-page .bento-parties-hero .speed-ranked-mini-stats span { padding: 13px 10px; font-size: 11px; }
body.console-page .bento-parties-hero .speed-ranked-mini-stats b { font-size: 15px; }
body.console-page .bento-parties-hero .speed-ranked-mini-progress { height: 10px; }
body.console-page .bento-parties-hero .speed-ranked-mini-footer span { font-size: 12px; }
body.console-page .bento-parties-hero .speed-ranked-mini-footer button { min-height: 40px; padding: 0 18px; font-size: 12.5px; }

/* -- 3) Bannière CTA "Créer ou rejoindre un lobby" -- */
body.console-page .bento-parties-cta {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
    padding: 22px 26px;
    background: linear-gradient(135deg, rgba(58,123,255,0.14), rgba(19,82,219,0.05));
    border-color: rgba(69,119,255,0.34) !important;
    box-shadow: var(--lobby-shadow), 0 0 30px rgba(58,123,255,0.10) !important;
}
body.console-page .parties-cta-copy { flex: 1 1 320px; min-width: 260px; }
body.console-page .bento-parties-cta .speed-hub-module-head { margin-bottom: 6px; }
body.console-page .bento-parties-cta .speed-hub-module-head h3 { font-size: 19px; }
body.console-page .bento-parties-cta .speed-hub-kicker { font-size: 11px; }
body.console-page .bento-parties-cta .speed-hub-copy { margin: 0; max-width: 48ch; }
body.console-page .bento-parties-cta .speed-hub-note { margin-top: 6px; }
body.console-page .bento-parties-cta .parties-cta-actions { flex: 0 0 auto; gap: 12px; }
body.console-page .bento-parties-cta .parties-cta-actions button { min-height: 48px; padding: 0 26px; font-size: 13.5px; }
body.console-page .bento-parties-cta .parties-cta-actions button:not(.secondary-button) {
    background: linear-gradient(180deg, #4a8bff, #1352db);
    box-shadow: 0 10px 26px rgba(58,123,255,0.35);
}

body.console-page .speed-hub-module-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
body.console-page .speed-hub-kicker { display: block; color: var(--lobby-accent-2); font-family: var(--lobby-mono); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
body.console-page .speed-hub-module-head h3 { margin: 3px 0 0; font-size: 14.5px; color: var(--lobby-text); }
body.console-page .speed-module-badge { flex: 0 0 auto; font-family: var(--lobby-mono); font-size: 9.5px; font-weight: 900; padding: 3px 8px; color: var(--lobby-text-faint); background: rgba(255,255,255,0.04); border: 1px solid var(--lobby-border); }
body.console-page .speed-module-badge.ranked { color: #ffd574; border-color: rgba(255,213,116,0.3); background: rgba(255,213,116,0.1); }
body.console-page .speed-module-badge.quick { color: var(--lobby-success); border-color: rgba(87,201,122,0.3); background: rgba(87,201,122,0.1); }

/* -- 4a) Colonne "matchs en direct" (parties rapides) -- petit indicateur live + liste qui remplit la carte -- */
body.console-page .bento-parties-quick.parties-matches-col { display: flex; flex-direction: column; }
body.console-page .bento-parties-quick .speed-hub-copy { flex: 0 0 auto; }
body.console-page .parties-matches-col .speed-module-badge.quick { position: relative; padding-left: 17px; }
body.console-page .parties-matches-col .speed-module-badge.quick::before {
    content: ''; position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
    width: 6px; height: 6px; border-radius: 50%; background: var(--lobby-success);
    box-shadow: 0 0 8px 2px rgba(87,201,122,0.6);
    animation: partiesLiveDotPulse 1.6s ease-in-out infinite;
}
@keyframes partiesLiveDotPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { body.console-page .parties-matches-col .speed-module-badge.quick::before { animation: none; } }
body.console-page .speed-quick-empty { text-align: center; padding: 14px; color: var(--lobby-text-faint); font-size: 12px; }
body.console-page .speed-quick-worlds { display: grid; gap: 9px; max-height: 560px; overflow-y: auto; padding-right: 2px; }
body.console-page .parties-matches-col .speed-quick-worlds { flex: 1 1 auto; max-height: none; min-height: 260px; }

/* -- 4b) Colonne "classement & coffre" (standings) -- empile stats + classement, aligné en hauteur avec la liste de matchs -- */
body.console-page .parties-standings-col .speed-profile-layout-details { grid-template-columns: 1fr; gap: 14px; }
body.console-page .parties-standings-col .speed-reward-vault { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--lobby-border); background: transparent; }
body.console-page .parties-standings-col .speed-reward-card { grid-template-columns: auto minmax(0,1fr); }
body.console-page .parties-standings-col .speed-reward-action { grid-column: 1 / -1; margin-top: 6px; }

body.console-page .speed-hub-copy { margin: 0 0 12px; color: var(--lobby-text-soft); font-size: 12px; line-height: 1.45; }
body.console-page .speed-hub-actions { display: flex; flex-wrap: wrap; gap: 8px; }
body.console-page .speed-hub-actions button:not(.secondary-button) {
    min-height: 36px; padding: 0 16px; font-weight: 800; font-size: 12px; color: #fff;
    background: linear-gradient(180deg, #3a7bff, #1352db); border: 1px solid rgba(125,195,255,0.5); cursor: pointer;
}
body.console-page .speed-hub-note { display: block; margin-top: 10px; color: var(--lobby-text-faint); font-size: 10.5px; }

/* -- 5) Bande secondaire "Historique" -- compacte, moins de poids visuel -- */
body.console-page .bento-parties-archive { padding: 15px 20px 17px; }
body.console-page .bento-parties-archive .speed-hub-module-head h3 { font-size: 13px; }
body.console-page .bento-parties-archive .speed-hub-copy { font-size: 11px; margin-bottom: 10px; }
body.console-page .bento-parties-archive .speed-hub-actions { margin-bottom: 10px; }
body.console-page .bento-parties-archive .speed-hub-actions button { min-height: 30px; padding: 0 12px; font-size: 11px; }
body.console-page .speed-match-history { display: grid; gap: 6px; max-height: 230px; overflow-y: auto; padding-right: 2px; }

body.console-page .speed-section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
body.console-page .speed-section-heading span { display: block; color: var(--lobby-accent-2); font-family: var(--lobby-mono); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; }
body.console-page .speed-section-heading h3 { margin: 3px 0 0; font-size: 14.5px; color: var(--lobby-text); }
body.console-page .speed-section-heading small { color: var(--lobby-text-faint); font-size: 11px; max-width: 40ch; }
body.console-page .speed-empty-state { padding: 15px; text-align: center; color: var(--lobby-text-faint); font-size: 12px; border: 1px dashed var(--lobby-border); }

/* ================= CHAT — tiroir latéral ================= */
.chat-drawer-backdrop {
    position: fixed; inset: 0; z-index: 60; border: 0; padding: 0; margin: 0; cursor: pointer;
    background: rgba(1, 4, 10, 0.5); backdrop-filter: blur(2px);
}
.chat-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
    width: min(420px, 100vw);
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, rgba(8, 15, 28, 0.98), rgba(4, 8, 16, 0.99));
    border-left: 1px solid var(--lobby-border-strong);
    box-shadow: -24px 0 60px rgba(0,0,0,0.5);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    padding: 18px 18px 14px;
}
.chat-drawer.is-open { transform: translateX(0); }
.chat-drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.chat-drawer-head h2 { margin: 3px 0 4px; font-size: 16px; color: var(--lobby-text); }
.chat-drawer-head p { margin: 0; color: var(--lobby-text-faint); font-size: 11.5px; line-height: 1.4; }
.chat-drawer-head button { width: 32px; height: 32px; flex: 0 0 auto; border: 1px solid var(--lobby-border); background: rgba(255,255,255,0.04); color: var(--lobby-text-soft); font-size: 18px; cursor: pointer; }
.chat-room-bar-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.chat-live-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 10px; font-family: var(--lobby-mono); font-size: 10px; font-weight: 800; color: var(--lobby-success); background: rgba(87,201,122,0.12); border: 1px solid rgba(87,201,122,0.28); }
#account-chat-online-count { color: var(--lobby-text-faint); font-size: 11px; font-family: var(--lobby-mono); }
.chat-channel-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chat-channel-tabs button { min-height: 28px; padding: 0 11px; font-size: 11.5px; font-weight: 700; color: var(--lobby-text-soft); background: rgba(255,255,255,0.03); border: 1px solid var(--lobby-border); cursor: pointer; }
.chat-channel-tabs button.active { color: #fff; background: rgba(69,119,255,0.22); border-color: rgba(69,119,255,0.4); }
/* Corrige (2026-09-26, retour utilisateur "Général31 collé") : le compteur de messages non lus
   (le <span> injecté par loadAccountChat/loadAccountChatChannels) n'avait jamais eu de style ici
   - il s'affichait comme du texte brut accole au label, sans espace ni pastille. Repris tel quel
   depuis styles-compte.css, ou ce badge existe deja correctement. */
.chat-channel-tabs button span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: rgba(255,255,255,.08); color: #9fdcff; font-size: .66rem; }
.chat-room-bar { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--lobby-border); }
.chat-room-bar strong { color: var(--lobby-text); font-size: 13px; }
#account-chat-room-help { color: var(--lobby-text-faint); font-size: 11px; margin-left: 8px; }

/* Corrige (2026-09-26, "chat écrasé quand il y a beaucoup de messages") : même cause que dans
   account-chat-widget.css - overflow:hidden laissait la grille compresser chaque message à
   hauteur du tiroir / nombre de messages. Voir le commentaire détaillé là-bas. */
.account-chat-messages { flex: 1; min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; gap: 9px; overflow-x: hidden; overflow-y: auto; margin-bottom: 10px; padding-right: 4px; align-content: start; }
.account-chat-message { width: 100%; max-width: 100%; min-width: 0; display: flex; flex-shrink: 0; gap: 9px; padding: 7px; border: 1px solid transparent; box-sizing: border-box; overflow-x: clip; }
.account-chat-message.is-me { background: rgba(69,119,255,0.06); border-color: rgba(69,119,255,0.14); }
.account-chat-message.is-staff .account-chat-author { color: #ffd574; }
.chat-message-avatar { width: 28px; height: 28px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; background: var(--lobby-panel-strong); border: 1px solid var(--lobby-border); font-size: 11px; font-weight: 800; color: var(--lobby-accent-2); }
/* Corrige (2026-09-26, retour utilisateur "nom/heure qui deborde") : cette regle n'avait jamais
   recu le meme correctif de retour a la ligne que account-chat-widget.css (le tiroir flottant).
   Sans flex-wrap ni min-width:0/overflow-wrap, un pseudo un peu long ne pouvait ni passer a la
   ligne ni retrecir, et debordait/chevauchait le badge Equipe ou l'heure a cote. */
.account-chat-top { min-width: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 8px; }
.account-chat-author { min-width: 0; font-weight: 800; font-size: 12px; color: var(--lobby-text); overflow-wrap: anywhere; }
.chat-staff-badge { margin-left: 6px; font-size: 9px; padding: 1px 5px; color: #ffd574; background: rgba(255,213,116,0.12); border: 1px solid rgba(255,213,116,0.28); }
.chat-discord-badge { margin-left: 6px; font-size: 9px; padding: 1px 5px; color: #c9cdfb; background: rgba(88,101,242,0.18); border: 1px solid rgba(88,101,242,0.45); }
.chat-message-content { flex: 1 1 0%; max-width: 100%; min-width: 0; font-size: 12.5px; color: var(--lobby-text-soft); line-height: 1.4; overflow-x: clip; }
.chat-message-content p { width: 100%; max-width: 100%; min-width: 0; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.account-chat-actions { display: flex; gap: 8px; }
.chat-message-action { background: none; border: 0; color: var(--lobby-text-faint); font-size: 10.5px; cursor: pointer; }
.chat-message-action:hover { color: var(--lobby-accent-2); }
.chat-message-action.danger:hover { color: var(--lobby-danger); }
.chat-reply-quote { display: block; margin-bottom: 4px; padding: 6px 8px; background: rgba(255,255,255,0.03); border-left: 2px solid var(--lobby-accent); font-size: 11px; color: var(--lobby-text-faint); text-align: left; }

.account-chat-reply { display: flex; justify-content: space-between; align-items: center; padding: 7px 9px; margin-bottom: 8px; background: rgba(255,255,255,0.03); border-left: 2px solid var(--lobby-accent-2); font-size: 11.5px; }
.account-chat-reply[hidden] { display: none !important; }
.account-chat-reply small { display: block; color: var(--lobby-text-faint); font-size: 9.5px; }
.account-chat-form { display: flex; gap: 8px; align-items: flex-end; }
.account-chat-form textarea { flex: 1; padding: 9px 11px; background: rgba(0,0,0,0.3); border: 1px solid var(--lobby-border); color: var(--lobby-text); font-size: 12.5px; resize: none; }
.account-chat-form button { min-height: 38px; padding: 0 16px; font-weight: 800; font-size: 12px; color: #fff; background: linear-gradient(180deg, #3a7bff, #1352db); border: 1px solid rgba(125,195,255,0.5); cursor: pointer; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1180px) {
    body.console-page .console-bento:not(.console-bento-parties):not(.console-bento-worlds-view) { grid-template-columns: 1fr 1fr; grid-template-areas: "command command" "power power" "news news" "spectate rank" "admin admin"; }
    body.console-page .console-bento-parties { grid-template-columns: 1fr 1fr; grid-template-areas: "intro intro" "ranked ranked" "lobby lobby" "quick quick" "details details" "history history"; }
    body.console-page .console-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.console-page .status-live { grid-column: span 2; border-left: 0; border-top: 1px solid rgba(90,155,255,0.16); }
}
@media (max-width: 780px) {
    body.console-page .console-topbar { padding: 8px 10px; }
    body.console-page .console-nav-label { display: none; }
    body.console-page .console-nav button { padding: 0 10px; }
    body.console-page .console-status { grid-template-columns: 1fr 1fr; }
    body.console-page .console-modes { grid-template-columns: 1fr; position: static; }
    body.console-page .console-bento,
    body.console-page .console-bento-parties { grid-template-columns: 1fr; grid-template-areas: unset; }
    body.console-page .console-bento > *,
    body.console-page .console-bento-parties > * { grid-area: auto !important; }
    body.console-page .selector-card { grid-template-columns: 1fr; }
    .chat-drawer { width: 100vw; padding: 14px; }
}

/* =========================================================
   Rail layout (v2) - remplace la barre du haut par une
   colonne laterale fixe. Ajoute aussi : modal prestige,
   flux spectateur, carte de rang social, amis "steam-like".
   ========================================================= */
body.rail-page .console-layout {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

body.rail-page .console-rail {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 220px;
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px 14px;
    background: var(--lobby-panel-strong);
    border-right: 1px solid var(--lobby-border);
    overflow-y: auto;
}

body.rail-page .console-rail .console-brand { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
body.rail-page .console-rail .brand-text strong { display: block; font-size: 12px; letter-spacing: 0.04em; color: var(--lobby-text); }
body.rail-page .console-rail .brand-text small { display: block; font-size: 9.5px; color: var(--lobby-text-faint); font-family: var(--lobby-mono); }

body.rail-page .console-modes-rail { display: grid; grid-template-columns: 1fr; gap: 8px; width: 100%; }
body.rail-page .console-modes-rail button {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.02); border: 1px solid var(--lobby-border); color: var(--lobby-text-faint);
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    cursor: pointer; font-size: 12px; font-weight: 800; text-align: left;
}
body.rail-page .console-modes-rail .mode-index { font-family: var(--lobby-mono); font-size: 10px; color: var(--lobby-accent-2); }
body.rail-page .console-modes-rail button.is-active { color: #fff; border-color: rgba(104,209,255,0.5); background: linear-gradient(135deg, rgba(19,91,176,0.32), rgba(8,16,34,0.95)); }
body.rail-page .console-modes-rail button.is-locked {
    cursor: not-allowed; opacity: 0.55; background: rgba(255,255,255,0.015);
    position: relative; padding-right: 30px;
}
body.rail-page .console-modes-rail button.is-locked::after {
    content: '🔒'; position: absolute; top: 10px; right: 10px; font-size: 11px; opacity: 0.8;
}
body.rail-page .console-modes-rail button.is-locked .mode-index { color: var(--lobby-text-faint); }
body.rail-page .console-modes-rail button.is-locked:hover { border-color: var(--lobby-border); background: rgba(255,255,255,0.015); }
body.rail-page .console-modes-rail .mode-lock-tag {
    margin-top: 2px; font-family: var(--lobby-mono); font-size: 8.5px; font-weight: 900; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--lobby-warning); background: rgba(255,180,84,0.12);
    padding: 2px 6px; border: 1px solid rgba(255,180,84,0.28);
}

body.rail-page .console-nav-rail { display: grid; gap: 6px; flex: 1; align-content: start; }
body.rail-page .console-nav-rail button {
    display: flex; align-items: center; gap: 10px;
    min-height: 38px; padding: 0 10px;
    font-weight: 700; font-size: 12.5px; color: var(--lobby-text-soft);
    background: transparent; border: 1px solid transparent;
    cursor: pointer; text-align: left; position: relative;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
body.rail-page .console-nav-rail button:hover { background: rgba(255,255,255,0.04); border-color: var(--lobby-border); color: var(--lobby-text); }
body.rail-page .console-nav-rail button.active,
body.rail-page .console-nav-rail button.is-active {
    background: rgba(69,119,255,0.14); border-color: rgba(69,119,255,0.3); color: #fff;
}
body.rail-page #chat-launcher.is-active,
body.rail-page #friends-launcher.is-active { background: rgba(69,119,255,0.2); border-color: var(--lobby-border-strong); color: #fff; }
body.rail-page .chat-launcher-badge { margin-left: auto; }

body.rail-page .console-rail-logout {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; font-weight: 800; font-size: 12px; color: #ffe4e6;
    background: linear-gradient(180deg, #a13947, #6e1e28); border: 1px solid rgba(224,97,110,0.5);
    cursor: pointer; margin-top: auto;
}

/* Support multi-langue (2026-09-13) : rangée de drapeaux dans la colonne de gauche du lobby,
   entre la navigation de compte et le bouton de déconnexion. Réutilise .lang-btn (frontend/js/i18n.js
   écoute déjà les clics sur cette classe n'importe où sur la page) avec un style propre au lobby. */
body.rail-page .lobby-lang-switch {
    display: flex; gap: 6px; padding: 4px 0;
    border-top: 1px solid var(--lobby-border, rgba(255,255,255,0.1));
    border-bottom: 1px solid var(--lobby-border, rgba(255,255,255,0.1));
    margin: 4px 0;
}
body.rail-page .lobby-lang-switch .lang-btn {
    flex: 1; display: flex; align-items: center; justify-content: center;
    min-height: 32px; font-size: 16px; line-height: 1;
    background: transparent; border: 1px solid transparent; border-radius: 6px;
    cursor: pointer; filter: grayscale(35%); opacity: .82;
    transition: background 0.15s ease, border-color 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}
body.rail-page .lobby-lang-switch .lang-btn:hover {
    background: rgba(255,255,255,0.04); border-color: var(--lobby-border, rgba(255,255,255,0.1));
    filter: none; opacity: 1;
}
body.rail-page .lobby-lang-switch .lang-btn.is-active {
    background: rgba(69,119,255,0.14); border-color: rgba(69,119,255,0.3);
    filter: none; opacity: 1;
}

body.rail-page .console-main { flex: 1; min-width: 0; }
body.rail-page .console-status { position: relative; z-index: 1; width: auto; margin: 14px 16px 0; }
body.rail-page .console-shell { width: auto; margin: 14px 16px 60px; }

/* Grille principale : ajoute spectate + rank (centre de contrôle, pleine largeur) */
body.console-page .console-bento:not(.console-bento-parties):not(.console-bento-worlds-view) {
    grid-template-areas:
        "command command power"
        "news news spectate"
        "rank rank rank"
        "admin admin admin";
    grid-template-rows: auto auto auto auto;
}
body.console-page .bento-spectate { grid-area: spectate; }
body.console-page .bento-rank { grid-area: rank; }

.spectate-feed-list { display: grid; gap: 8px; max-height: 220px; overflow-y: auto; }
.spectate-row {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px;
    background: rgba(255,255,255,0.02); border: 1px solid var(--lobby-border);
    clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
    text-decoration: none;
}
.spectate-row-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lobby-danger); box-shadow: 0 0 7px var(--lobby-danger); flex: 0 0 auto; animation: consolePulse 1.6s ease-in-out infinite; }
.spectate-row-copy { flex: 1; min-width: 0; }
.spectate-row-copy strong { display: block; font-size: 12px; color: var(--lobby-text); }
.spectate-row-copy span { display: block; font-size: 10.5px; color: var(--lobby-text-faint); font-family: var(--lobby-mono); }
.spectate-row-action { flex: 0 0 auto; font-size: 11px; font-weight: 800; color: var(--lobby-accent-2); }

/* Rang social */
.social-rank-card { display: grid; gap: 8px; }
.social-rank-card strong { font-size: 15px; color: var(--lobby-text); }
.social-rank-card > span { font-size: 12px; color: var(--lobby-text-soft); font-family: var(--lobby-mono); }
.social-rank-bar { height: 6px; background: rgba(255,255,255,0.06); overflow: hidden; }
.social-rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--lobby-accent), var(--lobby-accent-2)); font-style: normal; }
.social-rank-card > small { color: var(--lobby-text-faint); font-size: 11px; }
.social-rank-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.social-rank-stats > div { padding: 8px 10px; background: rgba(255,255,255,0.02); border: 1px solid var(--lobby-border); }
.social-rank-stats strong { display: block; font-size: 16px; color: var(--lobby-text); font-family: var(--lobby-mono); }
.social-rank-stats span { display: block; font-size: 10.5px; color: var(--lobby-text-faint); margin-top: 2px; }
.social-rank-stats em { color: var(--lobby-accent-2); font-style: normal; }
.points-curve { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--lobby-border); }
.points-curve-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.points-curve-head span { color: var(--lobby-text-faint); font-family: var(--lobby-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.points-curve-head strong { font-size: 12.5px; color: var(--lobby-accent-2); font-family: var(--lobby-mono); }
#points-curve-svg { display: block; width: 100%; height: 56px; overflow: visible; }
#points-curve-svg polyline.points-curve-line { fill: none; stroke: var(--lobby-accent-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
#points-curve-svg polygon.points-curve-fill { fill: url(#points-curve-gradient); opacity: 0.5; }
#points-curve-svg circle.points-curve-dot { fill: var(--lobby-accent-2); }
.points-curve-empty { display: block; color: var(--lobby-text-faint); font-size: 10.5px; }
.points-curve.has-data .points-curve-empty { display: none; }
.points-curve:not(.has-data) #points-curve-svg { display: none; }

/* Profil (avatar + emblème général + heures de jeu) */
.profile-widget { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.profile-widget-lg { gap: 30px; padding: 6px 0 4px; }
.profile-widget-avatar { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; }
.profile-avatar-circle {
    position: relative; width: 58px; height: 58px; flex: 0 0 auto; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
    background: linear-gradient(150deg, #3a7bff, #1a3d8f);
    border: 2px solid var(--lobby-border-strong); cursor: pointer; padding: 0;
}
.profile-widget-lg .profile-avatar-circle { width: 92px; height: 92px; border-width: 3px; }
.profile-avatar-circle #profile-avatar-inner { font-family: var(--lobby-mono); font-weight: 900; font-size: 20px; color: #fff; }
.profile-widget-lg .profile-avatar-circle #profile-avatar-inner { font-size: 32px; }
.profile-avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-edit {
    position: absolute; inset: auto 0 0 0; padding: 4px 0; font-size: 8.5px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.04em; color: #fff; background: rgba(4,8,16,0.72); opacity: 0; transition: opacity 0.15s ease;
}
.profile-avatar-circle:hover .profile-avatar-edit, .profile-avatar-circle:focus-visible .profile-avatar-edit { opacity: 1; }
.profile-widget-identity { display: flex; flex-direction: column; gap: 4px; }
.profile-widget-identity strong { font-size: 15px; color: var(--lobby-text); }
.profile-widget-lg .profile-widget-identity strong { font-size: 20px; font-weight: 800; }
.profile-widget-identity span { font-size: 11.5px; color: var(--lobby-accent-2); font-weight: 700; font-family: var(--lobby-mono); }
.profile-playtime-badge {
    display: inline-flex !important; align-items: center; gap: 6px; width: fit-content;
    padding: 4px 10px 4px 8px; margin-top: 2px;
    background: linear-gradient(135deg, rgba(255,213,116,0.16), rgba(255,180,84,0.06));
    border: 1px solid rgba(255,213,116,0.32); box-shadow: 0 0 12px rgba(255,213,116,0.12);
}
.profile-playtime-badge i { font-style: normal; font-size: 11px; color: #ffd574; }
.profile-playtime-badge span { color: #ffd574 !important; font-weight: 800 !important; }
.profile-widget-emblems { flex: 1 1 260px; min-width: 0; }
.profile-emblems-label { display: block; margin-bottom: 10px; color: var(--lobby-text-faint); font-family: var(--lobby-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.profile-emblem-showcase { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile-emblem-preview { display: flex; align-items: center; justify-content: center; min-width: 64px; }
#profile-emblem-world-label { margin-left: 6px; color: var(--lobby-text-faint); text-transform: none; letter-spacing: 0; font-weight: 600; }
.profile-widget-status { flex: 1 1 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.profile-widget-status label { color: var(--lobby-text-faint); font-family: var(--lobby-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.profile-widget-status textarea {
    resize: vertical; min-height: 44px; padding: 10px 12px; background: rgba(0,0,0,0.28); border: 1px solid var(--lobby-border);
    color: var(--lobby-text); font-size: 12.5px; font-family: inherit; line-height: 1.45;
}
.profile-widget-status textarea:focus { outline: none; border-color: var(--lobby-border-strong); }
.profile-status-count { align-self: flex-end; color: var(--lobby-text-faint); font-size: 10px; font-family: var(--lobby-mono); }

/* Editeur de drapeau general (reutilise le meme langage visuel que l'editeur de partie Speed) */
#profile-emblem-editor.speed-lobby-emblem-editor { position: fixed; z-index: 62; }

/* Modale prestiges (reutilise le pattern du tiroir de chat) */
.prestige-modal {
    position: fixed; inset: 0; z-index: 61; display: flex; align-items: center; justify-content: center;
    padding: 30px; pointer-events: none; opacity: 0; transition: opacity 0.2s ease;
}
.prestige-modal.is-open { pointer-events: auto; opacity: 1; }
.prestige-modal-card {
    width: min(1100px, 100%); max-height: calc(100vh - 48px);
    transform: translateY(12px); transition: transform 0.2s ease;
}
.prestige-modal.is-open .prestige-modal-card { transform: translateY(0); }
.prestige-modal .bento-prestige { max-height: calc(100vh - 60px); overflow-y: auto; }
.prestige-modal #prestige-modal-close {
    width: 32px; height: 32px; border: 1px solid var(--lobby-border); background: rgba(255,255,255,0.04);
    color: var(--lobby-text-soft); font-size: 18px; cursor: pointer;
}

/* Amis "steam-like" : avatar cercle + pastille de statut incrustee */
.steam-friends-list { gap: 8px !important; }
.steam-friends-list .social-row {
    display: flex; align-items: center; gap: 11px; padding: 9px 10px;
    background: rgba(255,255,255,0.02); border: 1px solid var(--lobby-border);
    transition: border-color 0.15s ease, background 0.15s ease;
    min-width: 0;
}
.steam-friends-list .social-row:hover { border-color: var(--lobby-border-strong); background: rgba(255,255,255,0.045); }
.steam-friends-list .social-row-main { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.friend-avatar {
    position: relative;
    width: 34px; height: 34px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-family: var(--lobby-mono); font-weight: 800; font-size: 13px; color: #fff;
    background: linear-gradient(150deg, #3a7bff, #1a3d8f);
    border: 1px solid rgba(255,255,255,0.12);
    overflow: hidden;
}
.friend-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.friend-avatar::after {
    /* À côté de l'avatar plutôt que collé dessus : voir le gap élargi sur .social-row-main. */
    content: ''; position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
    width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid var(--lobby-panel-strong);
    background: var(--lobby-text-faint);
}
.friend-avatar[data-status="online"]::after { background: var(--lobby-success); box-shadow: 0 0 6px var(--lobby-success); }
.friend-avatar[data-status="pending"]::after { background: var(--lobby-warning); }
.friend-row-copy { min-width: 0; }
.friend-row-copy strong { display: block; font-size: 12.5px; color: var(--lobby-text); }
.friend-row-copy small { display: block; font-size: 10.5px; color: var(--lobby-text-faint); margin-top: 1px; }
.friend-status-message {
    display: block; margin-top: 2px; font-size: 11px; font-style: italic; color: var(--lobby-text-soft);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.steam-friends-list .social-online { color: var(--lobby-success) !important; font-weight: 700; }
.steam-friends-list .social-pending { color: var(--lobby-warning) !important; }
.steam-friends-list .social-row-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.steam-friends-list .social-row-actions button {
    min-height: 28px; padding: 0 10px; font-size: 10.5px; font-weight: 700; color: var(--lobby-text-soft);
    background: rgba(255,255,255,0.04); border: 1px solid var(--lobby-border); cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.steam-friends-list .social-row-actions button:hover { border-color: var(--lobby-border-strong); color: var(--lobby-text); }
.steam-friends-list .social-row-actions button[data-friend-dm] { padding: 0 9px; font-size: 13px; line-height: 1; }
.social-row-main[data-friend-open-profile] { cursor: pointer; border-radius: 8px; }
.social-row-main[data-friend-open-profile]:hover .friend-row-copy strong { color: var(--lobby-accent, #6ea8ff); }

/* ================= PROFIL AMI (modale) ================= */
.friend-profile-modal { position: fixed; inset: 0; z-index: 10060; display: grid; place-items: center; padding: clamp(8px, 2vw, 24px); }
.friend-profile-backdrop { position: absolute; inset: 0; background: rgba(1,5,12,0.86); backdrop-filter: blur(8px); }
.friend-profile-card {
    position: relative; width: min(420px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
    border: 1px solid var(--lobby-border-strong); border-radius: 18px;
    background: linear-gradient(155deg, rgba(11,23,40,0.99), rgba(3,9,18,0.995));
    box-shadow: 0 30px 90px rgba(0,0,0,0.65); padding: 20px;
}
.friend-profile-close {
    position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; padding: 0;
    border: 1px solid var(--lobby-border); border-radius: 9px; background: rgba(255,255,255,0.04);
    color: var(--lobby-text-soft); font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.friend-profile-head { display: flex; align-items: center; gap: 13px; margin: 4px 30px 14px 0; }
.friend-profile-avatar {
    width: 52px; height: 52px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; overflow: hidden; font-family: var(--lobby-mono); font-weight: 800; font-size: 18px; color: #fff;
    background: linear-gradient(150deg, #3a7bff, #1a3d8f); border: 1px solid rgba(255,255,255,0.14);
}
.friend-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.friend-profile-head h3 { margin: 0 0 4px; font-size: 1.05rem; color: var(--lobby-text); }
.friend-profile-flag { font-size: 0.95em; margin-left: 4px; }
.friend-profile-activity { font-size: 11.5px; font-weight: 700; color: var(--lobby-success); }
.friend-profile-activity.is-offline { color: var(--lobby-text-faint); font-weight: 500; }
.friend-profile-banner { display: flex; justify-content: center; margin: 6px 0 16px; }
.friend-profile-message { margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--lobby-border); border-radius: 10px; background: rgba(255,255,255,0.02); color: var(--lobby-text-soft); font-size: 12.5px; line-height: 1.5; }
.friend-profile-actions { display: flex; justify-content: flex-end; }
.friend-profile-actions button {
    min-height: 36px; padding: 0 16px; font-weight: 800; font-size: 12px; color: #fff;
    background: linear-gradient(150deg, #3a7bff, #1a3d8f); border: 1px solid rgba(255,255,255,0.14); border-radius: 9px; cursor: pointer;
}
html.friend-profile-open { overflow: hidden; }

.discord-prompt-modal { position: fixed; inset: 0; z-index: 10055; display: grid; place-items: center; padding: clamp(8px, 2vw, 24px); }
.discord-prompt-backdrop { position: absolute; inset: 0; background: rgba(1,5,12,0.82); backdrop-filter: blur(6px); }
.discord-prompt-card {
    position: relative; width: min(400px, 100%); text-align: center;
    border: 1px solid var(--lobby-border-strong); border-radius: 18px;
    background: linear-gradient(155deg, rgba(11,23,40,0.99), rgba(3,9,18,0.995));
    box-shadow: 0 30px 90px rgba(0,0,0,0.65); padding: 26px 22px 20px;
}
.discord-prompt-icon { font-size: 40px; margin-bottom: 8px; }
.discord-prompt-card h3 { margin: 0 0 8px; font-size: 1.15rem; color: var(--lobby-text); }
.discord-prompt-card p { margin: 0 0 18px; font-size: 13px; line-height: 1.55; color: var(--lobby-text-soft); }
.discord-prompt-actions { display: flex; flex-direction: column; gap: 10px; }
.discord-prompt-join {
    min-height: 42px; padding: 0 16px; font-weight: 800; font-size: 13px; color: #fff;
    background: linear-gradient(150deg, #5865F2, #3a45c9); border: 1px solid rgba(255,255,255,0.14); border-radius: 10px; cursor: pointer;
    text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.discord-prompt-later {
    min-height: 36px; padding: 0 16px; font-weight: 600; font-size: 12px; color: var(--lobby-text-soft);
    background: transparent; border: 1px solid var(--lobby-border); border-radius: 9px; cursor: pointer;
}

/* ================= AMBIANCE : reflets, glow, micro-animations ================= */
body.console-page .brand-mark {
    filter: drop-shadow(0 0 8px rgba(69, 119, 255, 0.6));
}

/* Reflet qui balaie les boutons de nav au survol (meme recette que le reste du jeu) */
body.rail-page .console-nav-rail button,
body.rail-page .console-modes-rail button {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
body.rail-page .console-nav-rail button::before,
body.rail-page .console-modes-rail button::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(110deg, transparent 20%, rgba(125, 195, 255, 0.22) 50%, transparent 80%);
    transform: translateX(-130%);
    transition: transform 0.55s ease;
    pointer-events: none;
}
body.rail-page .console-nav-rail button:hover::before,
body.rail-page .console-modes-rail button:hover::before {
    transform: translateX(130%);
}

/* Ligne de lumiere en haut de chaque panneau, façon verre HUD */
body.lobby-page .console-panel::before {
    content: '';
    position: absolute; top: 0; left: 16px; right: 16px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(150, 195, 255, 0.55), transparent);
    display: block;
}

/* Lueur au survol des cartes interactives */
body.console-page .world-card:hover,
body.console-page .news-card:hover,
.prestige-modal .prestige-card:hover,
body.console-page .spectate-row:hover,
body.console-page .admin-user-card:hover {
    box-shadow: 0 0 22px rgba(69, 119, 255, 0.16);
}
.spectate-row { transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease; }
.prestige-modal .prestige-card { transition: border-color 0.15s ease, box-shadow 0.15s ease; }

/* Le meme reflet, applique aux boutons principaux du centre (pas que la colonne) */
body.console-page .quick-actions button,
body.console-page .world-action-row button,
body.console-page .active-village-actions button,
body.console-page .bento-prestige-summary,
body.console-page .speed-hub-actions button:not(.secondary-button) {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
body.console-page .quick-actions button::before,
body.console-page .world-action-row button::before,
body.console-page .active-village-actions button::before,
body.console-page .bento-prestige-summary::before,
body.console-page .speed-hub-actions button:not(.secondary-button)::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(110deg, transparent 20%, rgba(125, 195, 255, 0.24) 50%, transparent 80%);
    transform: translateX(-130%);
    transition: transform 0.55s ease;
    pointer-events: none;
}
body.console-page .quick-actions button:hover::before,
body.console-page .world-action-row button:hover::before,
body.console-page .active-village-actions button:hover::before,
body.console-page .bento-prestige-summary:hover::before,
body.console-page .speed-hub-actions button:not(.secondary-button):hover::before {
    transform: translateX(130%);
}

/* Lueur ambiante derriere le panneau central de commandement */
body.console-page .bento-command {
    background-image:
        radial-gradient(circle at 85% 0%, rgba(69, 119, 255, 0.16), transparent 55%),
        linear-gradient(180deg, rgba(9, 17, 32, 0.94), rgba(4, 9, 18, 0.97)) !important;
}

@media (prefers-reduced-motion: reduce) {
    body.console-page .quick-actions button::before,
    body.console-page .world-action-row button::before,
    body.console-page .active-village-actions button::before,
    body.console-page .bento-prestige-summary::before,
    body.console-page .speed-hub-actions button:not(.secondary-button)::before {
        transition: none;
        display: none;
    }
}

/* Halo doux sur l'onglet de mode actif */
body.console-page .console-modes-rail button.is-active {
    box-shadow: 0 0 20px rgba(69, 119, 255, 0.22);
}

@media (prefers-reduced-motion: reduce) {
    body.rail-page .console-nav-rail button::before,
    body.rail-page .console-modes-rail button::before {
        transition: none;
        display: none;
    }
}

/* Responsive - la colonne devient une barre du haut sur petits ecrans */
@media (max-width: 1180px) {
    body.console-page .console-bento:not(.console-bento-parties):not(.console-bento-worlds-view) {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "command command" "power power"
            "spectate rank"
            "news news" "admin admin";
    }
}
@media (max-width: 900px) {
    body.rail-page .console-layout { flex-direction: column; }
    body.rail-page .console-rail {
        position: sticky; top: 0; height: auto; width: 100%; flex: none;
        flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px;
        border-right: 0; border-bottom: 1px solid var(--lobby-border); overflow-x: auto;
    }
    body.rail-page .console-modes-rail { display: flex; flex: none; gap: 6px; }
    body.rail-page .console-modes-rail button { flex-direction: row; align-items: center; padding: 8px 10px; white-space: nowrap; }
    body.rail-page .console-nav-rail { display: flex; flex: none; gap: 4px; }
    body.rail-page .console-nav-rail .console-nav-label { display: none; }
    body.rail-page .console-rail-logout { margin-top: 0; padding: 0 10px; }
    body.rail-page .console-rail-logout .console-nav-label { display: none; }
    body.rail-page .console-status,
    body.rail-page .console-shell { margin-left: 10px; margin-right: 10px; }
}
@media (max-width: 780px) {
    body.console-page .console-status { grid-template-columns: 1fr 1fr; }
    body.console-page .console-bento,
    body.console-page .console-bento-parties { grid-template-columns: 1fr; grid-template-areas: unset; }
    body.console-page .console-bento > *,
    body.console-page .console-bento-parties > * { grid-area: auto !important; }
    .prestige-modal { padding: 12px; }
}

/* V20260818 — séparation Compte / Personnalisation dans le lobby. */
.account-settings-view { display: grid; gap: 14px; }
.account-settings-intro { border-color: rgba(94, 199, 255, 0.22); }
.personalisation-view #prestiges .prestige-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: min(620px, 66vh);
    overflow: auto;
}
@media (max-width: 1180px) {
    .personalisation-view #prestiges .prestige-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .personalisation-view #prestiges .prestige-grid { grid-template-columns: 1fr; max-height: none; }
}

/* Récompenses de connexion mensuelles */
.daily-rewards-panel{padding:24px}
.daily-rewards-head{align-items:flex-end;gap:18px}
.daily-reward-world-picker{display:grid;gap:6px;min-width:220px;color:#9aa8bd;font-size:.76rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.daily-reward-world-picker select{min-height:42px;border:1px solid rgba(148,163,184,.2);border-radius:11px;background:rgba(6,12,24,.72);color:#eef4ff;padding:8px 12px;font:inherit;text-transform:none;letter-spacing:0}
.daily-reward-month-summary{display:grid;grid-template-columns:2fr repeat(3,minmax(110px,.7fr));gap:10px;margin:18px 0}
.daily-reward-month-summary>div{padding:13px 15px;border:1px solid rgba(125,153,192,.16);border-radius:13px;background:rgba(7,14,29,.54)}
.daily-reward-month-summary span{display:block;color:#8090a8;font-size:.7rem;text-transform:uppercase;letter-spacing:.09em;font-weight:800}
.daily-reward-month-summary strong{display:block;margin-top:4px;color:#f5f8ff;font-size:.94rem}
.daily-reward-today-card{position:relative;display:grid;grid-template-columns:110px 1fr auto;align-items:center;gap:20px;padding:20px;margin:0 0 20px;border:1px solid rgba(96,165,250,.32);border-radius:20px;background:linear-gradient(135deg,rgba(22,38,67,.86),rgba(8,15,29,.94));box-shadow:0 18px 45px rgba(0,0,0,.22),inset 0 1px rgba(255,255,255,.03);overflow:hidden}
.daily-reward-today-card::after{content:"";position:absolute;inset:auto -80px -120px auto;width:260px;height:260px;border-radius:50%;background:radial-gradient(circle,rgba(96,165,250,.2),transparent 68%);pointer-events:none}
.daily-reward-today-card.claimed{border-color:rgba(74,222,128,.28)}
.daily-reward-today-card.missed{border-color:rgba(248,113,113,.26)}
.daily-reward-today-art{width:110px;height:110px;display:grid;place-items:center;border-radius:18px;border:1px solid rgba(148,163,184,.17);background:rgba(2,6,23,.52)}
.daily-reward-today-art img{width:88px;height:88px;object-fit:contain}
.daily-reward-today-copy{min-width:0}
.daily-reward-today-copy>span{display:block;color:#69a8ff;font-size:.72rem;font-weight:900;text-transform:uppercase;letter-spacing:.11em}
.daily-reward-today-copy h3{margin:5px 0 6px;color:#fff;font-size:1.35rem}
.daily-reward-today-copy p{margin:0 0 10px;color:#aab7ca;line-height:1.5}
.daily-reward-claim-button{position:relative;z-index:1;min-width:190px;border:1px solid rgba(96,165,250,.52);border-radius:12px;padding:13px 17px;background:linear-gradient(135deg,rgba(37,99,235,.9),rgba(59,130,246,.72));color:#fff;font-weight:900;cursor:pointer;box-shadow:0 10px 28px rgba(37,99,235,.24)}
.daily-reward-claim-button:disabled{opacity:.55;cursor:wait}
.daily-reward-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}
.daily-reward-day-card{position:relative;min-height:174px;display:flex;flex-direction:column;align-items:center;gap:7px;padding:11px 8px;border:1px solid rgba(148,163,184,.14);border-radius:14px;background:rgba(7,14,28,.58);text-align:center;overflow:hidden}
.daily-reward-day-card.is-today{border-color:rgba(96,165,250,.58);box-shadow:0 0 0 1px rgba(96,165,250,.12),0 12px 28px rgba(0,0,0,.2)}
.daily-reward-day-card.claimed{background:linear-gradient(160deg,rgba(22,62,47,.34),rgba(7,14,28,.66));border-color:rgba(74,222,128,.25)}
.daily-reward-day-card.missed{filter:saturate(.55);opacity:.68;border-color:rgba(248,113,113,.18)}
.daily-reward-day-card.future{opacity:.88}
.daily-reward-day-top{width:100%;display:flex;justify-content:space-between;gap:5px;color:#95a6bf;font-size:.69rem;font-weight:800}
.daily-reward-day-card img{width:64px;height:64px;object-fit:contain;margin-top:2px}
.daily-reward-day-card>strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:32px;color:#eef3fb;font-size:.78rem;line-height:1.25}
.daily-reward-state{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:4px 8px;font-size:.66rem;font-weight:900;text-transform:uppercase;letter-spacing:.05em;background:rgba(148,163,184,.12);color:#aebacf}
.daily-reward-state.claimed{background:rgba(74,222,128,.12);color:#86efac}
.daily-reward-state.available{background:rgba(59,130,246,.18);color:#93c5fd}
.daily-reward-state.missed{background:rgba(248,113,113,.12);color:#fca5a5}
.daily-reward-state.future{color:#94a3b8}
@media(max-width:1180px){.daily-reward-month-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.daily-reward-today-card{grid-template-columns:96px 1fr}.daily-reward-today-art{width:96px;height:96px}.daily-reward-claim-button{grid-column:1/-1;width:100%}}
@media(max-width:760px){.daily-rewards-panel{padding:16px}.daily-rewards-head{align-items:stretch;flex-direction:column}.daily-reward-world-picker{min-width:0;width:100%}.daily-reward-world-picker select{min-height:46px}.daily-reward-month-summary{grid-template-columns:1fr 1fr}.daily-reward-month-summary>div:first-child{grid-column:1/-1}.daily-reward-today-card{grid-template-columns:72px 1fr;gap:13px;padding:14px}.daily-reward-today-art{width:72px;height:72px}.daily-reward-today-art img{width:58px;height:58px}.daily-reward-claim-button{min-height:46px;touch-action:manipulation}.daily-reward-month-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.daily-reward-day-card{min-height:155px;padding:9px 6px}.daily-reward-day-card img{width:54px;height:54px}}
@media(max-width:430px){.daily-reward-month-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.daily-reward-month-summary{grid-template-columns:1fr}.daily-reward-month-summary>div:first-child{grid-column:auto}.daily-reward-today-card{grid-template-columns:62px 1fr;gap:10px;padding:12px}.daily-reward-today-art{width:62px;height:62px;border-radius:14px}.daily-reward-today-art img{width:50px;height:50px}.daily-reward-today-copy h3{font-size:1.08rem}.daily-reward-today-copy p{font-size:.86rem}.daily-reward-day-card{min-height:146px}.daily-reward-day-card img{width:50px;height:50px}}
@media(max-width:380px){.daily-rewards-panel{padding:12px}.daily-reward-month-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.daily-reward-day-card{min-height:140px;padding:8px 5px;border-radius:12px}.daily-reward-day-top{font-size:.63rem}.daily-reward-day-card img{width:46px;height:46px}.daily-reward-day-card>strong{font-size:.72rem}.daily-reward-state{font-size:.6rem;padding:4px 6px}}
@media(max-width:300px){.daily-reward-month-grid{grid-template-columns:1fr}.daily-reward-day-card{min-height:132px}}

/* Préférences de notifications du tiroir de chat. */
#chat-drawer .chat-drawer-head-actions { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
#chat-drawer .chat-notification-toggle { width: auto; min-width: 32px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; }
#chat-drawer .chat-notification-toggle.is-muted { color: #e7ad63; border-color: rgba(224,159,77,.38); background: rgba(224,159,77,.09); }
@media (max-width: 700px) { #chat-drawer .chat-notification-toggle-label { display: none; } #chat-drawer .chat-notification-toggle { padding: 0; } }

.chat-launcher-badge[hidden] { display: none !important; }
/* Actions de message (2026-09-26, retour utilisateur "vide au-dessus du message") : les boutons
   Répondre/Supprimer, masqués hors survol, occupaient quand même une ligne entière. Ils flottent
   désormais en haut à droite du message, sans prendre de place ; sur écran tactile (pas de survol)
   ils restent visibles dans la ligne du pseudo. */
#chat-drawer .account-chat-message { position: relative; }
#chat-drawer .account-chat-actions { position: absolute; top: 5px; right: 6px; z-index: 1; display: flex; gap: 4px; opacity: 0; pointer-events: none; transition: opacity .12s ease; }
#chat-drawer .account-chat-message:hover .account-chat-actions,
#chat-drawer .account-chat-message:focus-within .account-chat-actions { opacity: 1; pointer-events: auto; }
#chat-drawer .chat-message-action { min-height: 0 !important; padding: 2px 8px !important; border-radius: 6px !important; font-size: 10.5px !important; line-height: 1.5; color: #a9c4ea !important; background: rgba(8, 18, 34, .94) !important; border: 1px solid rgba(110, 169, 255, .22) !important; cursor: pointer; }
#chat-drawer .chat-message-action.danger { color: #ffb5bf !important; }
#chat-drawer .chat-reply-quote { display: grid; gap: 2px; }
#chat-drawer .chat-reply-quote strong, #chat-drawer .chat-reply-quote span { display: block; }
@media (hover: none) {
    #chat-drawer .account-chat-actions { position: static; opacity: 1; pointer-events: auto; margin-left: auto; }
}

/* Premium (2026-09-28) : couronne et pseudo doré */
.account-chat-message.is-premium .account-chat-author strong{color:#f4c95d;text-shadow:0 0 6px rgba(244,201,93,.35)}
.chat-premium-badge{display:inline-flex;align-items:center;margin-left:4px;font-size:13px;line-height:1;filter:drop-shadow(0 0 3px rgba(244,201,93,.5))}

/* Premium (2026-09-28) : contour doré de la fiche profil */
.is-premium-profile{border:2px solid #f4c95d !important;box-shadow:0 0 0 1px rgba(244,201,93,.35),0 0 26px rgba(244,201,93,.32) !important}
.is-premium-profile .profile-modal-avatar,.is-premium-profile .friend-profile-avatar,.is-premium-profile .pixi-profile-avatar{box-shadow:0 0 0 2px #f4c95d,0 0 12px rgba(244,201,93,.45)}
.premium-crown{filter:drop-shadow(0 0 3px rgba(244,201,93,.5))}

/* 2026-10-18 (propriétaire : « dans le lobby, selon la taille de l'écran, ça écrase le dessous quand on baisse ») :
   la règle « .console-modes » collante (plus haut) touchait aussi les onglets de la colonne. Dans la colonne qui
   défile, ils restaient figés en haut et les liens Wiki, Chroniques… glissaient dessous. Ici, tout défile ensemble,
   et aucun bloc ne rétrécit quand la fenêtre est basse. */
body.rail-page .console-rail .console-modes-rail { position: static; top: auto; z-index: auto; }
body.rail-page .console-rail > * { flex-shrink: 0; }
