/* ================================
   7. FORMULAIRES
   ================================ */

/* ====== Style global pour tous les formulaires ====== */

/* 1) Tous les inputs, selects et textarea */
form input,
form select,
form textarea {
  width: 100%;
  max-width: 300px;
  padding: 0.75rem 1rem;
  border: 1px solid #444;
  border-radius: 6px;
  background-color: #2a2a2a;
  color: #e0e0e0;
  font-size: 1rem;
  line-height: 1.4;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
  transition:
    border-color 0.2s ease,
    box-shadow    0.2s ease,
    background-color 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

/* 2) Focus */
form input:focus,
form select:focus,
form textarea:focus {
  border-color: #888;
  background-color: #333;
  box-shadow: 0 0 5px rgba(136,136,136,0.5);
}

/* 3) Placeholder */
form input::placeholder,
form textarea::placeholder {
  color: #aaa;
  opacity: 1;
  font-style: italic;
}

input[type="radio"] {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin: 0 0.5em 0 0;
  border: 2px solid #555;
  border-radius: 50%;
  background-color: #2a2a2a;
  position: relative;
  vertical-align: middle;
  cursor: pointer;
  overflow: visible;
  z-index: 1;
  transition: border-color 0.2s ease;
}

input[type="radio"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.5rem;
  height: 0.5rem;
  background-color: #0ff;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.1s ease;
}

input[type="radio"]:checked::before {
  transform: translate(-50%, -50%) scale(1);
}

input[type="radio"]::after {
  content: "";
  position: absolute;
  top: -0.4rem;
  left: -0.4rem;
  width: calc(100% + 0.8rem);
  height: calc(100% + 0.8rem);
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 255, 255, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

input[type="radio"]:focus::after {
  opacity: 1;
}

input[type="radio"]:hover {
  border-color: #0cc;
}
/* 1) Permettre à la .fade-form de laisser déborder le halo */
.fade-form.showing,
.fade-form.visible {
  overflow: visible;
}

/* 3) Petit point intérieur qui apparaît à la coché */
input[type="radio"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.45rem;
  height: 0.45rem;
  background-color: #0ff;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.1s ease;
}

input[type="radio"]:checked::before {
  transform: translate(-50%, -50%) scale(1);
}

/* 4) Halo de focus tout autour, non tronqué */
input[type="radio"]:focus {
  outline: none;
}

input[type="radio"]:focus-visible {
  outline: 2px solid rgba(0,255,255,0.6);
  outline-offset: 2px;
}

/* 5) Survol pour feedback visuel */
input[type="radio"]:hover {
  border-color: #0cc;
}

/* cache la form par défaut */
.fade-form {
  display: none;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}

/* dès qu’on l’insère dans le flux, on autorise le block */
.fade-form.showing {
  display: block;
}

/* on fait l’animation d’apparition */
.fade-form.visible {
  opacity: 1;
  /* max-height suffisamment grand pour contenir le formulaire */
  max-height: 500px;
}

/* Espacer les boutons radio Homme / Femme */
.fade-form form > div {
  display: flex;
  gap: 1.5rem;           /* espace entre chaque label */
  justify-content: center;/* centre les deux champs */
  align-items: center;    /* aligne verticalement l’input et le texte */
  margin-bottom: 1rem;    /* garde un espace sous ce groupe */
}

/* 1) On replace le label AU-DESSUS de l’input dans TOUS les .form-group */
form .form-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* pour que le label colle à gauche */
  margin: 1.5rem;
}

/* 2) On remet le label en block avec un petit espace dessous */
form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #ccc;
  font-weight: bold;
  font-size: 0.95rem;
}

/* Centre l’input d’activation dans son container */
.activation-group input {
  display: block;      /* pour que margin auto fonctionne */
  margin: 0 auto;      /* centre horizontalement */
}

.gender-form {
  margin-top: .5rem;
}
.gender-form label {
  margin-right: 1rem;
}

/* On cible précisément les form-group DANS les boxes */
.game-interaction-box form .form-group {
  display: flex !important;
  flex-direction: column;
  align-items: center !important;
}
/* On réduit la largeur des inputs/select pour qu’ils restent centrés */
.game-interaction-box form .form-group input,
.game-interaction-box form .form-group select {
  width: 60% !important;
  max-width: 300px;
  margin: 0.5rem auto !important;
}

.login-form .btn {
  width: 100%;
  max-width: 300px;
  display: block;
  margin: 1rem auto;
}

.input-with-icon {
  color: #0ff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-with-icon i {
  color: #0ff;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

.link-inline {
  color: #0ff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.link-inline:hover {
  color: #4dcfff;
  text-decoration: underline;
}

.form-step {
  display: none;
  flex-direction: column;
  gap: 1rem;
  animation: fade 0.3s ease;
}

.form-step.active {
  display: flex;
}

.step-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.step-buttons .btn {
  background-color: transparent;
  border: 2px solid #0ff;
  color: #0ff;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.step-buttons .btn:hover {
  background-color: #0ff;
  color: #000;
}

.login-form label {
  font-size: 1.5rem; /* équivalent à h2 */
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.form-hint {
  display: block;
  font-size: 1rem;
  color: #aaa;
  margin-bottom: 0.3rem;
  margin-top: -0.4rem;
}

/*************************************** Overlay thèmes *******************************************/

.theme-checkboxes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  justify-content: center;
  justify-items: center;
  margin: 0 auto;
  max-width: 600px;
}

.theme-checkbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  width: 80px;
  box-sizing: border-box;
}

.theme-checkbox input[type="checkbox"] {
  display: none;
}

.theme-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.theme-icon-small {
  width: 80px;
  height: 80px;
  color: #fff;            /* couleur par défaut de l’icône */
  fill: currentColor;     /* pour que la balise <svg> elle-même reprenne currentColor */
  border: 3px solid transparent;
  border-radius: 10px;
  transition: color .2s, border .2s, transform .2s;
}

/* cible explicitement tous les paths / circles / polygons… */
.theme-icon-small path,
.theme-icon-small circle,
.theme-icon-small polygon,
.theme-icon-small rect {
  fill: currentColor !important;
}

/* état coché */
.theme-checkbox input:checked ~ .theme-content .theme-icon-small {
  color: #0ff;            /* recolore l’icône */
  border-color: currentColor;
  box-shadow: 0 0 12px currentColor;
  transform: scale(1.1);
}

.theme-label {
  color: white;
  margin-top: 5px;
  font-size: 0.8em;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.theme-pack-block {
  margin-bottom: 1em;
}

.theme-pack-title {
  color: white;
  margin-bottom: 0.5em;
  font-size: 1.1em;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#cardCreationForm {
  max-height: 80vh;         /* limite la hauteur */
  overflow-y: auto;         /* rend le contenu scrollable */
  padding-right: 1rem;      /* espace pour la scrollbar */
}

#constraints {
  min-height: 10rem;  /* ou 150px */
  padding: 0.5rem;
  font-size: 1rem;
}
