/* Testimonials Section Styles */

/* ==============================================
   TESTIMONIALS SECTION - Version Vidéo
   ============================================== */

/* Section principale */
.testimonials-section {
    position: relative;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%) !important;
    color: white !important;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 25% 25%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 75%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.dark .testimonials-section {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
}

/* Conteneur principal */
.testimonials-header {
    position: relative;
    z-index: 2;
    color: white;
}

.testimonials-header h2 {
    color: white;
}

.testimonials-header p {
    color: #94a3b8;
}

/* Cartes vidéo témoignages */
.video-testimonial-card {
    background: rgba(31, 41, 55, 0.8);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(75, 85, 99, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(20px);
    color: white;
}

.video-testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
}

.dark .video-testimonial-card {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dark .video-testimonial-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

/* Conteneur vidéo */
.video-container {
    position: relative;
    width: 100%;
    height: 220px;
    background: #000;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    cursor: pointer;
}

.video-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-container:hover img {
    transform: scale(1.05);
}

/* Bouton play */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.play-button i {
    color: #8b5cf6;
    margin-left: 2px;
}

/* Durée et badges */
.video-container .absolute {
    z-index: 10;
}

/* Contenu de la carte */
.testimonial-content {
    padding: 24px;
}

/* Profil utilisateur */
.testimonial-content .flex.items-center.mb-4 img {
    border: 2px solid #e5e7eb;
    transition: border-color 0.3s ease;
}

.dark .testimonial-content .flex.items-center.mb-4 img {
    border-color: #4b5563;
}

.video-testimonial-card:hover .testimonial-content .flex.items-center.mb-4 img {
    border-color: #8b5cf6;
}

/* Citation */
blockquote {
    position: relative;
    font-style: italic;
    color: #d1d5db;
    line-height: 1.6;
}

.dark blockquote {
    color: #d1d5db;
}

blockquote::before {
    content: '"';
    position: absolute;
    left: -12px;
    top: -8px;
    font-size: 24px;
    font-weight: bold;
    color: #8b5cf6;
    opacity: 0.3;
}

/* Badges de catégorie */
.inline-flex.items-center.px-2\.5.py-0\.5 {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Étoiles */
.flex i[data-lucide="star"] {
    color: #fbbf24;
}

/* Boutons de filtre */
.testimonial-filters {
    margin-bottom: 48px;
    position: relative;
    z-index: 2;
}

.filter-btn {
    background: rgba(75, 85, 99, 0.3);
    color: #d1d5db;
    border: 1px solid rgba(75, 85, 99, 0.5);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: rgba(75, 85, 99, 0.5);
    color: #f9fafb;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-color: #8b5cf6;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.dark .filter-btn {
    background: rgba(75, 85, 99, 0.3);
    color: #d1d5db;
    border-color: rgba(75, 85, 99, 0.5);
}

.dark .filter-btn:hover {
    background: rgba(75, 85, 99, 0.5);
    color: #f9fafb;
}

.dark .filter-btn.active {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-color: #8b5cf6;
}

/* Modal vidéo */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.video-modal.show {
    opacity: 1;
    visibility: visible;
}

.video-modal .relative {
    animation: modalSlideIn 0.5s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.video-modal iframe {
    width: 100%;
    height: 600px;
    border-radius: 12px;
}

/* CTA Section */
.text-center.mt-16 .bg-white {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .text-center.mt-16 .bg-white {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(17, 24, 39, 0.9));
    border-color: rgba(55, 65, 81, 0.3);
}

/* Grille responsive */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

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

.video-testimonial-card {
    animation: fadeInUp 0.8s ease-out forwards;
}

.video-testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.video-testimonial-card:nth-child(2) { animation-delay: 0.2s; }
.video-testimonial-card:nth-child(3) { animation-delay: 0.3s; }
.video-testimonial-card:nth-child(4) { animation-delay: 0.4s; }
.video-testimonial-card:nth-child(5) { animation-delay: 0.5s; }
.video-testimonial-card:nth-child(6) { animation-delay: 0.6s; }

/* Statistiques */
.text-3xl.font-bold.text-violet-600 {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive Design */
@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .video-container {
        height: 200px;
    }
    
    .testimonial-content {
        padding: 20px;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .testimonial-filters {
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 32px;
    }
    
    .video-modal iframe {
        height: 300px;
        margin: 20px;
    }
    
    .play-button {
        width: 56px;
        height: 56px;
    }
    
    .video-testimonial-card:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .video-container {
        height: 180px;
        border-radius: 12px 12px 0 0;
    }
    
    .testimonial-content {
        padding: 16px;
    }
    
    .play-button {
        width: 48px;
        height: 48px;
    }
    
    .video-modal iframe {
        height: 250px;
        margin: 16px;
    }
    
    .testimonials-grid {
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1440px) {
    .testimonials-grid {
        gap: 40px;
    }
    
    .video-container {
        height: 240px;
    }
}

/* Effet de focus pour l'accessibilité */
.video-testimonial-card:focus-within {
    outline: 2px solid #8b5cf6;
    outline-offset: 4px;
}

.filter-btn:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* États de chargement */
.video-testimonial-card.loading {
    opacity: 0.5;
    pointer-events: none;
}

.video-testimonial-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Améliorations dark mode */
.dark .video-modal {
    background: rgba(0, 0, 0, 0.95);
}

.dark blockquote::before {
    color: #a78bfa;
}

/* Effets de particules subtils */
.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.dark .testimonials-section::before {
    background: 
        radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
}

/* Testimonial cards */
.testimonial-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.02) 0%, rgba(99, 102, 241, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
}

.dark .testimonial-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    border-color: rgba(167, 139, 250, 0.3);
}

/* Avatar styles */
.testimonial-avatar {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.testimonial-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimonial-card:hover .testimonial-avatar::before {
    opacity: 1;
}

.testimonial-card:hover .testimonial-avatar {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.3);
}

/* Quote styles */
.testimonial-quote {
    position: relative;
    padding-left: 1rem;
}

.testimonial-quote::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -0.5rem;
    font-size: 3rem;
    font-weight: bold;
    color: rgba(139, 92, 246, 0.2);
    line-height: 1;
}

.dark .testimonial-quote::before {
    color: rgba(167, 139, 250, 0.2);
}

/* Name and role styling */
.testimonial-name {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.testimonial-role {
    color: #6b7280;
    font-weight: 500;
    font-size: 0.875rem;
}

.dark .testimonial-role {
    color: #9ca3af;
}

/* Grid responsiveness */
@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .testimonial-card {
        padding: 1.25rem;
    }
    
    .testimonial-card:hover {
        transform: none; /* Disable hover transform on mobile */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Animation for testimonials appearing */
@keyframes testimonialFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonial-card {
    animation: testimonialFadeIn 0.6s ease-out forwards;
}

.testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.testimonial-card:nth-child(2) { animation-delay: 0.2s; }
.testimonial-card:nth-child(3) { animation-delay: 0.3s; }

/* Stars rating system (if needed later) */
.testimonial-stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.testimonial-star {
    width: 1rem;
    height: 1rem;
    color: #fbbf24;
}

/* Company logos (if needed later) */
.testimonial-company {
    opacity: 0.6;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

/* Section header enhancements */
.testimonials-title {
    background: linear-gradient(135deg, #1f2937, #374151);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark .testimonials-title {
    background: linear-gradient(135deg, #f9fafb, #e5e7eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover effects for the entire section */
.testimonials-section:hover .testimonial-card:not(:hover) {
    opacity: 0.7;
    transform: scale(0.98);
}

/* Testimonials Section Scroll Horizontal Mobile - Optimisations supplémentaires */

/* Conteneur principal avec scroll horizontal mobile */
.testimonials-videos-container {
    position: relative;
    width: 100%;
}

/* Scroll horizontal optimisé pour mobile */
@media (max-width: 640px) {
    .tiktok-videos-grid {
        display: flex !important;
        flex-direction: row;
        gap: 16px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 0 20px;
        margin: 0 -20px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .tiktok-videos-grid::-webkit-scrollbar {
        display: none;
    }
    
    .tiktok-video-card {
        flex: 0 0 280px;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        margin-bottom: 0;
    }
    
    /* Indicateurs de scroll mobile */
    .mobile-scroll-indicators {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        margin-top: 24px;
        z-index: 10;
    }
    
    .scroll-dots {
        display: flex;
        gap: 8px;
        justify-content: center;
        align-items: center;
    }
    
    .scroll-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        border: none;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }
    
    .scroll-dot.active {
        background: #8b5cf6;
        transform: scale(1.25);
        box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    }
    
    .scroll-dot:hover {
        background: rgba(255, 255, 255, 0.5);
    }
    
    .scroll-dot.active:hover {
        background: #8b5cf6;
    }
    
    .scroll-hint {
        display: flex;
        align-items: center;
        gap: 6px;
        color: rgba(255, 255, 255, 0.6);
        font-size: 12px;
        opacity: 0.8;
        animation: fadeInPulse 2s ease-in-out infinite;
    }
    
    .hint-icon {
        width: 14px;
        height: 14px;
    }
    
    /* Désactiver les effets hover sur mobile */
    .tiktok-video-card:hover {
        transform: none !important;
    }
    
    .tiktok-video-card:hover .video-thumbnail-container {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    }
}

/* Masquer les indicateurs sur desktop et tablet */
@media (min-width: 641px) {
    .mobile-scroll-indicators {
        display: none !important;
    }
}

/* Animation pour l'indication de scroll */
@keyframes fadeInPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Animation pour les dots actifs */
@keyframes dotActivePulse {
    0%, 100% { 
        transform: scale(1.25); 
        box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    }
    50% { 
        transform: scale(1.4); 
        box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
    }
}

.scroll-dot.active {
    animation: dotActivePulse 1.5s ease-in-out infinite;
}

/* Optimisations performance mobile */
@media (max-width: 640px) {
    .tiktok-video-card {
        will-change: transform;
        transform: translateZ(0);
    }
    
    .video-thumbnail-container img {
        will-change: transform;
        transform: translateZ(0);
    }
    
    /* Améliorer la fluidité du scroll */
    .tiktok-videos-grid {
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000px;
    }
} 