/* ═══════════════════════════════════════════════════════════════════════
   matos-desktop.css — desktop chrome + density overrides.

   Aligned to Camp v2 Style Guide §19 breakpoints:
     - tablet:  640-959px — sidebar visible, no dense layout
     - desktop: ≥ 960px    — dense table, 2-col fiche, 4-col stats

   Two clusters of rules live in this file:
     1. Top-level `.d-*` classes (rendered by the desktop branch of the
        SPA — JS gates on matchMedia('(min-width: 960px)')). Rules are
        unconditional so the cascade attaches them whenever the JS path
        decides to emit those class names.
     2. `.sb-*` matos-specific sidebar polish — sidebar shows from
        640px up, so these polish styles are always-on with no media
        gate (they hurt nothing when the sidebar is hidden under 640px).
     3. `@media (min-width: 640px)` — nav-swap rules: hide mobile
        bottom-bar, position install-banner top-right.
     4. `@media (min-width: 960px)` — density overrides: 2-col fiche,
        4-col stats, sticky bulk bar, `.m-co-grid`, `.m-detail` grid.

   Tokens come from matos-shared.css; no :root block here.
   ─────────────────────────────────────────────────────────────────────── */

/* ── Desktop app shell (rendered by JS when matchMedia ≥ 960px) ──────── */
.d-app {
  position: fixed; inset: 0;
  display: grid;
  grid-template-columns: var(--sb-w) 1fr;
  background: var(--wh);
  color: var(--bk);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.d-app *, .d-app *::before, .d-app *::after { box-sizing: border-box; }
.d-app h1, .d-app h2, .d-app h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
.d-app button { font-family: var(--sans); cursor: pointer; border: none; background: none; color: inherit; }
.d-app .mono { font-family: var(--mono); }

/* ── Desktop sidebar (dark, .sb-*) ────────────────────────────────────── */
.d-sidebar { background: var(--bk); color: var(--g3); display: flex; flex-direction: column; padding: 16px 12px; border-right: 1px solid var(--bk3); min-height: 0; }
.d-brand { display: flex; align-items: center; gap: 9px; padding: 4px 6px 16px; border-bottom: 1px solid var(--bk3); margin-bottom: 12px; }
.d-launcher { width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0; display: grid; place-items: center; background: var(--bk2); border: 1px solid var(--bk3); }
.d-launcher:hover { background: var(--bk3); }
.d-launcher .dots { display: grid; grid-template-columns: repeat(3, 3px); grid-template-rows: repeat(3, 3px); gap: 2.5px; }
.d-launcher .dots i { width: 3px; height: 3px; border-radius: 50%; background: var(--g3); }
.d-brand .tile { width: 30px; height: 30px; border-radius: 7px; background: var(--y); color: var(--bk); display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.d-brand .nm { color: var(--white); font-family: var(--serif); font-size: 17px; line-height: 1; }
.d-brand .sub { color: var(--g4); font-size: 10.5px; letter-spacing: 0.04em; margin-top: 3px; }
.d-create { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--y); color: var(--bk); font-weight: 700; font-size: 13px; border-radius: var(--radius-sm); padding: 10px; margin-bottom: 12px; }
.d-create:active { transform: scale(0.99); }
.d-nav { display: flex; flex-direction: column; gap: 1px; flex: 1; overflow-y: auto; }
.d-nav-grp { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--g4); padding: 14px 10px 6px; font-weight: 700; }
.d-nav-item { display: flex; align-items: center; gap: 11px; color: var(--g3); font-size: 13.5px; font-weight: 500; padding: 9px 11px; border-radius: 7px; border-left: 2px solid transparent; text-align: left; width: 100%; }
.d-nav-item .ic { font-size: 16px; width: 20px; text-align: center; }
.d-nav-item:hover { background: var(--bk2); color: var(--white); }
.d-nav-item.on { background: rgba(255,206,0,0.12); color: var(--y); border-left-color: var(--y); font-weight: 600; }
.d-nav-item .count { margin-left: auto; font-size: 11px; color: var(--g4); font-weight: 600; }
.d-nav-item.on .count { color: var(--y); }
.d-side-foot { border-top: 1px solid var(--bk3); margin-top: 10px; padding-top: 12px; display: flex; align-items: center; gap: 10px; }
.d-side-foot .av { width: 30px; height: 30px; border-radius: 50%; background: #2285d0; color: var(--white); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.d-side-foot .nm { color: var(--white); font-size: 12.5px; font-weight: 600; line-height: 1.1; }
.d-side-foot .rl { color: var(--g4); font-size: 10.5px; }

/* ── Desktop main + topbar ────────────────────────────────────────────── */
.d-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.d-topbar { flex-shrink: 0; background: var(--wh); border-bottom: 2px solid var(--y); display: flex; align-items: center; gap: var(--sp-3); padding: 14px 28px; }
.d-topbar-title { font-family: var(--serif); font-size: 1.4rem; color: var(--bk); line-height: 1.1; white-space: nowrap; }
.d-topbar > div:first-child { flex-shrink: 0; }
.d-topbar-sub { font-size: 12px; color: var(--g4); margin-top: 1px; }
.d-search { display: flex; align-items: center; gap: 8px; background: var(--g1); border: 1px solid var(--g2); border-radius: var(--radius-sm); padding: 7px 12px; font-size: 13px; color: var(--g4); cursor: text; min-width: 220px; max-width: 360px; flex: 1; margin-left: auto; }
.d-search:hover { background: var(--white); border-color: var(--g3); color: var(--bk); }
.d-search .txt { flex: 1; text-align: left; }
.d-search .kbd { font-size: 11px; background: var(--white); border: 1px solid var(--g2); color: var(--g4); padding: 1px 6px; border-radius: 4px; }
.d-icon-btn { width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--g2); background: var(--white); color: var(--bk); display: grid; place-items: center; font-size: 16px; }
.d-icon-btn:hover { background: var(--g1); border-color: var(--g3); }

