/* TiStal · boutique publique. Mobile d'abord (UX-02), léger (UX-03), contrastes AA (RG-56). */
:root {
  --accent: #0B6E5F; --accent-soft: #0B6E5F1F;
  --ink: #10201C; --ink-2: #2E3B37; --muted: #55625E; --line: #E2E6E3; --field: #C9D0CC;
  --ground: #F5F6F3; --surface: #FFFFFF; --ok: #0F7B3F; --ko: #B3261E; --warn-bg: #FCEFD9; --warn: #5A3000;
  --display: 'Bricolage Grotesque', system-ui, sans-serif; --text: Inter, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--text); font-size: 16px; line-height: 1.45; }
a { color: var(--ink); }
img { max-width: 100%; display: block; }
.wrap { max-width: 600px; margin: 0 auto; min-height: 100vh; background: var(--ground); position: relative; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.01em; margin: 0; }
.preview-banner { background: var(--warn-bg); color: var(--warn); padding: 8px 16px; font-size: 14px; text-align: center; font-weight: 600; }

/* En-tête */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--surface); gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.logo { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 15px; flex-shrink: 0; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.brand b { display: block; font-size: 15px; }
.brand small { display: block; font-size: 13px; color: var(--muted); }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; position: relative; text-decoration: none; flex-shrink: 0; }
.icon-btn .count { position: absolute; top: -2px; right: -2px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; border-radius: 9px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }

