/* ================= FORMULAIRE JOUEUR ================= */
.form-joueur {
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 400px;
  margin: 2rem auto;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
}

.form-joueur label {
  margin-top: 1rem;
  font-size: 1.2rem;
  text-align: left;
  color: #f3e3b3;
}

.form-joueur input,
.form-joueur select {
  padding: 0.8rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #5e1a18;
  background-color: #222;
  color: #f3e3b3;
  margin-top: 0.5rem;
}

.form-joueur button {
  margin-top: 2rem;
  background-color: #7e1e1e;
  color: white;
  padding: 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 10px crimson;
  transition: background-color 0.3s ease;
}

.form-joueur button:hover {
  background-color: #a02525;
}

/* ================= GRILLE D'AVATARS ================= */
.avatars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  justify-items: center;
}

.avatars label {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.avatars input[type="radio"] {
  display: none;
}

.avatars img {
  width: 120px;
  height: 150px;
  object-fit: cover;
  border: 4px solid transparent;
  border-radius: 8px;
  transition: border 0.3s ease, transform 0.2s ease;
  box-shadow: 0 0 10px rgba(0,0,0,0.6);
}

.avatars input[type="radio"]:checked + img {
  border-color: crimson;
  transform: scale(1.05);
}

/* ================= PAGE CREATION (FOND ET OVERLAY) ================= */
body.creation {
  margin: 0;
  padding: 0;
  background-color: #000;
  background-image: url('../img/fond-chateau-loup.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: 'Creepster', cursive;
  color: #f3e3b3;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.overlay {
  background-color: rgba(0, 0, 0, 0.75);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.3);
  width: 90%;
  max-width: 600px;
}

/* ================= FORMULAIRE JOUEUR ================= */
.overlay h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: #f3e3b3;
  text-shadow: 0 0 8px crimson;
}

.overlay label {
  font-size: 1.2rem;
  margin-top: 1rem;
  display: block;
  text-align: left;
}

.overlay input[type="text"] {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #5e1a18;
  background-color: #1a1a1a;
  color: #f3e3b3;
  margin-top: 0.5rem;
}

/* ================= GRILLE D'AVATARS RECTANGULAIRES ================= */
.avatars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  justify-items: center;
}

.avatars label {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.avatars input[type="radio"] {
  display: none;
}

.avatars img {
  width: 100px;
  height: 130px;
  object-fit: cover;
  border: 3px solid transparent;
  border-radius: 8px;
  transition: transform 0.2s ease, border 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.avatars input[type="radio"]:checked + img {
  border-color: crimson;
  transform: scale(1.05);
}

/* ================= BOUTON SUIVANT ================= */
.overlay button {
  margin-top: 2rem;
  background-color: #7e1e1e;
  color: white;
  padding: 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 10px crimson;
  width: 100%;
  transition: background-color 0.3s ease;
}

.overlay button:hover {
  background-color: #a02525;
}