/* Styles pour le fond sombre du modal */
.testimonial-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.testimonial-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Styles pour la fenêtre modale */
.testimonial-modal {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.testimonial-modal-overlay.active .testimonial-modal {
    transform: translateY(0);
}

/* En-tête du modal */
.testimonial-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
}

.testimonial-modal-title {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.testimonial-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
    line-height: 1;
}

.testimonial-modal-close:hover {
    color: #000;
}

/* Contenu du modal */
.testimonial-modal-content {
    padding: 20px;
}

/* Styles pour le média (image ou vidéo) */
.testimonial-media-container {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8f9fa;
    max-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.testimonial-media-container img,
.testimonial-media-container video {
    max-width: 100%;
    max-height: 400px;
    display: block;
    margin: 0 auto;
}

.testimonial-media-container video {
    width: 100%;
}

/* Styles pour le message */
.testimonial-message {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
    white-space: pre-line;
}

/* Pied de page du modal */
.testimonial-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.testimonial-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.testimonial-music {
    background-color: #e9ecef;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #495057;
}

/* Animation pour le chargement */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.testimonial-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.testimonial-loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Styles responsifs */
@media (max-width: 768px) {
    .testimonial-modal {
        width: 95%;
        max-height: 85vh;
    }
    
    .testimonial-modal-content {
        padding: 15px;
    }
    
    .testimonial-media-container {
        max-height: 300px;
    }
    
    .testimonial-modal-header {
        padding: 10px 15px;
    }
    
    .testimonial-modal-title {
        font-size: 1.2rem;
    }
    
    .testimonial-message {
        font-size: 1rem;
    }
}

/* Animation de transition */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(20px); }
    to { transform: translateY(0); }
}

.testimonial-modal-overlay {
    animation: fadeIn 0.3s ease forwards;
}

.testimonial-modal {
    animation: slideIn 0.3s ease forwards;
}
