/* ═══════════════════════════════════════════════════════
   MARCHÉ SHOP — PUBLIC CSS v2
   Full-width, sidebar filtres, look application mobile
   ═══════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────── */
:root {
  --ms-primary:    #E87722;
  --ms-primary-d:  #c55f0a;
  --ms-green:      #2D7D46;
  --ms-green-d:    #1a5c30;
  --ms-dark:       #1A1A1A;
  --ms-gray-100:   #F7F6F3;
  --ms-gray-200:   #EDEBE5;
  --ms-border:     #E0DDD5;
  --ms-text:       #2C2C2C;
  --ms-muted:      #777;
  --ms-radius-sm:  6px;
  --ms-radius:     12px;
  --ms-radius-lg:  18px;
  --ms-shadow:     0 2px 10px rgba(0,0,0,0.07);
  --ms-shadow-md:  0 4px 20px rgba(0,0,0,0.11);
  --ms-topbar-h:   56px;
  --ms-bottomnav-h:64px;
  --ms-sidebar-w:  260px;
  --ms-font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset & base ───────────────────────────────────────── */
.ms-app-wrap *, .ms-app-wrap *::before, .ms-app-wrap *::after { box-sizing: border-box; }
.ms-app-wrap { font-family: var(--ms-font); color: var(--ms-text); background: var(--ms-gray-100); min-height: 100vh; }

/* ── Wrapper pleine largeur ─────────────────────────────── */
/* Neutralise les marges du thème WordPress */
.ms-app-wrap {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  position: relative;
}

/* ══ TOP BAR ═══════════════════════════════════════════════ */
.ms-topbar {
  position: sticky; top: 0; z-index: 200;
  background: var(--ms-dark);
  height: var(--ms-topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.ms-topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ms-topbar-title {
  font-weight: 700; font-size: 1.1rem; color: white;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ms-filter-toggle {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  color: white; padding: 7px 12px; border-radius: 8px; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; transition: background 0.15s;
}
.ms-filter-toggle:hover { background: rgba(255,255,255,0.2); }
.ms-topbar-sachet {
  position: relative; color: white; display: flex; align-items: center;
  padding: 8px; border-radius: 10px; transition: background 0.15s;
}
.ms-topbar-sachet:hover { background: rgba(255,255,255,0.1); }
.ms-topbar-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--ms-primary); color: white;
  border-radius: 50%; width: 18px; height: 18px;
  font-size: 0.7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--ms-dark);
}

/* ══ LAYOUT ════════════════════════════════════════════════ */
.ms-shop-layout {
  display: flex;
  min-height: calc(100vh - var(--ms-topbar-h));
  position: relative;
}

/* ══ SIDEBAR ═══════════════════════════════════════════════ */
.ms-sidebar {
  width: var(--ms-sidebar-w); flex-shrink: 0;
  background: white;
  border-right: 1px solid var(--ms-border);
  position: sticky; top: var(--ms-topbar-h);
  height: calc(100vh - var(--ms-topbar-h));
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), width 0.3s;
}
.ms-sidebar-scroll {
  height: 100%; overflow-y: auto; padding: 0 0 30px;
  scrollbar-width: thin; scrollbar-color: var(--ms-border) transparent;
}
.ms-sidebar-header {
  display: none; /* masqué sur desktop */
  align-items: center; justify-content: space-between;
  padding: 16px 16px 12px; border-bottom: 1px solid var(--ms-border);
  font-size: 1rem; font-weight: 700;
}
.ms-sidebar-close {
  background: none; border: none; cursor: pointer; font-size: 1rem;
  color: var(--ms-muted); padding: 4px 8px; border-radius: 6px;
}
.ms-sidebar-close:hover { background: var(--ms-gray-100); }

.ms-filter-section {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--ms-border);
}
.ms-filter-heading {
  display: block; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--ms-muted); margin-bottom: 10px;
}

/* Recherche */
.ms-search-wrap { position: relative; }
.ms-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ms-muted); pointer-events: none; }
.ms-search-input {
  width: 100%; padding: 9px 12px 9px 34px;
  border: 1.5px solid var(--ms-border); border-radius: var(--ms-radius-sm);
  font-size: 0.9rem; outline: none; transition: border-color 0.2s;
  background: var(--ms-gray-100);
}
.ms-search-input:focus { border-color: var(--ms-primary); background: white; }

