/* =====================================================
   FMV Testimonial Carousel — WAI-ARIA compliant
   https://www.w3.org/WAI/ARIA/apg/patterns/carousel/
   ===================================================== */

.fmv-testimonial-carousel-wrapper {
    width: 100%;
    padding: 20px 0;
}

#fmv-carousel {
    position: relative;
    overflow: hidden;
    background: transparent;
}

/* --- Slides --- */
.fmv-carousel__slides {
    position: relative;
    min-height: 220px;
    overflow: hidden;
}

.fmv-carousel__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 0 60px;
    box-sizing: border-box;
    visibility: hidden;
    /* pas de transform par défaut : évite le flash au reset */
}

/* Slide active */
.fmv-carousel__slide[aria-hidden="false"] {
    position: relative;
    visibility: visible;
}

/* --- Animation de défilement --- */

/* Sortante vers la gauche (next) */
.fmv-carousel__slide.is-leaving-left {
    position: absolute;
    visibility: visible;
    animation: fmv-slide-out-left 0.45s ease forwards;
}

/* Sortante vers la droite (prev) */
.fmv-carousel__slide.is-leaving-right {
    position: absolute;
    visibility: visible;
    animation: fmv-slide-out-right 0.45s ease forwards;
}

/* Entrante depuis la droite (next) */
.fmv-carousel__slide.is-entering-right {
    position: relative;
    visibility: visible;
    animation: fmv-slide-in-right 0.45s ease forwards;
}

/* Entrante depuis la gauche (prev) */
.fmv-carousel__slide.is-entering-left {
    position: relative;
    visibility: visible;
    animation: fmv-slide-in-left 0.45s ease forwards;
}

@keyframes fmv-slide-out-left {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

@keyframes fmv-slide-out-right {
    from { transform: translateX(0); }
    to   { transform: translateX(100%); }
}

@keyframes fmv-slide-in-right {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

@keyframes fmv-slide-in-left {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}

.fmv-carousel__slide-inner {
    max-width: 700px;
    margin: 0 auto;
}

/* --- Texte --- */
.fmv-carousel__text {
    font-size: 1.2em;
    font-style: italic;
    line-height: 1.6;
    color: #fff;
    margin: 0 0 24px;
    padding: 0;
    border: none;
}

/* --- Footer (avatar + cite) --- */
.fmv-carousel__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.fmv-carousel__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.fmv-carousel__cite {
    display: flex;
    flex-direction: column;
    font-style: normal;
    text-align: left;
}

.fmv-carousel__name {
    font-weight: 700;
    color: #fff;
    font-size: 1em;
}

.fmv-carousel__company {
    color: rgba(255,255,255,0.75);
    font-size: 0.875em;
}

/* --- Bouton pause (rotation control) — positionné en bas à droite --- */
.fmv-carousel__pause {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 10;
    background: transparent;
    color: #fff;
    border: none;
    padding: 6px 8px;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.2s;
    opacity: 0.75;
}

.fmv-carousel__pause:hover {
    opacity: 1;
}

.fmv-carousel__pause:focus {
    outline: 3px solid #EF7D00;
    outline-offset: 2px;
    opacity: 1;
}
/* --- Contrôles prev / next --- */
.fmv-carousel__controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 4px;
}

.fmv-carousel__btn {
    pointer-events: all;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.fmv-carousel__btn:hover {
    background: rgba(255,255,255,0.3);
}

.fmv-carousel__btn:focus {
    outline: 3px solid #EF7D00;
    outline-offset: 2px;
}

/* --- Indicateurs (slide picker) --- */
.fmv-carousel__indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.fmv-carousel__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.7);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.fmv-carousel__dot[aria-disabled="true"] {
    background: #fff;
    cursor: default;
}

.fmv-carousel__dot:focus {
    outline: 3px solid #EF7D00;
    outline-offset: 2px;
}

/* --- Loader --- */
.fmv-carousel__loading {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.fmv-carousel__loading[aria-hidden="true"] {
    display: none;
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .fmv-carousel__slide {
        padding: 0 48px;
    }

    .fmv-carousel__text {
        font-size: 1em;
    }

    .fmv-carousel__footer {
        flex-direction: column;
        text-align: center;
    }

    .fmv-carousel__cite {
        text-align: center;
    }
}
