/* Assistant d'inscription (vue « Nouvelle inscription » de l'espace) */
.wizard, .success { max-width: 1040px; margin: 0 auto; }
.wizard { overflow: hidden; box-shadow: var(--shadow); }
.stepper { list-style: none; margin: 0; padding: 18px 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.stepper li { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text-3); }
.stepper .num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--border-strong); font-weight: 700; transition: .2s; }
.stepper .num .ico { width: 16px; height: 16px; }
.stepper .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper li.active { color: var(--text); }
.stepper li.active .num { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 5px var(--primary-soft); }
.stepper li.done { color: var(--primary); }
.stepper li.done .num { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

#member-form { padding: 24px 24px 0; }
.step { display: none; animation: step-in .3s ease-out; }
.step.active { display: block; }
@keyframes step-in { from { opacity: 0; transform: translateX(12px); } }
.step-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.step-head .ico-wrap { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.step-head .ico-wrap .ico { width: 22px; height: 22px; }
.step-head h3 { font-size: 20px; font-weight: 750; }
.step-head p { color: var(--text-2); font-size: 14px; }
.subhead { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; }
.subhead::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.grid-2, .grid-3 { display: grid; gap: 16px 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.span-2 { grid-column: span 2; }
.field-switch { justify-content: flex-end; }
.field-switch .switch, .field-switch .check { min-height: 44px; align-items: center; }

.photo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.photo-pick { width: 92px; height: 92px; border-radius: 22px; border: 2px dashed var(--border-strong); display: grid; place-items: center; cursor: pointer; overflow: hidden; background: var(--surface-2); flex: none; transition: border-color .15s; }
.photo-pick:hover { border-color: var(--primary); }
.photo-preview { width: 100%; height: 100%; object-fit: cover; }
.photo-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-3); font-size: 12px; font-weight: 600; }
.photo-empty .ico { width: 26px; height: 26px; }
.photo-text { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }

/* Récapitulatif */
.review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.review-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--surface-2); }
.review-block h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.review-block h4 button { font-size: 12px; text-transform: none; letter-spacing: 0; background: none; border: 0; color: var(--primary); font-weight: 700; cursor: pointer; padding: 0; }
.review-block dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
.review-block dt { color: var(--text-3); }
.review-block dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.consent { margin-top: 20px; padding: 16px; border-radius: var(--radius); background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); }
.consent .check { font-size: 14px; }

.wizard-nav { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px calc(16px + env(safe-area-inset-bottom)); margin: 24px -24px 0; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); }
.step-count { font-size: 13px; color: var(--text-3); font-weight: 600; }
.wizard-nav .btn { min-width: 132px; }

/* File hors-ligne */
.outbox { margin-bottom: 14px; border-radius: var(--radius); padding: 14px 16px; background: var(--warning-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent); display: flex; flex-direction: column; gap: 10px; }
.outbox-head { display: flex; align-items: center; gap: 10px; font-weight: 600; flex-wrap: wrap; }
.outbox-head .ico { width: 20px; height: 20px; color: var(--warning); }
.outbox-head .grow { flex: 1; }
.outbox-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); font-size: 14px; flex-wrap: wrap; }
.outbox-item .err { color: var(--danger); font-size: 13px; flex-basis: 100%; }

/* Succès + carte de membre */
.success { padding: 36px 24px; text-align: center; box-shadow: var(--shadow); }
.success-icon { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); animation: pop .4s cubic-bezier(.2, 1.4, .4, 1); }
.success-icon .ico { width: 36px; height: 36px; }
.success-icon.pending { background: var(--warning-soft); color: var(--warning); }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
.success h2 { font-size: 26px; font-weight: 800; }
.success > p { color: var(--text-2); max-width: 520px; margin: 8px auto 0; }
.success-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .grid-3 { grid-template-columns: 1fr; }
  .stepper { padding: 14px 16px; }
  .stepper .lbl { display: none; }
  .stepper li { justify-content: center; }
  .stepper li.active .lbl { display: block; }
  .stepper li.active { grid-column: span 1; }
}
@media (max-width: 600px) {
  .grid-2, .review { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .field-switch .field-label { display: none; }
  #member-form { padding: 20px 16px 0; }
  .wizard-nav { margin: 20px -16px 0; padding-left: 16px; padding-right: 16px; }
  .wizard-nav .btn { min-width: 0; flex: 1; }
  .step-count { display: none; }
  .stepper li.active .lbl { display: none; }
}
@media print {
  body.print-success .shell > :not(.main-col), body.print-success .topnav, body.print-success .view > :not(.success),
  body.print-success .success-actions { display: none !important; }
  .success { box-shadow: none; border: 0; }
  .member-card { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
