/* ===========================
   HEADER
=========================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #ddd;
}

/* LIGNE HAUTE */
.header-top {
  display: flex;
  align-items: center;        /* alignement vertical */
  gap: 30px;
  padding: 25px 15px 10px;
}

/* LOGO */
.header-logo {
  flex: 0 0 auto;             /* largeur fixe = logo */
}

.header-logo img {
  max-width: 520px;
  height: auto;
}

/* TEXTE : PREND TOUTE LA LARGEUR RESTANTE */
.header-text {
  flex: 1; 
  text-align: center;         /* centre le texte DANS l’espace restant */
}

.header-text h1 {
  font-size: 1.8rem;
  color: #2a7f62;
  margin-bottom: 6px;
}
.header-text h2 {
  font-size: 1.1rem;
  color: #2a7f62;
  margin-bottom: 6px;
}

.header-text p {
  margin: 3px 0;
  color: #555;
  font-size: 1rem;
}

/* ===========================
   MENU
=========================== */
.nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 12px 0 18px;
  align-items: center; /* alignement vertical uniforme */
}

.nav a {
  color: #2a7f62;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
}

.nav a.active,
.nav a.active:hover {
  background: #2a7f62;
  color: #fff;
  font-weight: 600;
}

/* Hover léger*/
.nav a:hover {
  background: rgba(42, 127, 98, 0.1);
}

.has-submenu > a::after {
  content: " ▼";
  font-size: 0.7em;
}

/* ===========================
   SOUS-MENU
=========================== */
.nav-item {
  position: relative;
  display: flex;
  align-items: center; /* même hauteur que les <a> */
}

/* Conteneur du sous-menu */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 6px;
  min-width: 220px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  z-index: 1000;
}

/* Liens du sous-menu */
.submenu a {
  display: block;
  padding: 10px 15px;
  color: #2a7f62;
  text-decoration: none;
  font-weight: 500;
}

.submenu a:hover {
  background: #f0f6f3;
}

/* OUVERTURE AU SURVOL (DESKTOP) */
@media (min-width: 901px) {
  .has-submenu:hover .submenu {
    display: block;
  }
}


/* ===========================
   SOUS-MENU LEVEL 2
=========================== */

.submenu-item {
  position: relative;
}

.submenu-item > a::after {
  content: " ▼";
  font-size: 0.7em;
}

/* menu niveau 2 */
.submenu-level2 {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  background: #fff;
  border: 1px solid #ddd;
  min-width: 220px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* ouverture au survol */
.submenu-item:hover .submenu-level2 {
  display: block;
}

.submenu-level2 a:hover {
  background: #f0f6f3;
}

.back-btn {
  display: none;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
	body.menu-open {
  overflow: hidden;
}

  .header-top {
    flex-direction: column;
    gap: 15px;
  }

  .header-text {
    flex: none;
    width: 100%;
  }

  /* BOUTON BURGER */
  .burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    margin: 10px auto;
	position: relative;
	z-index: 9999;
  }

  .burger span {
    width: 25px;
    height: 3px;
    background: #2a7f62;
  }

  /* MENU CACHÉ PAR DÉFAUT */
   .nav {
    display: none;
    position: fixed;
    top: 0;  
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    overflow-y: auto;

    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    padding-top: 120px;
  }

  .nav.active {
    display: flex;
  }

 .submenu {
  display: none;
}

.has-submenu.open .submenu {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #fff;
  z-index: 9999;
  overflow-y: auto;
}

  /* cache menu principal quand sous-menu ouvert */
  .nav.submenu-open > * {
    display: none;
  }
  
  .nav.submenu-open .has-submenu.open {
  display: block;
}

 .submenu-level2 {
    display: none;
  }

  .submenu-item.open .submenu-level2 {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 10001;
    overflow-y: auto;
  }

  /* bouton retour */
  .back-btn {
    display: block;
    padding: 15px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
  }
}

