/**
 * Styles du tunnel de souscription [coop_souscrire].
 *
 * Les variables --coop-* viennent du thème enfant (theme-enfant-coop/style.css) ;
 * des valeurs de repli sont fournies au cas où le thème enfant ne serait pas actif.
 * Le sélecteur [hidden] est forcé car certains thèmes/Elementor redéfinissent
 * display sur les éléments de formulaire.
 */

#coop-tunnel [hidden] {
  display: none !important;
}

#coop-tunnel {
  max-width: 640px;
  margin: 0 auto;
}

/* --- Fil d'Ariane des étapes --- */
.coop-jalons {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  counter-reset: jalon;
  margin: 1.5rem 0;
  padding: 0;
}
.coop-jalon {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.25rem;
  font-size: 0.85rem;
  border-bottom: 3px solid #ddd;
  color: #888;
  counter-increment: jalon;
}
.coop-jalon::before {
  content: counter(jalon) ". ";
  font-weight: 700;
}
.coop-jalon.actif {
  border-color: var(--coop-primaire, #1d6f5c);
  color: var(--coop-fonce, #14342b);
  font-weight: 700;
}
.coop-jalon.fait {
  border-color: var(--coop-primaire, #1d6f5c);
  color: var(--coop-primaire, #1d6f5c);
}

/* --- Champs --- */
.coop-formulaire fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
.coop-formulaire legend {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding: 0;
}
.coop-ligne {
  margin-bottom: 1rem;
}
.coop-ligne label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.coop-ligne input:not([type="radio"]):not([type="checkbox"]),
.coop-ligne select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  box-sizing: border-box;
  background: var(--coop-blanc, #ffffff);
}
.coop-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.coop-2col p {
  margin: 0;
}
@media (max-width: 480px) {
  .coop-2col {
    grid-template-columns: 1fr;
  }
}
.coop-ligne-radios {
  display: flex;
  gap: 1.5rem;
}
.coop-ligne-radios label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-weight: 400;
  margin: 0;
}

/* --- Cases à cocher / consentements --- */
.coop-case {
  margin-bottom: 1rem;
}
.coop-case > label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-weight: 400;
}
.coop-case input[type="checkbox"] {
  margin-top: 0.25rem;
}
.coop-note {
  font-size: 0.85rem;
  color: #666;
  margin: 0.25rem 0 0 1.6rem;
}
.coop-question-profil {
  font-weight: 600;
  margin: 0 0 0.5rem;
}

/* --- Montant calculé --- */
.coop-montant {
  font-size: 1.4rem;
  color: var(--coop-primaire, #1d6f5c);
}

/* --- Récapitulatif --- */
.coop-recap {
  background: var(--coop-clair, #f7f5f0);
  border-radius: var(--coop-rayon, 12px);
  padding: 1rem 1.25rem;
  margin: 0 0 1.25rem;
}
.coop-recap div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
}
.coop-recap dt {
  font-weight: 600;
}
.coop-recap dd {
  margin: 0;
  text-align: right;
}

/* --- Boutons de navigation --- */
.coop-boutons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.coop-boutons :only-child {
  margin-left: auto; /* étape 1 : bouton "Continuer" seul, aligné à droite */
}
.coop-boutons .coop-cta {
  margin-top: 0; /* annule le margin-top du .coop-cta défini dans le thème */
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.coop-boutons .coop-cta:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}
.coop-btn-retour {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: var(--coop-fonce, #14342b);
  text-decoration: underline;
  padding: 0.9rem 0;
}

/* --- Messages d'état --- */
.coop-erreur {
  background: #fdecea;
  color: #b3261e;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-top: 1rem;
}
.coop-succes h3 {
  color: var(--coop-primaire, #1d6f5c);
  margin-top: 0;
}
