/* ========================================================================
 * landing-multiaffiliate-marketplace.css — Overlay « Affiliate marketplace »
 * pour la home landing (popup).
 *
 * Port intégral de zic_admin_python/zic_admin/static/css/
 * admin-multiaffiliate-shop-marketplace.css (préfixe `mash-`, scope
 * `.mash-root` conservé, fallbacks --aw-* autosuffisants conservés),
 * complété par le chrome d'overlay `.zh-mash-*` calqué sur l'esthétique
 * de landing-multishop.css (.zh-mshop-overlay, z-index 1500).
 *
 * Tout est scopé sous `.zh-mash-` ou `.mash-root` pour ne rien faire
 * fuir sur la home.
 * ======================================================================== */

/* ==========================================================================
   Chrome overlay (spécifique landing)
   ========================================================================== */
.zh-mash-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500; /* aligné sur .zh-mshop-overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.zh-mash-overlay[hidden] { display: none; }

.zh-mash-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  cursor: default;
  background: var(--pp-scrim, rgba(15, 8, 38, 0.55));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.zh-mash-card {
  position: relative;
  width: min(1180px, calc(100vw - 32px));
  max-height: 92vh;
  overflow: auto;
  border-radius: 22px;
  background: var(--mash-bg, #f4f3fb);
  box-shadow: 0 30px 80px var(--pp-shadow, rgba(15, 8, 38, 0.45));
  padding: 24px;
  -webkit-overflow-scrolling: touch;
}

.zh-mash-close {
  position: sticky;
  top: 0;
  float: right;
  margin: -8px -8px 0 0;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: var(--pp-overlay, rgba(17, 24, 39, 0.06));
  color: var(--pp-text, #111827);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 120ms ease, transform 120ms ease;
}
.zh-mash-close:hover {
  background: var(--pp-overlay-strong, rgba(17, 24, 39, 0.12));
  transform: scale(1.05);
}
.zh-mash-close svg { width: 18px; height: 18px; }

/* ==========================================================================
   Port intégral — MultiAffiliate Shop / Marketplace (source admin, 352 l.)
   Responsive web / tablette / mobile. Réutilise les tokens --aw-* du shell
   (fallbacks autosuffisants sur la landing).
   ========================================================================== */

