/* Marchandises MMA (2026-10-22) : accueil (grille dense), fiche (galerie 3:4, encadré de sélection, guide des tailles),
   maquette SVG de repli (classes mk-*). Par-dessus mma-theme.css + catalogue.css ; accent = --chroma de la surface. */

.mx-preview { margin: 0 0 1rem; background: color-mix(in oklab, #f2b20c 18%, var(--ink-2)); border-color: color-mix(in oklab, #f2b20c 50%, var(--line)); }
.mx-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0 0 1rem; font-size: 0.9rem; color: var(--chrome-2); }
.mx-crumbs a { color: var(--chrome-2); display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
.mx-crumbs a:hover { color: var(--chrome); }
.mx-crumbs [aria-current] { color: var(--chrome); }

/* ---------- accueil ---------- */
.mx-head { margin: 0 0 1.25rem; }
.mx-head h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0 0 0.4rem; }
.mx-head p { margin: 0; }
.mx-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (min-width: 600px) { .mx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
@media (min-width: 960px) { .mx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .mx-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.mx-card { min-width: 0; }
.mx-card-link {
  display: flex; flex-direction: column; gap: 0.35rem; height: 100%; padding: 0 0 0.75rem;
  color: var(--chrome); text-decoration: none; background: var(--ink-2); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; transition: border-color 160ms ease;
}
.mx-card-link:hover, .mx-card-link:focus-visible { border-color: var(--chroma); }
.mx-card-link:focus-visible { outline: 2px solid var(--chroma); outline-offset: 2px; }
.mx-card-img { display: block; aspect-ratio: 3 / 4; background: #16161b; }
.mx-card-img img, .mx-card-img svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.mx-card-img.is-mock, .mx-shot.is-mock, .mx-thumb.is-mock { background: linear-gradient(180deg, #f1f1f4, #e2e3e8); }
.mx-card-name {
  padding: 0 0.7rem; font-size: 0.95rem; line-height: 1.3; min-height: 2.6em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mx-card-price { padding: 0 0.7rem; font-family: var(--display); font-weight: 800; font-stretch: 115%; font-size: 1.35rem; line-height: 1.1; }
.mx-card-price.is-soon, .mx-price.is-soon, .mx-sticky-price.is-soon { font-family: var(--text); font-weight: 600; font-stretch: 100%; font-size: 1rem; color: var(--chrome-2); }
.mx-card-dots { display: flex; align-items: center; gap: 0.35rem; padding: 0 0.7rem; margin-top: auto; }
.mx-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px var(--chrome-3); }
.mx-more { font-size: 0.875rem; color: var(--chrome-2); }

/* ---------- fiche ---------- */
.mx-flash { margin: 0 0 1rem; }
.mx-flash a { color: inherit; }
.mx-pdp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (min-width: 900px) {
  .mx-pdp { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(1.5rem, 3vw, 3rem); }
  .mx-gallery { position: sticky; top: 5.5rem; }
}

/* galerie : vignettes à gauche (≥ 900 px), sous l'image (téléphone) */
.mx-gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
@media (min-width: 900px) {
  .mx-gallery { grid-template-columns: 76px minmax(0, 1fr); }
  .mx-thumbs { grid-column: 1; grid-row: 1; flex-direction: column; overflow: visible; }
  .mx-stage { grid-column: 2; grid-row: 1; }
}
.mx-stage { position: relative; width: 100%; max-width: calc(78vh * 0.75); margin: 0 auto; }
.mx-shot { margin: 0; position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: #16161b; border: 1px solid var(--line); }
.mx-shot[hidden] { display: none; }
.mx-shot img, .mx-shot svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.mx-zoom { display: block; width: 100%; height: 100%; cursor: zoom-in; position: relative; }
.mx-zoom:focus-visible { outline: 3px solid var(--chroma); outline-offset: -3px; }
.mx-zoom-ico {
  position: absolute; right: 0.6rem; bottom: 0.6rem; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(5, 5, 7, 0.7); color: var(--chrome);
}
.mx-view {
  position: absolute; left: 0.6rem; bottom: 0.6rem; padding: 0.3rem 0.7rem; border-radius: var(--pill);
  background: rgba(5, 5, 7, 0.72); color: var(--chrome); font-size: 0.875rem; pointer-events: none;
}
.mx-thumbs { display: flex; gap: 0.5rem; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.mx-thumbs[hidden], .mx-thumb[hidden] { display: none; }
.mx-thumb {
  flex: 0 0 auto; width: 64px; aspect-ratio: 3 / 4; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer;
  background: #16161b; border: 2px solid var(--line);
}
@media (min-width: 900px) { .mx-thumb { width: 72px; } }
.mx-thumb img, .mx-thumb svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.mx-thumb[aria-current="true"] { border-color: var(--chroma); }
.mx-thumb:focus-visible { outline: 2px solid var(--chroma); outline-offset: 2px; }

/* colonne d'achat */
.mx-buy { min-width: 0; }
.mx-name { font-size: clamp(1.5rem, 3vw, 2.2rem); font-style: normal; margin: 0 0 0.5rem; }
.mx-also { margin: -0.4rem 0 0.4rem; }
.mx-also a { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 44px; color: var(--chrome); text-decoration-color: var(--chroma); text-underline-offset: 3px; }
.mx-price { font-family: var(--display); font-weight: 800; font-stretch: 120%; font-size: clamp(2rem, 4.5vw, 2.6rem); line-height: 1; margin: 0 0 1rem; color: var(--chrome); }
.mx-price.is-soon { font-size: 1.4rem; margin-bottom: 0.75rem; }
.mx-soon { margin: 0 0 1rem; }
.mx-box { border: 1px solid color-mix(in oklab, var(--chroma) 55%, var(--line)); border-radius: 10px; padding: 1rem; background: var(--ink-2); display: grid; gap: 1rem; }
.mx-box fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.mx-box legend { float: left; padding: 0; margin: 0 0 0.6rem; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 0.35rem; }
.mx-box legend + *:not(.mx-guide-btn) { clear: both; }
.mx-sizes legend { margin-right: 0.5rem; }
.mx-guide-btn {
  float: right; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0 0.9rem;
  border-radius: var(--pill); border: 1px solid var(--line); background: var(--ink-3); color: var(--chrome); font: inherit; font-size: 0.9rem; cursor: pointer;
}
.mx-guide-btn[hidden] { display: none; }
.mx-guide-btn:hover { border-color: var(--chroma); }
.mx-guide-btn + .mx-sz-row { clear: both; }
.mx-sw-row, .mx-sz-row { display: flex; flex-wrap: wrap; gap: 0.5rem; clear: both; }
.mx-sw, .mx-sz { position: relative; cursor: pointer; }
.mx-sw input, .mx-sz input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.mx-sw-dot { display: block; width: 44px; height: 44px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 0 1px var(--chrome-3); }
.mx-sw input:checked + .mx-sw-dot { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 0 2px var(--ink-2), 0 0 0 4px var(--chroma); }
.mx-sw input:focus-visible + .mx-sw-dot { outline: 2px solid var(--chrome); outline-offset: 5px; }
.mx-sz > span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 56px; min-height: 44px; padding: 0 0.9rem;
  border: 1px solid var(--chrome-3); border-radius: var(--pill); font-weight: 700; font-size: 1rem; color: var(--chrome); background: var(--ink);
}
.mx-sz:hover > span { border-color: var(--chrome-2); }
.mx-sz input:checked + span { border-color: var(--chroma); background: color-mix(in oklab, var(--chroma) 22%, var(--ink)); box-shadow: 0 0 0 1px var(--chroma); }
.mx-sz input:focus-visible + span { outline: 2px solid var(--chrome); outline-offset: 2px; }
/* prix par taille (2026-10-23) : le prix sous le nom de la taille quand les tailles n'ont pas le même prix */
.mx-sz.has-price > span { flex-direction: column; min-height: 52px; padding: 0.3rem 0.8rem; line-height: 1.15; }
.mx-sz-p { display: block; font-weight: 600; font-size: 0.875rem; color: var(--chrome-2); white-space: nowrap; }
.mx-sz input:checked + span .mx-sz-p { color: var(--chrome); }
.mx-from { font-family: var(--text); font-weight: 600; font-stretch: 100%; font-size: 0.875rem; color: var(--chrome-2); }
.mx-price .mx-from { display: block; font-size: 1rem; margin-bottom: 0.2rem; }
.mx-sz.is-out { cursor: not-allowed; }
.mx-sz.is-out > span {
  color: var(--chrome-2); border-style: dashed; text-decoration: line-through; text-decoration-thickness: 2px;
  background: linear-gradient(to top right, transparent calc(50% - 1px), var(--chrome-3) 50%, transparent calc(50% + 1px)) var(--ink);
}
.mx-err { margin: 0.6rem 0 0; color: var(--err); font-weight: 600; }
.mx-err[hidden] { display: none; }
.mx-err::before { content: "! "; }
/* bulle des mesures de la taille choisie (comme Temu) */
.mx-dims { display: none; position: relative; margin: 0.8rem 0 0; padding: 0.75rem 0.9rem; border-radius: 8px; background: var(--ink-3); border: 1px solid var(--line); }
.mx-dims.is-on { display: block; }
.mx-dims::before {
  content: ""; position: absolute; top: -7px; left: 1.4rem; width: 12px; height: 12px; transform: rotate(45deg);
  background: var(--ink-3); border-left: 1px solid var(--line); border-top: 1px solid var(--line);
}
.mx-dims-t { margin: 0 0 0.4rem; font-weight: 700; }
.mx-dims dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.4rem 1rem; }
.mx-dims dt { font-size: 0.875rem; color: var(--chrome-2); }
.mx-dims dd { margin: 0; font-weight: 600; }
.mx-avail { margin: 0.6rem 0 0; font-size: 0.95rem; color: var(--chrome-2); }
.mx-avail:empty { display: none; }
.mx-avail.is-stock { color: var(--ok); }
.mx-card-inv { display: block; padding: 0.3rem 0.7rem 0; font-size: 0.875rem; color: var(--chrome-2); }   /* inventaire sous l'article (2026-10-23) */
.mx-card-inv.is-stock { color: var(--ok); }

.mx-qty { display: flex; align-items: center; gap: 0.8rem; }
.mx-qty label { font-weight: 600; }
.mx-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--chrome-3); border-radius: var(--pill); overflow: hidden; }
.mx-stepper button { width: 44px; min-height: 44px; border: 0; background: var(--ink-3); color: var(--chrome); font-size: 1.3rem; cursor: pointer; }
.mx-stepper button:hover { background: color-mix(in oklab, var(--chroma) 20%, var(--ink-3)); }
.mx-stepper button:focus-visible { outline: 2px solid var(--chroma); outline-offset: -2px; }
.mx-stepper input { width: 3.2rem; border: 0; background: var(--ink); color: var(--chrome); text-align: center; font: inherit; font-weight: 700; font-size: 1rem; -moz-appearance: textfield; appearance: textfield; }
.mx-stepper input::-webkit-inner-spin-button, .mx-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.mx-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1rem 0 0; }
.mx-btn { justify-content: center; text-align: center; min-height: 52px; font-size: 1.05rem; font-stretch: 100%; padding: 0.7rem 0.9rem; }
.mx-actions .btn-ghost { border-color: var(--chroma); border-width: 2px; }
@media (max-width: 380px) { .mx-actions { grid-template-columns: 1fr; } }
.mx-added { margin: 0.75rem 0 0; font-weight: 600; }
.mx-added[hidden] { display: none; }
.mx-added.ok { color: var(--ok); }
.mx-added.err { color: var(--err); }
.mx-added a { color: var(--chrome); }

.mx-assure { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.mx-assure li { display: flex; gap: 0.6rem; align-items: flex-start; }
.mx-assure .mx-ico { flex: 0 0 auto; color: var(--chroma); margin-top: 0.1rem; }
.mx-price-note { margin: 1rem 0 0; line-height: 1.5; }   /* avis prix fournisseur sous « Ramassage » (2026-10-23) */
.mx-ico { vertical-align: middle; }

.mx-details, .mx-desc { margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.mx-details h2, .mx-desc h2 { font-size: 1.25rem; font-stretch: 110%; margin: 0 0 0.8rem; }
.mx-dgrid { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.5rem; }
.mx-dgrid > div { padding: 0.7rem 0.8rem; border-radius: 8px; background: var(--ink-2); border: 1px solid var(--line); text-align: center; }
.mx-dgrid dt { font-size: 0.875rem; color: var(--chrome-2); }
.mx-dgrid dd { margin: 0.15rem 0 0; font-weight: 600; }
.mx-guide-inline { margin: 1.25rem 0 0; border: 1px solid var(--line); border-radius: 10px; padding: 0 1rem; }
.mx-guide-inline summary { display: flex; align-items: center; gap: 0.5rem; min-height: 48px; cursor: pointer; font-weight: 600; }
.mx-guide-inline summary .muted { margin-left: auto; font-weight: 400; font-size: 0.9rem; }
.mx-guide-inline[open] { padding-bottom: 1rem; }
.mx-note { font-size: 0.9rem; margin: 0.6rem 0 0; }

/* tableaux de tailles : cm ou po */
.mx-table-wrap { overflow-x: auto; }
.mx-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.mx-table th, .mx-table td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.mx-table thead th { color: var(--chrome-2); font-weight: 600; background: var(--ink-3); }
.mx-table tbody th { font-weight: 700; }
.mx-table-wrap[data-unit="cm"] .u-po, .mx-table-wrap[data-unit="po"] .u-cm { display: none; }
.mx-guide-inline .mx-table-wrap .u-po { display: inline; margin-left: 0.4rem; color: var(--chrome-2); }
.mx-guide-inline .mx-table-wrap .u-po::before { content: "/ "; }

/* barre d'achat collante (téléphone, avec JavaScript : merch.js la cache quand les boutons de la fiche sont à l'écran) */
.mx-sticky { display: none; }
@media (max-width: 899px) {
  .mx-js .mx-sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.6rem 16px calc(0.6rem + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--ink) 94%, transparent);
    border-top: 1px solid var(--line); backdrop-filter: blur(8px); transition: transform 180ms ease;
  }
  .mx-sticky.is-away { transform: translateY(110%); }
  .mx-sticky .mx-btn { flex: 0 1 auto; min-height: 48px; }
  .mx-sticky-price { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 115%; font-size: 1.4rem; }
  .mx-js body:has(.mx-sticky) .cat-footer { padding-bottom: 5.5rem; }
}
@media (prefers-reduced-motion: reduce) { .mx-sticky { transition: none; } }

/* fenêtres (guide, zoom) */
.mx-dlg {
  width: min(42rem, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 1rem 1.1rem 1.25rem; border: 1px solid var(--line);
  border-radius: 12px; background: var(--ink-2); color: var(--chrome);
}
.mx-dlg::backdrop { background: rgba(0, 0, 0, 0.72); }
.mx-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 0.75rem; }
.mx-dlg-head h2 { font-size: 1.35rem; margin: 0; }
.mx-x { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--line); background: var(--ink-3); color: var(--chrome); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.mx-x:hover { border-color: var(--chroma); }
.mx-unit { display: inline-flex; border: 1px solid var(--chrome-3); border-radius: var(--pill); overflow: hidden; margin: 0 0 0.75rem; }
.mx-unit button { min-width: 56px; min-height: 44px; border: 0; background: transparent; color: var(--chrome-2); font: inherit; font-weight: 700; cursor: pointer; }
.mx-unit button[aria-pressed="true"] { background: var(--chroma); color: var(--ink); }
.mx-howto { margin: 1rem 0 0; display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 1rem; align-items: center; }
@media (max-width: 520px) { .mx-howto { grid-template-columns: minmax(0, 1fr); } .mx-howto-svg { max-width: 220px; margin: 0 auto; } }
.mx-howto-svg { width: 100%; height: auto; display: block; }
.mx-howto figcaption p { margin: 0 0 0.5rem; }
.hw-g { fill: var(--ink-3); stroke: var(--chrome-3); stroke-width: 1.5; }
.hw-m { fill: none; stroke: var(--chroma); stroke-width: 2.5; stroke-dasharray: 6 4; }
.hw-a { fill: none; stroke: var(--chroma); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hw-t { fill: var(--chrome); font: 600 14px var(--text); }

.mx-zoomdlg { width: min(56rem, calc(100vw - 16px)); padding: 0.5rem; position: fixed; }
.mx-zoomdlg img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 8px; }
.mx-zoomdlg > .mx-x { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 1; }
.mx-zoom-nav { display: flex; justify-content: center; gap: 1rem; padding: 0.5rem 0 0; }
.mx-zoom-nav[hidden] { display: none; }
.mx-zoom-nav button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--ink-3); color: var(--chrome); font-size: 1.6rem; cursor: pointer; }

/* ---------- maquette SVG de repli (lib/merch/mockup.php) ---------- */
.mk-svg { --g: #111114; }
.mk-fill { fill: var(--g); }
.mk-edge { fill: none; stroke: rgba(0, 0, 0, 0.35); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.mk-sh { opacity: 1; }
.mk-hi { opacity: 1; }
.mk-grain { opacity: 1; }
.mk-seam { fill: none; stroke: #000; stroke-opacity: 0.28; stroke-width: 1.5; }
.mk-stitch { fill: none; stroke: #000; stroke-opacity: 0.25; stroke-width: 1.5; stroke-dasharray: 4 4; }
.mk-inside { fill: #000; fill-opacity: 0.45; }
.mk-rib { fill: none; stroke: var(--g); }
.mk-rib-in { fill: none; stroke: #000; stroke-opacity: 0.25; stroke-width: 4; }
.mk-rib-sh { fill: none; stroke: #000; stroke-opacity: 0.25; stroke-width: 1.5; }
.mk-band, .mk-hood, .mk-pocket, .mk-brim { fill: #000; fill-opacity: 0.1; }
.mk-hood { fill-opacity: 0.06; }
.mk-brim { fill-opacity: 0.16; }
.mk-ribs { fill: none; stroke: #000; stroke-opacity: 0.18; stroke-width: 1; }
.mk-opening { fill: none; stroke: #000; stroke-opacity: 0.45; stroke-width: 2.5; }
.mk-cord { fill: none; stroke: #e9e9ec; stroke-width: 3; stroke-linecap: round; }
.mk-aglet { fill: none; stroke: #9a9ba3; stroke-width: 4; stroke-linecap: round; }
.mk-eyelet { fill: #c9cad0; stroke: rgba(0, 0, 0, 0.4); stroke-width: 1; }
.mk-buckle { fill: #b8b9c0; stroke: rgba(0, 0, 0, 0.4); stroke-width: 1; }
.mk-plate { display: none; fill: #15151b; }
/* vêtement foncé : col côtelé un peu plus clair ; vêtement clair : ombres adoucies, pas de reflet, pastille sombre sous le logo */
[data-tone="dark"] .mk-rib { stroke: color-mix(in srgb, var(--g) 80%, #fff); }
[data-tone="light"] .mk-rib { stroke: color-mix(in srgb, var(--g) 92%, #000); }
[data-tone="light"] .mk-sh { opacity: 0.45; }
[data-tone="light"] .mk-hi { opacity: 0; }
[data-tone="light"] .mk-inside { fill-opacity: 0.18; }
[data-tone="light"] .mk-plate { display: inline; }

/* Vignettes des autres angles (dos…) dans le coin de la photo de la carte (2026-10-22) */
.mx-card-img { position: relative; }
.mx-card-insets { position: absolute; right: 0.4rem; bottom: 0.4rem; display: flex; flex-direction: column; gap: 0.3rem; width: 34%; max-width: 6.5rem; pointer-events: none; }
.mx-card-inset { display: block; aspect-ratio: 3 / 4; border-radius: 0.45rem; overflow: hidden; background: #16161b;
  border: 2px solid color-mix(in oklab, #fff 85%, transparent); box-shadow: 0 0.2rem 0.7rem rgba(0, 0, 0, 0.55); }
.mx-card-inset img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.75); transform-origin: 50% 42%; }   /* cadré sur le vêtement : le logo du dos se lit */
.mx-card-link:hover .mx-card-inset, .mx-card-link:focus-visible .mx-card-inset { border-color: var(--chroma); }

/* Format identique pour toutes les photos (propriétaire, 2026-10-22 : « format pas identique, les photos m'énervent ») :
   cadre carré, même fond clair, objet entier centré avec la même marge, sur les cartes, la galerie et les vignettes. */
.mx-card-img, .mx-shot, .mx-thumb, .mx-card-inset { aspect-ratio: 1 / 1; background: #f2f2f4; }
.mx-card-img img, .mx-shot img { object-fit: contain; padding: 6%; box-sizing: border-box; }
.mx-card-inset img { object-fit: contain; transform: none; padding: 4%; box-sizing: border-box; }
.mx-thumb img { object-fit: contain; padding: 6%; box-sizing: border-box; }
/* l'image remplit le carré sans l'agrandir (sinon la hauteur propre de l'image l'emporte sur aspect-ratio) */
.mx-card-img, .mx-shot { position: relative; overflow: hidden; min-height: 0; }
.mx-card-img > img, .mx-card-img > svg, .mx-shot > img, .mx-shot > svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- filtres de l'accueil (2026-10-23) : genre + catégorie, liens réels ; téléphone = rangées qui glissent ---------- */
.mx-filters { display: grid; gap: 0.6rem; margin: 0 0 0.75rem; }
.mx-frow { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.mx-flabel { flex: none; min-width: 5.5rem; font-size: 0.875rem; font-weight: 600; color: var(--chrome-2); text-transform: uppercase; letter-spacing: 0.04em; }
.mx-fpills { list-style: none; margin: 0; padding: 2px; display: flex; flex-wrap: wrap; gap: 0.45rem; min-width: 0; }
.mx-fpill {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0 0.95rem; white-space: nowrap;
  border: 1px solid var(--chrome-3); border-radius: var(--pill); background: var(--ink); color: var(--chrome);
  font-size: 0.95rem; font-weight: 600; text-decoration: none; transition: border-color 160ms ease, background-color 160ms ease;
}
.mx-fpill:hover { border-color: var(--chrome-2); }
.mx-fpill:focus-visible { outline: 2px solid var(--chrome); outline-offset: 2px; }
.mx-fpill[aria-current="page"] { border-color: var(--chroma); background: color-mix(in oklab, var(--chroma) 22%, var(--ink)); box-shadow: 0 0 0 1px var(--chroma); }
.mx-fpill-n { font-size: 0.875rem; font-weight: 600; color: var(--chrome-2); font-variant-numeric: tabular-nums; }
.mx-fpill[aria-current="page"] .mx-fpill-n { color: var(--chrome); }
.mx-count { margin: 0 0 1rem; font-size: 0.95rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
.mx-reset { display: inline-flex; align-items: center; min-height: 44px; color: var(--chrome); text-decoration-color: var(--chroma); text-underline-offset: 3px; }
.mx-empty a { color: inherit; display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 720px) {
  .mx-frow { flex-direction: column; align-items: stretch; gap: 0.3rem; }
  .mx-flabel { min-width: 0; }
  /* une rangée qui glisse sur le côté, la dernière puce s'estompe au bord : il y en a d'autres */
  .mx-fpills {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; padding: 2px 28px 2px 2px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .mx-fpills::-webkit-scrollbar { display: none; }
  .mx-fpills li { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .mx-fpill { transition: none; } }

/* ---------- sections par catégorie de l'accueil (2026-10-24) : titre h2, nombre, « Voir tout » ; l'en-tête collant ne cache pas le titre ---------- */
.mx-sec { margin: 0 0 2.25rem; scroll-margin-top: 7.5rem; }   /* en-tête collant : ~105 px sur téléphone (2 rangées) */
.mx-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; margin: 0 0 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.mx-sec-head h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-stretch: 110%; margin: 0; }
.mx-sec-head h2:focus { outline: none; }
.mx-sec-head h2:focus-visible { outline: 2px solid var(--chrome); outline-offset: 2px; }
.mx-sec-n { font-size: 0.875rem; color: var(--chrome-2); font-variant-numeric: tabular-nums; }
.mx-sec-all { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; font-size: 0.95rem; color: var(--chrome); text-decoration-color: var(--chroma); text-underline-offset: 3px; }
.mx-sec-all:focus-visible { outline: 2px solid var(--chrome); outline-offset: 2px; }
