/**
 * 🎠 CAROUSEL DE TÉMOIGNAGES INFINI - APPLE PREMIUM
 * Défilement parfaitement continu sans interruption
 */

/* Section témoignages */
.testimonials-carousel-section {
    padding: 120px 0;
    background: linear-gradient(180deg, #FAFAFA 0%, #F5F5F7 50%, #FFFFFF 100%);
    overflow: hidden;
    position: relative;
}

.testimonials-carousel-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.06) 50%, transparent 100%);
}

/* Container du carousel - LARGEUR COMPLÈTE BORD À BORD */
.testimonials-carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 2rem 0; /* Seulement padding vertical */
    margin: 0; /* Suppression marge */
    /* Mask minimal pour effet fluide sans coupure visible */
    mask: linear-gradient(90deg, transparent 0%, black 0.5%, black 99.5%, transparent 100%);
    -webkit-mask: linear-gradient(90deg, transparent 0%, black 0.5%, black 99.5%, transparent 100%);
}

/* Track qui contient tous les témoignages - BORD À BORD */
.testimonials-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    /* animation: testimonials-scroll-seamless 40s linear infinite; ← NEUTRALISÉ : Le système unifié gère les vitesses */
    padding: 0 0.5rem; /* Padding minimal pour éviter la coupure */
    will-change: transform;
}



@media (min-width: 769px) and (max-width: 1024px) {
    .testimonials-track {
        /* animation-duration: 50s !important; ← NEUTRALISÉ : Le système unifié gère les vitesses */
    }
}

/* Duplication des témoignages pour un défilement vraiment infini */
.testimonials-track::after {
    content: '';
    display: flex;
    gap: 2rem;
    width: max-content;
}

/* Animation de défilement parfaitement infini */
@keyframes testimonials-scroll-seamless {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pause de l'animation au survol avec transition douce et inertie */
.testimonials-carousel-container:hover .testimonials-track {
    animation-play-state: paused;
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.testimonials-carousel-container:not(:hover) .testimonials-track {
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Carte de témoignage */
.testimonial-card {
    flex-shrink: 0;
    width: 350px;
    background: white;
    border-radius: 16px !important;
    padding: 2rem;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-top: 2px solid rgba(212, 175, 55, 0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        rgba(212, 175, 55, 0) 0%,
        rgba(212, 175, 55, 0.4) 25%,
        rgba(212, 175, 55, 0.7) 50%,
        rgba(212, 175, 55, 0.4) 75%,
        rgba(212, 175, 55, 0) 100%
    );
    animation: borderShine 3s linear infinite;
    opacity: 0.8;
    border-radius: 16px 16px 0 0;
}

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

.testimonial-card:hover::before {
    animation: borderShine 2s linear infinite;
    opacity: 1;
}

.testimonial-card:hover {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1);
    border-radius: 16px !important;
    z-index: 10;
}

/* Contenu du témoignage */
.testimonial-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Étoiles */
.testimonial-stars {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #ffc107;
    letter-spacing: 2px;
}

/* Texte du témoignage */
.testimonial-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-style: italic;
    position: relative;
}

.testimonial-text::before {
    content: '"';
    font-size: 3rem;
    color: rgba(170, 123, 76, 0.2);
    position: absolute;
    top: -10px;
    left: -10px;
    font-family: 'Playfair Display', serif;
    line-height: 1;
}

.testimonial-text::after {
    content: '"';
    font-size: 3rem;
    color: rgba(170, 123, 76, 0.2);
    position: absolute;
    bottom: -20px;
    right: -5px;
    font-family: 'Playfair Display', serif;
    line-height: 1;
}

/* Auteur du témoignage */
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        rgba(170, 123, 76, 0.8) 0%, 
        rgba(196, 153, 104, 0.8) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.author-info {
    flex-grow: 1;
}

.author-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.author-location {
    color: #8b5e35;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .testimonials-carousel-section {
        padding: 3rem 0;
    }
    
    .testimonials-carousel-section .section-title {
        font-size: 2rem;
    }
    
    .testimonial-card {
        width: 300px;
        padding: 1.5rem;
    }
    
    .testimonials-track {
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .testimonial-card {
        width: 280px;
        padding: 1.25rem;
    }
    
    .testimonials-carousel-section .section-title {
        font-size: 1.75rem;
    }
    
    .testimonials-carousel-section .section-subtitle {
        font-size: 1rem;
    }
}

/* Animation alternative pour les appareils avec préférence de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    .testimonials-track {
        animation: none;
    }
    
    .testimonials-track:hover {
        animation: none;
    }
}

/* Effet de fondu sur les bords - SUPPRIMÉ pour largeur maximale */
.testimonials-carousel-container::before,
.testimonials-carousel-container::after {
    display: none; /* SUPPRESSION TOTALE des fondus latéraux */
}

.testimonials-carousel-container::before {
    left: 0;
    background: linear-gradient(90deg, 
        rgba(248, 249, 250, 1) 0%, 
        rgba(248, 249, 250, 0) 100%
    );
}

.testimonials-carousel-container::after {
    right: 0;
    background: linear-gradient(270deg, 
        rgba(248, 249, 250, 1) 0%, 
        rgba(248, 249, 250, 0) 100%
    );
}

/* Version sombre du carousel (optionnel) */
@media (prefers-color-scheme: dark) {
    .testimonials-carousel-section {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    }
    
    .testimonial-card {
        background: #2d2d2d;
        border-color: rgba(170, 123, 76, 0.2);
        color: #f8f9fa;
    }
    
    .testimonial-text {
        color: #e9ecef;
    }
    
    .author-name {
        color: #f8f9fa;
    }
    
    .testimonials-carousel-container::before {
        background: linear-gradient(90deg, 
            rgba(26, 26, 26, 1) 0%, 
            rgba(26, 26, 26, 0) 100%
        );
    }
    
    .testimonials-carousel-container::after {
        background: linear-gradient(270deg, 
            rgba(26, 26, 26, 1) 0%, 
            rgba(26, 26, 26, 0) 100%
        );
    }
}
