/* ============ Tunnel de commande ============ */
.order-page { background: radial-gradient(60% 40% at 100% 0%, var(--sky), transparent 70%), radial-gradient(50% 40% at 0% 30%, #fdeee2, transparent 70%), var(--cream); }
.back-link { font-family: var(--font-display); font-weight: 500; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.order { padding: 26px 0 120px; }
.order-intro { text-align: center; margin-bottom: 26px; }
.order-intro h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: .2em; }
.order-intro p { color: var(--ink-soft); margin: 0; }

.progress { list-style: none; padding: 0; margin: 0 auto 30px; display: flex; justify-content: center; gap: 6px; max-width: 720px; }
.progress li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: .85rem; font-weight: 700; color: var(--ink-soft); }
.progress li::before { content: ""; position: absolute; top: 19px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 3px; background: var(--line); border-radius: 3px; }
.progress li:first-child::before { display: none; }
.progress span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2.5px solid var(--line); font-family: var(--font-display); font-weight: 600; transition: all .2s; position: relative; z-index: 1; }
.progress em { font-style: normal; }
.progress li.done span { background: var(--blue); border-color: var(--ink); color: #fff; }
.progress li.done::before, .progress li.current::before { background: var(--blue); }
.progress li.current span { background: var(--orange); border-color: var(--ink); color: #fff; box-shadow: 3px 3px 0 var(--ink); }
.progress li.current { color: var(--ink); }
@media (max-width: 560px) { .progress em { display: none; } .progress li.current em { display: block; position: absolute; top: 44px; white-space: nowrap; } .progress { margin-bottom: 44px; } }

.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
@media (max-width: 960px) { .order-grid { grid-template-columns: minmax(0, 1fr); } }

.panel { border: 2.5px solid var(--ink); border-radius: var(--radius); background: var(--paper); padding: 30px; margin: 0; box-shadow: 6px 6px 0 var(--ink); min-width: 0; }
.panel legend { float: left; width: 100%; padding: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.55rem; line-height: 1.15; margin-bottom: 10px; display: flex; gap: 12px; align-items: center; }
.panel legend + * { clear: both; }
.panel .num { width: 40px; height: 40px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; border: 2.5px solid var(--ink); flex: none; font-size: 1.15rem; }
.help { color: var(--ink-soft); margin: 0 0 20px; }
.help.small { font-size: .9rem; margin: 10px 0 0; }
@media (max-width: 560px) { .panel { padding: 22px 18px; } .panel legend { font-size: 1.3rem; } }

.callout { background: #fdeee2; border: 2px dashed var(--orange); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 22px; font-size: .98rem; }

.field { display: grid; gap: 8px; margin-top: 22px; }
.field > span { font-weight: 800; }
.field i { font-weight: 600; color: var(--ink-soft); font-style: normal; font-size: .9rem; }
.req { color: var(--warn); }
.field input, .field textarea, .field select {
  font: inherit; width: 100%; padding: .8em 1em; border-radius: 14px; border: 2.5px solid var(--ink); background: var(--cream); color: var(--ink);
  transition: box-shadow .15s, background .15s;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; background: #fff; box-shadow: 4px 4px 0 var(--orange); }
.field-inline select { max-width: 200px; }
.mini-label { font-weight: 800; display: block; margin: 0 0 10px; }

/* Choice cards */
.choice-grid { display: grid; gap: 12px; }
.themes-choice { grid-template-columns: repeat(3, 1fr); }
.plans-choice { grid-template-columns: 1fr; }
@media (max-width: 700px) { .themes-choice { grid-template-columns: repeat(2, 1fr); } }
.choice { position: relative; cursor: pointer; display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .box {
  display: block; height: 100%; border: 2.5px solid var(--ink); border-radius: 18px; padding: 14px 14px 14px 16px; background: var(--paper);
  transition: transform .12s, box-shadow .12s, background .12s; position: relative; overflow: hidden;
}
.choice:hover .box { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.choice input:checked + .box { background: #eef2fa; box-shadow: 4px 4px 0 var(--blue); border-color: var(--blue-deep); }
.choice input:focus-visible + .box { outline: 3px solid var(--orange); outline-offset: 3px; }
.choice .box::after {
  content: ""; position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--ink); background: #fff;
}
.choice input:checked + .box::after { background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 16px no-repeat; }
.choice .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); margin-right: 6px; vertical-align: -1px; }
.choice strong { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; display: block; padding-right: 26px; line-height: 1.2; }
.choice small { display: block; color: var(--ink-soft); font-size: .85rem; margin-top: 4px; line-height: 1.35; }
.plan-choice .box { padding: 18px 20px; display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; align-items: center; }
.plan-choice .box::after { top: 50%; transform: translateY(-50%); right: 16px; }
.plan-choice .box > div { padding-right: 0; }
.plan-choice .p { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--blue); padding-right: 36px; }
.plan-choice .tag { display: inline-block; background: var(--orange); color: #fff; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: .1em .7em; margin-left: 6px; vertical-align: 3px; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 480px) { .plan-choice .box { grid-template-columns: 1fr; } .plan-choice .p { font-size: 1.35rem; } }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: .5em 1em; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font-weight: 700; font-size: .95rem; transition: all .12s; }
.chip:hover span { background: var(--peach); }
.chip input:checked + span { background: var(--blue); color: #fff; box-shadow: 2px 2px 0 var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.chip.bad input:checked + span { background: var(--warn); }
.chip .sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); margin-right: 6px; vertical-align: -1px; }

.alert { display: flex; gap: 10px; align-items: flex-start; background: #fdeeec; color: #8b2e20; border: 2px solid var(--warn); border-radius: 14px; padding: 12px 14px; margin: 6px 0 0; font-weight: 700; font-size: .95rem; }
.alert svg { flex: none; margin-top: 2px; }

/* Option cards (step 4) */
.option-card { border: 2px solid var(--line); border-radius: 20px; padding: 18px 20px; margin-top: 16px; background: var(--cream); }
.option-card:first-of-type { margin-top: 0; }
.opt-title { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; display: block; }
.option-card > .opt-title { margin-bottom: 10px; }
.opt-price { font-family: var(--font-body); font-weight: 800; color: var(--orange); font-size: .95rem; margin-left: 4px; }
.sub { margin-top: 14px; padding-top: 14px; border-top: 2px dotted var(--line); }
.sub .field:first-child { margin-top: 0; }
.stack { display: grid; gap: 8px; }
.row-choice { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 14px; cursor: pointer; background: var(--paper); border: 2px solid transparent; transition: border-color .12s; }
.row-choice:hover { border-color: var(--blue-soft); }
.row-choice:has(input:checked) { border-color: var(--blue); background: #eef2fa; }
.row-choice input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--blue); }
.row-choice b { font-weight: 800; color: var(--blue); white-space: nowrap; }
.row-choice small { display: block; color: var(--ink-soft); font-size: .88rem; }

.switch { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch-ui { width: 54px; height: 30px; border-radius: 999px; background: var(--line); border: 2.5px solid var(--ink); position: relative; flex: none; transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); top: 2px; left: 3px; transition: left .15s; }
.switch input:checked + .switch-ui { background: var(--orange); }
.switch input:checked + .switch-ui::after { left: 26px; }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--blue); outline-offset: 2px; }

.checklist { margin-top: 26px; background: #eef2fa; border-radius: 20px; padding: 18px 20px; display: grid; gap: 12px; }
.checklist .mini-label { margin: 0; }
.check { display: grid; grid-template-columns: 26px 1fr; gap: 10px; cursor: pointer; font-size: .97rem; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--orange); }

.form-error { margin: 18px 0 0; background: #fdeeec; border: 2px solid var(--warn); color: #8b2e20; border-radius: 14px; padding: 12px 16px; font-weight: 700; }
.nav-buttons { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.nav-buttons .btn:only-child, .nav-buttons #prev[hidden] + .btn { margin-left: auto; }
#pay { flex: 1; max-width: 380px; margin-left: auto; }

/* Recap */
.recap { position: sticky; top: 96px; }
.recap-card { background: var(--paper); border: 2.5px solid var(--ink); border-radius: var(--radius); padding: 22px; box-shadow: 6px 6px 0 var(--blue-soft); }
.recap-shoe { width: 70%; margin: -6px auto 4px; }
.recap h2 { font-size: 1.4rem; margin-bottom: 10px; }
.recap dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: .92rem; }
.recap dt { color: var(--ink-soft); font-weight: 700; }
.recap dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.recap dd.empty { color: #b9b3ab; font-weight: 600; }
.recap-lines { list-style: none; padding: 12px 0 0; margin: 12px 0 0; border-top: 2px dotted var(--line); display: grid; gap: 6px; font-size: .92rem; }
.recap-lines li { display: flex; justify-content: space-between; gap: 10px; }
.recap-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: 2.5px solid var(--ink); font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.recap-total strong { font-size: 2rem; color: var(--blue); }
.recap-note { display: flex; gap: 6px; align-items: center; font-size: .8rem; color: var(--ink-soft); margin: 12px 0 0; }
@media (max-width: 960px) { .recap { position: static; } .recap-shoe { width: 45%; } }

.mobile-bar { display: none; }
@media (max-width: 960px) {
  .mobile-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-between; align-items: center;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; font-family: var(--font-display);
  }
  .mobile-bar strong { font-size: 1.3rem; margin-left: 6px; color: var(--peach); }
  .mobile-bar a { color: #fff; font-family: var(--font-body); font-weight: 700; font-size: .9rem; }
}