/* Listes filtre */
.ms-cat-list, .ms-price-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ms-cat-btn, .ms-price-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border: none; background: transparent;
  border-radius: var(--ms-radius-sm); cursor: pointer; text-align: left;
  font-size: 0.88rem; color: var(--ms-text); transition: all 0.15s;
}
.ms-cat-btn:hover, .ms-price-btn:hover { background: var(--ms-gray-100); }
.ms-cat-btn.active, .ms-price-btn.active {
  background: #fff3e0; color: var(--ms-primary); font-weight: 700;
}
.ms-badge {
  background: var(--ms-gray-200); color: var(--ms-muted);
  border-radius: 50px; padding: 2px 7px; font-size: 0.75rem; font-weight: 600;
}
.ms-cat-btn.active .ms-badge { background: var(--ms-primary); color: white; }

/* Tri */
.ms-sort-select {
  width: 100%; padding: 9px 10px; border: 1.5px solid var(--ms-border);
  border-radius: var(--ms-radius-sm); font-size: 0.88rem; outline: none;
  background: var(--ms-gray-100); color: var(--ms-text); cursor: pointer;
}
.ms-sort-select:focus { border-color: var(--ms-primary); }

.ms-reset-all {
  display: block; width: calc(100% - 32px); margin: 16px;
  padding: 9px; border: 1.5px solid var(--ms-border); border-radius: var(--ms-radius-sm);
  background: white; color: var(--ms-muted); font-size: 0.85rem; cursor: pointer; transition: all 0.15s;
}
.ms-reset-all:hover { border-color: var(--ms-primary); color: var(--ms-primary); }

/* Overlay mobile */
.ms-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 190; backdrop-filter: blur(2px);
}
.ms-overlay.show { display: block; }

/* ══ MAIN ══════════════════════════════════════════════════ */
.ms-main { flex: 1; min-width: 0; padding: 16px; }

/* Barre résultats */
.ms-results-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding: 10px 14px;
  background: white; border-radius: var(--ms-radius-sm);
  border: 1px solid var(--ms-border); font-size: 0.88rem; color: var(--ms-muted);
}
.ms-results-right { display: flex; align-items: center; gap: 10px; }
.ms-sort-inline {
  width: auto; padding: 6px 10px; font-size: 0.85rem;
}

