/* ============================================
   STYLES POUR LA PAGE DE TÉMOIGNAGES
   ============================================ */

/* Structure de base */
.testimonials-list-section {
    margin: 4rem auto;
    max-width: 1200px;
    padding: 0 1.5rem;
}

.testimonials-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Carte de témoignage */
.testimonial-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.testimonial-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.testimonial-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.testimonial-author {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bs-primary);
    margin: 0 0 0.5rem;
}

.testimonial-date {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

.testimonial-content {
    line-height: 1.7;
    color: #444;
    margin-bottom: 1.5rem;
    flex: 1;
}

.testimonial-music {
    margin: 1.5rem 0 0;
    padding-top: 1rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    color: #6c757d;
    font-style: italic;
    display: flex;
    align-items: center;
}

.testimonial-music i {
    margin-right: 0.5rem;
    color: var(--bs-primary);
}

/* Médias des témoignages */
.testimonial-media {
    margin: 1rem 0 0;
    border-radius: 6px;
    overflow: hidden;
    max-width: 100%;
}

.testimonial-media img,
.testimonial-media video {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.testimonial-media img:hover {
    transform: scale(1.02);
}

.testimonial-media video {
    background-color: #f8f9fa;
}

/* Formulaire de témoignage */
.testimonial-form-section {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    margin: 3rem auto;
    max-width: 800px;
}

.testimonial-form-section h2 {
    text-align: center;
    color: var(--bs-primary);
    margin-bottom: 2rem;
    font-weight: 600;
}

#testimonial-form .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

#testimonial-form .form-control {
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s ease;
}

#testimonial-form .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

#testimonial-form textarea {
    min-height: 150px;
    resize: vertical;
}

#testimonial-form input[type="file"] {
    padding: 0.5rem 0;
}

.file-info {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.3rem;
}

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.btn-submit {
    background-color: var(--bs-primary);
    color: white;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-submit:hover {
    background-color: var(--bs-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Styles pour la modale de détail */
.modal-dialog {
    max-width: 800px;
}

.testimonial-detail h4 {
    color: var(--bs-primary);
    font-weight: 600;
}

.testimonial-detail .testimonial-music {
    margin: 0 0 1.5rem;
    padding: 0;
    border: none;
    font-size: 1rem;
}

.testimonial-detail #modalTestimonialMessage {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 2rem;
}

.testimonial-media-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.media-thumbnail {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    aspect-ratio: 1;
}

.media-thumbnail:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.media-thumbnail img,
.media-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-thumbnail .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.media-thumbnail:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-media-container {
    max-width: 90%;
    max-height: 80vh;
    text-align: center;
}

.lightbox-media-container img,
.lightbox-media-container video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 1rem;
    font-size: 1.1rem;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Messages de formulaire */
.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    display: block;
}

.form-message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    display: block;
}

/* États spéciaux */
.loading,
.no-testimonials {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

.loading {
    font-style: italic;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination button {
    background: white;
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.pagination button:not(:disabled):hover {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

.pagination button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pagination .active {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.testimonial-item {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}



/* Ajustements pour les écrans mobiles */
@media (max-width: 768px) {
    .testimonials-list {
        grid-template-columns: 1fr;
    }
    
    .testimonial-form-section {
        padding: 1.5rem;
        margin: 2rem 1rem;
        max-width: 100%;
    }
    
    .testimonial-card {
        margin: 0 0.5rem;
        padding: 1.5rem;
    }
    
    .testimonial-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .testimonial-date {
        align-self: flex-start;
    }
}
