.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- En-tête du salon ---------- */
.shop-head { padding: var(--s6) 0 var(--s5); }
.shop-name { font-size: clamp(2.4rem, 9vw, 4.2rem); text-transform: none; letter-spacing: -0.01em; }
.shop-desc { margin-top: var(--s2); max-width: 60ch; color: var(--ink-2); font-size: var(--step-1); }
.shop-desc:empty { display: none; }
.shop-meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); align-items: baseline; margin-top: var(--s4); color: var(--muted); }
.shop-meta a { font-weight: 600; }
.hours summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.hours table { margin-top: var(--s2); border-collapse: collapse; color: var(--ink-2); }
.hours td { padding: 2px var(--s4) 2px 0; }
.hours tr.today td { color: var(--ink); font-weight: 600; }

/* ---------- Mise en page ---------- */
.booking { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); padding-bottom: var(--s8); align-items: start; }
@media (min-width: 960px) { .booking { grid-template-columns: minmax(0, 1fr) 340px; } }

.step { padding: var(--s5) 0 var(--s6); border-top: 2px solid var(--ink); }
.step h2 { font-size: var(--step-3); display: flex; align-items: center; gap: var(--s3); }
.step .n {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 4px;
  background: var(--ink); color: var(--paper); font-size: var(--step-1);
}
.hint { margin-top: var(--s2); color: var(--muted); max-width: 62ch; }

/* ---------- Services ---------- */
.services { list-style: none; padding: 0; margin: var(--s4) 0 0; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.services li + li { border-top: 1px solid var(--line); }
.svc { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s3) var(--s4); align-items: center; padding: var(--s4); cursor: pointer; border-left: 4px solid transparent; transition: background-color .15s; }
.svc:hover { background: color-mix(in srgb, var(--accent) 5%, white); }
.svc input { position: absolute; opacity: 0; pointer-events: none; }
.svc .box { width: 24px; height: 24px; border: 2px solid var(--line-strong); border-radius: 4px; display: grid; place-items: center; background: white; }
.svc .box::after { content: ''; width: 12px; height: 7px; border-left: 3px solid var(--accent-ink); border-bottom: 3px solid var(--accent-ink); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.svc input:checked ~ .box { background: var(--accent); border-color: var(--accent); }
.svc input:checked ~ .box::after { opacity: 1; }
.svc input:focus-visible ~ .box { outline: 3px solid var(--accent); outline-offset: 2px; }
.svc.on { border-left-color: var(--accent); background: var(--accent-soft); }
.svc-name { font-weight: 600; font-size: var(--step-1); line-height: 1.2; }
.svc-desc { color: var(--muted); font-size: var(--step--1); }
.svc-meta { text-align: right; line-height: 1.15; }
.svc-dur { font-family: var(--f-display); font-weight: 700; font-size: var(--step-1); }
.svc-price { color: var(--ink-2); font-size: var(--step--1); white-space: nowrap; }

/* ---------- Barbiers ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.chip { min-height: 44px; padding: 0 var(--s4); border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 600; cursor: pointer; }
.chip[aria-checked=true] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- Prochain créneau ---------- */
.next { margin-top: var(--s4); }
.next-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: var(--s4) var(--s5); background: var(--surface); border: 1.5px solid var(--line); border-left: 6px solid var(--accent); border-radius: var(--r-md);
}
.next-label { color: var(--muted); font-size: var(--step--1); font-weight: 600; }
.next-when { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.next-time { font-family: var(--f-display); font-weight: 700; font-size: var(--step-5); line-height: 1; }
.next-day { font-size: var(--step-1); font-weight: 500; }
.next-none { padding: var(--s4); background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); }

