/* ===== Bottom-sheet fiche produit ===== */
.sheet-root { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop {
  position: absolute; inset: 0; background: rgba(17,17,20,.45);
  opacity: 0; transition: opacity var(--t) var(--ease);
}
.sheet-root.show .sheet-backdrop { opacity: 1; }
.sheet {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%) translateY(100%);
  width: min(480px, 100%); max-height: 92dvh; background: var(--bg);
  border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--sh-3);
  display: flex; flex-direction: column; transition: transform var(--t-slow) var(--spring);
  padding-bottom: var(--safe-b);
}
.sheet-root.show .sheet { transform: translateX(-50%) translateY(0); }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: #dcdce1; margin: 10px auto 0; }
.sheet-x {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-soft); color: var(--ink-2); font-size: 14px; z-index: 2;
}
.sheet-scroll { overflow-y: auto; padding: var(--s-4) var(--s-5) var(--s-3); -webkit-overflow-scrolling: touch; }
.sheet-hero {
  position: relative; width: 100%; height: 200px; border-radius: var(--r-lg); overflow: hidden; margin-top: var(--s-2);
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 30% 15%, #fff3e6 0%, #ffe2c4 46%, #ffcf9f 100%);
  box-shadow: inset 0 0 0 1px rgba(255,138,61,.18);
}
.sheet-hero .ph-emoji { font-size: 80px; }
.sheet-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sheet-name { font-family: var(--font-display); font-size: 25px; font-weight: 700; letter-spacing: -.035em; margin: var(--s-4) 0 2px; }
.sheet-price { font-size: 18px; font-weight: 800; color: var(--accent); letter-spacing: -.01em; }
.sheet-desc { color: var(--ink-2); line-height: 1.45; margin: var(--s-3) 0 0; }

.opt-group { margin-top: var(--s-6); }
.opt-head { display: flex; align-items: baseline; gap: var(--s-3); margin-bottom: var(--s-2); }
.opt-title { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.opt-sub { font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em;
  background: var(--bg-soft); padding: 3px 8px; border-radius: var(--r-pill); }
.opt-sub.req { color: var(--warn); background: var(--warn-bg); }
.opt-row {
  display: flex; align-items: center; gap: var(--s-3); padding: 14px 2px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background var(--t-fast);
}
.opt-row:active { background: var(--bg-soft); }
.opt-emoji { font-size: 20px; flex: 0 0 24px; text-align: center; }
.opt-name { flex: 1; font-size: 15px; font-weight: 500; }
.opt-price { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.opt-mark { width: 22px; height: 22px; border: 2px solid #d5d5db; border-radius: 50%; flex: 0 0 22px; position: relative; transition: all var(--t-fast) var(--spring); }
.opt-mark.check { border-radius: 7px; }
.opt-row.on .opt-mark { border-color: var(--ink); background: var(--ink); }
.opt-row.on .opt-mark::after {
  content: ''; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.sheet-qty { display: flex; align-items: center; justify-content: space-between; margin-top: var(--s-6); font-weight: 700; }
.stepper { display: flex; align-items: center; gap: var(--s-4); background: var(--bg-soft); border-radius: var(--r-pill); padding: 6px 10px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); font-size: 20px; font-weight: 600; transition: transform var(--t-fast) var(--spring); }
.stepper button:active { transform: scale(.85); }
.stepper span { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }

.sheet-foot { padding: var(--s-3) var(--s-5) var(--s-4); border-top: 1px solid var(--line); background: var(--bg); }
.btn-add {
  width: 100%; background: var(--ink); color: #fff; border-radius: var(--r-pill);
  padding: 17px 22px; font-size: 16px; font-weight: 700; display: flex; justify-content: space-between;
  align-items: center; transition: transform var(--t-fast) var(--ease), opacity var(--t-fast);
}
.btn-add:active { transform: scale(.985); }
.btn-add:disabled { opacity: .38; }
.btn-add #sheet-total { font-variant-numeric: tabular-nums; }

/* ===== Tunnel commande (checkout) ===== */
.co-root { position: fixed; inset: 0; z-index: 70; }
.co-backdrop { position: absolute; inset: 0; background: rgba(17,17,20,.5); opacity: 0; transition: opacity var(--t) var(--ease); }
.co-root.show .co-backdrop { opacity: 1; }
.co-panel {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%) translateY(100%);
  width: min(480px, 100%); height: 96dvh; background: var(--bg);
  border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--sh-3);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform var(--t-slow) var(--spring);
  padding-bottom: var(--safe-b);
}
.co-root.show .co-panel { transform: translateX(-50%) translateY(0); }

.co-head {
  display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-4) var(--s-3);
  border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.co-back {
  width: 36px; height: 36px; border-radius: 50%; background: var(--bg-soft);
  font-size: 22px; line-height: 1; color: var(--ink); display: grid; place-items: center;
}
.co-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -.03em; }
.co-head-sp { flex: 1; }

