/* Baydi — feuille de style commune (boutique, compte, livreur).
   Propriétés logiques (inline-start/end) partout : la mise en page s'inverse seule en arabe (dir="rtl"). */
:root {
  --green-900: #0f4a27;
  --green-700: #1e6a3b;
  --green-600: #2b7d4a;
  --green-100: #e6f3ea;
  --green-50: #f3f9f4;
  --yolk: #d9ad45;
  --yolk-100: #fdf1d6;
  --beige: #faf6ee;
  --ink: #1f2a24;
  --ink-2: #4b5a51;
  --muted: #6b776f;
  --line: #e3e7e2;
  --white: #ffffff;
  --danger: #b42318;
  --danger-100: #fde8e6;
  --warn: #9a6200;
  --warn-100: #fff4d6;
  --info: #1f5f99;
  --info-100: #e5f0fb;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 40, 28, .06), 0 6px 20px rgba(20, 40, 28, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Noto Sans Arabic", "Segoe UI", Tahoma, "Geeza Pro", "Arial", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink);
  background: var(--white); min-height: 100vh; display: flex; flex-direction: column;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.75; }
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-900); }
h1, h2, h3 { line-height: 1.25; color: var(--ink); margin: 0 0 .6em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .8em; }
:focus-visible { outline: 3px solid var(--yolk); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.ltr { unicode-bidi: isolate; direction: ltr; }
.nowrap { white-space: nowrap; }
.hidden, [hidden] { display: none !important; }

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
.section { padding-block: 40px; }
.section-alt { background: var(--beige); }
.stack > * + * { margin-block-start: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid-2 { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; } }

/* Icônes */
.icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }
[dir="rtl"] .icon-arrow, [dir="rtl"] .icon-back { transform: scaleX(-1); }

/* Boutons */
.btn, .btn-ghost, .btn-outline, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 10px 18px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer;
  border: 1.5px solid transparent; text-decoration: none; transition: background .15s, border-color .15s, color .15s;
}
.btn { background: var(--green-700); color: var(--white); }
.btn:hover { background: var(--green-900); color: var(--white); }
.btn-outline { background: var(--white); color: var(--green-700); border-color: var(--green-700); }
.btn-outline:hover { background: var(--green-50); }
.btn-ghost { background: transparent; color: var(--ink-2); padding-inline: 10px; }
.btn-ghost:hover { background: var(--green-50); color: var(--green-900); }
.btn-danger { background: var(--white); color: var(--danger); border-color: #f1b7b1; }
.btn-danger:hover { background: var(--danger-100); }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 1.05rem; padding-inline: 26px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
button:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2.5px solid #fff; border-inline-end-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* En-tête */
#site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); border-block-end: 1px solid var(--line); backdrop-filter: blur(6px); }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--green-900); text-decoration: none; }
.main-nav { display: none; }
.main-nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; padding: 8px 10px; border-radius: 8px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--green-900); background: var(--green-50); }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.icon-link { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; min-height: 44px; }
.icon-link:hover { background: var(--green-50); color: var(--green-900); }
.badge { position: absolute; top: 2px; inset-inline-start: 22px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--yolk); color: var(--ink); font-size: .75rem; font-weight: 800; display: grid; place-items: center; }
.lang-switch span { font-weight: 600; }
.hide-sm { display: none; }
.menu-toggle { padding: 8px; }
.main-nav.open { display: flex; position: absolute; top: 64px; inset-inline: 0; flex-direction: column; background: var(--white); padding: 8px 16px 16px; border-block-end: 1px solid var(--line); box-shadow: var(--shadow); }
@media (min-width: 900px) {
  .main-nav, .main-nav.open { display: flex; position: static; flex-direction: row; gap: 4px; box-shadow: none; padding: 0; border: 0; margin-inline-start: 16px; }
  .menu-toggle { display: none; }
  .hide-sm { display: inline; }
}

