/* =========================
   SECTION INSCRIPTION
========================= */

.inscription {
  padding: 20px 15px 40px;
  max-width: 720px;
  margin: 0 auto;
}

/* =========================
   FORMULAIRE
========================= */

.form-parent {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* =========================
   BLOCS
========================= */

.form-block {
  border: 1px solid var(--bleu);
  border-radius: var(--radius);
  padding: 0px 15px 10px 15px;
  background: #fff;
}

.form-block legend {
  padding: 0 8px;
  font-weight: bold;
  color: var(--bleu);
  font-size: 1.1rem;
}

/* =========================
   GROUPES DE CHAMPS
========================= */

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--bleu);
}

.form-group p {
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 0px;
  margin-bottom: 6px;
  color: var(--gris-fonce);
}

/* =========================
   INPUTS / SELECT / TEXTAREA
========================= */

input,
select,
textarea {
  padding: 10px 12px;
  border: 1px solid var(--bleu);
  border-left: 4px solid var(--bleu);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border var(--transition), box-shadow var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 2px var(--vert-leger);
}

select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

textarea {
  resize: vertical;
}

/* =========================
   CHECKBOX GROUP
========================= */

.checkbox-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
}

/* Checkbox native, légèrement agrandie */
.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--bleu);
}

/* Texte bien aligné */
.checkbox-item span {
  line-height: 1.3;
  color: var(--bleu);
}


/* =========================
   COULEUR TEXTE INPUTS
========================= */

input,
select,
textarea {
  color: var(--bleu);
  background-color: var(--vert-leger-2);
  text-align: center;
  font-size: 0.95rem;
}

/* Placeholder */
input::placeholder,
textarea::placeholder {
  color: var(--gris-fonce);
}

/* Champs date / number spécifiques */
input[type="date"],
input[type="number"],

/* iOS Safari fix */
input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
  color: var(--bleu);
}

/* Select option */
select option {
  color: var(--bleu);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--bleu);        /* bleu Nounouland */
  box-shadow: 0 0 0 3px var(bleu);
}



/* =========================
   RADIOS
========================= */

.form-radio {
  display: flex;
  gap: 20px;
}

.form-radio label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  cursor: pointer;
}

.form-radio input {
  accent-color: var(--bleu);
}

.form-radio label
  {
  color: var(--bleu);
  }


/* =========================
   PLANNING
========================= */

.planning-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-x: hidden;
  color: var(--bleu);
  font-size: 12px;
}

/* Une ligne = libellé + 7 cases */
.planning-row {
  display: grid;
  grid-template-columns: 70px repeat(7, 1fr);
  align-items: center;
  gap: 0px;
}

/* En-tête jours */
.planning-header {
  font-weight: 600;
  text-align: center;
}

/* =========================
   CHECKBOX TACTILES
========================= */

.planning-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 32px;
  height: 32px;
  border: 2px solid #cfd6e4;
  border-radius: 6px;
  background: #fff;
  margin: 0 auto;
  cursor: pointer;
  transition: all 0.15s ease;
}

/* État cochée */
.planning-row input[type="checkbox"]:checked {
  background: var(--bleu);
  border-color: var(--gris-fonce);
}

/* Petit feedback tactile */
.planning-row input[type="checkbox"]:active {
  transform: scale(0.92);
}

/* Focus clavier */
.planning-row input[type="checkbox"]:focus-visible {
  outline: 2px solid #2b6df3;
  outline-offset: 2px;
}


/* =========================
   ACTIONS
========================= */

.form-actions {
  margin-top: 10px;
}

.btn-submit {
  width: 100%;
  padding: 14px 18px;
  background: var(--vert);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn-submit:hover {
  background: #24935f;
}

.btn-submit:active {
  transform: scale(0.98);
}
/* =========================
   AIDE CONTEXTUELLE FORMULAIRE
========================= */

.form-helper {
  background: var(--vert-leger-2);
  border-left: 4px solid #263E7E;
  padding: 5px 14px;
  margin-bottom: 16px;
  border-radius: 6px;
}

.helper-question {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #263E7E;
}

.helper-info {
  margin: 0;
  font-size: 15px;
  color: var(--bleu);
  line-height: 1.4;
}

/* =========================
   ERREURS FORMULAIRE
========================= */

.form-error {
  margin: 0 0 1rem 0;
  padding: 0;
}

.form-error .error-message {
  color: #b00020;              /* rouge lisible */
  background: #fdecea;         /* fond léger */
  border-left: 4px solid #b00020;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
  border-radius: 4px;
}

/* Optionnel : mise en évidence du bloc */
.form-block.has-error {
  border-color: #b00020;
}

/* Optionnel : inputs en erreur */
.form-block.has-error input {
  border-color: #b00020;
}


/* =========================
   BANDEAU DONNÉES / RGPD
========================= */

.data-info-banner {
  margin: 30px auto 0;
  max-width: 700px;
  background: ;
  border: 1px solid #dfeee8;
  border-radius: 8px;
  padding: 14px 16px;
}

.data-info-banner p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #2AA56E; /* vert Nounouland */
  text-align: center;
}

.data-info-banner strong {
  color: #263E7E; /* bleu Nounouland */
}

.process-next-step {
  display: none;
  margin-top: 24px;
  padding: 16px;
  background: #f4f8fb;
  border-left: 4px solid #2c7be5;
  border-radius: 6px;
  font-size: 0.95rem;
}

.process-next-step h3 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  color: #2c7be5;
}

.process-next-step p {
  margin: 8px 0;
}

.process-next-step ul {
  margin: 8px 0 8px 18px;
  padding: 0;
}

.process-next-step li {
  margin-bottom: 4px;
}

.process-note {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #666;
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  margin: 0;
}

.nav-arrow {
  background: none;
  border: none;
  font-size: 2rem;
  font-weight: bold;
  color: #1f4fd8;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-prev {
  margin-left: 5%;
}

.nav-next {
  margin-right: 5%;
}

/* =========================
   LOADER FORMULAIRE
========================= */

#form-loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#form-loader.active {
  display: flex;
}

.loader-content {
  text-align: center;
  background: #ffffff;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.loader-content p {
  margin-top: 1rem;
  font-size: 1rem;
  color: #1f6fff;
  font-weight: 500;
}

/* Spinner */
.loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #eaf1ff;
  border-top-color: #1f6fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.photo-container {
  width: 100%;
  max-width: 300px;
  margin-top: 12px;
  border: 1px solid #ccc;
  border-radius: 12px;
  overflow: hidden;
}

.photo-controls button {
  background: var(--bleu);
  color: #fff;
  border: none;
  padding: 6px 12px;
  margin-right: 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

.photo-controls button:hover {
  background: #1e2d6c;
}

/* =========================
   PREVIEW PHOTO SIMPLE
========================= */

.photo-preview-simple {
  margin-top: 12px;
  width: 160px;
  height: 160px;
  border: 2px dashed var(--vert);
  border-radius: 12px;
  overflow: hidden;
  display: none;
}

.photo-preview-simple img {
  max-width: 180px;
  margin-top: 10px;
  border-radius: 10px;
  display: none;
}





/* =========================
   DESKTOP
========================= */

@media (min-width: 1024px) {
  .inscription {
    padding: 40px 20px 60px;
  }

  .form-actions {
    display: flex;
    justify-content: center;
  }

  .btn-submit {
    max-width: 320px;
  }
}
