/* ==========================================================================
   Prix du Nord — page Produits (catalogue) + éléments partagés avec la Home
   Propriétés logiques uniquement (RTL prêt). Tokens : css/tokens.css
   ========================================================================== */

.btn-outline { background: transparent; color: var(--petrol-900); box-shadow: inset 0 0 0 1.5px var(--petrol-700); }
.btn-outline:hover { background: var(--petrol-900); color: var(--on-dark); }
.page-produits .main-nav a[aria-current="page"] { color: var(--petrol-900); }

/* ---------- En-tête de catalogue ---------- */
.cat-head {
  background: var(--petrol-900); color: var(--on-dark);
  padding-block: clamp(20px, 3vw, 36px) clamp(28px, 4vw, 48px);
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0 0 14px; padding: 0; font-size: var(--fs-xs); color: var(--on-dark-muted); }
.crumbs li:not(:last-child)::after { content: "/"; margin-inline: 8px; opacity: 0.6; }
.crumbs a { color: var(--on-dark-muted); text-decoration: none; }
.crumbs a:hover { color: var(--on-dark); text-decoration: underline; }
.crumbs [aria-current] { color: var(--on-dark); }
.cat-head-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: 24px clamp(24px, 4vw, 64px); align-items: end; }
.cat-h1 {
  font-family: var(--font-display); font-weight: 650; font-variation-settings: "wdth" var(--wdth-heading);
  font-size: clamp(1.8rem, 1.2rem + 2vw, 3rem); line-height: 1.08; letter-spacing: -0.015em; margin: 0; text-wrap: balance;
}
:lang(ar) .cat-h1 { letter-spacing: 0; line-height: 1.35; }
.cat-head-desc { margin-top: 10px; color: var(--on-dark-muted); max-width: 62ch; font-size: var(--fs-small); }
.cat-head-desc:empty { display: none; }
.cat-search { display: flex; gap: 0; min-width: 0; }
.cat-search input {
  flex: 1; min-width: 0; min-height: 56px; padding: 0 18px;
  border: 0; background: var(--ecru-50); color: var(--ink); font: inherit; font-size: 1rem;
  --c: var(--cut-sm); clip-path: polygon(var(--c) 0, 100% 0, 100% 100%, 0 100%, 0 var(--c));
}
[dir="rtl"] .cat-search input { clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, 0 100%); }
.cat-search input::placeholder { color: var(--slate-500); }
.cat-search .btn { min-height: 56px; clip-path: none; }
@media (max-width: 859px) { .cat-head-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 479px) { .cat-search .btn { padding-inline: 16px; } }

/* ---------- Mise en page : navigation latérale + contenu ---------- */
.cat-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: clamp(24px, 3vw, 48px); padding-block: clamp(28px, 3.5vw, 48px) var(--section-y); align-items: start; }
/* bureau : pas de défilement interne (la molette fait toujours défiler la page) ; « top » ajusté en JS pour une barre collante dans les deux sens */
.cat-side { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; }
.cat-side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cat-side-title { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--copper-700); }
.cat-side-close { display: none; width: 44px; height: 44px; place-items: center; }
.cat-side-close svg { width: 16px; height: 16px; }
.side-cats, .side-subs, .side-brands { list-style: none; margin: 0; padding: 0; }
.side-cats > li { border-bottom: 1px solid var(--rule); }
.side-cats a, .side-brands a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 11px 10px; text-decoration: none; font-size: var(--fs-small); line-height: 1.35; color: var(--ink);
}
.side-cats > li > a { font-weight: 600; font-variation-settings: "wdth" 104; }
.side-cats a:hover, .side-brands a:hover { background: var(--ecru-50); }
.side-cats a[aria-current], .side-brands a[aria-current] { background: var(--petrol-900); color: var(--on-dark); }
.side-cats a[aria-current] .n, .side-brands a[aria-current] .n { color: var(--on-dark-muted); }
.side-cats > li.is-open > a:not([aria-current]) { color: var(--copper-700); }
.side-subs { padding: 2px 0 10px; padding-inline-start: 12px; border-inline-start: 2px solid var(--copper-400); margin-inline-start: 10px; }
.side-subs a { padding-block: 7px; font-weight: 400; }
.n { flex: none; font-size: var(--fs-xs); color: var(--slate-500); font-variant-numeric: tabular-nums; }
.side-block { margin-top: 24px; }
.side-h, .side-filters legend { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--copper-700); margin-bottom: 8px; padding: 0; }
.side-brands { max-height: 360px; overflow-y: auto; border-top: 1px solid var(--rule); }
.side-brands a { padding-block: 8px; border-bottom: 1px solid var(--rule); }
.side-more { margin-top: 8px; font-size: var(--fs-small); font-weight: 600; color: var(--copper-700); min-height: 40px; text-decoration: underline; }
.side-filters { border: 0; padding: 0; margin-inline: 0; }
.side-filters label { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: var(--fs-small); cursor: pointer; }
.side-filters input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--copper-600); flex: none; }
.side-note { margin-top: 18px; font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.5; }
.side-block .side-note { margin-top: 10px; }
.cat-side-backdrop { display: none; }

