/* Page publique de commande — même esprit visuel que la page de réservation RDV */
:root {
    --po-primary: #156db9;
    --po-title-color: #fff;
    --po-bg: #f0f5fa;
    --po-card: #fff;
    --po-text: #2d2d2d;
    --po-muted: #6b7280;
    --po-border: #d0e3f7;
    --po-success: #10b981;
}
body { background: var(--po-bg); color: var(--po-text); font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; padding-bottom: 90px; }
@media (min-width: 992px) { body { padding-bottom: 0; } }
html { scroll-behavior: smooth; }

/* ── En-tête ── */
.po-hero { background: var(--po-primary); background-size: cover; background-position: center; padding: 5rem 1rem 4rem; text-align: center; position: relative; overflow: hidden; }
.po-hero.has-image::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.po-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 48px; background: var(--po-bg); clip-path: ellipse(55% 100% at 50% 100%); }
.po-hero h1 { position: relative; z-index: 2; color: var(--po-title-color); font-size: 1.6rem; font-weight: 700; margin: 0; }
.po-hero-cta { text-align: center; margin-top: -1.4rem; position: relative; z-index: 3; }
.po-client-link { display: inline-block; margin-top: .7rem; font-weight: 600; color: var(--po-primary); text-decoration: none; }
.po-container { max-width: 1140px; margin: 0 auto; padding: 1rem; }
.po-card { background: var(--po-card); border: 1.5px solid var(--po-border); border-radius: 14px; padding: 1.2rem; margin-bottom: 1rem; }
.po-intro { border-left: 4px solid var(--po-primary); line-height: 1.6; }
.po-intro-image { max-width: 100%; max-height: 380px; border-radius: 8px; object-fit: cover; }
.po-section-title { font-size: 1.1rem; font-weight: 700; color: var(--po-primary); margin-bottom: 1rem; display: flex; gap: .5rem; align-items: center; }
.po-subtitle { font-size: .95rem; font-weight: 700; margin-bottom: .6rem; }
.po-footer { text-align: center; color: var(--po-muted); font-size: .85rem; padding: 2rem 1rem; }

