/* ============================================
   LECTEUR AUDIO CUSTOM - DESIGN COHÉRENT
   Style moderne pour presentation-voxia.wav
   ============================================ */

/* Lecteur audio custom - Container principal */
.audio-player {
    width: 100%;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    margin: 20px 0;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.audio-player:hover {
    border-color: #0066FF;
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.1);
}

/* Contrôles - Layout */
.audio-player__controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Bouton Play/Pause - Style moderne */
.audio-player__play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.audio-player__play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.audio-player__play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

.audio-player__play-btn:hover::before {
    opacity: 1;
}

.audio-player__play-btn:active {
    transform: scale(0.95);
}

/* Icônes Play/Pause */
.play-icon,
.pause-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}

.play-icon {
    padding-left: 3px; /* Centrer visuellement le triangle */
}

/* Timeline - Container */
.audio-player__timeline {
    flex: 1;
    position: relative;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.audio-player__timeline:hover {
    height: 10px;
}

/* Barre de progression */
.audio-player__progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #0066FF 0%, #0052CC 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease;
    pointer-events: none;
    position: relative;
    overflow: hidden;
}

/* Effet de brillance sur la barre de progression */
.audio-player__progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.3) 50%, 
        transparent 100%
    );
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Slider invisible pour interaction */
.audio-player__slider {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 20px; /* Zone cliquable plus grande */
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    margin: 0;
}

/* Thumb du slider - visible au hover */
.audio-player__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 3px solid #0066FF;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.4);
    transition: all 0.2s ease;
}

.audio-player__slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 3px solid #0066FF;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.4);
    transition: all 0.2s ease;
}

.audio-player__slider:hover::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    border-width: 4px;
}

.audio-player__slider:hover::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-width: 4px;
}

/* Affichage du temps */
.audio-player__time {
    font-size: 15px;
    color: #374151;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums; /* Chiffres alignés */
    letter-spacing: 0.5px;
}

#current-time {
    color: #0066FF;
}

#duration {
    color: #6b7280;
}

/* Dossier preview - Style cohérent */
.dossier-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    margin: 20px 0;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.dossier-preview:hover {
    border-color: #0066FF;
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.1);
    transform: translateY(-2px);
}

.dossier-preview__icon {
    font-size: 48px;
    flex-shrink: 0;
}

.dossier-preview__info {
    flex: 1;
}

.dossier-preview__title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.dossier-preview__format {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* Bouton card media */
.card-media__button {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.card-media__button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-media__button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

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

.card-media__button:active {
    transform: translateY(-1px);
}

/* État loading (optionnel) */
.audio-player.loading .audio-player__play-btn {
    pointer-events: none;
    opacity: 0.6;
}

.audio-player.loading .audio-player__timeline {
    pointer-events: none;
}

/* État error (optionnel) */
.audio-player.error {
    border-color: #ef4444;
}

.audio-player.error .audio-player__play-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */

@media (max-width: 768px) {
    .audio-player {
        padding: 20px;
    }
    
    .audio-player__controls {
        gap: 16px;
    }
    
    .audio-player__play-btn {
        width: 52px;
        height: 52px;
        font-size: 18px;
    }
    
    .audio-player__time {
        font-size: 14px;
    }
    
    .dossier-preview {
        padding: 16px;
        gap: 12px;
    }
    
    .dossier-preview__icon {
        font-size: 40px;
    }
    
    .dossier-preview__title {
        font-size: 15px;
    }
    
    .dossier-preview__format {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .audio-player {
        padding: 16px;
    }
    
    .audio-player__controls {
        gap: 12px;
    }
    
    .audio-player__play-btn {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }
    
    .audio-player__time {
        font-size: 13px;
    }
    
    .dossier-preview {
        padding: 14px;
    }
    
    .dossier-preview__icon {
        font-size: 36px;
    }
}

/* ============================================
   ANIMATIONS SUPPLÉMENTAIRES
   ============================================ */

/* Pulse sur le bouton play quand en pause */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 102, 255, 0.5);
    }
}

.audio-player__play-btn:not(:hover) {
    animation: pulse 2s ease-in-out infinite;
}

/* Arrêter l'animation quand on joue */
audio:not([paused]) ~ .audio-player__controls .audio-player__play-btn {
    animation: none;
}