.cat-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 20px; min-height: 24px; }
.side-open { display: none; min-height: 44px; padding-inline: 16px; }
.side-open svg { width: 16px; height: 16px; }
.cat-count { font-weight: 600; font-size: var(--fs-small); }
.cat-count:empty { display: none; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 12px; background: var(--mist-200); color: var(--ink); text-decoration: none; font-size: var(--fs-xs); font-weight: 600; }
.chip span { font-size: 1.1em; opacity: 0.7; }
.chip:hover { background: var(--petrol-900); color: var(--on-dark); }

/* Mobile / tablette : tiroir */
@media (max-width: 1023px) {
  .cat-layout { grid-template-columns: minmax(0, 1fr); }
  .side-open { display: inline-flex; }
  .cat-side {
    position: fixed; z-index: 60; inset-block: 0; inset-inline-start: 0; width: min(88vw, 360px); max-height: none; top: 0;
    background: var(--ecru-100); padding: 16px 20px 32px; transform: translateX(-105%); transition: transform 0.25s var(--ease); box-shadow: 0 0 40px rgba(8, 31, 38, 0.3);
    overflow-y: auto; overscroll-behavior: contain; /* tiroir modal : seul cas où un défilement propre est nécessaire, sans entraîner la page */
  }
  [dir="rtl"] .cat-side { transform: translateX(105%); }
  .cat-side.is-open { transform: none; }
  .cat-side-close { display: grid; }
  .cat-side-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(8, 31, 38, 0.5); }
  .cat-side-backdrop[hidden] { display: none; }
  body.side-open { overflow: hidden; }
}

/* ---------- Vue d'ensemble : tuiles de catégories ---------- */
.ov-block + .ov-block { margin-top: clamp(40px, 5vw, 64px); }
.ov-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.ov-h { font-family: var(--font-display); font-weight: 650; font-variation-settings: "wdth" var(--wdth-heading); font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.9rem); line-height: 1.15; margin: 0 0 18px; }
.ov-note { color: var(--text-muted); font-size: var(--fs-small); margin: -6px 0 20px; max-width: 70ch; }
.ct-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ct {
  position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 148px;
  padding: 20px 22px 22px; padding-inline-end: 64px; background: var(--ecru-50); color: var(--ink); text-decoration: none;
  border-top: 3px solid var(--petrol-700); transition: background-color 0.2s, color 0.2s;
}
.ct:hover { background: var(--petrol-900); color: var(--on-dark); }
.ct-name { font-family: var(--font-display); font-weight: 650; font-variation-settings: "wdth" var(--wdth-heading); font-size: 1.15rem; line-height: 1.2; }
.ct-n { font-size: var(--fs-xs); font-weight: 600; color: var(--copper-700); }
.ct:hover .ct-n { color: var(--copper-400); }
.ct-subs { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.45; }
.ct:hover .ct-subs { color: var(--on-dark-muted); }
.ct-go { position: absolute; inset-inline-end: 18px; bottom: 18px; width: 32px; height: 32px; display: grid; place-items: center; background: var(--copper-600); color: var(--on-action); }
.ct-go svg { width: 12px; height: 12px; }
[dir="rtl"] .ct-go svg { transform: scaleX(-1); }
.ct--muted { border-top-color: var(--slate-400); }
@media (max-width: 1179px) { .ct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 559px) { .ct-grid { grid-template-columns: 1fr; } .ct { min-height: 0; } }

