/* Scorbits v2 — Design Tokens canoniques */
/* Source : DESIGN_TOKENS.md v2.0 (2026-04-28) */
/* Ne JAMAIS hardcoder une couleur en dehors de ces vars. */

:root {
    --bg-0: #050807;
    --bg-1: #0a0f0d;
    --bg-2: #0f1614;
    --bg-3: #131c19;

    --border-1: rgba(16, 185, 129, 0.08);
    --border-2: rgba(16, 185, 129, 0.16);
    --border-3: rgba(16, 185, 129, 0.32);

    --emerald-deep: #064e3b;
    --emerald: #10b981;
    --emerald-bright: #34d399;
    --neon: #00ff88;
    --neon-glow: rgba(0, 255, 136, 0.4);
    --neon-glow-strong: rgba(0, 255, 136, 0.35);
    --neon-glow-soft: rgba(0, 255, 136, 0.12);
    --emerald-border: rgba(16, 185, 129, 0.4);
    --emerald-border-soft: rgba(16, 185, 129, 0.2);

    --text-1: #e5f4ee;
    --text-2: #d4dcd8;
    --text-3: #9ba8a3;

    --success: #10b981;
    --warning: #fbbf24;
    --danger: #ef4444;
    --info: #60a5fa;

    --gold: #ffd700;
    --gold-glow: rgba(255, 215, 0, 0.5);
    --silver: #d1d5db;
    --silver-glow: rgba(209, 213, 219, 0.45);
    --bronze: #cd7f32;
    --bronze-glow: rgba(205, 127, 50, 0.45);

    --admin-purple: #a855f7;
    --admin-purple-glow: rgba(168, 85, 247, 0.4);

    --btc: #f7931a;
    --xrp: #00aae4;
    --doge: #c2a633;
    --stripe: #635bff;

    --buy: #10b981;
    --buy-glow: rgba(16, 185, 129, 0.35);
    --sell: #ef4444;
    --sell-glow: rgba(239, 68, 68, 0.35);
}

/* === Effets globaux === */
body::before {
    content: '';
    position: fixed; inset: 0;
    background-image:
        linear-gradient(rgba(16, 185, 129, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at center top, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center top, black 40%, transparent 80%);
}

body::after {
    content: '';
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px; height: 600px;
    background: radial-gradient(ellipse, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.scanline {
    position: fixed; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--emerald) 50%, transparent);
    opacity: 0;
    pointer-events: none;
    animation: scanlineDescend 8s linear infinite;
    z-index: 1;
}

@keyframes scanlineDescend {
    0%   { top: 80px; opacity: 0; }
    10%  { opacity: 0.35; }
    90%  { opacity: 0.35; }
    100% { top: 100vh; opacity: 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(0.85); }
}

@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 30px var(--neon-glow); }
    50%      { box-shadow: 0 0 50px var(--neon-glow); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .scanline { display: none !important; }
}

/* === Composants partagés === */

/* Rank badge */
.rank {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    line-height: 1;
    border-radius: 5px;
    user-select: none;
    transition: transform 0.15s ease;
}
.rank.size-sm { width: 18px; height: 18px; font-size: 10px; border-radius: 4px; }
.rank.size-md { width: 22px; height: 22px; font-size: 11px; }
.rank.size-lg { width: 26px; height: 26px; font-size: 12px; }
.rank.r-1 {
    background: linear-gradient(135deg, #ffe055, #ffd700 50%, #c89a00);
    color: #1a1100;
    box-shadow: 0 0 8px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,0.4);
}
.rank.r-2 {
    background: linear-gradient(135deg, #f0f4f7, #d1d5db 50%, #9ca3af);
    color: #1a1f24;
    box-shadow: 0 0 8px var(--silver-glow), inset 0 1px 0 rgba(255,255,255,0.5);
}
.rank.r-3 {
    background: linear-gradient(135deg, #f4a574, #cd7f32 50%, #8b5a1f);
    color: #1a0f06;
    box-shadow: 0 0 8px var(--bronze-glow), inset 0 1px 0 rgba(255,255,255,0.4);
}
.rank.r-other {
    background: rgba(16, 185, 129, 0.12);
    color: var(--emerald-bright);
    border: 1px solid var(--border-2);
}

/* Copy button */
.copy-btn {
    width: 22px; height: 22px;
    background: transparent;
    border: 1px solid var(--border-1);
    border-radius: 5px;
    color: var(--text-3);
    cursor: pointer;
    display: grid; place-items: center;
    transition: all 0.12s ease;
    flex-shrink: 0;
}
.copy-btn:hover {
    background: var(--bg-3);
    color: var(--neon);
    border-color: var(--border-2);
}
.copy-btn svg { width: 11px; height: 11px; }
.copy-btn-large {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: 8px;
    color: var(--text-2);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
}
.copy-btn-large:hover {
    background: var(--bg-3);
    color: var(--neon);
    border-color: var(--border-2);
}

/* Tx address pill */
.tx-addr-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 8px;
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: 6px;
    font-size: 11px;
    transition: all 0.12s ease;
    text-decoration: none;
    color: inherit;
}
.tx-addr-pill:hover { background: var(--bg-3); border-color: var(--border-2); }
.tx-addr-pill.special-treasury { background: rgba(255, 215, 0, 0.05); border-color: rgba(255, 215, 0, 0.25); color: var(--gold); }
.tx-addr-pill.special-pool { background: rgba(0, 255, 136, 0.05); border-color: var(--border-2); color: var(--neon); }
.tx-addr-pill.special-coinbase { background: rgba(52, 211, 153, 0.06); border-color: var(--border-2); color: var(--emerald-bright); }

/* Admin pill */
.admin-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 999px;
    color: var(--admin-purple);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Live indicator */
.live-indicator {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid var(--border-2);
    border-radius: 999px;
    color: var(--neon);
    font-size: 11px;
    font-weight: 600;
}
.live-indicator::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 6px var(--neon-glow);
    animation: pulse 1.4s ease-in-out infinite;
}

/* Inputs */
.input {
    width: 100%; height: 40px;
    padding: 0 14px;
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: 10px;
    color: var(--text-1);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.15s ease;
}
.input::placeholder { color: var(--text-3); }
.input:focus {
    border-color: var(--emerald);
    background: var(--bg-3);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

/* Buttons */
.btn-primary {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--emerald), var(--neon));
    color: var(--bg-0);
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px var(--neon-glow);
}
.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.btn-primary-purple {
    background: linear-gradient(135deg, #7e22ce, var(--admin-purple));
    color: white;
}
.btn-primary-purple:hover {
    box-shadow: 0 0 16px var(--admin-purple-glow);
}

/* Tabs */
.tabs {
    display: inline-flex; gap: 4px;
    padding: 4px;
    background: var(--bg-1);
    border: 1px solid var(--border-1);
    border-radius: 12px;
}
.tabs button {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-2);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.tabs button.active {
    background: var(--bg-3);
    color: var(--neon);
    box-shadow: inset 0 0 0 1px var(--border-3);
}

/* Mono helper */
.mono { font-family: 'JetBrains Mono', monospace; font-feature-settings: "ss01", "cv01"; }

/* J13 M45L.2 — Override fade text */
.muted, .small, .text-muted, .stat-label, .wallet-hero-tag, .wallet-hero-sub, .action-card-label{
  color: #d4dcd8 !important;
}
.muted.small{ color: #c0cac6 !important; }
