/* =====================================================================
   Whiskisen — composants de la plateforme (chargé après style.css)
   ---------------------------------------------------------------------
   Tout ce qui est commun aux pages de la refonte : sous-menus, infobulles,
   formulaires de réglages, hubs (1v1, communauté, profil), notifications.
   Mêmes jetons que style.css (--bg-card, --accent...) : un seul langage visuel.
   ===================================================================== */

/* ---------- Utilitaires ---------- */
.text-green { color: var(--green) !important; }
.text-red { color: var(--red) !important; }
.text-accent { color: var(--accent) !important; }
.small { font-size: .84rem; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Infobulles : data-tooltip="..." sur n'importe quel élément ---------- */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after {
    content: attr(data-tooltip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
    width: max-content; max-width: 280px; white-space: normal; text-align: left;
    background: #0b0d15; color: var(--text); border: 1px solid var(--border-light); border-radius: var(--radius-xs);
    padding: 8px 10px; font-size: .8rem; font-weight: 400; line-height: 1.4; letter-spacing: 0; text-transform: none;
    box-shadow: var(--shadow-md); z-index: 50; pointer-events: none;
}
.tip { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%;
    border: 1px solid var(--border-light); color: var(--text-dim); font-size: .7rem; font-weight: 700; cursor: help; margin-left: 4px; }

/* ---------- Sous-menus de section (CS2, Pokémon, RPG...) ---------- */
/* Une seule ligne, toujours : les onglets s'étirent pour remplir la largeur
   quand il y a la place ; sinon la ligne défile (souris/doigt) SANS barre
   visible. Pas de retour à la ligne (un bouton seul sur la 2e ligne = moche). */
.subnav { display: flex; flex-wrap: nowrap; gap: 2px; padding: 0; margin: 0 0 24px; overflow-x: auto;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--border); }
.subnav::-webkit-scrollbar { display: none; }
/* Onglets soulignés, comme la barre du haut : pas de boutons pleins empilés. */
.subnav a { flex: 0 0 auto; text-align: center; padding: 9px 12px 10px; color: var(--text-dim); text-decoration: none;
    font-size: .88rem; font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color var(--t-fast), border-color var(--t-fast); }
.subnav a:hover { color: var(--text); }
.subnav a.is-active { color: var(--text); border-bottom-color: var(--accent); }
.subnav .subnav-home { font-family: var(--font-display); font-weight: 600; color: var(--text); padding-right: 16px; margin-right: 6px;
    border-right: 1px solid var(--border); }

/* ---------- 1v1 : accueil ---------- */
.duel-hero { display: grid; grid-template-columns: 1fr minmax(240px, 320px); gap: 22px; align-items: stretch;
    background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 18px; }
.duel-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 10px 0 6px; font-weight: 700; letter-spacing: -1px; }
.duel-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.duel-play { box-shadow: var(--glow-accent); }
.duel-hint { font-size: .82rem; margin-top: 10px; }
.duel-elo-card { background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: var(--accent); }
.duel-elo-value { font-size: 3.4rem; font-weight: 700; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.duel-elo-label { color: var(--text-dim); font-size: .85rem; margin-top: 6px; }
.duel-curve { width: 100%; height: 50px; margin-top: 12px; }
.duel-stats { margin-bottom: 18px; }
.duel-columns { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-bottom: 18px; }
.match-list, .opp-list { list-style: none; margin: 0; padding: 0; }
.match-row { display: grid; grid-template-columns: 34px 1fr auto 52px 70px; gap: 10px; align-items: center;
    padding: 9px 4px; border-bottom: 1px solid var(--border); font-size: .92rem; }
.match-result { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.match-row.is-win .match-result { background: rgba(51,209,126,.16); color: var(--green); }
.match-row.is-loss .match-result { background: rgba(240,74,90,.16); color: var(--red); }
.match-opp { color: var(--text); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-opp:hover { color: var(--accent); }
.match-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.match-delta { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.match-meta { font-size: .75rem; text-align: right; }
.opp-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); }
.opp-list a { color: var(--text); text-decoration: none; }
.rank-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rank-table th { color: var(--text-dim); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .6px; text-align: left; padding: 6px 8px; }
.rank-table td { padding: 8px; border-top: 1px solid var(--border); }
.rank-table a { color: var(--text); text-decoration: none; }
.rank-table a:hover { color: var(--accent); }
.rank-table tr.is-me td { color: var(--accent); font-weight: 700; }
.loadout-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.loadout-slot { background: var(--bg-inset); border: 1px solid var(--border); border-bottom: 3px solid var(--rarity-color, var(--border));
    border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 4px; font-size: .84rem; min-height: 150px; }
.loadout-slot img { width: 100%; height: 76px; object-fit: contain; }
.loadout-slot-label { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); font-weight: 700; }
.loadout-slot-name { font-weight: 700; }
.loadout-slot-empty { color: var(--text-faint); margin-top: auto; margin-bottom: auto; }
.st-tag { color: var(--orange); font-weight: 700; font-size: .75rem; }

/* ---------- Formulaires de réglages ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.settings-grid .panel h2 { margin: 0 0 14px; font-size: 1.05rem; }
.settings-keys { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-label { font-size: .86rem; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.field-label b { color: var(--text); font-variant-numeric: tabular-nums; }
.field input[type=range] { width: 100%; accent-color: var(--accent); }
.range-row { display: flex; gap: 10px; align-items: center; }
.num-input { width: 86px; background: var(--bg-inset); color: var(--text); border: 1px solid var(--border-light); border-radius: var(--radius-xs); padding: 6px 8px; }
.toggle { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: .9rem; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.seg { display: inline-flex; background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { background: transparent; border: none; color: var(--text-dim); padding: 7px 12px; border-radius: 7px; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.is-active { background: var(--accent); color: #14110a; }
.save-state { font-size: .84rem; color: var(--text-dim); margin-right: 8px; }
.save-state.is-ok { color: var(--green); } .save-state.is-error { color: var(--red); } .save-state.is-pending { color: var(--accent); }
.keys-table { width: 100%; border-collapse: collapse; }
.keys-table td { padding: 6px 8px; border-top: 1px solid var(--border); font-size: .9rem; }
.keys-table td:first-child { width: 40%; }
.keycap { min-width: 92px; padding: 7px 12px; background: var(--bg-inset); border: 1px solid var(--border-light); border-bottom-width: 3px;
    border-radius: 8px; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.keycap:hover { border-color: var(--accent); }
.keycap.is-capturing { border-color: var(--accent); color: var(--accent); animation: pulse-border 1s infinite; }
.key-conflict { color: var(--orange); font-size: .8rem; }
@keyframes pulse-border { 50% { box-shadow: 0 0 0 3px rgba(255, 194, 51,.25); } }
.crosshair-editor { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: start; }
.crosshair-preview { position: relative; width: 140px; height: 140px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: linear-gradient(135deg, #5d6f80, #2c3540 60%, #8b8378); overflow: hidden; }
.crosshair-preview i { position: absolute; display: block; box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
.aspect-preview { height: 90px; background: #000; border-radius: var(--radius-xs); display: grid; place-items: center; margin-top: 10px; border: 1px solid var(--border); overflow: hidden; }
.aspect-frame { height: 100%; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #3b4b5c, #1b2430); display: grid; place-items: center; font-size: .72rem; color: #cfd6ea; transition: all var(--t-med); }
.aspect-frame.aspect-4-3 { aspect-ratio: 4 / 3; }
.aspect-frame.aspect-4-3s { aspect-ratio: 16 / 9; transform: scaleX(1); background: repeating-linear-gradient(90deg, #3b4b5c 0 18px, #33414f 18px 36px); }

@media (max-width: 860px) {
    .duel-hero, .duel-columns { grid-template-columns: 1fr; }
    .match-row { grid-template-columns: 30px 1fr auto 46px; }
    .match-meta { display: none; }
    .crosshair-editor { grid-template-columns: 1fr; }
}

/* ---------- Upgrader : qualité visée et devis ---------- */
.upgrade-quality { margin-top: 12px; text-align: left; }
.quality-seg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 6px 0; }
.quality-seg button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; border-radius: 8px;
    background: var(--bg-inset); border: 1px solid var(--border); color: var(--text); font: inherit; cursor: pointer; }
.quality-seg button small { color: var(--text-dim); font-size: .72rem; }
.quality-seg button.is-active { border-color: var(--accent); background: rgba(255, 194, 51,.12); }
.quality-seg button:disabled { opacity: .35; cursor: not-allowed; }
.quote-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0; font-size: .88rem;
    background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.quote-list dt { color: var(--text-dim); }
.quote-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Barre latérale : icônes, ou icônes + noms une fois dépliée ---------- */
body.has-sidebar { padding-left: var(--side-w); transition: padding-left var(--t-med); }
body.has-sidebar.side-open { padding-left: var(--side-w-open); }
.sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 70; width: var(--side-w); display: flex; flex-direction: column; gap: 4px;
    padding: 10px 10px 16px; background: var(--bg-side); border-right: 1px solid var(--border); overflow-x: hidden; overflow-y: auto;
    scrollbar-width: none; transition: width var(--t-med), transform var(--t-med); }
.sidebar::-webkit-scrollbar { display: none; }
body.side-open .sidebar { width: var(--side-w-open); }
.side-links { display: flex; flex-direction: column; gap: 2px; }
.side-link, .side-toggle { display: flex; align-items: center; gap: 13px; height: 42px; padding: 0 13px; border-radius: var(--radius-md);
    color: var(--text-dim); text-decoration: none; font: inherit; font-size: .9rem; font-weight: 500; white-space: nowrap;
    background: none; border: 0; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.side-link i, .side-toggle i { font-size: 1.3rem; width: 22px; flex: none; text-align: center; }
.side-link span, .side-toggle span { opacity: 0; transition: opacity var(--t-fast); }
body.side-open .side-link span, body.side-open .side-toggle span { opacity: 1; }
.side-link:hover, .side-toggle:hover { background: var(--bg-card); color: var(--text); }
.side-link.is-active { background: var(--bg-card); color: var(--text); font-weight: 600; }
.side-link.is-active i { color: var(--accent); }
.side-toggle { margin-bottom: 6px; color: var(--text-faint); }
.side-sep { border: 0; border-top: 1px solid var(--border); margin: 7px 8px; }
.side-backdrop { position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .6); }

/* ---------- Barre du haut : menu (mobile), Daily, soldes, notifications, compte ---------- */
.nav-burger { display: none; place-items: center; background: var(--bg-card); border: 0; color: var(--text); border-radius: var(--radius-sm);
    width: 40px; height: 38px; font-size: 1.3rem; cursor: pointer; flex: none; }
