@font-face {
    font-family: forLi;
    src: url("../assets/forLi.ttf");
}
@font-face {
    font-family: raleway;
    src: url("../assets/Raleway-Medium.ttf")
}

*{
    margin: 0;
    padding: 0;
    text-align: left;
}

body{
    text-align: center;
    height: 100vh;
}

#sideBar{
    position: absolute;
    width: 230px;
    height: 100%;
    background-color: salmon;
    left: -300px;
    transition: .5s ease-out;
    z-index: 4;
}

.toggleButton {
    position: absolute;
    top: 30px;
    left: 310px;
    cursor: pointer;
    height: 50px;
    width: 50px;
}

.toggleButton span {
    width: 60px;
    height: 10px;
    border-radius: 5px;
    background: salmon;
    display: block;
    margin-top: 4px;
    transition: .5s ease;
}

li{
    color: black;
    list-style-type: none;
    font-size: 2rem;
    cursor: pointer;
    padding-left: 5px;
    font-family: "forLi", sans-serif;
}

li:hover{
    background: darkred;
}

.lesJeux:visited {
    color: black;
}

.forBar {
    color: whitesmoke;
    text-decoration: none;
}

#sideBar.active{
    left: 0;
    margin: 0;
}

#sideBar.active .toggleButton{
    top:2.8rem;
    left: 235px;
}

#sideBar.active span{
    position: absolute;
}

#sideBar.active span:nth-child(1){
    transform: rotate(45deg);
}

#sideBar.active span:nth-child(2){
    opacity: 0;
}

#sideBar.active span:nth-child(3){
    transform: rotate(-45deg);
}

#sideBar.active ~ .content {
    opacity: 0.3;
}

#myCanvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: limegreen;
}

#lemonGreen {
    color: limegreen;
    position: absolute;
}

#beforeGameEnd {
    visibility: hidden;
    font-size: 2.5rem;
    font-weight: bold;
    color: whitesmoke;

}

#restart {
    visibility: hidden;
    color: whitesmoke;
}

.restarted {
    display: flex;
    visibility: visible;
    padding: 20px;
    flex-direction: column;
    align-items: center;
    background-color: rgba(0,0,0,0.5);
    border-radius: 15px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
}

#score {
    position: absolute;
    left: 50%;
    top: -5%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-family: "raleway", sans-serif;
    text-transform: uppercase;
    z-index: 99;
}

#allCanvas {
    position: relative;
    height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#myCanvas {
    border: 3px solid black;
}