/* ---------- Jours ---------- */
.days-head { margin-top: var(--s5); }
.days { display: flex; gap: var(--s2); overflow-x: auto; padding: var(--s2) 2px var(--s3); scroll-snap-type: x proximity; scrollbar-width: thin; }
.day {
  flex: 0 0 auto; width: 74px; scroll-snap-align: start; display: grid; justify-items: center; gap: 2px;
  padding: var(--s2) 0 var(--s3); border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer;
}
.day .wd { font-size: var(--step--1); color: var(--muted); }
.day .dn { font-family: var(--f-display); font-weight: 700; font-size: var(--step-3); line-height: 1; }
.day .st { font-size: 0.75rem; color: var(--ink-2); }
.day[aria-selected=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day[aria-selected=true] .wd, .day[aria-selected=true] .st { color: inherit; }
.day:disabled { opacity: .45; cursor: not-allowed; background: transparent; border-style: dashed; }
.day.more { width: 96px; align-content: center; font-weight: 600; color: var(--accent); }

/* ---------- Créneaux ---------- */
.slots { margin-top: var(--s4); display: grid; gap: var(--s4); }
.slot-group h3 { font-family: var(--f-body); font-weight: 600; font-size: var(--step--1); color: var(--muted); margin-bottom: var(--s2); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--s2); }
.slot {
  min-height: 46px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface);
  font-family: var(--f-display); font-weight: 600; font-size: var(--step-1); cursor: pointer;
}
.slot:hover { border-color: var(--accent); }
.slot[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.slots-empty { color: var(--muted); padding: var(--s3) 0; }

.btn-lg { min-height: 54px; font-size: var(--step-1); }

/* ---------- Ticket récapitulatif ---------- */
.ticket { position: sticky; bottom: 0; z-index: 5; }
.ticket-inner { background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--r-md) var(--r-md) 0 0; padding: var(--s3) var(--s4); box-shadow: 0 -6px 20px rgba(21, 32, 31, .08); }
.ticket-title { font-family: var(--f-display); font-weight: 700; font-size: var(--step-2); display: none; }
.ticket-rows { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: var(--s1) var(--s4); margin: var(--s2) 0 0; }
.ticket-rows div { min-width: 0; }
.ticket-rows dt { font-size: 0.75rem; color: var(--muted); }
.ticket-rows dd { margin: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-rows div:nth-child(3) { display: none; }

@media (min-width: 960px) {
  .ticket { top: var(--s5); bottom: auto; }
  .ticket-inner { border-radius: var(--r-md); padding: var(--s5); box-shadow: none; }
  .ticket-title { display: block; }
  .ticket-rows { grid-template-columns: 1fr; gap: var(--s3); margin-top: var(--s4); }
  .ticket-rows div { display: flex; justify-content: space-between; gap: var(--s3); border-bottom: 1px solid var(--line); padding-bottom: var(--s2); }
  .ticket-rows div:nth-child(3) { display: flex; }
  .ticket-rows dt { font-size: var(--step-0); }
  .ticket-rows dd { white-space: normal; text-align: right; }
}

/* Barre "temps de fauteuil" : chaque service est un segment, les dents du peigne marquent les 5 et 15 min. */
.chair { margin-top: var(--s2); }
@media (min-width: 960px) { .chair { margin-top: var(--s4); } }
.chair-bar { display: flex; height: 30px; background: var(--paper); border-radius: 4px; overflow: hidden; }
.chair-seg {
  height: 100%; display: flex; align-items: center; padding: 0 6px; min-width: 0;
  color: var(--accent-ink); font-size: 0.75rem; font-weight: 600; white-space: nowrap; overflow: hidden;
  background: var(--accent); transition: width .25s ease;
}
.chair-seg:nth-child(even) { background: color-mix(in srgb, var(--accent) 72%, var(--ink)); }
.chair-seg + .chair-seg { border-left: 2px solid var(--surface); }
.comb {
  height: 9px; margin-top: 3px;
  background:
    linear-gradient(to right, var(--ink-2) 1.5px, transparent 1.5px) 0 0 / calc(100% / var(--n15, 8)) 9px repeat-x,
    linear-gradient(to right, var(--line-strong) 1px, transparent 1px) 0 0 / calc(100% / var(--n5, 24)) 5px repeat-x;
}

/* ---------- Confirmation ---------- */
.done { padding: var(--s6) 0 var(--s8); max-width: 640px; }
.done h2 { font-size: clamp(2.4rem, 8vw, 3.6rem); }
.done .lead { margin-top: var(--s3); font-size: var(--step-1); color: var(--ink-2); }
.stub { margin-top: var(--s5); background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--r-md); overflow: hidden; }
.stub-top { padding: var(--s5); background: var(--accent); color: var(--accent-ink); }
.stub-time { font-family: var(--f-display); font-weight: 700; font-size: clamp(3rem, 14vw, 4.8rem); line-height: .95; }
.stub-date { font-size: var(--step-1); font-weight: 500; margin-top: var(--s1); }
.stub-body { padding: var(--s4) var(--s5) var(--s5); display: grid; gap: var(--s2); }
.stub-row { display: flex; justify-content: space-between; gap: var(--s4); border-bottom: 1px dashed var(--line-strong); padding-bottom: var(--s2); }
.stub-row:last-child { border-bottom: 0; }
.stub-row span:first-child { color: var(--muted); }
.stub-row span:last-child { font-weight: 600; text-align: right; }
.done-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.done .alert { margin-top: var(--s4); }
.status-cancelled .stub-top { background: var(--pole); }

.foot { padding: var(--s5) 0 var(--s7); border-top: 1px solid var(--line); font-size: var(--step--1); }

/* ---------- Paiement ---------- */
.pay { margin-top: var(--s5); padding: var(--s5); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md); display: grid; gap: var(--s3); }
.pay h3 { font-size: var(--step-2); }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); }
.pay-method { display: flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s3); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; font-weight: 600; }
.pay-method input { width: 18px; height: 18px; accent-color: var(--accent); }
.pay-method:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pay-done { border-color: var(--ok); justify-items: start; }
.pay-done h3 { color: var(--ok); }
.qr { width: 240px; height: 240px; border: 1.5px solid var(--line); border-radius: var(--r-sm); image-rendering: pixelated; }
.code strong { font-family: var(--f-display); font-size: var(--step-3); letter-spacing: 0.12em; }
.poll-note { margin-top: var(--s4); }

/* ---------- Choix de la chaise / de l'employé ---------- */
.staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s2); margin-top: var(--s4); }
.staff-card {
  display: grid; gap: 2px; text-align: left; padding: var(--s3) var(--s4); min-height: 64px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer;
}
.staff-card:hover:not(:disabled) { border-color: var(--accent); }
.staff-name { font-family: var(--f-display); font-weight: 700; font-size: var(--step-2); line-height: 1.05; }
.staff-next { font-size: var(--step--1); color: var(--muted); }
.staff-card[aria-checked=true] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.staff-card[aria-checked=true] .staff-next { color: color-mix(in srgb, var(--paper) 80%, transparent); }
.staff-card:disabled { opacity: .5; cursor: not-allowed; border-style: dashed; }
#done-title:focus { outline: none; }
