.wp-block-columns {
    align-items: normal !important;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap !important;
    @media (min-width: 782px) {
        flex-wrap: nowrap !important;
    }
    /*permet d'améliorer l'espacement des colonnes sur tablette*/
    @media (min-width: 782px) and (max-width: 992px) {
        column-gap: var(--wp--preset--spacing--l) !important;
    }

    .are-vertically-aligned-top {
        align-items: flex-start;
    }

    .are-vertically-aligned-center {
        align-items: center;
    }

    .are-vertically-aligned-bottom {
        align-items: flex-end;
    }

    :not(.is-not-stacked-on-mobile) > .wp-block-column {
        @media (max-width: 781px) {
            flex-basis: 100% !important;
        }
        @media (min-width: 782px) {
            flex-basis: 0;
            flex-grow: 1;
        }
    }

    &.is-style-primary, &.is-style-secondary, &.is-style-quaternary-columns {
        padding: var(--wp--preset--spacing--l);
        @media (max-width: 599px) {
            padding: var(--wp--preset--spacing--m) !important;
        }

    }

    &.is-style-secondary {
        .wp-block-button__link{
            background: var(--wp--preset--color--primary);
            color: var(--wp--preset--color--secondary);

            &:hover, &:focus {
                background: var(--wp--preset--color--white);
                color: var(--wp--preset--color--primary);
            }
        }
        .is-style-button-neutre, .is-style-button-neutre2{
            .wp-block-button__link {
                background: inherit;
                color: inherit;
            }
        }
    }

    /*inverser les colonnes en mobile (page contact)*/
    &.invColMob{
        >.wp-block-column{
            &:nth-child(1){
                @media (max-width: 781px) {
                    order: 2;
                }
            }
            &:nth-child(2){
                @media (max-width: 781px) {
                    order: 1;
                }
            }
        }
    }
}

/*colonnes bloc bleu clair*/
.is-style-quaternary {
    > .wp-block-group {
        > .wp-block-columns {
            @media (min-width: 783px) and (max-width: 1200px) {
                gap: 2em var(--wp--preset--spacing--xl);
            }

            .wp-block-column:nth-child(2) {
                .wp-block-columns {
                    @media (max-width: 782px) {
                        margin-bottom: 0 !important;
                        gap: 0;
                    }
                }
            }
        }
    }

    /*aligner au centre les picto et le texte */
    .wp-block-columns {
        @media screen and (max-width: 782px) {
            width: 100% !important;
        }
        .is-layout-flex {
            .wp-block-image, .wp-block-heading, p {
                @media (max-width: 782px) {
                    text-align: center;
                }
            }
        }
    }

    .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column[style*="flex-basis"] {
        @media (min-width: 768px) {
            flex-grow: 0;
        }
    }

    .wp-block-columns.is-not-stacked-on-mobile {
        flex-wrap: nowrap !important;

        > .wp-block-column {
            flex-basis: 0;
            flex-grow: 1;
        }
    }

    .wp-block-columns.is-not-stacked-on-mobile > .wp-block-column[style*="flex-basis"] {
        flex-grow: 0;
    }

    :where(.wp-block-columns) {
        margin-bottom: 1.75em;
    }

    :where(.wp-block-columns.has-background) {
        padding: 1.25em 2.375em;
    }

    .wp-block-column {
        flex-grow: 1;
        min-width: 0;
        overflow-wrap: break-word;
        word-break: break-word;

        .is-vertically-aligned-top {
            align-self: flex-start;
        }

        .is-vertically-aligned-center {
            align-self: center;
        }

        .is-vertically-aligned-bottom {
            align-self: flex-end;
        }

        .is-vertically-aligned-stretch {
            align-self: stretch;
        }

        .is-vertically-aligned-bottom, .is-vertically-aligned-center, .is-vertically-aligned-top {
            width: 100%;
        }
    }
}

/*Colonnes dans un block Cover */
.is-style-cover-primary {
    .wp-block-columns {
        @media screen and (min-width: 783px) and (max-width: 992px) {
            padding: var(--wp--preset--spacing--l) !important;
        }
        @media screen and (max-width: 782px) {
            padding: var(--wp--preset--spacing--m) !important;
        }
    }
}

/*Colonne de droite en bleu*/
.is-style-septenary {
    position: relative;
    padding-top: calc(var(--wp--preset--spacing--xl) / 2);
    margin-bottom: calc(var(--wp--preset--spacing--xl) * 2)!important;
    > .wp-block-columns {
        > .wp-block-column {
            &:nth-child(2) {
                color: var(--wp--preset--color--white);
                @media screen and (max-width: 782px) {
                    background:var(--wp--preset--color--primary);
                    border-radius: var(--wp--custom--radius--l);
                    padding-top:var(--wp--preset--spacing--l);
                    padding-bottom:var(--wp--preset--spacing--l);
                    padding-left: var(--wp--preset--spacing--m);
                    padding-right: var(--wp--preset--spacing--m);
                    margin-left: calc(-1 * var(--wp--preset--spacing--m));
                    margin-right: calc(-1 * var(--wp--preset--spacing--m));
                    width:100vw;
                }
                &::before {
                    content:"";
                    position: absolute;
                    right: 0;
                    top: 0;
                    height:calc(100% + var(--wp--preset--spacing--xl) / 2);
                    width: calc(50vw + var(--wp--preset--spacing--xl));
                    background: var(--wp--preset--color--primary);
                    border-bottom-left-radius: var(--wp--custom--radius--l);
                    border-top-left-radius: var(--wp--custom--radius--l);
                    @media (min-width: 993px) and (max-width: 1199px) {
                        width: calc(50vw + var(--wp--preset--spacing--l));
                    }
                    @media (min-width: 783px) and (max-width: 992px) {
                        width: calc(52vw + var(--wp--preset--spacing--xl) + 20px);
                    }
                    @media (max-width: 782px) {
                        display:none!important;
                    }
                }
            }
        }
        .wp-block-columns{
            @media screen and (max-width: 782px) {
                width: 100% !important;
                margin-bottom: 0 !important;
                gap: 0;
            }
        }
    }
    .is-layout-flex {
        .wp-block-image, .wp-block-heading, p {
            @media (max-width: 782px) {
                text-align: center;
            }
        }
    }
}

/*separation trait entre colonnes*/
.is-style-columns-tertiary{
    .wp-block-column{
        border-right: 1px solid var(--wp--preset--color--primary);
        @media screen and (max-width: 781px) {
            border-right: inherit;
        }
        &:last-child{
            border-right: inherit;
        }
    }
}

