/* Styles généraux */
body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* Conteneur du formulaire */
.formulaire {
  background: #fff;
  padding: 20px 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  width: 90%;
  max-width: 500px;
}

/*Barre de progression*/
.progress-bar-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.progress-bar-steps .step {
  flex: 1;
  position: relative;
  text-align: center;
  padding: 10px 15px;
  background: #e0e0e0;
  color: #333;
  border-radius: 5px;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: default;
}

.progress-bar-steps .step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translateY(-50%);
  height: 4px;
  width: 20px;
  background: #ccc;
}

.progress-bar-steps .step.active {
  background-color: #007BFF;
  color: #fff;
}

.progress-bar-steps .step.active + .step::after {
  background: #007BFF;
}


/* Titres */
h1, h2 {
  text-align: center;
  margin-bottom: 20px;
}

/* Étapes du formulaire */
.form-step {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.5s ease, max-height 0.5s ease;
}
.form-step.active {
  opacity: 1;
  max-height: 2000px; /* Valeur suffisamment grande pour l'expansion */
}

/* Labels et champs */
label {
  display: block;
  margin-top: 10px;
}
input, select {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  box-sizing: border-box;
  transition: border 0.3s, background-color 0.3s, box-shadow 0.3s;
}

/* --- CORRECTION DES GROUPES DE CHECKBOX ET RADIO --- */
.checkbox-group, .radio-group {
  display: flex;
  align-items: center; /* Alignement vertical correct */
  justify-content: flex-start; /* Aligné à gauche */
  gap: 8px; /* Ajuste l’espace entre l’input et le label */
  margin: 10px 0;
}

/* Labels ajustés */
.checkbox-group label,
.radio-group label {
  width: auto; /* Ajuste la taille des labels dynamiquement */
  max-width: 300px; /* Évite qu'ils prennent trop de place */
  margin: 0; /* Supprime les marges inutiles */
}

/* Labels ajustés */
.checkbox-group label {
  min-width: 150px; /* Évite que les labels soient trop petits */
}

/* Labels ajustés */
.radio-group label {
  min-width: 75px; /* Évite que les labels soient trop petits */
 }

/* Inputs ajustés */
.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
  margin: 0; /* Supprime les marges parasites */
  width: 16px; /* Taille standard */
  height: 16px; /* Taille standard */
}

/* Champs poids s'affiche ou non si combat est coché */
#poids-wrapper {
  display: none;
}
#poids-wrapper.active {
  display: block;
}

/* Boutons de navigation */
.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
button {
  padding: 10px 15px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background-color: #007BFF;
  color: #fff;
  /*transition: background-color 0.3s ease;*/
  transition: all 0.2s ease;
  transform: scale(1);
}
button:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

/* Style des erreurs */
.error-message {
  color: red;
  font-size: 0.9em;
  display: block;
  margin-top: 5px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}
.show-error {
  opacity: 1 !important;
  transition: none;
}

/* Champs invalides */
.is-invalid {
  border: 2px solid red;
  background-color: #ffe6e6;
  box-shadow: 0 0 5px red;
  animation: shake 0.3s ease-in-out;
}

/* Champs valides */
.is-valid {
  border: 2px solid green;
  background-color: #e6ffe6;
  box-shadow: 0 0 5px green;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"><path fill="green" d="M9 19.4l-5.7-5.7L5 11l4 4 9-9 1.7 1.7z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

/* Animation de vibration pour les erreurs */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

/* Modal de confirmation */
/*.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}*/
/*.modal-content {
  background: #fff;
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}*/

/* Style du logo admin */
.admin-logo {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 40px;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.3s;
}
.admin-logo:hover {
  opacity: 1;
}

/* Style de la modal admin */
#adminModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}
.error-message {
  color: red;
  font-size: 0.9em;
  display: block;
  margin-top: 5px;
  opacity: 0;
  transition: opacity 0.3s;
}

h4 {
  color: maroon; font-size: small;
}