/* ---------- Cartes produit ---------- */
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.pc { display: flex; flex-direction: column; height: 100%; background: var(--ecru-50); color: var(--ink); text-decoration: none; transition: box-shadow 0.2s, transform 0.2s var(--ease); }
.pc:hover { box-shadow: 0 10px 28px rgba(8, 31, 38, 0.14); transform: translateY(-2px); }
.pc-media { position: relative; aspect-ratio: 1; background: #fff; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--rule); }
.pc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; } /* photos en portrait : contenues dans le carré, jamais rognées */
.pc-media.is-long img { inset: -25%; max-width: none; padding: 0; margin: auto; transform: rotate(var(--tilt, -45deg)); } /* photo très allongée : diagonale, dimensions posées par catalogue.js, centrée sans propriété directionnelle */
.pc-media.is-na, .pd-media.is-na { background: var(--mist-100); background-image: repeating-linear-gradient(135deg, rgba(18, 38, 45, 0.05) 0 1px, transparent 1px 12px); }
.ph-na { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--slate-500); font-size: var(--fs-xs); font-weight: 600; text-align: center; padding: 12px; }
.ph-na svg { width: 30px; height: 30px; }
.pc-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; flex: 1; }
.pc-code { font-weight: 700; font-variation-settings: "wdth" 96; font-size: 0.98rem; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pc-name { font-size: var(--fs-xs); line-height: 1.4; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-name--muted { color: var(--slate-500); font-style: italic; }
.badge { align-self: flex-start; margin-top: 6px; padding: 3px 8px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; }
.badge--inq { background: #f6e3cf; color: var(--copper-800); }
@media (max-width: 559px) { .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .pc-body { padding: 10px; } .pc-code { font-size: 0.9rem; } }

.empty { padding: 40px 24px; background: var(--ecru-50); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.empty-t { font-weight: 600; font-size: 1.1rem; }

/* ---------- Pagination ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 36px; }
.pg-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pg { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding-inline: 10px; background: var(--ecru-50); color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.pg:hover { background: var(--petrol-700); color: var(--on-dark); }
.pg.is-on { background: var(--petrol-900); color: var(--on-dark); }
.pg--nav { display: inline-flex; gap: 6px; padding-inline: 16px; }
.pg.is-off { opacity: 0.4; pointer-events: none; }
.pg-gap { display: inline-grid; place-items: center; min-width: 24px; min-height: 44px; color: var(--slate-500); }
.pg-status { flex-basis: 100%; text-align: center; font-size: var(--fs-xs); color: var(--text-muted); }
[dir="rtl"] .pg--nav [aria-hidden] { display: inline-block; transform: scaleX(-1); }
@media (max-width: 559px) { .pg-list li:not(:has(.is-on)):not(:first-child):not(:last-child) { display: none; } .pg-gap { display: none; } }

/* ---------- Fiche produit (dialog) ---------- */
.pd { width: min(1080px, 94vw); max-height: 92vh; padding: 0; border: 0; background: var(--ecru-100); color: var(--ink); box-shadow: 0 30px 80px rgba(8, 31, 38, 0.4); }
.pd::backdrop { background: rgba(8, 31, 38, 0.6); }
.pd-inner { padding: 0 clamp(18px, 3vw, 40px) clamp(24px, 3vw, 40px); }
.pd-loading { padding: 32px 0; color: var(--text-muted); }
.pd-top { position: sticky; top: 0; z-index: 2; background: var(--ecru-100); padding-block: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--rule); }
.pd-back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: var(--fs-small); color: var(--copper-700); }
.pd-back svg { width: 14px; height: 14px; }
[dir="rtl"] .pd-back svg { transform: scaleX(-1); }
.pd-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 40px); align-items: start; padding-top: 12px; }
.pd-media { aspect-ratio: 1; background: #fff; display: grid; place-items: center; overflow: hidden; }
/* image positionnée dans le cadre : une photo en hauteur ne déborde plus du cadre carré (sinon rognée par overflow) */
.pd-media { position: relative; }
.pd-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.pd-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pd-thumbs img { width: 72px; height: 72px; object-fit: contain; background: #fff; padding: 4px; }
.pd-kicker, .pd-label, .pd-h { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--copper-700); }
.pd-code { font-family: var(--font-display); font-weight: 700; font-variation-settings: "wdth" 104; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); line-height: 1.1; margin: 4px 0 6px; overflow-wrap: anywhere; }
.pd-desig { margin: 16px 0; padding: 14px 16px; background: var(--ecru-50); border-inline-start: 3px solid var(--petrol-700); }
.pd-name { font-size: 1.05rem; font-weight: 500; line-height: 1.45; margin-top: 4px; }
.pd-muted { color: var(--text-muted); }
.pd-small { font-size: var(--fs-xs); margin-top: 6px; }
.pd-aux { margin-top: 6px; font-size: var(--fs-xs); color: var(--slate-500); font-style: italic; }
.pd-status { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-small); }
.pd-status li { display: flex; gap: 10px; align-items: baseline; }
.pd-status li::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--copper-400); transform: translateY(-1px); }
.pd-status li.is-ok::before { background: var(--petrol-500); }
.pd-status a { color: var(--copper-700); }
.pd-dl { margin: 0; border-top: 1px solid var(--rule); }
.pd-row { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 6px 18px; padding-block: 12px; border-bottom: 1px solid var(--rule); font-size: var(--fs-small); }
.pd-row dt { font-weight: 600; }
.pd-row a { color: var(--copper-700); }
.pd-compat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pd-sec { margin-top: 28px; }
.pd-sec .pd-h { margin-bottom: 10px; }
.pd-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.pd-table th, .pd-table td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.pd-table th { width: 40%; font-weight: 600; background: var(--ecru-50); }
.pd-table--warn { opacity: 0.85; }
.pd-warn { margin: 12px 0 8px; padding: 10px 12px; background: #f6e3cf; color: var(--copper-800); font-size: var(--fs-xs); font-weight: 600; }
.pd-variants, .pd-related { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 18px; font-size: var(--fs-small); }
.pd-variants li, .pd-related li { padding-block: 6px; border-bottom: 1px solid var(--rule); }
.pd-related { grid-template-columns: 1fr; }
.pd-related a { color: var(--ink); }
.tag { display: inline-block; margin-inline-start: 6px; padding: 1px 7px; font-size: 0.72rem; font-weight: 600; background: var(--mist-200); color: var(--ink-soft); }
.pd-related li.is-warn .tag { background: #f6e3cf; color: var(--copper-800); }
@media (max-width: 859px) {
  .pd { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; }
  .pd-grid { grid-template-columns: 1fr; }
  .pd-media { aspect-ratio: 4 / 3; }
  .pd-row { grid-template-columns: 1fr; }
}

/* ---------- Formulaire de devis ---------- */
.pd-quote { padding: clamp(18px, 2.5vw, 28px); background: var(--petrol-900); color: var(--on-dark); }
.pd-quote .pd-h { color: var(--copper-400); }
.qf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.qf label { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--on-dark-muted); }
.qf input, .qf textarea { min-height: 46px; padding: 10px 12px; border: 0; background: var(--ecru-50); color: var(--ink); font: inherit; font-size: var(--fs-small); }
.qf textarea { resize: vertical; }
.qf-ref, .qf-msg, .qf-out, .qf-actions { grid-column: 1 / -1; }
.qf-ref input { background: var(--mist-200); font-weight: 700; }
.qf-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.qf-actions .btn-outline { color: var(--on-dark); box-shadow: inset 0 0 0 1.5px var(--rule-dark); }
.qf-out { font-size: var(--fs-small); }
.qf-out:empty { display: none; }
.qf-out.is-err { color: #f3b38a; }
.qf-out.is-ok { color: var(--on-dark); }
@media (max-width: 559px) { .qf { grid-template-columns: 1fr; } }

/* ---------- Home : sélection du catalogue ---------- */
.home-sel { background: var(--ecru-100); }
.home-sel .pc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1023px) { .home-sel .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.home-sel-note { margin-top: 18px; font-size: var(--fs-xs); color: var(--text-muted); }

/* ---------- Accueil : familles reliées au catalogue ---------- */
/* photo produit sur fond blanc : image dans la partie haute, bande pétrole pleine sous le texte */
.media--product { background: #fff; }
.media--product img { object-fit: contain; height: 50%; padding: 5% 10% 0; }
.cat-link:has(.media--product)::after { background: linear-gradient(to top, var(--petrol-800) 0 50%, rgba(18, 56, 69, 0) 56%); }
.cat-body .cat-count { order: -1; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--copper-400); font-variant-numeric: tabular-nums; }
.pc-sub { font-size: var(--fs-xs); color: var(--slate-500); }
/* les libellés de la taxonomie sont plus longs que les anciens titres : sur les petites cartes desktop, seule la famille et son effectif restent visibles */
@media (min-width: 1024px) and (max-width: 1439px) { .cat:not(.cat--feature):not(.cat--band) .cat-desc { display: none; } }

/* ==========================================================================
   Amélioration du catalogue (21-10-2026) : références sans photo, marques, vue d'ensemble
   ========================================================================== */
/* sélection dans la navigation latérale : bleu marine + filet bleu ciel du logo */
.side-cats a[aria-current], .side-brands a[aria-current] { box-shadow: inset 3px 0 0 var(--sky-500); }
[dir="rtl"] .side-cats a[aria-current], [dir="rtl"] .side-brands a[aria-current] { box-shadow: inset -3px 0 0 var(--sky-500); }
.side-subs { border-inline-start-color: var(--sky-500); }

/* marques sur les cartes : marque du produit (pastille pleine) ≠ marque de machine compatible (texte « Pour … ») */
.pc-brands, .pr-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 2px; }
.pc-pb { display: inline-block; padding: 2px 7px; background: var(--petrol-900); color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; line-height: 1.5; }
.pc-compat { font-size: 0.75rem; font-weight: 600; color: var(--sky-700); }

/* références sans photo vérifiée : cartes compactes rectangulaires */
.pr-block { margin-top: 0; }
.pr-block.is-mixed { margin-top: 28px; }
.pr-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; font-size: var(--fs-small); font-weight: 600; color: var(--ink-soft); }
.pr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pr { display: flex; flex-direction: column; height: 100%; background: var(--ecru-50); border-inline-start: 3px solid var(--slate-300); transition: box-shadow 0.2s; }
.pr:hover { box-shadow: 0 6px 18px rgba(7, 28, 43, 0.1); border-inline-start-color: var(--sky-500); }
.pr-main { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 10px; color: var(--ink); text-decoration: none; flex: 1; }
.pr-main:focus-visible { outline: 2px solid var(--sky-700); outline-offset: -2px; }
.pr-code { font-weight: 700; font-size: 0.98rem; font-variation-settings: "wdth" 96; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pr-name { font-size: var(--fs-xs); line-height: 1.4; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pr-name--muted { color: var(--slate-500); font-style: italic; }
.pr-na { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 600; color: var(--slate-500); }
.pr-na svg { width: 14px; height: 14px; flex: none; }
.pr-src { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 8px 14px 10px; border-top: 1px solid var(--rule); font-size: 0.75rem; color: var(--slate-500); }
.pr-src-ref { overflow-wrap: anywhere; }
.pr-src-link, .pd-src-link { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--sky-700); text-decoration: underline; text-underline-offset: 2px; }
.pr-src-link svg, .pd-src-link svg { width: 12px; height: 12px; flex: none; }
[dir="rtl"] .pr-src-link svg, [dir="rtl"] .pd-src-link svg { transform: scaleX(-1); }
.pr-src-link.is-off, .pd-src-link.is-off { font-weight: 400; font-style: italic; color: var(--slate-500); text-decoration: none; }
@media (max-width: 1179px) { .pr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 559px) { .pr-grid { grid-template-columns: 1fr; gap: 8px; } }

/* fiche sans photo : encadré compact vers la source d'origine */
.pd-nophoto { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--mist-100); border-inline-start: 3px solid var(--slate-400); font-size: var(--fs-small); }
.pd-nophoto-t { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--slate-500); margin-bottom: 6px; }
.pd-nophoto-t svg { width: 20px; height: 20px; }

