.testimonials-section {
    padding-block: var(--es-section-padding-y);
    overflow: hidden;
    background: var(--es-bg);
}

.testimonials-header {
    max-width: 720px;
    margin: 0 auto var(--es-space-10);
    text-align: center;
}

.testimonials-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--es-space-2);
    margin-bottom: var(--es-space-4);
    padding: var(--es-space-1) var(--es-space-3);
    border: var(--es-border-thin) solid var(--es-border-primary);
    border-radius: var(--es-radius-pill);
    color: var(--es-secondary);
    font-size: var(--es-fs-xs);
    font-weight: var(--es-fw-semibold);
    text-transform: uppercase;
    letter-spacing: var(--es-tracking-wide);
    background-color: var(--es-surface);
}

.testimonials-header h2 {
    margin-bottom: var(--es-space-3);
    font-size: var(--es-fs-2xl);
    font-weight: var(--es-fw-bold);
}

.testimonials-header p {
    margin-bottom: 0;
}

.testimonials-carousel {
    position: relative;
    width: 100%;
}

.testimonials-carousel::before,
.testimonials-carousel::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 100px;
    pointer-events: none;
}

.testimonials-carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--es-bg) 0%, var(--es-bg) 25%, transparent 100%);
}

.testimonials-carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--es-bg) 0%, var(--es-bg) 25%, transparent 100%);
}

.testimonials-viewport {
    width: 100%;
    overflow: hidden;
}

.testimonials-track {
    display: flex;
    gap: var(--es-space-5);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-inline: var(--es-space-6);
}

.testimonials-track::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    flex: 0 0 clamp(280px, 30vw, 340px);
    min-height: 290px;
    padding: var(--es-space-6);
    display: flex;
    flex-direction: column;
    scroll-snap-align: center;
    background: var(--es-surface);
    border: var(--es-border-thin) solid var(--es-border-subtle);
    border-radius: var(--es-radius-lg);
    transition: border-color var(--es-transition-base), transform var(--es-transition-base), opacity var(--es-transition-base);
}

.testimonial-card.is-active {
    border-color: var(--es-border-primary);
}

.testimonial-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--es-space-3);
    margin-bottom: var(--es-space-4);
}

.testimonial-rating {
    display: flex;
    gap: 2px;
    color: var(--es-text-muted);
}

.testimonial-rating .is-active {
    color: var(--es-secondary);
}

.testimonial-offer {
    padding: var(--es-space-1) var(--es-space-2);
    background: var(--es-surface-elevated);
    color: var(--es-text-secondary);
    border-radius: var(--es-radius-xs);
    font-size: var(--es-fs-xs);
    text-transform: uppercase;
}

.testimonial-content {
    flex: 1;
    margin: 0;
    color: var(--es-text-secondary);
    font-size: var(--es-fs-sm);
    font-style: italic;
    line-height: var(--es-lh-body);
}

.testimonial-divider {
    height: 1px;
    margin-block: var(--es-space-5);
    background: var(--es-border-subtle);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--es-space-3);
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: var(--es-primary-subtle);
    color: var(--es-text);
    border: var(--es-border-thin) solid var(--es-border-primary);
    border-radius: 50%;
    font-size: var(--es-fs-sm);
    font-weight: var(--es-fw-semibold);
}

.testimonial-author strong {
    display: block;
    color: var(--es-text);
    font-size: var(--es-fs-sm);
}

.testimonial-author span {
    display: block;
    margin-top: 2px;
    color: var(--es-text-muted);
    font-size: var(--es-fs-xs);
}

.testimonials-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    background: var(--es-surface);
    color: var(--es-text);
    border: var(--es-border-thin) solid var(--es-border);
    border-radius: 50%;
    box-shadow: var(--es-shadow-sm);
    transition: background-color var(--es-transition-fast), border-color var(--es-transition-fast), color var(--es-transition-fast);
}

.testimonials-arrow:hover {
    background: var(--es-surface-hover);
    border-color: var(--es-primary);
}

.testimonials-arrow--prev {
    left: var(--es-space-7);
}

