@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700;800&display=swap');

/* Boursonche public UX overlay — garde le thème historique de la home. */
:root {
    --ux-bg: #05070a;
    --ux-panel: #0a0f14;
    --ux-green: #00ff88;
    --ux-red: #ff3131;
    --ux-blue: #38bdf8;
    --ux-yellow: #facc15;
}

body {
    font-family: 'JetBrains Mono', monospace !important;
}

/* Le CRT reste visible ; on réduit juste légèrement son agressivité. */
.scanlines,
body::before {
    opacity: 0.70 !important;
}

/* Uniformise les pages publiques sur les panneaux de la home/stats. */
.cyber-panel {
    background: rgba(10, 15, 20, 0.9) !important;
    border: 1px solid rgba(0, 255, 136, 0.22) !important;
    box-shadow: inset 0 0 20px rgba(0, 255, 136, 0.045), 0 0 15px rgba(0, 0, 0, 0.55) !important;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    border-radius: 0 !important;
}

.ux-mood-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(0, 255, 136, 0.35);
    background: rgba(0, 255, 136, 0.07);
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    white-space: nowrap;
}
.ux-mood-badge[data-mood="BULL"] { border-color: rgba(0,255,136,.7); color: var(--ux-green); box-shadow: 0 0 12px rgba(0,255,136,.12); }
.ux-mood-badge[data-mood="BEAR"] { border-color: rgba(255,49,49,.7); color: var(--ux-red); background: rgba(255,49,49,.07); box-shadow: 0 0 12px rgba(255,49,49,.12); }
.ux-mood-badge[data-mood="NORMAL"] { border-color: rgba(56,189,248,.45); color: var(--ux-blue); background: rgba(56,189,248,.06); }
.ux-mood-sub { color: #64748b; font-size: 9px; letter-spacing: 0; font-weight: 500; }

.ux-risk-cell { min-width: 150px; }
.ux-risk {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.15;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .02em;
}
.ux-risk small { color: #64748b; font-size: 9px; font-weight: 500; }
.ux-risk-ok { color: #94a3b8; }
.ux-risk-watch { color: var(--ux-yellow); text-shadow: 0 0 8px rgba(250,204,21,.22); }
.ux-risk-danger { color: var(--ux-red); text-shadow: 0 0 8px rgba(255,49,49,.30); }
.ux-risk-hot { color: var(--ux-green); }

.ux-performance-panel { margin-top: 1.5rem; overflow: hidden; }
.ux-performance-title {
    padding: 12px;
    border-bottom: 1px solid rgba(56,189,248,.22);
    background: rgba(56,189,248,.05);
    color: var(--ux-blue);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
}
.ux-performance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0,255,136,.08);
    cursor: pointer;
}
.ux-performance-row:hover { background: rgba(0,255,136,.07); }
.ux-performance-rank { width: 26px; color: #64748b; font-weight: 800; }
.ux-performance-name { flex: 1; font-size: 12px; color: #e2e8f0; font-weight: 800; }
.ux-performance-value { text-align: right; font-size: 12px; color: var(--ux-green); font-weight: 900; }
.ux-performance-value.negative { color: var(--ux-red); }
.ux-performance-window { display:block; color:#64748b; font-size:8px; font-weight:500; margin-top:2px; }

.ux-range-bar {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
    margin-left: auto;
}
.ux-range-btn {
    border: 1px solid rgba(0,255,136,.28);
    color: rgba(0,255,136,.7);
    background: rgba(0,0,0,.35);
    padding: 5px 8px;
    font-family: inherit;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
}
.ux-range-btn:hover,
.ux-range-btn.active {
    color: #000;
    background: var(--ux-green);
    border-color: var(--ux-green);
}

.ux-mobile-nav { display: none; }

@media (max-width: 767px) {
    body { padding-bottom: 84px !important; }
    #main-content { padding: 12px !important; padding-bottom: 105px !important; }
    #main-content header { align-items: flex-start !important; gap: 10px; }
    #main-content header > div:first-child h1 { font-size: 1.35rem !important; }
    #main-content header > div:first-child p { font-size: 9px !important; }
    #searchForm { width: 100%; }
    #searchForm .relative { flex: 1; }
    #searchInput { width: 100% !important; }
    #market-status-container { display: none !important; }
    .ux-mood-badge { width: 100%; justify-content: center; margin-top: 8px; }

    .ux-mobile-nav {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: 34px;
        z-index: 1200;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        border: 1px solid rgba(0,255,136,.42);
        background: rgba(5,7,10,.97);
        box-shadow: 0 0 18px rgba(0,255,136,.12);
        backdrop-filter: blur(10px);
    }
    .ux-mobile-nav a,
    .ux-mobile-nav button {
        min-height: 48px;
        display:flex;
        align-items:center;
        justify-content:center;
        flex-direction:column;
        gap:2px;
        color:#94a3b8;
        text-decoration:none;
        font-family:inherit;
        font-size:9px;
        font-weight:800;
        background:transparent;
        border:0;
        border-right:1px solid rgba(0,255,136,.12);
    }
    .ux-mobile-nav a:last-child,
    .ux-mobile-nav button:last-child { border-right:0; }
    .ux-mobile-nav .ico { font-size:17px; color:var(--ux-green); }

    .ticker-wrap { z-index: 1300 !important; }
    .ux-risk-cell { min-width: 130px; }
    .ux-performance-panel { margin-bottom: 15px; }
    .ux-range-bar { width:100%; margin-top:8px; }
}

@media (min-width: 768px) {
    .ux-public-mobile-only { display:none !important; }
}
