body, html {
  margin: 0;
  padding: 0;
  overflow-y: hidden;  /*pas la meilleure façon de faire à revoir*/
  height: 100%;
}


/* body */ 
body {
  font-family: sans-serif;
  background-image: url("assets/background/menu_bg.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size:cover;
  background-attachment: fixed;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

body.body-easy {
  background-image: url("assets/background/easy_bg.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size:cover;
  background-attachment: fixed; 
}

body.body-medium {
  background-image: url("assets/background/medium_bg.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size:auto;
  background-attachment: fixed;
}

body.body-hard {
  background-image: url("assets/background/hard_bg.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size:cover;
  background-attachment: fixed;
}

.title_game, .title_rules, ul {
  margin-top: 0;
  margin-bottom: 1rem; /* ou moins si tu veux resserrer */
}

.title_game{
  font-family: 'Press Start 2P', cursive;
  font-size: 3.5rem;
  letter-spacing: 3px;
  color: #e0c8ff;
  text-shadow:
    0 0 8px #7c5ca1, 
    0 0 20px #7c5ca1, 
    0 0 30px #5a3a7e; 
  margin-bottom: 1rem;
}

.title_rules{
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: #d0b3ff;
  margin: 0 0 1rem 0;
  text-shadow: 0 0 6px #5a3a7e;
}


ul {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  border-radius: 12px;
  list-style: none;
  padding: 0.6rem 1.5rem;
  color: #d0b3ff;
}


#start-button {
 font-family: 'VT323', monospace;
  font-size: 1.4rem;
  padding: 12px 24px;
  border: 2px solid #5a3a7e; 
  background-color: rgba(20, 15, 35, 0.85); 
  color: #d0b3ff; 
  text-shadow: 0 0 2px #7c5ca1;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(87, 50, 139, 0.3); 
}

#start-button:hover {
  background-color: #2f1f47; 
  color: #f3eaff;
  text-shadow: 0 0 3px #bba2e5;
  box-shadow: 0 0 12px rgba(122, 77, 194, 0.4);
}

/* menu */ 
#menu-container {
  display: flex;
  justify-content: center;
  margin-top: 5vh; 
}

#main-menu {
  display: flex;
  justify-content: center;
  align-items: center; 
  flex-direction: column;
  text-align: center;
  padding: 2.4rem 5.5rem;
  /* style glassmorphisme*/
  background: rgba(47, 0, 92, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.404);
  backdrop-filter: blur(2.5px);
  border: 1px solid rgba(97, 62, 126, 0.192);
  color: white;
}


/* board */ 
/* Conteneur du plateau de jeu */
#game-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh; /* pour centrer si besoin */
}



#game-board {
  display: none;
  box-sizing: border-box;
  gap: 10px;
  padding: 10px;
  margin: auto;
  width: auto; 
  justify-content: center;
  /* style glassmorphisme*/
  background: rgba(255, 255, 255, 0.02); 
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.404);
  backdrop-filter: blur(2.5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(65, 65, 65, 0.1);
}


.board-easy-3 {
  grid-template-columns: repeat(3, auto);
}

.board-easy-6 {
  grid-template-columns: repeat(6, auto);
}

.board-medium-9 {
  grid-template-columns: repeat(6, auto);
}

.board-medium-12 {
  grid-template-columns: repeat(8, auto);
}

.board-hard {
  grid-template-columns: repeat(8, auto); 
}


/* card */ 

.card-size-easy {
  width: 130px;
  height: 190px;
}

.card-size-medium {
  width: 120px;
  height: 160px;
}

.card-size-hard {
  width: 100px;
  height: 130px;
}

.card {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 8px;
  user-select: none;
  transition: transform 0.2s ease;
}


.card img {
  width: 100%;
  height: 100%;
  object-fit:cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}


.card.flipped {
  background-color: #fff;
  color: #111;
  font-weight: bold;
}