*{
    scroll-behavior: smooth; 
    box-sizing: border-box;
}

html,body{
    margin: 0;
    padding: 0;
    width: 100%;
    background-image: url("../img/background.svg");
    background-repeat: no-repeat;
    background-size: cover;
    font-family: "Lemon", serif;
    font-size: 18px;
    text-align: center;
    min-height: 100dvh;
}
.lemon-regular {
  font-family: "Lemon", serif;
  font-weight: 400;
  font-style: normal;
}
.rounded-block {
  background-color: rgba(255, 255, 255, 1);
  border-radius: 15px;
  padding: 20px;
  margin: 20px auto;
  width: auto;
  height: auto;
  max-width: 800px;
  max-height: 500px;
}

.petit-block{
  justify-content: center;
  background-color: rgba(255, 255, 255, 1);
  border-radius: 15px;
  padding: 50px;
  width: auto;
  height: auto;
  max-width: 800px;
  max-height: 500px;
  margin: 5vh auto; 
}

.character-container{
  display: flex;
  justify-content: center;
  gap: 40px;
}

.char-btn{
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.5s;
  padding: 0;
}
.char-btn:hover{
  transform: scale(1.15);
}
.menu-avatar{
  width: 100px;
  height: auto;
}

.grille{
  display: grid;
  grid-template-columns: repeat(3,100px);
  grid-template-rows: repeat(3,100px);
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}



@media (min-width: 1000px) {
  .grille{
    grid-template-columns: repeat(3,160px);
    grid-template-rows: repeat(3,160px);
  }
  
}
.cell{
  position: relative;
  background-color: #f0f0f0;
  border: 2px solid #000;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding: 15px;
}

.cell img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cell::before{
  content:"";
  position: absolute;
  inset: 15px;
  background-image: var(--player-char);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}


.cell:empty:hover::before{
opacity: 0.5;
}

.cell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.3);
  animation: popIn 0.7s ease forwards;
}

.grille.computer-turn .cell{
  filter: grayscale(100%);
  cursor: not-allowed;
}

.grille.computer-turn .cell:empty:hover::before{
  opacity: 0 !important;
}

@keyframes popIn {
to{
opacity: 1;
transform: scale(1);
}
}


#winner-overlay{
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeInOverlay 0.5s ease forwards;
}

@keyframes fadeInOverlay{
  to{ opacity: 1;}
}

.winner-avatar{
  display: block;
  width: 150px;
  height: auto;
  margin: 10px auto 0;
}
 .draw-avatars{
 display: flex;
 justify-content: center;
 align-items: center;
 gap: 20px;
 margin-top: 10px;
 }

 .draw-avatars img{
  width: 100px;
  height: auto;
  display: block;
 }
#status{
  font-size: 22px;
  margin-bottom: 15px;
  background-color: white;
  font-family: "Lemon", sans-serif;
  padding: 10px 20px;
  border-radius: 10px;
  display: inline-block;
}
 #ecran-de-jeux{ 
  display:flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
 }
.reset-btn{
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 20px;
  font-family: "Lemon", serif;
  border: none;
  background-color: white;
  color: black;
  border-radius: 5px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.5s ease-in;
}

.reset-btn:hover{
  opacity: 1;
}

.hidden{
  display: none !important;
}

