/* Siloé · styles de la zone « catalogue » : carte, suggestions, univers, barre de filtres, feuille, favoris.
   Chargé après styles.css : ne redéfinit que ce qui est propre au catalogue. Tailles, rayons et hauteurs viennent des jetons de styles.css. */

/* ---------- carte produit ---------- */
.card { gap: 8px; }
.card-body { gap: 3px; }
.card-shop { font-size: 12px; }
.card-name { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card-foot { margin-top: 0; }
.card .fav { width: var(--tap); height: var(--tap); }

/* point d'univers : 8 px, devant le nom de la boutique */
.uni-dot { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 99px; background: var(--u, var(--ink)); }

/* ---------- suggestions sous le champ de recherche ---------- */
.sugg { position: fixed; z-index: 60; max-height: min(70vh, 520px); overflow-y: auto; padding: 8px; border-radius: var(--r-lg); background: var(--white); box-shadow: 0 1px 2px rgba(27,44,94,.08), 0 24px 48px -20px rgba(27,44,94,.4); }
.sugg[hidden] { display: none; }
.sugg-h { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.sugg-o { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: var(--r-sm); cursor: pointer; }
.sugg-o:hover, .sugg-o.on { background: var(--sand); }
.sugg-m { width: 40px; height: 40px; flex: none; display: grid; place-items: center; }
.sugg-m img { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: cover; background: var(--sand); }
.sugg-dot { display: block; width: 14px; height: 14px; border-radius: 99px; }
.sugg-mono { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 99px; background: var(--sand); font-family: var(--display); font-style: normal; font-size: 16px; }
.sugg-go { background: var(--ink); color: #fff; font-family: var(--ui); font-size: 15px; }
.sugg-t { display: grid; min-width: 0; }
.sugg-t b { font-weight: 500; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg-t small { font-size: 12.5px; color: var(--ink-2); }
.sugg-all { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm); }
.sugg-all .sugg-t b { font-weight: 600; }

/* ---------- page catalogue ---------- */
.c-page { padding-bottom: var(--sec); }
.c-page .crumbs { margin: 18px 0 12px; }
/* auto-fit (et non auto-fill) : quand il y a moins d'articles que de colonnes, les cartes s'étirent et ne laissent pas de vide à droite */
.c-page .grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px 16px; }
@media (max-width: 680px) {
  .c-page { padding-bottom: 48px; }
  .c-page .grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 22px 12px; }
}

/* univers : onglets texte, filet en bas, l'onglet actif prend la couleur de l'univers */
.utabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.utabs::-webkit-scrollbar { display: none; }
.utab { display: inline-flex; align-items: center; flex: none; min-height: var(--tap); padding: 0 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 15px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.utab:hover { color: var(--ink); }
.utab.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--u, var(--ink)); }

/* barre fixe : compte, tri, univers, filtres rapides */
.cbar { position: sticky; top: var(--head-h); z-index: 20; display: grid; gap: 10px; margin: 0 calc(var(--g) * -1) 22px; padding: 12px var(--g); background: var(--paper); border-bottom: 1px solid var(--line); }
.cbar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap); }
.cbar-count { font-size: 14px; color: var(--ink-2); min-width: 0; }
.cbar-count b { color: var(--ink); font-weight: 600; }
.cbar-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.cbar-clear { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 10px; font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; border-radius: var(--r-sm); }
.cbar-clear:hover { color: var(--apricot-deep); }
.cbar-open .badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 2px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; }
.cbar-sort .select { height: 48px; }
.cbar-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cbar-lab { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-right: 4px; }

