#bar {
    position: absolute;
    width: 100%;
    z-index: 100;
    transition:top 0.2s ease-out;
    text-transform: uppercase;
    left: 0;
}
#bar.fixed {
    position: fixed;
    width: 100%;
    margin: 0 auto;
    top: 0;
}
#bar.hidden {
    top: -2.25rem;
}
#titlebar {
    background-color: #f8f8f8;
    height: 2.25rem;
    padding: 0 0.75rem;
    border-bottom: 1px solid #767676;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.titlebar-titles {
    display: flex;
    align-items: center;
}
#titlebar h1, #titlebar h3 {
    position: relative;
    top: 0.08em;
    font-size: 0.75rem;
    margin: 0;
    padding: 0;
    padding-right: 0.4em;
    text-transform: uppercase;
    font-weight: normal;
    white-space: nowrap;
}
@media (min-width: 350px) { #titlebar h1, #titlebar h3 { font-size: 0.8rem } }
@media (min-width: 400px) { #titlebar h1, #titlebar h3 { font-size: 1rem } }
#titlebar h3 {
    font-family: CogitoLight;
}
#burgerBtn {
    display: block;
    width: 2.875em;
    height: 2.25em;
    background: no-repeat content-box url(../images/burger.png);
    background-size: 100% 100%;
    padding: 0.5em;
    margin-right: -0.75em;
}
#bar img {
    max-height: 1em;
    display: inline-block;
    width: auto;
    max-width: 100%;
}
#menubar {
    background-color: white;
    width: 100vw;
    opacity: 0;
    height: 0;
    overflow: hidden;
}
#menulist {
    padding: 1em;
    display: grid;
}

#menulist a {
    font-size: 1.5em;
    padding-bottom: 0.33em;
}

#menulist a:hover {
    opacity: 0.6;
}
#lang-and-networks,
#changeLangage {
    display: block;
    border-top: 1px solid #767676;
    padding-top: 1em;
    margin-top: 2em;
}
#lang-and-networks > a {
   display: block;
}
#lang-and-networks img {
    width: 1.5em;
    padding-right: 0.8em;
}

@media (min-width: 768px) {
    #bar.hidden {
        top: -5.2rem;
    }
    #bar img {
        display: block;
    }
    #titlebar {
        border-bottom: none;
        justify-content: center;
        height: 4rem;
        padding: 0 1.25rem;
    }
    #titlebar h1, #titlebar h3 {
        font-size: 1.375rem;
    }
    #titlebar h3 {
        padding-right: 0;
    }
    #burgerBtn {
        display: none;
    }
    #menubar {
        height: auto;
        min-height: auto;
        overflow: visible;
        display: block;
        background-color: #f8f8f8;
        border-bottom: 1px solid #767676;
        font-size: 0.75rem;
        padding: 0 1.25rem;
        opacity: 1;
    }
    #menulist {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        max-width: calc(56rem - 1.25rem * 2); /* taille du body sans son padding */
        margin: 0 auto;
        padding: 0 0.5em;
    }
    #lang-and-networks,
    #changeLangage {
        display: inline-block;
        border-top: none;
        padding-top: 0;
        margin-top: 0;
    }
    #lang-and-networks > a {
        display: inline-block;
    }
    #lang-and-networks img {
        display: inline-block;
        width: auto;
        height: 0.9em;
        vertical-align: -10%;
        padding-right: 0;
    }
    #menulist a {
        font-size: 1em;
        padding-left: 0.4em;
        padding-right: 0.4em;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
    #menulist a > span {
        padding-top: 0.4em;
        padding-bottom: 0.4em;
    }
    #menulist a.active > span {
        border-top: 1px solid;
    }
    #lang-and-networks .socialNetworkName {
        display: none;
    }
}

/* --------------------------- */
/* offset all page because of menu position is absolute */

#page-content {
    padding-top: 2.1rem;
}

@media (min-width: 768px) {
    #page-content {
        padding-top: 5.2rem;
    }
}

html.sidebar-is-open #menubar {
    height: auto;
    min-height: calc(100vh - 2.25rem);
    opacity: 1;
    transition: opacity 0.3s;
}

html.sidebar-is-open #page-content {
    position: fixed;
    transition: opacity 0.5s;
    opacity: 0;
}
html.sidebar-is-open #burgerBtn {
    background-image: url(../images/burgerClose.png);
    background-size: contain;
    background-position: right;
}
