:root {
  --navbar-height: 73px; /* Important pour calculer le padding des pages */
}

.navbar {
  border-bottom: 1px solid #ebebf0;
  padding: 15px 30px;
  background: #ffffffcc;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: white;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.fixed {
  position: relative;
}

.navbar.hidden {
  transform: translateY(-100%);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.navbar .container .left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 29px;
}

.navbar .container .left .logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.navbar .container .left .logo img {
  height: 42px;
  width: 42px;
  border-radius: 11px;
  object-fit: cover;
}

.navbar .container .left .logo span {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 25px;
  color: #1a1c1f;
}

.navbar .container .left .links a {
  display: inline-block;
  padding: 12px 24px;
  font-weight: 500;
  font-size: 15px;
  color: #1a1c1f;
  transition: all 0.3s ease;
}

.navbar .container .left .links a:hover {
  transform: scale(1.05);
}

.navbar .container .right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.navbar .container .right a {
  padding: 12px 24px;
  font-weight: 600;
  font-size: 15px;
  color: #1a1c1f;
  transition: all 0.3s ease;
}

.navbar .container .right a:hover {
  transform: scale(1.05);
}

.navbar .container .right .download-btn {
  padding: 12px 24px;
  font-weight: 500;
  font-size: 15px;
  color: #ffffff;
  background: #1a1c1f;
  border-radius: 60px;
}

.navbar .container .right .name-btn {
  display: inline-block; /* Permet d'appliquer une largeur */
  max-width: 200px;
  overflow: hidden; /* Masque ce qui dépasse */
  white-space: nowrap; /* Empêche le texte de revenir à la ligne */
  text-overflow: ellipsis; /* Ajoute les "..." */
  vertical-align: middle; /* Aligne proprement avec le reste du texte */
}

.navbar .container .right .log-btn {
  padding: 6px 12px;
  font-weight: 400;
  font-size: 12px;
  color: #1a1c1f;
  background: #ebebf0;
  border-radius: 10px;
}

.navbar .container .menu-icon {
  display: none;
}

.navbar .container .menu-icon span {
  width: 30px;
  height: 3px;
  background: #1a1c1f;
  border-radius: 10px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease; /* ✅ animation fluide */
}

/* Croix : on fait pivoter le 1er et 3e trait, on cache le 2e */
.navbar .container .menu-icon.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.navbar .container .menu-icon.active span:nth-child(2) {
  opacity: 0;
}

.navbar .container .menu-icon.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.navbar .menu-links {
  display: none;
  position: absolute;
  top: 57px;
  right: -15px;
  background: #ffffff;
  border: 1px solid #ebebf0;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  padding: 15px 20px;
  z-index: 999;
  min-width: 200px;
}

.navbar .menu-links a {
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 15px;
  color: #1a1c1f;
}

.navbar .menu-links a:hover {
  transform: scale(1.03);
  color: #565656;
}

.navbar .menu-links .left-links {
  display: none;
}

@media screen and (max-width: 950px) {
  .navbar .container .right {
    display: none;
  }

  .navbar .container .menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    gap: 5px;
    transition: all 0.3s ease;
  }

  .navbar .container .menu-icon:hover {
    transform: scale(1.05);
  }

  .navbar .menu-links.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
  }
}

@media screen and (max-width: 583px) {
  .navbar .container .left .links {
    display: none;
  }

  .navbar .menu-links.active .left-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
  }
}
