/**
 * CLIPS PLAYER - Éléments spécifiques au lecteur de clips
 * 
 * Composant pour les contrôles et notifications du lecteur de clips
 * Utilisé sur la page clips.php
 * 
 * CHARGEMENT: Toujours chargé si clips activés
 * DÉPENDANCES: player-controls.css (pour les contrôles de base)
 * 
 * SECTIONS:
 * - Bouton play/pause du timer
 * - Timer de rotation avec état pause
 * - Notification du prochain clip
 * - Bouton actualiser
 * - Message de blocage Twitch (cookies)
 * - Responsive mobile
 */

/* Bouton play/pause du timer */
.timer-play-pause-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 0.75rem;
    transition: all 0.3s ease;
}

.timer-play-pause-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.timer-play-pause-btn:active {
    transform: scale(0.95);
}

.rotation-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Désactiver les animations quand le timer est en pause */
.rotation-timer.paused {
    animation: none !important;
    opacity: 0.8;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.2) !important;
}

.rotation-timer.paused .timer-icon {
    animation: none !important;
    opacity: 0.6;
}

.rotation-timer.paused .timer-countdown {
    opacity: 0.7;
}

/* Notification du prochain clip */
.next-clip-notification {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.85));
    border: 2px solid rgba(165, 107, 255, 0.8);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    max-width: 350px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    animation: slideInFromRight 0.5s ease-out;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

@keyframes slideInFromRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.next-clip-header {
    font-size: 0.9rem;
    color: #A56BFF;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#next-clip-countdown {
    color: #FF6FB1;
    font-size: 1.1rem;
}

.next-clip-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    line-height: 1.3;
}

.next-clip-streamer {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Bouton actualiser */
.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 .refresh-icon {
    font-size: 1.2rem;
}

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

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

/* Message de blocage Twitch */
.twitch-blocked-message {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 480px;
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
}

.blocked-content {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
}

.blocked-content h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.blocked-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.blocked-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-enable-cookies, 
.btn-reload {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-enable-cookies {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.btn-enable-cookies:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

.btn-reload {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-reload:hover {
    background: var(--bg-card);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .blocked-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-enable-cookies, 
    .btn-reload {
        width: 200px;
    }
    
    .next-clip-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 0.75rem 1rem;
    }
    
    .next-clip-title {
        font-size: 0.95rem;
    }
    
    .next-clip-streamer {
        font-size: 0.8rem;
    }
}
