@font-face {
    font-family: 'Typographica';
    src: url("Typographica-Blp5.ttf");
}

@font-face {
    font-family: 'Nevanta';
    src: url('NevantaExtraBold-9MdV5.otf');
}

html {
    transition: 0.5s;
    cursor: default;
}

body {
    display: block;
    margin: auto;
    padding: 0px;
    width: 100vw;
    height: 100vh;
    font-family: 'Nevanta';
    text-align: justify;
    background-color: rgb(63, 63, 63);
    overflow: scroll;
    color: white;
    align-items: center;
    z-index: 2;
    filter: blur(0px);
    transition: 0.5s;
}

.game{
    display : flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
    justify-content: center;
    position: relative;
    width: 100%;
    max-width: 550px;
    max-width: 600px;
    height: 100%;
    margin: auto;
    padding: 0px;
}

.fichier{
    display : none;
}

nav {
    position: relative;
    width: 100%;
    height: fit-content;
    top: 0px;
    z-index: 100;
    background-color: rgb(155, 149, 141);
    text-align: center;
    color: white;
    transition: 0.5s;

}

nav h1 {
    display: inline-block;
    margin: auto;
    padding: 10px;
    font-size: 3vh;
    font-family: 'Nevanta';
    vertical-align: middle;
    color: white;
    transition: 0.5s;
}

.rules {
    display: flex;
    position: fixed;
    top: 0px from nav;
    background-color: rgb(135, 135, 135);
    border-radius: 0px 0px 50px 50px;
    width: 35px;
    height: 35px;
    right: 5px;
    transform: scaleY(1);
    transform-origin: top;
    transition: ease-out 0.2s;
    align-content: center;
    cursor: pointer;
    z-index: 1;
}

.rules:hover {
    height: 55px;
    transform-origin: top;
    transition: ease-out 0.2s;
}

.rules img {
    width: 50%;
    margin: auto;
    padding: 1px;
    transition: 0.2s;
}

.chart {
    display: None;
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translatex(-50%);
    background-color: rgba(109, 109, 109, 0.336);
    color: antiquewhite;
    border-radius: 5px;
    width: 90%;
    max-width: 600px;
    margin: auto;
    padding: 10px;
    height: fit-content;
    text-align: justify;
    z-index: 11;
    border-color: antiquewhite;
    border-width: 5px;
    border-style: solid;
    box-shadow: 0px 0px 15px antiquewhite;
    font-size: 1vw;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: 0.5s;
    backdrop-filter: blur(15px);
}

.chart h2 {
    text-align: center;
    transition: 0.5s;
}

.chart li {
    padding: 1vh;
    transition: 0.5s;
}

.chart .simple_button {
    display: flex;
    position: absolute;
    width: fit-content;
    height: fit-content;
    padding: 5px;
    top: 10px;
    right: 10px;
    border-radius: 5px;
    background-color: rgb(141, 141, 141);
    align-content: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.chart .simple_button img {
    width: 15px;
    aspect-ratio: 1/1;
    rotate: 0deg;
    transition: 0.2s;
}

.chart .simple_button:hover img {
    rotate: 90deg;
    transition: 0.2s;
}

.chart .simple_button:hover {
    background-color: rgb(168, 168, 168);
    transition: 0.2s;
}

.difficulty{
    display: flex;
    width: 100%;
    grid-row: 1;
    grid-column: 1fr 1fr 1fr;
    gap: 25px;
    align-items: center;
    justify-content: center;
}

.toggle_button{
    width: 15%;
    max-width: 50px;
    aspect-ratio: 2/1;
    background-color: antiquewhite;
    padding: 5px;
    border-radius: 50px;
    align-items: center;
    cursor: pointer;
    transform: scale(1);
    transition: 0.25s;
}

.toggle_button:hover{
    transform: scale(1.1);
    transition: 0.25s;
}

.toggle_button .button_dot{
    display: block;
    position: relative;
    left: 0%;
    width: 50%;
    height: 100%;
    background-color: rgb(199, 186, 168);
    border-radius: 50px;
    transition: ease-out 0.25s;
}

.difficulty_cell {
    display: flex;
    position: relative;
    width: 50%;
    height: 100%;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.difficulty_cell h3 {
    display: flex;
    grid-template-columns: 1fr 1fr;
}

.explain_button {
    display: flex;
    padding: 2px;
    font-size: 0.5em;
    width: 15px;
    aspect-ratio: 1/1;
}

#s_facile, #s_difficile {
    display: none;
    position: absolute;
    width: 100%;
    top: 75%;
    height: fit-content;
    background-color: rgba(0, 0, 0, 0.75);
    border-radius: 15px;
    padding : 5px;
    text-align: center;
    align-content: center;
    justify-content: center;
}

.difficulty_cell #explain_button1:hover .difficulty_cell #s_facile {
    display: block;
}

