/* ============================================================================
   GLOBAL
============================================================================ */

.testimonials-section {
    background-color: var(--color-white);
    padding-bottom: 90px;
}

/* ============================================================================
   CAROUSEL
============================================================================ */

.testimonial-carousel {
    --card-height: 360px;
    position: relative;
    padding: 0 45px;
    overflow: hidden;
}

@media (min-width: 769px) {
    .testimonial-carousel {
        overflow: visible;
    }
}

/* Bootstrap structure — NE PAS TOUCHER */
.testimonial-carousel .carousel-inner {
    height: var(--card-height);
}

.testimonial-carousel .carousel-item {
    height: var(--card-height);
}

/* ============================================================================
   SLIDE INTERNE (CLÉ DE LA SOLUTION)
============================================================================ */

.testimonial-slide {
    height: 100%;
    display: flex;
    align-items: stretch;
}

/* ============================================================================
   DESKTOP
============================================================================ */

@media (min-width: 769px) {

    .testimonial-carousel .row {
        height: 100%;
    }

    .testimonial-carousel .col-md-4 {
        display: flex;
        height: 100%;
    }
}

/* ============================================================================
   CARD
============================================================================ */

.testimonial-card {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 1rem;
    border: 1px solid rgba(0,0,0,.04);
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    transition: transform .3s ease, box-shadow .3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0,0,0,.15);
}

.testimonial-top-line {
    height: 4px;
    background: var(--color-primary);
    border-radius: 1rem 1rem 0 0;
}

/* ============================================================================
   CONTENT
============================================================================ */

.testimonial-content {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.testimonial-icon span {
    font-family: serif;
    font-size: 2rem;
    color: var(--color-primary);
    opacity: .4;
    margin-bottom: 0;
}

.testimonial-message {
    color: var(--color-text);
    flex: 1;
    font-style: italic;
    font-size: .95rem;
    line-height: 1.6;
    text-align: justify;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: unset;
}

.testimonial-separator {
    border-top: 1px solid #eee;
    margin: 1rem 0;
}

.testimonial-name {
    font-weight: 700;
    color: var(--color-primary);
}

.testimonial-role {
    font-size: .85rem;
    color: #555;
}

/* ============================================================================
   NAVIGATION
============================================================================ */

.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    touch-action: manipulation;
}

.carousel-control-prev { left: -15px; }
.carousel-control-next { right: -15px; }



.testimonial-carousel .carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    padding: 10px; /* augmente la zone cliquable */
}



.custom-carousel-arrow {
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,.2);
}

.custom-carousel-arrow i {
    color: var(--color-primary);
}

/* ============================================================================
   INDICATORS (FIXED)
============================================================================ */

.testimonial-carousel .carousel-indicators {
/* On annule le positionnement de Bootstrap qui cause le problème */
    position: relative !important; 
    bottom: 0 !important;
    top: auto !important; /* Force l'annulation si un 'top' est hérité */
    
    /* On crée de l'espace avec le contenu au-dessus */
    margin-top: 40px !important; 
    margin-bottom: 0;
    
    /* On s'assure qu'ils sont bien centrés */
    display: flex;
    justify-content: center;
    left: 0;
    transform: none;
    z-index: 15;
}

.testimonial-carousel .carousel-indicators [data-bs-target] {
   box-sizing: content-box;
    flex: 0 1 auto;
    width: 12px;
    height: 12px;
    padding: 0;
    margin: 0 6px;
    text-indent: -999px;
    cursor: pointer;
    background-color: var(--color-primary);
    border: none; /* Supprime les bordures transparentes de Bootstrap */
    border-radius: 50%;
    opacity: 0.3;
    transition: opacity .6s ease;
}

.testimonial-carousel .carousel-indicators .active {
    opacity: 1;
}

/* ============================================================================
   MOBILE ADJUSTMENTS
============================================================================ */

@media (max-width: 768px) {
    .testimonials-section {
        padding-bottom: 50px;
    }

    /* On s'assure que le container mobile ne coupe pas les ombres */
    #testimonialCarouselMobile {
        overflow: visible;
        padding-bottom: 20px;
    }

    .testimonial-carousel .carousel-indicators {
        margin-top: 20px;
    }
}

.testimonial-carousel .row {
    justify-content: center;
}