/* Pied de page */
#site-footer { background: var(--green-900); color: #dbe9df; margin-block-start: 48px; }
#site-footer a { color: #ffffff; }
.footer-grid { display: grid; gap: 24px; padding-block: 36px 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-title { color: #fff; font-size: 1rem; }
.brand-footer { color: #fff; }
#site-footer .muted { color: #b9cfc0; }
.copyright { grid-column: 1 / -1; border-block-start: 1px solid rgba(255, 255, 255, .15); padding-block-start: 16px; margin: 0; font-size: .875rem; }

/* Bannière d'accueil */
.hero { background: linear-gradient(135deg, var(--yolk-100), var(--green-50) 70%); }
.hero-inner { display: grid; gap: 28px; padding-block: 40px; align-items: center; }
@media (min-width: 860px) { .hero-inner { grid-template-columns: 1.2fr 1fr; padding-block: 64px; } }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); color: var(--green-900); }
.hero p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.hero-visual { aspect-ratio: 1 / 1; max-width: 460px; justify-self: center; width: 100%; border-radius: 28px; background: #f8f6ef; box-shadow: var(--shadow); display: grid; place-items: center; overflow: hidden; }
.perks { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.perk { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.perk .icon { width: 28px; height: 28px; color: var(--green-700); }
.perk strong { display: block; }

/* Catégories */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink-2); font-weight: 600; text-decoration: none; cursor: pointer; font: inherit; }
.chip:hover { border-color: var(--green-600); color: var(--green-900); }
.chip[aria-pressed="true"], .chip.active { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.category-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.category-card { padding: 22px 16px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; text-align: center; transition: border-color .15s, transform .15s; }
.category-card:hover { border-color: var(--green-600); transform: translateY(-2px); }

/* Cartes produits */
.product-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
@media (max-width: 520px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.product-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s; }
.product-card:hover { box-shadow: var(--shadow); }
.product-card .media { position: relative; aspect-ratio: 4 / 3; background: var(--beige); }
.product-card .media img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { display: flex; flex-direction: column; gap: 6px; padding: 14px; flex: 1; }
.product-card h3 { font-size: 1rem; margin: 0; }
.product-card h3 a { color: var(--ink); text-decoration: none; }
.product-card h3 a::after { content: ""; position: absolute; inset: 0; }
.product-card { position: relative; }
.product-card .actions { margin-block-start: auto; position: relative; z-index: 1; }
.packaging { color: var(--muted); font-size: .9rem; margin: 0; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-weight: 800; font-size: 1.15rem; color: var(--green-900); }
.price del { color: var(--muted); font-weight: 500; font-size: .9rem; }
.tag { position: absolute; top: 10px; inset-inline-start: 10px; background: var(--yolk); color: var(--ink); font-size: .8rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.availability { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; }
.availability::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.availability.IN_STOCK { color: var(--green-700); }
.availability.LOW_STOCK { color: var(--warn); }
.availability.OUT_OF_STOCK { color: var(--danger); }
@media (max-width: 520px) { .product-card .btn { padding-inline: 10px; font-size: .9rem; } .product-card .body { padding: 10px; } }

/* Fiche produit */
.product-detail { display: grid; gap: 28px; }
@media (min-width: 860px) { .product-detail { grid-template-columns: 1fr 1fr; align-items: start; } }
.product-detail .media { border-radius: 22px; overflow: hidden; background: var(--beige); aspect-ratio: 4 / 3; }
.product-detail .media img { width: 100%; height: 100%; object-fit: cover; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; padding: 16px; background: var(--green-50); border-radius: var(--radius-sm); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }

/* Quantité */
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--white); }
.qty button { width: 42px; height: 42px; border: 0; background: transparent; font-size: 1.3rem; cursor: pointer; color: var(--green-900); }
.qty button:hover { background: var(--green-50); }
.qty input { width: 56px; height: 42px; text-align: center; border: 0; font: inherit; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Cartes / panneaux */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-tight { padding: 14px; }
.summary { position: sticky; top: 84px; }
.summary-lines { display: grid; gap: 8px; margin: 0 0 16px; }
.summary-lines > div { display: flex; justify-content: space-between; gap: 12px; }
.summary-lines .total { border-block-start: 1px solid var(--line); padding-block-start: 10px; font-weight: 800; font-size: 1.15rem; }
.discount { color: var(--green-700); }

/* Lignes du panier */
.cart-lines { display: grid; gap: 12px; }
.cart-line { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.cart-line img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--beige); }
.cart-line .line-controls { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (min-width: 640px) { .cart-line { grid-template-columns: 84px 1fr auto; } .cart-line .line-controls { grid-column: auto; } }
.line-total { font-weight: 800; min-width: 7em; text-align: end; }

/* Formulaires */
.form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 600; font-size: .95rem; }
.field .hint { color: var(--muted); font-size: .85rem; }
.field .error { color: var(--danger); font-size: .875rem; font-weight: 600; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], input[type="date"], input[type="datetime-local"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: var(--white);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green-600); outline: none; box-shadow: 0 0 0 3px var(--green-100); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
input[type="tel"], input[type="email"] { direction: ltr; text-align: start; }
[dir="rtl"] input[type="tel"], [dir="rtl"] input[type="email"] { text-align: right; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--green-600); background: var(--green-50); }
.radio-card input { margin-block-start: 4px; accent-color: var(--green-700); }
.radio-card.disabled { opacity: .55; cursor: not-allowed; }
.checkbox { display: flex; gap: 10px; align-items: center; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--green-700); }