/* vue d'ensemble : tuiles de catégorie avec visuel (photo vérifiée ou icône) */
.ct { padding-top: 0; }
.ct-media { display: grid; place-items: center; aspect-ratio: 16 / 10; margin: 0 -64px 10px -22px; margin-inline: -22px -64px; background: #fff; overflow: hidden; border-bottom: 1px solid var(--rule); }
.ct-media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform 0.4s var(--ease); }
.ct:hover .ct-media img { transform: scale(1.04); }
.ct-media--icon { background: var(--mist-100); color: var(--petrol-700); }
.ct-media--icon svg { width: 56px; height: 56px; }
.ct:hover .ct-media--icon { color: var(--petrol-900); }
/* contraste AA (≥ 4,5:1) des petits textes secondaires sur fond écru : ardoise → encre atténuée */
.pr-na, .pr-src, .pr-src-link.is-off, .pd-src-link.is-off, .pr-name--muted, .pc-name--muted, .pd-nophoto-t { color: var(--ink-soft); }
/* mobile : cartes compactes plus denses (code + indicateur sur une ligne) et tuiles de catégorie sur deux colonnes */
@media (max-width: 559px) {
  .pr-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 10px; padding: 10px 12px 6px; }
  .pr-code { grid-column: 1; }
  .pr-tags { grid-column: 2; grid-row: 1; justify-content: flex-end; margin: 0; }
  .pr-tags .pc-pb, .pr-tags .pc-compat, .pr-tags .badge { display: none; }
  .pr-name { grid-column: 1 / -1; -webkit-line-clamp: 1; }
  .pr-src { padding: 6px 12px 8px; gap: 0 8px; }
  .ct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ct { padding: 0 12px 14px; padding-inline-end: 12px; min-height: 0; gap: 4px; }
  .ct-media { aspect-ratio: 4 / 3; margin-inline: -12px; margin-bottom: 8px; }
  .ct-media img { padding: 8px; }
  .ct-name { font-size: 0.98rem; }
  .ct-subs, .ct-go { display: none; }
}

