/* ==========================================================================
   Catalogue « Liquid Glass » — barre de recherche (CatalogueDock) et grille de cartes
   Actif seulement si html[data-ui="glass"] ; en rendu classique, la barre est masquée et l'ancienne mise en page reste.
   ========================================================================== */
.bc-cat-dock { display: none; }
html[data-ui="glass"] .bc-cat-dock { display: block; width: min(1180px, 100% - 2rem); margin: 6.4rem auto 0; }
html[data-ui="glass"] .bc-cat-classic { display: none !important; }
@media (max-width: 991.98px) { html[data-ui="glass"] .bc-cat-dock { margin-top: 6.1rem; } }

.bcd-head { margin-bottom: 1.2rem; display: grid; gap: .6rem; justify-items: start; }
.bcd-eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
  color: var(--bc-brand-text); background: var(--bc-brand-50); border: 1px solid var(--bc-brand-100); }
.bcd-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; margin: 0; }
.bcd-head p { margin: 0; color: var(--bc-ink-2); font-weight: 500; }

/* Barre de verre */
.bcd-bar { position: sticky; top: 84px; z-index: 40; padding: .6rem; border-radius: var(--bc-r-xl); display: grid; gap: .5rem;
  background: var(--bc-glass-bg-strong); -webkit-backdrop-filter: var(--bc-glass-blur); backdrop-filter: var(--bc-glass-blur);
  border: 1px solid var(--bc-glass-border); box-shadow: var(--bc-glass-shadow), inset 0 1px 0 var(--bc-glass-edge); }
