/* ===== STYLES POUR BOUTONS AUDIO ===== */
/* À ajouter à la fin de votre fichier style.css */

/* Bouton audio de base */
.btn-audio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--accent) 0%, #E5C68D 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(201, 166, 97, 0.3);
    margin-top: 0.5rem;
}

.btn-audio:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(201, 166, 97, 0.4);
}

.btn-audio:active {
    transform: translateY(-1px);
}

.btn-audio:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Icône audio */
.audio-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

/* Texte audio */
.audio-text {
    font-weight: 600;
}

/* État : En cours de lecture */
.btn-audio.playing {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    animation: pulse-audio 2s infinite;
}

@keyframes pulse-audio {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.6);
    }
}

/* État : En pause */
.btn-audio.paused {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

/* État : Chargement */
.btn-audio.loading {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
    cursor: wait;
}

.btn-audio.loading .audio-icon {
    animation: rotate-loading 1s linear infinite;
}

@keyframes rotate-loading {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Header des cartes de contenu - ajustement pour inclure le bouton audio */
.content-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E3DB;
}

/* Responsive pour les boutons audio */
@media (max-width: 768px) {
    .btn-audio {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }
    
    .content-card-actions {
        flex-direction: column;
    }
}

/* ===== PLAYER AUDIO GLOBAL (OPTIONNEL - pour version avancée) ===== */
.global-audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 1rem 2rem;
    box-shadow: 0 -4px 20px rgba(45, 95, 79, 0.2);
    z-index: 999;
    display: none;
    align-items: center;
    gap: 1.5rem;
    animation: slideUpPlayer 0.4s ease-out;
}

@keyframes slideUpPlayer {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.global-audio-player.active {
    display: flex;
}

.player-info {
    flex: 1;
    color: white;
}

.player-verse-ref {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.player-verse-text {
    font-family: 'Amiri', serif;
    font-size: 1.2rem;
    direction: rtl;
}

.player-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.player-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}

.player-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.player-btn.primary {
    background: white;
    color: var(--primary);
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
}

.player-btn.primary:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.4);
}

.player-progress {
    flex: 1;
    max-width: 300px;
}

.progress-bar-audio {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.progress-fill-audio {
    height: 100%;
    background: white;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.player-time {
    color: white;
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 0.25rem;
    display: flex;
    justify-content: space-between;
}

/* Responsive pour player global */
@media (max-width: 768px) {
    .global-audio-player {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .player-info {
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .player-controls {
        width: 100%;
        justify-content: center;
    }
    
    .player-progress {
        width: 100%;
        max-width: none;
    }
}

/* Animation d'onde sonore (effet cool pour indiquer la lecture) */
.sound-wave {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    margin-left: 0.5rem;
}

.sound-wave span {
    display: block;
    width: 3px;
    height: 12px;
    background: white;
    border-radius: 2px;
    animation: sound-wave-animation 1s ease-in-out infinite;
}

.sound-wave span:nth-child(1) {
    animation-delay: 0s;
}

.sound-wave span:nth-child(2) {
    animation-delay: 0.2s;
}

.sound-wave span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes sound-wave-animation {
    0%, 100% {
        height: 12px;
    }
    50% {
        height: 20px;
    }
}