body[data-page^="step"] { padding-bottom: 96px; }

.sr-input {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.wizard-chrome .site-header { justify-content: space-between; padding: 18px 20px; }
.wizard-chrome .back-link { font-size: 14px; color: var(--ink); opacity: 0.65; }

.progress { max-width: 420px; margin: 0 auto; padding: 22px 24px 4px; text-align: center; }
.progress-arc { width: 220px; height: auto; display: block; margin: 0 auto 8px; }
.progress-caption { font-size: 13px; opacity: 0.65; }

.step { display: block; max-width: 420px; margin: 0 auto; padding: 20px 24px 0; border: none; min-width: 0; }
.step h2 { font-size: 26px; margin: 0 0 22px; }
.step[data-step="3"] h2 { text-align: center; }

.field-label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin: 20px 0 8px; }
h2 + .field-label { margin-top: 0; }
.field-optional { opacity: 0.5; font-weight: 400; }

.text-input, .textarea-input {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border: 1px solid rgba(27,26,23,0.3);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
}
.text-input:focus, .textarea-input:focus { border-color: var(--accent); outline: none; }
.textarea-input { resize: vertical; }

.phone-input { display: flex; align-items: center; border: 1px solid rgba(27,26,23,0.3); border-radius: 4px; background: #fff; }
.phone-prefix { padding: 14px 8px 14px 14px; color: var(--ink); opacity: 0.6; border-right: 1px solid rgba(27,26,23,0.2); }
.phone-input .text-input { border: none; }
.phone-input .text-input:focus { border: none; }

.field-error { color: #8a3018; font-size: 13px; margin-top: 6px; }
.field-error[hidden] { display: none; }

.field-hint { font-size: 12.5px; opacity: 0.65; margin-top: 8px; line-height: 1.5; }

/* CATEGORY GRID */
.category-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 6px; }
.cat-option {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 16px 6px; min-height: 48px;
  border: 1px solid rgba(27,26,23,0.25); border-radius: 6px;
  background: #fff; color: var(--ink);
  font-size: 12.5px; cursor: pointer;
}
.cat-option svg { width: 26px; height: 26px; }
.cat-option:has(.sr-input:checked) { border: 1.6px solid var(--accent); background: rgba(35,64,200,0.06); color: var(--accent); font-weight: 600; }
.cat-option:has(.sr-input:checked) svg { stroke: var(--accent); }
.cat-option:has(.sr-input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* PHOTOS */
.photo-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 1.6px dashed rgba(27,26,23,0.35); border-radius: 6px; padding: 28px 16px;
  cursor: pointer; text-align: center;
}
.photo-drop span { font-size: 15px; font-weight: 600; color: var(--ink); }
.photo-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 14px; padding: 0; list-style: none; }
.photo-grid:empty { margin-top: 0; }
.photo-item { position: relative; aspect-ratio: 1; border: 1px solid rgba(27,26,23,0.2); border-radius: 4px; overflow: hidden; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-remove {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.photo-remove svg { width: 10px; height: 10px; }
.photo-main-badge {
  position: absolute; bottom: 0; left: 0; right: 0; background: var(--accent); color: var(--bg);
  font-size: 10px; text-align: center; padding: 2px 0;
}
.photo-item:not(:first-child) .photo-main-badge { display: none; }

/* CHECKBOX + SWITCH */
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; cursor: pointer; }
.check-row.align-start { align-items: flex-start; }
.checkbox-box {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 20px;
  width: 20px; height: 20px; border-radius: 3px; border: 1.6px solid var(--ink);
  color: var(--bg); font-size: 12px; margin-top: 1px;
}
.checkbox-box::after { content: ""; }
label:has(.checkbox-input:checked) .checkbox-box { background: var(--accent); border-color: var(--accent); }
label:has(.checkbox-input:checked) .checkbox-box::after { content: "\2713"; }
.check-text { font-size: 14.5px; }
.check-sub { font-size: 12.5px; opacity: 0.65; display: block; margin-top: 2px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 22px 0 4px; cursor: pointer; }
.switch-track { display: inline-flex; align-items: center; width: 44px; height: 24px; border-radius: 12px; background: rgba(27,26,23,0.25); padding: 2px; flex: 0 0 44px; transition: background 0.15s; }
.switch-knob { display: block; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
label:has(.switch-input:checked) .switch-track { background: var(--accent); }
label:has(.switch-input:checked) .switch-knob { transform: translateX(20px); }

.wa-field { display: none; margin-top: 14px; }
fieldset:has(#waSame:not(:checked)) .wa-field { display: block; }

/* PLAN CARDS (step 3) */
.plan-list { display: flex; flex-direction: column; gap: 16px; }
.plan-card { position: relative; border: 1px solid rgba(27,26,23,0.22); border-radius: 4px; padding: 22px 20px; cursor: pointer; background: transparent; display: block; }
.plan-card.featured { background: var(--tan); }
.plan-card:has(.sr-input:checked) { border: 1.6px solid var(--accent); background: rgba(35,64,200,0.05); }
.plan-card .ribbon { top: -14px; right: 18px; left: auto; transform: rotate(-3deg); padding: 5px 12px; font-size: 12px; }
.plan-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.plan-card-name { display: flex; align-items: center; gap: 10px; }
.plan-radio-dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1.6px solid var(--ink); }
.plan-card:has(.sr-input:checked) .plan-radio-dot { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--bg); }
.plan-name { font-family: var(--serif); font-weight: 600; font-size: 19px; }
.plan-price { font-family: var(--serif); font-weight: 600; font-size: 21px; }
.plan-card:not(.accent-price) .plan-price { color: var(--ink); }
.plan-card.accent-price .plan-price { color: var(--accent); }
.plan-card ul { margin: 10px 0 0; padding-left: 34px; font-size: 14px; line-height: 1.8; opacity: 0.85; }
.plan-note { font-size: 13px; opacity: 0.6; text-align: center; margin: 18px 0 0; }
.gratuit-notice { display: none; margin-top: 14px; padding: 12px 14px; background: var(--tan); border-radius: 4px; font-size: 13.5px; }
.gratuit-notice.is-visible { display: block; }

/* STEP 4 RECAP */
.recap-card { background: var(--tan); padding: 18px; border-radius: 4px; }
.recap-top { display: flex; gap: 12px; align-items: flex-start; }
.recap-photo { width: 56px; height: 56px; object-fit: cover; border-radius: 3px; flex: 0 0 56px; background: rgba(27,26,23,0.1); }
.recap-main { flex: 1; min-width: 0; }
.recap-title { font-family: var(--serif); font-weight: 600; font-size: 16px; line-height: 1.3; }
.recap-city { font-size: 14px; opacity: 0.75; margin-top: 2px; }
.recap-edit { font-size: 13px; white-space: nowrap; cursor: pointer; background: none; border: none; padding: 0; font-family: var(--sans); color: var(--ink); text-decoration: none; }
.recap-divider { border-top: 1px solid rgba(27,26,23,0.2); margin: 14px 0; }
.recap-row { display: flex; justify-content: space-between; align-items: center; font-size: 14.5px; padding: 3px 0; }
.recap-row.total { font-size: 16px; font-weight: 600; }
.recap-row .with-edit { display: flex; align-items: center; gap: 8px; }

.payment-list { display: flex; flex-direction: column; gap: 10px; }
.payment-option { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid rgba(27,26,23,0.25); border-radius: 4px; cursor: pointer; background: #fff; }
.payment-option:has(.sr-input:checked) { border: 1.6px solid var(--accent); background: rgba(35,64,200,0.06); }
.payment-radio-dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1.6px solid var(--ink); flex: 0 0 16px; }
.payment-option:has(.sr-input:checked) .payment-radio-dot { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px #fff; }
.payment-section { display: block; }
#stepForm[data-plan="gratuit"] .payment-section { display: none; }

.hint-card { display: none; }
#stepForm:has(input[name="payment"][value="carte"]:checked) .hint-offline { display: none; }
#stepForm:has(input[name="payment"][value="carte"]:checked) .hint-card { display: block; }

.cgv-text { font-size: 13.5px; line-height: 1.5; }

/* WIZARD ACTIONS */
.wizard-actions { max-width: 420px; margin: 24px auto 0; padding: 14px 24px 16px; }
.wizard-actions .btn { display: block; width: 100%; text-align: center; }
.step .wizard-actions { position: fixed; left: 0; right: 0; bottom: 0; max-width: 420px; margin: 0 auto; background: var(--bg); border-top: 1px solid rgba(27,26,23,0.2); z-index: 20; }
.btn-step-back { display: block; text-align: center; margin-top: 12px; font-size: 14px; opacity: 0.7; background: none; border: none; cursor: pointer; font-family: var(--sans); width: 100%; color: var(--ink); text-decoration: none; }
#stepForm .btn-submit-free,
#stepForm .btn-submit-card { display: none; }
#stepForm[data-plan="gratuit"] .btn-submit-paid { display: none; }
#stepForm[data-plan="gratuit"] .btn-submit-free { display: block; }
#stepForm:not([data-plan="gratuit"]):has(input[name="payment"][value="carte"]:checked) .btn-submit-paid { display: none; }
#stepForm:not([data-plan="gratuit"]):has(input[name="payment"][value="carte"]:checked) .btn-submit-card { display: block; }

/* RESULT PAGES (confirmation / paiement-reussi / paiement-echec) */
.result { max-width: 420px; margin: 0 auto; padding: 60px 24px; text-align: center; }
.result h1 { font-size: 30px; margin-bottom: 16px; }
.result p.lead { font-size: 16px; line-height: 1.6; opacity: 0.85; margin: 0 0 32px; }
.result .field-error { margin: -16px 0 20px; }
.confirm-arc { width: 180px; height: auto; display: block; margin: 0 auto 28px; }
.confirm-arc .arc-line { stroke-dasharray: 230; stroke-dashoffset: 230; animation: draw-arc 0.9s ease-out forwards; }
.confirm-arc .arc-head { opacity: 0; animation: fade-in 0.3s ease-out 0.7s forwards; }
@keyframes draw-arc { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
.confirm-steps { display: flex; flex-direction: column; gap: 14px; text-align: left; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 4px; margin-bottom: 32px; list-style: none; }
.confirm-steps li { display: flex; gap: 12px; font-size: 14.5px; }
.confirm-steps strong { color: var(--accent); }
.confirm-actions { display: flex; flex-direction: column; gap: 12px; }
.confirm-actions .btn { display: block; text-align: center; }

noscript .noscript-banner {
  display: block; max-width: 420px; margin: 20px auto; padding: 14px 16px;
  background: rgba(138,48,24,0.08); border: 1px solid rgba(138,48,24,0.3); border-radius: 4px;
  color: #8a3018; font-size: 14px; text-align: center;
}
