/* Composant Image + Texte
============================================================ */

.image-text {
    width: 1150px;
    max-width: 100%;
    margin: 120px auto;
    padding: 0 15px;
    display: grid;
    align-items: center;
    gap: 30px;
}

.image-text:has(+ .card-wrapper) {
    margin-bottom: 60px;
}

.image-text .title {
    font-size: 3.25rem;
    font-weight: 400;
}

.image-text .text {
    margin-top: 24px;
}

.image-text .text p + p {
    margin-top: 1em;
}

.image-text .btn-primary {
    margin-top: 45px;
}

.image-text .image {
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    z-index: 1;
}

.image-text .image .after {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    border-radius: 50px;
}

main > section.image-text .image .after.is-red {
  background-color: #E6CAC0;
}

main > section.image-text .image .after.is-blue {
  background-color: #9DCFF2;
}

.image-text.initial .image .after {
    translate: 60px -35px;
}

.image-text.reverse .image .after {
    translate: -60px -35px;
}

.image-text .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50px;
}

.card-wrapper {
    width: 1330px;
    max-width: 100%;
    margin: 60px auto 0 auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 300px));
    justify-content: center;
    gap: 30px;
}

.card {
    background-color: #fff;
    border-radius: 50px;
    padding: 45px 50px 25px 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.card .icon img {
    max-height: 60px;
    width: auto;
}

.card .icon {
    position: relative;
    z-index: 1;
}

.card .icon::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: -15px;
    left: -45px;
    width: 75px;
    height: 60px;
    border-radius: 60px;
}

.card:nth-child(4n + 1) .icon::before {
    background-color: #B5DDD5;
}

.card:nth-child(4n + 2) .icon::before {
    background-color: #9DCFF2;
}

.card:nth-child(4n + 3) .icon::before {
    background-color: #E6CAC0;
}

.card:nth-child(4n + 4) .icon::before {
    background-color: #E3A994;
}

.card .title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
}

@media (min-width: 993px) {
    .image-text.initial {
        grid-template-columns: 4fr 1fr 5fr;
    }

    .image-text.reverse {
        grid-template-columns: 5fr 1fr 4fr;
    }

    .image-text.initial .content {
        grid-column: 1 / 2;
        grid-row: 1;
    }

    .image-text.reverse .content {
        grid-column: 3 / 4;
        grid-row: 1;
    }

    .image-text.initial .image {
        grid-column: 3 / 4;
        grid-row: 1;
    }

    .image-text.reverse .image {
        grid-column: 1 / 2;
        grid-row: 1;
    }
}

@media (max-width: 992px) {
    .image-text {
        margin: 90px auto;
        gap: 50px;
    }

    .image-text .title {
        font-size: 2rem;
    }

    .image-text .btn-primary {
        margin-top: 24px;
    }

    .image-text .content,
    .image-text .image {
        max-width: 600px;
        margin: 0 auto;
    }

    .image-text.initial .image {
        padding-right: 30px;
    }

    .image-text.reverse .image {
        padding-left: 30px;
    }

    .image-text .image::after {
        width: calc(100% - 30px);
        border-radius: 25px;
    }

    .image-text.initial .image::after {
        translate: 30px -20px;
    }

    .image-text.reverse .image::after {
        translate: 0 -20px;
    }

    .image-text .image img {
        border-radius: 25px;
    }

    .image-text:has(+ .card-wrapper) {
        margin-bottom: 40px;
    }

    .card-wrapper {
        display: flex;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-top: 40px;
        padding-bottom: 15px;
    }

    .card-wrapper .card {
        flex: 0 0 85%;
    }
}