/* ══ GRILLE PRODUITS ═══════════════════════════════════════ */
.ms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* ══ CARTE PRODUIT ═════════════════════════════════════════ */
.ms-card {
  background: white; border-radius: var(--ms-radius);
  border: 1px solid var(--ms-border); overflow: hidden;
  box-shadow: var(--ms-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.ms-card:hover { transform: translateY(-3px); box-shadow: var(--ms-shadow-md); }

.ms-card-img {
  position: relative; height: 150px;
  background: var(--ms-gray-100);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ms-card-img img { width: 100%; height: 100%; object-fit: cover; }
.ms-card-emoji { font-size: 4.5rem; line-height: 1; }
.ms-card-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,0.6); color: white;
  padding: 3px 9px; border-radius: 50px; font-size: 0.72rem; font-weight: 600;
  backdrop-filter: blur(4px);
}

.ms-card-content { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ms-card-name { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--ms-dark); line-height: 1.3; }
.ms-card-desc { margin: 0; font-size: 0.82rem; color: var(--ms-muted); line-height: 1.4; }

/* Chips de tas */
.ms-tas-wrap { margin-top: 2px; }
.ms-tas-intro { font-size: 0.78rem; font-weight: 600; color: var(--ms-muted); margin: 0 0 7px; text-transform: uppercase; letter-spacing: 0.5px; }
.ms-tas-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-chip {
  position: relative; display: flex; flex-direction: column;
  padding: 7px 10px; border: 1.5px solid var(--ms-border); border-radius: 8px;
  cursor: pointer; transition: all 0.15s; min-width: 70px; flex: 1;
}
.ms-chip-radio { position: absolute; opacity: 0; width: 0; height: 0; }
.ms-chip:hover { border-color: var(--ms-primary); background: #fff8f3; }
.ms-chip-active { border-color: var(--ms-primary); background: #fff3e0; }
.ms-chip-name  { font-size: 0.82rem; font-weight: 600; color: var(--ms-text); }
.ms-chip-price { font-size: 0.9rem; font-weight: 800; color: var(--ms-primary); }
.ms-chip-sub   { font-size: 0.72rem; color: var(--ms-muted); }

/* Actions bas de carte */
.ms-card-actions { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }

/* Compteur centré sur sa propre ligne */
.ms-qty-row { display: flex; align-items: center; justify-content: center; }
.ms-qty {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ms-gray-100); border-radius: 50px; padding: 3px 4px;
}
.ms-q-btn {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: white; box-shadow: var(--ms-shadow); cursor: pointer;
  font-size: 1rem; font-weight: 700; display: flex; align-items: center;
  justify-content: center; transition: all 0.15s; color: var(--ms-dark); flex-shrink: 0;
}
.ms-q-btn:hover { background: var(--ms-primary); color: white; box-shadow: none; }
.ms-q-input {
  width: 36px; text-align: center; border: none; background: transparent;
  font-size: 0.95rem; font-weight: 700; color: var(--ms-dark); outline: none;
}

/* Total sur sa propre ligne — jamais coupé */
.ms-card-subtotal {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 8px; background: var(--ms-gray-100); border-radius: 8px;
}
.ms-subtotal-label { font-size: 0.78rem; color: var(--ms-muted); font-weight: 500; }
.ms-subtotal-val {
  font-size: 1rem; font-weight: 800; color: var(--ms-green); white-space: nowrap;
}

.ms-add-btn {
  width: 100%; padding: 12px; border: none;
  background: var(--ms-primary); color: white;
  border-radius: var(--ms-radius-sm); font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: background 0.2s; letter-spacing: 0.3px;
}
.ms-add-btn:hover  { background: var(--ms-primary-d); }
.ms-add-btn:active { transform: scale(0.98); }
.ms-no-tas { font-size: 0.85rem; color: var(--ms-muted); font-style: italic; text-align: center; padding: 10px 0; }

/* Pas de résultats -->*/
.ms-empty-state, .ms-no-results {
  grid-column: 1/-1; text-align: center; padding: 60px 20px;
  color: var(--ms-muted);
}
.ms-empty-state span, .ms-no-results span { font-size: 3.5rem; display: block; margin-bottom: 12px; }
.ms-no-results button {
  margin-top: 14px; padding: 10px 22px; background: var(--ms-primary); color: white;
  border: none; border-radius: 8px; cursor: pointer; font-weight: 600;
}

/* ══ BOTTOM NAV (mobile only) ══════════════════════════════ */
.ms-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--ms-dark);
  height: var(--ms-bottomnav-h);
  display: flex; align-items: center; justify-content: space-around;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-bottom: env(safe-area-inset-bottom);
}
.ms-bnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.68rem;
  font-weight: 600; padding: 6px 16px; border: none; background: none;
  cursor: pointer; transition: color 0.15s; letter-spacing: 0.3px;
}
.ms-bnav-item:hover, .ms-bnav-active { color: white !important; }
.ms-bnav-sachet-wrap { position: relative; display: inline-flex; }
.ms-bnav-badge {
  position: absolute; top: -4px; right: -8px;
  background: var(--ms-primary); color: white;
  border-radius: 50%; width: 16px; height: 16px;
  font-size: 0.65rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ══ PAGES SACHET / CHECKOUT / CONFIRMATION ════════════════ */
.ms-sachet-wrap, .ms-checkout-wrap, .ms-confirmation-wrap {
  max-width: 900px; margin: 0 auto; padding: 20px 16px 100px;
  font-family: var(--ms-font); color: var(--ms-text);
}
.ms-page-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 22px; color: var(--ms-dark); }

/* Boutons globaux */
.ms-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--ms-radius-sm);
  font-size: 0.95rem; font-weight: 700; cursor: pointer;
  text-decoration: none; border: 2px solid transparent; transition: all 0.2s;
  font-family: var(--ms-font);
}
.ms-btn-primary   { background: var(--ms-primary); color: white !important; }
.ms-btn-primary:hover { background: var(--ms-primary-d); color: white !important; }
.ms-btn-secondary { background: white; color: var(--ms-dark) !important; border-color: var(--ms-border); }
.ms-btn-secondary:hover { border-color: var(--ms-primary); color: var(--ms-primary) !important; }
.ms-btn-large { padding: 15px 28px; font-size: 1.05rem; width: 100%; justify-content: center; }

/* Sachet vide */
.ms-sachet-empty { text-align: center; padding: 60px 20px; }
.ms-sachet-empty span { font-size: 4rem; display: block; margin-bottom: 16px; }
.ms-sachet-empty p { font-size: 1.1rem; color: var(--ms-muted); margin-bottom: 20px; }

