/* header & footer*/

.bandeau {
    margin: 0;
    padding: 0 calc(50% - var(--max-width) - var(--side-padding));
    max-width: 100%;
    color: var(--main-color);
    box-sizing: content-box;
    position: sticky;
    top: 0;
    z-index: 10000;
    background: linear-gradient(to left, var(--specific-color), white)
}

/*--------------------------header------------------------------*/

#header-yl {
    border-bottom: solid var(--rule-height) black;
}

.header-top {
    justify-content: space-between;
    align-items: center;
    height: var(--height-header);
    overflow: hidden;
    transition: height 0.3s ease;
}

.header-logo {
    width: 300px;
    max-width: calc(100% - 2 * var(--side-padding) - 20px);
    margin-left: var(--side-padding);
}

.header-logo img {
    width: 100%;
    height: auto;
    display: block;
}

/*--------------------------menus------------------------------*/

nav {
    width: 100%;
}

.primary-menu {
    position: relative;
    text-transform: uppercase;
    font-weight: bold;
    /*avoid submenu shutdown before accessing it*/
    line-height: var(--line-height);
    cursor: pointer;
    user-select: none;
}

.primary-menu:after {
    position: absolute;
    bottom: 0px;
    content: "";
    width: 0;
    height: 3px;
    background-color: var(--main-color);
}

.primary-menu:hover:after {
    display: block;
    width: 24px;
    transition: all 0.3s ease;
}

/*---------------- sous menus -----------------------*/

.primary-menu:hover>.sub-menu {
    display: flex;
}

.sub-menu {
    display: none;
    position: absolute;
    width: 300px;
    top: calc(var(--line-height));
    background: linear-gradient(to left, var(--specific-color), white);
    color: black;
    text-align: left;
    text-transform: none;
    border-radius: 5px;
    border: solid var(--rule-height) black;
    z-index: 1000;
    padding: 0 var(--side-padding);
    margin-left: -100px;
}

#secondaire,
#bts,
#cpge {
    width: 250px;
}

#edd-cesc,
#vie-lyceenne {
    width: 180px;
}

#formations-menu,
#vie-lycee {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: flex-start;
    height: 280px;
    min-width: 500px;
    margin-left: -183.417px;
}

#vie-lycee {
    min-width: 360px;
    height: 240px;
}

.sub-menu li a {
    font-weight: normal !important;
}

.sub-menu li:hover {
    color: var(--main-color);
}

.sub-menu-title {
    font-weight: bold;
}

.sub-menu ul {
    list-style: none;
    padding-left: 1em;
}

nav>ul.flex {
    justify-content: space-evenly;
    padding-left: var(--side-padding);
    padding-right: var(--side-padding);
    list-style: none;
    margin: 0;
}

.bandeau a {
    color: inherit;
    text-decoration: none;
}

/*---------------- hamburger -----------------------*/

#hamburger {
    display: none;
    align-self: center;
}

#hamburger button {
    background-color: transparent;
    border: 0px;
    cursor: pointer;
    color: var(--main-color);
    width: unset;
    height: unset;
    margin: 0;
    line-height: 0
}

/*--------bandeau IMPORTANT : &#x26A0; html character pour IMPORTANT------*/

#bandeau-important {
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--main-color);
    position: sticky;
    top: var(--height-header);
    z-index: 1000;
    width: 100%;
    display: block;
    transition: top 0.3s ease;
}

#bandeau-important .paragraph {
    font-weight: bold;
    text-align: center;
    font-size: x-large;
    margin: 0;
}

/*--------------------sidebar -----------------------*/

#sidebar {
    width: 100vw;
    overflow-y: scroll;
    position: absolute;
    top: calc(var(--height-header) + 1px);
    transition: 1s all ease;
    z-index: 10000;
    border-top: 0px;
    background-color: white;
    height: 0px;
    background: linear-gradient(to left, var(--specific-color), white)
}

#sidebar button {
    margin: 0;
    padding: 10px var(--side-padding);
    line-height: var(--line-height);
    border: 0px;
    color: var(--main-color);
    background-color: inherit;
    cursor: pointer;
    width: 100%;
    text-align: left;
    text-transform: uppercase;
    font-weight: bold;
}

#sidebar .accordion:after {
    content: '\f0da';
    float: right;
}

#sidebar .accordion {
    display: block;
    padding: 10px var(--side-padding);
    text-transform: uppercase;
}

/*----------------------footer specifics-----------------------*/

#footer-yl {
    height: calc(1.5 * var(--line-height));
    line-height: calc(1.5 * var(--line-height));
    border-top: solid var(--rule-height) black;
    /*font-size: small;*/
}

#footer-yl .follow {
    display: none
}

#footer-yl .href-animation {
    font-style: normal;
    font-weight: normal;
}

/*----------------------Responsive-----------------------*/

@media screen and (max-width: 1024px),
(pointer : coarse) {

    /*header*/
    #header-yl {
        margin-left: unset;
    }

    #header-yl nav {
        display: none;
    }

    .primary-menu:hover:after {
        display: none
    }

    #hamburger {
        display: flex;
    }

    .sub-menu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-out;
        display: block;
        top: unset;
        border-radius: unset;
        border: unset;
        width: unset;
        margin-left: 0;
        z-index: unset;
        position: unset;
        background-color: white;
    }

    /*bandeau IMPORTANT*/
    #bandeau-important {
        top: calc(var(--height-header) - var(--line-height));
        position: static
    }

    /*footer specifics*/
    .footer-adress {
        flex-direction: column;
        height: unset;
        text-align: center;
        line-height: var(--line-height);
    }

}

@media (max-width: 768px) {
    #hamburger {
        display: flex;
    }

    .header-top {
        flex-wrap: wrap;
    }

    .header-logo {
        width: 200px;
    }
}