body {
    margin: 0;
    text-align: justify;
}

/* New class to prevent body scrolling when menu is open */
#container.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

nav {
    height: 60px;
    background-color: #d3f3f9;
    display: flex;
    align-items: center;
}

.links-container {
    display: flex;
    align-items: center;
    width: 100%;
}

nav a {
    padding: 20px 16px;
    text-decoration: none;
    color: rgb(36, 159, 187);
    transition-duration: 0.45s;
    font-family: familjen-grotesk, familjen grotesk, sans-serif;
}

nav a:hover:not(.active) {
    background-color: rgb(159, 220, 232);
    color: rgb(16, 151, 182);
    text-decoration: none;
}

nav a.active {
    color: rgb(16, 151, 182);   
    text-decoration-line: underline;
}

nav .right {
    margin-left: auto;
    margin-right: 10px;
}

#logo {
    width: 2%;
}

footer {
    background-color: rgb(36, 159, 187);
    color: white;
    text-align: center;
    padding: 10px 0pc;
    width: 100%;
    bottom: 0;
    left: 0;
    font-size: 17px;
    line-height: 0.4;
    font-family: familjen-grotesk, familjen grotesk, sans-serif;
}

#logo_footer {
    width: 65px;
    position: absolute;
    left: 20px;
}

@media(max-width: 650px) {
    #logo_footer {
        display: none!important;
    }
}

#sidebar-active {
    display: none;
}

.open-sidebar-button,
.close-sidebar-button {
    display: none;
}

@media(max-width: 1400px) {
    .links-container {
        flex-direction: column;
        align-items: flex-start;
        position: fixed;
        top: 0;
        right: -100%;
        z-index: 10;
        width: 300px;
        height: 100%;
        background-color: #d3f3f9;
        box-shadow: -5px 0 5px rgba(0, 0, 0, 0.25);
        transition: 0.5s ease-out;
        /* Scrolling within the nav menu */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .open-sidebar-button,
    .close-sidebar-button {
        display: block;
        padding: 20px;
        cursor: pointer;
    }
    
    nav a:not(#link-se-connecter) {
        width: 100%;
        box-sizing: border-box;
        padding: 12px 30px;
        justify-content: flex-start;
    }

    nav a#link-se-connecter {
        margin-top: auto;
        margin-bottom: 10px;
        box-sizing: border-box;
        padding: 20px 30px;
        justify-content: flex-start;
        border-radius: 5px;
    }
    
    nav a:not(#link-logout) {
        width: 100%;
        box-sizing: border-box;
        padding: 15px 30px;
        justify-content: flex-start;
    }

    nav a#link-logout {
        margin-top: auto;
        margin-bottom: 10px;
        box-sizing: border-box;
        padding: 20px 30px;
        justify-content: flex-start;
        border-radius: 5px;
    }
    
    nav svg {
        fill: rgb(36, 159, 187);
    }

    nav .right {
        margin-left: auto;
        margin-right: 0px;
    }

    #sidebar-active:checked ~ .links-container {
        right: 0;
    }

    #sidebar-active:checked + * #logo_footer {
        display: none;
    }

    
    #sidebar-active:checked ~ #overlay {
        display: block;
        height: 100%;
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 9;
        background: rgba(0, 0, 0, 0.5);
        transition: 0.5s;
    }
}

.open-sidebar-button {
    position: absolute;
    right: 20px;
}

#separator-member {
    color: rgb(36, 159, 187);
}

@media (min-width: 1000px) and (max-width: 1400px) {
    body:not(.connected) .links-container {
        flex-direction: row !important;
        position: static !important;
        width: 100% !important;
        height: 60px !important;
        background-color: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
        align-items: center !important;
    }

    body:not(.connected) nav a {
        width: auto !important;
        padding: 20px 16px !important;
    }

    body:not(.connected) .open-sidebar-button,
    body:not(.connected) .close-sidebar-button {
        display: none !important;
    }

    body:not(.connected) nav .right {
        margin-left: auto !important;
        margin-right: 10px !important;
    }
}

@media (max-width: 1000px), (min-width: 1000px) and (max-width: 1400px) {
    .links-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        z-index: 10 !important;
        width: 300px !important;
        height: 100% !important;
        background-color: #d3f3f9 !important;
        box-shadow: -5px 0 5px rgba(0, 0, 0, 0.25) !important;
        transition: 0.5s ease-out !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .open-sidebar-button,
    .close-sidebar-button {
        display: block !important;
        padding: 20px !important;
        cursor: pointer !important;
    }

    #sidebar-active:checked ~ .links-container {
        right: 0 !important;
    }

    #sidebar-active:checked ~ #overlay {
        display: block !important;
        height: 100% !important;
        width: 100% !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 9 !important;
        background: rgba(0, 0, 0, 0.5) !important;
        transition: 0.5s !important;
    }
}
