html {
    height: 100%;
    padding: 0px;
    margin: 0px;
    box-sizing: border-box;

}

body {
    background-color: white;
    text-align: center;
    margin: 0px;
    font-family: Arial;


    padding: 0px;
    box-sizing: border-box;
 height: 100%;
}

#conteneur{
        height: calc( 100% - max(calc(25% - 2px), 130px));
       
overflow: auto;
     
}
.regle {
    font-size: x-small;
}

.grille {
    display: grid;
    grid-template-columns: repeat(8, max-content);
    grid-gap: 1px;
    width: fit-content;
    margin: auto;
    margin-top: 30px;
}

.case {
    width: 60px;
    height: 60px;
    background-color: rgb(110, 110, 110);
    color: white;
    border-radius: 3px;
    font-size: 50px;
    text-align: center;
    transition: background-color 1s;
    font-weight: bold;
    border: solid 2px black;
}

#casepoint {
    grid-column: 1 / 5;
    grid-row: 1;

    user-select: none;
    text-align: center;
    margin-bottom: 20px;
}

#caseniveau {
    user-select: none;
    text-align: center;
    grid-column: 5 / 9;
    grid-row: 1;
    vertical-align: middle;
    margin-bottom: 20px;
}

#touche {
    width: fit-content;

    margin: auto;
}

.touche {
    border: solid 1px;
    user-select: none;
    width: 50px;
    cursor: pointer;
    height: 50px;
    padding: 2px;
    background-color: rgb(150, 150, 150);
    color: white;
    border-radius: 3px;
    font-size: 40px;
    text-align: center;
    transition: background-color 1s;
    border: solid 1px black;
    font-weight: normal;
}

#te {
    grid-row: 1 / span 3;
    grid-column: 9;
    height: auto;
}

.affichage {
    border: solid 1px;
    user-select: none;
    background-color: whitesmoke;
    border-radius: 3px;
    font-size: 30px;
}

/*@media (max-width: 1250px) {*/
    .case {
        width: 50px;
        height: 50px;
        font-size: 42px;
    }

    .touche {
        width: 50px;
        height: 50px;
        font-size: 40px;
    }

    .affichage {
        font-size: 26px;
    }
/*}*/

@media (max-width: 950px) {
    .case {
        width: 40px;
        height: 40px;
        font-size: 34px;
    }

    .touche {
        width: 50px;
        height: 50px;
        font-size: 40px;
    }

    .affichage {
        font-size: 22px;
    }
}

@media (max-width: 650px) {
    .case {
        width: 40px;
        height: 40px;
        font-size: 34px;
    }

    .touche {
        width: 32px;
        height: 44px;
        font-size: 30px;
    }

    .affichage {
        font-size: 22px;
    }
}

#touche {
    width: 100%;
    height: max(calc(25% - 2px), 130px);
    display: flex;
    justify-content: space-around;
    flex-flow: row wrap;
    align-items: stretch;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    bottom: 0px;
    position: fixed;
}

.touche {
    height: 33%;
    flex-grow: 1;
    width: calc(12% - 8px);
}

#te {
    height: 33%;
    width: 100%;
}

#messageconteneur {
    text-align: center;
    width: 100%;
    padding-top: 50px;
    padding-bottom: 50px;
    position: absolute;
}

#message {
    width: 30%;
    display: inline-block;
    height: 20%;
    margin: auto;
    padding: 30px;
    border-radius: 6px;
    font-size: 20px;
    font-weight: bold;
}

#messageintro
{
    position: relative;
}