/* LOT 13 — Bandeau push live multi-matchs site-wide.
   Tokens legacy theme-aware (--card/--text/--muted/--accent/--accent-2/--stroke,
   définis par theme-vars sur TOUTES les pages, dark défaut + html.theme-light),
   formule glass maquette (color-mix oklab + backdrop-filter). */

.live-push {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 120;
    width: min(340px, calc(100vw - 28px));
    border-radius: 14px;
    border: 1px solid var(--stroke, rgba(255, 255, 255, .12));
    background: color-mix(in oklab, var(--card, #11192a) 72%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 12px 32px rgba(var(--shadow-rgb, 0, 0, 0), .28);
    color: var(--text, #e9edf3);
    font-family: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
    overflow: hidden;
}

.live-push .tnum {
    font-variant-numeric: tabular-nums;
}

/* ── Pill de titre / toggle ─────────────────────────────── */
.live-push__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.live-push__toggle:hover,
.live-push__toggle:focus-visible {
    background: color-mix(in oklab, var(--accent, #f1b04c) 10%, transparent);
}

.live-push__toggle:focus-visible {
    outline: 2px solid var(--accent, #f1b04c);
    outline-offset: -2px;
}

.live-push__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-2, #4dd2b2);
    box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent-2, #4dd2b2) 55%, transparent);
    animation: livePushPulse 1.8s ease-out infinite;
    flex: none;
}

.live-push.is-idle .live-push__dot {
    animation: none;
    background: var(--muted, #a1afc2);
    box-shadow: none;
}

.live-push__title {
    font-weight: 700;
    font-size: .82rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.live-push__count {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: .72rem;
    padding: 1px 7px;
    border-radius: 999px;
    border: 1px solid color-mix(in oklab, var(--accent, #f1b04c) 45%, transparent);
    color: var(--accent, #f1b04c);
}

.live-push__chevron {
    margin-left: auto;
    color: var(--muted, #a1afc2);
    font-size: .7rem;
    transition: transform .25s ease;
}

.live-push.is-collapsed .live-push__chevron {
    transform: rotate(180deg);
}

.live-push.is-collapsed .live-push__list {
    display: none;
}

/* ── Lignes de matchs ───────────────────────────────────── */
.live-push__list {
    display: flex;
    flex-direction: column;
    max-height: min(46vh, 340px);
    overflow-y: auto;
    border-top: 1px solid var(--stroke, rgba(255, 255, 255, .1));
}

.live-push__row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: inherit;
    border-top: 1px solid color-mix(in oklab, var(--stroke, rgba(255, 255, 255, .1)) 55%, transparent);
}

.live-push__row:first-child {
    border-top: 0;
}

a.live-push__row:hover,
a.live-push__row:focus-visible {
    background: color-mix(in oklab, var(--accent, #f1b04c) 8%, transparent);
}

a.live-push__row:focus-visible {
    outline: 2px solid var(--accent, #f1b04c);
    outline-offset: -2px;
}

.live-push__comp {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: .62rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted, #a1afc2);
    border: 1px solid var(--stroke, rgba(255, 255, 255, .1));
    border-radius: 6px;
    padding: 2px 5px;
    white-space: nowrap;
}

/* HOTFIX live-push-competition-logo — declinaison de `.comp-mark`
   (partials/public-header) : tuile blanche, car les emblemes sont des SVG/PNG
   colores qui ont besoin d'un fond neutre en theme sombre. Dimensions posees en
   dur comme pour l'ecusson d'equipe : le bandeau se peuple apres coup. */
.live-push__comp--logo {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    overflow: hidden;
    width: 24px;
    height: 24px;
    padding: 2px;
    border-radius: 7px;
    border: 1px solid rgba(15, 23, 42, .12);
    background: #ffffff;
}

.live-push__comp--logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.live-push__teams {
    display: flex;
    /* V2-polish : `center` et non `baseline` — l'ecusson n'a pas de ligne de
       base, l'alignement sur celle du texte le decalerait vers le haut. */
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: .82rem;
}

/* V2-polish — ecusson + nom. La troncature passe sur le NOM : elle ne doit
   jamais rogner l'ecusson. */
.live-push__team {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.live-push__teamname {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 9ch;
}

.live-push__crest {
    flex: none;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    object-fit: contain;
}

.live-push__score {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 700;
    font-size: .82rem;
    white-space: nowrap;
}

.live-push__meta {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: .68rem;
    white-space: nowrap;
    color: var(--muted, #a1afc2);
}

.live-push__row.is-live .live-push__meta {
    color: var(--accent-2, #4dd2b2);
    font-weight: 700;
}

.live-push__row.is-live .live-push__score {
    color: var(--accent, #f1b04c);
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .live-push {
        right: 10px;
        left: 10px;
        bottom: 10px;
        width: auto;
    }

    /* La contrainte de largeur suit le nom, pas le conteneur ecusson+nom. */
    .live-push__teamname {
        max-width: 12ch;
    }
}

/* ── Value alert globale (design maquette .fl-value) ────── */
.live-push__value {
    color: var(--accent, #f1b04c);
    margin-right: 4px;
}

.lp-value {
    position: fixed;
    top: 78px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    z-index: 130;
    width: min(380px, calc(100vw - 32px));
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid color-mix(in oklab, var(--accent-2, #4dd2b2) 45%, transparent);
    background: color-mix(in oklab, var(--card, #11192a) 88%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 14px 40px rgba(var(--shadow-rgb, 0, 0, 0), .35);
    color: var(--text, #e9edf3);
    font-family: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
    animation: lpValGlow 2.4s ease-in-out infinite;
}

.lp-value.in {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.lp-value--locked {
    border-color: var(--stroke, rgba(255, 255, 255, .12));
    animation: none;
}

.lp-value__ic {
    flex: none;
    font-size: 1.05rem;
}

.lp-value__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.lp-value__eyebrow {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: .6rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent-2, #4dd2b2);
    display: flex;
    align-items: center;
}

.lp-value__livedot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-2, #4dd2b2);
    display: inline-block;
    margin-right: 5px;
    animation: livePushPulse 1.8s ease-out infinite;
}

.lp-value__title {
    font-weight: 700;
    font-size: .9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lp-value__title b {
    color: var(--accent, #f1b04c);
}

.lp-value__sub {
    font-size: .74rem;
    color: var(--muted, #a1afc2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lp-value__blur {
    filter: blur(5px);
    user-select: none;
}

.lp-value__cta {
    flex: none;
    background: var(--accent, #f1b04c);
    color: var(--on-accent, #0a0c11);
    border-radius: 10px;
    padding: 7px 12px;
    font-weight: 700;
    font-size: .78rem;
    text-decoration: none;
    white-space: nowrap;
}

.lp-value__cta:hover,
.lp-value__cta:focus-visible {
    filter: brightness(1.08);
}

.lp-value__x {
    flex: none;
    background: none;
    border: 0;
    color: var(--muted, #a1afc2);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
}

@keyframes lpValGlow {
    0%, 100% { box-shadow: 0 14px 40px rgba(var(--shadow-rgb, 0, 0, 0), .35); }
    50% { box-shadow: 0 14px 46px color-mix(in oklab, var(--accent, #f1b04c) 30%, transparent); }
}

@keyframes livePushPulse {
    0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent-2, #4dd2b2) 55%, transparent); }
    70% { box-shadow: 0 0 0 8px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
    .live-push__dot { animation: none; }
    .live-push__chevron { transition: none; }
    .lp-value { animation: none; transition: none; }
    .lp-value__livedot { animation: none; }
}