.nav-daily { position: relative; display: inline-flex; align-items: center; padding: 7px 14px; border-radius: var(--radius-sm); text-decoration: none;
    color: var(--text-dim); border: 1px solid var(--border-light); font-weight: 700; font-size: .84rem; }
.nav-daily:hover { color: var(--text); border-color: var(--border-glow); }
.nav-daily.is-ready { color: #2a1c00; background: var(--accent); border-color: var(--accent-deep); }
.nav-bell-wrap, .nav-account-wrap { position: relative; }
.nav-bell { position: relative; display: grid; place-items: center; background: var(--bg-card); border: 0;
    border-radius: var(--radius-sm); width: 38px; height: 36px; cursor: pointer; color: var(--text-dim); }
.nav-bell:hover { color: var(--text); border-color: var(--border-glow); }
.nav-bell-count { position: absolute; top: -6px; right: -7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--radius-xs);
    background: var(--red); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; }
button.nav-profile { background: transparent; border: none; cursor: pointer; font: inherit; }
.nav-id { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; line-height: 1.1; }
.nav-level { display: flex; align-items: center; gap: 6px; font-size: .7rem; color: var(--accent); }
.nav-level i { display: block; width: 54px; height: 4px; border-radius: 2px; background: var(--bg-inset); overflow: hidden; position: relative; }
.nav-level i::after { content: ''; position: absolute; inset: 0; width: var(--p, 0%); background: var(--accent); }
.nav-dropdown { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; z-index: 80;
    background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    padding: 6px; }
.nav-account a { display: block; padding: 9px 12px; border-radius: var(--radius-xs); color: var(--text); text-decoration: none; font-size: .9rem; }
.nav-account a:hover { background: var(--bg-card-hover); }
.nav-account .nav-logout { color: var(--red); border-top: 1px solid var(--border); margin-top: 4px; }
.nav-notifs { width: min(380px, 92vw); padding: 0; }
.nav-dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.nav-notifs-list { max-height: 60vh; overflow-y: auto; }
.nav-dropdown-foot { display: block; padding: 10px 14px; text-align: center; font-size: .84rem; color: var(--accent); text-decoration: none; border-top: 1px solid var(--border); }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; font-size: .8rem; }
.notif { display: flex; gap: 10px; padding: 10px 14px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.notif:hover { background: var(--bg-card-hover); }
.notif.is-unread { background: rgba(255, 194, 51,.06); }
.notif.is-unread .notif-text b::before { content: '● '; color: var(--accent); }
.notif-icon { font-size: 1.3rem; flex: none; }
.notif-text { display: flex; flex-direction: column; gap: 2px; font-size: .86rem; min-width: 0; }
.notif-text small { color: var(--text-dim); }
.notif-text em { color: var(--text-faint); font-style: normal; font-size: .74rem; }
.empty-mini { padding: 18px; text-align: center; color: var(--text-dim); font-size: .88rem; }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; flex-direction: column; gap: 2px; min-width: 240px; max-width: 340px; padding: 12px 16px;
    background: var(--bg-elevated); border: 1px solid var(--border-light); border-left: 4px solid var(--accent); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md); color: var(--text); text-decoration: none; transform: translateX(120%); transition: transform .35s var(--ease-out); }
.toast.is-in { transform: translateX(0); }
.toast span { color: var(--text-dim); font-size: .86rem; }

.navbar > .brand, .nav-user { flex: none; }
.nav-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }   /* un long pseudo ne mange pas la barre */
/* Les soldes : une case sombre comme un portefeuille. */
.nav-user .balance { background: var(--bg-inset); border: 1px solid var(--border); padding: 6px 11px; font-weight: 600; }

@media (max-width: 1100px) {
    .balance-rpg { display: none; }
}
@media (max-width: 760px) {
    body.has-sidebar, body.has-sidebar.side-open { padding-left: 0; }
    .sidebar { width: 250px; transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    body.side-open .sidebar { width: 250px; transform: none; }
    .sidebar .side-link span { opacity: 1; }
    .side-toggle { display: none; }
    .nav-burger { display: grid; order: -1; }
}
@media (max-width: 640px) {
    .navbar { padding: 8px 12px; gap: 8px; }
    .brand-text, .nav-name, .nav-level b { display: none; }
    .nav-level i { width: 30px; }
    .nav-user { gap: 6px; }
    .nav-user .balance { padding: 5px 8px; font-size: .82rem; }
}

/* ---------- Daily ---------- */
.daily-wrap { display: flex; flex-direction: column; gap: 18px; }
.daily-hero { display: grid; grid-template-columns: 180px 1fr; gap: 26px; align-items: center; padding: 30px;
    border-radius: var(--radius-md); border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--bg-card); }
.daily-hero.is-done { border-left-color: var(--green); }
.daily-hero h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; }
.daily-chest { font-size: 76px; text-align: center; }
.daily-chest.is-opening { animation: chest-shake .12s linear infinite; }
.daily-chest.is-open { transform: scale(1.25); animation: none; }
@keyframes chest-bob { 50% { transform: translateY(-8px) rotate(-3deg); } }
@keyframes chest-shake { 0% { transform: rotate(-6deg) scale(1.05); } 50% { transform: rotate(6deg) scale(1.1); } 100% { transform: rotate(-6deg) scale(1.05); } }
.daily-streak { font-size: 1.05rem; margin: 0 0 12px; }
.daily-amount { font-size: 3rem; font-weight: 700; color: var(--accent-bright); font-variant-numeric: tabular-nums; }
.daily-won { font-size: 3rem; font-weight: 700; color: var(--green-bright); animation: pop-in .5s var(--ease-spring); }
@keyframes pop-in { from { transform: scale(.4); opacity: 0; } }
.daily-sub { color: var(--text-dim); margin: 2px 0 16px; }
.daily-claim { box-shadow: var(--glow-accent); }
.daily-timer { font-size: 2.4rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 2px; margin-top: 6px; }
.daily-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.daily-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: var(--radius-sm);
    background: var(--bg-inset); border: 1px solid var(--border); font-size: .85rem; text-align: center; }
.daily-day.is-today { border-color: var(--accent); background: rgba(255, 194, 51,.08); }
.daily-day.is-chest { border-color: var(--violet); }
.daily-day-n { color: var(--text-dim); font-size: .74rem; }
.daily-day-icon { font-size: 1.6rem; }
.daily-day small { color: var(--text-dim); font-size: .7rem; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; padding: 8px 2px; border-bottom: 1px solid var(--border); font-size: .9rem; }

