/* header.scss */
.navbar {
  background-color: #f7f9fa;
}

/* Style de base des liens */
.nav-link {
  display: inline-block;
  color: #337f77;
  font-weight: 500;
  transition: transform 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.nav-item-offset {
  transform: translateX(-55px);
  transition: transform 0.3s ease;
}

/* Hover */
.nav-link:hover {
  color: #f48d61;
  box-shadow: inset 0 -2px 0 0 #f48d61;
  transform: translateY(-2px);
}

/* Lien actif */
.nav-link.active {
  font-weight: 600;
  color: #f48d61 !important;
  box-shadow: inset 0 -2px 0 0 #f48d61;
}

.header-shift-up {
  transform: translateY(-25px);
}

.search-bar {
  transform: translateX(-30px);
  background-color: transparent;
  padding: 5px 10px;
  transition: all 0.2s ease-in-out;
}
.search-bar:focus-within {
  transform: translateY(-2px);
}

/* Badge de notification numérique pour les messages non lus dans le header */
.nav-unread-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background-color: #f48d61;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Desktop (lg and up): two-row centered layout ===== */
@media (min-width: 992px) {
  .navbar .container-fluid {
    flex-wrap: nowrap;
    align-items: center;
  }

  .navbar-collapse.flex-lg-column {
    align-items: center;
  }

  .navbar-collapse .search-bar {
    width: 60% !important;
  }
}

/* ===== Mobile / Tablet (below lg breakpoint) ===== */
@media (max-width: 991.98px) {
  .nav-item-offset {
    transform: none;
  }

  .header-shift-up {
    transform: none;
  }

  .search-bar {
    transform: none;
    width: 100% !important;
    padding: 5px 0;
  }

  .search-bar:focus-within {
    transform: none;
  }

  .navbar .navbar-collapse {
    padding-top: 0.5rem;
  }

  .navbar .navbar-collapse .navbar-nav {
    text-align: center;
    gap: 0;
  }

  .navbar .navbar-collapse .navbar-nav .nav-link {
    font-size: 1.1rem !important;
    padding: 0.5rem 0;
  }

  .navbar .navbar-collapse .navbar-nav .nav-link:hover {
    transform: none;
  }

  .navbar .d-flex.align-items-center {
    flex-shrink: 0;
  }
}
