/* =====================================================================
   PAGE CAVE — recherche à facettes sur tout le catalogue.
   ===================================================================== */
.cave-tete { padding: 44px 0 20px; }
.cave-tete__ligne { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cave-tete h1 { font-size: clamp(34px, 4.4vw, 58px); }
@media (max-width: 720px) {
  .cave-tete { padding: 24px 0 8px; }
  .cave-tete .surtitre { margin-bottom: 8px; }
  .cave-tete__compte { font-size: 13px; }
  .barre-sommelier { padding-left: 16px; margin-top: 16px; }
  .barre-sommelier input { font-size: 15px; min-width: 0; }
  .barre-sommelier .bouton { padding: 10px 14px; }
  .segment { margin-top: 14px; }
  .segment button { padding: 8px 12px; font-size: 13px; }
}
.cave-tete__compte { color: var(--gris); font-size: 15px; }

.barre-sommelier {
  margin-top: 28px; display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 22px;
  background: var(--blanc); border: 1px solid var(--ligne); border-radius: 999px; box-shadow: var(--ombre-s);
}
.barre-sommelier input { flex: 1; border: none; outline: none; background: none; font-size: 17px; padding: 10px 0; }
.barre-sommelier:focus-within { border-color: var(--or); box-shadow: 0 0 0 4px rgba(201, 169, 110, .18); }

.segment { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--sable); margin-top: 22px; }
.segment button { padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--gris); }
.segment button[aria-pressed="true"] { background: var(--blanc); color: var(--noir); box-shadow: var(--ombre-s); }
.segment small { font-weight: 400; opacity: .7; margin-left: 4px; }

.rail-intentions { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 0 4px; }
.rail-intentions[hidden] { display: none; }

.filtres-actifs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 36px; padding: 12px 0; }
.filtres-actifs__effacer { font-size: 13px; color: var(--bordeaux); font-weight: 600; margin-left: 6px; }

.cave-corps { display: grid; grid-template-columns: 290px 1fr; gap: 40px; align-items: start; }
.facettes {
  position: sticky; top: calc(var(--hauteur-entete) + 20px); max-height: calc(100vh - var(--hauteur-entete) - 40px);
  overflow-y: auto; overflow-x: hidden; padding: 4px 12px 24px 4px; scrollbar-width: none;
}
.facettes::-webkit-scrollbar { display: none; }
.facette { padding: 20px 0 22px; border-bottom: 1px solid rgba(201, 169, 110, .28); }
.facette:first-of-type { padding-top: 6px; }
.facette summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--police-titre); font-size: 19px; font-weight: 600;
}
.facette summary::-webkit-details-marker { display: none; }
.facette summary::after { content: ""; width: 8px; height: 8px; margin-left: auto; align-self: center; border-right: 1.5px solid var(--or); border-bottom: 1.5px solid var(--or); transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--courbe); }
.facette[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.facette__contenu { margin-top: 14px; }
.facette__selection { margin-left: 10px; margin-right: auto; align-self: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bordeaux); color: var(--creme); font-family: var(--police-texte); font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }
.facette__sous-titre { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--or); font-weight: 600; margin: 16px 0 8px; }

/* Puces à toucher */
.groupe-puces { display: flex; flex-wrap: wrap; gap: 7px; }
.puce-filtre {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  background: var(--blanc); border: 1px solid rgba(0, 0, 0, .08); font-size: 13px; font-weight: 500; line-height: 1.2;
  transition: background .25s, border-color .25s, color .25s, transform .25s var(--courbe);
}
.puce-filtre small { font-size: 11px; color: var(--gris); font-weight: 400; }
.puce-filtre:hover { border-color: var(--or); transform: translateY(-1px); }
.puce-filtre--active { background: var(--bordeaux); border-color: var(--bordeaux); color: var(--creme); }
.puce-filtre--active small { color: var(--or-vif); }
.puce-filtre--vide { opacity: .4; pointer-events: none; }
.puce-filtre:has(input:focus-visible) { outline: 2px solid var(--or); outline-offset: 2px; }

/* Pastilles de couleur */
.pastilles { display: flex; flex-wrap: wrap; gap: 7px; }
.pastille {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 7px; border-radius: 999px; cursor: pointer;
  background: var(--blanc); border: 1px solid rgba(0, 0, 0, .08); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: border-color .25s, box-shadow .25s, transform .25s var(--courbe);
}
.pastille:hover { border-color: var(--or); transform: translateY(-1px); }
.pastille__teinte {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; background: var(--teinte);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .18), 0 0 0 3px var(--blanc), 0 0 0 4px rgba(0, 0, 0, .06);
}
.pastille__libelle { flex: none; }
.pastille small { font-size: 11px; color: var(--gris); }
.pastille--active { border-color: var(--bordeaux); background: var(--bordeaux); color: var(--creme); }
.pastille--active .pastille__teinte { box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .18), 0 0 0 2px var(--creme); }
.pastille--vide { opacity: .4; pointer-events: none; }
.pastille:has(input:focus-visible) { outline: 2px solid var(--or); outline-offset: 2px; }

.facette__plus { font-size: 13px; color: var(--bordeaux); font-weight: 600; margin-top: 12px; border-bottom: 1px solid currentColor; }

/* Budget */
.budget { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.budget label { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--blanc); border: 1px solid rgba(0, 0, 0, .08); border-radius: 12px; }
.budget label:focus-within { border-color: var(--or); }
.budget span { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gris); }
.budget input { width: 100%; min-width: 0; border: none; outline: none; background: none; font-weight: 600; -moz-appearance: textfield; }
.budget input::-webkit-inner-spin-button { -webkit-appearance: none; }
.budget em { font-style: normal; color: var(--gris); }

.resultats-barre { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 16px; }
.resultats-barre select { padding: 9px 14px; border: 1px solid var(--ligne); border-radius: 999px; background: var(--blanc); font-size: 13px; }
.bouton-filtres { display: none; }
.facettes__mobile { display: none; }
.voir-plus { display: flex; justify-content: center; margin-top: 40px; }

.encart-pro { display: none; margin-bottom: 22px; padding: 18px 22px; border-radius: var(--rayon); background: var(--noir); color: var(--creme); font-size: 14px; }
.mode-pro .encart-pro { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.encart-pro strong { color: var(--or-vif); }

@media (max-width: 960px) {
  .cave-corps { grid-template-columns: 1fr; }
  .facettes {
    position: fixed; inset: auto 0 0 0; top: auto; max-height: 82vh; z-index: 95; background: var(--creme-doux);
    border-radius: 22px 22px 0 0; padding: 20px 22px 100px; box-shadow: var(--ombre-l);
    transform: translateY(105%); transition: transform .45s var(--courbe);
  }
  .facettes.ouvert { transform: none; }
  .facettes__mobile { position: sticky; top: -20px; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 6px 0 14px; background: var(--creme-doux); border-bottom: 1px solid var(--ligne); }
  .bouton-filtres { display: inline-flex; }
}

/* La barre ouvre le sommelier : avatar à gauche, comme dans le chat. */
.barre-sommelier { cursor: text; padding-left: 8px; }
.barre-sommelier__avatar { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--bordeaux); color: var(--or-vif); }
.barre-sommelier__avatar svg { width: 21px; height: 21px; }
@media (max-width: 720px) { .barre-sommelier .bouton { display: none; } .barre-sommelier { padding: 6px 6px 6px 6px; } }