/* Messages */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid; }
.alert-error { background: var(--danger-100); border-color: #f6c3bd; color: #7a1a12; }
.alert-warn { background: var(--warn-100); border-color: #f2d68d; color: #6b4600; }
.alert-info { background: var(--info-100); border-color: #bcd7f2; color: #17466f; }
.alert-success { background: var(--green-100); border-color: #bfe0c9; color: var(--green-900); }
.toasts { position: fixed; inset-block-end: 16px; inset-inline: 16px; display: grid; gap: 8px; justify-items: center; z-index: 100; pointer-events: none; }
.toast { pointer-events: auto; max-width: 480px; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow); transition: opacity .4s, transform .4s; }
.toast-success { background: var(--green-900); }
.toast-error { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* États */
.state { padding: 40px 16px; text-align: center; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.state-title { font-weight: 700; color: var(--ink); font-size: 1.1rem; margin: 0; }
.state-error { color: var(--danger); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--green-100); border-block-start-color: var(--green-700); border-radius: 50%; animation: spin .8s linear infinite; }
.skeleton { background: linear-gradient(90deg, #f1f3f0 25%, #e7ebe6 37%, #f1f3f0 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius); min-height: 280px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin-block-start: 24px; }

/* Suivi de commande */
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: var(--green-100); color: var(--green-900); white-space: nowrap; }
.status-pill.PENDING_CONFIRMATION { background: var(--warn-100); color: var(--warn); }
.status-pill.CONFIRMED, .status-pill.PREPARING, .status-pill.READY_FOR_DISPATCH { background: var(--info-100); color: var(--info); }
.status-pill.OUT_FOR_DELIVERY { background: var(--yolk-100); color: #7a5000; }
.status-pill.DELIVERED, .status-pill.PAID { background: var(--green-100); color: var(--green-900); }
.status-pill.CANCELLED, .status-pill.DELIVERY_FAILED, .status-pill.FAILED { background: var(--danger-100); color: var(--danger); }
.status-pill.PENDING { background: var(--warn-100); color: var(--warn); }
.status-pill.REFUNDED, .status-pill.PARTIALLY_REFUNDED { background: #eee; color: #444; }
.progress { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; counter-reset: step; }
.progress li { position: relative; text-align: center; font-size: .78rem; color: var(--muted); padding-block-start: 38px; }
.progress li::before { counter-increment: step; content: counter(step); position: absolute; top: 0; inset-inline-start: 50%; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--white); border: 2px solid var(--line); font-weight: 700; z-index: 1; }
[dir="rtl"] .progress li::before { transform: translateX(50%); }
.progress li::after { content: ""; position: absolute; top: 14px; inset-inline-start: calc(-50% + 15px); width: calc(100% - 30px); height: 3px; background: var(--line); }
.progress li:first-child::after { display: none; }
.progress li.done::before { content: "✓"; background: var(--green-700); border-color: var(--green-700); color: #fff; }
.progress li.done::after, .progress li.current::after { background: var(--green-700); }
.progress li.current::before { border-color: var(--green-700); color: var(--green-700); box-shadow: 0 0 0 4px var(--green-100); }
.progress li.current { color: var(--ink); font-weight: 700; }
.progress li.failed::before { content: "!"; background: var(--danger); border-color: var(--danger); color: #fff; }
@media (max-width: 560px) { .progress li span { display: none; } .progress li.current span { display: block; position: absolute; inset-inline: -40px; } .progress { padding-block-end: 22px; } }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding-inline-start: 28px; padding-block-end: 18px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 6px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--green-700); }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 11px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.bad::before { background: var(--danger); }
.timeline time { display: block; color: var(--muted); font-size: .875rem; }

/* Tableaux */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 10px 12px; text-align: start; border-block-end: 1px solid var(--line); vertical-align: top; }
th { background: var(--green-50); font-weight: 700; color: var(--ink-2); white-space: nowrap; }
tbody tr:last-child td { border-block-end: 0; }
td.num, th.num { text-align: end; white-space: nowrap; }

/* Compte */
.account-layout { display: grid; gap: 24px; }
@media (min-width: 860px) { .account-layout { grid-template-columns: 240px 1fr; align-items: start; } }
.side-nav { display: flex; gap: 6px; overflow-x: auto; }
@media (min-width: 860px) { .side-nav { flex-direction: column; position: sticky; top: 84px; } }
.side-nav a, .side-nav button { padding: 10px 14px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 600; white-space: nowrap; background: none; border: 0; font: inherit; text-align: start; cursor: pointer; }
.side-nav a[aria-current="page"], .side-nav a:hover, .side-nav button:hover { background: var(--green-50); color: var(--green-900); }
.auth-box { max-width: 460px; margin: 40px auto; }
.order-list { display: grid; gap: 12px; }
.order-row { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); grid-template-columns: 1fr auto; align-items: center; }
.order-row:hover { border-color: var(--green-600); }
.address-card { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); display: grid; gap: 4px; }
.address-card.default { border-color: var(--green-600); background: var(--green-50); }

/* Dialogue */
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(20, 30, 25, .45); }
dialog .dialog-body { padding: 20px; display: grid; gap: 14px; }
dialog .dialog-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 20px; border-block-start: 1px solid var(--line); background: var(--beige); }

.breadcrumb { font-size: .9rem; color: var(--muted); margin-block: 16px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.breadcrumb a { color: var(--muted); }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-block-end: 20px; }
.toolbar .search { flex: 1 1 220px; position: relative; }
.toolbar select { width: auto; min-width: 170px; }

/* Impression */
@media print {
  #site-header, #site-footer, .no-print, .toasts { display: none !important; }
  body { font-size: 12pt; }
  .card { border: 0; padding: 0; }
}

/* Retouches après vérification visuelle */
ul.summary-lines { list-style: none; padding: 0; }
address { font-style: normal; }
.unread { border-color: var(--green-600); }

/* Logo Baydi */
.brand-logo { width: 48px; height: 48px; object-fit: contain; }
.logo-badge { width: 40px; height: 40px; padding: 3px; border-radius: 50%; background: #f8f6ef; object-fit: contain; }
.hero-visual img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 420px) { .header-inner .brand span { display: none; } .header-inner { gap: 6px; } }

/* Commande simplifiée, WhatsApp, suivi par téléphone, reçu */
.btn-whatsapp { background: #1fa855; color: #fff; }
.btn-whatsapp:hover { background: #178a45; color: #fff; }
.choice-row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.geo-box { display: grid; gap: 8px; padding: 14px; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); background: var(--green-50); }
.geo-box .alert { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; }
details summary { cursor: pointer; color: var(--green-700); font-weight: 600; }
details[open] summary { margin-block-end: 10px; }
.lookup-card { display: grid; gap: 12px; }
.lookup-card .items { margin: 0; padding-inline-start: 18px; }
.receipt-sheet { max-width: 760px; margin-inline: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.receipt-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; border-block-end: 2px solid var(--green-900); padding-block-end: 14px; margin-block-end: 16px; }
.receipt-head img { width: 84px; height: 84px; }
.receipt-title { font-size: 1.4rem; font-weight: 800; color: var(--green-900); margin: 0; }
.receipt-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 16px; }
.receipt-meta dt { color: var(--muted); }
.receipt-meta dd { margin: 0; font-weight: 600; }
.paid-stamp { display: inline-block; border: 3px solid var(--green-700); color: var(--green-700); font-weight: 800; padding: 4px 14px; border-radius: 8px; transform: rotate(-4deg); letter-spacing: .05em; }
@media print { .receipt-sheet { border: 0; padding: 0; } }
.grow { flex: 1 1 220px; }
.row > .btn-lg { align-self: flex-end; }
.choice-row .radio-card { align-items: flex-start; }
bdi.ltr { white-space: nowrap; }
@media (max-width: 560px) {
  .receipt-sheet { padding: 16px; }
  .receipt-sheet .unit-col { display: none; }
  .receipt-sheet th, .receipt-sheet td { padding: 8px 6px; }
}

/* ---------- Mobile (audit du 26/10/2026) ---------- */
/* Barre fixée en bas : « Voir mon panier », total + action principale */
.bottom-bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 35; background: rgba(255, 255, 255, .97); border-block-start: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(20, 40, 28, .08); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); backdrop-filter: blur(6px); }
.bottom-bar-inner { max-width: 1180px; margin-inline: auto; display: flex; gap: 10px; align-items: center; }
.bottom-bar-inner > .btn, .bottom-bar-inner > .btn-outline { flex: 1; }
.bottom-bar .bar-total { display: grid; line-height: 1.2; min-width: 6.5em; }
.bottom-bar .bar-total strong { font-size: 1.15rem; color: var(--green-900); }
.bottom-bar .bar-add { flex: 0 0 auto; }
.cart-cta { justify-content: space-between; }
.cart-cta .cta-meta { font-weight: 500; font-size: .9rem; opacity: .9; margin-inline-start: auto; white-space: nowrap; }
.cart-cta.pulse { animation: pulse .6s ease; }
@keyframes pulse { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
body.has-bottom-bar { padding-block-end: 84px; }
body.has-bottom-bar .toasts { inset-block-end: 96px; }
@media (min-width: 860px) {
  .bottom-bar { inset-inline: auto 24px; inset-block-end: 24px; width: min(460px, calc(100vw - 48px)); border: 1px solid var(--line); border-radius: 18px; padding: 10px; }
  [dir="rtl"] .bottom-bar { inset-inline: auto 24px; }
  body.has-bottom-bar { padding-block-end: 0; }
  /* Sur ordinateur, panier et commande gardent leur récapitulatif à droite : la barre n'y sert pas */
  body.page-checkout .bottom-bar, body.page-cart .bottom-bar { display: none; }
}
.lbl-short { display: none; }
@media (max-width: 420px) { .product-card .lbl-long { display: none; } .product-card .lbl-short { display: inline; } }

@media (max-width: 640px) {
  /* Filtres du catalogue sur une seule ligne défilante */
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; padding-block-end: 4px; scroll-snap-type: x proximity; }
  .chips::-webkit-scrollbar { display: none; }
  .chips .chip { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; }
  .toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-block-end: 8px; }
  .toolbar .search { grid-column: 1 / -1; }
  .toolbar select { min-width: 0; width: 100%; }
  .section { padding-block: 24px; }
  h1 { font-size: 1.55rem; }
  .hide-mobile { display: none !important; }
  /* Onglets du compte en grille 2 × 2 */
  .side-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; overflow: visible; }
  .side-nav a, .side-nav button { text-align: center; white-space: normal; background: var(--white); border: 1px solid var(--line); min-height: 44px; }
  .side-nav button { grid-column: 1 / -1; }
  /* Grandes zones tactiles */
  .qty button { width: 44px; height: 44px; }
  .qty input { height: 44px; width: 48px; }
  #site-footer p a { display: inline-flex; align-items: center; min-height: 40px; }
  .breadcrumb a { padding-block: 10px; }
  .product-detail { gap: 18px; }
  .summary { position: static; }
}
.cart-cta { gap: 10px; }
.cart-cta .cta-icon { position: relative; display: inline-flex; }
.cart-cta .cta-count { position: absolute; top: -8px; inset-inline-end: -10px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--yolk); color: var(--ink); font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.cart-cta .cta-label { white-space: nowrap; }
@media (max-width: 420px) {
  .bottom-bar-inner { gap: 8px; }
  .bottom-bar .btn-lg, .bottom-bar .btn-outline.btn-lg { padding-inline: 14px; font-size: 1rem; }
  .cart-cta .cta-meta { font-size: .85rem; }
}
@media (max-width: 360px) { .cart-cta .cta-meta { display: none; } }

