/* === STRUCTURE SIMPLE POUR NAVBAR === */

.main-header {
  background-color: #bcb3b3;
  width: 100%;
  position: sticky; /* ✅ rend le header sticky */
  top: 0; /* ✅ colle au haut de la page */
  z-index: 1000; /* ✅ passe au-dessus du reste */
  height: 112px;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 3.5rem;
  box-sizing: border-box;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  height: 100%;
}

.header-left {
  justify-content: flex-start;
  padding-left: 2rem;
  overflow: hidden;
}

.header-right {
  position: relative; /* <== Nécessaire pour que le position:absolute fonctionne correctement */
  justify-content: flex-end;
  gap: 2rem;
}

/* Logo centré à l’écran (au centre absolu de la page) */
.header-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  pointer-events: none;
}

.header-logo {
  height: 80px;
  max-height: 10vh;
  display: block;
}

/* === NOM DE L'ENTREPRISE === */
.brand-name {
  font-size: 1.2rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0.4rem; /* 🟡 contrôle espace entre chaque mot */
}

.brand-name .initial {
  color: #e7e160;
  font-weight: bold;
  margin-right: -0.1rem; /* 🟢 colle la majuscule au mot */
}

.brand-name span {
  font-size: 1.2rem;
  white-space: nowrap;
}

.brand-initials {
  display: none;
}

/* === NAVIGATION === */
.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
  height: 100%;
}

.nav-menu a {
  position: relative;
  text-decoration: none;
  color: #333;
  font-size: 1rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  height: 100%;
  transition: color 0.3s ease;
}

.btn-creer-compte-navbar {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  background-color: #e7e160;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: bold;
  color: #333;
  text-decoration: none;
  line-height: 1.2;
  vertical-align: middle;
}

.btn-creer-compte-navbar:hover {
  background-color: #e3e5e5;
  color: #000;
}

/* === Responsive menu burger (≤1440px) === */
.burger-button {
  display: none;
}

.mobile-menu {
  display: none;
}

@media screen and (max-width: 1440px) {
  .nav-menu {
    display: none;
  }

  .burger-button {
    display: block;
    position: absolute;
    top: 50%; /* place le coin supérieur au milieu du header */
    right: 10px; /* tu peux ajuster selon ton goût horizontalement */
    transform: translateY(
      -50%
    ); /* remonte le bouton de moitié de sa propre hauteur */
    font-size: 2rem;
    background: none;
    border: none;
    color: black;
    z-index: 9999;
    cursor: pointer;
  }

  .mobile-menu {
    display: none;
    flex-direction: column;

    /* plein écran sous le header sticky */
    position: fixed;
    top: 112px; /* = hauteur de .main-header */
    left: 0;
    right: 0;
    width: 100vw;

    background-color: #e3e5e5;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 999; /* sous le bouton à 9999, au-dessus du contenu */
  }

  .mobile-menu.show {
    display: flex;
  }

  .mobile-menu a {
    position: relative;
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #ccc;
    transition: color 0.3s ease;
  }

  .mobile-menu a::after {
    content: "";
    position: absolute;
    bottom: 8px; /* ajuste pour la hauteur de ligne */
    left: 0;
    width: 0%;
    height: 2px;
    background-color: #e7e160;
    transition: width 0.3s ease;
  }

  .mobile-menu a:hover::after {
    width: 100%;
  }

  .mobile-menu a:last-child {
    border-bottom: none;
  }

  .brand-name {
    display: none;
  }

  .brand-initials {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: #e7e160;
    margin-left: -32px;
  }
}

@media screen and (min-width: 1025px) {
  .brand-name {
    margin-left: 250px; /* 📐 gradation horizontale sur grand écran */
  }
}

/* === Scroll Lock === */
/* Pour empêcher le scroll de la page principale quand le menu mobile est ouvert */
body.scroll-lock {
  overflow: hidden;
}
