/* ========================================
   COMPOSANT : STREAMERS GRID
   ======================================== 
   
   Extrait de : public/assets/css/index-modern.css
   Date d'extraction : 2026-04-15
   Utilisé par : index.php, potentiellement streamers.php
   Impact : ÉLEVÉ (composant réutilisable)
   
   REFACTORING CSS - Phase 2
   
   Contient :
   - Grille de cartes streamers
   - Cartes streamers (live et offline)
   - Badges de statut
   - Tooltip streamers offline
   - Animations
   ======================================== */

/* Liste des streamers */
.streamers-list {
    margin-bottom: 3rem;
}

.streamers-list h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.streamers-list h3::before {
    content: '🎮';
    font-size: 1.5rem;
}

/* Grille responsive */
.streamers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

/* Cartes streamers ultra-modernes */
.streamer-mini-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid rgba(255, 111, 177, 0.2);
    border-radius: 20px;
    overflow: visible;
    height: 200px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.streamer-mini-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(255, 111, 177, 0.3);
    border-color: var(--primary);
    z-index: 9999;
}

.streamer-mini-card.live {
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(255, 111, 177, 0.4);
}

.streamer-mini-card.live:hover {
    box-shadow: 0 16px 56px rgba(255, 111, 177, 0.5);
}

/* Image de fond avec effet glassmorphism */
.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    filter: blur(2px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    overflow: hidden;
}

.streamer-mini-card:hover .card-bg {
    opacity: 0.8;
    filter: blur(1px);
    transform: scale(1.05);
}

.streamer-mini-card.live .card-bg {
    opacity: 0.9;
    filter: blur(0px);
}

/* Cartes offline : avatars plus visibles (moins de blur, plus d'opacité) */
.streamer-mini-card:not(.live) .card-bg {
    opacity: 0.85;
    filter: blur(0px);
}

.streamer-mini-card:not(.live):hover .card-bg {
    opacity: 0.95;
    filter: blur(0px);
    transform: scale(1.05);
}

/* Contenu de la carte */
.card-content {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.95) 0%, 
        rgba(0, 0, 0, 0.7) 40%, 
        rgba(0, 0, 0, 0.3) 70%, 
        transparent 100%);
}

.card-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Badges modernes */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-badge::before {
    content: '●';
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.offline-badge {
    display: inline-block;
    background: rgba(107, 114, 128, 0.3);
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Tooltip pour streamers hors ligne */
.streamer-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.98), rgba(30, 30, 45, 0.98));
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    padding-top: 15px;
    margin-top: 5px;
    min-width: 280px;
    max-width: 350px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease 0s, visibility 0s linear 0.3s;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    white-space: normal;
}

.streamer-tooltip::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.streamer-mini-card:hover .streamer-tooltip,
.streamer-tooltip:hover {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease 0s, visibility 0s linear 0s;
}

.tooltip-header {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tooltip-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tooltip-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.tooltip-value {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.4;
}

/* Flèche de la tooltip */
.streamer-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: var(--border);
}

/* Informations du stream */
.viewers {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin: 0.25rem 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 1), 0 0 20px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    display: inline-block;
}

.category {
    font-size: 1rem;
    color: white;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 1), 0 0 20px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    display: inline-block;
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .streamers-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .streamer-mini-card {
        height: 180px;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-content h4 {
        font-size: 1rem;
    }
    
    .streamer-tooltip {
        min-width: 240px;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .streamers-grid {
        grid-template-columns: 1fr;
    }
    
    .streamer-mini-card {
        height: 160px;
    }
}