.d-content { flex: 1; overflow-y: auto; min-height: 0; }
.d-pad { padding: 28px clamp(28px, 4vw, 64px); }
.d-wide { max-width: 1180px; margin: 0 auto; }
.d-narrow { max-width: 760px; margin: 0 auto; }

.d-page-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.d-h1 { font-family: var(--serif); font-size: 1.65rem; line-height: 1.05; color: var(--bk); }
.d-eyebrow { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--g4); font-weight: 700; margin-bottom: 8px; }
.d-sec-title { font-family: var(--serif); font-size: 1.25rem; color: var(--bk); margin-bottom: 12px; }
.d-row-actions { display: flex; gap: 8px; }

/* ── Desktop dashboard ─────────────────────────────────────────────────── */
.d-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.d-stat { background: var(--white); border: 1px solid var(--g2); border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.d-stat .n { font-family: var(--serif); font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--bk); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.d-stat .l { font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--g4); margin-top: 8px; }
.d-stat .bar { height: 5px; background: var(--g1); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.d-stat .bar > i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.d-dash-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: start; }
.d-card { background: var(--white); border: 1px solid var(--g2); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.d-card-hd { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--g1); }
.d-card-hd .t { font-family: var(--serif); font-size: 1.1rem; color: var(--bk); }
.d-card-hd .lnk { font-size: 12px; color: var(--g4); font-weight: 600; }
.d-card-body { padding: 6px 20px; }

.d-att { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--g1); width: 100%; text-align: left; }
.d-att:last-child { border-bottom: none; }
.d-att .ic { width: 38px; height: 38px; border-radius: var(--radius-sm); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.d-att .ic.err { background: var(--bg-error); } .d-att .ic.warn { background: var(--bg-warn); } .d-att .ic.info { background: var(--bg-info); }
.d-att .n { font-family: var(--serif); font-size: 1.25rem; color: var(--bk); }
.d-att .l { font-size: 13px; color: var(--g4); }
.d-att .chev { margin-left: auto; color: var(--g3); }
.d-feed { padding: 4px 0; }
.d-feed-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--g1); }
.d-feed-row:last-child { border-bottom: none; }
.d-feed-row .ic { font-size: 15px; width: 22px; text-align: center; }
.d-feed-row .tx { font-size: 13px; color: var(--bk); }
.d-feed-row .tm { font-size: 11px; color: var(--g3); margin-top: 2px; }

/* ── Master–detail browse + dense table ────────────────────────────────── */
.d-browse { display: grid; grid-template-columns: 1fr; gap: 0; min-height: 0; }
.d-browse.split { grid-template-columns: minmax(0,1fr) 400px; }
.d-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.d-filter { display: flex; align-items: center; gap: 6px; }
.d-filter label { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--g4); }
.d-select { font-family: var(--sans); font-size: 13px; color: var(--bk); background: var(--white); border: 1px solid var(--g2); border-radius: var(--radius-sm); padding: 7px 10px; outline: none; }
.d-select:focus { border-color: var(--bk); box-shadow: 0 0 0 3px var(--focus-ring); }
.d-searchbox { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--g2); border-radius: var(--radius-sm); padding: 7px 12px; }
.d-searchbox input { border: none; outline: none; background: none; flex: 1; font-family: var(--sans); font-size: 13.5px; color: var(--bk); }

