/* =============================================
   header.css — Barre de navigation Zara Space
   ============================================= */

.dropdown-item:hover {
  background-color: var(--bs-primary);
  color: #fff;
}

#navbarMenu .active {
  color: var(--bs-primary) !important;
}

/* ===== Sidebar mobile ZaraSpace (inspiré ZaraStore) ===== */
@media (max-width: 991.98px) {
  .zs-header-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 320px);
    background: #fff;
    border-right: 1px solid #dee2e6;
    padding: 1rem 1rem 1rem;
    overflow-y: auto;
    z-index: 1040;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    transition:
      transform .4s cubic-bezier(.22, .61, .36, 1),
      opacity .4s cubic-bezier(.22, .61, .36, 1);
  }

  body.zs-header-sidebar-open .zs-header-sidebar {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .zs-header-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .25);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity .4s,
      visibility 0s linear .4s;
  }

  body.zs-header-sidebar-open .zs-header-sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
      opacity .3s,
      visibility 0s;
  }

  .zs-sidebar-header {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
    padding-bottom: .75rem;
    margin-bottom: .75rem;
    border-bottom: 1px solid #dee2e6;
  }

  .zs-sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #495057 !important;
    text-decoration: none;
    border-radius: .5rem;
    padding: .5rem .6rem;
  }

  .zs-sidebar-nav .nav-link i {
    width: 1.2rem;
    text-align: center;
  }

  .zs-sidebar-nav .nav-link:hover {
    background: #f1f3f5;
    color: var(--bs-primary) !important;
    text-decoration: none;
  }

  .zs-sidebar-nav .nav-link.active {
    background: #e7f1ff;
    color: var(--bs-primary) !important;
    font-weight: 600;
  }

  .zs-sidebar-section-title {
    font-size: .75rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6c757d;
    margin: .25rem .25rem .5rem;
  }

  /* ===== Barre de recherche mobile ===== */
  #zsGlobalSearchForm {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0;
  }

  #zsGlobalSearchForm .input-group {
    width: clamp(140px, 50vw, 260px);
    transition: width .3s ease;
    will-change: width;
  }

  #zsGlobalSearchForm:focus-within .input-group {
    width: 100%;
  }
}

@media (min-width: 992px) {
  .zs-header-sidebar,
  .zs-header-sidebar-backdrop {
    display: none !important;
  }

  /* ===== Barre de recherche desktop ===== */
  #zsGlobalSearchForm {
    flex: 0 1 auto;
    min-width: 0;
  }

  #zsGlobalSearchForm .input-group {
    width: clamp(200px, 24vw, 320px);
    transition: width .3s ease;
    will-change: width;
  }

  #zsGlobalSearchForm:focus-within .input-group {
    width: clamp(260px, 32vw, 420px);
  }
}

/* Icônes avec badge (messages / notifications) */
.zs-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.zs-icon-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.35rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 .2rem;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: .65rem;
  line-height: 1rem;
  text-align: center;
  font-weight: 600;
}