/* ==========================================================================
   StageFeed — bandeau d'actualité + journal, communs à tous les jeux
   --------------------------------------------------------------------------
   Couche posée au-dessus du plateau. Le bandeau occupe le haut du tapis (là où
   le joueur regarde), le journal s'ouvre par le bouton 📜 en haut à droite.
   Rien ici n'impose de hauteur : la couche est en position absolue, donc les
   grilles de plateau existantes ne bougent pas.
   ========================================================================== */

.sf-layer {
    position: absolute;
    inset: 0;
    z-index: 40;
    pointer-events: none;
    font-family: inherit;
}

/* ------------------------------------------------------------------ bandeau */
.sf-banner {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.3;
    color: #f4f6fa;
    background: rgba(10, 16, 26, .92);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
    overflow: hidden;
    max-height: 64px;
}

.sf-banner.is-in {
    opacity: 1;
    transform: translateY(0);
}

.sf-banner.is-good {
    border-color: rgba(70, 167, 88, .65);
    background: rgba(12, 32, 20, .94);
}

.sf-banner.is-warn {
    border-color: rgba(229, 72, 77, .60);
    background: rgba(34, 12, 14, .94);
}

.sf-banner-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sf-banner-text b,
.sf-banner .sf-pts {
    color: #ffd166;
    font-weight: 800;
}

.sf-banner .sf-card {
    display: inline-flex;
    vertical-align: middle;
    margin: 0 2px;
}

.sf-banner .sf-card .pap-card,
.sf-banner .sf-card > * {
    width: 18px;
    height: 30px;
    border-radius: 3px;
    box-shadow: none;
}

/* ------------------------------------------------------------- bouton journal */
.sf-toggle {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    color: #f4f6fa;
    background: rgba(12, 18, 28, .92);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 9px;
    cursor: pointer;
    pointer-events: auto;
    z-index: 2;
}

.sf-toggle:active { transform: scale(.94); }

.sf-toggle.is-open {
    border-color: rgba(255, 209, 102, .70);
}

.sf-toggle .sf-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff8a3d;
    opacity: 0;
    transition: opacity .2s;
}

.sf-toggle.has-news .sf-dot { opacity: 1; }

/* ---------------------------------------------------------------- panneau */
.sf-panel {
    position: absolute;
    top: 42px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    display: flex;
    flex-direction: column;
    background: rgba(9, 14, 22, .97);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .55);
    overflow: hidden;
    pointer-events: auto;
    animation: sf-in .18s ease-out both;
}

.sf-panel[hidden] { display: none; }

.sf-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.sf-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #f4f6fa;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.sf-list {
    flex: 1 1 auto;
    margin: 0;
    padding: 6px 8px 10px;
    list-style: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sf-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 7px;
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.35;
    border-radius: 7px;
    background: rgba(255, 255, 255, .04);
}

.sf-item.is-trick_won,
.sf-item.is-round_end {
    background: rgba(255, 209, 102, .10);
}

.sf-item.is-score {
    background: rgba(70, 167, 88, .12);
}

.sf-item .sf-card {
    display: inline-flex;
}

.sf-item .sf-card .pap-card,
.sf-item .sf-card > * {
    width: 17px;
    height: 28px;
    border-radius: 3px;
    box-shadow: none;
}

.sf-item b { font-weight: 700; }

.sf-pts { color: #ffd166; font-weight: 800; }

.sf-empty {
    padding: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .45);
}

@keyframes sf-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .sf-banner, .sf-panel { transition: none; animation: none; }
}
