/* ══════════════════════════════════════════════════════════════════════
   BIENHABILLÉ — search-overlay.css — Recherche plein écran (type Celio)
   ══════════════════════════════════════════════════════════════════════ */

.bh-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.bh-search-overlay[hidden] {
  display: none !important;
}

.bh-search-overlay:not([hidden]) {
  display: flex;
  pointer-events: auto;
  visibility: visible;
}

.bh-search-overlay--open {
  opacity: 1;
}

.bh-search-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: var(--bh-bg-overlay, rgba(0, 0, 0, 0.45));
  opacity: 0;
  transition: opacity 0.28s ease;
}

.bh-search-overlay--open .bh-search-overlay__backdrop {
  opacity: 1;
}

.bh-search-overlay__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 100%;
  background: var(--bh-bg-primary, #fff);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  transform: translateY(-12px);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.bh-search-overlay--open .bh-search-overlay__panel {
  transform: translateY(0);
}

.bh-search-overlay__top {
  flex-shrink: 0;
  padding: var(--bh-space-md, 16px) var(--bh-space-lg, 24px);
  border-bottom: 1px solid var(--bh-border-color-light, #f0f0f0);
}

.bh-search-overlay__form {
  display: flex;
  align-items: center;
  gap: var(--bh-space-sm, 12px);
  max-width: 920px;
  margin: 0 auto;
}

.bh-search-overlay__icon {
  flex-shrink: 0;
  display: flex;
  color: var(--bh-text-muted, #999);
}

.bh-search-overlay__icon svg {
  width: 20px;
  height: 20px;
}

.bh-search-overlay__input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0;
  font-size: var(--bh-font-size-lg, 18px);
  font-weight: 400;
  color: var(--bh-text-primary, #1a1a1a);
  background: transparent;
  border: none;
  outline: none;
}

.bh-search-overlay__input::placeholder {
  color: var(--bh-text-muted, #999);
}

.bh-search-overlay__input::-webkit-search-cancel-button {
  display: none;
}

.bh-search-overlay__clear {
  flex-shrink: 0;
  padding: 0 var(--bh-space-xs, 8px);
  font-size: var(--bh-font-size-sm, 13px);
  color: var(--bh-text-secondary, #666);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bh-search-overlay__clear:hover {
  color: var(--bh-text-primary, #1a1a1a);
}

.bh-search-overlay__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: var(--bh-space-xs, 8px);
  color: var(--bh-text-primary, #1a1a1a);
  background: var(--bh-color-secondary, #f5f5f5);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.bh-search-overlay__close:hover {
  background: var(--bh-color-secondary-hover, #ebebeb);
}

.bh-search-overlay__body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--bh-space-lg, 24px);
}

.bh-search-overlay__section {
  max-width: 1200px;
  margin: 0 auto var(--bh-space-xl, 32px);
}

.bh-search-overlay__section:last-child {
  margin-bottom: 0;
}

.bh-search-overlay__heading {
  margin: 0 0 var(--bh-space-md, 16px);
  font-size: var(--bh-font-size-sm, 13px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bh-text-secondary, #666);
}

.bh-search-overlay__pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bh-space-xs, 8px);
}

.bh-search-overlay__pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: var(--bh-font-size-sm, 14px);
  color: var(--bh-text-primary, #1a1a1a);
  background: var(--bh-bg-primary, #fff);
  border: 1px solid var(--bh-border-color, #e0e0e0);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.bh-search-overlay__pill:hover {
  border-color: var(--bh-text-primary, #1a1a1a);
  background: var(--bh-color-secondary, #f5f5f5);
}

.bh-search-overlay__inspirations {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--bh-space-md, 16px);
}

@media (min-width: 640px) {
  .bh-search-overlay__inspirations {
    grid-template-columns: repeat(4, 1fr);
  }
}

.bh-search-overlay-inspiration {
  display: flex;
  flex-direction: column;
  gap: var(--bh-space-xs, 8px);
  text-decoration: none;
  color: inherit;
}

.bh-search-overlay-inspiration__media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bh-color-secondary, #f5f5f5);
  border-radius: var(--bh-radius-sm, 2px);
}

.bh-search-overlay-inspiration__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.bh-search-overlay-inspiration:hover .bh-search-overlay-inspiration__media img {
  transform: scale(1.04);
}

.bh-search-overlay-inspiration__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bh-color-secondary) 0%, var(--bh-color-secondary-dark, #e0e0e0) 100%);
}

.bh-search-overlay-inspiration__label {
  position: absolute;
  left: var(--bh-space-sm, 12px);
  bottom: var(--bh-space-sm, 12px);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bh-text-inverse, #fff);
  background: rgba(0, 0, 0, 0.55);
  border-radius: 2px;
}

.bh-search-overlay-inspiration__title {
  font-size: var(--bh-font-size-sm, 14px);
  font-weight: 500;
  color: var(--bh-text-primary, #1a1a1a);
}

.bh-search-overlay__results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--bh-space-md, 16px);
  margin-bottom: var(--bh-space-md, 16px);
}

.bh-search-overlay__results-head .bh-search-overlay__heading {
  margin-bottom: 0;
}

.bh-search-overlay__view-all {
  flex-shrink: 0;
  font-size: var(--bh-font-size-sm, 14px);
  font-weight: 500;
  color: var(--bh-text-primary, #1a1a1a);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bh-search-overlay__view-all:hover {
  color: var(--bh-text-secondary, #666);
}

.bh-search-overlay__status {
  margin-bottom: var(--bh-space-md, 16px);
  font-size: var(--bh-font-size-sm, 14px);
  color: var(--bh-text-secondary, #666);
}

.bh-search-overlay__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--bh-space-md, 16px) var(--bh-space-sm, 12px);
}

@media (min-width: 768px) {
  .bh-search-overlay__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--bh-space-lg, 24px) var(--bh-space-md, 16px);
  }
}

@media (min-width: 1024px) {
  .bh-search-overlay__grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.bh-search-overlay-product__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.bh-search-overlay-product__media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin-bottom: var(--bh-space-xs, 8px);
  background: var(--bh-color-secondary, #f5f5f5);
  border-radius: var(--bh-radius-sm, 2px);
}

.bh-search-overlay-product__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.bh-search-overlay-product:hover .bh-search-overlay-product__media img {
  transform: scale(1.03);
}

.bh-search-overlay-product__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--bh-color-secondary-dark, #e0e0e0);
}

.bh-search-overlay-product__badge {
  position: absolute;
  top: var(--bh-space-xs, 8px);
  left: var(--bh-space-xs, 8px);
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bh-text-inverse, #fff);
  background: var(--bh-color-accent, #e01020);
}

.bh-search-overlay-product__name {
  margin: 0 0 4px;
  font-size: var(--bh-font-size-sm, 13px);
  font-weight: 400;
  line-height: 1.35;
  color: var(--bh-text-primary, #1a1a1a);
}

.bh-search-overlay-product__price {
  font-size: var(--bh-font-size-sm, 13px);
  font-weight: 600;
  color: var(--bh-text-primary, #1a1a1a);
}

.bh-search-overlay-product__price del {
  font-weight: 400;
  color: var(--bh-text-muted, #999);
}

.bh-search-overlay-product__price ins {
  text-decoration: none;
}

body.bh-search-overlay-open {
  overflow: hidden;
}

/* Champ header = déclencheur overlay (saisie dans le panneau) */
[data-bh-search-overlay-trigger][readonly] {
  cursor: text;
}

@media (min-width: 768px) {
  .bh-search-overlay__panel {
    max-height: min(92vh, 900px);
    margin: var(--bh-space-md, 16px) auto 0;
    max-width: calc(100% - 32px);
    border-radius: var(--bh-radius-md, 4px) var(--bh-radius-md, 4px) 0 0;
  }

  .bh-search-overlay__body {
    padding: var(--bh-space-xl, 32px) var(--bh-space-2xl, 40px);
  }
}
