/* =============================================
   header.css — Barre de navigation ZaraSpace
   ============================================= */

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

/* =============================================
   TOP NAVBAR (desktop + mobile)
   ============================================= */

.zs-main-navbar {
  height: var(--header-h);
  padding: 0 !important;
  background: #fff;
  z-index: 1030;
}

.zs-main-navbar .navbar-brand { padding: 0 !important; margin: 0 !important; }
.zs-topbar { height: 100%; flex-wrap: nowrap !important; }

/* ===== Search ===== */
.zs-search-wrap{
  position: relative;
  height: 35px;
  width: 100%;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 999px;
  background: #fff;
  display: flex;
  align-items: center;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.zs-search-inline-icon{
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  pointer-events: none;
  font-size: 14px;
}

.zs-search-input{
  width: 100%;
  height: 100%;
  border: 0 !important;
  padding-left: 38px;
  padding-right: 14px;
  background: transparent !important;
  box-shadow: none !important;
}

.zs-search-wrap:focus-within{
  border-color: #86b7fe;
  box-shadow: 0 0 0 .25rem rgba(13,110,253,.25);
}

/* ===== Icons badges ===== */
.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;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: .65rem;
  line-height: 1rem;
  font-weight: 600;
  text-align: center;
}

/* =============================================
   MOBILE ONLY
   ============================================= */
@media (max-width: 991.98px) {

  /* =========================================
     BOTTOM NAV
     ========================================= */
  .zs-bottom-nav {
    position: fixed;
    inset: auto 0 0 0;
    height: var(--zs-bottom-nav-h);
    background: #fff;
    border-top: 1px solid #dee2e6;
    z-index: 1030;
    transition: transform .22s ease, opacity .22s ease;
  }

  /* ✅ MODE: hidden (FORCÉ) => désactivée totalement */
  body.zs-bottom-nav-hidden #zsMobileBottomNav,
  body.zs-bottom-nav-hidden .zs-bottom-nav{
    display: none !important;
    transform: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* ✅ MODE: runtime auto hidden => slide (par scroll down) */
  body.zs-bottom-nav-auto-hidden .zs-bottom-nav{
    transform: translateY(110%);
    opacity: .98;
    pointer-events: auto;
  }

  /* ✅ MODE: focus => cachée (slide) */
  body.zs-bottom-nav-focus .zs-bottom-nav{
    transform: translateY(110%);
    opacity: .98;
  }

  /* ✅ MODE: always => visible en permanence */
  body.zs-bottom-nav-always .zs-bottom-nav{
    display: block !important;
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* ✅ Important: position relative + variables pour la barre animée */
  .zs-bottom-nav-inner {
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;

    --active-x: 0px;
    --active-w: 0px;
  }

  .zs-bottom-nav-inner::before{
    content:"";
    position:absolute;
    top: -1px;
    left: var(--active-x);
    width: var(--active-w);
    height: 2px;
    border-radius: 0 0 999px 999px;
    background: var(--bs-primary);
    box-shadow: 0 2px 8px rgba(13,110,253,.45);
    pointer-events: none;
    will-change: left, width;
    transition: none;
  }

  .zs-bottom-nav-inner.zs-activebar-ready::before{
    transition: left .24s ease, width .24s ease;
  }

  .zs-bottom-link,
  .zs-bottom-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: #495057;
    position: relative;
    text-decoration: none;
  }

  .zs-bottom-link i,
  .zs-bottom-btn i {
    font-size: 1.25rem;
  }

  .zs-bottom-link:hover {
    background: #f1f3f5;
    color: var(--bs-primary);
  }

  .zs-bottom-link.active {
    color: var(--bs-primary) !important;
  }

  .zs-bottom-link.active::before{
    display: none !important;
    content: none !important;
  }

  .zs-bottom-link-plus {
    width: 40px;
    height: 40px;
    background: var(--bs-primary);
    color: #fff !important;
  }

  /* =========================================
     PLUS DROPDOWN (CENTER FIX)
     ========================================= */
  .zs-plus-dropup{ position: relative; }

  .zs-plus-dropup .zs-plus-dropdown{
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    min-width: 240px;
    max-width: min(92vw, 340px);
    z-index: 1040;
  }

  .zs-plus-dropup.dropup .zs-plus-dropdown{
    bottom: calc(100% + .55rem);
    top: auto !important;
    margin: 0 !important;
  }

  /* =========================================
     SIDEBAR MOBILE
     ========================================= */
  .zs-header-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 320px);
    background: #fff;
    border-right: 1px solid #dee2e6;
    z-index: 1040;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform .35s cubic-bezier(.22,.61,.36,1), opacity .35s;
    display: flex;
    flex-direction: column;
  }

  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;
    transition: opacity .25s;
  }

  body.zs-header-sidebar-open .zs-header-sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

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

  .zs-sidebar-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: .5rem;
  }

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

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

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

/* =============================================
   DESKTOP ONLY
   ============================================= */
@media (min-width: 992px) {
  .zs-header-sidebar,
  .zs-header-sidebar-backdrop,
  .zs-bottom-nav {
    display: none !important;
  }
}
