/* Styles des pages commande, confirmation, admin et pages légales.
   Les couleurs viennent de style.css (variables --green, --edge, etc.). */

.page { padding-block: 28px 56px; display: grid; gap: 20px; }
.box { background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius); padding: 24px; min-width: 0; }
.box h1 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; margin: 0 0 6px; text-wrap: balance; }
.lead { color: var(--muted); margin: 0 0 8px; }
a { color: var(--green); }
a.cta { display: inline-block; }

/* Étapes */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 700; color: var(--muted); font-size: 0.95rem; }
.steps li { display: flex; align-items: center; gap: 8px; }
.steps span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--edge); font-family: var(--font-num); font-size: 0.8rem; background: var(--surface); }
.steps .done span { background: var(--green-soft); color: var(--green); border-color: var(--green); }
.steps .current { color: var(--ink); }
.steps .current span { background: var(--green); color: var(--on-green); border-color: var(--green); }

/* Formulaire */
.order-grid { display: grid; grid-template-columns: 1fr 330px; gap: 22px; align-items: start; }
@media (max-width: 900px) { .order-grid { grid-template-columns: 1fr; } .recap { order: -1; } }
.form { display: grid; gap: 18px; }
fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 16px 0 0; display: grid; gap: 12px; min-width: 0; }
legend { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; padding: 0 8px 0 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2.cp { grid-template-columns: 140px 1fr; }
@media (max-width: 560px) { .row2, .row2.cp { grid-template-columns: 1fr; } }
.field { display: grid; gap: 5px; min-width: 0; }
.field.narrow { max-width: 320px; }
.field label { font-weight: 700; font-size: 0.93rem; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--edge); border-radius: 10px;
  background: var(--surface); font-size: 1rem;
}
.field input:focus, .field select:focus { border-color: var(--green); outline: 3px solid var(--green-soft); outline-offset: 0; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #c62f45; }
.hint { font-size: 0.83rem; color: var(--muted); }
.err { color: #c62f45; font-size: 0.86rem; font-weight: 700; margin: 0; }
.alert { background: #fdecef; color: #8f1d2e; border: 1.5px solid #f2b8c2; border-radius: 10px; padding: 11px 14px; font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.small { font-size: 0.9rem; color: var(--muted); margin: 0; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .choices { grid-template-columns: 1fr; } }
.choice { position: relative; border: 2px solid var(--edge); border-radius: 12px; padding: 14px 14px 14px 44px; cursor: pointer; display: grid; gap: 4px; background: var(--surface); }
.choice input { position: absolute; left: 14px; top: 16px; width: 18px; height: 18px; accent-color: var(--green); margin: 0; }
.choice:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.choice-t { font-weight: 700; }
.choice-d { font-size: 0.88rem; color: var(--muted); }
.sub { display: grid; gap: 12px; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.sub[hidden] { display: none; }
.check { align-items: flex-start; line-height: 1.45; }
.check input { margin-top: 2px; }

.sig-wrap { display: grid; gap: 6px; }
.sig-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 0.93rem; }
#sigPad { width: 100%; height: 170px; background: #fff; border: 2px dashed var(--edge); border-radius: 12px; touch-action: none; cursor: crosshair; }
.cta.big { padding: 14px 20px; font-size: 1.05rem; border: 0; cursor: pointer; justify-self: start; }
.cta[disabled] { opacity: 0.7; cursor: wait; }

/* Récapitulatif */
.recap { display: grid; gap: 14px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); }
@media (max-width: 900px) { .recap { position: static; } }
.recap-price { display: grid; gap: 6px; justify-items: start; padding-block: 12px; border-block: 1px solid var(--line); }
.recap dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 0.92rem; }
.recap dt { color: var(--muted); }
.recap dd { margin: 0; font-weight: 700; }

/* Confirmation */
.thanks { max-width: none; display: grid; gap: 10px; justify-items: start; }
.thanks p { margin: 0; }
.check-big { width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: var(--on-green); display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; }
.ref strong { font-family: var(--font-num); }

/* Pages de texte (vie privée, mentions légales) */
.prose { max-width: 760px; }
.prose h2 { font-family: var(--font-display); font-size: 1.2rem; margin: 22px 0 6px; }
.prose p, .prose li { max-width: 68ch; }
.todo { background: var(--promo); color: var(--promo-ink); padding: 0 4px; border-radius: 4px; font-weight: 700; }

/* Admin */
.admin-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.table-wrap { overflow-x: auto; border: 2px solid var(--edge); border-radius: var(--radius); background: var(--surface); }
table.list { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 820px; }
.list th, .list td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.list th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--bg); }
.list td.num { font-family: var(--font-num); white-space: nowrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; border: 1px solid var(--edge); background: var(--green-soft); color: var(--green); white-space: nowrap; }
.pill.nouveau { background: var(--promo); color: var(--promo-ink); border-color: transparent; }
.pill.annule { background: var(--bg); color: var(--muted); border-color: var(--line); }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form select { border: 1.5px solid var(--edge); border-radius: 8px; padding: 4px 6px; background: var(--surface); }
.inline-form button, .btn-sec { border: 1.5px solid var(--edge); background: var(--surface); border-radius: 8px; padding: 4px 10px; cursor: pointer; font-weight: 700; color: var(--green); }
.login { max-width: 420px; display: grid; gap: 14px; }
a.need { text-decoration: none; color: var(--ink); }
a.need[aria-pressed="true"] { color: var(--on-green); }

/* Boutons du récapitulatif (page de confirmation) */
.doc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.btn-out { display: inline-block; padding: 13px 18px; border: 2px solid var(--green); color: var(--green); border-radius: 10px; font-weight: 700; text-decoration: none; }
.btn-out:hover { background: var(--green-soft); }
.recap-title { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