/* ---------- Communauté ---------- */
.community-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; margin-bottom: 18px; }
.community-grid > * { min-width: 0; }
.community-side { display: flex; flex-direction: column; gap: 18px; }
.community-section { margin-bottom: 22px; }
.feed { list-style: none; padding: 0; margin: 0; }
.feed-item { display: flex; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--border); }
.feed-avatar img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--border-light); }
.feed-body { flex: 1; min-width: 0; font-size: .92rem; }
.feed-body a { color: var(--text); text-decoration: none; }
.feed-body a:hover b { color: var(--accent); }
.feed-icon { font-size: 1.05rem; }
.feed-time { color: var(--text-faint); font-size: .76rem; margin-top: 2px; }
/* Communauté : fil compact (une ligne par évènement) dans une boîte défilante. */
.community-feed { align-self: start; }
.community-feed .feed { max-height: 300px; overflow-y: auto; padding-right: 4px; }
.community-feed .feed-item { gap: 8px; padding: 5px 2px; align-items: center; }
.community-feed .feed-avatar img { width: 24px; height: 24px; border-width: 1px; }
.community-feed .feed-body { display: flex; align-items: baseline; gap: 8px; font-size: .84rem; }
.community-feed .feed-body > div:first-child { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.community-feed .feed-body .text-dim { display: none; }
.community-feed .feed-time { margin: 0; flex: none; font-size: .72rem; }
.community-feed .section-head { margin-bottom: 6px; }
.record-list { list-style: none; padding: 0; margin: 0; }
.record-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.record-icon { font-size: 1.4rem; }
.record-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.record-text small { color: var(--text-dim); font-size: .74rem; }
.record-text em { color: var(--text-faint); font-style: normal; font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-who img { width: 30px; height: 30px; border-radius: 50%; }
.mini-rank { list-style: none; padding: 0; margin: 0; counter-reset: r; }
.mini-rank li { counter-increment: r; display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); }
.mini-rank li::before { content: counter(r); width: 22px; color: var(--text-faint); font-weight: 700; font-size: .8rem; }
.mini-rank a { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; min-width: 0; overflow: hidden; }
.mini-rank img { width: 24px; height: 24px; border-radius: 50%; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.player-card { display: flex; gap: 12px; padding: 14px; border-radius: var(--radius-md); background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text); text-decoration: none; transition: transform var(--t-fast), border-color var(--t-fast); }
.player-card:hover { border-color: var(--accent); }
.player-card-avatar { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--border-light); flex: none; }
.player-card-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.player-card-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-card-meta { display: flex; gap: 4px; flex-wrap: wrap; }
.player-card-meta .chip { font-size: .72rem; padding: 2px 7px; }
.player-card-badges { font-size: 1.05rem; letter-spacing: 2px; }
.player-card-last { font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Journal ---------- */
.level-panel { margin-bottom: 18px; }
.level-big { font-size: 1.1rem; margin-bottom: 8px; }
.level-big b { font-size: 2rem; color: var(--accent); }
.xp-bar { height: 12px; border-radius: 6px; background: var(--bg-inset); overflow: hidden; margin-bottom: 6px; border: 1px solid var(--border); }
.xp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent-bright)); transition: width .6s var(--ease-out); }
.caps { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; margin-top: 14px; }
.caps > span { grid-column: 1 / -1; }
.cap { display: flex; flex-direction: column; gap: 3px; font-size: .8rem; }
.cap i { height: 5px; border-radius: 3px; background: var(--bg-inset); overflow: hidden; display: block; }
.cap i b { display: block; height: 100%; background: var(--cyan); }
.journal-table { width: 100%; border-collapse: collapse; }
.journal-table td { padding: 9px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.journal-icon { width: 32px; font-size: 1.2rem; }
.journal-amount { text-align: right; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.journal-time { text-align: right; white-space: nowrap; font-size: .8rem; width: 150px; }
.toggle-row { align-items: flex-start; }
.toggle-row span { display: flex; flex-direction: column; gap: 2px; }

/* ---------- Pages d'erreur ---------- */
.error-page { text-align: center; padding: 70px 20px; max-width: 620px; margin: 0 auto; }
.error-code { font-size: 6rem; font-weight: 700; line-height: 1; background: linear-gradient(135deg, var(--accent-bright), var(--orange));
    -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page h1 { margin: 10px 0; }
.error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 24px 0; }
.text-faint { color: var(--text-faint); }

@media (max-width: 900px) {
    .community-grid { grid-template-columns: minmax(0, 1fr); }
    .daily-hero { grid-template-columns: 1fr; text-align: center; }
    .daily-week { grid-template-columns: repeat(4, 1fr); }
    .journal-time { display: none; }
}

/* ---------- Profil ---------- */
.profile-hero { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 26px;
    border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: 16px;
    background: var(--bg-card); }
.pf-avatar { width: 112px; height: 112px; border-radius: 50%; border: 3px solid var(--accent); box-shadow: var(--glow-accent); }
.profile-id h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; }
.profile-roles { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.role-chip { font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: var(--role-color);
    background: color-mix(in srgb, var(--role-color) 14%, transparent); border: 1px solid color-mix(in srgb, var(--role-color) 45%, transparent); }
.pf-level { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; max-width: 520px; margin-bottom: 6px; }
.pf-level .xp-bar { margin: 0; }
.pf-level .small { grid-column: 1 / -1; }
.pf-level-n b { color: var(--accent); font-size: 1.4rem; }
.profile-kpis { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 8px; }
.kpi { background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; display: flex; flex-direction: column; }
.kpi span { font-size: .72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .6px; }
.kpi b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--text-faint); font-size: .75rem; }
/* Sous l'identité (il était posé en absolu par-dessus les cartes de stats). */
.profile-edit { display: inline-flex; margin-top: 10px; }
.profile-tabs { margin: 18px 0 14px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.privacy-note { text-align: center; margin-top: 20px; }

/* Badges : puces avec rareté et effet (configurés dans l'admin) */
.badge-showcase { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.badge-showcase .badge-break { flex-basis: 100%; height: 0; order: -2; }
.bdg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.badge-chip { --badge-color: #888; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px;
    background: color-mix(in srgb, var(--badge-color) 12%, var(--bg-card)); border: 1px solid color-mix(in srgb, var(--badge-color) 50%, transparent);
    position: relative; overflow: hidden; }
.badge-chip.is-big { border-radius: var(--radius-md); padding: 10px 14px 10px 10px; }
.badge-icon { width: 34px; height: 34px; display: grid; place-items: center; font-size: 1.35rem; border-radius: 50%;
    background: color-mix(in srgb, var(--badge-color) 22%, transparent); flex: none; }
.badge-icon img { width: 26px; height: 26px; object-fit: contain; }
.badge-text { display: flex; flex-direction: column; line-height: 1.15; }
.badge-text b { font-size: .88rem; }
.badge-text small { font-size: .7rem; color: var(--badge-color); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.rarity-commun { --rarity-commun: var(--rarity-common); }
.effect-glow { box-shadow: 0 0 18px color-mix(in srgb, var(--badge-color) 45%, transparent); }
.effect-pulse { animation: badge-pulse 2.2s ease-in-out infinite; }
@keyframes badge-pulse { 50% { box-shadow: 0 0 22px color-mix(in srgb, var(--badge-color) 60%, transparent); } }
/* Reflet qui traverse le badge : un calque déplacé (transform), pas un fond animé
   (background-position se repeint à chaque image). .badge-chip coupe ce qui déborde. */
.effect-shine::after, .effect-holo::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 45%, transparent 60%);
    transform: translateX(-100%); animation: badge-shine 3.2s linear infinite; }
.effect-holo::after { background: linear-gradient(110deg, rgba(255,0,150,.18), rgba(0,200,255,.18), rgba(255,230,0,.18), rgba(0,255,140,.18));
    mix-blend-mode: screen; }
@keyframes badge-shine { to { transform: translateX(100%); } }
.effect-rainbow { border-color: transparent; background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(90deg, #ff4d6d, #ffb020, #33d17e, #38bdf8, #a855f7, #ff4d6d) border-box; background-size: 100% 100%, 300% 100%;
    animation: rainbow-border 4s linear infinite; }
@keyframes rainbow-border { to { background-position: 0 0, 300% 0; } }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.goal { display: flex; gap: 10px; padding: 12px; border-radius: var(--radius-sm); background: var(--bg-inset); border: 1px dashed var(--border-light); opacity: .9; }
.goal-icon { font-size: 1.6rem; filter: grayscale(.6); }
.goal .xp-bar { height: 6px; margin: 6px 0 2px; }

/* Inventaire CS2 */
.inv-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.inv-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--radius-sm);
    background: linear-gradient(180deg, color-mix(in srgb, var(--rarity-color) 10%, var(--bg-card)), var(--bg-card));
    border: 1px solid var(--border); border-bottom: 3px solid var(--rarity-color); font-size: .8rem; }
.inv-card img { width: 100%; height: 96px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.inv-name { font-weight: 700; font-size: .86rem; line-height: 1.2; min-height: 2.4em; }
.inv-meta { display: flex; justify-content: space-between; gap: 6px; color: var(--text-dim); }
.inv-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; }
.inv-foot small { color: var(--text-faint); }
.inv-fav { position: absolute; top: 6px; right: 8px; background: none; border: none; color: var(--text-faint); font-size: 1.1rem; cursor: pointer; }
.inv-fav.is-on { color: var(--accent); }
.inv-more { text-align: center; margin: 16px 0; }
.inv-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.inv-mini-item { display: flex; flex-direction: column; gap: 3px; padding: 8px; border-radius: var(--radius-sm); background: var(--bg-inset);
    border-bottom: 3px solid var(--rarity-color); font-size: .76rem; }
.inv-mini-item img { width: 100%; height: 60px; object-fit: contain; }
.series-list { display: flex; flex-direction: column; gap: 10px; }
.series-row { display: grid; grid-template-columns: 180px 1fr auto; gap: 12px; align-items: center; }
.series-row .xp-bar { margin: 0; }
.series-row.is-done b::after { content: ' ✅'; }
.series-row.is-shiny-done { background: linear-gradient(90deg, rgba(168,85,247,.12), transparent); border-radius: var(--radius-sm); padding: 4px 8px; }
.graded-row { display: flex; gap: 10px; flex-wrap: wrap; }
.graded-mini { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: var(--radius-sm);
    background: var(--bg-inset); border: 1px solid var(--border); width: 120px; font-size: .78rem; text-align: center; }
.graded-mini img { width: 80px; height: 80px; object-fit: contain; }

@media (max-width: 900px) {
    .profile-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .pf-level { margin: 0 auto 6px; }
    .profile-grid { grid-template-columns: 1fr; }
    .inv-mini { grid-template-columns: repeat(2, 1fr); }
    .series-row { grid-template-columns: 1fr; }
}

/* ---------- Pokémon : séries, boutique ---------- */
.points-card { display: flex; flex-direction: column; align-items: flex-end; padding: 12px 18px; border-radius: var(--radius-md);
    background: var(--bg-card); border: 1px solid var(--border); min-width: 200px; }