/* ==========================================================================
   Corrections UX du 22-10-2026 : marques dans la catégorie ouverte, barre « Affiner la liste »
   ========================================================================== */
/* sélecteurs de marque, placés en tête de la catégorie ouverte (avant les sous-catégories) */
.side-facets { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 10px; margin-inline-start: 10px; padding: 12px; background: var(--ecru-50); border-inline-start: 2px solid var(--sky-500); }
.facet-label { display: block; margin-bottom: 5px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--petrol-800); }
.facet--pb .facet-label { color: var(--copper-700); }
.facet-select { width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid var(--slate-300); background: #fff; color: var(--ink); font: inherit; font-size: var(--fs-small); }
.facet-select:focus-visible { outline: 2px solid var(--sky-700); outline-offset: 1px; }
.facet-note { margin-top: 5px; font-size: 0.75rem; line-height: 1.4; color: var(--ink-soft); }

/* Affiner la liste : options sélectionnables (case à cocher stylée), séparées de la navigation */
.refine { margin: 0 0 22px; padding: 14px 16px 12px; border: 1px solid var(--rule); background: var(--ecru-50); min-inline-size: 0; }
.refine-title { padding: 0 6px; margin-inline-start: -6px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--petrol-800); }
.refine-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 12px; }
.refine-opt { position: relative; display: flex; align-items: flex-start; gap: 10px; flex: 1 1 240px; max-width: 380px; padding: 10px 12px; border: 1.5px solid var(--slate-300); background: #fff; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.refine-opt:hover { border-color: var(--petrol-700); }
.refine-opt input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--petrol-800); }
.refine-opt:has(input:checked) { border-color: var(--petrol-900); background: var(--sky-100); box-shadow: inset 3px 0 0 var(--sky-500); }
[dir="rtl"] .refine-opt:has(input:checked) { box-shadow: inset -3px 0 0 var(--sky-500); }
.refine-opt:has(input:focus-visible) { outline: 2px solid var(--sky-700); outline-offset: 2px; }
.refine-txt { display: flex; flex-direction: column; gap: 2px; }
.refine-name { font-weight: 700; font-size: var(--fs-small); color: var(--ink); }
.refine-help { font-size: 0.78rem; line-height: 1.4; color: var(--ink-soft); }
.refine-more { flex: 1 1 100%; }
.refine-more > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: var(--fs-small); font-weight: 600; color: var(--sky-700); cursor: pointer; }
.refine-more[open] > summary { margin-bottom: 8px; }
.refine-more .refine-opt { max-width: 520px; }
@media (max-width: 559px) { .refine { padding: 12px; } .refine-opt { flex-basis: 100%; max-width: none; } .refine-help { font-size: 0.75rem; } }
/* bouton « Voir dans le catalogue d'origine » (seulement si une destination autorisée est configurée) */
a.pr-src-link, a.pd-src-link { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border: 1.5px solid var(--petrol-800); background: #fff; color: var(--petrol-900); font-weight: 700; text-decoration: none; }
a.pr-src-link:hover, a.pd-src-link:hover { background: var(--petrol-900); color: #fff; }
a.pd-src-link { min-height: 42px; align-self: flex-start; margin-block: 4px; }
.pr-src-link.is-off, .pd-src-link.is-off { font-style: normal; }
.pr-src-link.is-off::before, .pd-src-link.is-off::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-end: 6px; border-radius: 50%; background: var(--copper-400); vertical-align: middle; }
/* traductions proposées des noms chinois : marque discrète, nom d'origine conservé et visible dans la fiche */
.pc-trtag { font-size: 0.68rem; font-weight: 600; font-style: normal; color: var(--sky-700); white-space: nowrap; }
.pd-name--tr { font-weight: 600; }
.pd-trnote { font-size: 0.75rem; color: var(--ink-soft); margin: 2px 0 10px; }
.pd-label--orig { margin-top: 6px; }
.pd-orig { font-size: 0.8em; color: var(--ink-soft); }

/* révision des références (28-10-2026) : valeur enregistrée qui n'est pas une référence → libellé neutre ; précisions sous la référence de la fiche */
.pc-code--none, .pr-code--none { font-weight: 600; font-style: italic; color: var(--text-muted); }
.pd-coderev { list-style: none; margin: 6px 0 12px; padding: 8px 12px; border-inline-start: 3px solid var(--copper-600); background: color-mix(in srgb, var(--copper-600) 6%, transparent); font-size: 0.86rem; line-height: 1.45; }
.pd-coderev li + li { margin-block-start: 4px; }

/* section « Références sans photographie » : en fin de liste, séparée des catégories (et de « Autres références ») */
.side-virtual { margin-block-start: 10px; padding-block-start: 10px; border-block-start: 2px solid var(--rule); }
.ct-virtual { grid-column: 1 / -1; }
.ct-virtual .ct { border-style: dashed; }

/* « Nos catalogues » : catalogues PDF complets */
.pdf-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.pdf-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rule); }
.pdf-cover { display: block; aspect-ratio: 4 / 3; background: #f4f1ea; border-block-end: 1px solid var(--rule); overflow: hidden; }
.pdf-cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pdf-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.pdf-name { font-weight: 700; font-size: 0.98rem; }
.pdf-meta { color: var(--text-muted); font-size: 0.86rem; }
.pdf-open { margin-block-start: auto; align-self: flex-start; }
@media (max-width: 559px) { .pdf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .pdf-body { padding: 10px; } }
.pdf-orig { font-size: 0.86rem; color: var(--action); text-decoration: underline; text-underline-offset: 2px; }
.pdf-orig:hover { color: var(--action-hover); }