/* Items sachet */
.ms-sachet-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.ms-sachet-item {
  display: grid; grid-template-columns: 50px 1fr auto auto 32px; gap: 12px;
  align-items: center; padding: 14px 16px;
  background: white; border-radius: var(--ms-radius);
  border: 1px solid var(--ms-border); box-shadow: var(--ms-shadow);
}
.ms-item-image { font-size: 2rem; text-align: center; }
.ms-item-info h4 { margin: 0 0 3px; font-size: 0.95rem; font-weight: 700; }
.ms-item-tas   { display: block; font-size: 0.78rem; color: var(--ms-muted); }
.ms-item-prix  { display: block; font-size: 0.85rem; color: var(--ms-primary); font-weight: 600; margin-top: 2px; }
.ms-item-qty   { display: flex; align-items: center; gap: 6px; }
.ms-qty-btn    { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ms-border); background: white; cursor: pointer; font-weight: 700; font-size: 1rem; display: flex; align-items: center; justify-content: center; }
.ms-qty-btn:hover { background: var(--ms-primary); border-color: var(--ms-primary); color: white; }
.ms-qty-val    { font-weight: 800; min-width: 22px; text-align: center; font-size: 0.95rem; }
.ms-item-total { font-weight: 800; font-size: 0.95rem; color: var(--ms-green); text-align: right; white-space: nowrap; }
.ms-item-remove { background: none; border: none; color: #ccc; font-size: 1.1rem; cursor: pointer; padding: 4px; border-radius: 50%; }
.ms-item-remove:hover { color: #e53935; background: #ffebee; }

/* Récap sachet */
.ms-sachet-recap {
  background: white; border-radius: var(--ms-radius); border: 1px solid var(--ms-border);
  padding: 18px; margin-bottom: 18px;
}
.ms-recap-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--ms-border); font-size: 0.95rem; }
.ms-recap-row:last-child { border: none; }
.ms-recap-total { font-size: 1.15rem; font-weight: 800; color: var(--ms-dark); }
.ms-sachet-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Checkout */
.ms-checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; }
@media (max-width: 768px) { .ms-checkout-layout { grid-template-columns: 1fr; } }
.ms-form-section { background: white; border-radius: var(--ms-radius); border: 1px solid var(--ms-border); padding: 18px; margin-bottom: 16px; }
.ms-form-section h3 { margin: 0 0 16px; font-size: 1rem; font-weight: 700; }
.ms-form-group { margin-bottom: 13px; }
.ms-form-group label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 5px; color: #444; }
.ms-form-group input, .ms-form-group textarea, .ms-form-group select {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--ms-border); border-radius: var(--ms-radius-sm);
  font-size: 0.92rem; outline: none; transition: border-color 0.2s; font-family: var(--ms-font); box-sizing: border-box;
}
.ms-form-group input:focus, .ms-form-group textarea:focus, .ms-form-group select:focus { border-color: var(--ms-primary); }
.required { color: var(--ms-primary); }

