/* ==========================================================================
   HOB Header — Elementor Kit + WPR Sticky
   Transparent sur hero → fond crème au scroll
   Overlay recherche + badge panier + barre promo
   ========================================================================== */

:root {
  --hob-cream:       #F5F0E8;
  --hob-sand:        #E8DCC8;
  --hob-terracotta:  #C4622D;
  --hob-charcoal:    #2C2C2C;
  --hob-taupe:       #7A6E5F;
  --hob-white:       #FFFFFF;
  --hob-font-heading:'Cormorant Garamond', Georgia, serif;
  --hob-font-body:   'Jost', 'Helvetica Neue', sans-serif;
  --hob-transition:  0.35s ease;
}

/* ==========================================================================
   BARRE PROMO
   ========================================================================== */

.hob-promo-bar {
  background: var(--hob-charcoal);
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 9px 16px;
  font-family: var(--hob-font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  z-index: 10001;
}

.hob-promo-bar a {
  color: var(--hob-terracotta);
  text-decoration: underline;
  margin-left: 8px;
}

/* ==========================================================================
   HEADER ELEMENTOR — Transparent → Crème
   Cible le conteneur WPR sticky par data-attribute
   ========================================================================== */

/* Header wrapper Elementor Kit */
.ekit-template-content-header [data-wpr-sticky-section="yes"],
[data-elementor-id="6126"] [data-wpr-sticky-section="yes"] {
  transition:
    background-color var(--hob-transition),
    box-shadow var(--hob-transition) !important;
}

/* État transparent — homepage uniquement, avant scroll */
.hob-has-transparent-header:not(.hob-header-scrolled)
.ekit-template-content-header [data-wpr-sticky-section="yes"],
.hob-has-transparent-header:not(.hob-header-scrolled)
[data-elementor-id="6126"] [data-wpr-sticky-section="yes"] {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Liens nav blancs sur hero */
.hob-has-transparent-header:not(.hob-header-scrolled)
.ekit-template-content-header [data-wpr-sticky-section="yes"] a,
.hob-has-transparent-header:not(.hob-header-scrolled)
[data-elementor-id="6126"] [data-wpr-sticky-section="yes"] a {
  color: var(--hob-white) !important;
}

/* Logo blanc sur hero */
.hob-has-transparent-header:not(.hob-header-scrolled)
.ekit-template-content-header [data-wpr-sticky-section="yes"] img {
  filter: brightness(0) invert(1);
  transition: filter var(--hob-transition);
}

/* Hamburger blanc sur hero mobile */
.hob-has-transparent-header:not(.hob-header-scrolled)
.ekit-template-content-header [data-wpr-sticky-section="yes"]
.elementor-menu-toggle {
  color: var(--hob-white) !important;
}

/* État scrollé — fond crème */
.hob-header-scrolled
.ekit-template-content-header [data-wpr-sticky-section="yes"],
.hob-header-scrolled
[data-elementor-id="6126"] [data-wpr-sticky-section="yes"] {
  background-color: var(--hob-cream) !important;
  box-shadow: 0 1px 0 var(--hob-sand), 0 4px 24px rgba(44,44,44,0.07) !important;
}

/* Logo couleur au scroll */
.hob-header-scrolled
.ekit-template-content-header [data-wpr-sticky-section="yes"] img {
  filter: none !important;
}

/* Liens nav charcoal au scroll */
.hob-header-scrolled
.ekit-template-content-header [data-wpr-sticky-section="yes"] a {
  color: var(--hob-charcoal) !important;
}

/* ==========================================================================
   NAV LINKS — Underline animé
   ========================================================================== */

.ekit-template-content-header .elementor-nav-menu > li > a,
[data-elementor-id="6126"] .elementor-nav-menu > li > a {
  position: relative;
  font-family: var(--hob-font-body) !important;
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  transition: color var(--hob-transition) !important;
}

.ekit-template-content-header .elementor-nav-menu > li > a::after,
[data-elementor-id="6126"] .elementor-nav-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--hob-terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.ekit-template-content-header .elementor-nav-menu > li:hover > a::after,
.ekit-template-content-header .elementor-nav-menu > li.current-menu-item > a::after,
[data-elementor-id="6126"] .elementor-nav-menu > li:hover > a::after,
[data-elementor-id="6126"] .elementor-nav-menu > li.current-menu-item > a::after {
  transform: scaleX(1);
}

.ekit-template-content-header .elementor-nav-menu > li > a:hover,
[data-elementor-id="6126"] .elementor-nav-menu > li > a:hover {
  color: var(--hob-terracotta) !important;
}

/* ==========================================================================
   MEGA-MENU — Dropdown Elementor
   ========================================================================== */

/* Sous-menu Elementor */
.ekit-template-content-header .elementor-nav-menu .sub-menu,
[data-elementor-id="6126"] .elementor-nav-menu .sub-menu {
  background: var(--hob-white) !important;
  border: 1px solid var(--hob-sand) !important;
  border-top: 2px solid var(--hob-terracotta) !important;
  border-radius: 0 0 6px 6px !important;
  box-shadow: 0 16px 48px rgba(44,44,44,0.12) !important;
  min-width: 240px !important;
  padding: 8px 0 !important;
}

.ekit-template-content-header .elementor-nav-menu .sub-menu li a,
[data-elementor-id="6126"] .elementor-nav-menu .sub-menu li a {
  font-family: var(--hob-font-body) !important;
  font-size: 0.82rem !important;
  font-weight: 400 !important;
  color: var(--hob-charcoal) !important;
  padding: 12px 20px !important;
  letter-spacing: 0.04em !important;
  text-transform: none !important;
  transition: background var(--hob-transition), color var(--hob-transition) !important;
}

.ekit-template-content-header .elementor-nav-menu .sub-menu li a:hover,
[data-elementor-id="6126"] .elementor-nav-menu .sub-menu li a:hover {
  background: var(--hob-cream) !important;
  color: var(--hob-terracotta) !important;
}

/* ==========================================================================
   ICÔNES HEADER (search / account / cart)
   ========================================================================== */

.hob-header-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hob-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--hob-charcoal);
  text-decoration: none;
  position: relative;
  transition: background var(--hob-transition), color var(--hob-transition);
}

