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

body{
  background-image: url(./assets/MacBook\ Pro\ 14_\ -\ 3.svg);
  background-size: cover;
  background-position: center;
  background-repeat: repeat;
}

header {
  width: 100%;
}

#logoHeader {
  width: 100%;
  height: auto;
  display: block;
}

#grille{
  width: 30vmin;
  height: 30vmin;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

#grille .case{
  border: solid rgb(255, 255, 255);
  display: grid;
  place-items: center;
  height: 10vmin;
  width: 10vmin;
}

.case:hover{
  background-color: rgb(255, 255, 255);
}

.case img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  pointer-events: none;
}

p{
  padding: 10px;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  text-align: center;
  color: rgb(255, 255, 255);
  font-size: 25px;
}

nav{
  padding: 20px;
  text-align: center;
}

#replay {
  display: block;
  margin-top: 15px;
  margin-left: auto;
  margin-right: auto;
  height: 40px;
  width: 150px;
  background-color: rgb(255, 255, 255);
  border: 1px solid black;
  border-radius: 40px;
  font-size: 18px;
  color: black;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  cursor: pointer;
}

#replay:hover{
  background-color: rgb(255, 251, 0);
}

@media (max-width: 625px) {
  section {   
    background-size: cover; 
    background-repeat: no-repeat;
    background-position: center;
  }

  #logoHeader {
    width: 100%;
  }
}

#winnerPopup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 1000;
}

.popup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

#winnerPopup img {
  width: 300px;
  animation: pop 0.8s ease forwards;
}

@keyframes pop {
  0% { transform: scale(0.3) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.1) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

#winnerPopup.active {
  opacity: 1;
  pointer-events: auto;
}

#popupReplay {
  height: 40px;
  width: 150px;
  background-color: rgb(132, 132, 132);
  border: 1px solid black;
  border-radius: 40px;
  font-size: 18px;
  color: black;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  cursor: pointer;
}

#popupReplay:hover {
  background-color: rgb(255, 251, 0);
}
