section:not(.cartes) {

    h1:has(+p),
    .h1_like:has(+.p),
    h2:has(+p),
    .h2_like:has(+.p),
    h3:has(+p),
    .h3_like:has(+.p),
    h4:has(+p),
    .h4_like:has(+p) {
        margin-bottom: 20px;
    }
}

section {

    .section__title:has(h1+p),
    .section__title:has(.h1_like+p),
    .section__title:has(h2+p),
    .section__title:has(.h2_like+p),
    .section__title:has(h3+p),
    .section__title:has(.h3_like+p),
    .section__title:has(h4+p),
    .section__title:has(.h4_like+p) {
        margin-bottom: 50px;
    }
}

section {
    &:not(.paragraphs):not(.columns) {
        .section__title {
            &.text-center {
                margin: 0 auto !important;
            }
        }
    }

    .section__title {
        display: flex;
        flex-direction: column;
        position: relative;
        width: fit-content;

        >.surtitre {
            top: 0;
        }

        &.text-center {
            max-width: 960px;
            margin: 0 auto 50px auto;
            text-align: center;

            * {
                text-align: center;
            }

            .surtitre {
                left: 50%;
                transform: translateX(-50%) translateY(-50%);
            }
        }

        &.text-end {
            text-align: right;
            margin-left: auto;

            * {
                text-align: right;
            }

            .surtitre {
                left: 50%;
                transform: translateX(-50%) translateY(-50%);
            }
        }

        &.text-start {
            text-align: left;

            * {
                text-align: left;
            }

            .surtitre {
                left: 50%;
                transform: translateX(-50%) translateY(-50%);
            }
        }

        p {
            max-width: 720px;
        }
    }
}

section:not(.galerie, .form) {
    .section__title {


        p {
            margin: 0 auto;
        }
    }
}

/* section:not(.hdp, [data-color]) {
    +section:not([data-color], .form, .cpt) {
        padding-top: 0 !important;
    }
} */

section {
    &.pb-0 {
        padding-bottom: 0px;
    }

    &.pt-0 {
        padding-top: 0px;
    }
}

section {
    padding: 40px 0;
}

@media (min-width: 768px) {
    section {
        padding: 60px 0;
    }
}

section {
    &[data-color="#ffffff"] {
        background-color: var(--white);
        position: relative;

        &:has(+ [data-color="#ffffff"]) {
            padding-bottom: 25px;

        }

        &+section[data-color="#ffffff"] {
            padding-top: 25px;
        }
    }

    &:not([data-color]),
    &[data-color="#d9d9d9"],
    &[data-color="#ffffff"] {
        .section__title {
            h2 {
                color: var(--main-color-1) !important;
            }
        }
    }

    &[data-color="#0072ba"],
    &[data-color="#434457"] {

        .section__title,
        &.paragraphs {

            h1,
            h2,
            h3,
            h4,
            h5,
            p,
            li {
                color: var(--white);
            }
        }
    }

    &[data-color="#0072ba"],
    &[data-color="#434457"],
    &[data-color="#d9d9d9"] {

        .wrapper_slider .splide__arrows .splide__arrow--prev,
        .wrapper_slider .splide__arrows .splide__arrow--next {
            &:not(:hover) {
                border: 1px solid var(--white) !important;
            }
        }

        .wrapper_slider .splide__arrows .splide__arrow--prev::after,
        .wrapper_slider .splide__arrows .splide__arrow--next::before {
            color: var(--white) !important;
        }

        .wrapper_slider .splide__arrows .splide__arrow--prev::before,
        .wrapper_slider .splide__arrows .splide__arrow--next::after {
            filter: brightness(0) saturate(100%) invert(91%) sepia(92%) saturate(32%) hue-rotate(106deg) brightness(108%) contrast(107%) !important;
        }
    }

    &[data-color="#434457"] {
        background: var(--main-color-2-light);
        position: relative;

        &:has(+ [data-color="#434457"]) {
            padding-bottom: 25px;

        }

        &+section[data-color="#434457"] {
            padding-top: 25px;
        }
    }

    &[data-color="#0072ba"] {
        background: var(--main-color-1);
        position: relative;

        &:has(+ [data-color="#0072ba"]) {
            padding-bottom: 25px;

        }

        &+section[data-color="#0072ba"] {
            padding-top: 25px;
        }
    }

    &[data-color="#d9d9d9"] {
        background: var(--grey-light);
        position: relative;

        &:has(+ [data-color="#d9d9d9"]) {
            padding-bottom: 25px;

        }

        &+section[data-color="#d9d9d9"] {
            padding-top: 25px;
        }
    }
}

section {
    &:has(table) {
        @media (max-width: 992px) {

            margin-bottom: 40px;
            padding-bottom: 0px;

            >.container {
                max-width: 100%;

                >table {
                    width: 100% !important;
                    max-width: 100%;
                    table-layout: fixed;
                    font-size: 12px;

                    td {
                        word-wrap: break-word;
                        overflow-wrap: break-word;
                        padding: 4px !important;
                        border-width: 2px !important;

                        h3, h4 {
                            font-size: 14px;
                            line-height: 1.2;
                        }

                        img {
                            max-width: 100%;
                            height: auto;
                        }

                        .bouton {
                            padding: 6px 8px;
                            font-size: 11px;
                            white-space: normal;
                        }
                    }
                }
            }
        }
    }

    &.full_1col {
        &:has(table) {
            h3 {
                font-family: var(--title-font);
            }
        }

        p {
            &:has(>img) {
                text-align: center;
                display: flex;
                align-items: center;
                margin: auto;
                width: fit-content;
                gap: 10px;
            }
        }
    }

    &:not(.full_1col) {
        table {
            tbody {
                @media (max-width: 992px) {
                    overflow-x: scroll !important;
                }

                tr {
                    height: 50px;

                    &:not(:first-child):not(:nth-child(2)):not(:last-child) {
                        padding-top: 20px !important;
                        border-bottom: 1px solid var(--dark);

                        td {
                            &:first-child {
                                background-color: var(--grey-light);
                            }
                        }
                    }

                    td {
                        padding: 10px;
                        border: 10px solid var(--white);

                        .bouton {
                            margin: auto;
                        }
                    }
                }
            }
        }
    }
}