/* Jeu Rush-Hour, créer par Magnin Julie et Cuinet Antoine, page css */

/* Création + délimitation du Canvas */
html {
    position: relative;
    z-index: 1;
    font-family: 'Noto_Serif', Helvetica, sans-serif;
    height: 100vh;
    width: 100vw;
    background: url(pattern-5.PNG) rgb(151, 140, 111);
}
body{ 
    font-family: Poppins, Montserrat, Helvetica, sans-serif;
    font-size: 15px;
    overflow-x: hidden;
}

/* Canvas */
#cvs{
    background: url(bg_Canvas.png) center / cover no-repeat;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(0%, -50%);
    width: 600px;
    height: 600px;
    border: 6px solid  rgb(207, 205, 205);
    border-radius: 12px; 
}

/* Mise en forme des paragrphes */
p{
    font-size: 34px;
    font-weight: bold;
}

/* Logo du jeu */
.nav-icone{
    position: absolute;
    z-index: 1200;
    left: 2%;
    top: 2%;
    color: rgb(214, 211, 211);
    cursor: pointer;
    font-size: clamp(30px, 1vw, 20px);
    font-weight: bold;
    text-decoration: none;
    display: flex;
    justify-content: right;
    /* animation */
    line-height: 50px;
    transform-origin: center top;
    transition-property:
       font-size, line-height;
    transition-duration: 0.3s;
    transition-timing-function: ease;
    transition-delay: 3ms;
}
.nav-icone:hover{
    color: aliceblue;
    font-size: clamp(32px, 2vw, 22px);
    line-height: 55px;
}

/* Affichage du score */
.levelCourrant{
    font-size: 20px;
    margin-top: 3px;
    margin-left: 3px;
    font-weight: bolder;
    color: #2f2f2f;
}
.score{
    width: 400px;
    height: 200px;
    top: 10%;
    left: 20%;
    position: fixed;
    z-index: 1;
    background-color: rgb(214, 211, 211);
    border-radius: 12px;
    border: 4px black solid;
}
.moves{
    position: relative;
    text-align: center;
    top: 0;
}
.moves > p{
    margin: 0;
}
.moveActuel{
    text-align: center;
    margin-top: 10px;
    font-size: 60px;
    margin-top: 0;
}
.bestScore{
    position: absolute;
    margin-left: 5px;
    bottom: 0;
}
.bestScore > p{
    margin: 0;
    color: #2f2f2f;
}
.starsLevel1{
    position: absolute;
    margin-left: 5px;
    bottom: 3px;
}
.starsLevel1 > p{
    color: #2f2f2f;
}
.nbStars1{
    vertical-align: middle;
}

/* Affichage des boutons */
.buttons{
    width: 400px;
    height: 400px;
    top: 40%;
    left: 20%;
    position: fixed;
    z-index: 1; 
    padding: 30px;
    background-color: transparent;
}

/* Bouton parametre */
.param{
    border: 4px black solid;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    cursor: pointer;
    display: block;
    background-color: rgb(214, 211, 211);
    background-image: url("iconparam.png");
    background-size: 90px;
    background-repeat: no-repeat;
    background-position: center;
    text-align: center;
    /* animation */
    transform-origin: center;
    transition-property:
       line-height, transform;
    transition-duration: 0.3s;
    transition-timing-function: ease;
    transition-delay: 3ms;
    text-decoration: none;
}
.param:hover{
    background: beige;
    transform: scale(1.1);
    transform-origin: center;
    background-image: url("iconparam.png");
    background-repeat: fill;
    background-size: 90px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Fenetre modale pour le bouton parametre */
.modal{
    display: none;
    position: fixed;
    justify-content: center;
    align-items: center;
    z-index: 100;
    left: calc(50% - 250px);
    top: calc(50% - 250px);
    height: 500px;
    width: 500px;
    border-radius: 12px;
    border: 3px black solid;
    box-shadow: 10px 10px 15px black;
    background: beige;
}
.titre{
    background: rgb(214, 211, 211);
    position: fixed;
    top: calc(50% - 305px);
    left: calc(50% - 125px);
    width: 250px;
    height: 110px;
    border: 4px solid black;
    border-radius: 10px;
    text-align: center;
}
.modalAudio{
    display: block;
}

/* Bouton de la musique */
.divAudio{
    display: flex;
    height: 100px;
    width: 400px;
    margin-left: 130px;
    margin-top: 50px;
    align-items: center;
}
#buttonAudio{
    margin-left: 30px;
    top: 0;
    left: 0;
    width: 90px;
    height: 50px;
    border-radius: 30px;
    background: aliceblue;
    cursor: pointer;
    transition: 0.3s;
    border: 3px solid rgb(214, 211, 211);
}
#toggleAudio{
    position: relative;
    left: -3px; 
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #444;
    transition: 0.3s;
}
#buttonAudio.active{
    background: rgb(214, 211, 211);
    border: 4px solid white;
}

