/* ==========================================================================
   MENU BURGER – Bouton d'ouverture (3 barres)
   ========================================================================== */
.menu-burger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10001; /* Au-dessus du menu mobile */
  transition: transform 0.3s ease;
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
}

/* Accessibilité visuelle au focus clavier */
.menu-burger:focus-visible {
  background: #eaf6fa;
}

/* Barres horizontales */
.burger-barre {
  height: 3px;
  width: 100%;
  background-color: var(--couleur-texte);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Animation de transformation en croix */
.menu-burger.ouvert .burger-barre:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-burger.ouvert .burger-barre:nth-child(2) {
  opacity: 0;
}
.menu-burger.ouvert .burger-barre:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   MENU MOBILE – Conteneur principal
   ========================================================================== */
.menu-mobile {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;

  /* Couleur + flou de fond pour immersion */
  background-color: rgba(34, 48, 90, 0.96);
  backdrop-filter: blur(6px);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  /* Menu caché par défaut */
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;

  /* Animation douce */
  transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out, backdrop-filter 0.3s ease-in-out;
  z-index: 10000;
}

/* Menu visible (ajouté dynamiquement) */
.menu-mobile.actif {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   BOUTON DE FERMETURE (croix en haut à droite)
   ========================================================================== */
.menu-fermer {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  font-size: 2.2rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10002;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hover couleur accent */
.menu-fermer:hover {
  color: var(--couleur-accent);
}

/* ==========================================================================
   TITRE DU MENU (pseudo-élément remplacé pour accessibilité)
   ========================================================================== */
.menu-mobile::before {
  content: "Navigation";
  font-size: 1.6rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 4rem;
  display: block;
  text-align: center;
}

/* On masque l'ancien titre HTML (inutile) */
.menu-contenu h2.titre-menu {
  display: none;
}

/* ==========================================================================
   LIENS DU MENU MOBILE
   ========================================================================== */

/* Conteneur des <ul> */
.menu-mobile ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

/* Animation des <li> avec décalage progressif */
.menu-mobile li {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInSlide 0.4s ease-in-out forwards;
}
.menu-mobile li:nth-child(1) { animation-delay: 0.2s; }
.menu-mobile li:nth-child(2) { animation-delay: 0.3s; }
.menu-mobile li:nth-child(3) { animation-delay: 0.4s; }
.menu-mobile li:nth-child(4) { animation-delay: 0.5s; }
.menu-mobile li:nth-child(5) { animation-delay: 0.6s; }

/* Animation glissante douce */
@keyframes fadeInSlide {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Liens stylisés */
.lien-menu-mobile {
  font-size: 1.3rem;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  margin: 1rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

/* Hover couleur accent */
.lien-menu-mobile:hover {
  color: var(--couleur-accent);
}
