/* variables */
:root{
    /* valeurs fix pour tous les joueurs */
    --largeur-espace-jeu: 750px;
    --hauteur-espace-jeu: 950px;
}

/* css reset */
* {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
}

html{
    overflow: hidden;
}

body{
    overflow: hidden;
    height: 100vh;
    
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    background: url("../assets/background.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    backdrop-filter: brightness(30%);
}

#canvas{
    /* valeurs fix pour tous les joueurs */
    width: var(--largeur-espace-jeu);
    height: var(--hauteur-espace-jeu);

    border: solid;
    border-color: black;
    border-width: 0.25em;
}




#formulaire-initialisation-jeu, #formulaire-pseudonyme{
    position: absolute;
    top: 0;
    right: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

#formulaire-initialisation-jeu *{
    font-size: 2vh;
    border-radius: 0.5em;
}

#champ-pseudonyme{
    width: 35vh;
    height: 5vh;
    margin-top: 1vh;
    margin-right: 1vh;
}

.bouton{
    height: 5vh;
    width: 15vh;
    margin: 1vh;
}

#bouton-lancer-partie, #bouton-rejouer{
    display: none;
}





#affichage-statut-partie{
    width: 13vh;

    position:absolute;
    left: 0;
    top: 0;

    display: grid;
    grid-template-columns: 50% 50%;

    background-color: darkgray;
    border: 0.2em black solid;

    border-radius: 1em;
}

#affichage-numero-vague{
    font-family: 'Courier New';
    text-align: center;
    font-size: 2.5vh;
    grid-column: span 2;

    margin-top: 5%;
}

.label-pseudonyme-joueur{
    grid-column: span 2;
    text-align: center;
    margin-top: 1em;
    margin-bottom: 0.25em;
}

.icon{
    width: 5vh;
    height: 5vh;

    margin: 10%;
}

.icon-joueur{
    image-rendering: crisp-edges;
}


.icon-status-joueur > *{
    /* cache l'element*/
    display: none;
    position: absolute;

    width: 5vh;
    height: 5vh;
}

.icon-status-joueur.non-connecte > .icon-non-connecte{
    display: block;
}

.icon-status-joueur.connecte > .icon-connecte{
    display: block;
}

@keyframes agrandissement{
    0%   { transform: scale(0); }
    20%   { transform: scale(0); }
    75%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}
.icon-status-joueur.elemine > .icon-elemine{
    display: block;

    animation-name: agrandissement;
    animation-duration: 0.65s;
}




.affichage-message-partie-terminee{
    visibility: hidden;
    
    position: absolute;
    background-color: rgba(43, 49, 54, 0.75);

    top: 50%;
    transform: translateY(-50%);

    width: var(--largeur-espace-jeu);
    height: 20vh;
    font-size: 10vh;
    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;
}

.affichage-message-partie-terminee.visible{
    visibility: visible;

    /* animation apparition */
    animation-name: apparition;
    animation-duration: 0.25s;
    animation-timing-function: ease-out;
}
@keyframes apparition {
  from {opacity: 0;}
  to {opacity: 1;}
}

#affichage-message-partie-perdue{
    color: darkred;
}

#affichage-message-partie-gagnee{
    color: gold
}