body {
  font-family: Arial, sans-serif;
  text-align: center;
  background-color: #0b6623;
  color: white;
  user-select: none;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h1 {
  margin-top: 20px;
  padding-bottom: 20px;
}

/* Terrain Desktop */
.field {
  position: relative;
  aspect-ratio: 3 / 4;
  background-image: url("images/field.jpg");
  background-size: cover;
  background-position: center;
  width: 90vw;
  max-width: 600px;
  max-height: 90vh;
  margin: 30px auto;
  background-color: #145a32;
  border: 5px solid #BDC1B4;
  border-radius: 25px;
}

/* Bulles Desktop */
.poste {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  cursor: pointer;
}

.poste-bubble {
  width: 60px;
  height: 60px;
  background-color: #1e8449;
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  pointer-events: none;
  transition: background-color 0.6s;
}

.poste:hover .poste-bubble {
  background-color: #ffffff;
  color: #27ae60;
}

.player-name {
  font-size: 1rem;
  margin-top: 4px;
  color: white;
  pointer-events: none;
}

/* Positionnement 4-3-3 offensif */
.ag  { top: 15%; left: 10%; }
.bu  { top: 3%; left: 44.8%; }
.ad  { top: 15%; left: 79.3%; }

.mcg { top: 45%; left: 26%; }
.moc { top: 30%; left: 44.8%; }
.mcd { top: 45%; left: 63.5%; }

.dg  { top: 65%; left: 10%; }
.dc1 { top: 70%; left: 30%; }
.dc2 { top: 70%; left: 59.3%; }
.dd  { top: 65%; left: 79.3%; }

.gk  { top: 88%; left: 44.8%; }

/* MODAL */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  color: black;
  text-align: center;
}

.modal input {
  font-size: 16px; /* évite le zoom */
  transform: scale(0.9); /* réduit visuellement */
  transform-origin: left center;
  padding: 10px;
  margin-top: 10px;
  width: 40%;
  border-radius: 30px;
}

.modal button {
  margin-top: 10px;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 30px;
}

.hidden {
  display: none;
}

/* 🌐 VERSION MOBILE */

@media (max-width: 600px) {
  html, body {
    margin: 0;
    padding: 0;
    overflow: hidden; /* empêche scroll */
    height: 100vh;
    width: 100vw;
  }
  .container {
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .field {
    width: 100vw;
    height: auto;
    max-height: 100vh;
    aspect-ratio: 3 / 4;
    margin: 0 auto;
    background-image: url("images/field.jpg");
    background-size: cover;
    background-position: center;
    border: 5px solid #BDC1B4;
    border-radius: 25px;
    position: relative;
  }

  .poste {
    position: absolute;
    width: 8vwmin;
    height: 8vwmin;
    cursor: pointer;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }

  .poste-bubble {
    width: 50px;
    height: 50px;
    font-size: 3.5vw;
    background-color: #1e8449;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    pointer-events: none;
    transition: background-color 0.6s;
  }

  .poste:hover .poste-bubble {
    background-color: #ffffff;
    color: #27ae60;
  }

  .player-name {
    font-size: 2.5vw;
    margin-top: 4px;
    color: white;
    pointer-events: none;
  }

  /* Tes positions restent en % donc elles seront toujours bonnes */
  .ag  { top: 15%; left: 10%; }
  .bu  { top: 3%; left: 43.5%; }
  .ad  { top: 15%; left: 81.7%; }

  .mcg { top: 45%; left: 25%; }
  .moc { top: 30%; left: 43.5%; }
  .mcd { top: 45%; left: 65%; }

  .dg  { top: 65%; left: 5%; }
  .dc1 { top: 70%; left: 30%; }
  .dc2 { top: 70%; left: 60%; }
  .dd  { top: 65%; left: 81.7%; }

  .gk  { top: 88%; left: 43.5%; }
}