/* ============================================================
   ADHESION-FLOW.CSS — Parcours de demande d'adhésion KYMA
   Réutilise les variables et classes de styles.css (couleurs,
   typographie, boutons) — ne redéfinit que ce qui est spécifique
   à ce parcours.
============================================================ */

/* ── STEPPER ──────────────────────────────────────────────── */
.af-stepper-band {
  background: var(--off-white);
  border-bottom: 1px solid rgba(26,86,219,0.08);
  padding: 18px 0;
  position: sticky;
  top: var(--nav-h);
  z-index: 80;
}
.af-stepper {
  display: flex;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  list-style: none;
  overflow-x: auto;
  gap: 8px;
}
.af-stepper-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  opacity: 0.45;
}
.af-stepper-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(26,86,219,0.15);
  color: var(--blue-dark);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.af-stepper-label { font-size: 0.78rem; font-weight: 600; color: var(--text-dark); white-space: nowrap; }
.af-stepper-item.af-current { opacity: 1; }
.af-stepper-item.af-current .af-stepper-num { background: var(--blue); color: white; }
.af-stepper-item.af-done { opacity: 0.85; }
.af-stepper-item.af-done .af-stepper-num { background: #16a34a; color: white; }

@media (max-width: 700px) {
  .af-stepper-label { display: none; }
}

/* ── PANNEAUX D'ÉTAPE ─────────────────────────────────────── */
.af-panel { display: none; padding: 40px 0; }
.af-panel.af-active { display: block; }
.af-panel h2 { font-size: 1.5rem; margin-bottom: 10px; outline: none; }
.af-panel-intro { font-size: 0.9rem; color: var(--text-soft); line-height: 1.6; margin-bottom: 24px; }

.af-field { margin-bottom: 18px; }
.af-field label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-dark); margin-bottom: 6px; }
.af-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(26,86,219,0.15);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-dark);
  background: white;
}
.af-field input:focus { outline: none; border-color: var(--blue); }

.af-error {
  font-size: 0.82rem;
  color: #dc2626;
  min-height: 1.2em;
  margin: 8px 0;
}

.af-actions { margin-top: 28px; }
.af-actions-split { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ── ÉTAPE 1 : DÉPÔT DE FICHIER ───────────────────────────── */
.af-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue-pale);
  color: var(--blue-dark);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  margin-bottom: 24px;
  transition: background 0.15s;
}
.af-download-btn:hover { background: rgba(26,86,219,0.18); }
.af-download-btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.af-dropzone {
  position: relative;
  border: 2px dashed rgba(26,86,219,0.25);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.af-dropzone:hover, .af-dropzone:focus-visible { border-color: var(--blue); background: var(--blue-pale); }
.af-dropzone.af-dropzone-active { border-color: var(--blue); background: var(--blue-pale); }
.af-dropzone-icon { width: 36px; height: 36px; color: var(--blue); margin-bottom: 12px; }
.af-dropzone-text { font-size: 0.92rem; color: var(--text-dark); font-weight: 600; margin-bottom: 14px; }
.af-dropzone-btn {
  background: var(--blue);
  color: white;
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 10px;
}
.af-dropzone-hint { font-size: 0.75rem; color: var(--text-muted); }
.af-file-input-hidden {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.af-file-confirm {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #dcfce7;
  color: #16a34a;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 10px;
  margin-top: 16px;
}
.af-file-confirm svg { width: 18px; height: 18px; flex-shrink: 0; }
.af-file-confirm em { font-style: normal; font-weight: 400; opacity: 0.85; margin-left: 4px; }
.af-file-remove {
  margin-left: auto;
  background: none;
  border: none;
  color: #16a34a;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

/* ── ÉTAPE 2 : MOT DE PASSE ────────────────────────────────── */
.af-password-row { position: relative; }
.af-password-row input { padding-right: 44px; }
.af-password-toggle {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
}
.af-password-toggle svg { width: 18px; height: 18px; }
.af-password-toggle:hover { color: var(--blue); }

.af-password-checklist {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0;
  padding: 16px;
  background: var(--off-white);
  border-radius: 12px;
}
.af-password-checklist li {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.af-password-checklist li::before {
  content: "";
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(26,86,219,0.25);
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.af-password-checklist li.af-rule-ok { color: #16a34a; font-weight: 600; }
.af-password-checklist li.af-rule-ok::before {
  background: #16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/10px no-repeat;
  border-color: #16a34a;
}

.af-turnstile-wrap { margin: 20px 0; }

/* ── ÉTAPE 3 : NUMÉRO DE MEMBRE ───────────────────────────── */
.af-member-code-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  border-radius: 16px;
  padding: 28px 30px;
  margin-bottom: 14px;
}
.af-member-code {
  font-family: var(--font-title);
  font-size: 2.4rem;
  font-weight: 800;
  color: white;
  letter-spacing: 0.02em;
}
.af-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.af-copy-btn svg { width: 15px; height: 15px; }
.af-copy-btn:hover { background: rgba(255,255,255,0.25); }

.af-recovery-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 14px;
  padding: 22px 24px;
  margin-top: 24px;
}
.af-recovery-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 8px;
}
.af-recovery-head svg { width: 18px; height: 18px; }
.af-recovery-card p { font-size: 0.85rem; color: #78350f; line-height: 1.55; margin-bottom: 12px; }
.af-recovery-code {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 800;
  color: #92400e;
  background: white;
  border-radius: 8px;
  padding: 10px 16px;
  display: inline-block;
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}
.af-recovery-card .af-copy-btn {
  background: #92400e;
  border-color: #92400e;
  display: flex;
  width: fit-content;
}
.af-recovery-card .af-copy-btn:hover { background: #78350f; }
.af-recovery-warning { font-size: 0.78rem; color: #92400e; font-style: italic; margin-top: 12px; }

/* ── ÉTAPE 4 : CONFIRMATION ────────────────────────────────── */
.af-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--off-white);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 0.87rem;
  color: var(--text-dark);
  line-height: 1.5;
}
.af-checkbox-row input {
  margin-top: 3px;
  width: 18px; height: 18px;
  flex-shrink: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

@media (max-width: 600px) {
  .af-password-checklist { grid-template-columns: 1fr; }
  .af-member-code { font-size: 1.9rem; }
}

/* ── RÉCAPITULATIF PAIEMENT ───────────────────────────────── */
.af-recap-card {
  background: var(--off-white);
  border-radius: 16px;
  padding: 26px 28px;
  margin: 32px 0 28px;
}
.af-recap-card h2 { font-size: 1.15rem; margin-bottom: 16px; }
.af-recap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(26,86,219,0.08);
  font-size: 0.87rem;
}
.af-recap-row:last-child { border-bottom: none; }
.af-recap-row span { color: var(--text-soft); }
.af-recap-row strong { color: var(--text-dark); font-weight: 700; }
.af-recap-row strong.af-recap-ok { color: #16a34a; }

.af-checkbox-row a { color: var(--blue); font-weight: 600; }

/* ── SPINNER (page de confirmation) ───────────────────────── */
.af-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--blue-pale);
  border-top-color: var(--blue);
  border-radius: 50%;
  margin: 0 auto 22px;
  animation: af-spin 0.8s linear infinite;
}
@keyframes af-spin { to { transform: rotate(360deg); } }

/* ── CTA principal page publique adhésion ─────────────────── */
.adhesion-cta-main { margin-top: 32px; }
