﻿/* ==========================================================================
   PAGE : ACCESSOIRES (pages/accessoires.html)
   ========================================================================== */

/* ---- Hero ---- */
.shop-hero { position: relative; }   /* pas d'overflow:hidden : les popovers doivent pouvoir dépasser */
.shop-hero .media--shop-hero {
  width: 100%;
  aspect-ratio: 1707 / 723;
  min-height: 440px;
  max-height: 85vh;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ---- Barre de recherche liquid glass ---- */
.shop-search {
  position: absolute;
  left: 50%;
  bottom: clamp(1rem, 2.4vw, 2.5rem);
  transform: translateX(-50%);
  width: calc(100% - 2 * var(--gutter));
  display: grid;
  /* Colonnes latérales égales → la recherche est pile au centre de l'écran,
     la catégorie se cale à sa gauche et les outils à sa droite, au même écart. */
  grid-template-columns: 1fr minmax(0, 446px) 1fr;
  gap: clamp(0.75rem, 2.3vw, 2.4rem);
  font-size: var(--fs-md);
}
.shop-search__category { justify-self: end; width: min(270px, 100%); }
.shop-search__query { grid-column: 2; }
.shop-search__tools { justify-self: start; }

.shop-search select,
.shop-search input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 100%;
  font: inherit;
  font-weight: 300;
  color: inherit;
  background: none;
  border: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.shop-search select { cursor: pointer; padding-right: 1.5rem; }
.shop-search select option { color: var(--color-text); background: #fff; }
.shop-search input::placeholder { color: rgba(255, 255, 255, 0.8); }
.shop-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.shop-search__category { position: relative; }
.shop-search__chevron { position: absolute; right: 1.2rem; pointer-events: none; opacity: 0.85; }
.shop-search__query svg { flex-shrink: 0; opacity: 0.85; }

/* Bulles concentriques : la bulle intérieure (bouton) est à la même distance
   du bord de la pilule en haut, en bas, à gauche et à droite.
   inset = (hauteur pilule − bordures − hauteur bouton) / 2 */
.shop-search__tools {
  --tools-btn: 42px;
  --tools-inset: calc((50px - 2px - var(--tools-btn)) / 2);   /* = 3px */
  justify-content: center;
  gap: 6px;
  padding-inline: var(--tools-inset);
}
.shop-search__sep { width: 1px; height: 22px; background: rgba(255, 255, 255, 0.6); }
.shop-search__icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--tools-btn);
  height: var(--tools-btn);
  border-radius: 50%;
  transition: background-color var(--transition);
}
.shop-search__icon-btn:hover,
.shop-search__icon-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.18); }
.shop-search__dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

/* Les popovers s'ouvrent vers le haut, au-dessus de la photo (texte blanc lisible) */
.shop-search .glass-popover {
  /* un enfant absolu d'une grille peut se caler sur une cellule : ici celle des outils */
  grid-column: 3;
  grid-row: 1;
  left: 0;
  bottom: calc(100% + 12px);
  font-size: var(--fs-base);
}

/* ---- Grille ---- */
.shop-products { padding-block: var(--space-7) var(--space-6); }
.shop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-8);
  text-align: center;
  font-size: var(--fs-md);
  font-weight: 400;
}
.shop-empty[hidden] { display: none; }

/* ---- Mobile ---- */
@media (max-width: 760px) {
  .shop-hero .media--shop-hero { min-height: 520px; }
  .shop-search {
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
  }
  .shop-search__query { grid-column: 1 / -1; order: -1; }   /* recherche sur toute la largeur, en premier */
  .shop-search__category { justify-self: stretch; width: auto; }
  .shop-search .glass-popover {
    grid-column: 2;
    grid-row: 2;
    left: auto;
    right: 0;
    width: min(280px, calc(100vw - 2 * var(--gutter)));
  }
}