.co-scroll { flex: 1; overflow-y: auto; padding: var(--s-4) var(--s-5); -webkit-overflow-scrolling: touch; }

.co-items { display: flex; flex-direction: column; gap: 2px; }
.co-item { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.co-item-main { flex: 1; min-width: 0; }
.co-item-name { font-size: 15px; font-weight: 700; }
.co-item-opts { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.co-item-price { font-size: 14px; font-weight: 700; margin-top: 4px; }
.co-stepper { display: flex; align-items: center; gap: 10px; background: var(--bg-soft); border-radius: var(--r-pill); padding: 5px 8px; }
.co-stepper button { width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); font-size: 18px; font-weight: 600; transition: transform var(--t-fast) var(--spring); }
.co-stepper button:active { transform: scale(.85); }
.co-stepper span { min-width: 18px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }

.co-line { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s-4); font-size: 15px; }
.co-line b { font-weight: 800; font-variant-numeric: tabular-nums; }
.co-note { font-size: 12.5px; color: var(--ink-3); margin-top: var(--s-3); line-height: 1.4; }

.co-field { margin-top: var(--s-4); }
.co-field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.co-field label small { font-weight: 500; color: var(--ink-3); }
.co-field input {
  width: 100%; height: 50px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-size: 16px; background: var(--bg); color: var(--ink); transition: border-color var(--t-fast);
}
.co-field input:focus { outline: none; border-color: var(--ink); }
.co-row { display: flex; gap: var(--s-3); }
.co-row .co-field { flex: 1; min-width: 0; }

.co-paytitle { font-size: 13px; font-weight: 800; color: var(--ink-2); margin: var(--s-6) 0 var(--s-2); text-transform: uppercase; letter-spacing: .04em; }
.co-pay {
  display: flex; align-items: center; gap: var(--s-3); padding: 14px; margin-top: var(--s-2);
  border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast);
}
.co-pay.on { border-color: var(--ink); background: var(--bg-soft); }
.co-pay-main { flex: 1; display: flex; flex-direction: column; }
.co-pay-main b { font-size: 15px; font-weight: 700; }
.co-pay-main small { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.co-radio { width: 22px; height: 22px; border: 2px solid #d5d5db; border-radius: 50%; flex: 0 0 22px; position: relative; transition: all var(--t-fast) var(--spring); }
.co-pay.on .co-radio { border-color: var(--ink); }
.co-pay.on .co-radio::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--ink); }

.co-err { color: var(--warn); font-size: 13.5px; font-weight: 600; margin-top: var(--s-3); min-height: 18px; }

.co-foot { flex: 0 0 auto; padding: var(--s-3) var(--s-5) var(--s-4); border-top: 1px solid var(--line); background: var(--bg); }
.co-cta {
  width: 100%; background: var(--ink); color: #fff; border-radius: var(--r-pill);
  padding: 17px 22px; font-size: 16px; font-weight: 700; display: flex; justify-content: space-between; align-items: center;
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast); min-height: 56px;
}
.co-cta:active { transform: scale(.985); }
.co-cta:disabled { opacity: .6; }
.co-cta.loading { justify-content: center; }
.co-spin { width: 22px; height: 22px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: co-spin .7s linear infinite; }
@keyframes co-spin { to { transform: rotate(360deg); } }

