/* ════════════════════════════════════════════════════════════
   BOTUREA NAV — Apple-style mega menu
   ════════════════════════════════════════════════════════════ */

/* ─── Nav container ─────────────────────────────── */
#boturea-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

#boturea-nav.scrolled {
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.07);
}

body {
  padding-top: 60px !important;
}

/* ─── Inner layout ──────────────────────────────── */
.boturea-nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
}

/* ─── Logo ──────────────────────────────────────── */
.boturea-nav__logo {
  flex-shrink: 0;
  margin-right: 36px;
}

.boturea-nav__logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.boturea-nav__logo img {
  height: 80px;
  width: 200px;
  object-fit: contain;
}

.boturea-nav__logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -0.01em;
}

/* ─── Nav links ─────────────────────────────────── */
.boturea-nav__links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  gap: 0;
}

.boturea-nav__links > li > a,
.boturea-nav__links > li > span {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: color 0.18s ease;
  font-family: var(--font-body);
  letter-spacing: -0.01em;
}

.boturea-nav__links > li > a:hover,
.boturea-nav__links > li > span:hover,
.boturea-nav__links > li.bn-active > a,
.boturea-nav__links > li.bn-active > span {
  color: var(--g);
}

/* ─── Mega menu panel ───────────────────────────── */
.bn-mega {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(242, 242, 247, 0.82); /* gris Apple translucide */
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}

.bn-mega.bn-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

.bn-mega-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 36px;
  display: flex;
  gap: 0;
}

/* Séparateur vertical entre colonnes */
.bn-mega-col {
  padding: 0 40px 0 0;
  min-width: 160px;
  border-right: 1px solid var(--border);
  margin-right: 40px;
}

.bn-mega-col:last-child {
  border-right: none;
  margin-right: 0;
}

.bn-mega-col h3 {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

/* Groupes (ex: iPhone 16 / iPhone 17) */
.bn-mega-group {
  margin-bottom: 20px;
}

.bn-mega-group:last-child {
  margin-bottom: 0;
}

.bn-mega-group h4 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--black);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.bn-mega-col > a,
.bn-mega-group > a {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 0;
  transition: color 0.16s ease, transform 0.16s ease;
  letter-spacing: -0.01em;
}

.bn-mega-col > a:hover,
.bn-mega-group > a:hover {
  color: var(--g);
  transform: translateX(3px);
}

/* Mise en valeur "Voir tout" */
.bn-mega-col > a.bn-see-all {
  margin-top: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--g);
  display: flex;
  align-items: center;
  gap: 4px;
}

.bn-mega-col > a.bn-see-all::after {
  content: '→';
  transition: transform 0.16s ease;
}

.bn-mega-col > a.bn-see-all:hover::after {
  transform: translateX(3px);
}

/* ─── Nav icons ─────────────────────────────────── */
.boturea-nav__icons {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Search pill */
.boturea-nav__search-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--black);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  font-family: var(--font-body);
  letter-spacing: -0.01em;
}

.boturea-nav__search-pill:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--black);
}

.boturea-nav__search-pill svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
}

/* Icon buttons */
.boturea-nav__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--black);
  text-decoration: none;
  transition: background 0.2s ease;
  position: relative;
}

.boturea-nav__icon-btn:hover {
  background: var(--gray);
}

.boturea-nav__icon-btn svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.boturea-cart-count {
  position: absolute;
  top: 3px;
  right: 3px;
  background: var(--g);
  color: var(--white);
  font-size: 0.58rem;
  font-weight: 700;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Hamburger — masqué desktop */
.boturea-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
  gap: 5px;
  transition: background 0.2s ease;
}

.boturea-hamburger:hover {
  background: var(--gray);
}

.boturea-hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--black);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.25s ease;
}

.boturea-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.boturea-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.boturea-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Icône loupe mobile — masquée desktop */
.boturea-search-mobile {
  display: none !important;
}

/* ─── Search overlay ────────────────────────────── */
.boturea-search-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  height: 60px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  transform: translateY(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.boturea-search-bar.open {
  transform: translateY(0);
}

.boturea-search-bar form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}

