/* =========================================================
   TRUST SECTION
   ========================================================= */

.trust-section {
    --trust-primary: #00843d;
    --trust-primary-dark: #006b31;
    --trust-text: #111827;
    --trust-muted: #6b7280;
    --trust-background: #f6f7f8;
    --trust-card: #ffffff;
    --trust-border: rgba(17, 24, 39, 0.07);

    position: relative;
    width: 100%;
    padding: 95px 0 100px;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(0, 132, 61, 0.055),
            transparent 42%
        ),
        var(--trust-background);
}


/* =========================================================
   CONTAINER
   ========================================================= */

.trust-container {
    width: min(1680px, calc(100% - 48px));
    margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.trust-header {
    max-width: 760px;
    margin: 0 auto 55px;
    text-align: center;
}

.trust-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 14px;

    color: var(--trust-primary);

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.trust-title {
    margin: 0;

    color: var(--trust-text);

    font-size: clamp(30px, 3.2vw, 48px);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.trust-title span {
    color: var(--trust-primary);
}

.trust-description {
    max-width: 650px;
    margin: 18px auto 0;

    color: var(--trust-muted);

    font-size: 16px;
    line-height: 1.7;
}


/* =========================================================
   SLIDER
   ========================================================= */

.trust-slider {
    position: relative;
    width: 100%;
    overflow: hidden;

    /*
     * Dégradés sur les côtés pour donner
     * un effet moderne de fondu.
     */
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 4%,
        #000 96%,
        transparent 100%
    );

    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 4%,
        #000 96%,
        transparent 100%
    );
}


/* =========================================================
   TRACK
   ========================================================= */

.trust-track {
    display: flex;
    align-items: stretch;

    gap: 18px;

    width: max-content;

    /*
     * Animation automatique.
     */
    animation: trust-scroll 35s linear infinite;

    will-change: transform;
}


/*
 * Pause lorsque l'utilisateur passe
 * sa souris sur les logos.
 */
.trust-slider:hover .trust-track {
    animation-play-state: paused;
}


/* =========================================================
   CARD
   ========================================================= */

.trust-card {
    position: relative;

    flex: 0 0 clamp(280px, 22vw, 405px);

    height: 190px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 35px;

    background: var(--trust-card);

    border: 1px solid var(--trust-border);

    border-radius: 4px;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.025),
        0 10px 35px rgba(0, 0, 0, 0.035);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}


/*
 * Ligne verte discrète au-dessus
 */
.trust-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 50%;

    width: 0;
    height: 3px;

    transform: translateX(-50%);

    background: var(--trust-primary);

    transition: width 0.35s ease;
}


.trust-card:hover {
    transform: translateY(-7px);

    border-color: rgba(0, 132, 61, 0.14);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.07),
        0 25px 60px rgba(0, 0, 0, 0.06);
}


.trust-card:hover::before {
    width: 55px;
}


/* =========================================================
   LOGO
   ========================================================= */

.trust-logo-wrapper {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
}


.trust-logo {
    display: block;

    width: auto;
    max-width: 90%;
    max-height: 95px;

    object-fit: contain;

    /*
     * Effet gris comme sur la maquette.
     */
    filter:
        grayscale(1)
        opacity(0.65);

    transition:
        filter 0.4s ease,
        transform 0.4s ease;
}


.trust-card:hover .trust-logo {
    filter:
        grayscale(0)
        opacity(1);

    transform: scale(1.04);
}


/* =========================================================
   ANIMATION
   ========================================================= */

@keyframes trust-scroll {

    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(
            calc(-50% - 9px)
        );
    }

}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.trust-empty {
    width: 100%;
    padding: 60px 20px;

    text-align: center;

    color: var(--trust-muted);

    font-size: 15px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .trust-section {
        padding: 80px 0 85px;
    }

    .trust-container {
        width: min(
            100% - 36px,
            1000px
        );
    }

    .trust-header {
        margin-bottom: 42px;
    }

    .trust-card {
        flex-basis: 300px;
        height: 175px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .trust-section {
        padding: 65px 0 70px;
    }

    .trust-container {
        width: calc(100% - 30px);
    }

    .trust-header {
        margin-bottom: 35px;
    }

    .trust-eyebrow {
        font-size: 11px;
        letter-spacing: 0.12em;
    }

    .trust-title {
        font-size: 30px;
    }

    .trust-description {
        margin-top: 14px;

        font-size: 14px;
        line-height: 1.65;
    }

    .trust-slider {
        mask-image: linear-gradient(
            to right,
            transparent 0%,
            #000 8%,
            #000 92%,
            transparent 100%
        );

        -webkit-mask-image: linear-gradient(
            to right,
            transparent 0%,
            #000 8%,
            #000 92%,
            transparent 100%
        );
    }

    .trust-track {
        gap: 14px;

        animation-duration: 28s;
    }

    .trust-card {
        flex-basis: 270px;
        height: 155px;

        padding: 25px;
    }

    .trust-logo {
        max-height: 75px;
    }

}


/* =========================================================
   PETIT MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .trust-section {
        padding: 55px 0 60px;
    }

    .trust-container {
        width: calc(100% - 24px);
    }

    .trust-title {
        font-size: 27px;
    }

    .trust-description {
        font-size: 13px;
    }

    .trust-card {
        flex-basis: 245px;
        height: 145px;
    }

}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .trust-track {
        animation: none;
    }

    .trust-card {
        transition: none;
    }

}
