*, ::before, ::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Tagesschrift", "system-ui", sans-serif;
  font-size: 18px;
  min-width: 100%;
  min-height: 100vh;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;  /* pour les enfants */
  background-color: black;
}

h1 {
    font-size: 25px;
  }

.title {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.5rem;
  border-bottom: 1px solid #2B2D42;
  width: 100%; /* border pour toute la largeur */
}

.dwarf {
  height: 2.5rem;
  margin: 0 1rem 1rem 1rem;
}

.player-turn {     
  background:rgba(43, 45, 66, 0.5); 
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.3rem;
  width: 40vh;
  height: 5vh;
  border-radius: 10px;
  font-size: 16px;
}

.message {     
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40vh;
  height: 5vh;
  border-radius: 10px;
  font-size: 16px;
  opacity: 0; /* invisible */
  position: absolute; /* pour ne pas décaler tout le jeu verticalement */
  top: 18vh;       
  left: 50%;
  transform: translateX(-50%);
  z-index: 100; 
}

.message.show {
  opacity: 1;               
  pointer-events: auto;
}

#game-board {
  display: flex;
  justify-content: center;
  margin: 1rem;
  flex-direction: column; 
}

#myCanvas {
  max-width: 100%;
  height: auto;
}


@media (min-width: 576px) {
  body {
    background: url("../images/fond.svg") no-repeat center center fixed;
    background-size: cover;
  }

  h1 {
    font-size: 50px;
    margin: 1rem ;
  }

  .title {
    border-bottom: 3px solid #2B2D42;
  }

  .dwarf {
    height: 4rem;
  }

  .player-turn {
    width: 50vh;
    font-size: 18px;
  }
  
  .message {
    background:rgba(141, 153, 174, 0.2); 
    width: 60vh;
    font-size: 18px;
    top: 24vh;  
    position: absolute;
  }

  #game-board {
    flex-direction: row; 
    flex-wrap: wrap;
    align-items: flex-start;
    margin: 4rem 1rem;
  }
} 

@media (min-width: 1450px) {
  .message {
    top: 22vh;
  }

  #game-board {
    margin: 7rem;
  }
}