.d-table { width: 100%; background: var(--white); border: 1px solid var(--g2); border-radius: var(--radius-md); overflow: hidden; }
.d-thead, .d-trow { display: grid; grid-template-columns: 34px 30px minmax(0,2.4fr) 92px minmax(0,1.4fr) 110px 88px; align-items: center; gap: 10px; padding: 0 14px; }
.d-browse.split .d-thead, .d-browse.split .d-trow { grid-template-columns: 34px 30px minmax(0,1fr) 86px 104px; }
.d-browse.split .d-thead > :nth-child(5), .d-browse.split .d-trow > :nth-child(5),
.d-browse.split .d-thead > :nth-child(7), .d-browse.split .d-trow > :nth-child(7) { display: none; }
.d-thead { height: 38px; background: var(--g1); font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--g4); position: sticky; top: 0; z-index: 2; }
.d-trow { height: 44px; border-top: 1px solid var(--g1); cursor: pointer; }
.d-trow:hover { background: var(--g1); }
.d-trow.sel { background: var(--bg-info); }
.d-trow.active { background: rgba(255,206,0,0.10); box-shadow: inset 2px 0 0 var(--y); }
.d-trow .nm { font-weight: 500; font-size: 13.5px; color: var(--bk); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-trow .ico { font-size: 17px; }
.d-trow .code { font-family: var(--mono); font-size: 11.5px; color: var(--g4); }
.d-trow .loc { font-size: 12.5px; color: var(--g4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-trow .qty { font-family: var(--serif); font-size: 1rem; color: var(--bk); text-align: right; }
.d-check { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--g3); background: var(--white); display: grid; place-items: center; font-size: 11px; color: var(--white); }
.d-check.on { background: var(--bk); border-color: var(--bk); }
.d-thead .d-check { border-color: var(--g4); }

/* Dense bulk action bar */
.d-bulk { display: flex; align-items: center; gap: 12px; background: var(--bk); color: var(--white); border-radius: var(--radius-sm); padding: 10px 16px; margin-bottom: 12px; box-shadow: var(--shadow-md); }
.d-bulk .n { font-weight: 700; font-family: var(--serif); font-size: 1.05rem; }
.d-bulk .spacer { flex: 1; }
.d-bulk button { background: rgba(255,255,255,0.12); color: var(--white); border-radius: var(--radius-xs); padding: 7px 12px; font-size: 12.5px; font-weight: 600; }
.d-bulk button:hover { background: rgba(255,255,255,0.22); }
.d-bulk button.y { background: var(--y); color: var(--bk); }
.d-bulk button.x { background: transparent; color: var(--g3); }

/* Detail side panel */
.d-panel { background: var(--white); border: 1px solid var(--g2); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; position: sticky; top: 0; max-height: calc(100vh - 160px); display: flex; flex-direction: column; }
.d-panel-empty { display: grid; place-items: center; height: 320px; color: var(--g4); font-size: 13px; text-align: center; padding: 20px; }
.d-panel-scroll { overflow-y: auto; }

/* Two-column fiche */
.d-fiche { display: grid; grid-template-columns: 360px minmax(0,1fr); gap: 28px; align-items: start; }
.d-block { background: var(--white); border: 1px solid var(--g2); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 18px 20px; margin-bottom: 18px; }
.d-block h3 { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--g4); margin-bottom: 12px; }

/* ⌘K palette (desktop variant kept here for parity; legacy duplicate
   exists in shared/style/cmdk.css — these styles are matos-local). */
.d-cmdk-back { position: fixed; inset: 0; background: rgba(20,20,20,0.4); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.d-cmdk { width: 560px; max-width: 92vw; background: var(--wh); border: 1px solid var(--g2); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); overflow: hidden; }
.d-cmdk-input { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--g2); }
.d-cmdk-input input { border: none; outline: none; background: none; flex: 1; font-family: var(--sans); font-size: 16px; color: var(--bk); }
.d-cmdk-input .kbd { font-size: 11px; background: var(--g1); border: 1px solid var(--g2); color: var(--g4); padding: 2px 7px; border-radius: 4px; }
.d-cmdk-list { max-height: 380px; overflow-y: auto; padding: 6px; }
.d-cmdk-grp { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--g4); padding: 10px 12px 4px; }
.d-cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); width: 100%; text-align: left; font-size: 14px; color: var(--bk); }
.d-cmdk-item .ic { font-size: 17px; width: 22px; text-align: center; }
.d-cmdk-item .code { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--g4); }
.d-cmdk-item.on, .d-cmdk-item:hover { background: var(--g1); }
.d-cmdk-item.on { box-shadow: inset 2px 0 0 var(--y); }

