.news-ticker {
    background: var(--color-sky-05080d);
    border-bottom: 1px solid var(--line-soft);
    overflow: hidden;
    white-space: nowrap;
    height: 2rem;
    line-height: 2rem;
}

.news-ticker-track {
    display: inline-flex;
    align-items: center;
    gap: 2.5rem;
    padding: 0 1rem;
    height: 2rem;
    animation: ticker-scroll 90s linear infinite;
}

.news-ticker:hover .news-ticker-track {
    animation-play-state: paused;
}

.news-ticker-item,
.news-ticker-item:link,
.news-ticker-item:visited,
.news-ticker-item:active {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-dim);
    text-decoration: none !important;
    transition: color 0.2s;
    flex-shrink: 0;
}

.news-ticker-item:hover {
    color: var(--color-sky-f4f8fd);
    text-decoration: none !important;
}

.news-ticker-item.is-disabled {
    opacity: 0.55;
    pointer-events: none;
    cursor: default;
}

.news-ticker-sentiment {
    font-size: 0.5rem;
}

.news-ticker-sentiment.bullish {
    color: var(--positive);
}

.news-ticker-sentiment.bearish {
    color: var(--negative);
}

.news-ticker-sentiment.neutral {
    color: var(--text-dim);
}

.news-ticker-source {
    color: rgba(var(--brand-rgb), 0.85);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.65rem;
    font-weight: 600;
}

.news-ticker-title {
    color: var(--color-sky-dce4f0);
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-ticker-time {
    color: var(--text-dim);
    font-size: 0.6rem;
    opacity: 0.7;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    border-bottom: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--color-sky-090f16-a96), var(--color-sky-070b11-a93));
    backdrop-filter: blur(10px);
}

.topbar-gradient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(var(--brand-rgb), 0.18) 0%, rgba(var(--brand-rgb), 0.03) 42%, var(--color-white-ffffff-a02) 100%);
    opacity: 0.55;
}

.header-inner {
    width: min(1320px, calc(100% - 2.5rem));
    margin: 0 auto;
    position: relative;
}

.header-inner {
    padding: 0.95rem 0 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
}

.brand-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-wordmark {
    width: 240px;
    height: auto;
}

.tagline {
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    font-weight: 500;
}

.tagline-link {
    color: var(--accent);
    text-decoration: none;
    opacity: 0.8;
}
.tagline-link:hover {
    opacity: 1;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 0.32rem;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.topbar-nav::-webkit-scrollbar {
    display: none;
}

.topbar-link {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.34rem 0.62rem;
    min-height: 1.9rem;
    color: var(--text-dim);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.67rem;
    font-weight: 700;
    white-space: nowrap;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.topbar-link:hover {
    color: var(--color-sky-e7eff8);
    border-color: rgba(var(--brand-rgb), 0.46);
    background: rgba(var(--brand-rgb), 0.13);
}

.topbar-link.active {
    color: var(--color-sky-eaf4ff);
    border-color: rgba(var(--brand-rgb), 0.62);
    background: rgba(var(--brand-rgb), 0.2);
}

/* Zulip realm nav links — subtle accent to distinguish from regular nav */
.topbar-link--zulip {
    opacity: 0.75;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}
.topbar-link--zulip::before {
    content: "⬡ ";
    font-size: 0.6rem;
    vertical-align: middle;
    opacity: 0.6;
}
.topbar-link--zulip:hover {
    opacity: 1;
}
.topbar-link--wip {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: none;
    position: relative;
}
/* Masquer le ⬡ pour les boutons WIP */
.topbar-link--wip::before {
    content: none;
}
/* Tooltip WIP */
.topbar-link--wip::after {
    content: "Coming soon";
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1f2e;
    color: #8899aa;
    font-size: 0.65rem;
    white-space: nowrap;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(107,184,227,0.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 10;
}
.topbar-link--wip:hover {
    opacity: 0.5;
}
.topbar-link--wip:hover::after {
    opacity: 1;
}

.header-meta {
    text-align: right;
    display: grid;
    gap: 0.32rem;
}

.header-meta:empty {
    display: none;
}

.header-updated {
    font-size: 0.79rem;
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 0.42rem;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.3rem 0.5rem;
    color: var(--text);
    transition: border-color 0.2s;
    font-style: normal;
}
/* Icône pilotée par CSS — évite le flash JS au chargement */
.theme-toggle::before { content: "🌙"; }
[data-theme="light"] .theme-toggle::before { content: "☀️"; }

.theme-toggle:hover {
    border-color: var(--brand);
}

[data-theme="light"] .topbar {
    background: rgba(240, 242, 245, 0.97);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .topbar-gradient {
    opacity: 0.1;
}

[data-theme="light"] .topbar-link {
    color: #333333;
}

[data-theme="light"] .topbar-link:hover,
[data-theme="light"] .topbar-link.active {
    color: #17858A;
    background: rgba(23, 133, 138, 0.1);
}

.refresh-indicator {
    opacity: 0;
    transform: translateY(-1px);
    color: rgba(var(--brand-rgb), 0.92);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.refresh-indicator.visible {
    opacity: 1;
    transform: translateY(0);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0.45);
    animation: pulse 2.2s ease-out infinite;
}

.exchange-status-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.34rem;
    margin-top: 0.15rem;
}

.exchange-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.exchange-dot.open {
    background: var(--positive);
    box-shadow: 0 0 0 3px var(--color-green-34c759-a15);
}

.exchange-dot.closed {
    background: var(--color-slate-72818f);
}