.bcd-row { display: grid; grid-template-columns: 1.3fr 1fr 1.1fr auto; align-items: center; gap: .15rem; }
.bcd-field { display: flex; flex-direction: column; gap: .1rem; padding: .4rem 1rem; min-width: 0; border-radius: var(--bc-r-m); transition: background .2s; }
.bcd-field + .bcd-field { border-left: 1px solid var(--bc-line); border-radius: 0; }
.bcd-field:hover, .bcd-field:focus-within { background: rgba(255, 255, 255, .5); }
.bcd-field label { margin: 0; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--bc-ink-3); white-space: nowrap; }
.bcd-field .mud-input-control { margin: 0; }
.bcd-field .mud-input, .bcd-field .mud-input-slot { font-weight: 600; font-size: .95rem; color: var(--bc-ink); padding: 0; margin: 0; min-height: 0; }
.bcd-field .mud-input.mud-input-underline:before, .bcd-field .mud-input.mud-input-underline:after { display: none; }
.bcd-field .mud-input > input.mud-input-slot { padding: 0; height: auto; }
.bcd-range { display: flex; align-items: center; gap: .4rem; color: var(--bc-ink-3); }
.bcd-range .mud-input-control { flex: 1 1 0; min-width: 0; }
.bcd-actions { display: flex; align-items: center; gap: .4rem; padding-left: .3rem; }
.bcd-go { min-height: 50px; padding: 0 1.4rem; display: inline-flex; align-items: center; gap: .5rem; }
.bcd-reset { width: 46px; height: 46px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.bcd-more { display: none; min-height: 46px; align-items: center; gap: .4rem; }
.bcd-chips { display: flex; gap: .45rem; overflow-x: auto; padding: .1rem .4rem .35rem; scrollbar-width: none; }
.bcd-chips::-webkit-scrollbar { display: none; }
.bcd-chip { flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: .3rem .9rem; border-radius: 999px; font-size: .84rem; font-weight: 600;
  background: var(--bc-surface); border: 1px solid var(--bc-line); color: var(--bc-ink-2); transition: all .25s var(--bc-ease); }
.bcd-chip i { color: var(--bc-ink-3); transition: color .2s; }
.bcd-chip:hover { border-color: var(--bc-brand-400); color: var(--bc-ink); }
.bcd-chip.on { background: var(--bc-brand-500); border-color: var(--bc-brand-500); color: #fff; box-shadow: 0 4px 12px rgba(253, 86, 49, .28); }
.bcd-chip.on i { color: #fff; }

.bcd-sort { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .7rem; margin: 1.3rem 0 .4rem; }
.bcd-count { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--bc-ink-2); }
.bcd-count i { color: var(--bc-brand-500); }
.bcd-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bc-surface); border: 1px solid var(--bc-line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.bcd-seg::-webkit-scrollbar { display: none; }
.bcd-seg button { flex: none; border: 0; background: transparent; color: var(--bc-ink-2); padding: .4rem .95rem; border-radius: 999px; font-weight: 700; font-size: .84rem; min-height: 36px; }
.bcd-seg button.on { background: var(--bc-brand-500); color: #fff; box-shadow: 0 3px 8px rgba(253, 86, 49, .25); }

/* Contenu : pleine largeur sous la barre */
html[data-ui="glass"] .bc-cat-main { flex: 0 0 100%; max-width: 100%; width: 100%; padding: 0 !important; overflow: visible !important; }
html[data-ui="glass"] .container:has(> .row > .bc-cat-main) { width: min(1180px, 100% - 2rem); max-width: none; margin: 0 auto !important; padding: 0 !important; }

@media (max-width: 980px) {
  .bcd-row { grid-template-columns: 1fr 1fr; }
  .bcd-field + .bcd-field { border-left: 0; }
  .bcd-actions { grid-column: 1 / -1; padding: .2rem .3rem .3rem; }
  .bcd-go { flex: 1 1 auto; justify-content: center; }
  .bcd-bar { top: 76px; }
}
@media (max-width: 640px) {
  .bcd-row { grid-template-columns: 1fr; }
  .bcd-field { border-top: 1px solid var(--bc-line); border-radius: 0 !important; }
  .bcd-field-main { border-top: 0; }
  .bcd-adv { display: none; }
  .bcd-adv.is-open { display: flex; }
  .bcd-more { display: inline-flex; }
  .bcd-bar { position: static; }
}

/* Dans l'espace utilisateur le layout fournit déjà l'espace sous l'en-tête et la largeur du conteneur */
html[data-ui="glass"] main .container .bc-cat-dock { margin-top: 0; width: 100%; }

/* ---------- Grille de cartes minimales (AnnonceView rend un MudTable : on le transforme en grille) ---------- */
.bc-oc-glass { display: none; }
html[data-ui="glass"] .bc-oc-glass { display: block; height: 100%; }
html[data-ui="glass"] .bc-oc-classic { display: none; }

html[data-ui="glass"] .bc-cat-main .row.g-4 { margin: 0; padding: 0 !important; }
html[data-ui="glass"] .bc-cat-main .row.g-4 > div { padding: 0; margin: 0 !important; }
html[data-ui="glass"] .mud-table.mud-sm-table:has(.bc-ocard) { background: transparent; box-shadow: none; border: 0; margin-top: .6rem !important; overflow: visible; }
html[data-ui="glass"] .mud-table:has(.bc-ocard) .mud-table-container { overflow: visible; }
html[data-ui="glass"] .mud-table:has(.bc-ocard) table.mud-table-root { display: block; width: 100%; }
html[data-ui="glass"] .mud-table:has(.bc-ocard) tbody.mud-table-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1.2rem; }
html[data-ui="glass"] .mud-table:has(.bc-ocard) tr.mud-table-row { display: block; border: 0; }
html[data-ui="glass"] .mud-table:has(.bc-ocard) tr.mud-table-row:hover { background: transparent; }
html[data-ui="glass"] .mud-table:has(.bc-ocard) .mud-table-pagination { background: transparent; border: 0; justify-content: center; }
html[data-ui="glass"] .bc-cat-main .mud-alert { margin-bottom: 1rem; }

/* ---------- Carte minimale ---------- */
.bc-ocard { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: var(--bc-r-xl); background: var(--bc-surface); border: 1px solid var(--bc-line);
  box-shadow: var(--bc-shadow-card); transition: transform .35s var(--bc-spring), box-shadow .35s var(--bc-ease); }
.bc-ocard:hover { transform: translateY(-3px); box-shadow: var(--bc-shadow-pop); }
.bc-ocard-media, .bc-det-media { position: relative; display: grid; place-items: center; background: #fff center / contain no-repeat; color: var(--bc-brand-300); font-size: 2.6rem; }
.bc-ocard-media { height: 170px; cursor: pointer; border-bottom: 1px solid var(--bc-line); }
.bc-ocard-media:focus-visible { outline: 3px solid var(--bc-brand-500); outline-offset: -3px; }
.bc-ocard-chip, .bc-ocard-status { position: absolute; top: 10px; left: 10px; max-width: calc(100% - 64px); padding: .22rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 700;
  background: var(--bc-glass-bg-strong); color: var(--bc-ink); border: 1px solid var(--bc-glass-border); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-ocard-status { top: 40px; background: var(--bc-info-soft); color: var(--bc-info); }
/* Bouton favoris : celui de la maquette (pastille de verre, étoile, grossit au survol) */
.bc-ocard-fav { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 1px solid var(--bc-glass-border);
  background: var(--bc-glass-bg-strong); color: var(--bc-ink); font-size: 1.05rem; line-height: 1; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform .3s var(--bc-spring), color .2s; }
.bc-ocard-fav i { font-size: 1.05rem; line-height: 1; }
.bc-ocard-fav:hover { transform: scale(1.15); color: var(--bc-brand-500); }
.bc-ocard-fav.on { color: var(--bc-brand-500); }
.bc-ocard-fav:focus-visible { outline: 3px solid var(--bc-brand-500); outline-offset: 2px; }
.bc-ocard-body { display: flex; flex-direction: column; gap: .35rem; flex: 1; padding: 1rem 1.15rem 1.15rem; }
.bc-ocard-body h3 { margin: 0 0 .15rem; font-size: 1.02rem; font-weight: 800; line-height: 1.3; color: var(--bc-ink); cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bc-ocard-body h3:hover { color: var(--bc-brand-text); }
.bc-ocard-meta { display: flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 600; color: var(--bc-ink-3); }
.bc-ocard-meta i { color: var(--bc-brand-400); font-size: 1rem; }
.bc-ocard-foot { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .65rem .5rem; margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--bc-line); margin-top: .6rem; }
.bc-ocard-foot strong { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; color: var(--bc-ink); }
.bc-ocard-details { display: inline-flex; align-items: center; gap: .25rem; padding: .35rem .2rem .35rem .6rem; border: 0; background: transparent; color: var(--bc-brand-text); font-weight: 700; font-size: .88rem; border-radius: 999px; min-height: 36px; transition: background .2s, gap .25s var(--bc-ease); }
.bc-ocard-details:hover { background: var(--bc-brand-50); gap: .45rem; }
.bc-ocard-primary { grid-column: 1 / -1; width: 100%; min-height: 42px; justify-content: center; }

/* ---------- Modale de détails ---------- */
.bc-det-title { display: grid; gap: .1rem; }
.bc-det-ref { font-size: .72rem; font-weight: 800; letter-spacing: .08em; color: var(--bc-brand-text); }
.bc-det-media { height: 210px; border-radius: var(--bc-r-l); border: 1px solid var(--bc-line); margin-bottom: 1rem; }
.bc-det-sub { margin: 0 0 1rem; color: var(--bc-ink-2); font-weight: 500; }
.bc-det-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: 0 0 1rem; }
.bc-det-grid > div { padding: .75rem .9rem; border-radius: var(--bc-r-m); background: var(--bc-surface-2); border: 1px solid var(--bc-line); min-width: 0; }
.bc-det-grid dt { display: flex; align-items: center; gap: .4rem; margin: 0 0 .15rem; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bc-ink-3); }
.bc-det-grid dt i { color: var(--bc-brand-400); font-size: .95rem; }
.bc-det-grid dd { margin: 0; font-weight: 700; color: var(--bc-ink); overflow-wrap: anywhere; }
.bc-det-grid dd a { color: var(--bc-brand-text); text-decoration: none; }
.bc-det-block { margin-bottom: .9rem; }
.bc-det-block h4 { margin: 0 0 .25rem; font-size: .9rem; font-weight: 800; color: var(--bc-ink); }
.bc-det-block p { margin: 0; color: var(--bc-ink-2); line-height: 1.6; }
.bc-det-badge { display: inline-block; min-width: 1.3rem; margin-left: .3rem; padding: 0 .4rem; border-radius: 999px; background: var(--bc-brand-500); color: #fff; font-size: .72rem; line-height: 1.3rem; text-align: center; }
html[data-ui="glass"] .mud-dialog .mud-dialog-actions { flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
@media (max-width: 575.98px) { .bc-det-grid { gap: .5rem; } .bc-det-grid > div { padding: .6rem .7rem; } .bc-det-grid dd { font-size: .92rem; } .bc-det-media { height: 140px; } }