.hob-header-icon:hover {
  background: rgba(232,220,200,0.5);
  color: var(--hob-terracotta);
}

.hob-header-icon svg {
  display: block;
}

/* Sur hero transparent — icônes blanches */
.hob-has-transparent-header:not(.hob-header-scrolled) .hob-header-icon {
  color: var(--hob-white) !important;
}

/* Badge panier */
.hob-icon-cart__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  background: var(--hob-terracotta);
  color: var(--hob-white);
  font-family: var(--hob-font-body);
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

.hob-icon-cart__badge--hidden { display: none; }

@keyframes hob-badge-bounce {
  0%   { transform: scale(0.5); }
  60%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.hob-icon-cart__badge--bounce {
  animation: hob-badge-bounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   OVERLAY RECHERCHE
   ========================================================================== */

.hob-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(245, 240, 232, 0.97);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hob-search-overlay:not([hidden]) { pointer-events: all; }
.hob-search-overlay[hidden] { display: flex !important; }
.hob-search-overlay--visible { opacity: 1; }

.hob-search-overlay__close {
  position: absolute;
  top: 28px;
  right: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--hob-taupe);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--hob-transition), color var(--hob-transition);
}

.hob-search-overlay__close:hover {
  background: var(--hob-sand);
  color: var(--hob-charcoal);
}

.hob-search-overlay__form {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 600px;
  padding: 0 24px;
  border-bottom: 2px solid var(--hob-charcoal);
  transition: border-color var(--hob-transition);
}

.hob-search-overlay__form:focus-within {
  border-color: var(--hob-terracotta);
}

.hob-search-overlay__input {
  flex: 1;
  font-family: var(--hob-font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  color: var(--hob-charcoal);
  background: none;
  border: none;
  outline: none;
  padding: 16px 0;
  caret-color: var(--hob-terracotta);
}

.hob-search-overlay__input::placeholder { color: var(--hob-sand); }

.hob-search-overlay__submit {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--hob-taupe);
  padding: 8px;
  display: flex;
  transition: color var(--hob-transition);
}

.hob-search-overlay__submit:hover { color: var(--hob-terracotta); }

.hob-search-overlay__hint {
  font-family: var(--hob-font-body);
  font-size: 0.75rem;
  color: var(--hob-taupe);
  letter-spacing: 0.1em;
  margin: 0;
}

.hob-search-overlay__hint kbd {
  background: var(--hob-sand);
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 0.7rem;
}

/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 767px) {
  .hob-header-icon { width: 36px; height: 36px; }

  /* Désactive transparent sur mobile */
  .hob-has-transparent-header:not(.hob-header-scrolled)
  .ekit-template-content-header [data-wpr-sticky-section="yes"] {
    background-color: var(--hob-cream) !important;
  }

  .hob-has-transparent-header:not(.hob-header-scrolled)
  .ekit-template-content-header [data-wpr-sticky-section="yes"] a,
  .hob-has-transparent-header:not(.hob-header-scrolled)
  .ekit-template-content-header [data-wpr-sticky-section="yes"] img {
    color: var(--hob-charcoal) !important;
    filter: none !important;
  }

  .hob-has-transparent-header:not(.hob-header-scrolled) .hob-header-icon {
    color: var(--hob-charcoal) !important;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
