/* =========================================
   SLEEPWALKER LIVE
   Bandeau Telegram défilant — intégré au dock
   (.sw-dock, défini dans menu.css) : le verre,
   la bordure et le sticky viennent du dock.
========================================= */

/* Bandeau : languette collée au bord haut du menu, même apparence que lui
   (verre, bordure, rayon, ombre et survol viennent des variables --dock-* de menu.css) */
.sw-live {
    position: relative;
    z-index: 1;                 /* sous le menu (z-index 2) : la languette sort de derrière */
    display: flex;
    align-items: center;

    /* width:0 + min-width:% => le ticker ne pèse pas dans la largeur de la pile,
       c'est le menu qui la dicte ; le ticker en occupe 62 % */
    width: 0;
    min-width: 40%;
    height: 38px;               /* 30px visibles + 8px cachés sous le menu */
    padding-bottom: 8px;        /* garde le texte centré dans la partie visible */
    margin: 0 auto -8px;        /* -8px : glisse sous le menu */

    overflow: hidden;
    color: #fff;
    font-family: 'DM Mono', ui-monospace, monospace;

    background: var(--dock-glass);
    border: 1px solid var(--nav-border);
    border-bottom: 0;           /* la partie basse est de toute façon sous le menu */
    border-radius: var(--dock-radius) var(--dock-radius) 0 0;
    box-shadow: var(--nav-shadow);

    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    backdrop-filter: blur(18px) saturate(1.5);

    transition:
        border-color .5s var(--nav-ease),
        box-shadow .5s var(--nav-ease);
}

/* fondus aux deux extrémités du défilement */
.sw-live::before,
.sw-live::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 36px;
    z-index: 1;
    pointer-events: none;
}
.sw-live::before { left: 0;  background: linear-gradient(90deg, rgba(34, 34, 36, .85), transparent); }
.sw-live::after  { right: 0; background: linear-gradient(270deg, rgba(24, 24, 26, .85), transparent); }

/* Rail animé */
.sw-live__track {
    display: flex;
    align-items: center;
    width: max-content;
    flex-shrink: 0;

    animation: sw-live-scroll var(--sw-duration, 35s) linear infinite;
    will-change: transform;
}

.sw-live:hover .sw-live__track {
    animation-play-state: paused;
}

/* Groupes de messages */
.sw-live__group {
    display: flex;
    align-items: center;
    gap: 30px;
    padding-right: 30px;
    width: max-content;
    white-space: nowrap;
}

/* Badge LIVE */
.sw-live__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 2px 9px;
    border-radius: 1px;

    color: #fff;
    background: rgba(0, 200, 255, 0.13);
    border: 1px solid rgba(0, 200, 255, 0.4);

    font-size: 9px;
    font-weight: 400;
    letter-spacing: .28em;

    text-shadow: 0 0 8px rgba(0, 200, 255, 0.7);
}

.sw-live__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;

    background: #00e5a0;
    box-shadow: 0 0 9px #00e5a0;

    animation: sw-live-pulse 1.5s infinite;
}

/* Messages */
.sw-live__message {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    font-size: 11px;
    font-weight: 300;
    letter-spacing: .03em;
    color: rgba(255, 255, 255, 0.92);

    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
}

.sw-live__name {
    color: #00cfff;
    font-weight: 400;
    letter-spacing: .1em;
    text-transform: uppercase;

    text-shadow: 0 0 9px rgba(0, 207, 255, 0.35);
}

.sw-live__separator {
    color: #f9429e;
    opacity: 0.8;
}

.sw-live__waiting {
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
}

/* Animations */
@keyframes sw-live-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@keyframes sw-live-pulse {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.8); }
}

/* Mobile : le dock ne contient que le ticker, il prend toute sa largeur */
@media (max-width: 900px) {
    .sw-live {
        min-width: 100%;
        height: 40px;
        padding-bottom: 0;
        margin-bottom: 0;
        border-bottom: 1px solid var(--nav-border);
        border-radius: var(--dock-radius);
    }

    .sw-live__group { gap: 20px; }
    .sw-live__message { font-size: 11px; }
    .sw-live__badge { font-size: 9px; padding: 3px 8px; }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    .sw-live__track { animation-duration: 120s; }
    .sw-live__dot { animation: none; }
}
