/* ========================================
   COMPOSANT : STREAMERS & CLIPS CAROUSEL
   ======================================== 
   
   Extrait de : public/pages/index.php (styles inline)
   Date d'extraction : 2026-04-15
   Utilisé par : index.php (section streamers et carrousel de clips)
   Impact : MOYEN (chargé quand il y a des streamers)
   
   REFACTORING CSS - Phase 1
   
   Contient :
   - Section streamers (titre, badges)
   - Carrousel de clips
   - Cartes de clips
   - Bouton actualiser le lecteur
   ======================================== */

/* Section streamers */
.streamers-section-index {
    margin-bottom: 3rem;
}

.section-title-index {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

.section-title-index.offline {
    opacity: 0.7;
}

.count-badge-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.6rem;
    background: linear-gradient(135deg, #FF6FB1, #A56BFF);
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
}

/* Carrousel de clips */
.clips-carousel-section {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    position: relative;
    z-index: 1;
}

.carousel-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.title-icon {
    font-size: 1.8rem;
}

.clips-count {
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #FF6FB1, #A56BFF);
    border-radius: 20px;
    color: white;
}

.clips-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-behavior: smooth;
    contain: layout style;
}

.clips-carousel::-webkit-scrollbar {
    height: 8px;
}

.clips-carousel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.clips-carousel::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF6FB1, #A56BFF);
    border-radius: 10px;
}

/* Cartes de clips */
.clip-card {
    flex: 0 0 280px;
    width: 280px;
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.95), rgba(20, 20, 30, 0.95));
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    contain: layout style;
    position: relative;
}

.clip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 111, 177, 0.1), rgba(165, 107, 255, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.clip-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 111, 177, 0.6);
    box-shadow: 0 12px 40px rgba(255, 111, 177, 0.3), 0 0 30px rgba(165, 107, 255, 0.2);
}

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

.clip-card.active {
    border-color: #A56BFF;
    background: linear-gradient(145deg, rgba(165, 107, 255, 0.2), rgba(255, 111, 177, 0.15));
    box-shadow: 0 8px 30px rgba(165, 107, 255, 0.4), 0 0 40px rgba(255, 111, 177, 0.3);
    transform: scale(1.05);
}

.clip-card.active::after {
    content: '▶ EN LECTURE';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(165, 107, 255, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(165, 107, 255, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.9;
    }
}

.clip-card.active .clip-play-overlay {
    opacity: 0.3;
    background: rgba(165, 107, 255, 0.9);
}

.clip-thumbnail {
    position: relative;
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.clip-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    pointer-events: none;
}

.clip-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.9);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.clip-position {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, rgba(255, 111, 177, 0.95), rgba(165, 107, 255, 0.95));
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    z-index: 2;
    box-shadow: 0 2px 10px rgba(255, 111, 177, 0.4);
    letter-spacing: 0.5px;
}

.clip-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 111, 177, 0.95), rgba(165, 107, 255, 0.95));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 4px 20px rgba(255, 111, 177, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.clip-card:hover .clip-play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.clip-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.85) 50%, rgba(0, 0, 0, 0.4) 80%, transparent 100%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* Afficher les infos au survol */
.clip-card:hover .clip-info {
    opacity: 1;
    transform: translateY(0);
}

/* Toujours afficher les infos sur le clip actif */
.clip-card.active .clip-info {
    opacity: 1;
    transform: translateY(0);
}

.clip-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    max-height: 2.6em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    word-break: break-word;
}

.clip-broadcaster {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clip-broadcaster::before {
    content: '👤';
    font-size: 1rem;
    flex-shrink: 0;
}

/* Animation d'entrée pour les cartes */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clip-card {
    animation: slideInUp 0.5s ease-out backwards;
}

.clip-card:nth-child(1) { animation-delay: 0.05s; }
.clip-card:nth-child(2) { animation-delay: 0.1s; }
.clip-card:nth-child(3) { animation-delay: 0.15s; }
.clip-card:nth-child(4) { animation-delay: 0.2s; }
.clip-card:nth-child(5) { animation-delay: 0.25s; }
.clip-card:nth-child(6) { animation-delay: 0.3s; }
.clip-card:nth-child(7) { animation-delay: 0.35s; }
.clip-card:nth-child(8) { animation-delay: 0.4s; }
.clip-card:nth-child(9) { animation-delay: 0.45s; }
.clip-card:nth-child(10) { animation-delay: 0.5s; }

.clip-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Bouton actualiser le lecteur */
.refresh-player-btn {
    width: auto;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #FF6FB1, #A56BFF);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.refresh-player-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 111, 177, 0.4);
}

.refresh-player-btn:active {
    transform: translateY(0);
}

.refresh-player-btn .refresh-icon {
    font-size: 1.2rem;
    animation: rotate-on-hover 0.6s ease;
}

.refresh-player-btn:hover .refresh-icon {
    animation: rotate-continuous 1s linear infinite;
}

@keyframes rotate-continuous {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
