/**
 * Testimonials Carousel Styles - Modern Design
 * 
 * Design moderne avec palette: #1363DF (bleu), #12BB6A (vert), #061E43 (fond sombre)
 * Inspiré par les success stories corporate modernes
 * 
 * @package MonCompteInterface
 * @since 1.0.0
 */

/* VARIABLES CSS - Thème Blanc/Clair */
:root {
    --tcf-primary-blue: #1363DF;
    --tcf-success-green: #12BB6A;
    --tcf-dark-bg: #061E43;
    --tcf-text-primary: #1a1a1a;
    --tcf-text-secondary: #6b7280;
    --tcf-card-bg: #ffffff;
    --tcf-card-border: #e5e7eb;
    --tcf-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* SECTION PRINCIPALE */
.tcf-testimonials-section {
    position: relative;
    padding: 100px 20px;
    /* background: linear-gradient(135deg, var(--tcf-dark-bg) 0%, #0a1929 100%); */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.tcf-testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: radial-gradient(circle at 20% 50%, rgba(19, 99, 223, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(18, 187, 106, 0.1) 0%, transparent 50%); */
    z-index: 1;
    pointer-events: none;
}

.tcf-testimonials-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    z-index: 2;
}

.tcf-testimonials-content {
    display: flex;
    gap: 80px;
    align-items: center;
}

/* COLONNE GAUCHE - IMAGE WHATSAPP */
.tcf-testimonials-left {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.tcf-testimonials-phone-mockup {
    max-width: 380px;
    width: 100%;
    position: relative;
}

.tcf-testimonials-phone-mockup::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle, rgba(19, 99, 223, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: tcf-pulse-glow 3s ease-in-out infinite;
}

.tcf-testimonials-phone-image {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.tcf-testimonials-phone-mockup:hover .tcf-testimonials-phone-image {
    transform: scale(1.02) translateY(-5px);
}

/* COLONNE DROITE - CAROUSEL */
.tcf-testimonials-right {
    flex: 1;
    color: var(--tcf-light-text);
    min-width: 0;
    position: relative;
}

.tcf-testimonials-header {
    margin-bottom: 50px;
    text-align: center;
}

.tcf-testimonials-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--tcf-success-green);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tcf-testimonials-subtitle {
    font-size: 2.5rem;
    font-weight: 800;
    /* color: #ffffff; */
    color: #061E43;
    margin: 0;
    line-height: 1.1;
}

.tcf-testimonials-subtitle::after {
    content: '';
    display: block;
    width: 100px;
    height: 5px;
    /* background: linear-gradient(90deg, var(--tcf-primary-blue) 0%, var(--tcf-success-green) 100%); */
    background: var(--tcf-primary-blue);
    margin: 20px auto 0;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(19, 99, 223, 0.5);
}

/* CAROUSEL SLICK - Affichage multiple sur desktop */
.tcf-testimonials-carousel {
    margin-bottom: 40px;
    overflow: visible;
    position: relative;
}

/* Empêcher la disparition lors du touch/swipe */
.tcf-testimonials-carousel.slick-initialized {
    visibility: visible !important;
    opacity: 1 !important;
}

.tcf-testimonials-carousel .slick-list {
    overflow: visible;
}

.tcf-testimonials-carousel .slick-track {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Assurer la visibilité de base */
.tcf-testimonials-carousel .slick-slide,
.tcf-testimonials-slide {
    visibility: visible !important;
    opacity: 1;
}

.tcf-testimonials-card {
    visibility: visible !important;
    display: block !important;
    max-width: 370px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

.tcf-testimonials-slide {
    outline: none;
    padding: 0 15px;
    transition: opacity 0.4s ease;
}

/* Animation de slide fluide - Compatible avec Slick */
.tcf-testimonials-carousel .slick-track {
    display: flex;
    align-items: stretch;
}

.tcf-testimonials-carousel .slick-slide {
    height: auto;
    width: 370px !important;
    opacity: 0.5;
    transform: scale(0.85);
    transition: all 0.4s ease;
}

/* Mobile - Laisser Slick gérer l'affichage */
@media (max-width: 768px) {
    .tcf-testimonials-carousel .slick-slide {
        opacity: 1 !important;
        transform: scale(1) !important;
    }
    
    .tcf-testimonials-carousel .slick-track {
        display: flex;
    }
}

.tcf-testimonials-carousel .slick-slide.slick-center {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.tcf-testimonials-carousel .slick-slide > div {
    width: 100%;
    /* height: 100%; */
}

/* CARTE SIMPLE - Image uniquement avec padding */
.tcf-testimonials-card {
    background: var(--tcf-card-bg);
    border-radius: 16px;
    padding: 8px;
    border: 1px solid var(--tcf-card-border);
    box-shadow: var(--tcf-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: auto;
    max-width: 370px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.tcf-testimonials-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

/* CONTENU DE LA CARTE - Colonne gauche */
.tcf-testimonials-card-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
}

/* IMAGE DU TÉMOIGNAGE - Taille contrôlée */
.tcf-testimonials-image {
    width: 100%;
    height: auto;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}

.tcf-testimonials-image img {
    width: 100%;
    height: auto;
    display: block !important;
    object-fit: contain;
    object-position: center;
    visibility: visible !important;
    opacity: 1 !important;
    /* max-height: 500px; */
}

/* SCORES - Avec icônes en bas du texte */
.tcf-testimonials-scores {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-top: auto;
}

.tcf-testimonials-score {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--tcf-text-primary);
}

.tcf-testimonials-score svg {
    width: 20px;
    height: 20px;
    color: var(--tcf-primary-blue);
    flex-shrink: 0;
}

.tcf-score-label {
    font-weight: 600;
    color: var(--tcf-text-secondary);
}

.tcf-score-value {
    font-weight: 700;
    color: var(--tcf-text-primary);
}

/* TEXTE DU TÉMOIGNAGE - Citation */
.tcf-testimonials-text {
    flex: 1;
}

.tcf-testimonials-text p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--tcf-text-primary);
    margin: 0;
    font-style: italic;
    position: relative;
}

.tcf-testimonials-text p::before {
    content: '"';
    font-size: 3rem;
    line-height: 0;
    color: var(--tcf-primary-blue);
    opacity: 0.2;
    position: absolute;
    left: -20px;
    top: 20px;
    font-family: Georgia, serif;
}

.tcf-testimonials-text-content {
    position: relative;
}

.tcf-testimonials-text-content.is-truncated {
    max-height: 120px;
    overflow: hidden;
    position: relative;
}

.tcf-testimonials-text-content.is-truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(180deg, transparent 0%, #ffffff 100%);
}

.tcf-testimonials-read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding: 6px 14px;
    background: transparent;
    border: none;
    color: var(--tcf-primary-blue);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tcf-testimonials-read-more:hover {
    color: var(--tcf-success-green);
}

.tcf-testimonials-read-more svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.tcf-testimonials-read-more.is-expanded svg {
    transform: rotate(180deg);
}

/* LIGNE DE SÉPARATION - Supprimée */
.tcf-testimonials-divider {
    display: none;
}

/* SIGNATURE - Nom + Pays avec drapeau */
.tcf-testimonials-author {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tcf-testimonials-author-avatar {
    display: none;
}

.tcf-testimonials-author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tcf-testimonials-author-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--tcf-text-primary);
    font-style: normal;
}

.tcf-testimonials-author-country {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--tcf-text-secondary);
    font-weight: 400;
}

.tcf-testimonials-flag {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* NAVIGATION PERSONNALISÉE */
.tcf-testimonials-navigation {
    position: absolute;
    top: 50%;
    left: -120px;
    right: -120px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

/* Forcer la visibilité sur mobile/tablette */
@media (max-width: 1024px) {
    .tcf-testimonials-navigation {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        left: 0 !important;
        right: 0 !important;
        padding: 0 20px;
        pointer-events: none;
    }
}

.tcf-testimonials-prev,
.tcf-testimonials-next {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(2.35, 11.76, 26.27, 0.5);
    /* background: rgba(255, 255, 255, 0.5); */
    /* border: 2px solid rgba(255, 255, 255, 0.8); */
    border: 0;
    color: #ffffff;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    position: relative;
    overflow: hidden;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.tcf-testimonials-prev::before,
.tcf-testimonials-next::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.tcf-testimonials-prev:hover::before,
.tcf-testimonials-next:hover::before {
    width: 100%;
    height: 100%;
}

.tcf-testimonials-prev:hover,
.tcf-testimonials-next:hover {
    background: #ffffff;
    color: var(--tcf-primary-blue);
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

.tcf-testimonials-prev:active,
.tcf-testimonials-next:active {
    transform: scale(0.95);
}

.tcf-testimonials-prev svg,
.tcf-testimonials-next svg {
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    color: white
}

.tcf-testimonials-prev:hover svg {
    transform: translateX(-3px);
    color: var(--tcf-primary-blue);
}

.tcf-testimonials-next:hover svg {
    transform: translateX(3px);
    color: var(--tcf-primary-blue);
}

/* SLICK DOTS - Indicateurs modernes */
.tcf-testimonials-carousel .slick-dots {
    bottom: -50px;
    list-style: none;
    padding: 0;
    margin: 0;
    display: none !important;
    justify-content: center;
    gap: 12px;
    align-items: center;
}

.tcf-testimonials-carousel .slick-dots li {
    margin: 0;
    padding: 0;
}

.tcf-testimonials-carousel .slick-dots li button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    padding: 0;
    font-size: 0;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tcf-testimonials-carousel .slick-dots li button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: #ffffff;
    transition: all 0.4s ease;
}

.tcf-testimonials-carousel .slick-dots li.slick-active button {
    background: #ffffff;
    width: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.tcf-testimonials-carousel .slick-dots li button:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.2);
}

.tcf-testimonials-carousel .slick-dots li.slick-active button:hover {
    transform: scale(1.05);
}

/* RESPONSIVE - Mobile First */
@media (max-width: 1024px) {
    .tcf-testimonials-content {
        flex-direction: column;
        gap: 50px;
    }
    
    .tcf-testimonials-left {
        order: 2;
    }
    
    .tcf-testimonials-right {
        order: 1;
    }
    
    .tcf-testimonials-phone-mockup {
        max-width: 320px;
    }
    
    .tcf-testimonials-subtitle {
        font-size: 2.5rem;
    }
    
    .tcf-testimonials-slide {
        padding: 0 10px;
    }
    
    .tcf-testimonials-carousel .slick-slide {
        width: 100% !important;
        opacity: 1 !important;
        transform: scale(1) !important;
    }
}

@media (max-width: 768px) {
    .tcf-testimonials-section {
        padding: 70px 20px;
    }

    .slick-list.draggable {
        max-width: 300px !important;
    }
    
    .tcf-testimonials-subtitle {
        font-size: 2rem;
    }
    
    .tcf-testimonials-carousel {
        padding: 0;
        margin: 0 auto;
        max-width: 100%;
    }
    
    .tcf-testimonials-slide {
        padding: 0 10px !important;
        box-sizing: border-box;
    }
    
    .tcf-testimonials-card {
        padding: 4px;
        max-width: 250px !important;
        width: 100%;
        margin: 0 auto;
        display: block;
        box-sizing: border-box;
    }
    
    .tcf-testimonials-image {
        width: 100%;
        border-radius: 12px;
        display: block;
    }
    
    .tcf-testimonials-image img {
        /* max-height: 500px; */
        width: 100%;
        display: block;
        height: auto;
    }
    
    /* NAVIGATION MOBILE - Position fixe et visible */
    .tcf-testimonials-navigation {
        position: absolute !important;
        top: 50% !important;
        left: 0 !important;
        right: 0 !important;
        transform: translateY(-50%) !important;
        display: flex !important;
        justify-content: space-between;
        padding: 0 15px !important;
        pointer-events: none;
        z-index: 1000;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .tcf-testimonials-prev,
    .tcf-testimonials-next {
        width: 48px !important;
        height: 48px !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: relative !important;
        left: auto !important;
        right: auto !important;
    }
}

@media (max-width: 480px) {
    .tcf-testimonials-section {
        padding: 50px 15px;
    }
    .slick-list.draggable {
        max-width: 300px !important;
    }
    
    .tcf-testimonials-title {
        font-size: 0.85rem;
    }
    
    .tcf-testimonials-subtitle {
        font-size: 1.75rem;
    }
    
    .tcf-testimonials-carousel {
        margin: 0;
        padding: 0;
    }
    
    .tcf-testimonials-card {
        padding: 4px;
        border-radius: 12px;
        max-width: 280px !important;
        width: 100%;
        margin: 0 auto;
        display: block;
        box-sizing: border-box;
    }
    
    .tcf-testimonials-prev,
    .tcf-testimonials-next {
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .tcf-testimonials-image img {
        /* max-height: 350px; */
        width: 100%;
        height: auto;
    }
    
    .tcf-testimonials-slide {
        padding: 0 8px !important;
        box-sizing: border-box;
    }
    
    /* S'assurer que la navigation est toujours visible sur mobile */
    .tcf-testimonials-navigation {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* ANIMATIONS */
@keyframes tcf-pulse-glow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* ACCESSIBILITÉ */
.tcf-testimonials-prev:focus,
.tcf-testimonials-next:focus {
    outline: 3px solid var(--tcf-primary-blue);
    outline-offset: 3px;
}

.tcf-testimonials-read-more:focus {
    outline: 2px solid var(--tcf-primary-blue);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.tcf-testimonials-next {
    right: 100px;
}

.tcf-testimonials-prev {
    left: 100px;
}

/* PERFORMANCE - Réduire les animations si demandé */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .tcf-testimonials-card,
    .tcf-testimonials-prev,
    .tcf-testimonials-next,
    .tcf-testimonials-carousel .slick-dots li button,
    .tcf-testimonials-phone-image {
        transition: none;
    }
    
    .tcf-testimonials-slide.slick-active .tcf-testimonials-card {
        animation: none;
    }
    
    .tcf-testimonials-phone-mockup::before {
        animation: none;
    }
}

/* PRINT STYLES */
@media print {
    .tcf-testimonials-navigation,
    .tcf-testimonials-carousel .slick-dots {
        display: none !important;
    }
    
    .tcf-testimonials-section {
        background: white;
        color: black;
    }
    
    .tcf-testimonials-card {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}
