/* ==========================================================================
    HEADER STICKY & BURGER ASYMÉTRIQUE
   ========================================================================== */

.main-header.sticky {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--blanc-pur);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-top {
  display: flex;
  align-items: stretch; /* Crucial pour que la bordure prenne toute la hauteur */
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* GROUPE GAUCHE : Burger + Logo */
.header-left {
  display: flex;
  align-items: center;
}

.burger-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem;
  background: none;
  border: none;
  /* LA BORDURE SÉPARATRICE */
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.burger-icon {
  width: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
}

.burger-icon .line {
  height: 2px;
  background-color: var(--vert-inst-fonce);
  border-radius: 2px;
}

/* L'effet asymétrique que tu voulais */
.line:nth-child(1) {
  width: 100%;
}
.line:nth-child(2) {
  width: 70%;
}
.line:nth-child(3) {
  width: 40%;
}

.burger-text {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--vert-inst-fonce);
}

.logo-container {
  padding: 0 1rem;
}

.logo-img {
  height: 40px; /* À ajuster selon ton image */
  width: 50px;
}

/* GROUPE DROITE : Mon Espace */
.btn-espace {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vert-inst-fonce);
  margin-top: 0.6rem;
}

/* BARRE DE RECHERCHE (Pleine largeur) */
.header-search {
  padding: 0.75rem var(--space-m);
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrapper input {
  padding-right: 3rem; /* Espace pour l'icône à droite */
  border-radius: 25px; /* Plus moderne pour une barre de recherche */
}

.search-submit {
  position: absolute;
  right: 5px;
  background: none;
  border: none;
  color: var(--vert-inst-fonce);
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
    FIN HEADER STICKY & BURGER ASYMÉTRIQUE
   ========================================================================== */

/* ==========================================================================
    MENU MOBILE - DESIGN & ANIMATIONS
   ========================================================================== */

/* Conteneur principal (Nav) */
.mobile-menu {
  position: fixed;
  bottom: -100%; /* Cache en bas au départ */
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* OUVERTURE DU BAS VERS LE HAUT */
.mobile-menu.is-open {
  bottom: 0;
}

/* --- BARRE SUPÉRIEURE (HEADER) --- */
.menu-top-bar {
  display: flex;
  align-items: center; /* Aligne avec le bouton burger */
  justify-content: space-between;
  height: 60px; /* Doit être identique à la hauteur de ton bouton burger */
  padding: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* BOUTON RETOUR (Gauche - Fond Rouge) */
/* Le conteneur carré à gauche */
.menu-top-left {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Le logo (visible au début) */
.menu-logo {
  max-height: 50px;
  width: 50px;
}

/* Le bouton retour (caché au début) */

.btn-back {
  width: 60px;
  height: 60px;
  background-color: rgba(245, 245, 245, 0.5);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.btn-back img {
  width: 80%; /* Taille de ta flèche blanche */
  height: 80%;
  display: block;
}

/* La classe pour cacher l'un ou l'autre */
.hidden {
  display: none !important;
}

.icon-back {
  color: #ffffff; /* Blanc pur pour visibilité */
  font-size: 2.2rem; /* Tête large bien visible */
  line-height: 1;
}

.icon-back {
  /* INDISPENSABLE pour que la balise vide s'affiche */
  display: inline-block;
  width: 15px;
  height: 15px;
  /* On dessine deux côtés d'un carré */
  border-bottom: 4px solid #ffffff;
  border-left: 4px solid #ffffff;
  /* On le tourne pour faire une flèche qui pointe à gauche */
  transform: rotate(45deg);
  margin-left: 5px;
}

.btn-back.hidden {
  visibility: hidden;
}

/* TITRE DYNAMIQUE CENTRÉ */
.menu-title {
  flex-grow: 1;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--vert-inst-fonce);
  padding: 0 10px;
  margin-top: 1rem;
  text-transform: uppercase;
}

/* BOUTON FERMER (Droite - Carré avec Croix + Texte) */
.btn-close {
  width: 60px; /* Carré */
  height: 60px;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.icon-close {
  /* On agrandit massivement la croix */
  font-size: 2rem;
  /* On réduit l'interligne pour que la croix ne pousse pas le texte "Fermer" trop bas */
  line-height: 0.7;
  color: #000;
  display: block;
}

.text-close {
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #000;
  /* On remonte un peu le texte pour qu'il soit bien collé sous la grande croix */
  margin: 0.5rem 0 0 0;
  padding-bottom: 0rem;
}

/* --- LOGIQUE DE NAVIGATION (PANNEAUX) --- */
.menu-panels {
  position: relative;
  flex-grow: 1;
  overflow: hidden;
}

.menu-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  /* GLISSEMENT DE LA GAUCHE VERS LA DROITE */
  transform: translateX(-100%);
  transition: transform 0.4s ease-in-out;
  overflow-y: auto;
  padding-top: 3rem;
}

.menu-panel.active {
  transform: translateX(0);
  z-index: 10;
}

/* --- STYLE DES LISTES --- */
.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* HAUTEUR DÉFINIE : On fixe à 50px pour tout le monde */
  text-transform: uppercase;
  height: 2.5rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--vert-inst-fonce);
  cursor: pointer;
}

/* Force le lien Accueil à prendre toute la hauteur du <li> */
.menu-list li a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%; /* Il remplit les 50px du parent */
}

/* FLÈCHE À DROITE (Orange, Fine, Tête Large) */
.arrow-indicator {
  color: #ffa500; /* Orange */
  /*font-size: 1.5rem;*/
  font-weight: normal; /* Simple, pas grasse */
  margin-left: 10px;
}

/* LIGNE DES RÉSEAUX SOCIAUX */
.menu-list li.menu-socials {
  display: flex;
  justify-content: space-evenly; /* Aligne les 4 liens avec le même espace */
  align-items: center;
  height: 60px;
  background-color: #f9f9f9; /* Fond légèrement grisé pour distinguer */
  padding: 0;
  border-bottom: none; /* Pas de bordure pour la dernière ligne */
}

.menu-socials a {
  color: var(--vert-inst-fonce);
  width: 44px; /* Zone tactile large */
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