.points-card span { font-size: .72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .6px; }
.points-card b { font-size: 1.8rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.points-card small { color: var(--violet); font-size: .78rem; }
.series-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 18px; }
.series-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.series-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.series-card h2 { margin: 0; font-size: 1.05rem; }
.series-card.is-done { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 22px rgba(255, 194, 51,.12); }
.series-card.is-shiny { border-color: var(--violet); background: linear-gradient(135deg, rgba(168,85,247,.14), rgba(56,189,248,.08)), var(--bg-card); }
.series-line { display: grid; grid-template-columns: 74px 1fr 60px; gap: 8px; align-items: center; font-size: .82rem; }
.series-line .xp-bar { margin: 0; height: 8px; }
.series-line.shiny .xp-bar i { background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.series-line b { text-align: right; font-variant-numeric: tabular-nums; }
.series-rewards { list-style: none; padding: 0; margin: 0; font-size: .8rem; color: var(--text-dim); display: flex; flex-direction: column; gap: 4px; }
.series-rewards .is-got { color: var(--green); }
.series-missing { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.series-missing img { width: 34px; height: 34px; filter: brightness(0) invert(.35); }
.shop-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shop-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: var(--radius-sm);
    background: var(--bg-inset); border: 1px solid var(--border); text-align: center; }
.shop-card img { width: 80px; height: 80px; object-fit: contain; }
.shop-name { font-weight: 700; font-size: .82rem; }
.shop-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.shop-actions .btn { padding: 4px 8px; font-size: .74rem; }

/* ---------- Types (couleurs officielles approchées) ---------- */
.type { display: inline-block; font-style: normal; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
    padding: 1px 6px; border-radius: 4px; color: #fff; margin-right: 2px; text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.type-normal, .type-bg-normal { background: #9fa19f; } .type-fire, .type-bg-fire { background: #e62829; }
.type-water, .type-bg-water { background: #2980ef; } .type-electric, .type-bg-electric { background: #d8b800; }
.type-grass, .type-bg-grass { background: #3fa129; } .type-ice, .type-bg-ice { background: #3dcef3; }
.type-fighting, .type-bg-fighting { background: #ff8000; } .type-poison, .type-bg-poison { background: #9141cb; }
.type-ground, .type-bg-ground { background: #915121; } .type-flying, .type-bg-flying { background: #81b9ef; }
.type-psychic, .type-bg-psychic { background: #ef4179; } .type-bug, .type-bg-bug { background: #91a119; }
.type-rock, .type-bg-rock { background: #afa981; } .type-ghost, .type-bg-ghost { background: #704170; }
.type-dragon, .type-bg-dragon { background: #5060e1; } .type-dark, .type-bg-dark { background: #624d4e; }
.type-steel, .type-bg-steel { background: #60a1b8; } .type-fairy, .type-bg-fairy { background: #ef70ef; }

/* ---------- Combats : sélection d'équipe ---------- */
.battle-hub-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
.battle-side { display: flex; flex-direction: column; gap: 16px; }
.mode-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.team-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.team-slot { min-height: 96px; border-radius: var(--radius-sm); border: 2px dashed var(--border-light); display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 4px; color: var(--text-faint); background: var(--bg-inset); font: inherit; cursor: pointer; }
.team-slot:not(.is-empty) { border-style: solid; border-color: var(--accent); color: var(--text); }
.team-slot img { width: 64px; height: 64px; object-fit: contain; }
.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; max-height: 520px; overflow-y: auto; padding-right: 4px; }
.pool-mon { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: var(--radius-sm); cursor: pointer;
    background: var(--bg-inset); border: 1px solid var(--border); color: var(--text); font: inherit; font-size: .78rem; }
.pool-mon img { width: 64px; height: 64px; object-fit: contain; }
.pool-mon:hover { border-color: var(--accent); }
.pool-mon.is-picked { border-color: var(--green); background: rgba(51,209,126,.1); }

/* ---------- Combats : terrain ---------- */
.battle-room { display: grid; grid-template-columns: 1fr 360px; gap: 16px; }
.battle-field { position: relative; min-height: 460px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border);
    background: radial-gradient(ellipse 40% 12% at 72% 34%, rgba(0,0,0,.35), transparent 70%),
                radial-gradient(ellipse 45% 14% at 28% 86%, rgba(0,0,0,.35), transparent 70%),
                linear-gradient(180deg, #2a4a7a 0%, #4c7cae 42%, #6aa36a 42%, #4d8a4d 100%); }
.battle-field.is-forced { box-shadow: inset 0 0 0 3px var(--orange); }
.bf-side { position: absolute; display: flex; align-items: flex-end; gap: 14px; }
.bf-foe { top: 18px; right: 18px; flex-direction: row; }
.bf-me { bottom: 18px; left: 18px; flex-direction: row-reverse; }
.bf-sprite { width: 190px; height: 190px; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0,0,0,.45)); transition: opacity .4s, transform .4s; }
.bf-me .bf-sprite { transform: scaleX(-1); width: 220px; height: 220px; }
.bf-sprite.is-ko { opacity: .25; transform: translateY(20px); }
.bf-me .bf-sprite.is-ko { transform: scaleX(-1) translateY(20px); }
.bf-card { background: rgba(10,12,18,.88); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm); padding: 10px 12px; min-width: 240px; color: #fff; }
.bf-name { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: .9rem; }
.bf-name b { margin-right: 4px; }
.bf-status { font-size: .64rem; font-weight: 700; padding: 1px 5px; border-radius: 3px; color: #111; }
.bf-hp { height: 8px; border-radius: 4px; background: #222733; margin: 7px 0 4px; overflow: hidden; }
.bf-hp i { display: block; height: 100%; transition: width .6s var(--ease-out), background .6s; }
.bf-hp-text { font-size: .76rem; color: #cfd6ea; font-variant-numeric: tabular-nums; }
.bf-boost { font-size: .66rem; background: rgba(255,255,255,.1); border-radius: 3px; padding: 0 4px; margin-left: 3px; }
.bf-balls { margin-top: 5px; display: flex; gap: 4px; align-items: center; }
.ball { width: 11px; height: 11px; border-radius: 50%; background: linear-gradient(#f04a5a 50%, #eee 50%); border: 1px solid #111; display: inline-block; }
.ball.is-ko { filter: grayscale(1) brightness(.5); }
.ball.is-active { box-shadow: 0 0 0 2px var(--accent); }
.bf-wait { position: absolute; inset: auto 0 45% 0; display: flex; justify-content: center; align-items: center; gap: 10px;
    color: #fff; font-weight: 700; text-shadow: 0 2px 6px #000; }
.spinner-sm { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.battle-panel { display: flex; flex-direction: column; gap: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; }
.bp-head { display: flex; justify-content: space-between; align-items: center; }
.bp-moves { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.move-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm); border: none;
    color: #fff; font: inherit; cursor: pointer; text-align: left; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.move-btn small { opacity: .9; font-size: .72rem; }
.move-btn:disabled { opacity: .4; cursor: not-allowed; }
.move-btn:not(:disabled):hover { filter: brightness(1.12); transform: translateY(-1px); }
.bp-switch #switches { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.switch-btn { position: relative; display: flex; flex-direction: column; align-items: center; width: 92px; padding: 6px 4px 8px; border-radius: var(--radius-sm);
    background: var(--bg-inset); border: 1px solid var(--border); color: var(--text); font: inherit; font-size: .72rem; cursor: pointer; overflow: hidden; }
.switch-btn img { width: 48px; height: 48px; object-fit: contain; }
.switch-btn i { position: absolute; left: 0; bottom: 0; height: 3px; }
.switch-btn:disabled { opacity: .45; cursor: not-allowed; }
.bp-log { flex: 1; min-height: 200px; max-height: 360px; overflow-y: auto; background: var(--bg-inset); border-radius: var(--radius-sm); padding: 10px 12px; font-size: .84rem; }
.bp-log p { margin: 0 0 4px; animation: log-in .3s ease-out both; }
.bp-log .log-turn { color: var(--text-faint); font-weight: 700; margin-top: 8px; }
.bp-log .log-strong { color: var(--accent); font-weight: 700; }
.bp-log .log-ko { color: var(--red); font-weight: 700; }
@keyframes log-in { from { opacity: 0; transform: translateX(-6px); } }
.battle-result { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 90; }
.battle-result-card { background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 30px 40px; text-align: center;
    animation: pop-in .4s var(--ease-spring); }
.battle-result-card h2 { font-size: 2rem; margin: 0 0 8px; }

@media (max-width: 1000px) {
    .battle-hub-grid, .battle-room { grid-template-columns: 1fr; }
    .bf-sprite { width: 120px; height: 120px; }
    .bf-me .bf-sprite { width: 140px; height: 140px; }
    .bf-card { min-width: 180px; }
}


/* ---------- Panneau admin ---------- */
.admin-section { display: flex; flex-direction: column; gap: 16px; margin: 16px 0; }
.admin-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-box h3 { margin: 16px 0 6px; font-size: .95rem; }
.table-scroll { max-height: 420px; overflow: auto; }
.user-results { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.user-result { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-xs); background: var(--bg-inset);
    border: 1px solid var(--border); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.user-result:hover { border-color: var(--accent); }
.user-result img { width: 32px; height: 32px; border-radius: 50%; }
.user-result small { display: block; color: var(--text-dim); font-size: .74rem; }
.ud-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.ud-head img { width: 64px; height: 64px; border-radius: 50%; }
.ud-head h2 { margin: 0; }
.ud-head .btn { margin-left: auto; width: auto; margin-top: 0; }
/* Admin : liste de tous les comptes */
.ud-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ud-actions .btn { margin: 0; width: auto; }
.au-banned { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-xs); background: rgba(239, 68, 68, .12); color: #fca5a5; font-weight: 600; }
.au-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.au-tools { display: flex; gap: 8px; margin-bottom: 10px; }
.au-tools input { flex: 1; min-width: 0; }
.au-tools select { flex: 0 0 170px; width: 170px; }
.au-tools input { flex: 1 1 auto; width: auto; }
.au-user { display: flex; align-items: center; gap: 8px; min-width: 180px; }
.au-user img { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.au-user small { display: block; color: var(--text-dim); font-size: .72rem; }
.au-ban { background: rgba(239, 68, 68, .15); color: #fca5a5; }
.au-table tr.is-banned td { opacity: .75; }
.au-actions { white-space: nowrap; text-align: right; }
.au-actions .btn { width: auto; margin: 0 0 0 4px; }
.btn.au-del { background: #b91c1c; color: #fff; }
.btn.au-del:hover { background: #dc2626; }
.au-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
.au-pager .btn { width: auto; margin: 0; }
.bdg-admin-list { display: flex; flex-direction: column; gap: 6px; }
.bdg-admin { display: grid; grid-template-columns: 40px 1fr auto auto auto; gap: 10px; align-items: center; padding: 8px 10px;
    border-radius: var(--radius-sm); background: var(--bg-inset); border-left: 3px solid var(--c, var(--border)); }
.bdg-admin-icon { font-size: 1.5rem; text-align: center; }
.bdg-admin-icon img { width: 30px; height: 30px; object-fit: contain; }
.bdg-admin small { color: var(--text-dim); }
.bdg-admin .link-btn { white-space: nowrap; }
.badge-preview { margin: 12px 0; min-height: 50px; }
.cfg-pre { background: var(--bg-inset); border-radius: var(--radius-sm); padding: 12px; font-size: .8rem; overflow: auto; max-height: 360px; }
@media (max-width: 900px) {
    .admin-two { grid-template-columns: 1fr; }
    /* Icône + texte sur la première ligne, puis compteur et actions dessous. */
    .bdg-admin { display: flex; flex-wrap: wrap; gap: 6px 12px; }
    .bdg-admin > .bdg-admin-icon { width: 34px; }
    .bdg-admin > div { flex: 1 1 calc(100% - 50px); min-width: 0; }
}

/* ---------- Admin : onglet Serveur ---------- */
.bot-health { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.chip-ok { color: var(--green); border-color: var(--green); }
.chip-bad { color: var(--red); border-color: var(--red); }
.text-bad { color: var(--red); }
.srv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.srv-actions .btn { margin-top: 0; }
.admin-section textarea { width: 100%; resize: vertical; }

/* ---------- Choix d'un joueur (sabotage, échanges) ---------- */
.picker { position: relative; }
.picker-input { width: 100%; }
.picker-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow: auto;
    background: var(--bg-card, #161a22); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 4px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.picker-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; background: none;
    color: inherit; text-align: left; border-radius: 6px; cursor: pointer; font: inherit; }
.picker-list button:hover, .picker-list button:focus-visible { background: var(--bg-inset); }
.picker-list img, .picker-chosen img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.picker-list p { padding: 8px; margin: 0; }
.picker-chosen { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg-inset); border-radius: var(--radius-sm); }
.picker-chosen .link-btn { margin-left: auto; }

/* ---------- Sabotage ---------- */
.sab-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sab-form { display: flex; flex-direction: column; gap: 10px; }
.sab-form label { margin-top: 4px; }
.sab-amounts { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--border-light); background: var(--bg-inset); color: var(--text); border-radius: 999px;
    padding: 5px 12px; font: inherit; font-size: .8rem; cursor: pointer; }
.chip-btn:hover { border-color: var(--accent, #ffc233); }
.sab-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sab-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px;
    background: var(--bg-inset); border-radius: var(--radius-sm); }
.sab-list a { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.sab-list img { width: 30px; height: 30px; border-radius: 50%; }
.sab-list b { color: var(--red); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sab-me b { color: var(--red); }
@media (max-width: 800px) { .sab-layout { grid-template-columns: 1fr; } }

/* ---------- RPG : zones, élites, quêtes, bestiaire ---------- */
.rpg-quests { margin-bottom: 16px; }
.rpg-quest-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.rpg-quest { background: var(--bg-inset); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.rpg-quest-head { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; }
.rpg-quest-head small { color: var(--text-dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rpg-quest-reward { font-size: .78rem; color: var(--text-dim); }
.rpg-quest.is-done { opacity: .7; border-left: 3px solid var(--green); }
.rpg-quest .hp-bar { height: 8px; margin: 0; }
.zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.zone-card { --z: #6b7280; position: relative; overflow: hidden; border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--z) 26%, var(--bg-card)) 0%, var(--bg-card) 70%); border: 1px solid color-mix(in srgb, var(--z) 45%, transparent); }
.zone-card header, .bestiary-zone header { display: flex; align-items: center; gap: 10px; }
.zone-card h3 { margin: 0; font-size: 1rem; }
.zone-card p { margin: 0; flex: 1; }
.zone-emoji { font-size: 1.9rem; line-height: 1; }
.zone-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.zone-actions .btn { margin-top: 0; }
.zone-card.is-locked { filter: grayscale(.85); opacity: .6; }
.zone-egouts { --z: #5b8a53; } .zone-foret { --z: #2f9e5b; } .zone-cendres { --z: #e4572e; }
.zone-ruines { --z: #b59b6b; } .zone-marais { --z: #6b8e7f; } .zone-faille { --z: #8b5cf6; }
.elite-banner { text-align: center; font-weight: 700; letter-spacing: .03em; color: var(--accent); margin-bottom: 8px; }
.combat-arena.is-elite { box-shadow: 0 0 0 2px var(--accent), 0 0 30px rgba(255, 194, 51, .25); }
.bestiary-zone { margin-bottom: 22px; }
.bestiary-zone.is-locked { opacity: .55; }
.bestiary-zone h2 { margin: 0; }
.bestiary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.bestiary-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 12px 10px;
    display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.bestiary-card .hp-bar { width: 100%; height: 6px; margin: 4px 0 0; }
.bestiary-emoji { font-size: 2.1rem; }
.bestiary-name { font-weight: 700; line-height: 1.2; }
.bestiary-card.is-unknown .bestiary-emoji { filter: grayscale(1); opacity: .5; }
.bestiary-kills { font-size: .82rem; }
.bestiary-stars span { color: var(--border-light); font-size: 1rem; }
.bestiary-stars span.on { color: var(--accent); }
.bestiary-card.tier-3 { border-color: var(--accent); box-shadow: inset 0 0 18px rgba(255, 194, 51, .15); }
.bestiary-done { color: var(--green); font-weight: 700; }

/* Champs des nouvelles pages (sabotage, choix d'un joueur) : même habillage que les formulaires de jeu. */
.sab-form input, .picker-input, .admin-section textarea {
    background: var(--bg-inset); border: 1px solid var(--border-light); color: var(--text); padding: 10px 12px;
    border-radius: var(--radius-sm); font-size: .95rem; font-family: inherit; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.sab-form input:focus, .picker-input:focus, .admin-section textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 194, 51, .18);
}

/* ---------- Accueil ---------- */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; padding: 24px 26px;
    margin-bottom: 30px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-md);
    background: var(--bg-card); overflow: hidden; }
.home-hero > * { min-width: 0; }
.home-hero-kicker { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.home-hero h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 6px 0 8px; line-height: 1.1; }
.home-hero p { color: var(--text-dim); margin: 0 0 14px; max-width: 54ch; }
.home-hero-live { display: flex; align-items: center; gap: 8px; font-size: .88rem; margin-bottom: 18px; color: var(--text-dim); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.live-dot.is-idle { background: var(--text-faint); }
.home-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.home-hero-actions .btn { margin-top: 0; }
.home-hero-side { display: flex; flex-direction: column; gap: 14px; padding-left: 24px; border-left: 1px solid var(--border); }
.home-elo { display: flex; flex-direction: column; align-items: flex-start; }
.home-elo span { font-size: .72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; }
.home-elo b { font-family: var(--font-mono); font-weight: 500; font-size: 2.4rem; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.home-elo small { color: var(--text-dim); }
.home-top, .home-duels { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; font-size: .88rem; }
.home-top li, .home-duels li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border);
    overflow-wrap: anywhere; min-width: 0; }
.home-top li i { display: inline-block; width: 1.4em; font-style: normal; font-family: var(--font-mono); color: var(--text-faint); }
.home-top li b { font-family: var(--font-mono); font-weight: 500; }
.home-top a { color: inherit; }
.home-duels li { align-items: baseline; }
.home-duels li p { margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-duels li span { font-family: var(--font-mono); white-space: nowrap; }
.home-duels small { color: var(--text-dim); white-space: nowrap; }
/* Aujourd'hui : une liste, pas quatre cartes jumelles. */
.home-todo { display: flex; flex-direction: column; margin-bottom: 30px; border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg-card); }
.todo-card { display: flex; align-items: center; gap: 16px; padding: 12px 16px; color: inherit; text-decoration: none;
    border-top: 1px solid var(--border); transition: background var(--t-fast); }
.todo-card:first-child { border-top: none; }
.todo-card:hover { background: var(--bg-card-hover); }
.todo-card > div { display: flex; align-items: baseline; gap: 14px; min-width: 0; flex: 1; flex-wrap: wrap; }
.todo-card > div b { min-width: 9.5em; font-weight: 600; }
.todo-card small { color: var(--text-dim); font-size: .86rem; }
.todo-state { font-size: .8rem; font-weight: 600; white-space: nowrap; color: var(--text-dim); }
.todo-card.is-ready .todo-state { color: var(--accent); }
.todo-card.is-ready .todo-state::after { content: ' →'; }
.todo-card.is-done { color: var(--text-dim); }
.todo-card.is-done .todo-state { color: var(--green); }
/* Au menu : nom … catégorie, comme sur une ardoise de bar. */
.home-menu { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 40px; }
.home-menu li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.home-menu a { display: flex; align-items: baseline; gap: 8px; color: var(--text); text-decoration: none; }
.home-menu .menu-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.home-menu .menu-dots { flex: 1; border-bottom: 1px dotted var(--border-glow); transform: translateY(-4px); min-width: 20px; }
.home-menu .menu-tag { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); }
.home-menu a:hover .menu-name { color: var(--accent); }
.home-menu p { margin: 4px 0 0; color: var(--text-dim); font-size: .88rem; }
.home-feed { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; }
.home-feed li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--border); font-size: .9rem; }
.home-feed li > span { flex: 1; min-width: 0; }
.home-feed img { width: 26px; height: 26px; border-radius: 50%; }
@media (max-width: 720px) { .home-menu { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .home-hero { grid-template-columns: 1fr; padding: 18px; }
    .home-hero-side { padding-left: 0; border-left: none; padding-top: 16px; border-top: 1px solid var(--border); } }

/* ---------- Hub CS2 ---------- */
.cs2-top { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.cs2-inv-card, .cs2-fps-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px; border-radius: var(--radius-md);
    background: var(--bg-card); border: 1px solid var(--border); color: inherit; text-decoration: none; }
.cs2-inv-card b { font-family: var(--font-mono); font-weight: 500; font-size: 1.8rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cs2-fps-card b { font-family: var(--font-display); font-weight: 600; font-size: 1.8rem; line-height: 1.1; }
.cs2-inv-card small, .cs2-fps-card small { color: var(--text-dim); margin-bottom: 8px; }
.cs2-inv-label { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.cs2-fps-card { border-left: 3px solid var(--accent); }
.cs2-fps-card:hover { background: var(--bg-card-hover); }
.cs2-fps-card b { color: var(--accent); }
.cs2-fps-card .btn { margin-top: auto; }
.cs2-best { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 22px; }
.cs2-best-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: var(--radius-md); text-align: center;
    background: var(--bg-card); border: 1px solid var(--border); border-bottom: 2px solid var(--rar);
    color: inherit; text-decoration: none; transition: transform var(--t-fast); }
.cs2-best-item:hover { border-color: var(--border-glow);}
.cs2-best-item img { width: 100%; height: 86px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.cs2-best-noimg { font-size: 2.4rem; height: 86px; display: grid; place-items: center; }
.cs2-best-name { font-size: .8rem; font-weight: 700; line-height: 1.2; }
.cs2-best-name .st { color: #cf6a32; }
.cs2-best-item small { color: var(--text-dim); font-size: .72rem; }
@media (max-width: 640px) { .cs2-top { grid-template-columns: 1fr; } }

/* ---------- Labo des skins (admin) ---------- */
.lab-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lab-filters input[type="number"] { width: 90px; }
.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: 12px; margin: 14px 0; }
.lab-item { margin: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px; }
.lab-item.no-paint { border-color: var(--red); }
.lab-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: center; background: #2a2f3a; border-radius: 8px; }
.lab-pair canvas, .lab-pair img { width: 100%; height: auto; display: block; }
.lab-item figcaption { display: flex; flex-direction: column; margin-top: 6px; font-size: .82rem; }
.lab-item figcaption small { color: var(--text-dim); }
.lab-pager { display: flex; gap: 10px; align-items: center; justify-content: center; }
.lab-grid.is-big { grid-template-columns: 1fr; }
.lab-grid.is-big .lab-pair { grid-template-columns: 1fr; }



/* ---------- Caisse dessinée (collections sans vraie caisse dans le jeu) ----------
   Corps de caisse CS : métal sombre, couvercle, renforts d'angle et le logo de la
   collection en plaque sur la face, à la taille d'une vraie icône de caisse. */
.crate-drawn { position: relative; width: 150px; max-width: 100%; height: 96px; margin: 7px auto 12px;
    border-radius: 8px 8px 6px 6px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .10) 0 3px, transparent 3px 22px, rgba(0, 0, 0, .35) 22px 25px, transparent 25px),
        linear-gradient(90deg, #2c313b 0 10px, transparent 10px calc(100% - 10px), #2c313b calc(100% - 10px)),
        linear-gradient(165deg, #4a515e, #262a33 60%, #1b1e25);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 8px 14px rgba(0, 0, 0, .45); }
.crate-drawn::before, .crate-drawn::after { content: ''; position: absolute; bottom: 7px; width: 8px; height: 8px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #9aa3b2, #3a404b); }
.crate-drawn::before { left: 14px; }
.crate-drawn::after { right: 14px; }
.crate-drawn img { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); width: 56px; height: 56px; object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.crate-drawn-lg { width: 110px; height: 72px; margin: 0 6px 0 0; flex: none; }
.crate-drawn-lg img { width: 40px; height: 40px; }


/* ---------- Admin : caisses custom ---------- */
.cc-results, .cc-selected { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.cc-results { max-height: 260px; overflow: auto; }
.cc-skin { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border-radius: 8px; font: inherit; font-size: .8rem;
    color: var(--text); background: var(--bg-inset); border: 1px solid var(--c, var(--border)); border-left-width: 3px; cursor: pointer; }
.cc-skin img { width: 42px; height: 30px; object-fit: contain; }
.cc-skin small { color: var(--text-dim); }
.cc-skin b { color: var(--text-dim); margin-left: 2px; }
.cc-skin:hover { background: var(--bg-card); }


/* ---------- Upgrader : Prestige (skins ★ à valeur multipliée) ---------- */
.upgrade-prestige { margin-top: 12px; padding: 10px; border: 1px solid #ffd70055; border-radius: 10px;
    background: linear-gradient(135deg, #ffd70014, transparent); }
.prestige-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.prestige-row input { width: 9ch; flex: 1 1 9ch; min-width: 0; font: inherit; font-weight: 700; color: #ffd700;
    background: var(--bg-inset); border: 1px solid #ffd70066; border-radius: 6px; padding: 4px 8px; }
.prestige-presets { display: flex; gap: 4px; flex-wrap: wrap; }
.prestige-presets button { font: inherit; font-size: .8rem; padding: 4px 8px; border-radius: 6px; cursor: pointer;
    color: #ffd700; background: transparent; border: 1px solid #ffd70066; }
.prestige-presets button:hover { background: #ffd70022; }
.prestige-text { color: #ffd700; font-weight: 700; }
.prestige-badge { position: absolute; top: 6px; left: 6px; z-index: 2; padding: 2px 6px; border-radius: 6px; font-size: .72rem;
    font-weight: 700; color: #1a1400; background: linear-gradient(135deg, #ffe57a, #ffb300); box-shadow: 0 0 10px #ffd70088; }
.skin-card.is-prestige { box-shadow: 0 0 0 1px #ffd700aa, 0 0 22px #ffd70055; }
.skin-card.is-prestige .skin-card-inner { position: relative; }


/* ---------- Profil : fiche détaillée d'un badge au survol ---------- */
/* La fiche est dans la puce (données) mais affichée dans un calque #bdg-float
   (la puce a overflow: hidden pour ses effets brillants). */
.badge-chip { cursor: help; }
.badge-chip:focus-visible { outline: 2px solid var(--badge-color); outline-offset: 2px; }
.badge-chip .bdg-pop { display: none; }
#bdg-float { position: fixed; z-index: 1000; width: 290px; max-width: calc(100vw - 24px); pointer-events: none;
    padding: 12px 14px; border-radius: 12px; font-size: .82rem; color: var(--text);
    background: var(--bg-card); border: 1px solid var(--badge-color, var(--border)); box-shadow: 0 12px 28px rgba(0, 0, 0, .55);
    opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
#bdg-float.is-on { opacity: 1; transform: none; }
.bdg-pop-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.bdg-pop-head b { display: block; font-size: .95rem; }
.bdg-pop-head small { color: var(--badge-color); font-weight: 700; }
.bdg-pop-icon { font-size: 1.8rem; line-height: 1; }
.bdg-pop-icon img { width: 34px; height: 34px; object-fit: contain; }
#bdg-float p { margin: 4px 0; }
#bdg-float dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 6px 0 0; }
#bdg-float dt { color: var(--text-dim); }
#bdg-float dd { margin: 0; }
#bdg-float .bdg-pop-next { padding-top: 6px; margin-top: 6px; border-top: 1px solid var(--border); color: var(--text-dim); }

.settings-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 4px; }

/* Admin : 11 onglets -> grille sur plusieurs lignes (la barre défilante sur une
   ligne en cachait la moitié). */
.subnav.admin-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); overflow: visible; }
.subnav.admin-tabs a { white-space: nowrap; }

/* ---------- 1v1 : non classé (salons) ---------- */
.casual-panel { margin-bottom: 18px; }
.casual-create { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.casual-create .seg label { cursor: pointer; }
.casual-create .seg input { position: absolute; opacity: 0; pointer-events: none; }
.casual-create .seg span { display: inline-block; padding: 7px 14px; border-radius: var(--radius-sm); font-weight: 700; }
.casual-create .seg input:checked + span { background: var(--accent); color: #14110a; }
.casual-stake { display: flex; align-items: center; gap: 6px; }
.casual-stake input { width: 110px; font: inherit; color: var(--text); background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; }
.casual-lobbies { display: grid; gap: 8px; }
.casual-lobby { display: grid; grid-template-columns: 54px 1fr auto auto auto; gap: 12px; align-items: center;
    padding: 10px 14px; border-radius: var(--radius-md); background: var(--bg-inset); border: 1px solid var(--border); }
@media (max-width: 640px) { .casual-lobby { grid-template-columns: 1fr 1fr; } }

/* ================= Badges : nouvelle apparence (2026-09-27) =================
   La couleur = la rareté : commun gris, peu commun vert, rare bleu, épique
   violet, légendaire jaune, mythique rouge ; Staff rose #ff3f7f. */
.badge-chip { background: linear-gradient(135deg, color-mix(in srgb, var(--badge-color) 24%, var(--bg-card)) 0%, var(--bg-card) 75%);
    border: 1px solid color-mix(in srgb, var(--badge-color) 60%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); transition: transform .15s, box-shadow .15s, filter .15s; }
.badge-chip:hover { border-color: var(--border-glow);}
.badge-chip .badge-icon { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--badge-color) 45%, transparent),
    color-mix(in srgb, var(--badge-color) 12%, transparent) 70%);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--badge-color) 70%, transparent), 0 0 12px color-mix(in srgb, var(--badge-color) 35%, transparent); }
.badge-chip.is-big { min-height: 58px; }
.badge-chip.is-big .badge-icon { width: 40px; height: 40px; font-size: 1.5rem; }
.badge-text small { color: var(--badge-color); }
/* Légendaire et mythique : un peu de lumière ; mythique : bord qui ondule. */
.badge-chip.rarity-legendaire:not(.is-locked) { box-shadow: 0 0 14px color-mix(in srgb, var(--badge-color) 35%, transparent); }
.badge-chip.rarity-mythique:not(.is-locked) { border-color: transparent;
    background: linear-gradient(135deg, color-mix(in srgb, var(--badge-color) 26%, var(--bg-card)), var(--bg-card) 75%) padding-box,
        linear-gradient(90deg, #ef4444, #f97316, #ef4444, #be123c, #ef4444) border-box;
    background-size: 100% 100%, 300% 100%; animation: rainbow-border 5s linear infinite;
    box-shadow: 0 0 18px color-mix(in srgb, #ef4444 40%, transparent); }
/* Staff : rose, reflet holographique permanent, toujours en tête. */
.badge-chip.is-staff { --badge-color: #ff3f7f; border: 1px solid #ff3f7f;
    background: linear-gradient(135deg, rgba(255, 63, 127, .35), rgba(168, 85, 247, .18) 55%, var(--bg-card)) padding-box;
    box-shadow: 0 0 22px rgba(255, 63, 127, .45), inset 0 1px 0 rgba(255, 255, 255, .12); }
.badge-chip.is-staff::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 45%, transparent 60%);
    transform: translateX(-100%); animation: badge-shine 2.8s linear infinite; }
.badge-chip.is-staff .badge-text b { color: #ffd1e1; }
.badge-showcase .badge-chip.is-staff { order: -1; }
/* Owner : or et noir, bord doré qui tourne, couronne qui flotte, étincelles, toujours en tête. */
@property --owner-ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.badge-chip.is-staff.is-owner { --badge-color: #ffc233; border: 2px solid transparent; overflow: hidden; isolation: isolate;
    background: radial-gradient(120% 140% at 0% 0%, rgba(255, 194, 51, .32), transparent 55%), linear-gradient(135deg, #2a1c00, #0d0d10 70%) padding-box,
                conic-gradient(from var(--owner-ang), #ffc233, #fff3b0, #ff9f1c, #fff8dc, #ffd466, #b8860b, #ffc233) border-box;
    box-shadow: 0 0 28px rgba(255, 194, 51, .55), 0 0 60px rgba(255, 159, 28, .2), inset 0 0 22px rgba(255, 194, 51, .12);
    animation: owner-spin 3.5s linear infinite; }
@keyframes owner-spin { to { --owner-ang: 360deg; } }
.badge-chip.is-owner .badge-icon { border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b0, #ffc233 55%, #b8860b);
    box-shadow: 0 0 0 2px #fff3b0, 0 0 18px #ffc233; animation: owner-float 2.6s ease-in-out infinite; }
@keyframes owner-float { 50% { transform: translateY(-3px) rotate(-6deg); box-shadow: 0 0 0 2px #fff3b0, 0 0 28px #ffc233; } }
.badge-chip.is-owner .badge-text b { color: transparent; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
    background: linear-gradient(90deg, #fff3b0, #ffc233, #fff, #ffc233, #fff3b0) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text;
    animation: owner-text 2.8s linear infinite; }
@keyframes owner-text { to { background-position: -200% 0; } }
.badge-chip.is-owner .badge-text small { color: #ffd466; }
.badge-chip.is-owner::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(circle, #fff 0 1.5px, transparent 2px) 12% 30% / 40px 40px, radial-gradient(circle, #ffe58a 0 1.5px, transparent 2px) 70% 60% / 52px 46px;
    opacity: .8; animation: owner-sparkle 3s ease-in-out infinite; }
@keyframes owner-sparkle { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: .95; transform: translateY(-4px); } }
.badge-chip.is-owner::after { background: linear-gradient(110deg, transparent 30%, rgba(255, 243, 176, .55) 45%, transparent 60%); animation-duration: 2.2s; }
.badge-showcase .badge-chip.is-owner { order: -2; min-height: 78px; padding: 10px 26px 10px 12px; gap: 14px; }
.badge-showcase .badge-chip.is-owner .badge-icon { width: 56px; height: 56px; font-size: 2rem; }
.badge-showcase .badge-chip.is-owner .badge-text b { font-size: 1.35rem; }
.badge-showcase .badge-chip.is-owner .badge-text small { font-size: .78rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.rl.owner { color: #ffc233; }
@media (prefers-reduced-motion: reduce) { .badge-chip.is-owner, .badge-chip.is-owner *, .badge-chip.is-owner::before, .badge-chip.is-owner::after { animation: none !important; } }
.role-chip.is-staff { background: rgba(255, 63, 127, .16); border-color: #ff3f7f; box-shadow: 0 0 12px rgba(255, 63, 127, .45); }
.role-chip.is-staff.is-owner { position: relative; overflow: hidden; color: #2a1c00; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
    border: 2px solid transparent; background: linear-gradient(90deg, #ffd466, #ffc233, #fff3b0, #ffc233) padding-box,
    conic-gradient(from var(--owner-ang), #fff3b0, #b8860b, #ffc233, #fff8dc, #b8860b, #fff3b0) border-box;
    box-shadow: 0 0 16px rgba(255, 194, 51, .65), 0 0 34px rgba(255, 159, 28, .25); animation: owner-spin 3.5s linear infinite; }
.role-chip.is-owner::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .7) 45%, transparent 60%); transform: translateX(-100%); animation: badge-shine 2.2s linear infinite; }
/* Manquant : grisé, bord pointillé, progression en bas. */
.badge-chip.is-locked { filter: grayscale(1); opacity: .55; border-style: dashed; box-shadow: none; }
.badge-chip.is-locked:hover { filter: grayscale(.4); opacity: .9; }
.badge-progress { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--badge-color); border-radius: 0 3px 3px 0; }
/* Secret pas encore trouvé : rayures, point d'interrogation. */
.badge-chip.is-secret.is-locked { --badge-color: #6b7280; filter: none; opacity: .8;
    background: repeating-linear-gradient(135deg, var(--bg-inset) 0 8px, var(--bg-card) 8px 16px); }
.badge-chip.is-secret.is-locked .badge-text b { letter-spacing: 2px; text-transform: uppercase; }
/* Onglet Badges */
.bdg-family { margin-top: 14px; }
.bdg-family h3 { font-size: .95rem; margin: 0 0 8px; }
.rarity-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.rarity-legend .rl { padding: 2px 9px; border-radius: 999px; font-weight: 700; font-size: .72rem; border: 1px solid currentColor; }
.rl.commun { color: #9ca3af; } .rl.peu_commun { color: #22c55e; } .rl.rare { color: #3b82f6; } .rl.epique { color: #a855f7; }
.rl.legendaire { color: #facc15; } .rl.mythique { color: #ef4444; } .rl.admin { color: #ff3f7f; }
/* Admin : tous les badges */
.admin-filter { width: 100%; margin: 6px 0 10px; }
.bdg-admin-group { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; }
.bdg-admin-group h3 { margin: 0 0 8px; font-size: .95rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bdg-admin-group.is-staff { border-color: #ff3f7f; box-shadow: 0 0 16px rgba(255, 63, 127, .25); background: rgba(255, 63, 127, .05); }
.bdg-admin-group.is-secret { border-style: dashed; }
.bdg-admin-group.is-off { opacity: .55; }
.bdg-admin-row { display: grid; grid-template-columns: minmax(200px, 250px) 1fr auto auto; gap: 10px; align-items: center; padding: 6px 0;
    border-top: 1px solid var(--border); }
.bdg-admin-row:first-of-type { border-top: none; }
.bdg-admin-row .badge-chip { cursor: default; }
.admin-check.inline { display: inline-flex; margin: 0 0 0 auto; font-weight: 400; font-size: .8rem; }
@media (max-width: 760px) { .bdg-admin-row { grid-template-columns: 1fr; } }

/* ========== Contribuer : bugs et idées ========== */
/* Ce que valident les contributions : visible avant même d'envoyer. */
.contrib-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}
.contrib-badge {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-inset);
}
.contrib-badge-icon { font-size: 1.9rem; line-height: 1; }
.contrib-gold { color: var(--rarity-legendary); }
.contrib-progress {
    height: 5px;
    margin: 8px 0 4px;
    border-radius: 999px;
    background: var(--border-light);
    overflow: hidden;
}
.contrib-progress span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

.contrib-form { display: flex; flex-direction: column; gap: 6px; }
.contrib-form textarea { resize: vertical; min-height: 110px; }
.contrib-form .btn { align-self: flex-start; margin-top: 6px; }
.contrib-kind { display: flex; gap: 8px; margin-bottom: 6px; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
}
.chip-radio input:checked + span { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.chip-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.contrib-ok { color: var(--green); }
.contrib-err { color: var(--red); }

/* Une contribution : sa couleur dit où elle en est. */
.contrib-item, .contrib-admin {
    padding: 10px 12px;
    margin-bottom: 8px;
    border-left: 3px solid var(--text-faint);
    border-radius: 6px;
    background: var(--bg-inset);
}
.contrib-accepted { border-left-color: var(--green); }
.contrib-rejected { border-left-color: var(--red); opacity: 0.75; }
.contrib-pending { border-left-color: var(--accent); }
.contrib-item-head, .contrib-admin-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.contrib-status { font-size: 0.8rem; color: var(--text-dim); white-space: nowrap; }
.contrib-note { margin: 6px 0 0; font-size: 0.85rem; color: var(--text-dim); }
.contrib-admin-body { margin: 6px 0; white-space: pre-wrap; font-size: 0.88rem; }
.contrib-admin-actions { align-items: center; gap: 8px; margin-top: 4px; }
.contrib-admin-actions .btn { margin-top: 0; }

/* Rôles Discord -> badges */
.roles-table select { max-width: 100%; }
.role-dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; vertical-align: middle; }
/* Mêmes champs que le reste du site (.filter-bar) : pas de blanc natif. */
.contrib-form input[type="text"], .contrib-form textarea {
    background: var(--bg-inset);
    border: 1px solid var(--border-light);
    color: var(--text);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.95rem;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.contrib-form input[type="text"]:focus, .contrib-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* Page « réduit au silence » (sabotage ou mute du staff : site bloqué). */
.silenced-box { max-width: 520px; margin: 60px auto; padding: 32px 24px; text-align: center; border-radius: 16px;
                background: var(--bg-card); border: 1px solid var(--border); }
.silenced-icon { font-size: 3rem; line-height: 1; margin-bottom: 12px; }
.silenced-box h1 { margin: 0 0 12px; font-size: 1.5rem; }
.silenced-timer { margin: 18px 0 22px; font-size: 1.05rem; }

/* Loup-Garou, rangé dans l'onglet Duels PvP des mini-jeux. */
.lg-promo { display: flex; align-items: center; gap: 14px; margin: 14px 0 20px; padding: 14px 18px; border-radius: 14px;
            background: linear-gradient(120deg, rgba(120, 60, 160, .22), rgba(30, 34, 50, .6)); border: 1px solid var(--border);
            color: inherit; text-decoration: none; }
.lg-promo:hover { border-color: var(--accent); }
.lg-promo > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.lg-promo-icon { font-size: 2rem; }

/* Saison : points, paliers, MVP, récap. */
.season-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 800px) { .season-top { grid-template-columns: 1fr; } }
.season-points { font-size: 2.4rem; font-weight: 700; color: var(--accent); line-height: 1.1; }
.season-points small { font-size: 1rem; color: var(--text-dim); font-weight: 600; }
.season-reached { margin: 6px 0; }
.season-bar { height: 8px; border-radius: 4px; background: var(--bg-inset); overflow: hidden; margin: 10px 0 4px; }
.season-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--accent)); }
.season-detail td.num, .season-table .num, .season-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.season-detail { margin-top: 10px; }
.season-tiers { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.season-tiers li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 8px 12px; border-radius: 10px;
                   background: var(--bg-inset); border: 1px solid var(--border); }
.season-tiers li.is-reached { border-color: var(--accent); }
.season-rules summary { cursor: pointer; font-weight: 600; }
.season-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.season-cat { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; padding: 10px 12px;
              border-radius: 10px; background: var(--bg-inset); border: 1px solid var(--border); }
.season-cat.is-me { border-color: var(--accent); }
.season-cat small { display: block; }
.season-cat-icon { font-size: 1.6rem; grid-row: span 2; }
.season-cat-who, .season-mvp { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.season-cat-who img, .season-mvp img, .season-avatar { width: 24px; height: 24px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }
.season-table tr.is-me td { color: var(--accent); font-weight: 700; }
.season-past { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.season-podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: 10px 0 20px; }
.season-step { display: grid; justify-items: center; gap: 4px; padding: 14px 18px; border-radius: 14px; min-width: 130px;
               background: var(--bg-card); border: 1px solid var(--border); }
.season-step img { width: 56px; height: 56px; border-radius: 50%; }
.season-step.step-1 { order: 2; padding-bottom: 34px; border-color: #facc15; }
.season-step.step-2 { order: 1; padding-bottom: 22px; }
.season-step.step-3 { order: 3; }
.season-medal { font-size: 2rem; }
.season-facts { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* ---------- Uniques : emblème d'élément à côté d'un pseudo (templates/_uniques.html) ---------- */
.u-el { position: relative; display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; vertical-align: middle;
    border-radius: 4px; font-size: .78em; font-weight: 700; line-height: 1; color: #10131a;
    background: linear-gradient(160deg, color-mix(in srgb, var(--el) 85%, #fff), var(--el)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.u-el small { position: absolute; top: 1px; left: 2px; font-size: .5em; font-weight: 700; opacity: .75; }
.u-el-lg { font-size: .62em; width: 2em; height: 2em; }
.profile-hero.has-color { border-color: color-mix(in srgb, var(--pf-color) 55%, var(--border));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--pf-color) 30%, transparent), 0 10px 40px color-mix(in srgb, var(--pf-color) 18%, transparent); }
.profile-hero.has-color .pf-avatar { border-color: var(--pf-color); box-shadow: 0 0 22px color-mix(in srgb, var(--pf-color) 45%, transparent); }

/* Panneau admin : pastille de couleur / case d'élément des Uniques */
.adm-swatch { display: inline-block; width: 22px; height: 22px; border-radius: 5px; vertical-align: middle; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.adm-tile { display: inline-grid; place-items: center; width: 24px; height: 26px; border-radius: 4px; font-size: .75rem; font-weight: 700; color: #10131a; vertical-align: middle; }
.admin-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-chips .chip { cursor: pointer; font: inherit; font-size: .8rem; }

/* ---------- Communauté : en ligne, paris en direct, classements de la semaine, membre du jour ---------- */
.cm-online, .cm-bets, .cm-week, .cm-featured { margin-bottom: 18px; }
.cm-online h2 small { margin-left: 6px; font-size: .85rem; }
.cm-live-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(74, 222, 128, .2); vertical-align: middle; }
.cm-online-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.cm-online-chip { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.cm-online-chip:hover { border-color: var(--accent); }
.cm-online-chip img { width: 30px; height: 30px; border-radius: 50%; }
.cm-online-chip span { display: grid; line-height: 1.15; }
.cm-online-chip b { font-size: .84rem; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-online-chip small { color: var(--green); font-size: .72rem; font-weight: 600; }
.cm-bets .section-head { flex-wrap: wrap; gap: 8px; }
.cm-table-wrap { overflow-x: auto; }
.cm-table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: .86rem; }
.cm-table th { text-align: left; color: var(--text-dim); font-weight: 600; font-size: .76rem; padding: 4px 12px; }
.cm-table td { padding: 10px 12px; background: var(--bg-inset); white-space: nowrap; }
.cm-table td:first-child { border-radius: 6px 0 0 6px; } .cm-table td:last-child { border-radius: 0 6px 6px 0; }
.cm-table th:nth-child(n+4), .cm-table td:nth-child(n+4) { text-align: right; font-family: var(--font-mono); }
.cm-table td a { color: var(--text); text-decoration: none; font-weight: 600; }
.cm-table td a:hover { color: var(--accent); }
.cm-table tr.is-me td { background: color-mix(in srgb, var(--accent) 9%, var(--bg-inset)); }
.cm-table .is-up { color: var(--green); font-weight: 700; } .cm-table .is-down { color: var(--text-dim); }
@media (max-width: 640px) { .cm-hide-sm { display: none; } .cm-table td, .cm-table th { padding: 8px 6px; } }
.cm-week .section-head small { margin-left: auto; }
.cm-week-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .cm-week-grid { grid-template-columns: 1fr; } }
.cm-board h3 { margin: 0 0 10px; font-size: .95rem; }
.cm-podium { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cm-podium li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; background: var(--bg-inset); font-size: .84rem; }
.cm-podium li.is-me { box-shadow: inset 3px 0 0 var(--accent); }
.cm-rank { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--border); font-weight: 800; font-size: .74rem; }
.cm-podium li:nth-child(1) .cm-rank { background: var(--accent); color: #2a1c00; }
.cm-podium li:nth-child(2) .cm-rank { background: #cbd5e1; color: #111; }
.cm-podium li:nth-child(3) .cm-rank { background: #d97706; color: #111; }
.cm-who { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text); text-decoration: none; }
.cm-who img { width: 22px; height: 22px; border-radius: 50%; }
.cm-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-podium b { font-family: var(--font-mono); font-size: .8rem; white-space: nowrap; }
.cm-podium b a { color: var(--text-dim); text-decoration: none; font-family: var(--font-body, inherit); }
.cm-featured { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 1.4fr); gap: 16px 22px; align-items: start; }
.cm-featured-id { display: flex; gap: 14px; align-items: center; }
.cm-featured-id > img { width: 76px; height: 76px; border-radius: 50%; box-shadow: 0 0 0 3px var(--accent); }
.cm-featured-id h2 { margin: 2px 0 6px; }
.cm-featured-id h2 a { color: inherit; text-decoration: none; }
.cm-featured-skins { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cm-featured-uniques { grid-column: 1 / -1; display: grid; gap: 6px; }
.cm-featured-uniques .un-compact { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 5px; }
@media (max-width: 900px) { .cm-featured { grid-template-columns: 1fr; } .cm-featured-skins { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Accueil : gros gains, ma journée, reprendre, jeux du moment, nouveautés ---------- */
.home-ticker { display: flex; align-items: center; gap: 10px; margin: -6px 0 18px; padding: 6px 6px 6px 12px; border-radius: var(--radius-md);
    background: var(--bg-card); border: 1px solid var(--border); overflow: hidden; }
.home-ticker-label { flex: none; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.home-ticker-track { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.home-ticker-run { display: flex; gap: 8px; width: max-content; animation: home-ticker calc(var(--n) * 8s) linear infinite; }
.home-ticker:hover .home-ticker-run { animation-play-state: paused; }
@keyframes home-ticker { to { transform: translateX(-50%); } }
/* Le bandeau défile toujours (même si le système demande moins d animations) et n a jamais de barre de défilement. */
.home-ticker-track { scrollbar-width: none; }
.home-ticker-track::-webkit-scrollbar { display: none; }
.home-ticker-item { flex: none; display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--bg-inset);
    color: var(--text); text-decoration: none; font-size: .82rem; white-space: nowrap; }
.home-ticker-item span { color: var(--text-dim); }
.home-ticker-item i { font-style: normal; font-weight: 700; color: var(--accent); font-family: var(--font-mono); }
.home-ticker-item em { font-style: normal; font-weight: 700; color: var(--green); font-family: var(--font-mono); }
.home-ticker-item:hover { background: var(--border); }
.home-day { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (max-width: 760px) { .home-day { grid-template-columns: 1fr 1fr; } }
.home-day-card { display: grid; gap: 3px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--bg-card); border: 1px solid var(--border); }
.home-day-card small { color: var(--text-dim); font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.home-day-card b { font: 700 1.25rem var(--font-mono); }
.home-day-card b.is-up { color: var(--green); } .home-day-card b.is-down { color: var(--red, #f05252); }
.home-day-card span { color: var(--text-dim); font-size: .76rem; }
.home-day-bar { height: 8px; margin: 8px 0 2px; border-radius: 999px; background: var(--bg-inset); overflow: hidden; }
.home-day-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.home-play { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 22px; margin-bottom: 8px; }
.home-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-bottom: 22px; }
.home-tile { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; color: #fff; text-decoration: none;
    background: radial-gradient(120% 80% at 50% 0%, var(--c1), var(--c2)); transition: transform .15s, box-shadow .15s; }
.home-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 0, 0, .45); }
.home-tile-art svg { position: absolute; left: 10%; top: 4%; width: 80%; height: auto; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .3)); }
.home-tile-text { position: absolute; left: 0; right: 0; bottom: 0; display: grid; padding: 6px 8px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.home-tile-text b { font: 800 italic .82rem var(--font-display, inherit); text-transform: uppercase; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-tile-text small { color: var(--green); font-size: .7rem; font-weight: 700; }
.home-news { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.home-news a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--bg-card);
    border: 1px solid var(--border); color: var(--text); text-decoration: none; height: 100%; }
.home-news a:hover { border-color: var(--accent); }
.home-news-art { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: var(--bg-inset); }
.home-news-art svg { width: 48px; height: 48px; }
.home-news-art.is-icon i { font-size: 1.6rem; color: var(--accent); }
.home-news a > span { display: grid; gap: 2px; min-width: 0; }
.home-news small { color: var(--text-dim); font-size: .78rem; }
.home-news time { margin-left: auto; align-self: flex-start; color: var(--text-dim); font-size: .72rem; font-family: var(--font-mono); }

/* Admin : onglet Discord (Discord vivant) */
.dl-rows { display: grid; gap: 6px; margin: 10px 0 16px; }
.dl-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px;
    border-radius: var(--radius-xs); background: var(--bg-inset); }
.dl-row select { margin: 0; }
.dl-fun { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.admin-box .dl-chip, .admin-box .dl-on, .dl-chip, .dl-on { display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.dl-chip { padding: 4px 10px; border-radius: 999px; background: var(--bg-inset); font-size: .88rem; }
.admin-box .dl-chip input, .admin-box .dl-on input { width: auto; height: auto; margin: 0; flex: none; }
.dl-pair { display: flex; gap: 6px; }
.dl-tests { display: grid; gap: 6px; margin-top: 10px; }
.dl-tests .btn { margin: 0; text-align: left; }
@media (max-width: 700px) { .dl-row { grid-template-columns: 1fr; } }

/* Pseudo coloré par un Unique mythique, dans les listes : un fin halo qui change lentement de couleur
   (uniques/catalog.py name_style). Le blanc pur, le noir absolu... ne se confondent plus avec les autres. */
@keyframes u-ln-myth {
    0%, 100% { text-shadow: 0 0 3px rgba(255, 77, 109, .95), 0 0 10px rgba(255, 77, 109, .8); }
    25% { text-shadow: 0 0 3px rgba(255, 200, 70, .95), 0 0 10px rgba(255, 200, 70, .8); }
    50% { text-shadow: 0 0 3px rgba(90, 230, 180, .95), 0 0 10px rgba(90, 230, 180, .8); }
    75% { text-shadow: 0 0 3px rgba(110, 170, 255, .95), 0 0 10px rgba(110, 170, 255, .8); }
}
@media (prefers-reduced-motion: reduce) { [style*="u-ln-myth"] { animation: none !important; } }

/* Fiche joueur (admin) : l'argent en détail — static/admin.js, web/admin_player.py */
.ud-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 6px 0 10px; border-radius: 10px; background: var(--bg-inset); width: fit-content; }
.ud-tabs button { border: 0; background: none; color: var(--text-dim); font: inherit; font-weight: 700; font-size: .85rem; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.ud-tabs button.is-on { background: var(--accent); color: #1a1405; }
.ud-money { min-width: 0; }
.ud-flows tr.ud-cat, .ud-flows tr.ud-src { cursor: pointer; }
.ud-flows tr.ud-cat:hover, .ud-flows tr.ud-src:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.ud-flows tr.ud-total td { border-top: 2px solid var(--border-light); }
.ud-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin-bottom: 8px; }
.ud-filters label { display: grid; gap: 3px; font-size: .75rem; color: var(--text-dim); }
.ud-filters input, .ud-filters select { background: var(--bg-inset); border: 1px solid var(--border-light); color: var(--text);
    padding: 6px 8px; border-radius: 8px; font: inherit; font-size: .85rem; }
.ud-filters .btn { width: auto; margin: 0; }
.ud-ledger details { display: inline; margin-left: 6px; }
.ud-ledger details code { display: block; white-space: pre-wrap; word-break: break-all; font-size: .72rem; margin-top: 4px; }
.ud-more { margin-top: 8px; }
.ud-curve-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.ud-curve-head select { width: auto; background: var(--bg-inset); border: 1px solid var(--border-light); color: var(--text); border-radius: 8px; padding: 4px 8px; }
.ud-curve { width: 100%; height: auto; display: block; margin-bottom: 10px; }
.ud-curve .ud-grid { stroke: var(--border); stroke-dasharray: 4 4; }
.ud-curve text { fill: var(--text-dim); font-size: 11px; }
.ud-curve .ud-line { fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.ud-curve .ud-up { fill: var(--green); stroke: var(--bg); stroke-width: 2; }
.ud-curve .ud-down { fill: var(--red); stroke: var(--bg); stroke-width: 2; }
tr.ud-alert td { background: color-mix(in srgb, var(--red) 10%, transparent); }

/* ---------- Patch notes ---------- */
.pn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 820px; }
.pn-note { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 18px; }
.pn-when { padding-top: 16px; display: grid; gap: 6px; align-content: start; justify-items: start; }
.pn-when time { color: var(--text-dim); font-size: .85rem; }
.pn-new { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--bg); }
.pn-body { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 20px; min-width: 0; }
.pn-note.is-new .pn-body { border-color: var(--accent); }
.pn-body h2 { margin: 0 0 8px; font-size: 1.15rem; }
.pn-body h3 { margin: 14px 0 4px; font-size: .95rem; color: var(--accent); }
.pn-body ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; line-height: 1.5; }
.pn-body li::marker { color: var(--text-dim); }
.pn-discord { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: .85rem; color: var(--text-dim); }
.pn-discord:hover { color: var(--accent); }
@media (max-width: 640px) {
    .pn-note { grid-template-columns: 1fr; gap: 4px; }
    .pn-when { padding-top: 0; grid-auto-flow: column; align-items: center; }
}
.home-news-patch a { border-color: var(--accent); }
.pn-preview h3 { margin: 0 0 6px; }
.pn-preview h4 { margin: 10px 0 2px; color: var(--accent); font-size: .9rem; }
.pn-preview ul { margin: 0; padding-left: 18px; }

/* Upgrader CS2 : choix du pattern (mêmes contrôles que le Prestige, sans l'or) */
.upgrade-pattern { display: grid; gap: 6px; margin-top: 6px; }
.upgrade-pattern .prestige-row input { color: inherit; border-color: var(--border); }
.upgrade-pattern .prestige-presets button { color: inherit; border-color: var(--border); background: var(--bg-inset); }
.upgrade-pattern .prestige-presets button:hover { background: var(--bg-card); }
.upgrade-pattern .prestige-presets button.is-active { border-color: var(--accent); color: var(--accent); }