.ms-payment-methods { display: flex; flex-direction: column; gap: 8px; }
.ms-payment-option {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1.5px solid var(--ms-border); border-radius: 10px; cursor: pointer; transition: all 0.15s;
}
.ms-payment-option:has(input:checked) { border-color: var(--ms-primary); background: #fff8f3; }
.ms-pay-icon   { font-size: 1.5rem; }
.ms-pay-label  { font-weight: 600; font-size: 0.9rem; flex: 1; }
.ms-pay-numero { font-size: 0.82rem; color: var(--ms-muted); font-family: monospace; }

.ms-order-recap { background: white; border-radius: var(--ms-radius); border: 1px solid var(--ms-border); padding: 18px; position: sticky; top: 76px; }
.ms-order-recap h3 { margin: 0 0 14px; font-size: 1rem; }
.ms-recap-item { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--ms-border); font-size: 0.85rem; }
.ms-recap-item-name { min-width: 0; }
.ms-recap-item-name small { display: block; color: var(--ms-muted); font-size: 0.78rem; }
.ms-recap-item-qty  { color: var(--ms-muted); font-size: 0.82rem; }
.ms-recap-item-price { font-weight: 700; white-space: nowrap; }
.ms-recap-divider { border-top: 2px solid var(--ms-border); margin: 10px 0; }
.ms-recap-total-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 0.9rem; }
.ms-recap-grand-total { font-size: 1.1rem; color: var(--ms-primary); font-weight: 800; border-top: 2px solid var(--ms-border); margin-top: 6px; padding-top: 10px; }
.ms-livraison-row { color: var(--ms-muted); font-size: 0.85rem; }
.ms-error-msg { color: #e53935; padding: 10px 14px; margin-top: 10px; background: #ffebee; border-radius: 8px; font-size: 0.9rem; }

/* Confirmation */
.ms-confirmation-success { text-align: center; padding: 40px 20px; }
.ms-success-icon { font-size: 5rem; display: block; margin-bottom: 14px; }
.ms-confirmation-success h2 { font-size: 1.7rem; color: var(--ms-green); margin: 0 0 10px; }
.ms-confirm-ref { font-size: 1rem; background: var(--ms-gray-100); padding: 10px 20px; border-radius: 8px; display: inline-block; font-weight: 700; }
.ms-confirm-msg { font-size: 0.95rem; color: var(--ms-muted); margin: 14px 0 0; }
.ms-payment-instructions { background: white; border-radius: var(--ms-radius); padding: 18px; margin: 18px 0; border: 1px solid var(--ms-border); }
.ms-payment-instructions h3 { margin: 0 0 10px; }
.ms-order-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--ms-radius); overflow: hidden; box-shadow: var(--ms-shadow); }
.ms-order-table th, .ms-order-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--ms-border); }
.ms-order-table th { background: var(--ms-gray-100); font-weight: 700; font-size: 0.8rem; color: var(--ms-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.ms-order-total-row td { font-weight: 800; background: var(--ms-gray-100); }
.ms-delivery-info { background: white; border-radius: var(--ms-radius); border: 1px solid var(--ms-border); padding: 18px; margin: 18px 0; }
.ms-delivery-info h3 { margin: 0 0 12px; }
.ms-delivery-info p  { margin: 5px 0; font-size: 0.9rem; }
.ms-confirmation-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Toast */
.ms-toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--ms-dark); color: white;
  padding: 12px 22px; border-radius: 50px; font-weight: 600; font-size: 0.9rem;
  z-index: 9999; transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s;
  opacity: 0; pointer-events: none; white-space: nowrap; box-shadow: var(--ms-shadow-md);
}
.ms-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.ms-toast.success { background: var(--ms-green); }
.ms-toast.error   { background: #e53935; }

/* ══ RESPONSIVE ════════════════════════════════════════════ */

/* Tablette : sidebar réduite */
@media (max-width: 1024px) {
  :root { --ms-sidebar-w: 220px; }
  .ms-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* Mobile : sidebar drawer */
@media (max-width: 768px) {
  .ms-bottom-nav { display: flex; }
  .ms-main { padding: 12px 12px calc(var(--ms-bottomnav-h) + 20px); }

  /* Sidebar devient un drawer depuis la gauche */
  .ms-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 195;
    height: 100vh; width: min(85vw, 300px);
    transform: translateX(-110%);
    border-right: 1px solid var(--ms-border);
    box-shadow: var(--ms-shadow-md);
  }
  .ms-sidebar.open { transform: translateX(0); }
  .ms-sidebar-header { display: flex; }
  .ms-filter-toggle { display: none; } /* remplacé par bottom nav */

  /* Topbar mobile */
  .ms-topbar { padding: 0 12px; }
  .ms-topbar-title { font-size: 1rem; }

  /* Grille 2 colonnes sur mobile */
  .ms-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Carte mobile compacte */
  .ms-card-img { height: 110px; }
  .ms-card-emoji { font-size: 3rem; }
  .ms-card-content { padding: 10px; gap: 6px; }
  .ms-card-name { font-size: 0.92rem; }
  .ms-card-desc { display: none; } /* masquer description sur très petit */
  .ms-chip { padding: 5px 7px; }
  .ms-chip-price { font-size: 0.82rem; }
  .ms-add-btn { padding: 10px; font-size: 0.85rem; }

  /* Sachet mobile */
  .ms-sachet-item { grid-template-columns: 40px 1fr; grid-template-rows: auto auto; gap: 8px; }
  .ms-item-qty   { grid-column: 2; }
  .ms-item-total { grid-column: 2; }
  .ms-item-remove { grid-row: 1; grid-column: 2; justify-self: end; }
}

/* Très petit (320px) */
@media (max-width: 380px) {
  .ms-grid { grid-template-columns: 1fr; }
}

/* Desktop : masquer le bouton filtre inline */
@media (min-width: 769px) {
  .ms-bottom-nav { display: none; }
  .ms-results-right .ms-sort-inline { display: block; }
}

/* Print */
@media print {
  .ms-topbar, .ms-sidebar, .ms-bottom-nav, .ms-confirmation-actions { display: none !important; }
  .ms-shop-layout { display: block; }
}

/* Animation ajout sachet */
@keyframes ms-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(0.96); outline: 3px solid var(--ms-primary);} }
.ms-card-added { animation: ms-pulse 0.5s ease; }
