/* ═══════════════════════════════════════════════════════════════════════════
   OBELISK — NIGHT PRO THEME
   Palette bancaire privée premium : navy profond + bleu électrique + or discret
   Inspiré de Bloomberg Terminal, Citadel, Refinitiv — élégant, précis, institutionnel
   V3.1 — 2026-02-21
   ══════════════════════════════════════════════════════════════════════════ */

/* ─── Variables thème ─────────────────────────────────────────────────────── */
body.theme-night-pro {

    /* Backgrounds — navy profond, pas noir pur */
    --bg-primary:   #06101e;
    --bg-secondary: #0a1628;
    --bg-tertiary:  #0f1d35;
    --bg-card:      #101e33;
    --bg-hover:     #162440;
    --bg-elevated:  #1a2b4a;
    --bg-modal:     rgba(6, 16, 30, 0.97);

    /* Texte — lisibilité maximale */
    --text-primary:   #f0f4fa;
    --text-secondary: #8ba3c4;
    --text-muted:     #4d6480;
    --text-accent:    #60a5fa;

    /* Accent principal — bleu électrique institutionnel */
    --accent-primary:    #3b82f6;
    --accent-secondary:  #2563eb;
    --accent-tertiary:   #1d4ed8;
    --accent-hover:      #60a5fa;

    /* Or discret premium (highlights, titres importants) */
    --gold-primary:   #d4a843;
    --gold-secondary: #b8902e;
    --gold-subtle:    rgba(212, 168, 67, 0.12);

    /* Profit / Perte */
    --success:       #34d399;
    --success-bg:    rgba(52, 211, 153, 0.10);
    --danger:        #f87171;
    --danger-bg:     rgba(248, 113, 113, 0.10);
    --warning:       #fbbf24;
    --warning-bg:    rgba(251, 191, 36, 0.10);

    /* Gradients */
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    --rainbow-gradient: linear-gradient(90deg,
        #1d4ed8 0%, #2563eb 20%, #3b82f6 40%,
        #60a5fa 55%, #d4a843 75%, #f0f4fa 100%
    );
    --gold-gradient:   linear-gradient(135deg, #b8902e 0%, #d4a843 50%, #e6c063 100%);

    /* Borders */
    --border-color:  rgba(59, 130, 246, 0.18);
    --border-light:  rgba(59, 130, 246, 0.08);
    --border-glow:   rgba(59, 130, 246, 0.40);
    --border-gold:   rgba(212, 168, 67, 0.25);

    /* Shadows — profondeur subtile */
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,130,246,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.6), 0 0 0 1px rgba(59,130,246,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.7), 0 0 0 1px rgba(59,130,246,0.10);

    /* Glows — subtils, pas criards */
    --glow:        0 0 20px rgba(59,130,246,0.15), 0 0 40px rgba(59,130,246,0.06);
    --glow-intense:0 0 30px rgba(59,130,246,0.25), 0 0 60px rgba(59,130,246,0.12);
    --glow-subtle: 0 0 10px rgba(59,130,246,0.10);
    --bio-glow:    0 0 16px rgba(59,130,246,0.20);
    --inner-glow:  inset 0 0 20px rgba(59,130,246,0.04);

    /* Ancien Forerunner */
    --forerunner-glow: #3b82f6;
    --cyan-primary:    #60a5fa;
    --cyan-secondary:  #3b82f6;
    --cyan-glow:       rgba(96, 165, 250, 0.4);
    --bronze-primary:  #d4a843;
    --bronze-secondary:#b8902e;
    --bronze-glow:     rgba(212, 168, 67, 0.3);
}