/* Héros */
.hero { position: relative; min-height: 280px; background: var(--accent-soft); display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 24px 20px; overflow: hidden; }
.hero.has-photo { color: #fff; }
.hero .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0) 70%); }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 34px; line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; }
.hero p { margin: 0; color: var(--ink-2); }
.hero.has-photo p { color: #fff; }
.waves { position: absolute; left: 0; top: 40px; width: 100%; z-index: 0; }

/* Pastilles, cartes produit */
.chips { display: flex; gap: 8px; padding: 16px 16px 4px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: 14px; font-weight: 500; }
.section { padding: 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.section-head h2 { font-size: 22px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.product { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.product:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16,32,28,.08); }
.product.featured { border: 2px solid var(--accent); flex-direction: column; align-items: stretch; }
.product .name { font-weight: 600; font-size: 16px; }
.product.featured .name { font-family: var(--display); font-weight: 700; font-size: 20px; }
.product .price { font-weight: 600; font-size: 18px; white-space: nowrap; }
.product.featured .price { font-family: var(--display); font-weight: 700; font-size: 26px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.tag.soon { color: var(--muted); background: #EEF0EE; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.note.dashed { border-style: dashed; border-color: var(--field); }
.note.accent { background: var(--accent-soft); border: 0; color: var(--ink); }
.flash { margin: 12px 16px 0; padding: 12px 16px; border-radius: 14px; background: var(--warn-bg); color: var(--warn); font-size: 15px; }
.dark-card { margin: 8px 16px 0; padding: 20px; border-radius: 20px; background: var(--ink); color: #fff; display: flex; flex-direction: column; gap: 12px; }
.dark-card p { margin: 0; color: #D5DDD9; font-size: 14px; }
.footer { padding: 28px 16px 120px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--muted); }
.footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--muted); }

/* Boutons */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: 17px; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; width: 100%; }
.btn:focus-visible, .chip:focus-visible, .day:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.btn.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--field); }
.btn.light { background: #fff; color: var(--ink); width: auto; min-height: 44px; font-size: 15px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px dashed #9AA6A1; font-size: 15px; min-height: 52px; border-radius: 20px; }
.btn.big { min-height: 60px; font-size: 18px; font-weight: 700; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.bar { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px 20px; display: flex; flex-direction: column; gap: 10px; z-index: 5; }
.bar .sum { font-size: 14px; color: var(--ink-2); text-align: center; }

/* Écran produit */
.cover { position: relative; height: 260px; background: var(--accent-soft); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .back { position: absolute; top: 14px; left: 16px; }
.step { position: absolute; top: 22px; right: 16px; font-size: 13px; font-weight: 600; background: #fff; padding: 6px 12px; border-radius: 999px; }
.sheet { margin-top: -24px; position: relative; background: var(--ground); border-radius: 24px 24px 0 0; padding: 24px 16px 24px; display: flex; flex-direction: column; gap: 24px; }
.title-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.title-row h1 { font-size: 30px; line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; }
.title-row .price { font-family: var(--display); font-weight: 700; font-size: 30px; white-space: nowrap; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.day { position: relative; }
.day input { position: absolute; opacity: 0; inset: 0; }
.day span { min-height: 72px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.day span small { font-size: 12px; color: var(--muted); }
.day span b { font-size: 20px; font-weight: 600; }
.day input:checked + span { background: var(--accent); border: 2px solid var(--accent); color: #fff; }
.day input:checked + span small { color: #fff; }
.day input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.day input:disabled + span { background: #EEF0EE; border-style: dashed; color: #6B7773; cursor: not-allowed; }
.day input:disabled + span b { text-decoration: line-through; }
.list-card { display: flex; flex-direction: column; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.list-card a { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 16px; text-decoration: none; font-size: 15px; border-bottom: 1px solid var(--line); }
.list-card a:last-child { border-bottom: 0; }
.date-input { min-height: 48px; }

/* Formulaires */
.header-step { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-step .grow { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.progress span { height: 4px; border-radius: 2px; background: var(--line); }
.progress span.on { background: var(--accent); }
.form { padding: 24px 16px 24px; display: flex; flex-direction: column; gap: 28px; }
.fields { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field input { min-height: 52px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--field); background: var(--surface); font-family: inherit; font-size: 16px; color: var(--ink); width: 100%; }
.field input[aria-invalid="true"] { border: 2px solid var(--ko); }
.error { color: var(--ko); font-size: 14px; }
.errors { margin: 16px 16px 0; padding: 12px 16px; border-radius: 14px; background: #FBE4E1; color: #8A1C14; font-size: 15px; }
.holder { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.holder-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: 14px; background: var(--accent-soft); font-size: 15px; font-weight: 500; cursor: pointer; }
.toggle input, .accept input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.accept { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; cursor: pointer; }
.line-card { border-radius: 20px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.line-card .body { display: flex; gap: 14px; padding: 16px; }
.line-card .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); display: grid; place-items: center; flex-shrink: 0; }
.line-card .actions { display: flex; border-top: 1px solid var(--line); }
.line-card .actions > * { flex: 1; min-height: 48px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 500; text-decoration: none; background: transparent; border: 0; font-family: inherit; cursor: pointer; color: var(--ink); }
.line-card .actions > * + * { border-left: 1px solid var(--line); }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; }
.total b { font-family: var(--display); font-size: 28px; }

/* Page de retour */
.done { background: var(--accent); color: #fff; padding: 40px 20px 72px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.done.ko { background: var(--ink); }
.done h1 { font-size: 32px; }
.done .circle { width: 72px; height: 72px; border-radius: 36px; background: #fff; display: grid; place-items: center; }
.pill { font-size: 14px; background: rgba(255,255,255,.16); padding: 6px 12px; border-radius: 999px; }
.after { margin-top: -48px; padding: 0 16px 32px; display: flex; flex-direction: column; gap: 14px; }
.pass-card { background: #fff; border-radius: 24px; border: 1px solid var(--line); padding: 18px; display: flex; gap: 16px; align-items: center; }
.pass-card img { width: 104px; height: 104px; flex-shrink: 0; }
.kicker { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } .product { transition: none; } }

/* Contrôle (lisible en plein soleil, RG-59) */
.control { min-height: 100vh; color: #fff; display: flex; flex-direction: column; padding: 20px; text-align: center; }
.control.valid { background: var(--ok); }
.control.invalid { background: var(--ko); }
.control.unknown { background: var(--ink); }
.control .top { display: flex; justify-content: space-between; font-size: 14px; text-align: left; }
.control main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.control .circle { width: 132px; height: 132px; border-radius: 66px; background: #fff; display: grid; place-items: center; }
.control h1 { font-size: 60px; line-height: 1; letter-spacing: .02em; }
.control .who { font-family: var(--display); font-weight: 700; font-size: 32px; padding: 10px 22px; border-radius: 16px; background: rgba(0,0,0,.18); }
.control .reason { font-size: 26px; font-weight: 700; padding: 10px 20px; border-radius: 16px; background: #fff; color: var(--ko); }
.control .clock { display: flex; justify-content: space-between; padding: 14px 16px; border-radius: 14px; background: #fff; color: var(--ink); font-size: 15px; }
.control .clock b { font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .wrap { box-shadow: 0 0 0 1px var(--line); } }
p.note { display: block; }