/* Carte de la position (confirmation, suivi) */
.map-box { display: grid; gap: 8px; }
.map-frame { width: 100%; height: 240px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--beige); }

/* Fidélité et avoir */
.loyalty-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.loyalty-tiles .big { font-size: 1.9rem; font-weight: 800; color: var(--green-900); margin: 0; }
.reward-card { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.reward-card.ready { border-color: var(--green-600); background: var(--green-50); }
.meter { height: 10px; border-radius: 999px; background: #edf0ec; overflow: hidden; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-600), var(--yolk)); border-radius: 999px; }
.history-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.history-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-block-end: 8px; border-block-end: 1px solid var(--line); }
.history-list .plus { color: var(--green-700); white-space: nowrap; }
.history-list .minus { color: var(--danger); white-space: nowrap; }
@media (max-width: 640px) { .side-nav { grid-template-columns: 1fr 1fr; } }
.loyalty-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--yolk-100); color: var(--ink); font-weight: 700; text-decoration: none; border: 1px solid #f2d68d; justify-self: start; }
.loyalty-chip .icon { color: var(--green-700); }

/* Points dans l'en-tête et avantages dans le panier */
.points-badge { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 10px; border-radius: 999px; background: var(--yolk-100); border: 1px solid #f2d68d; color: var(--ink); font-weight: 800; font-size: .9rem; text-decoration: none; }
.points-badge .icon { width: 16px; height: 16px; color: #c58b12; }
.points-badge:hover { background: #fbe7b8; color: var(--ink); }
.benefits-picker { border-block-start: 1px solid var(--line); padding-block-start: 14px; }
.benefits-picker h3 { margin: 0; }
.icon-star { color: #c58b12; }
@media (max-width: 380px) { .points-badge { padding: 4px 8px; } .header-actions { gap: 2px; } }
.header-inner .brand, .header-inner .brand img { flex-shrink: 0; }
@media (max-width: 400px) { .lang-switch span { display: none; } .lang-switch { padding-inline: 8px; } }
