/*gestion espacement blocs*/
.wp-block-post-content > .wp-block-group,
.wp-block-post-content > .wp-block-group.alignwide,
.wp-block-post-content > .wp-block-group.alignfull,
.archive main .wp-block-group.alignwide,
.archive main .wp-block-group.alignfull,
.wp-block-group.incitation-contact {
    margin-block-start: var(--wp--preset--spacing--xl) !important;
}

/*bloc deco bleu clair*/
.wp-block-post-content > .wp-block-group.is-style-quaternary {
    & + * {
        margin-block-start: 0 !important;
    }
}


.is-style-colorprimarycap + *, .entry-content > .is-style-quinary:first-child {
    margin-block-start: 0 !important;
}

.wp-block-group {
    position: relative;
    /*Votre formation IA */
    .is-style-secondary {
        .wp-block-columns {
            @media (min-width: 784px) and (max-width: 993px) {
                gap: 2em var(--wp--preset--spacing--l);
            }
            .wp-block-column:first-child{
                @media (max-width: 781px) {
                    text-align: center;
                }
            }
        }

        > .wp-block-group {
            >.wp-block-columns{
                @media (max-width: 781px) {
                    margin-top:var(--wp--preset--spacing--l) !important;
                }
            }
        }

        .wp-block-buttons{
            @media (max-width: 783px) {
                justify-content: center;
            }
        }

        .is-style-numrond{
            @media (max-width: 783px) {
                margin: 0 auto;
            }
            & ~ p, & ~ .wp-block-heading {
                @media (max-width: 783px) {
                    text-align: center;
                }
            }
            & ~ .wp-block-buttons{
                @media (max-width: 783px) {
                    display: flex;
                    flex-direction: row;
                    align-items: flex-start;
                    justify-content: center;
                }
            }

        }
    }

    /*hero banner*/
    .is-style-quinary {
        width: 100vw;
        position: relative;
        z-index: 49;
        padding-top:var(--wp--preset--spacing--xl);
        @media (max-width: 992px) {
            z-index: inherit;
        }
        &.alignfull {
            padding-left: var(--wp--preset--spacing--s);
            @media screen and (min-width: 993px) {
                padding-left: var(--wp--preset--spacing--m);
            }
            @media screen and (min-width: 1200px) {
                padding-left: var(--wp--preset--spacing--l);
            }
            @media screen and (min-width: 1440px) {
                padding-left: var(--wp--preset--spacing--xl);
            }
            @media screen and (min-width: 1720px) {
                padding-left: var(--wp--preset--spacing--xxxl);
            }

                .wp-block-heading.has-xxxl-font-size {
                    @media screen and (min-width: 783px) and (max-width: 992px) {
                        /*font-size: var(--wp--preset--font-size--xl)!important;*/
                    }
                    @media screen and (min-width: 993px) and (max-width: 1200px) {
                        font-size: var(--wp--preset--font-size--xxl)!important;
                    }
            }
        }

        .is-style-image-ronde {
            /*right: var(--wp--preset--spacing--s);*/
            position: relative;
            @media screen and (min-width: 783px) {
                position: absolute;
                bottom:inherit;
                top:50%;
                right:-5%;
                transform: translateY(-50%);
            }
            @media screen and (min-width: 993px) {
                top:inherit;
                bottom:  calc(-1 * var(--wp--custom--borderradimg--largeur));
                right: calc(var(--wp--preset--spacing--m) - var(--wp--custom--borderradimg--largeur)) ;
                transform:inherit;
            }
            @media screen and (min-width: 1200px) {
                right: calc(var(--wp--preset--spacing--l) - var(--wp--custom--borderradimg--largeur)) ;
                transform:inherit;
            }
            @media screen and (min-width: 1440px) {
                right: var(--wp--preset--spacing--xl);
            }
            @media screen and (min-width: 1720px) {
                right: var(--wp--preset--spacing--xxxl);
            }
        }

        .wp-container-core-group-is-layout-5{
            @media screen and (min-width: 1440px) and (max-width: 1720px) and (max-height: 800px) {
                gap: var(--wp--preset--spacing--l);
            }
            @media screen and (max-width: 783px) {
             gap: var(--wp--preset--spacing--l);
            }
        }
        .wp-container-content-2, .is-style-image-ronde{
            flex-basis: 100%;
        }
        .wp-container-core-group-is-layout-4{
            .wp-block-group-is-layout-flex{
                gap: calc(var(--wp--preset--spacing--xs) / 2);
            }
        }

        /*cibler 1er p en capital*/
        .is-style-default.has-xs-font-size{
            letter-spacing: 0.1em;
        }

        .wp-block-group .wp-block-group:nth-child(2){
            max-width: 610px;
            row-gap: 0;
            @media screen and (max-width: 783px) {
                max-width: 100%;
            }
        }

        p.has-secondary-color a{
            text-decoration: none;
            &:hover, &:focus{
                color:var(--wp--preset--color--white);
            }
        }

    }

    .is-style-tertiary{
        .wp-block-columns{
            .wp-block-column:nth-child(1){
                @media screen and (max-width: 783px) {
                    order: 2;
                }
            }
            .wp-block-column:nth-child(2){
                @media screen and (max-width: 783px) {
                    order: 3;
                }
            }
            .wp-block-column:nth-child(3){
                @media screen and (max-width: 783px) {
                    order: 4;
                }
            }
            .wp-block-column:nth-child(4){
                @media screen and (max-width: 783px) {
                    order: 1;
                }
            }
        }
    }

    /*le sticky de la formation et de la page formation agent*/
    .is-style-nonary{
        box-shadow: -1px 3px 13px 0 rgba(176,176,176,0.60);
        position: sticky;
        top:0;
        z-index: 990;
        .wp-block-column{
            @media screen and (max-width: 783px) {
                text-align: center;
            }
            /*on cache le détail de la formation dans le sticky*/
            &:first-child {
                /*titre*/
                 p.has-l-font-size{
                    line-height: 1.1em;
                     @media screen and (min-width: 1200px) {
                         display: none;
                     }
                }
                /*description*/
                .wp-block-columns{
                    margin-top:0;
                    @media screen and (max-width: 1199px) {
                        display: none;
                    }
                }
                p{
                    @media screen and (max-width: 1199px) {
                        margin-bottom:0;
                    }
                }
            }
            .wp-block-group{
                @media screen and (max-width: 783px) {
                    justify-content: center;
                }
            }

        }
        .wp-block-buttons.is-content-justification-right{
            @media screen and (max-width: 783px) {
                justify-content: center;
            }
        }
    }

    /*bloc chiffre pourcentage bleu foncé*/
    &.is-style-denary{
        background: var(--wp--preset--color--primary);
        border-radius: var(--wp--custom--radius--l);
        padding: var(--wp--preset--spacing--l);
        p{
            color: var(--wp--preset--color--white);
            max-width: 70%;
            @media screen and (max-width: 992px) {
                max-width: 100%;
            }
            &.is-style-chiffregros{
                max-width: 100%;
            }
        }
    }

    /*wrapper youtube*/
    &.is-style-undecenary{
        .wp-block-embed{
            border-radius: var(--wp--custom--radius--l);
            overflow: hidden;
        }
    }

    /*fond bleu clair + titre intro + 2 colonnes avec tittre fond bleu cleir et pictos*/
    &.is-style-duodenary {
        border-radius: var(--wp--custom--radius--l);
        background: var(--wp--preset--color--quaternary);
        padding-top: var(--wp--preset--spacing--xl);
        padding-bottom: var(--wp--preset--spacing--xl);

        > .wp-block-group {
            /*haut titre*/
            > .wp-block-group:first-child {
                margin-bottom: var(--wp--preset--spacing--l);
            }

            /*colones*/
            > .wp-block-columns .wp-block-column {
                display: flex;
                flex-direction: column;
            }
        }
    }


    /*fond bleu clair pour titre avec pictos  */
    &.is-style-terdenary{
        background: var(--wp--preset--color--secondary);
        border-radius: var(--wp--custom--radius--l);
        padding: var(--wp--preset--spacing--m);
        margin-bottom: var(--wp--preset--spacing--xs);
    }

    /*fond blanc pour colonne  */
    &.is-style-quattuordenary{
        background: var(--wp--preset--color--white);
        border-radius: var(--wp--custom--radius--l);
        padding: var(--wp--preset--spacing--l);
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        .wp-block-list > li{
            margin-bottom: var(--wp--preset--spacing--s);
            &:last-child{
                margin-bottom: 0;
            }
        }
    }
}

.entry-content > .wp-block-group:nth-child(2){
    margin-block-start: calc( var(--wp--preset--spacing--l) + 40px)!important;
}

.formations-template-default .entry-content > .wp-block-group:nth-child(2),
.entry-content > .wp-block-group.is-style-nonary
{
    margin-block-start: 0!important;
}

.formations-template-default .entry-content > .wp-block-group.is-style-nonary{
    p.has-l-font-size{
        @media screen and (min-width: 1200px) {
            display: block;
        }
    }
}