.boturea-search-bar form:focus-within {
  border-bottom-color: var(--g);
}

.boturea-search-bar input[type="search"] {
  flex: 1;
  border: none;
  background: none;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--black);
  outline: none;
  padding: 4px 0;
}

.boturea-search-bar input::placeholder {
  color: var(--muted);
}

.boturea-search-bar button[type="submit"] {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--muted);
  display: flex;
  align-items: center;
  transition: color 0.18s ease;
}

.boturea-search-bar button[type="submit"]:hover { color: var(--black); }
.boturea-search-bar button[type="submit"] svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }

#boturea-search-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  transition: background 0.18s ease, color 0.18s ease;
}

#boturea-search-close:hover { background: var(--gray); color: var(--black); }
#boturea-search-close svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }

/* ─── Overlay ───────────────────────────────────── */
.boturea-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  z-index: 9997;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  backdrop-filter: blur(2px);
}

.boturea-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Masquer recherche injectée par Astra dans le panel mobile */
.boturea-mobile-panel .ast-search-menu-icon,
.boturea-mobile-panel .search-form,
.boturea-mobile-panel form[role="search"],
.boturea-mobile-panel input[type="search"],
.boturea-mobile-panel .widget_search {
  display: none !important;
}

/* ─── Mobile panel ──────────────────────────────── */
.boturea-mobile-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 90vw;
  background: rgba(242, 242, 247, 0.88); /* gris Apple translucide */
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.36s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-top: 64px;
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.12);
}

.boturea-mobile-panel.open {
  transform: translateX(0);
}

/* Bouton fermer panel */
.bn-panel-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: var(--gray);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--black);
  transition: background 0.2s ease;
}

.bn-panel-close:hover { background: var(--border); }
.bn-panel-close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }

.boturea-mobile-panel nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.boturea-mobile-panel nav > ul > li {
  border-bottom: 1px solid var(--border);
}

/* Lien simple */
.boturea-mobile-panel nav > ul > li > a {
  display: block;
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.18s ease;
}

.boturea-mobile-panel nav > ul > li > a:hover {
  color: var(--g);
}

/* Toggle accordéon */
.bn-mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--black);
  cursor: pointer;
  user-select: none;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  letter-spacing: -0.01em;
  transition: color 0.18s ease;
}

.bn-mobile-toggle:hover { color: var(--g); }

.bn-chevron {
  transition: transform 0.3s ease;
  color: var(--muted);
  flex-shrink: 0;
}

.bn-chevron.rotated { transform: rotate(180deg); }

/* Sous-menus accordéon */
.mobile-submenu {
  background: var(--gray);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-submenu.open {
  max-height: 600px;
}

.mobile-submenu .bn-sub-group {
  padding: 14px 24px 6px;
}

.mobile-submenu .bn-sub-group h4 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.mobile-submenu a {
  display: block;
  padding: 9px 24px;
  font-size: 0.9rem;
  color: #3a3a3c;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.16s ease;
}

.mobile-submenu a:hover { color: var(--g); }

/* Bas du panel : icônes compte & panier */
.boturea-mobile-icons {
  display: flex;
  padding: 20px 24px 32px;
  gap: 10px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

.boturea-mobile-icons a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--gray);
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: background 0.2s ease, color 0.2s ease;
}

.boturea-mobile-icons a:hover {
  background: var(--border);
  color: var(--g);
}

.boturea-mobile-icons svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
}

/* ─── RESPONSIVE ────────────────────────────────── */
@media (max-width: 960px) {
  .boturea-nav__links,
  .boturea-nav__search-pill {
    display: none !important;
  }

  .boturea-hamburger {
    display: flex !important;
    order: -1;
  }

  .boturea-search-mobile {
    display: none !important;
  }

  .boturea-nav__inner {
    justify-content: space-between;
  }

  /* Logo centré sur mobile */
  .boturea-nav__logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }

  /* Retirer backdrop-filter sur mobile — améliore le scroll */
  #boturea-nav {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .boturea-mobile-panel {
    background: rgba(242, 242, 247, 0.99) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

@media (max-width: 480px) {
  .boturea-nav__logo-text {
    display: none;
  }
}
