/* ===========================================
   YouPTV — Live Sports Page
=========================================== */

/* Animation point rouge clignotant (utilisé dans le menu nav) */
@keyframes pulseLive {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6); }
    50%      { opacity: 0.6; box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}

.live-hero {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 50%, #7f1d1d 100%);
    color: #fff;
    padding: 70px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.live-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 30%, rgba(255,255,255,0.08), transparent 50%);
}
.live-hero .container { position: relative; z-index: 1; }
.live-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin: 0 0 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.live-hero p {
    font-size: 1.15rem;
    opacity: 0.95;
    margin: 0 0 24px;
}
.live-counter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 12px 22px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    font-size: 1.05rem;
    font-weight: 500;
}
.live-counter strong { font-size: 1.4rem; font-weight: 700; }
.live-counter .dot {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    animation: pulse-dot 1.4s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.8); }
}

/* Section content */
.live-section {
    padding: 50px 0 80px;
    background: linear-gradient(180deg, #0a0a14 0%, #0f0f1f 100%);
    min-height: 70vh;
    color: #f5f5f5;
}

.live-day {
    font-size: 1.5rem;
    margin: 40px 0 22px;
    color: #fff;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(220, 38, 38, 0.4);
    text-transform: capitalize;
}
.live-day:first-of-type { margin-top: 0; }

/* Grid */
.live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 18px;
}

/* Card */
.live-card {
    background: linear-gradient(180deg, #1a1a2e 0%, #16162a 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 20px 22px;
    position: relative;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.live-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    border-color: rgba(220, 38, 38, 0.3);
}
.live-card.is-live {
    border-color: rgba(220, 38, 38, 0.5);
    background: linear-gradient(180deg, #1f1923 0%, #2a1820 100%);
}
.live-card.is-featured {
    border-color: rgba(245, 158, 11, 0.45);
    background: linear-gradient(180deg, #221d12 0%, #1d1810 100%);
}

.live-card-feat {
    position: absolute;
    top: -10px;
    right: 14px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.live-card-status {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.live-card-status-live {
    background: #dc2626;
    color: #fff;
    animation: blink-live 1.5s ease-in-out infinite;
}
.live-card-status-up    { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.live-card-status-past  { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }

@keyframes blink-live {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}

.live-card-league {
    font-size: 0.78rem;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    opacity: 0.85;
}

/* Équipes affichées HORIZONTALEMENT */
.live-card-teams {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    padding: 12px 0;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}
.live-card-teams .team-home,
.live-card-teams .team-away {
    flex: 1;
    text-align: center;
    line-height: 1.25;
    word-break: break-word;
    min-width: 0;
}
.live-card-teams .team-home { text-align: right; }
.live-card-teams .team-away { text-align: left; }
.live-card-teams .vs {
    color: #dc2626;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 999px;
    padding: 3px 9px;
    flex-shrink: 0;
}

.live-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.82rem;
    color: #94a3b8;
    flex-wrap: wrap;
    align-items: center;
}
.live-card-time { font-weight: 600; }
.live-card-channel {
    color: #cbd5e1;
    font-size: 0.82rem;
    padding: 6px 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.05);
}
.live-card-lang {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 9px;
    background: rgba(15, 118, 110, 0.15);
    color: #5eead4;
    border: 1px solid rgba(15, 118, 110, 0.3);
    border-radius: 999px;
}

/* ============================================
   PROMO IPTV BANNER
============================================ */
.live-promo {
    background: linear-gradient(180deg, #0a0a14 0%, #0f0f1f 100%);
    padding: 0 0 30px;
}
.live-promo-card {
    background:
        radial-gradient(circle at 90% 20%, rgba(245, 158, 11, 0.18), transparent 50%),
        radial-gradient(circle at 10% 80%, rgba(220, 38, 38, 0.15), transparent 50%),
        linear-gradient(135deg, #1a1a2e 0%, #16162a 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 20px;
    padding: 38px 42px;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
    align-items: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}
.live-promo-content { min-width: 0; }
.live-promo-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}
.live-promo-content h2 {
    color: #fff;
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    margin: 0 0 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.live-promo-content h2 strong {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.live-promo-content p {
    color: #cbd5e1;
    font-size: 1rem;
    margin: 0 0 20px;
    line-height: 1.5;
}
.live-promo-content p strong { color: #fff; }
.live-promo-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 22px;
    color: #d1d5db;
    font-size: 0.9rem;
    font-weight: 500;
}
.live-promo-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.live-promo-btn {
    padding: 14px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.live-promo-btn-primary {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.35);
}
.live-promo-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.5);
}
.live-promo-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}
.live-promo-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.live-promo-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.live-promo-stat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px 14px;
    text-align: center;
    backdrop-filter: blur(8px);
}
.live-promo-stat strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}
.live-promo-stat span {
    color: #94a3b8;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

@media (max-width: 900px) {
    .live-promo-card { grid-template-columns: 1fr; padding: 28px 22px; }
    .live-promo-visual { grid-template-columns: repeat(4, 1fr); }
    .live-promo-stat strong { font-size: 1.4rem; }
}
@media (max-width: 560px) {
    .live-promo-visual { grid-template-columns: 1fr 1fr; }
}

.live-card-watch {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    border: 0;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
    transition: 0.2s;
    margin-top: 4px;
}
.live-card-watch:hover:not(:disabled) {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
}
.live-card-watch.is-disabled,
.live-card-watch:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: #6b7280;
    cursor: not-allowed;
}

/* Empty state */
.live-empty {
    text-align: center;
    padding: 80px 20px;
    color: #cbd5e1;
}
.live-empty h2 { font-size: 1.8rem; margin: 0 0 12px; color: #fff; }
.live-empty p  { font-size: 1.05rem; opacity: 0.7; }

/* ===========================================
   Modal Player
=========================================== */
.live-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(8px);
}
.live-modal[hidden] { display: none; }

.live-modal-card {
    background: #0a0a14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.live-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(135deg, #1a1a2e, #16162a);
}
.live-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
}
.live-modal-header small {
    color: #94a3b8;
    font-size: 0.82rem;
}
.live-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: 0.15s;
}
.live-modal-close:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.5);
}

.live-player-wrap {
    position: relative;
    background: #000;
    aspect-ratio: 16 / 9;
}
.live-player-wrap video {
    width: 100%;
    height: 100%;
    display: block;
}

.live-player-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
}
.live-player-loading[hidden] { display: none; }
.live-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.live-player-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    color: #fca5a5;
    background: rgba(0, 0, 0, 0.85);
    font-size: 1rem;
}
.live-player-error[hidden] { display: none; }
.live-modal[hidden] { display: none; }

/* Responsive */
@media (max-width: 600px) {
    .live-hero { padding: 50px 0 40px; }
    .live-grid { grid-template-columns: 1fr; gap: 14px; }
    .live-card { padding: 16px 18px; }
    .live-day { font-size: 1.25rem; margin: 28px 0 16px; }
    .live-modal { padding: 0; align-items: stretch; }
    .live-modal-card { max-width: 100%; height: 100vh; border-radius: 0; display: flex; flex-direction: column; }
    .live-player-wrap { flex: 1; aspect-ratio: auto; }
}