.mash-root {
  --mash-purple: var(--aw-purple, #6d28d9);
  --mash-purple-dk: var(--aw-purple-dk, #4c1d95);
  --mash-text: var(--aw-text, #1f1340);
  --mash-muted: var(--aw-muted, #6b7280);
  --mash-bg: var(--aw-bg, #f4f3fb);
  --mash-surface: #ffffff;
  --mash-soft: #faf9fe;
  --mash-border: var(--aw-border, rgba(31, 19, 64, 0.08));
  --mash-green: #16a34a;
  --mash-green-soft: #dcfce7;
  --mash-red: #ef4444;
  --mash-red-soft: #fee2e2;
  --mash-radius: 14px;
  --mash-radius-sm: 9px;
  --mash-shadow: 0 1px 2px rgba(31, 19, 64, 0.05);
  --mash-shadow-lg: 0 14px 30px rgba(31, 19, 64, 0.12);
  color: var(--mash-text);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mash-root *,
.mash-root *::before,
.mash-root *::after { box-sizing: border-box; }

/* ---------- Stripe activation banner (même flux que multishop-analytics) ---------- */
.mash-banner {
  display: flex; gap: 16px; align-items: center;
  background: linear-gradient(135deg, #f3e8ff, #ede9fe);
  border: 1px solid rgba(109, 40, 217, 0.18);
  border-radius: var(--mash-radius);
  padding: 18px 22px; box-shadow: var(--mash-shadow); margin-bottom: 20px;
}
.mash-banner[hidden] { display: none; }
.mash-banner-icon {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px;
  background: var(--mash-purple); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.mash-banner-icon svg { width: 24px; height: 24px; }
.mash-banner-body { flex: 1; min-width: 0; }
.mash-banner-title { margin: 0 0 3px; font-size: 16px; font-weight: 800; font-family: "Space Grotesk", sans-serif; color: var(--mash-text); }
.mash-banner-text { margin: 0; font-size: 13px; color: var(--mash-muted); }
.mash-banner-cta { flex-shrink: 0; }
.mash-banner-cta svg { width: 16px; height: 16px; }

/* ---------- Header ---------- */
.mash-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.mash-title {
  margin: 0; font-family: "Space Grotesk", sans-serif; font-weight: 800;
  font-size: 24px; letter-spacing: -0.5px;
}
.mash-subtitle { margin: 4px 0 0; font-size: 13px; font-weight: 500; color: var(--mash-purple); }
.mash-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.mash-scope {
  display: inline-flex; padding: 3px; gap: 2px; background: #fff;
  border: 1px solid var(--mash-border); border-radius: 10px; box-shadow: var(--mash-shadow);
}
.mash-scope-btn {
  border: none; background: transparent; cursor: pointer; color: var(--mash-text);
  font-weight: 700; font-size: 12.5px; padding: 8px 14px; border-radius: 7px;
  display: inline-flex; align-items: center; gap: 6px;
}
.mash-scope-btn.is-active { background: var(--mash-text); color: #fff; }
.mash-scope-count {
  font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: var(--mash-green); color: #fff;
}
.mash-scope-btn.is-active .mash-scope-count { background: rgba(255, 255, 255, 0.22); }

/* ---------- Buttons ---------- */
.mash-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 13px;
  padding: 10px 16px; text-decoration: none; line-height: 1; transition: filter .15s, transform .15s;
}
.mash-btn:hover { filter: brightness(1.05); }
.mash-btn--dark { background: var(--mash-text); color: #fff; }
.mash-btn--primary { background: var(--mash-purple); color: #fff; }
.mash-btn--ghost { background: var(--mash-soft); color: var(--mash-text); border: 1px solid var(--mash-border); }
.mash-btn[disabled] { opacity: .6; cursor: default; }

/* ---------- Stats ---------- */
.mash-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px;
}
.mash-stat {
  background: var(--mash-surface); border-radius: var(--mash-radius); padding: 18px 20px;
  box-shadow: var(--mash-shadow);
}
.mash-stat-label {
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--mash-muted); margin-bottom: 8px;
}
.mash-stat-value {
  font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 28px;
  letter-spacing: -0.5px;
}
.mash-stat-value--accent { color: var(--mash-purple); }

/* ---------- Two-column ---------- */
.mash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.mash-card {
  background: var(--mash-surface); border-radius: var(--mash-radius);
  box-shadow: var(--mash-shadow); overflow: hidden;
}

/* ---------- Toolbar ---------- */
.mash-toolbar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--mash-border);
}
.mash-search { position: relative; flex: 1 1 220px; max-width: 320px; display: block; }
.mash-search svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--mash-muted); pointer-events: none;
}
.mash-search input {
  width: 100%; padding: 9px 12px 9px 34px; border-radius: 8px;
  border: 1px solid var(--mash-border); background: var(--mash-soft);
  font-size: 13px; font-family: inherit; color: var(--mash-text);
}
.mash-search input:focus { outline: none; border-color: var(--mash-purple); background: #fff; }
.mash-select {
  padding: 9px 12px; border-radius: 8px; border: 1px solid var(--mash-border);
  background: var(--mash-soft); font-size: 12.5px; font-family: inherit; color: var(--mash-text); cursor: pointer;
}
.mash-view { display: inline-flex; gap: 2px; padding: 3px; background: var(--mash-soft); border: 1px solid var(--mash-border); border-radius: 8px; margin-left: auto; }
.mash-view-btn {
  border: none; background: transparent; cursor: pointer; color: var(--mash-muted);
  padding: 6px 9px; border-radius: 6px; display: inline-flex; align-items: center;
}
.mash-view-btn svg { width: 16px; height: 16px; }
.mash-view-btn.is-active { background: #fff; color: var(--mash-text); box-shadow: var(--mash-shadow); }

/* ---------- Category chips ---------- */
.mash-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--mash-border); }
.mash-chip {
  border: 1px solid var(--mash-border); background: var(--mash-soft); color: var(--mash-text);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 12px;
}
.mash-chip.is-active { background: var(--mash-text); border-color: var(--mash-text); color: #fff; }

/* ---------- States ---------- */
.mash-loading { padding: 56px 0; display: flex; justify-content: center; }
.mash-loading[hidden] { display: none; }
.mash-spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--mash-border); border-top-color: var(--mash-purple);
  animation: mash-spin .8s linear infinite;
}
.mash-empty, .mash-error { padding: 48px 24px; text-align: center; color: var(--mash-muted); }
.mash-empty h3 { margin: 0 0 6px; color: var(--mash-text); font-size: 16px; font-family: "Space Grotesk", sans-serif; }
.mash-empty p, .mash-error p { margin: 0; font-size: 13.5px; }

/* ---------- Products: grid ---------- */
.mash-products { padding: 20px; }
.mash-products[hidden] { display: none !important; }
.mash-products--grid[data-view="grid"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }

.mash-pcard {
  background: var(--mash-surface); border: 1px solid var(--mash-border); border-radius: var(--mash-radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s;
}
.mash-pcard:hover { transform: translateY(-2px); box-shadow: var(--mash-shadow-lg); }
.mash-pcard-media {
  position: relative; aspect-ratio: 4 / 3; display: flex; align-items: flex-end;
  background-size: cover; background-position: center;
}
.mash-pcard-initials {
  font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 54px;
  color: rgba(255, 255, 255, 0.65); letter-spacing: -3px; line-height: 1; padding: 14px;
}
.mash-pcard-badge {
  position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 100px;
  background: rgba(0, 0, 0, 0.32); color: #fff; font-family: "Space Grotesk", sans-serif;
  font-weight: 700; font-size: 10px; letter-spacing: .3px; backdrop-filter: blur(4px);
}
.mash-pcard-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mash-pcard-creator { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mash-pcard-avatar {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 10px;
}
.mash-pcard-creator-name { font-size: 12px; font-weight: 600; color: var(--mash-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mash-pcard-verified { color: var(--mash-purple); flex-shrink: 0; display: inline-flex; }
.mash-pcard-verified svg { width: 13px; height: 13px; }
.mash-pcard-name {
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 14px;
  letter-spacing: -0.2px; line-height: 1.3; color: var(--mash-text); min-height: 36px;
}
.mash-pcard-foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-top: auto; padding-top: 8px; border-top: 1px solid var(--mash-border);
}
.mash-pcard-price { font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 16px; }
.mash-pcard-stock { font-size: 10.5px; font-weight: 600; color: var(--mash-muted); margin-top: 1px; }
.mash-pcard-comm { text-align: right; }
.mash-pcard-comm-value { font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 14px; color: var(--mash-purple); }
.mash-pcard-comm-label { font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--mash-muted); }
.mash-pcard-btn {
  margin: 4px 16px 16px; padding: 9px 12px; border: none; border-radius: 8px; cursor: pointer;
  font-weight: 700; font-size: 12.5px; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--mash-text); color: #fff;
}
.mash-pcard-btn:hover { filter: brightness(1.08); }
.mash-pcard-btn.is-requested { background: var(--mash-soft); color: var(--mash-muted); cursor: default; border: 1px solid var(--mash-border); }
.mash-pcard-btn.is-carried { background: var(--mash-green-soft); color: #166534; text-decoration: none; }

/* ---------- Products: list ---------- */
.mash-products[data-view="list"] { display: flex; flex-direction: column; gap: 8px; }
.mash-products[data-view="list"] .mash-pcard { display: none; }
.mash-prow {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  background: var(--mash-soft); border: 1px solid var(--mash-border); border-radius: 10px;
}
.mash-products[data-view="grid"] .mash-prow { display: none; }
.mash-prow-thumb {
  width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0; color: #fff;
  display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center;
  font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 14px;
}
.mash-prow-info { flex: 1; min-width: 0; }
.mash-prow-name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mash-prow-meta { font-size: 11.5px; color: var(--mash-muted); margin-top: 2px; }
.mash-prow-price { font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 14px; min-width: 60px; text-align: right; }
.mash-prow-comm { font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 13px; color: var(--mash-purple); min-width: 48px; text-align: right; }
.mash-prow-btn {
  border: none; border-radius: 7px; padding: 7px 12px; cursor: pointer; font-weight: 700; font-size: 11.5px;
  background: var(--mash-text); color: #fff; white-space: nowrap; flex-shrink: 0;
}
.mash-prow-btn.is-requested { background: var(--mash-soft); color: var(--mash-muted); cursor: default; border: 1px solid var(--mash-border); }
.mash-prow-btn.is-carried { background: var(--mash-green-soft); color: #166534; text-decoration: none; display: inline-flex; align-items: center; }

.mash-foot { padding: 14px 20px; border-top: 1px solid var(--mash-border); font-size: 12px; color: var(--mash-muted); }

/* ---------- Sidebar ---------- */
.mash-side { display: flex; flex-direction: column; gap: 18px; }
.mash-suggest { padding: 20px; }
.mash-side-title { margin: 0 0 12px; font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 14px; }
.mash-suggest-list { display: flex; flex-direction: column; gap: 8px; }
.mash-srow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--mash-soft); border: 1px solid var(--mash-border); border-radius: 10px; }
.mash-srow-avatar { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; color: #fff; display: flex; align-items: center; justify-content: center; font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 12px; }
.mash-srow-info { flex: 1; min-width: 0; }
.mash-srow-name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mash-srow-meta { font-size: 11.5px; color: var(--mash-muted); margin-top: 1px; }
.mash-suggest-empty { font-size: 12.5px; color: var(--mash-muted); }

.mash-how { padding: 20px; background: linear-gradient(135deg, var(--mash-text), var(--mash-purple-dk)); color: #fff; }
.mash-how-title { margin: 0 0 12px; font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 14px; }
.mash-how-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mash-how-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; opacity: .92; }
.mash-how-num { width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.16); display: flex; align-items: center; justify-content: center; font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 10px; margin-top: 1px; }

/* ---------- Modal ---------- */
/* NB landing : z-index remonté au-dessus de l'overlay .zh-mash-overlay (1500)
   — la valeur admin (1000) rendrait la modale invisible sous le popup. */
.mash-modal { position: fixed; inset: 0; z-index: 1600; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mash-modal[hidden] { display: none; }
.mash-modal-backdrop { position: absolute; inset: 0; background: rgba(20, 10, 50, 0.45); backdrop-filter: blur(2px); }
.mash-modal-card { position: relative; width: 100%; max-width: 440px; background: #fff; border-radius: 16px; padding: 24px; box-shadow: var(--mash-shadow-lg); max-height: 90vh; overflow: auto; }
.mash-modal-x { position: absolute; top: 14px; right: 16px; border: none; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--mash-muted); }
.mash-modal-title { margin: 0 0 14px; font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 18px; }
.mash-modal-product { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--mash-soft); border-radius: 10px; margin-bottom: 16px; }
.mash-modal-product .mash-mp-thumb { width: 42px; height: 42px; border-radius: 9px; flex-shrink: 0; color: #fff; display: flex; align-items: center; justify-content: center; font-family: "Space Grotesk", sans-serif; font-weight: 800; background-size: cover; background-position: center; }
.mash-modal-product .mash-mp-name { font-weight: 700; font-size: 13.5px; }
.mash-modal-product .mash-mp-creator { font-size: 12px; color: var(--mash-muted); }
.mash-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; font-size: 12.5px; font-weight: 600; color: var(--mash-text); }
.mash-field input, .mash-field select, .mash-field textarea {
  font-family: inherit; font-size: 13px; padding: 9px 11px; border-radius: 8px;
  border: 1px solid var(--mash-border); background: var(--mash-soft); color: var(--mash-text); font-weight: 500;
}
.mash-field input:focus, .mash-field select:focus, .mash-field textarea:focus { outline: none; border-color: var(--mash-purple); background: #fff; }
.mash-field textarea { resize: vertical; }
.mash-field-note { margin: -8px 0 14px; font-size: 11.5px; color: var(--mash-muted); }
.mash-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* ---------- Stripe Connect modal ---------- */
.mash-stripe-modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.mash-stripe-modal-head .mash-modal-title { margin: 0; }
.mash-stripe-modal-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px;
  background: rgba(109, 40, 217, 0.12); color: var(--mash-purple);
  display: flex; align-items: center; justify-content: center;
}
.mash-stripe-modal-icon svg { width: 20px; height: 20px; }
.mash-modal-text { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; color: var(--mash-muted); }
.mash-modal-info {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 10px; margin-bottom: 18px;
  background: var(--mash-soft); border: 1px solid var(--mash-border);
  font-size: 12.5px; color: var(--mash-text);
}
.mash-modal-info svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--mash-purple); }
.mash-btn-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff;
  display: inline-block; animation: mash-spin .7s linear infinite;
}
.mash-btn-spinner[hidden] { display: none; }

/* Keyframes uniques (dédupliqué : déclaré 2x dans la source admin). */
@keyframes mash-spin { to { transform: rotate(360deg); } }

/* ---------- Toast ---------- */
/* NB landing : z-index remonté au-dessus de l'overlay et des modales. */
.mash-toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 1700; max-width: 360px;
  padding: 12px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; color: #fff;
  background: var(--mash-text); box-shadow: var(--mash-shadow-lg);
}
.mash-toast--ok { background: var(--mash-green); }
.mash-toast--err { background: var(--mash-red); }