.explain_button:hover{
    text-decoration: underline;
}

.grid {
    display: grid;
    position: relative;
    grid-template-rows: repeat(6, 1fr);
    grid-template-columns: 1fr;
    gap : 5px;
    margin: auto;
    top: 50px;
    width: 80vw;
    max-width: 350px;
    min-width: 300px;
    aspect-ratio: 5/6;
    color: rgb(255, 255, 255);
    z-index: 1;
    transition: 0.5s;
}

.grid .ligne {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    transition: none;
}

.grid .cell {
    display: flex;
    background-color: rgb(121, 121, 121);
    border-radius: 5px;
    aspect-ratio: 1/1;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-family: 'Nevanta';
    border-style: solid;
    border-color: rgb(196, 186, 174);
    border-width: 4px;
}

.banner {
    display: None;
    position: fixed;
    width: 80%;
    max-width: 450px;
    height: fit-content;
    margin: auto;
    align-self: center;
    background-color: rgba(51, 51, 51, 0.5);
    color: antiquewhite;
    border-radius: 15px;
    text-align: center;
    z-index: 2;
    border-color: antiquewhite;
    border-width: 5px;
    border-style: solid;
    backdrop-filter: blur(15px);
    font-size: 1.5vw;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 25px;
    gap: 25px;
    transition: 0.5s;
}

p{
    text-align: center;
}

.keyboard {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
    position: relative;
    margin: auto;
    top: 130px;
    width: 98%;
    max-width: 500px;
    z-index: 1;
}

.keyboard .key {
    display: flex;
    background-color: rgb(196, 186, 174);
    border-radius: 5px;
    text-align: center;
    font-size: 24px;
    font-family: 'Nevanta';
    aspect-ratio: 2/3;
    padding: auto;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0px -5px 0px rgb(0, 0, 0, 0.3);
    cursor: pointer;
    user-select: none;
    transform: translateY(0px);
    transition: 0.2s;
}

.keyboard .key:hover {
    background-color: rgb(207, 197, 184);
    transition: 0.2s;
}

.keyboard .key:active {
    box-shadow: inset 0px 0px 0px rgb(0, 0, 0, 0);
    transform: translateY(1px);
    transition: 0.1s;
}

.keyboard .wide_key {
    grid-column: span 2;
    aspect-ratio: 7/5;
}

.keyboard .wide_key img{
    width: 30%;
    pointer-events: none;
}

.button {
    display: inline;
    position: relative;
    aspect-ratio: 1/1;
    width: fit-content;
    max-height: fit-content;
    padding: 10px;
    border-radius: 10px;
    background-color: rgb(141, 141, 141);
    border-style: solid;
    border-color: transparent;
    align-content: center;
    cursor: pointer;
    transition: 0.5s;
}
.button:hover {
    background-color: rgb(168, 168, 168);
    border-style: solid;
    border-color: antiquewhite;
    transition: 0.5s;
}

.button:active {
    background-color: rgb(120, 120, 120);
    border-style: double;
    transition: 0.1s;
}

.close_button {
    display: inline;
    position: absolute;
    width: 25px;
    height: 25px;
    align-content: center;
    cursor: pointer;
    filter: invert();
    transition: 0.5s;
}

.close_button img{
    rotate: 0deg;
    transition: 0.5s;
}

.close_button:hover img{
    rotate: 90deg;
    transform: scale(1.1);
    transition: 0.5s;
}

#close_button2 {
    top: 10px;
    right: 10px;
}

#close_button3 {
    top: 10px;
    right: 10px;
}

.simple_banner {
    display: flex;
    width: fit-content;
    height: fit-content;
    margin: auto;
    align-self: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.75);
    border-radius: 15px;
    align-content: center;
    justify-content: center;
    text-align: center;
    z-index: 50;
    opacity: 0;
    transition: all 0.3s;
}

@media only screen and (min-width: 700px) {
    .rules {
        right: 20%;
        width: 45px;
        height: 45px;
    }
}

@media screen and (max-width: 1024px) {
    .chart {
        font-size: 3.5vw;
    }

    .banner {
        font-size: 3.5vw;
    }
}

@media only screen and (max-width: 400px) {
    .banner {
        width: 70%;
        font-size: 3vw;
    }
}

*::selection {
    pointer-events: none;
}