/* Confirmation */
.co-done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--s-6); gap: var(--s-3); }
.co-check { width: 76px; height: 76px; border-radius: 50%; background: var(--good); color: #fff; font-size: 40px; display: grid; place-items: center; animation: co-pop .45s var(--spring); }
@keyframes co-pop { from { transform: scale(0); } to { transform: scale(1); } }
.co-done h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.035em; }
.co-done-sub { color: var(--ink-2); line-height: 1.45; }
.co-recap { width: 100%; max-width: 320px; background: var(--bg-soft); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); margin: var(--s-3) 0; }
.co-recap .co-line { margin-top: 0; padding: 6px 0; }
.co-done .co-cta { max-width: 320px; margin-top: var(--s-3); justify-content: center; }
.co-cta.soft { max-width: 320px; background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line, rgba(0,0,0,.08)); font-size: 15px; min-height: 50px; }
.co-push { max-width: 320px; width: 100%; display: flex; gap: 8px; align-items: center; justify-content: center; text-align: center; font-size: 13px; line-height: 1.4; padding: 12px 16px; border-radius: var(--r-md); margin-top: var(--s-3); }
.co-push.on { background: rgba(34,197,94,.1); color: #15803d; }
.co-push.off { background: var(--bg-soft); color: var(--ink-2); }
.co-pay-wrap { flex: 1; display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5) var(--s-5) var(--s-6); }
.co-pay-sub { font-size: 13px; color: var(--ink-2); text-align: center; }
#stripe-element { margin: var(--s-2) 0; min-height: 40px; }
.co-pay-wrap .co-cta { margin-top: auto; justify-content: center; }
.co-feebox { margin-top: var(--s-4); padding: var(--s-3) var(--s-4); background: var(--bg-soft); border-radius: var(--r-md); }
.co-feebox .co-line { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; color: var(--ink-2); }
.co-feebox .co-line b { color: var(--ink); }
.co-feebox .co-total-line { border-top: 1px solid var(--line, rgba(0,0,0,.08)); margin-top: 4px; padding-top: 9px; font-size: 16px; color: var(--ink); font-weight: 800; }

/* ===== Sélecteur de créneau (planifier) ===== */
.co-slotwrap { max-height: 0; overflow: hidden; opacity: 0; transition: max-height var(--t) var(--ease), opacity var(--t) var(--ease), margin var(--t) var(--ease); }
.co-slotwrap.show { max-height: 80px; opacity: 1; margin-top: var(--s-2); }
.co-select {
  width: 100%; height: 50px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: var(--r-md);
  font-size: 16px; font-weight: 600; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--ink); -webkit-appearance: none; appearance: none;
}
.co-select:focus { outline: none; }

/* ===== Écran de suivi live (post-commande) ===== */
.co-live { flex: 1; display: flex; flex-direction: column; }
.co-live-ico { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 38px; margin: 8px auto 4px; }
.co-live-ico.ok { background: var(--good); color: #fff; animation: co-pop .45s var(--spring); }
.co-live-ico.bad { background: #e5484d; color: #fff; font-size: 34px; }
/* Loader d'attente (3 points qui pulsent) */
.co-loader { display: flex; gap: 9px; justify-content: center; margin: 22px auto 14px; }
.co-loader span { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); animation: co-bounce 1.1s infinite ease-in-out both; }
.co-loader span:nth-child(1) { animation-delay: -.24s; }
.co-loader span:nth-child(2) { animation-delay: -.12s; }
@keyframes co-bounce { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.co-cta.ghost { background: var(--bg-soft); color: var(--ink); }
