/* AM Testimonials Widget Styles - Nouveau design exact comme la démo HTML */

.am-testimonials-container {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Container principal - PERMETTRE LE DÉBORDEMENT LATÉRAL */
.am-testimonials-grid {
    position: relative;
    width: 100%;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: visible;
    padding: 0;
}

/* Carte de base - TOUTES les cartes ont la même structure */
.testimonial-card {
    position: absolute !important;
    background: white;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 500px;
    max-width: 90%;
    height: 380px;
    display: none !important;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transform: translateX(0) scale(0.5);
    z-index: 0;
}

/* Forcer l'affichage des cartes visibles */
.testimonial-card.testimonial-visible {
    display: flex !important;
}

/* POSITIONS EXACTES COMME LA DÉMO */

/* Carte centrale active - REMONTÉE */
.testimonial-card.active {
    width: 500px;
    transform: translateX(0) translateY(-40px) scale(1);
    opacity: 1;
    z-index: 5;
}

/* Carte à gauche */
.testimonial-card.left {
    width: 420px;
    transform: translateX(-550px) translateY(40px) scale(0.9);
    opacity: 0.7;
    z-index: 3;
}

/* Carte à droite */
.testimonial-card.right {
    width: 420px;
    transform: translateX(550px) translateY(40px) scale(0.9);
    opacity: 0.7;
    z-index: 3;
}

/* Carte très à gauche - DÉBORDEMENT */
.testimonial-card.far-left {
    width: 380px;
    transform: translateX(-1050px) translateY(80px) scale(0.8);
    opacity: 0.5;
    z-index: 1;
    filter: blur(0.5px);
}

/* Carte très à droite - DÉBORDEMENT */
.testimonial-card.far-right {
    width: 380px;
    transform: translateX(1050px) translateY(80px) scale(0.8);
    opacity: 0.5;
    z-index: 1;
    filter: blur(0.5px);
}

/* Cartes cachées - COMPLÈTEMENT INVISIBLES */
.testimonial-card.hidden {
    display: none !important;
    opacity: 0;
    transform: translateX(0) scale(0.5);
    z-index: 0;
}

/* Avatar - style minimaliste */
.testimonial-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e5e7eb;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #9ca3af;
    font-weight: 600;
    flex-shrink: 0;
    border: none;
    box-shadow: none;
    position: relative;
    top: 0;
}

/* Image dans l'avatar */
.testimonial-image img {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    background-color: #e5e7eb;
}

/* Contenu du témoignage */
.testimonial-content {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Texte du témoignage */
.testimonial-text {
    text-align: center;
    color: #4b5563;
    line-height: 1.7;
    font-size: 0.95rem;
    flex: 1;
    display: flex;
    align-items: center;
    padding: 20px 0;
    overflow: hidden;
    margin: 0;
}

/* Auteur du témoignage */
.testimonial-author {
    text-align: center;
    flex-shrink: 0;
    border-top: none;
    padding-top: 20px;
    margin-top: auto;
}

/* Ligne de séparation avant l'auteur */
.testimonial-author::before {
    content: "";
    display: block;
    width: calc(100% - 40px);
    height: 1px;
    background-color: #e5e7eb;
    margin: 0 auto 20px;
}

/* Nom de l'auteur */
.author-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #3b82f6;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Position/Entreprise de l'auteur */
.author-position {
    font-size: 0.9rem;
    color: #9ca3af;
    margin: 0;
}

/* Navigation - POSITION PLUS BASSE */
.testimonials-navigation {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 10;
}

.slider-nav {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: #3b82f6 !important;
    border: none !important;
    color: white !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3) !important;
    font-size: 24px !important;
    font-weight: bold !important;
    padding: 0 !important;
    outline: none !important;
}

.slider-nav:hover {
    transform: scale(1.1) !important;
    background: #2563eb !important;
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4) !important;
}

.slider-nav:active {
    transform: scale(0.95) !important;
}

/* Flèches personnalisées - CORRIGÉES */
.slider-nav.prev::before {
    content: "‹" !important;
    font-size: 28px !important;
    line-height: 1 !important;
}

.slider-nav.next::before {
    content: "›" !important;
    font-size: 28px !important;
    line-height: 1 !important;
}

/* Empêcher les interactions pendant l'animation */
.am-testimonials-grid.transitioning {
    pointer-events: none;
}

/* Responsive - Tablette */
@media (max-width: 1200px) {
    .testimonial-card.left {
        transform: translateX(-450px) translateY(40px) scale(0.85);
    }
    
    .testimonial-card.right {
        transform: translateX(450px) translateY(40px) scale(0.85);
    }
    
    .testimonial-card.far-left {
        transform: translateX(-850px) translateY(80px) scale(0.75);
    }
    
    .testimonial-card.far-right {
        transform: translateX(850px) translateY(80px) scale(0.75);
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .am-testimonials-container {
        min-height: auto;
        padding: 60px 0 120px 0;
    }

    .am-testimonials-grid {
        height: 450px;
    }

    .testimonial-card.active {
        width: 380px;
    }

    .testimonial-card.left,
    .testimonial-card.right {
        width: 320px;
    }

    /* Sur mobile, masquer les cartes far-left et far-right */
    .testimonial-card.far-left,
    .testimonial-card.far-right {
        display: none !important;
    }

    .testimonials-navigation {
        bottom: 20px;
    }

    .slider-nav {
        width: 45px !important;
        height: 45px !important;
    }

    .testimonial-text {
        font-size: 0.9rem;
    }

    .author-name {
        font-size: 1rem;
    }

    .author-position {
        font-size: 0.85rem;
    }
}

/* Styles pour l'édition Elementor */
.elementor-editor-active .testimonial-card {
    cursor: move;
}

/* Forcer les styles sur le contenu généré */
.testimonial-card * {
    box-sizing: border-box;
}

/* S'assurer que les tailles de polices des cartes latérales sont légèrement plus petites */
.testimonial-card.left .testimonial-text,
.testimonial-card.right .testimonial-text,
.testimonial-card.far-left .testimonial-text,
.testimonial-card.far-right .testimonial-text {
    font-size: 0.9rem;
}