/*  mega menu */
.header-section {
    .logo-nav {
        width: calc(100% - 240px) !important;
    }

    .et_pb_row--with-menu {
        display: flex;
        justify-content: flex-end !important;
    }
    .nav>li:nth-child(2)>ul {
        width: 340px !important;
        padding: 20px !important;
        left: 106px !important;

        &>li {
            width: 300px !important;
            display: block;
            padding: 0 !important;
            position: relative;
            z-index: 2;

            &:after {
                content: '';
                background: #39B4E7;
                background: linear-gradient(90deg, rgba(57, 180, 231, 1) 0%, rgba(81, 176, 71, 1) 100%);
                position: absolute;
                top: 0;
                right: 100%;
                bottom: 0;
                left: 0;
                transition: all 400ms ease-in-out;
            }

            &>a {
                width: 100% !important;
                display: block;
                padding: 15px 18px !important;
                z-index: 1;
            }
        }
        &>li.et-hover, &>li:hover {
            &>a {
                color: var(--blanc) !important;
            }

            &:after {
                right: 0 !important;
            }
        }
    }
    #menu-menu-pricipal {
        &>li:nth-child(3), &>li:nth-child(4) {
            &>.sub-menu {
                &>li {
                	display: flex;
                	justify-content: flex-start;
                	align-items: center;
                    padding-left: 10px !important;

                    a {
                        z-index: 5;
                        opacity: 1 !important;
                    }
                    &>a {
                        &::after {
                            width: 16px !important;
                            height: 20px !important;
                            right: 8px !important;
                        }
                    }

                	&::before {
                		content: '';
                		background-size: contain !important;
                		width: 35px;
                		min-width: 35px;
                		height: 35px;
                		display: flex;
                		align-items: center;
                		margin-right:5px;
                        position: relative;
                        z-index: 5;
                        transition: all 400ms ease-in-out;
                	}

                    &>.sub-menu {
                        &>li {
                            &>a {
                                display: flex;
                                justify-content: flex-start;
                                align-items: flex-start;

                                &::before {
                                    content: '';
                                    background: url(/wp-content/uploads/2026/02/cropped-favicon-1.png) center no-repeat;
                                    background-size: contain;
                                    width: 25px;
                                    min-width: 25px;
                                    height: 25px;
                                    margin-right: 10px;
                                    display: flex;
                                }
                            }
                        }
                    }
                }
                &>li.et-hover, &>li:hover,
                &>li.current-menu-ancestor, &>li.current-menu-parent {
                    &::before {
                        filter: brightness(10) invert(0) !important;
                    }

                    &>.sub-menu {
                        &>li.et-hover, &>li:hover, &>li.current-menu-item {
                            &>a {
                                &::before {
                                    filter: brightness(10) invert(0) !important;
                                }
                            }
                        }
                    }
                }
            }
        }
        &>li:nth-child(3) {
            &>.sub-menu {
                &>li:first-child {
                	&::before {
                		background: url(/wp-content/uploads/2026/02/icone-proFormation.png) center no-repeat;
                	}
                }
                &>li:last-child {
                	&::before {
                		background: url(/wp-content/uploads/2026/02/icone-reconversion.png) center no-repeat;
                	}

                    &>.sub-menu {
                        &>li {
                            display: none !important;
                        }
                    }
                }
            }
        }
        &>li:nth-child(4) {
            &>.sub-menu {
                &>li:first-child {
                    &::before {
                        background: url(/wp-content/uploads/2026/02/icone-formations-longues.png) center no-repeat;
                    }
                }
                &>li:nth-child(2) {
                    &::before {
                        background: url(/wp-content/uploads/2026/02/icone-etancheite.png) center no-repeat;
                    }
                }
                &>li:nth-child(3) {
                    &::before {
                        background: url(/wp-content/uploads/2026/02/icone-electrique.png) center no-repeat;
                    }
                }
                &>li:nth-child(4) {
                    &::before {
                        background: url(/wp-content/uploads/2026/02/icone-hydroelectricite.png) center no-repeat;
                    }
                }

                &>li:nth-child(5) {
                    &::before {
                        background: url(/wp-content/uploads/2026/02/icone-traitement-de-leau.png) center no-repeat;
                    }
                }
                &>li:nth-child(6) {
                    &::before {
                        background: url(/wp-content/uploads/2026/02/icone-reglementation.png) center no-repeat;
                    }
                }
                &>li:last-child {
                    &::before {
                        background: url(/wp-content/uploads/2026/02/icone-reconversion.png) center no-repeat;
                    }
                }
            }
        }
        li.current-menu-ancestor, li.current-menu-parent {
            &>a {
                color: var(--bleu) !important;
            }

            &>.sub-menu {
                li.current-menu-item {
                    &>a {
                        color: var(--blanc) !important;
                    }

                    &::before {
                        filter: brightness(10) invert(0) !important;
                    }

                    &::after {
                        right: 0 !important;
                    }
                }
            }

            &:after {
                right: 0 !important;
            }
        }
        &>li:nth-child(3).current-menu-ancestor, &>li:nth-child(4).current-menu-ancestor {
            &>.sub-menu {
                &>li.current-menu-ancestor, &>li.current-menu-parent {
                    &>a {
                        color: var(--blanc) !important;
                    }
                }
            }
        }
    }
}
.header-section {
    #menu-menu-pricipal {
        &>li:nth-child(2){
            &>.sub-menu {
                &>li:last-child {
                    width: 320px !important;
                    display: block;
                    padding: 0 !important;
                    position: relative;
                    z-index: 2;

                    &>a {
                        &::after {
                            right: 34px !important;
                            top: 14px !important;
                            transform: rotate(-90deg) !important;
                        }
                        span {
                            display: block;
                            position: relative;
                            z-index: 1;
                        }
                    }

                    &>.sub-menu {
                        background: var(--blanc) !important;
                        padding: 0 !important;
                        width: inherit !important;
                        display: flex;
                        justify-content: flex-start;
                        align-items: flex-start;
                        flex-direction: column;
                        flex-wrap: wrap;
                        border: none !important;
                        position: absolute;
                        top: 0;
                        left: 320px;
                        width: 340px !important;
                        z-index: 5;
                        overflow: hidden !important;
                        opacity: 0 !important;

                        &>li {
                            width: 100% !important;
                            margin-bottom: 0 !important;
                            padding: 0 !important;

                            &>a {
                                width: 100% !important;
                                padding: 15px 20px !important;
                                position: relative;

                                span {
                                    display: block;
                                    position: relative;
                                    z-index: 1;
                                }

                                &:after {
                                    content: '';
                                    background: #39B4E7;
                                    background: linear-gradient(90deg, rgba(57, 180, 231, 1) 0%, rgba(81, 176, 71, 1) 100%);
                                    position: absolute;
                                    top: 0;
                                    right: 100%;
                                    bottom: 0;
                                    left: 0;
                                    transition: all 400ms ease-in-out;
                                }
                            }
                        }
                    }
                }
                li.current-menu-ancestor, li.current-menu-parent {
                    &>a {
                        color: var(--blanc) !important;
                    }
                    &>.sub-menu {
                        li.current-menu-item, li:hover {
                            &::before {
                                filter: brightness(10) invert(0) !important;
                            }

                            &>a {
                                color: var(--blanc) !important;

                                &::after {
                                    right: 0 !important;
                                }
                            }
                        }
                    }

                    &:after {
                        right: 0 !important;
                    }
                }
                li:hover {
                    &>.sub-menu {
                        overflow: visible !important;
                        opacity: 1 !important;
                    }
                }
                &>li {
                    &>.sub-menu {
                        li:hover {
                            &>a {
                                color: var(--blanc) !important;

                                &::after {
                                    right: 0 !important;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: 1200px){
    .et_pb_menu_page_id-2891 {
        display: none !important;
        opacity: 0 !important;
    }
    .dtb-menu .et_mobile_menu .sub-menu-toggle {
        width: 26px !important;
        height: 26px !important;
        top: 7px !important;
        right: 14px !important;
    }
    .dtb-menu .et_mobile_menu .sub-menu-toggle::before {
        line-height: 25px !important;
    }
    body .et_mobile_menu {
        &>li {
            &>.sub-menu {
                &>li.menu-item-has-children {
                    background: #42b3c010 !important;

                    &>.sub-menu {
                        
                    }
                }
            }
        }
    }
    .et-db #et-boc .et-l .dtb-menu .et_mobile_menu .sub-menu-toggle.popped~ul.sub-menu {
        background: #42b3c010 !important;
    }
    .et_pb_row_1_tb_header.et_pb_row {
        padding-bottom: 9px !important;
    }
}
@media (max-width: 980px){
    .header-section {
        .logo-nav {
            width: 100% !important;
            float: none;
            display: block !important;
        }
    }
}
@media (max-width: 980px) {
    .header-section {
        &::before {
            display: none !important;
        }
    }
    body .top-bar {
        right: 0 !important;

        .logo {
            left: 40px;
        }

        .ct-coor {
            padding-right: 45px;
            .et_pb_blurb {
                margin: 0 !important;
                .et_pb_blurb_container {
                    font-size: 0 !important;
                }
            }
        }
        .tel {
            .et-pb-icon {
                color: var(--bleu) !important;
                width: 40px;
                height: 40px;
                display: flex;
                justify-content: center;
                align-items: center;
                border-radius: 5px;
            }
        }
        .btnCatalogue {
            width: 40px !important;
            height: 40px;
            font-size: 0 !important;
            padding: 0 !important;
            display: flex;
            justify-content: center;
            align-items: center;

            &::after {
                content: '';
                background: url(/wp-content/uploads/2026/02/caracteristiques.png) center no-repeat;
                background-size: contain;
                width: 30px;
                height: 30px;
                display: block;
                position: relative !important;
                top: 0 !important;
                bottom: 0 !important;
            }
            
        }
        .btnCatalogue:hover, .btnCandidature:hover {
            padding: 0 !important;
        }
        .btnCandidature {
            width: 40px !important;
            height: 40px;
            font-size: 0 !important;
            padding: 0 !important;
            display: flex;
            justify-content: center;
            align-items: center;

            &::after {
                content: '';
                background: url(/wp-content/uploads/2026/02/accompagner.png) center no-repeat;
                background-size: contain;
                width: 30px;
                height: 30px;
                display: block;
                position: relative !important;
                top: 0 !important;
                bottom: 0 !important;
            }
        }
    }
    body .et_mobile_menu {
        padding: 0 !important;
        border-top: 3px solid #39b4e7 !important;
        overflow-y: scroll;
        min-height: 210px;
        max-height: 620px;

        &>li.menu-item-has-children {
            &>a {
                display: flex;
                justify-content: space-between;
                align-items: center;
                position: relative;
                z-index: 1;
            }
            &>ul.sub-menu {
                overflow: hidden;
                height: 0 !important;
                transition: all 400ms ease-in-out;
            } 
        }

        &>li.menu-item-has-children:hover {
            &>a {
                color: var(--bleu) !important;
            }
            &>ul.sub-menu {
                overflow: visible;
                height: 100% !important;
            } 
        }

        &>li:nth-child(2) {
            &>ul.sub-menu {
                li {
                    position: relative;
                    a {
                        position: relative;
                        z-index: 1;
                    }
                    &:after {
                        content: '';
                        background: #39B4E7;
                        background: linear-gradient(90deg, rgba(57, 180, 231, 1) 0%, rgba(81, 176, 71, 1) 100%);
                        position: absolute;
                        top: 0;
                        right: 100%;
                        bottom: 0;
                        left: 0;
                        transition: all 400ms ease-in-out;
                    }
                }
                li:hover {
                    a {
                        color: var(--blanc) !important;
                    }
                    &:after {
                        right: 0 !important;
                    }
                }
                li.current-menu-ancestor, li.current-menu-parent, 
                li.current_page_parent, li.current_page_ancestor {
                    &>a {
                        color: var(--bleu) !important;
                    }

                    &>.sub-menu {
                        li.current-menu-item, li.current_page_item {
                            position: relative !important;

                            &>a {
                                color: var(--blanc) !important;
                            }

                            &::after {
                                right: 0 !important;
                            }
                        }
                    }
                }
            } 
        }

        &>li:nth-child(3), &>li:nth-child(4) {
            .sub-menu>li {
                padding-left: 20px !important;

                .sub-menu>li {
                   position: relative;
                    a {
                        position: relative;
                        z-index: 1;
                    }
                    &:after {
                        content: '';
                        background: #39B4E7;
                        background: linear-gradient(90deg, rgba(57, 180, 231, 1) 0%, rgba(81, 176, 71, 1) 100%);
                        position: absolute;
                        top: 0;
                        right: 100%;
                        bottom: 0;
                        left: 0;
                        transition: all 400ms ease-in-out;
                    } 
                }
                .sub-menu>li:hover {
                    a {
                        color: var(--blanc) !important;
                    }
                    &:after {
                        right: 0 !important;
                    }
                }
            }
        }
    }
}
@media (max-width: 768px){
    body .et_mobile_menu {
        max-height: 600px;
    } 
    .header-section {
        .top-bar {
            .ct-coor {
                flex-wrap: wrap;
                top: 12px !important;
                padding-right: 20px !important;
                .rs {
                    margin-top: -20px !important;
                    margin-bottom: 8px !important;
                }
            }
        }
    }
    .hero {
        &::before {
            height: 50px;
        }
    }
    body #page-container .banner-section.et_pb_section {
        height: 455px !important;

        &>.et_pb_row {
            padding: 0 !important;
            width: 90% !important;

            &>.et_pb_text {
                margin: 0 !important;
                padding: 0 !important;
            }
        }
    }
    .et_pb_section_0.et_pb_section {
        padding-top: 150px !important;
        padding-bottom: 50px !important;
    }
    body #page-container h1 {
        font-size: 30px !important;
        line-height: 36px !important;
    }
    .page {
        .hero {
            height: inherit !important;

            .et_pb_row {
                width: 90% !important;

                .et_pb_text {
                    max-width:100% !important;
                }
            }
        }
    }
}

/*ACTUALITE*/
.single-post {
    .et_pb_post {
        .et_post_meta_wrapper {
            display: none !important;
        }
    }
}
.ligne-actualite {
    .et_pb_post {
        .entry-title {
            min-height: 80px;
        }
    }  
}
.listeActue {
    .et_pb_ajax_pagination_container {
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 40px;
        flex-wrap: wrap;
    }
    .et_pb_post {
        background: var(--blanc);
        width: calc(33.333% - 27px);
        border-radius: 20px;
        box-shadow: 0px 14px 20px -6px rgb(0 0 0 / 15%);
        padding-bottom: 36px;
        overflow: hidden;
        min-height: 648px;
        margin: 0 !important;

        img {
            height: 320px;
            object-fit: cover;
        }

        .entry-title {
            color: #42B3C0 !important;
            padding-left: 25px;
            padding-bottom: 0;
            margin-bottom: 20px;
            font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif;
            min-height: 80px;
        }

        .post-content {
            padding-left: 25px;
        }

        .post-content-inner {
            margin-bottom: 15px;
        }

        .more-link {
            background: linear-gradient(90deg, rgba(57, 180, 231, 1) 0%, rgba(81, 176, 71, 1) 100%);
            color: #fff !important;
            max-width: 130px;
            text-align: center;
            padding: 8px 15px;
            border-radius: 5px;
            font-size: 16px;
            font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif !important;
        }

        .more-link:first-letter { 
           text-transform: uppercase;
        }
    }
}
@media (max-width: 1280px){
    .listeActue {
        .et_pb_ajax_pagination_container {
            gap: 30px;
        }
        .et_pb_post {
            background: var(--blanc);
            width: calc(50% - 15px);
            min-height: 648px;

            img {
                height: 280px;
            }

            .entry-title {
                min-height: 80px;
            }
        }
    }
}
@media (max-width: 767px){
    .listeActue {
        .et_pb_ajax_pagination_container {
            gap: 20px;
        }
        .et_pb_post {
            background: var(--blanc);
            width: 100%;
            min-height: inherit;

            .entry-title {
                min-height: inherit;
            }
        }
    }
}