.text-container-header {
  display: flex;
  flex-direction: column; /* Aligner les mots verticalement */
  justify-content: center;
  align-items: center;
  height: 70px; /* Hauteur totale du conteneur des mots */
  width: auto;
}

.text-item-header {
  font-size: 1.4rem;
  font-weight: bold;
  border: 1px solid var(--text-color);
  padding: 10px;
  border-radius: 25px;
  margin: 0; /* Pas de marge entre les mots */
  color: var(--text-color);
  text-align: left; /* Centrer les mots */
  transition: color 0.3s;
}
.text-item-header:hover {
  color: var(--primary);
}
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

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

.nav-links a {
  text-decoration: none;
  font-weight: 400;
  font-size: 0.94rem;
  color: var(--text-color); /* Texte noir par défaut */
  position: relative;
  transition: color 0.3s ease; /* Transition de couleur */
}

.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(--primary); /* 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 */
}

.nav-links a:hover {
  color: var(--primary); /* Changement de couleur du texte au survol */
}
/* Ajouter l'effet "maintenu" quand le lien est actif */
.nav-links a.active {
  color: var(--primary); /* 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 */
}

@media (max-width: 350px) {
  .text-item-header {
    font-size: 1rem;
  }
}
@media (max-width: 280px) {
  .text-item-header {
    font-size: 0.9rem;
  }
}