.testimonials-arrow--next {
    right: var(--es-space-7);
}

.testimonials-dots {
    margin-top: var(--es-space-7);
    display: flex;
    justify-content: center;
    gap: var(--es-space-2);
}

.testimonials-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    background: var(--es-text-muted);
    border-radius: var(--es-radius-pill);
    opacity: 0.5;
    transition: width var(--es-transition-fast), background-color var(--es-transition-fast), opacity var(--es-transition-fast);
}

.testimonials-dot.is-active {
    width: 22px;
    background: var(--es-primary);
    opacity: 1;
}

.testimonials-note {
    margin: var(--es-space-5) auto 0;
    color: var(--es-text-muted);
    font-size: var(--es-fs-xs);
    text-align: center;
}

/* =========================================================
    ELITESTREAM — FORMULAIRE DE TÉMOIGNAGE
   ========================================================= */


/* =========================================================
    CONTENEUR PRINCIPAL
   ========================================================= */

.testimonial-submit {
    position: relative;
    max-width: 860px;
    margin: var(--es-space-10) auto 0;
    padding: var(--es-space-7);
    overflow: hidden;
}

/* Accent lumineux supérieur */
.testimonial-submit::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--es-primary), var(--es-secondary), transparent);
    opacity: 0.85;
}

/* Halo très discret derrière le formulaire */
.testimonial-submit::after {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    width: 520px;
    height: 260px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(99, 91, 255, 0.16), transparent 70%);
    filter: blur(24px);
    transform: translateX(-50%);
}


/* =========================================================
   HEADER DU FORMULAIRE
   ========================================================= */

.testimonial-submit__header {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0 auto var(--es-space-7);
    text-align: center;
}

.testimonial-submit__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--es-space-2);
    margin-bottom: var(--es-space-3);
    padding: var(--es-space-1) var(--es-space-3);
    color: var(--es-secondary);
    background: var(--es-primary-subtle);
    border: var(--es-border-thin) solid rgba(24, 191, 242, 0.20);
    border-radius: var(--es-radius-pill);
    font-size: var(--es-fs-xs);
    font-weight: var(--es-fw-semibold);
    text-transform: uppercase;
    letter-spacing: var(--es-tracking-wide);
}

.testimonial-submit__eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--es-secondary);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(24, 191, 242, 0.7);
}

.testimonial-submit__header h3 {
    margin-bottom: var(--es-space-3);
    color: var(--es-text);
    font-family: var(--es-font-heading);
    font-size: var(--es-fs-2xl);
    font-weight: var(--es-fw-bold);
    line-height: var(--es-lh-tight);
    letter-spacing: var(--es-tracking-tight);
}

.testimonial-submit__header p {
    margin: 0;
    color: var(--es-text-secondary);
    font-size: var(--es-fs-sm);
    line-height: var(--es-lh-body);
}


/* =========================================================
    FORMULAIRE
   ========================================================= */

.testimonial-form {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--es-space-5);
}

/* Le textarea occupe toute la largeur */
.testimonial-form__field:nth-of-type(5) {
    grid-column: 1 / -1;
}

.testimonial-form__field {
    min-width: 0;
}

.testimonial-form__field label {
    margin-bottom: var(--es-space-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--es-space-2);
    color: var(--es-text);
    font-size: var(--es-fs-sm);
    font-weight: var(--es-fw-semibold);
}

.testimonial-form__field label span {
    color: var(--es-text-muted);
    font-size: var(--es-fs-xs);
    font-weight: var(--es-fw-regular);
}


/* =========================================================
    INPUTS / SELECT / TEXTAREA
   ========================================================= */

.testimonial-form input,
.testimonial-form select,
.testimonial-form textarea {
    width: 100%;
    color: var(--es-text);
    background: var(--es-bg);
    border: var(--es-border-thin) solid var(--es-border);
    border-radius: var(--es-radius-md);
    outline: none;
    font-family: var(--es-font-body);
    font-size: var(--es-fs-sm);
    transition: border-color var(--es-transition-fast), box-shadow var(--es-transition-fast), background-color var(--es-transition-fast), transform var(--es-transition-fast);
}

