/*
 * Aperçus de l'app (générés par mockups.js). Tailles et couleurs reprises des
 * composants natifs : OrderCard, SearchHeader, SegmentedControl, barre
 * d'onglets flottante, WebSidebar. Construits à taille réelle puis réduits.
 */
[data-mock] { position: relative; width: 100%; overflow: hidden; }
/* Le téléphone déborde : sa tranche et son ombre ne doivent pas être coupées. */
[data-mock="phone"] { overflow: visible; }
.mock-inner { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.mock-phone { width: 414px; height: 868px; }
.mock-web { width: 1280px; height: 800px; }
.mock-inner .ic { display: block; flex-shrink: 0; }
.mock-inner em { font-style: normal; }

/* Cadres d'appareil */
/* Le cadre fait partie de la maquette : il se réduit avec elle. */
.device-phone { filter: drop-shadow(0 28px 36px rgba(92, 52, 20, 0.35)); }
.ph-device { width: 414px; height: 868px; padding: 12px; border-radius: 64px; background: #1c1714; box-shadow: inset 0 0 0 2px #3a322d; }
.ph-device .ph-screen { border-radius: 52px; }
.device-web {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(92, 52, 20, 0.45), 0 0 0 1px rgba(28, 23, 20, 0.08);
}

/* ─── Carte de commande (OrderCard) ─── */
.oc {
  position: relative; overflow: hidden;
  background: #fff; border-radius: 24px; padding: 16px;
  border: 0.5px solid #f2ece6;
  box-shadow: 0 6px 14px rgba(92, 52, 20, 0.07);
  color: #1c1714;
}
.oc-head { display: flex; gap: 12px; align-items: flex-start; padding-right: 64px; }
.oc-thumb { width: 48px; height: 48px; border-radius: 12px; background: #ffede0; overflow: hidden; flex-shrink: 0; }
.oc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.oc-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.oc-title b { font-weight: 800; font-size: 17px; line-height: 20px; letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-title span { font-weight: 600; font-size: 14px; line-height: 16px; color: #5f5952; }

.oc-track { display: flex; align-items: center; height: 44px; margin-top: 12px; }
.oc-step { display: flex; align-items: center; }
.oc-step.grow { flex: 1; }
.oc-line { flex: 1; height: 3px; display: flex; justify-content: space-evenly; overflow: hidden; }
.oc-line i { width: 3px; height: 3px; border-radius: 50%; background: #dad2ca; }
.oc-line.on i { background: #f26a1b; }
.oc-node { position: relative; display: flex; align-items: center; justify-content: center; }
.oc-dot { display: flex; align-items: center; justify-content: center; border-radius: 50%; box-sizing: border-box; }
.oc-dot.done { width: 18px; height: 18px; background: #f26a1b; color: #fff; }
.oc-dot.done .ic { stroke-width: 3.5; }
.oc-dot.todo { width: 18px; height: 18px; border: 2px solid #dad2ca; background: #fff; }
.oc-dot.current { width: 28px; height: 28px; border: 2.5px solid #f26a1b; background: #fff; }
.oc-dot.current i { width: 11.8px; height: 11.8px; border-radius: 50%; background: #f26a1b; }
.oc-dot.late { width: 28px; height: 28px; border: 2.5px solid #c62828; background: #fff; }
.oc-dot.late i { width: 12px; height: 12px; border-radius: 50%; background: #c62828; }
.oc-deadline {
  position: absolute; bottom: 29px; width: 120px; left: 50%; margin-left: -60px; text-align: center;
  font-weight: 700; font-size: 11px; line-height: 14px; white-space: nowrap;
}
.oc-deadline.start { left: 0; margin-left: 0; text-align: left; }
.oc-deadline.end { left: auto; right: 0; margin-left: 0; text-align: right; }
.oc-deadline.late { color: #c62828; }
.oc-labels { display: flex; justify-content: space-between; margin-top: 2px; }
.oc-labels span { font-weight: 600; font-size: 11px; line-height: 14px; color: #6b6560; }
.oc-labels .current { font-weight: 800; color: #b8430a; }
.oc-labels .late { font-weight: 800; color: #c62828; }
.oc-dash { margin-top: 12px; border-top: 1px dashed #dad2ca; }
.oc-foot { display: flex; gap: 20px; margin-top: 12px; }
.oc-foot > span { display: flex; flex-direction: column; min-width: 0; }
.oc-foot small { font-weight: 600; font-size: 12px; line-height: 16px; color: #6b6560; }
.oc-foot b { font-weight: 700; font-size: 15px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-foot .pay { margin-left: auto; text-align: right; flex-shrink: 0; }
.oc-foot .late { color: #c62828; }
.oc-foot .paid { color: #0a7d57; }
.oc-foot .collect { color: #b8430a; }
.oc-ribbon {
  position: absolute; top: 15px; right: -34px; width: 128px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(45deg);
  font-weight: 800; font-size: 9px; letter-spacing: 0.5px; text-transform: uppercase; color: #fff;
}
.oc-ribbon.pending { background: #6b6560; }
.oc-ribbon.in_progress { background: #cf4a08; }
.oc-ribbon.done { background: #0a7d57; }
.oc-ribbon.late { background: #c62828; }

/* ─── Écran iPhone ─── */
.ph-screen {
  position: relative; width: 390px; height: 844px; overflow: hidden;
  background: linear-gradient(180deg, #ff9a55 0, #ffc79c 95px, #fffaf6 185px, #fffaf6 100%);
  color: #1c1714; font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.ph-status {
  height: 54px; display: flex; align-items: center; justify-content: space-between;
  padding: 4px 34px 0 50px; font-weight: 700; font-size: 17px;
}
.ph-island { position: absolute; top: 11px; left: 50%; width: 125px; height: 37px; margin-left: -62.5px; border-radius: 20px; background: #000; }
.ph-sys { display: flex; align-items: flex-end; gap: 2px; }
.ph-sys i { width: 3.5px; background: #1c1714; border-radius: 1px; }
.ph-sys i:nth-child(1) { height: 6px; } .ph-sys i:nth-child(2) { height: 8.5px; } .ph-sys i:nth-child(3) { height: 11px; }
.ph-sys b { width: 25px; height: 12px; margin-left: 6px; border-radius: 4px; border: 1.5px solid rgba(28,23,20,.45); box-shadow: inset 0 0 0 1.5px #ffc79c, inset 0 0 0 20px #1c1714; }
.ph-header { padding: 15px 20px 12px; display: flex; flex-direction: column; gap: 10px; }
.ph-row { display: flex; align-items: center; gap: 8px; }
.ph-search {
  flex: 1; height: 44px; border-radius: 28px; padding: 0 14px; gap: 8px;
  display: flex; align-items: center;
  background: rgba(255, 255, 255, 0.32);
  font-weight: 500; font-size: 16px; color: #5f5952;
}
.ph-search .ic { color: #5f5952; }
.ph-add { width: 44px; height: 44px; border-radius: 50%; background: #1c1714; color: #fff; display: flex; align-items: center; justify-content: center; }
.ph-glass { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.32); display: flex; align-items: center; justify-content: center; }
.ph-seg {
  flex: 1; display: flex; gap: 2px; padding: 2px;
  border-radius: 28px; background: rgba(255, 255, 255, 0.7);
}
.ph-seg span {
  flex: 1; min-height: 42px; border-radius: 28px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 700; font-size: 14px; color: #5f5952;
}
.ph-seg em { font-weight: 500; font-size: 12px; }
.ph-seg .on { background: #1c1714; color: #fff; }
.ph-chips { display: flex; gap: 8px; margin: 4px -20px 4px; padding: 0 20px; overflow: hidden; }
.ph-chips .chip {
  flex-shrink: 0; min-height: 40px; padding: 0 14px; display: flex; align-items: center; gap: 7px;
  border-radius: 999px; border: 1px solid #dad2ca; background: #fff;
  font-weight: 700; font-size: 14px;
}
.ph-chips .chip.on { border: 2px solid #1c1714; padding: 0 13px; }
.ph-chips em {
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #f6f2ee;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; color: #5f5952;
}
.ph-list { padding: 4px 20px; display: flex; flex-direction: column; gap: 12px; }
.ph-tabbar {
  position: absolute; left: 16px; right: 16px; bottom: 30px; height: 68px;
  display: flex; align-items: center; padding: 0 6px;
  border-radius: 34px; border: 1px solid #fff;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 20px rgba(92, 52, 20, 0.16);
}
.tb-drop { position: absolute; left: 6px; top: 6px; bottom: 6px; width: calc((100% - 12px) / 5); border-radius: 28px; background: #ffede0; }
.tb-tab { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #5f5952; }
.tb-tab.active { color: #b8430a; }
.tb-tab.active .ic { fill: currentColor; fill-opacity: .18; }
.tb-icon { position: relative; width: 44px; height: 26px; display: flex; align-items: center; justify-content: center; }
.tb-label { font-weight: 600; font-size: 11px; line-height: 14px; }
.tb-tab.active .tb-label { font-weight: 700; }
.tb-badge {
  position: absolute; top: -4px; right: 2px; min-width: 20px; height: 20px; padding: 0 4px;
  border-radius: 10px; border: 2px solid #fff; background: #c62828; color: #fff;
  font-weight: 700; font-size: 11px; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
}
.tb-scan { width: 52px; height: 52px; border-radius: 26px; background: #1c1714; color: #fff; display: flex; align-items: center; justify-content: center; }
.ph-home { position: absolute; bottom: 8px; left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: #1c1714; }

/* ─── Écran web ─── */
.wb-screen { width: 1280px; height: 800px; background: #f1ece6; color: #1c1714; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; display: flex; flex-direction: column; }
.wb-bar { height: 40px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: #e6dfd7; }
.wb-bar i { width: 12px; height: 12px; border-radius: 50%; background: #d3c9bf; }
.wb-bar span { margin-left: 120px; width: 420px; height: 26px; border-radius: 8px; background: #f6f2ee; display: flex; align-items: center; padding: 0 12px; font-size: 13px; color: #6b6560; }
.wb-body { flex: 1; display: flex; min-height: 0; }
.wb-side { width: 240px; flex-shrink: 0; padding: 28px 16px 20px; display: flex; flex-direction: column; gap: 22px; }
.wb-logo { width: 132px; margin-left: 12px; }
.wb-navs { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.wb-nav { height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border-radius: 23px; font-weight: 600; font-size: 15px; color: #5f5952; }
.wb-nav.on { background: #fff; color: #b8430a; font-weight: 700; }
.wb-sub { height: 36px; margin-left: 46px; padding: 0 12px; border-radius: 18px; display: flex; align-items: center; justify-content: space-between; font-weight: 500; font-size: 14px; color: #5f5952; }
.wb-sub em { font-weight: 600; font-size: 12px; color: #6b6560; }
.wb-sub.on, .wb-sub.on em { color: #b8430a; font-weight: 700; }
.wb-foot { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; border-top: 1px solid #e2dad2; }
.wb-frame {
  flex: 1; min-width: 0; margin: 16px 16px 16px 0; padding: 28px 32px; border-radius: 28px; overflow: hidden;
  background: #fff; box-shadow: 0 1px 3px rgba(92, 52, 20, 0.06);
  display: flex; flex-direction: column; gap: 16px;
}
.wb-cta { height: 44px; border-radius: 22px; background: #cf4a08; color: #fff; display: flex; align-items: center; gap: 8px; padding: 0 20px; font-weight: 700; font-size: 15px; }
/* Tableau des commandes (orders.web.tsx) */
.wt-head { display: flex; align-items: center; gap: 10px; }
.wt-title { flex: 1; display: flex; align-items: baseline; gap: 12px; }
.wt-title h3 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.4px; }
.wt-title span { font-weight: 600; font-size: 14px; color: #6b6560; }
.wt-title em { font-style: normal; color: #c62828; }
.wt-search { width: 320px; height: 44px; border-radius: 22px; background: #f6f2ee; display: flex; align-items: center; gap: 10px; padding: 0 16px; box-sizing: border-box; font-size: 14px; color: #6b6560; }
.wt-tabs { display: flex; gap: 24px; border-bottom: 1px solid #f2ece6; }
.wt-tab { height: 42px; display: flex; align-items: center; gap: 6px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-weight: 600; font-size: 14px; color: #6b6560; }
.wt-tab em { font-style: normal; font-weight: 700; font-size: 12px; }
.wt-tab.on { border-color: #cf4a08; color: #1c1714; font-weight: 800; }
.wt-tab.late { color: #c62828; }
.wt-table { border: 1px solid #f2ece6; border-radius: 18px; overflow: hidden; flex-shrink: 0; }
.wt-tr { display: flex; align-items: center; min-height: 60px; border-top: 1px solid #f2ece6; }
.wt-thead { min-height: 42px; border-top: 0; background: #fbf8f5; }
.wt-thead .wt-c { font-weight: 800; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: #6b6560; }
.wt-c { padding: 0 12px; box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wt-c b { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-c small { font-weight: 500; font-size: 12px; color: #6b6560; }
.wt-check { width: 48px; flex-shrink: 0; align-items: center; padding: 0; }
.wt-order { flex: 2.2; }
.wt-client { flex: 1.6; font-weight: 600; font-size: 14px; }
.wt-status { width: 150px; flex-shrink: 0; }
.wt-date { width: 170px; flex-shrink: 0; }
.wt-date.late b, .wt-date.late small { color: #c62828; }
.wt-pay { width: 120px; flex-shrink: 0; font-weight: 700; font-size: 13px; }
.wt-pay.paid { color: #0a7d57; }
.wt-pay.due { color: #b8430a; }
.wt-box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid #dad2ca; box-sizing: border-box; }
.wt-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-style: normal; font-weight: 800; font-size: 12px; color: #fff; }
.wt-pill.s-PENDING { background: #6b6560; }
.wt-pill.s-IN_PROGRESS { background: #cf4a08; }
.wt-pill.s-DONE { background: #0a7d57; }

/* ─── Sections et lignes de commande (OrderRow) ─── */
.ph-list { gap: 14px; }
.os-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 8px; }
.os-head b { font-weight: 800; font-size: 15px; }
.os-head b.late { color: #c62828; }
.os-head em { font-weight: 700; font-size: 13px; color: #5f5952; }
.os-card { background: #fff; border-radius: 30px; border: 0.5px solid #f2ece6; overflow: hidden; }
.os-card > * + * { border-top: 0.5px solid #dad2ca; }
.or { min-height: 62px; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #fff; box-sizing: border-box; }
.or-thumb { width: 40px; height: 40px; border-radius: 10px; background: #ffede0; overflow: hidden; flex-shrink: 0; }
.or-thumb img { width: 100%; height: 100%; object-fit: cover; }
.or-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.or-body b { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.or-body span { font-weight: 500; font-size: 13px; color: #5f5952; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.or-body span.late { color: #c62828; }
.or-badge { flex-shrink: 0; min-height: 28px; padding: 0 10px; box-sizing: border-box; display: flex; align-items: center; border-radius: 999px; border: 1px solid; font-weight: 600; font-size: 13px; }
.or-badge.s-PENDING { color: #5f5952; background: #fff; border-color: #dad2ca; }
.or-badge.s-IN_PROGRESS { color: #fff; background: #cf4a08; border-color: #cf4a08; }
.or-badge.s-DONE { color: #fff; background: #1c1714; border-color: #1c1714; }
.or-pay { flex-shrink: 0; font-weight: 600; font-size: 13px; color: #5f5952; }
.or-pay.due { font-weight: 700; color: #1c1714; }
.or-price { flex-shrink: 0; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }

/* ─── Démo animée (hero) ─── */
/* Déplacement de la commande terminée vers « Prêtes à récupérer ». */
.mv-from, .mv-to { overflow: hidden; transition: height .55s cubic-bezier(.4, 0, .2, 1), opacity .3s ease; }
.mv-from { height: 62px; }
.mv-to { height: 0; opacity: 0; }
.moving .mv-from { opacity: 0; }
.moved .mv-from { height: 0; }
.moved .mv-from + * { border-top-color: transparent; }
.moved .mv-to { height: 62px; }
.landed .mv-to { opacity: 1; }
.mv-count { position: relative; }
.mv-count .after { display: none; }
.moved .mv-count .before { display: none; }
.moved .mv-count .after { display: inline; }
.mv-ghost {
  position: absolute; z-index: 5; border-radius: 18px; overflow: hidden;
  transition: top .7s cubic-bezier(.4, 0, .2, 1), transform .3s ease, box-shadow .3s ease, opacity .35s ease;
}
.mv-ghost.lift { transform: scale(1.03); box-shadow: 0 14px 30px -10px rgba(92, 52, 20, .45); }
.mv-ghost.gone { transform: scale(1); box-shadow: none; opacity: 0; }
.no-anim *, .no-anim *::before, .no-anim *::after { transition: none !important; animation: none !important; }

.oc-swap { position: relative; }
.oc-b { position: absolute; inset: 0; opacity: 0; }
.oc-a, .oc-b { transition: opacity .45s ease; }
.is-done .oc-a { opacity: 0; }
.is-done .oc-b { opacity: 1; }
/* La carte « respire » au moment où elle passe à Terminé. */
.is-done .oc-swap { animation: oc-pop .6s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes oc-pop { 0% { transform: scale(1); } 40% { transform: scale(1.025); } 100% { transform: scale(1); } }
.is-done .oc-b .or-badge { animation: dot-ring 1.4s ease-out .2s 2; }
@keyframes dot-ring {
  0% { box-shadow: 0 0 0 0 rgba(242, 106, 27, .45); }
  100% { box-shadow: 0 0 0 14px rgba(242, 106, 27, 0); }
}

.ph-dim {
  position: absolute; inset: 0; background: rgba(28, 23, 20, 0.48);
  opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.sheet-open .ph-dim { opacity: 1; }
.ph-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 20px 34px; display: flex; flex-direction: column; gap: 12px;
  background: #fff; border-radius: 30px 30px 0 0;
  transform: translateY(105%); transition: transform .5s cubic-bezier(.2, .9, .25, 1);
}
.sheet-open .ph-sheet { transform: translateY(0); }
.sc-grab { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: #dad2ca; margin-bottom: 4px; }
.sc-title { font-weight: 800; font-size: 20px; line-height: 24px; text-align: center; }
.sc-sub { font-weight: 600; font-size: 14px; color: #5f5952; text-align: center; margin-top: -10px; }
.sc-heading { font-weight: 800; font-size: 20px; line-height: 24px; margin-top: 4px; }
.sc-change { display: flex; align-items: center; gap: 10px; color: #6b6560; }
.sc-badge { padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; color: #fff; }
.sc-badge.in_progress { background: #cf4a08; }
.sc-badge.done { background: #1c1714; }
.sc-question { font-weight: 700; font-size: 14px; color: #5f5952; margin-top: 6px; }
.sc-option {
  min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 6px 12px;
  border-radius: 16px; background: #f6f2ee; color: #5f5952;
}
.sc-option b { flex: 1; font-weight: 700; font-size: 14px; color: #1c1714; }
.sc-check {
  width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid #dad2ca; background: #fff;
  display: grid; place-items: center; color: transparent;
  transition: background-color .2s, border-color .2s, color .2s, transform .25s cubic-bezier(.2, 1.6, .4, 1);
}
.sc-check .ic { stroke-width: 3; }
.sms-on .sc-sms .sc-check { background: #cf4a08; border-color: #cf4a08; color: #fff; transform: scale(1.12); }
.sc-confirm {
  position: relative; height: 54px; margin-top: 8px; border-radius: 28px; background: #cf4a08; color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 16px; overflow: hidden;
  transition: background-color .3s;
}
.sc-label { display: flex; align-items: center; gap: 8px; transition: opacity .2s, transform .2s; }
.sc-done { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: scale(.6); transition: opacity .25s, transform .35s cubic-bezier(.2, 1.6, .4, 1); }
.sc-done .ic { stroke-width: 3; }
.confirmed .sc-confirm { background: #0a7d57; }
.confirmed .sc-label { opacity: 0; transform: scale(.8); }
.confirmed .sc-done { opacity: 1; transform: scale(1); }
.sc-cancel { text-align: center; font-weight: 700; font-size: 15px; color: #5f5952; padding: 8px 0 0; }

/* Le doigt : un rond qui se pose, puis une onde. */
.ph-tap {
  position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: rgba(28, 23, 20, 0.22); border: 2px solid rgba(255, 255, 255, 0.85);
  opacity: 0; pointer-events: none; z-index: 5;
}
.ph-tap.go { animation: tap 0.75s ease-out; }
@keyframes tap {
  0% { opacity: 0; transform: scale(1.5); }
  25% { opacity: 1; transform: scale(0.85); }
  55% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); }
  100% { opacity: 0; transform: scale(1); box-shadow: 0 0 0 22px rgba(255, 255, 255, 0); }
}