#buttonAudio.active #toggleAudio{
    transform: translateX(38px);
    background: #444444a8;
}

/* Bouton du son */
.divAudio2{
    display: flex;
    height: 100px;
    width: 400px;
    margin-left: 130px;
    margin-top: 50px;
    align-items: center;
}
#buttonAudio2{
    margin-left: 62px;
    top: 0;
    left: 0;
    width: 90px;
    height: 50px;
    border-radius: 30px;
    background: aliceblue;
    cursor: pointer;
    transition: 0.3s;
    border: 3px solid rgb(214, 211, 211);
}
#toggleAudio2{
    position: relative;
    left: -3px; 
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #444;
    transition: 0.3s;
}
#buttonAudio2.active{
    background: rgb(214, 211, 211);
    border: 4px solid white;
}
#buttonAudio2.inactive{
    background: aliceblue;
    cursor: pointer;
    transition: 0.3s;
    border: 3px solid rgb(214, 211, 211);
}
#buttonAudio2.active #toggleAudio2{
    transform: translateX(38px);
    background: #444444a8;
}
#buttonAudio2.inactive #toggleAudio2{
    transform: translateX(0px);
    background: #444;
}

/* Affichage bouton refresh */
.refresh{
    border: 4px black solid;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    cursor: pointer;
    display: block;
    background-color: rgb(214, 211, 211);
    background-image: url("icons-reload.png");
    background-size: 90px;
    background-repeat: no-repeat;
    background-position: center;
    margin-top: calc(1vmin + 5px);
    margin-bottom: calc(1vmin + 5px);
    text-align: center;
    /* animation */
    transform-origin: center;
    transition-property:
       line-height, transform;
    transition-duration: 0.3s;
    transition-timing-function: ease;
    transition-delay: 3ms;
    text-decoration: none;
}
.refresh:hover{
    background: beige; 
    transform: scale(1.1);
    transform-origin: center;
    background-image: url("icons-reload.png");
    background-repeat: fill;
    background-size: 90px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Affichage du bouton qui affiche les différents levels */
.levels{
    border: 4px black solid;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    cursor: pointer;
    display: block;
    background-color: rgb(214, 211, 211);
    background-image: url("icons8-stars-58.png");
    background-size: 72px;
    background-repeat: no-repeat;
    background-position: center;
    margin-top: calc(1vmin + 5px);
    margin-bottom: calc(1vmin + 5px);
    text-align: center;
    /* animation */
    transform-origin: center;
    transition-property:
       line-height, transform;
    transition-duration: 0.3s;
    transition-timing-function: ease;
    transition-delay: 3ms;
    text-decoration: none;
}
.levels:hover{
    background: beige;
    transform: scale(1.1);
    transform-origin: center;
    background-image: url("icons8-stars-58.png");
    background-repeat: fill;
    background-size: 72px;
    background-repeat: no-repeat;
    background-position: center; 
}

/* Fenetre modale pour les levels */
.modal1{
    display: none;
    position: fixed;
    justify-content: center;
    align-items: center;
    z-index: 100;
    left: calc(50% - 250px);
    top: calc(50% - 250px);
    height: 500px;
    width: 500px;
    border-radius: 12px;
    border: 3px black solid;
    box-shadow: 10px 10px 15px black;
    background: beige;
}
.titre1{
    background: rgb(214, 211, 211);
    position: fixed;
    top: calc(50% - 305px);
    left: calc(50% - 125px);
    width: 250px;
    height: 110px;
    border: 4px solid black;
    border-radius: 10px;
    text-align: center;
}

/* Affichage des cases pour selectionner les levels */
.wrapper{
    display: grid;
    grid-template-columns: auto auto auto;
    padding: 10px;
    gap: 30px;
}
.caseLevel{
    background-color: rgba(255, 255, 255, 0.8);
    background-image: url('cadenas.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 65px;
    border: 1px solid rgba(0, 0, 0, 0.8);
    width: 90px;
    height: 90px;
    text-align: center;
    border: 2px black solid;
    border-radius: 6px;
    /* animation */
    transform-origin: center;
    transition-property:
       line-height, transform;
    transition-duration: 0.3s;
    transition-timing-function: ease;
    transition-delay: 3ms;
    text-decoration: none;
 }
 .caseLevel:hover{
    background: beige; 
    transform: scale(1.1);
    transform-origin: center;
    background-repeat: fill;
    background-size: 65px;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('cadenas.png');
 }
.caseLevel div{
    font-size: 30px;
}
/* Affichage de la première case */
.lv1{
    background-image: none;
}
.lv1:hover{
    background-image: none;
}
/* Affichage sans cadenas pour les autres cases */
.lv2.active{
    background-image: none;
}
.lv3.active{
    background-image: none;
}
.lv4.active{
    background-image: none;
}
.lv5.active{
    background-image: none;
}
.lv6.active{
    background-image: none;
}
.lv7.active{
    background-image: none;
}
.lv8.active{
    background-image: none;
}
.lv9.active{
    background-image: none;
}



/* Fenetre modal pour la victoire */
.modalWin{
    display: none;
    position: fixed;
    justify-content: center;
    align-items: center;
    z-index: 100;
    left: calc(50% - 250px);
    top: calc(50% - 250px);
    height: 500px;
    width: 500px;
    border-radius: 12px;
    border: 3px black solid;
    box-shadow: 10px 10px 15px black;
    background: beige;
}
.titreWin{
    background: rgb(214, 211, 211);
    position: fixed;
    top: calc(50% - 305px);
    left: calc(50% - 125px);
    width: 250px;
    height: 150px;
    border: 4px solid black;
    border-radius: 10px;
    text-align: center;
}
#butonNextLevel{
    border: 4px black solid;
    width: 200px;
    height: 110px;
    border-radius: 13px;
    cursor: pointer;
    background-color: rgb(214, 211, 211);
    margin-top: 50%;
    margin-bottom: 50%;
    text-align: center;
    /* animation */
    transform-origin: center;
    transition-property:
       line-height, transform;
    transition-duration: 0.3s;
    transition-timing-function: ease;
    transition-delay: 3ms;
    text-decoration: none;
    font-size: 50px;
}
#butonNextLevel:hover{
    background: beige;
    transform: scale(1.1);
    transform-origin: center;
}
.starsLevel{
    position: absolute;
    top: 150px;
}
.butonNextLevel{
    position: absolute;
    bottom: 0;
}

/* Affichage du bouton d'accueil */
.accueil{
    position: fixed;
    height: 100%;
    width: 100%;
    top: -2px;
    left: -2px;
    position: fixed;
    z-index: 1000;
    background: url(pattern-5.PNG) rgb(151, 140, 111);
    display: flex;
    justify-content:center;
    align-items: center;
} 
.buttonAccueil{
    border: 4px black solid;
    width: 400px;
    height: 200px;
    border-radius: 13px;
    cursor: pointer;
    background-color: rgb(214, 211, 211);
    margin-top: 50%;
    margin-bottom: 50%;
    text-align: center;
    /* animation */
    transform-origin: center;
    transition-property:
       line-height, transform;
    transition-duration: 0.3s;
    transition-timing-function: ease;
    transition-delay: 3ms;
    text-decoration: none;
    font-size: 50px;
}
.buttonAccueil:hover{
    background: beige;
    transform: scale(1.1);
    transform-origin: center;
}

/* Affichage des instructions */
.instruction{
    position: fixed;
    bottom: 0;
    left: calc(25%);
}
.instruction > p{
    font-size: 20px;
}