.testimonial-form input,
.testimonial-form select {
    min-height: 48px;
    padding-inline: var(--es-space-4);
}

.testimonial-form textarea {
    min-height: 150px;
    padding: var(--es-space-4);
    resize: vertical;
    line-height: var(--es-lh-body);
}

.testimonial-form input::placeholder,
.testimonial-form textarea::placeholder {
    color: var(--es-text-muted);
}

/*
 * Focus premium :
 * bordure violette + léger glow.
 */
.testimonial-form input:focus,
.testimonial-form select:focus,
.testimonial-form textarea:focus {
    background: var(--es-surface);
    border-color: var(--es-primary);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.12), 0 0 20px rgba(99, 91, 255, 0.08);
}

/* Petit feedback lorsque l'utilisateur commence à saisir */
.testimonial-form input:focus,
.testimonial-form textarea:focus {
    transform: translateY(-1px);
}

.testimonial-form__field small {
    margin-top: var(--es-space-2);
    display: block;
    color: var(--es-text-muted);
    font-size: var(--es-fs-xs);
    line-height: var(--es-lh-body);
}


/* =========================================================
    SELECT
   ========================================================= */

.testimonial-form select {
    cursor: pointer;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--es-text-secondary) 50%),
        linear-gradient(135deg, var(--es-text-secondary) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 20px,
        calc(100% - 13px) 20px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}


/* =========================================================
    CONSENTEMENT
   ========================================================= */

.testimonial-form__consent {
    grid-column: 1 / -1;
    padding: var(--es-space-4);
    display: flex;
    align-items: flex-start;
    gap: var(--es-space-3);
    color: var(--es-text-secondary);
    background: rgba(99, 91, 255, 0.05);
    border: var(--es-border-thin) solid var(--es-border-subtle);
    border-radius: var(--es-radius-md);
    font-size: var(--es-fs-xs);
    line-height: var(--es-lh-body);
    cursor: pointer;
}

.testimonial-form__consent input {
    width: 18px;
    height: 18px;
    min-height: auto;
    flex: 0 0 18px;
    margin-top: 2px;
    accent-color: var(--es-primary);
    cursor: pointer;
}


/* =========================================================
    BOUTON D'ENVOI
   ========================================================= */

.testimonial-form__submit {
    grid-column: 1 / -1;
    min-height: 52px;
    padding-inline: var(--es-space-6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--es-space-2);
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, var(--es-primary), #756eff);
    border: none;
    border-radius: var(--es-radius-md);
    font-family: var(--es-font-body);
    font-size: var(--es-fs-sm);
    font-weight: var(--es-fw-semibold);
    cursor: pointer;
    box-shadow: var(--es-glow-primary);
    transition: transform var(--es-transition-fast), box-shadow var(--es-transition-fast), background var(--es-transition-fast);
}

/* Reflet animé très subtil */
.testimonial-form__submit::before {
    content: "";
    position: absolute;
    top: 0;
    left: -45%;
    width: 28%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.20), transparent);
    transform: skewX(-20deg);
    transition: left 550ms ease;
}

.testimonial-form__submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--es-glow-primary-strong);
}

.testimonial-form__submit:hover::before {
    left: 120%;
}

.testimonial-form__submit:active {
    transform: translateY(0) scale(0.985);
}


/* =========================================================
    MESSAGE DE SUCCÈS / ERREUR
   ========================================================= */

.testimonial-message {
    position: relative;
    z-index: 1;
    margin-bottom: var(--es-space-5);
    padding: var(--es-space-4);
    border-radius: var(--es-radius-md);
    font-size: var(--es-fs-sm);
    line-height: var(--es-lh-body);
    animation: testimonial-message-in 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-message--success {
    color: #34d399;
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.22);
}

.testimonial-message--error {
    color: #fb7185;
    background: rgba(251, 113, 133, 0.08);
    border: 1px solid rgba(251, 113, 133, 0.22);
}

@keyframes testimonial-message-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
    ANTI-SPAM — HONEYPOT
   ========================================================= */

.testimonial-form__honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}