.d-empty-hint { padding: 60px 20px; text-align: center; color: var(--g4); font-size: 14px; }

/* ── Sidebar polish (camps-coherent .sidebar/.sb-* — always-on) ──────── */
/* The sidebar shell itself ships in shared/style/sidebar.css; matos
   adds the yellow CTA button + grouped-nav polish below. These rules
   are always emitted; they have no effect when the sidebar is hidden
   on phone (< 640px) but render correctly when it appears at 640+. */
.sb-create {
  margin: 0.55rem 0.65rem 0.35rem; padding: 0.6rem; border-radius: var(--radius-sm);
  background: var(--y); color: var(--bk); font-weight: 700; font-size: 0.86rem;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.sb-create:active { transform: scale(0.99); }
.sb-count { margin-left: auto; font-size: var(--fs-xs); color: var(--g3); font-weight: 600; }
.sb-item.on .sb-count, .sb-item.active .sb-count { color: var(--y); }

/* Desktop topbar trigger + actions */
.topbar .topbar-search { display: inline-flex; }
.topbar .icon-btn { margin-left: var(--sp-2); }

/* Camps .ph page-header pattern */
.ph { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.ph h2 { font-family: var(--serif); font-weight: 400; font-size: 1.65rem; line-height: 1.05; color: var(--bk); }
.ph .ph-eyebrow { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--g4); font-weight: 700; margin-bottom: 8px; white-space: nowrap; }
.ph-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Sidebar grouped-nav polish (the renderer emits .sb-nav-group +
   .sb-nav-group-label + .sb-divider + .sb-create). These rules style
   those new structures without disturbing the shared .sb-row behaviour. */
.sidebar .sb-nav-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar .sb-nav-group + .sb-nav-group,
.sidebar .sb-divider + .sb-nav-group {
  margin-top: 10px;
}
.sidebar .sb-nav-group-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g4, #888);
  padding: 12px 14px 4px;
  font-weight: 700;
}
.sidebar .sb-divider {
  height: 1px;
  background: var(--bk3, rgba(255, 255, 255, 0.08));
  margin: 10px 0;
}
.sidebar .sb-row.on,
.sidebar .sb-item.on,
.sidebar .sb-row.is-active,
.sidebar .sb-item.is-active {
  border-left: 2px solid var(--y);
  background: rgba(255, 206, 0, 0.12);
  color: var(--y);
}
.sidebar .sb-create {
  text-decoration: none;
}
.sidebar .sb-copyright {
  padding: 14px;
  font-size: 10.5px;
  color: var(--g4, #888);
  line-height: 1.45;
  border-top: 1px solid var(--bk3, rgba(255, 255, 255, 0.08));
}

/* ═══════════════════════════════════════════════════════════════════════
   Nav-swap @ 640px — sidebar visible, mobile bottom-bar hidden.
   Tablet (640-959px) gets the sidebar but not the dense layout.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width: 640px) {
  /* Hide all mobile bottom-bar variants. */
  .m-bottombar { display: none; }
  .matos-bottom-bar { display: none !important; }

  /* PWA install-banner desktop positioning: top-right corner, no
     centring (so it doesn't fight with the topbar wordmark). */
  .matos-install-banner {
    top: calc(env(safe-area-inset-top, 0px) + var(--sp-3));
    right: var(--sp-3);
    left: auto;
    margin: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Density layer @ 960px — dense table, 2-col fiche, 4-col stats, etc.
   This is the cutoff where `.d-*` JS paths and `.m-*`-rearrange overrides
   kick in. Below this (tablet 640-959px), pages still use the mobile-
   card layout but with the sidebar fixed to the left.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width: 960px) {
  /* ── Page-level: widen + breathe ── */
  .main.m-scroll,
  .apercu-host.m-scroll,
  .chercher-host.m-scroll {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px clamp(28px, 4vw, 48px);
  }

  /* ── Aperçu desktop layout ─────────────────────────────────────────
     The mobile renderer stacks: Hero · Search · Stats · Attention ·
     À venir · Activité récente. Desktop folds Attention + À venir into
     a 2-col grid; stats go to 4-col; Activité stays full-width below. */
  .apercu-host {
    display: block;
  }
  .m-accueil-hero {
    margin-bottom: 8px;
  }
  /* Stats band → 4 columns desktop */
  .apercu-host .m-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
  }
  .apercu-host .m-stat {
    padding: 18px 22px;
  }
  .apercu-host .m-stat-num {
    font-size: 2.4rem;
  }
  /* 2-col row for first two <section>s (Attention + À venir). */
  .apercu-host > section:nth-of-type(1),
  .apercu-host > section:nth-of-type(2) {
    display: inline-block;
    width: calc(50% - 11px);
    vertical-align: top;
  }
  .apercu-host > section:nth-of-type(1) {
    margin-right: 18px;
  }
  /* Activité récente / 3rd section is full-width below. */
  .apercu-host > section:nth-of-type(3) {
    display: block;
    width: 100%;
    margin-top: 22px;
  }

  /* ── Chercher (parcourir.js) desktop spacing ──────────────────────── */
  .chercher-host h2.m-h2 {
    font-size: 1.65rem;
    margin-bottom: 16px;
  }
  .chercher-host .m-search.field {
    max-width: 480px;
  }
  .chercher-host .m-filter-row {
    margin-top: 12px;
  }
  .chercher-host .d-bulk {
    margin-top: 14px;
  }

  /* ── Fiche / item-detail 2-col grid ──────────────────────────────── */
  .m-detail {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px clamp(28px, 4vw, 48px);
  }
  .m-detail .m-detail-actionbar-top {
    margin-bottom: 14px;
  }
  .m-detail .m-detail-hd {
    margin-bottom: 22px;
  }
  .m-detail .m-detail-name {
    font-size: 2.4rem;
  }
  .m-detail {
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    grid-template-areas:
      'top   top'
      'head  head'
      'photo right'
      'loc   right'
      'hist  right'
      'extras extras'
      'foot  foot';
    gap: 0 28px;
    align-items: start;
  }
  .m-detail > .m-detail-actionbar-top {
    grid-area: top;
  }
  .m-detail > .m-detail-hd {
    grid-area: head;
  }
  .m-detail > .m-photo-grid {
    grid-area: photo;
  }
  /* Role-specific anchors (2026-06-02). The previous selectors used
   * `.m-card-block:nth-of-type(1..3)` over the .m-detail children, which
   * silently matched nothing because nth-of-type counts ALL div siblings
   * — and the first div under .m-detail is the top action bar, not a
   * card. The result was every .m-card-block landing in grid auto-flow's
   * first open cell and stacking on top of each other (Quantité card,
   * Historique card and Photos sheet all rendered at the same y on the
   * fiche page). buildLocationCard / buildCounterCard / buildPartsCard /
   * buildHistoryCard now stamp m-card-loc / m-card-status / m-card-hist
   * so each card lands in its named area regardless of sibling order. */
  .m-detail > .m-card-loc {
    grid-area: loc;
  }
  .m-detail > .m-card-status {
    grid-area: right;
    align-self: start;
  }
  .m-detail > .m-card-hist {
    grid-area: hist;
  }
  .m-detail > .m-card-block:not(.m-card-loc):not(.m-card-status):not(.m-card-hist),
  .m-detail > [id^='photos-'],
  .m-detail > .item-history,
  .m-detail > details.item-history-card,
  .m-detail > .sg-banner {
    grid-area: extras;
  }
  .m-detail > .m-actionbar {
    grid-area: foot;
    margin-top: 14px;
  }

  /* ── Sorties (checkout-lifecycle) 2-col grid ─────────────────────── */
  .m-scroll:has(> .m-co-card) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
  }
  .m-scroll:has(> .m-co-card) > .m-section-hd,
  .m-scroll:has(> .m-co-card) > .m-chips {
    grid-column: 1 / -1;
  }
  .m-co-card {
    margin: 0;
  }

  /* ── Sets / kits desktop grid ─────────────────────────────────────── */
  body .m-scroll > .m-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
  }

  /* ── Revue annuelle desktop comfort ─────────────────────────────── */
  .m-review {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px clamp(28px, 4vw, 64px);
    position: relative;
    inset: auto;
  }
  .m-review-body {
    margin-top: 16px;
  }

  /* ── Outils hub tabs (desktop sizing) ─────────────────────────────── */
  .outils-tabs.creer-tabs {
    border-bottom: 1px solid var(--g2);
    padding-bottom: 0;
    margin-bottom: 22px;
  }
  .outils-tabs .tag-chip {
    padding: 10px 16px;
    font-size: 13px;
  }
}