/* pastilles de filtre : blanches à contour, 36 px (remplace la règle .chip de sell.css, qui fuit sur toutes les pages) */
.cbar .chip { height: 36px; padding: 0 14px; border-radius: 99px; background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 500; }
.cbar .chip:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.cbar .chip.on { background: var(--ink); color: #fff; box-shadow: none; }

/* raccourcis cadeaux : au-dessus de la barre, pour qu'elle ne soit pas trop haute quand elle colle */
.gift-cut { display: grid; gap: 10px; margin: 0 0 18px; }

/* univers : en-tête court à sa couleur */
.uni-head { display: flex; align-items: center; gap: 18px; margin: 20px 0 22px; padding: 20px 26px; border-radius: var(--r-lg); background: var(--ut, var(--sand)); }
.uni-ic { width: 60px; height: 60px; flex: none; display: grid; place-items: center; border-radius: var(--r); background: var(--u, var(--ink)); color: #fff; }
.uni-ic .i { width: 28px; height: 28px; }
.uni-kicker { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 2px; }
.uni-head h1 { font-size: var(--h1); line-height: 1.05; }
.uni-head p.muted { margin-top: 4px; font-size: 14px; }

/* feuille de filtres : ne se referme pas à chaque clic */
.sheet[hidden] { display: none; }
.sheet { position: fixed; inset: 0; z-index: 80; }
.sheet-bg { position: absolute; inset: 0; background: rgba(27,44,94,.36); }
.sheet-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); display: flex; flex-direction: column; background: var(--paper); box-shadow: -20px 0 40px -20px rgba(27,44,94,.4); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 10px; }
.sheet-head h2 { font-size: var(--h2); }
.sheet-head .icon-btn { width: var(--tap); height: var(--tap); }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 22px; padding: 6px 22px 20px; }
.sheet-body fieldset { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 2px; }
.sheet-body legend { padding: 0; margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.sheet-body .check { min-height: var(--tap); }
.sheet-foot { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 14px 22px 20px; background: var(--white); border-top: 1px solid var(--line); }
@media (max-width: 680px) {
  .sheet-panel { top: auto; left: 0; right: 0; width: auto; max-height: 86vh; border-radius: var(--r-lg) var(--r-lg) 0 0; }
}

/* focus : champs de tri et de filtre */
.select:focus-visible, .sheet input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- mobile ---------- */
@media (max-width: 680px) {
  .cbar { margin-bottom: 16px; }
  .cbar-count { font-size: 13px; }
  .cbar-row, .utabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
  .cbar-row::-webkit-scrollbar { display: none; }
  .cbar-sort { display: none; } /* le tri passe dans la feuille « Filtres » */
  .uni-head { padding: 16px 18px; gap: 14px; }
  .uni-ic { width: 48px; height: 48px; }
  .uni-ic .i { width: 22px; height: 22px; }
}

/* ---------- favoris ---------- */
.fav-list { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 10px; }
.fav-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 12px; border-radius: var(--r-lg); background: var(--white); }
.fav-pic img { width: 104px; height: 128px; object-fit: cover; border-radius: var(--r); background: var(--sand); }
.fav-info { display: grid; gap: 5px; min-width: 0; justify-items: start; }
.fav-uni { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.fav-name { font-size: 15px; font-weight: 500; line-height: 1.35; }
.fav-name:hover { text-decoration: underline; }
.fav-shop { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); }
.fav-shop:hover { color: var(--ink); text-decoration: underline; }
.fav-shop svg { width: 13px; height: 13px; color: var(--blue); }
.fav-side { display: grid; justify-items: end; gap: 8px; }
.fav-side .price { font-size: 16px; }
.fav-rm { min-height: var(--tap); border: 0; background: none; padding: 4px 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.fav-rm:hover { color: var(--apricot-deep); }
@media (max-width: 680px) {
  .fav-row { grid-template-columns: 76px minmax(0, 1fr); gap: 12px 14px; }
  .fav-pic img { width: 76px; height: 96px; }
  .fav-side { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; justify-items: stretch; align-items: center; gap: 10px; }
  .fav-side .price { justify-self: start; }
  .fav-side .btn { justify-self: end; }
  .fav-rm { justify-self: end; }
}
