/* =========================================
   HEXA ESPORT — streams.css
   ========================================= */

/* ── PAGE ─────────────────────────────────── */
.streams-page {
    padding-top: 110px;
    padding-bottom: 120px;
    min-height: 100vh;
    position: relative;
}

.streams-page::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 50% 20%, rgba(145,70,255,0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.streams-page .container { position: relative; z-index: 1; }

/* ── EN-TÊTE ──────────────────────────────── */
.streams-page-header {
    text-align: center;
    margin-bottom: 40px;
}

/* ── BLOC LECTEUR PRINCIPAL ───────────────── */
.stream-main-block {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
}

/* Barre de sélection en haut du lecteur */
.stream-top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.live-tag {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #ff4444;
    font-weight: 900;
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
}

.dot {
    width: 8px;
    height: 8px;
    background: #ff4444;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff4444;
    animation: pulse 1.5s infinite;
    flex-shrink: 0;
}

/* Boutons de sélection de streamer */
.stream-select-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.stream-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 7px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.25s;
    position: relative;
}

.stream-tab:hover {
    background: rgba(255,255,255,0.08);
    color: white;
    border-color: rgba(255,255,255,0.15);
}

.stream-tab.active {
    background: rgba(145,70,255,0.15);
    border-color: rgba(145,70,255,0.4);
    color: white;
    box-shadow: 0 0 15px rgba(145,70,255,0.15);
}

.stream-tab-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}

.stream-tab.active .stream-tab-avatar {
    border-color: rgba(145,70,255,0.6);
}

/* Point live/offline sur le bouton */
.tab-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tab-live-dot.live    { background: #ff4444; box-shadow: 0 0 6px #ff4444; animation: pulse 1.5s infinite; }
.tab-live-dot.offline { background: rgba(255,255,255,0.2); }

/* Lecteur iframe — plus petit */
.stream-player-full {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background: #000;
}

.stream-player-full iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

/* ── SECTION STREAMERS ────────────────────── */
.streamers-section { margin-top: 0; }

.category-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.category-line { flex: 1; height: 1px; }
.category-line.left  { background: linear-gradient(to right, transparent, var(--glass-border)); }
.category-line.right { background: linear-gradient(to left,  transparent, var(--glass-border)); }

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 24px;
    border-radius: 50px;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 3px;
    white-space: nowrap;
}

.category-badge.stream-badge {
    background: linear-gradient(135deg, rgba(145,70,255,0.12), rgba(100,40,200,0.12));
    border: 1px solid rgba(145,70,255,0.35);
    color: #9146ff;
    box-shadow: 0 0 20px rgba(145,70,255,0.08);
}

.category-badge.officiel-badge {
    background: linear-gradient(135deg, rgba(0,210,255,0.10), rgba(157,80,187,0.10));
    border: 1px solid rgba(0,210,255,0.35);
    color: var(--hexa-blue);
}

.category-badge.academie-badge {
    background: linear-gradient(135deg, rgba(157,80,187,0.10), rgba(100,60,200,0.10));
    border: 1px solid rgba(157,80,187,0.35);
    color: var(--hexa-purple);
}

.category-badge.cdf-badge {
    background: linear-gradient(135deg, rgba(249,201,35,0.10), rgba(255,140,0,0.10));
    border: 1px solid rgba(249,201,35,0.35);
    color: #f9c923;
}

/* Espacement entre sections */
.streamers-section {
    margin-top: 70px;
}