/* ==========================================================================
   Responsive (breakpoints admin conservés)
   ========================================================================== */
@media (max-width: 1024px) {
  .mash-grid { grid-template-columns: 1fr; }
  .mash-side { flex-direction: row; flex-wrap: wrap; }
  .mash-side > .mash-card { flex: 1 1 280px; }
  .mash-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .mash-banner { flex-direction: column; align-items: flex-start; }
  .mash-banner-cta { width: 100%; justify-content: center; }
  .mash-header { flex-direction: column; align-items: stretch; }
  .mash-header-actions { width: 100%; }
  .mash-scope { flex: 1; }
  .mash-scope-btn { flex: 1; justify-content: center; }
  .mash-btn--dark { width: 100%; }
  .mash-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .mash-stat { padding: 14px 16px; }
  .mash-stat-value { font-size: 23px; }
  .mash-toolbar { gap: 10px; }
  .mash-search { max-width: none; flex: 1 1 100%; }
  .mash-view { margin-left: 0; }
  .mash-side { flex-direction: column; }
  .mash-products--grid[data-view="grid"] { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (max-width: 460px) {
  .mash-products--grid[data-view="grid"] { grid-template-columns: 1fr; }
  .mash-stats { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Responsive overlay landing (plein écran mobile)
   ========================================================================== */
@media (max-width: 640px) {
  .zh-mash-overlay { padding: 0; }
  .zh-mash-card {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    padding: 16px;
  }
  .zh-mash-close { margin: -4px -4px 0 0; }

  /* Grille produits : 1 colonne (la sidebar passe déjà sous le catalogue
     via le breakpoint 1024 admin, .mash-grid en 1 colonne). */
  .mash-root .mash-products--grid[data-view="grid"] { grid-template-columns: 1fr; }

  /* Boutons d'action pleine largeur */
  .mash-root .mash-btn,
  .mash-root .mash-banner-cta { width: 100%; }
  .mash-root .mash-modal-actions { flex-direction: column; }
  .mash-root .mash-modal-actions .mash-btn { width: 100%; }

  /* Zones tactiles >= 44px */
  .mash-root .mash-btn { min-height: 44px; }
  .mash-root .mash-pcard-btn,
  .mash-root .mash-prow-btn { min-height: 44px; }
  .mash-root .mash-chip { min-height: 44px; padding: 10px 16px; display: inline-flex; align-items: center; }
  .mash-root .mash-scope-btn { min-height: 44px; }
  .mash-root .mash-view-btn { min-height: 44px; min-width: 44px; justify-content: center; }
  .mash-root .mash-search input,
  .mash-root .mash-select,
  .mash-root .mash-field input,
  .mash-root .mash-field select { min-height: 44px; }
  .mash-root .mash-modal-x { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; top: 6px; right: 6px; }

  /* Scope tabs pleine largeur */
  .mash-root .mash-scope { width: 100%; display: flex; }
}