/* ── Boutons ── */
.po-btn { display: inline-flex; align-items: center; gap: .4rem; justify-content: center; border: none; border-radius: 10px; padding: .75rem 1.4rem; font-weight: 700; cursor: pointer; text-decoration: none; transition: filter .15s; }
.po-btn:disabled { opacity: .45; cursor: not-allowed; }
.po-btn-primary { background: var(--po-primary); color: #fff; }
.po-btn-primary:hover:not(:disabled) { filter: brightness(1.08); color: #fff; }
.po-btn-secondary { background: #fff; color: var(--po-primary); border: 2px solid var(--po-border); }
.po-btn-sm { padding: .45rem .9rem; font-size: .9rem; }
.po-actions { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1.4rem; flex-wrap: wrap; }

/* ── Étapes ── */
.po-stepper { display: flex; justify-content: center; align-items: center; padding: .8rem 0 1.4rem; }
.po-step { display: flex; align-items: center; gap: .45rem; color: var(--po-muted); font-weight: 600; font-size: .9rem; cursor: default; }
.po-step-circle { width: 32px; height: 32px; border-radius: 50%; background: #e5e7eb; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.po-step.active { color: var(--po-primary); }
.po-step.active .po-step-circle { background: var(--po-primary); color: #fff; }
.po-step.done { color: var(--po-success); cursor: pointer; }
.po-step.done .po-step-circle { background: var(--po-success); color: #fff; }
.po-step-sep { width: 40px; height: 2px; background: #d1d5db; margin: 0 .6rem; }
@media (max-width: 575px) { .po-step-label { display: none; } .po-step-sep { width: 24px; } }

/* ── Filtres ── */
.po-filters { display: flex; flex-direction: column; gap: .6rem; }
.po-chip-row { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: thin; }
.po-chip { flex: 0 0 auto; border: 1.5px solid var(--po-border); background: #fff; border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; font-weight: 600; color: var(--po-text); white-space: nowrap; cursor: pointer; }
.po-chip.active { background: var(--po-primary); border-color: var(--po-primary); color: #fff; }

/* ── Catalogue ── */
.po-category { margin-bottom: 1.4rem; }
.po-category-head { display: flex; align-items: baseline; gap: .6rem; border-bottom: 3px solid; padding-bottom: .3rem; margin-bottom: .8rem; }
.po-category-head h2 { font-size: 1.15rem; font-weight: 800; text-transform: uppercase; margin: 0; letter-spacing: .02em; }
.po-category-desc { color: var(--po-muted); font-size: .9rem; margin: -.3rem 0 .8rem; }
.po-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.po-product { background: #fff; border: 1.5px solid var(--po-border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, opacity .15s; }
.po-product.in-cart { border-color: var(--po-primary); box-shadow: 0 0 0 2px var(--po-primary) inset; }
.po-product.incompatible { opacity: .55; }
.po-product-img { position: relative; aspect-ratio: 4 / 3; background: #eef2f7 center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: #b6c2d1; font-size: 2rem; }
.po-qty-badge { position: absolute; top: .5rem; right: .5rem; background: var(--po-primary); color: #fff; min-width: 30px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-weight: 800; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.po-product-body { padding: .8rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.po-product-name { font-weight: 700; margin: 0; }
.po-product-desc { font-size: .85rem; color: var(--po-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.po-product-price { font-weight: 800; color: var(--po-primary); }
.po-product-dates { font-size: .78rem; color: #374151; }
.po-product-stock { font-size: .78rem; color: #b45309; font-weight: 600; }
.po-product-foot { margin-top: auto; padding-top: .3rem; }
.po-add { width: 100%; }
.po-qty { display: flex; align-items: center; justify-content: space-between; border: 2px solid var(--po-primary); border-radius: 10px; overflow: hidden; }
.po-qty button { background: var(--po-primary); color: #fff; border: none; width: 42px; height: 38px; font-size: 1.2rem; font-weight: 700; }
.po-qty button:disabled { opacity: .4; }
.po-qty span { font-weight: 800; }
.po-unavailable { text-align: center; font-weight: 700; color: var(--po-muted); background: #f3f4f6; border-radius: 10px; padding: .5rem; font-size: .9rem; }

/* ── Panier ── */
.po-cart { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; }
.po-cart-title { font-weight: 800; font-size: 1.05rem; margin-bottom: .6rem; }
.po-cart-lines { overflow-y: auto; flex: 1; }
.po-cart-cat { font-size: .75rem; font-weight: 800; text-transform: uppercase; color: var(--po-primary); margin: .6rem 0 .2rem; letter-spacing: .03em; }
.po-cart-line { display: grid; grid-template-columns: 1fr auto; gap: .2rem .5rem; padding: .35rem 0; border-bottom: 1px dashed #e5e7eb; font-size: .9rem; }
.po-cart-line .name { font-weight: 600; }
.po-cart-line .unit { color: var(--po-muted); font-size: .82rem; display: flex; align-items: center; gap: .35rem; }
.po-cart-line .total { font-weight: 700; text-align: right; align-self: end; }
.po-mini-qty button { border: 1px solid var(--po-border); background: #fff; border-radius: 6px; width: 24px; height: 24px; line-height: 1; padding: 0; font-weight: 700; color: var(--po-primary); }
.po-cart-remove { border: none; background: none; color: #dc2626; padding: 0 .2rem; }
.po-cart-empty { color: var(--po-muted); text-align: center; padding: 1rem 0; font-size: .9rem; }
.po-cart-when { background: #f0f7ff; border-radius: 8px; padding: .5rem .6rem; font-size: .85rem; margin-top: .6rem; }
.po-cart-totals { border-top: 2px solid #e5e7eb; margin-top: .6rem; padding-top: .5rem; font-size: .92rem; }
.po-cart-totals .row-line { display: flex; justify-content: space-between; }
.po-cart-totals .grand { font-weight: 800; font-size: 1.05rem; }
.po-cart .po-btn { margin-top: .8rem; width: 100%; }

/* Barre mobile dépliable */
.po-cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: #fff; box-shadow: 0 -4px 16px rgba(0,0,0,.12); border-radius: 14px 14px 0 0; }
.po-cart-bar-panel { max-height: 0; overflow-y: auto; transition: max-height .25s ease; padding: 0 1rem; }
.po-cart-bar.open .po-cart-bar-panel { max-height: 60vh; padding: .8rem 1rem 0; }
.po-cart-bar-summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem 1rem; }
.po-cart-bar-toggle { border: none; background: none; font-weight: 700; color: var(--po-text); padding: 0; }
.po-cart-bar.open .po-cart-bar-toggle .bi { transform: rotate(180deg); }

/* ── Étape 2 ── */
.po-fulfillment { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.po-fulfillment label { border: 2px solid var(--po-border); border-radius: 10px; padding: .7rem; cursor: pointer; font-weight: 600; }
.po-fulfillment input { margin-right: .4rem; }
.po-fulfillment input:checked + span { color: var(--po-primary); }
.po-pickup { background: #f0f7ff; border-radius: 8px; padding: .6rem .8rem; }
.po-rule { background: #fff8e1; border-radius: 8px; padding: .5rem .8rem; font-size: .9rem; }
.po-cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.po-cal-head button { border: none; background: #eef4fb; color: var(--po-primary); border-radius: 8px; width: 36px; height: 36px; }
.po-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; text-align: center; }
.po-cal-dow { font-size: .75rem; font-weight: 700; color: var(--po-muted); }
.po-cal-day { border: 1.5px solid transparent; border-radius: 8px; padding: .45rem 0; font-weight: 600; background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }
.po-cal-day.available { background: #fff; border-color: var(--po-border); color: var(--po-text); cursor: pointer; }
.po-cal-day.available:hover { border-color: var(--po-primary); }
.po-cal-day.selected { background: var(--po-primary); border-color: var(--po-primary); color: #fff; }
.po-cal-day.empty { background: transparent; cursor: default; }
.po-slots { display: flex; flex-wrap: wrap; gap: .4rem; }
.po-slot { border: 1.5px solid var(--po-border); background: #fff; border-radius: 8px; padding: .4rem .8rem; font-weight: 600; }
.po-slot.selected { background: var(--po-primary); color: #fff; border-color: var(--po-primary); }

/* ── Étape 3 ── */
.po-recap-when { font-weight: 700; margin-bottom: .6rem; }
.po-card-element { padding: .75rem; }
.po-pay-choice label { display: block; border: 2px solid var(--po-border); border-radius: 10px; padding: .6rem .8rem; margin-bottom: .4rem; cursor: pointer; }
.po-success-icon { font-size: 4rem; color: var(--po-success); }
