.navbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent;
  z-index: 1000; /* Assure qu'elle est au-dessus */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 25px 20px;
  backdrop-filter: blur(0px); /* Aucune opacité ajoutée */
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.5s ease; /* Transition douce pour l'opacité et le décalage */
}
.navbar:hover {
  background-color: rgba(233, 148, 148, 0.27);
  backdrop-filter: blur(10px); /* Aucune opacité ajoutée */
}
/* ---- LOGO ---- */
.logo-container {
  position: absolute;
  left: 0; /* Place le logo complètement à gauche */
  top: 50%;
  transform: translateY(-50%); /* Centre verticalement le logo */
  padding-left: 20px; /* Ajuste l'espace à gauche */
}
.logo {
  padding: 5px;
  background-color: rgba(255, 255, 255, 0.2); /* 50% de transparence */
  border-radius: 15px;
  backdrop-filter: blur(5px);
  height: 80px; /* Ajuste la taille du logo */
  width: auto; /* Garde les proportions */
}

/* Centre bien les liens */
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 1000;
}

.nav-links li {
  margin: 0 25px;
  padding: 15px 0;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--text-color); /* Texte noir par défaut */
  position: relative;
  transition: color 0.3s ease;
}
.nav-links a:hover {
  color: var(--pink2-color); /* Changement de couleur du texte au survol */
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -30px; /* La barre commence 30px en dessous du lien */
  left: 0;
  width: 100%;
  height: 2px; /* Hauteur de la barre */
  background-color: var(--pink2-color); /* Couleur dorée de la barre */
  transform: translateY(0); /* La barre commence avec aucun décalage */
  opacity: 0; /* La barre est invisible au départ */
  transition: opacity 0.3s ease, transform 0.5s ease; /* Animation de l'opacité et de la translation */
}

.nav-links a:hover::after {
  opacity: 1; /* La barre devient visible lors du survol */
  transform: translateY(
    -15px
  ); /* Lors du survol, la barre remonte de -30px à -15px */
  background-color: var(--pink2-color);
}

/* Ajouter l'effet "maintenu" quand le lien est actif */
.nav-links a.active {
  color: var(--pink2-color); /* La couleur devient la couleur du survol */
}

.nav-links a.active::after {
  opacity: 1; /* La barre devient visible comme lors du survol */
  transform: translateY(-15px); /* Position finale de la barre sous le texte */
  color: var(--pink2-color);
}
/* Classe invisible qui cache la navbar */
.navbar.invisible {
  opacity: 0; /* Navbar invisible */
  transform: translateY(-100%); /* Déplace la navbar hors de la vue */
}
/* Classe visible qui montre la navbar */
.navbar.visible {
  position: fixed;
  opacity: 1; /* Navbar visible */
  transform: translateY(0); /* Réinitialise la position de la navbar */
  background-color: rgba(
    233,
    148,
    148,
    0.27
  ); /* Fond transparent lorsque la navbar est visible */
  backdrop-filter: blur(10px); /* Fond flou */
}
/* Navbar avec fond modifié */
.navbar.scrolled {
  background-color: rgba(0, 0, 0, 0.8); /* Change le fond */
  transition: background-color 0.4s ease-in-out;
}
/* 🔥 Icône Burger */
.burger-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 20;
  width: 30px;
  height: 30px;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.burger-menu span {
  position: absolute;
  width: 30px;
  height: 3px;
  background: var(--pink-color);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* ✅ Animation en croix parfaitement carrée */
.burger-menu span:nth-child(1) {
  transform: translateY(-10px);
}
.burger-menu span:nth-child(3) {
  transform: translateY(10px);
}

/* 🔄 Quand on active */
.burger-menu.active span:nth-child(1) {
  transform: translateY(0) rotate(45deg);
}
.burger-menu.active span:nth-child(2) {
  opacity: 0;
}
.burger-menu.active span:nth-child(3) {
  transform: translateY(0) rotate(-45deg);
}

/* 🟢 Menu Mobile */
@media screen and (max-width: 1023px) {
  .navbar {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 50px 20px;
    background-color: transparent; /* Complètement transparente */
    backdrop-filter: blur(0px); /* Aucune opacité ajoutée */
  }
  .burger-menu.active span {
    background: black;
  }
  .nav-links a:hover {
    color: black;
  }
  .navbar:hover {
    background-color: rgba(
      0,
      0,
      0,
      0
    ); /* Aucune couleur de fond lorsque le menu burger est actif */
    backdrop-filter: none; /* Pas de flou */
  }
  /* Ajouter l'effet "maintenu" quand le lien est actif */
  .nav-links a.active {
    color: black;
  }

  .nav-links a.active::after {
    color: black;
  }

  .nav-links a::after {
    background-color: black;
  }
  .nav-links a:hover::after {
    background-color: black;
  }
  .burger-menu {
    display: flex;
    margin: 0px 0px 20px 20px;
  }
  .logo {
    margin-top: 10px;
    height: 80px; /* Ajuste la taille du logo */
    width: auto; /* Garde les proportions */
  }
  .nav-links {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    z-index: 15;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);

    /* 🎭 Accordéon + Masquer complètement */
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 1;
    transform: translateY(-100%);
    transition: transform 0.4s ease-in-out, max-height 0.4s ease-in-out,
      visibility 0.3s ease;
  }

  /* ✅ Quand on ouvre le menu */
  .nav-links.show {
    max-height: 500px;
    visibility: visible;
    background-color: rgba(255, 239, 244, 0.9);

    transform: translateY(0);
  }
}

@media screen and (max-width: 500px) {
  .navbar {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 40px 20px;
    background-color: transparent; /* Complètement transparente */
    backdrop-filter: blur(0px); /* Aucune opacité ajoutée */
  }
}
@media screen and (max-width: 400px) {
  .logo {
    margin-top: 0px;
    height: 60px; /* Ajuste la taille du logo */
  }
}
@media screen and (max-width: 340px) {
  .logo {
    height: 50px; /* Ajuste la taille du logo */
  }
}