/* ─── Base ────────────────────────────────────────────────────────────────── */
body.theme-night-pro {
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(ellipse 120% 60% at 50% -10%, rgba(37,99,235,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 30% at 85% 100%, rgba(59,130,246,0.04) 0%, transparent 50%),
        linear-gradient(180deg, #06101e 0%, #080f1c 100%);
    color: var(--text-primary);
}

/* Grid pattern très discret */
body.theme-night-pro::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(59,130,246,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* ─── Header / Nav ────────────────────────────────────────────────────────── */
body.theme-night-pro header,
body.theme-night-pro .site-header,
body.theme-night-pro nav {
    background: rgba(6,16,30,0.94) !important;
    backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 1px 0 rgba(59,130,246,0.12) !important;
}

body.theme-night-pro .logo-text,
body.theme-night-pro .brand-name {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ─── Cards ───────────────────────────────────────────────────────────────── */
body.theme-night-pro .card,
body.theme-night-pro .panel,
body.theme-night-pro .module,
body.theme-night-pro .glass-card,
body.theme-night-pro [class*="card"] {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px;
    box-shadow: var(--shadow-md) !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body.theme-night-pro .card:hover,
body.theme-night-pro .panel:hover {
    border-color: rgba(59,130,246,0.35) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.7), 0 0 0 1px rgba(59,130,246,0.20) !important;
}

/* ─── Boutons ─────────────────────────────────────────────────────────────── */
body.theme-night-pro .btn-primary,
body.theme-night-pro button.primary,
body.theme-night-pro [class*="btn-primary"] {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
    border: 1px solid rgba(96,165,250,0.3) !important;
    color: #fff !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 12px rgba(37,99,235,0.35) !important;
    transition: all 0.2s;
}

body.theme-night-pro .btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%) !important;
    box-shadow: 0 4px 20px rgba(59,130,246,0.45) !important;
    transform: translateY(-1px);
}

/* Bouton BUY — vert propre */
body.theme-night-pro .btn-buy,
body.theme-night-pro .buy-btn,
body.theme-night-pro [class*="btn-long"] {
    background: linear-gradient(135deg, #059669 0%, #34d399 100%) !important;
    box-shadow: 0 2px 12px rgba(52,211,153,0.25) !important;
}

/* Bouton SELL — rouge discret */
body.theme-night-pro .btn-sell,
body.theme-night-pro .sell-btn,
body.theme-night-pro [class*="btn-short"] {
    background: linear-gradient(135deg, #dc2626 0%, #f87171 100%) !important;
    box-shadow: 0 2px 12px rgba(248,113,113,0.20) !important;
}

/* ─── Tables ──────────────────────────────────────────────────────────────── */
body.theme-night-pro table thead tr {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

body.theme-night-pro table thead th {
    color: var(--text-secondary) !important;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.theme-night-pro table tbody tr:hover {
    background: var(--bg-hover) !important;
}

body.theme-night-pro table tbody tr {
    border-bottom: 1px solid var(--border-light) !important;
}

/* ─── Inputs ──────────────────────────────────────────────────────────────── */
body.theme-night-pro input,
body.theme-night-pro select,
body.theme-night-pro textarea {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body.theme-night-pro input:focus,
body.theme-night-pro select:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15) !important;
    outline: none;
}

/* ─── Sidebar ─────────────────────────────────────────────────────────────── */
body.theme-night-pro .sidebar,
body.theme-night-pro .side-panel {
    background: var(--bg-secondary) !important;
    border-right: 1px solid var(--border-color) !important;
}

body.theme-night-pro .sidebar a.active,
body.theme-night-pro .nav-item.active {
    background: rgba(59,130,246,0.12) !important;
    border-left: 3px solid var(--accent-primary) !important;
    color: var(--accent-hover) !important;
}

/* ─── Stat / Metric boxes ─────────────────────────────────────────────────── */
body.theme-night-pro .stat-box,
body.theme-night-pro .metric-card,
body.theme-night-pro .kpi-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%) !important;
    border: 1px solid var(--border-color) !important;
    border-left: 3px solid var(--accent-primary) !important;
}

body.theme-night-pro .stat-value,
body.theme-night-pro .metric-value,
body.theme-night-pro .kpi-value {
    color: var(--text-primary) !important;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

body.theme-night-pro .stat-label,
body.theme-night-pro .metric-label {
    color: var(--text-secondary) !important;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ─── PnL Colors ──────────────────────────────────────────────────────────── */
body.theme-night-pro .positive,
body.theme-night-pro .profit,
body.theme-night-pro .pnl-positive,
body.theme-night-pro [class*="positive"],
body.theme-night-pro .text-success { color: var(--success) !important; }

body.theme-night-pro .negative,
body.theme-night-pro .loss,
body.theme-night-pro .pnl-negative,
body.theme-night-pro [class*="negative"],
body.theme-night-pro .text-danger  { color: var(--danger) !important; }

/* ─── Badges / Tags ───────────────────────────────────────────────────────── */
body.theme-night-pro .badge,
body.theme-night-pro .tag {
    font-size: 0.70rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 4px;
    padding: 2px 7px;
}

body.theme-night-pro .badge-live    { background: rgba(52,211,153,0.15); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
body.theme-night-pro .badge-paper   { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.25); }
body.theme-night-pro .badge-pro     { background: var(--gold-subtle); color: var(--gold-primary); border: 1px solid var(--border-gold); }

/* ─── Modal / Overlay ─────────────────────────────────────────────────────── */
body.theme-night-pro .modal,
body.theme-night-pro .overlay-panel {
    background: var(--bg-modal) !important;
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--border-color) !important;
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.85), 0 0 0 1px rgba(59,130,246,0.15) !important;
}

/* ─── Gradients d'accroche (hero sections) ────────────────────────────────── */
body.theme-night-pro .hero-section,
body.theme-night-pro .section-hero {
    background: linear-gradient(135deg,
        rgba(6,16,30,1) 0%,
        rgba(10,22,40,1) 50%,
        rgba(6,16,30,1) 100%
    ) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

body.theme-night-pro .hero-title,
body.theme-night-pro h1.gradient-text {
    background: linear-gradient(135deg, #f0f4fa 0%, #60a5fa 50%, #d4a843 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* ─── Section headings ────────────────────────────────────────────────────── */
body.theme-night-pro h2,
body.theme-night-pro h3 {
    color: var(--text-primary) !important;
}

body.theme-night-pro .section-title {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

/* ─── Charts / Candles ────────────────────────────────────────────────────── */
body.theme-night-pro .chart-container {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-light) !important;
}

/* ─── Scrollbar ───────────────────────────────────────────────────────────── */
body.theme-night-pro ::-webkit-scrollbar { width: 6px; height: 6px; }
body.theme-night-pro ::-webkit-scrollbar-track { background: var(--bg-secondary); }
body.theme-night-pro ::-webkit-scrollbar-thumb {
    background: rgba(59,130,246,0.3);
    border-radius: 3px;
}
body.theme-night-pro ::-webkit-scrollbar-thumb:hover {
    background: rgba(59,130,246,0.5);
}

/* ─── Candlestick theme preview ───────────────────────────────────────────── */
.theme-preview-night-pro {
    background: linear-gradient(135deg, #06101e 0%, #0a1628 100%);
    border: 1px solid rgba(59,130,246,0.25);
}
.theme-preview-night-pro .theme-preview-header { background: rgba(10,22,40,0.9); border-bottom: 1px solid rgba(59,130,246,0.2); }
.theme-preview-night-pro .theme-preview-panel  { background: rgba(16,29,51,0.8); border: 1px solid rgba(59,130,246,0.15); }

/* ─── Liquidity Tier Badge (widget intégré) ───────────────────────────────── */
body.theme-night-pro .liquidity-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

body.theme-night-pro .tier-seed     { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
body.theme-night-pro .tier-bronze   { background: rgba(180,83,9,0.15);  color: #fb923c; border: 1px solid rgba(180,83,9,0.3); }
body.theme-night-pro .tier-silver   { background: rgba(148,163,184,0.1); color: #cbd5e1; border: 1px solid rgba(148,163,184,0.3); }
body.theme-night-pro .tier-gold     { background: var(--gold-subtle);    color: var(--gold-primary); border: 1px solid var(--border-gold); }
body.theme-night-pro .tier-platinum { background: rgba(59,130,246,0.12); color: #93c5fd; border: 1px solid rgba(59,130,246,0.35); }
body.theme-night-pro .tier-obelisk  {
    background: linear-gradient(135deg, rgba(37,99,235,0.2) 0%, rgba(212,168,67,0.15) 100%);
    color: var(--gold-primary);
    border: 1px solid var(--border-gold);
    box-shadow: 0 0 12px rgba(212,168,67,0.2);
}