/* =========================================================
    LIGHT THEME
   ========================================================= */

[data-theme="light"] .testimonial-submit {
    background: linear-gradient(145deg, rgba(99, 91, 255, 0.05), var(--es-surface) 42%);
}

[data-theme="light"] .testimonial-form input,
[data-theme="light"] .testimonial-form select,
[data-theme="light"] .testimonial-form textarea {
    background-color: var(--es-bg-secondary);
}

[data-theme="light"] .testimonial-form input:focus,
[data-theme="light"] .testimonial-form select:focus,
[data-theme="light"] .testimonial-form textarea:focus {
    background-color: var(--es-surface);
}


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

@media (max-width: 767.98px) {
    .testimonial-submit {
        margin-top: var(--es-space-8);
        padding: var(--es-space-5);
        border-radius: var(--es-radius-lg);
    }

    .testimonial-submit__header {
        margin-bottom: var(--es-space-6);
    }

    .testimonial-submit__header h3 {
        font-size: var(--es-fs-xl);
    }

    .testimonial-form {
        grid-template-columns: 1fr;
        gap: var(--es-space-4);
    }

    .testimonial-form__field,
    .testimonial-form__field:nth-of-type(5),
    .testimonial-form__consent,
    .testimonial-form__submit {
        grid-column: 1;
    }

    .testimonial-form__submit {
        width: 100%;
    }
}


/* =========================================================
    ACCESSIBILITÉ — REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .testimonial-form input,
    .testimonial-form textarea,
    .testimonial-form__submit,
    .testimonial-message {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }

    .testimonial-form__submit::before {
        display: none;
    }
}

/* =========================================================
    ANTI-SPAM — HONEYPOT
    ---------------------------------------------------------
    Ce champ existe pour piéger certains robots.
    Il ne doit jamais être visible par un vrai utilisateur.
    ========================================================= */

.testimonial-form__honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 991.98px) {
    .testimonial-card {
        flex-basis: calc(50vw - var(--es-space-8));
    }
}

@media (min-width: 991.98px) {

    /* CONTENEUR PRINCIPAL FORMULAIRE AVIS */
    .testimonial-submit {
        background: linear-gradient(145deg, rgba(99, 91, 255, 0.07), var(--es-surface) 38%);
        border: var(--es-border-thin) solid var(--es-border-subtle);
        border-radius: var(--es-radius-xl);
        box-shadow: var(--es-shadow-card);
    }

}

@media (max-width: 767.98px) {

    .testimonials-section {
        padding-block: 0;
        padding-bottom: 40px;
    }
    .testimonials-header {
        margin-bottom: var(--es-space-7);
        padding-inline: var(--es-space-4);
    }

    .testimonials-header h2 {
        font-size: var(--es-fs-xl);
    }

    .testimonial-offer {
        text-transform: lowercase;
        font-size: 8px;
    }

    .testimonials-track {
        gap: var(--es-space-4);
        padding-inline: var(--es-space-6);
    }

    .testimonial-card {
        flex-basis: calc(88vw - 64px);
        min-height: 280px;
        padding: var(--es-space-5);
    }

    .testimonials-arrow {
        display: none;
    }

    .testimonials-note {
        padding-inline: var(--es-space-5);
    }

    .testimonials-carousel::before,
    .testimonials-carousel::after {
        width: 35px;
    }
}

/* =========================================================
    TÉMOIGNAGES — ÉTAT VIDE
   ========================================================= */

.testimonials-empty {
    width: 100%;
    padding: var(--es-space-8);
    display: grid;
    place-items: center;
    gap: var(--es-space-3);
    color: var(--es-text-secondary);
    background: var(--es-surface);
    border: var(--es-border-thin) dashed var(--es-border);
    border-radius: var(--es-radius-lg);
    text-align: center;
}

.testimonials-empty > span {
    color: var(--es-secondary);
    font-size: var(--es-fs-2xl);
}

.testimonials-empty p {
    max-width: 420px;
    margin: 0;
    font-size: var(--es-fs-sm);
    line-height: var(--es-lh-body);
}