/* ── GRILLE STREAMERS ─────────────────────── */
.streamers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* ── CARTE STREAMER ───────────────────────── */
.streamer-card {
    width: 180px;
    flex-shrink: 0;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 22px 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.streamer-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(135deg, #9146ff, #6535c9);
    opacity: 0;
    transition: var(--transition);
}

.streamer-card:hover {
    transform: translateY(-8px);
    border-color: rgba(145,70,255,0.35);
    box-shadow: 0 20px 50px rgba(145,70,255,0.15);
}

.streamer-card:hover::before { opacity: 1; }

/* Avatar */
.streamer-avatar-wrap {
    position: relative;
    width: 86px;
    height: 86px;
    flex-shrink: 0;
}

.streamer-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid transparent;
    background: linear-gradient(var(--bg-base), var(--bg-base)) padding-box,
                linear-gradient(135deg, #9146ff, #6535c9) border-box;
    transition: var(--transition);
    display: block;
}

.streamer-card:hover .streamer-avatar { transform: scale(1.05); }

/* Badge LIVE */
.streamer-live-badge {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff4444;
    color: white;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 2px 7px;
    border-radius: 4px;
    display: none; /* Caché par défaut, affiché via JS si en live */
}

.streamer-card.is-live .streamer-live-badge { display: block; }

/* Infos */
.streamer-name {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.streamer-platform {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    gap: 5px;
}

.streamer-platform i { color: #9146ff; }

/* Overlay hover "Voir sur Twitch" */
.streamer-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(145,70,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
    opacity: 0;
    transition: var(--transition);
    border-radius: inherit;
}

.streamer-hover-overlay i { color: #9146ff; font-size: 1rem; }
.streamer-card:hover .streamer-hover-overlay { opacity: 1; }

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 768px) {
    .streams-page { padding-top: 90px; }
    .stream-top-bar { gap: 10px; padding: 10px 14px; }
    .stream-tab span:first-of-type { display: none; }
    .stream-tab { padding: 6px; }
    .streamer-card { width: 150px; }
    .streamer-avatar-wrap { width: 70px; height: 70px; }
}

@media (max-width: 480px) {
    .streamer-card { width: 130px; padding: 16px 10px; }
}

/* ── AGRANDISSEMENT GLOBAL POLICE ─────────── */
.streamer-name        { font-size: 1.05rem; }
.streamer-platform    { font-size: 0.82rem; }
.streamer-card        { width: 200px; padding: 26px 18px 20px; }
.streamer-avatar-wrap { width: 100px; height: 100px; }
.stream-tab           { font-size: 0.88rem; padding: 9px 16px 9px 9px; }
.category-badge       { font-size: 1.2rem; padding: 13px 28px; letter-spacing: 3px; }
.section-title        { font-size: clamp(3rem, 5vw, 4.5rem); }
.section-sub          { font-size: 1.1rem; }

/* ── PLACEHOLDER ──────────────────────────── */
.stream-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    gap: 16px;
    color: rgba(255,255,255,0.2);
}
.stream-placeholder i { font-size: 4rem; color: rgba(100,65,165,0.4); }
.stream-placeholder p { font-size: 1rem; letter-spacing: 1px; }

/* ── ONGLETS AVEC STATUT ──────────────────── */
.stream-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    position: relative;
}

.tab-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1;
}

.tab-name { font-size: 0.85rem; font-weight: 700; color: white; }

.tab-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
}

.tab-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255,255,255,0.3);
}

.live-status .tab-status-text { color: #ff4444; }
.offline-status .tab-status-text { color: rgba(255,255,255,0.35); }

.tab-live { border-color: rgba(255,68,68,0.3) !important; }
.tab-live .tab-dot { animation: pulse-red 1.5s infinite; }

.tab-twitch-icon { color: #9147ff; font-size: 0.9rem; margin-left: auto; opacity: 0.6; }
.stream-tab.active .tab-twitch-icon { opacity: 1; color: #9147ff; }

/* ── CARTES STREAMER AVEC STATUT ──────────── */
.streamer-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 4px;
}

.live-pill {
    background: rgba(255,68,68,0.12);
    border: 1px solid rgba(255,68,68,0.3);
    color: #ff6666;
}

.offline-pill {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.3);
}

.status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    flex-shrink: 0;
}

.live-pill .status-dot {
    background: #ff4444;
    animation: pulse-red 1.5s infinite;
}

.streamer-card.is-live {
    border-color: rgba(255,68,68,0.25) !important;
}

.streamer-card.is-live .streamer-live-badge {
    display: block !important;
    background: #ff4444;
    animation: none;
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,68,68,0.5); }
    50%       { box-shadow: 0 0 0 4px rgba(255,68,68,0); }
}