/* 26/01/2022 */
/* https://code.tutsplus.com/fr/tutorials/making-a-sliding-side-navigation-menu-for-responsive-designs--cms-28400 */

#main {
    transition: margin-left .5s;
    overflow:hidden;
}
body {
    overflow-x: hidden;
}

nav {
}


/* MENU navigation */
.sidenav {
    z-index: 10; /* toujours au top */
    height: 100%; 
    width: 0; /* est changé par JavaScript */
    position: fixed; /* toujours en place */
    top: 0;
    left: 0;
    background: linear-gradient(to right,gray,black);

    overflow-x: hidden; /* barre défilement supprimée */
    padding-top: 60px; 
    transition: 0.5s; 
    font-size: 0.6em;
    text-align: right;
}

/* liens */
.sidenav a {
    padding: 4px 10px 4px 3px;
    text-decoration: none;
    color: #818181;
    display: block;
    transition: 0.3s;
}

.sidenav a:hover{
    background-color: gray;
    color: white;
    padding: 8px 20px 8px 3px;
}
.sidenav a:focus{
    background-color: black;
    color: white;
    padding: 8px 20px 8px 3px;
}

/* Position et style bouton MENU */
.sidenav .closebtn {
    display: none; /* non affiché */
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
}

.topnav {
    position: fixed;
    height: 0px; 
    top: 0px;
    width: 65px;
    background-color: #333;
    cursor: pointer;
    z-index: 10;
    /* overflow: hidden; */
}

/* lignes du menu */
.topnav a {
    display: block;
    color: #f2f2f2;
    padding: 10px 1px 6px 1px;
    text-decoration: none;
    font-size: 17px;
    background-color: gray;
    opacity: 0.5;
    z-index: 10;
}

.topnav a:hover {
    background-color: #ddd;
    color: black;
}

.topnav a.active {
    background-color: #4CAF50;
    color: white;
}

/* aspect sur MOBILES */
@media screen and (max-height: 450px) {
    .sidenav {padding-top: 50px;}
    .sidenav a {font-size: 0.7em;}
    .sidenav img{
        width: 50%;
    }
}

/* bouton */
a svg{
    transition:all .5s ease;

    &:hover{
        transform: rotate(180deg);
    }
}

#ico{
    /* display: none;*/
}

.menu{
    background-color: red;
    display: none;
    padding: 5px;
    width: 320px;
    border-radius :5px;

    transition: all 0.5s ease;

    a{
        display: block;
        color: #fff;
        text-align: center;
        padding: 10px 2px;
        margin: 3px 0;
        text-decoration: none;
        background: #444;

        &:nth-child(1){
            margin-top: 0;
            border-radius: 3px 3px 0 0;
        }
        &:nth-child(5){
            margin-bottom: 0;
            border-radius: 0 0 3px 3px;
        }

        &:hover{
            background: #555;
        }
    }
}