.menu {
    list-style: none;
    display: flex;
}

/* Traiement deskstop uniquement */

@media (min-width: 769px) {
  .navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.japanese-text-mobile {
  display:none;
}

.japanese-text {
  flex: 0 0 auto;
  text-align: right;
  font-size: 1.2em;
  color: white;
  margin-right: 2em;
}

.menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2em;
  flex: 1 1 auto;         /* Le menu peut s'étendre */
  padding: 0 2em;
}



  .has-submenu {
    position: relative;
  }

  .has-submenu > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #b33c2c;
    padding: 0.5em 0;
    margin: 0;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 160px;
  }

  .has-submenu:hover > ul {
    display: block;
  }

  .has-submenu > ul > li {
    padding: 0;
  }

  .has-submenu > ul > li > a {
    display: block;
    padding: 0.5em 1em;
    color: white;
    text-decoration: none;
  }

  .has-submenu > ul > li > a:hover {
    background-color: #9d2f22;
  }


    /* Niveau 1 : sous-menu */
    .has-submenu {
      position: relative;
    }

    .has-submenu > ul {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      background-color: #b33c2c;
      padding: 0;
      margin: 0;
      min-width: 180px;
      border-radius: 4px;
      box-shadow: 0 4px 6px rgba(0,0,0,0.15);
      z-index: 1000;
    }

    .has-submenu:hover > ul {
      display: block;
    }

    /* Niveau 2 : sous-sous-menu (affiché à droite) */
    .has-submenu > ul .has-submenu > ul {
      top: 0;
      left: 100%;
      position: absolute;
      background-color: #b33c2c;
      border-radius: 4px;
      box-shadow: 0 4px 6px rgba(0,0,0,0.15);
      z-index: 1000;
    }

    /* Petit espacement visuel */
    .has-submenu > ul > li {
      position: relative;
    }


}

/* Traitement mobile et deskstop */
.menu a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5em 0;
    display: block;
    transition: color 0.3s;
}
.menu ul {
    display: none;
    position: absolute;
    background-color: #b33c2c;
    top: 100%;
    left: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
    min-width: 150px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }


.menu li {
    position: relative;
}

/* Menu hamburger */
 .hamburger {
   display: none;
   flex-direction: column;
   cursor: pointer;
   padding: 0.5em;
 }

 .hamburger span {
   width: 25px;
   height: 3px;
   background-color: #fff;
   margin: 3px 0;
   margin-right: 25px;
   transition: 0.3s;
   border-radius: 2px;
 }

 /* Animation du hamburger */
 .hamburger.active span:nth-child(1) {
   transform: rotate(-45deg) translate(-5px, 6px);
 }

 .hamburger.active span:nth-child(2) {
   opacity: 0;
 }

 .hamburger.active span:nth-child(3) {
   transform: rotate(45deg) translate(-5px, -6px);
 }


/* comportement mobile  */
@media (max-width: 480px) {
    .menu {
        top: 60px;
        height: calc(100vh - 60px);
    }
}
@media (max-width: 768px) {
  .menu {
    display: none;
    flex-direction: column;
  }
  .japanese-text {
    display:none;
  }
  .japanese-text-mobile {
    position: relative;
    cursor: pointer;
    user-select: none;
    color: white;
  }
  .menu {
  display: none;
  flex-direction: column;
  background-color: #8c1c13; /* conserve ton rouge */
  padding: 1em 1.5em;
  border-top: 1px solid #fff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 999;
  }

  .menu.active {
  display: flex;
  }
  .menu.active {
    display: flex;
  }
  .menu.active {
      right: 0;
  }
  .has-submenu ul {
    display: none;
    flex-direction: column;
  }

  .has-submenu.active > ul {
    display: flex;
  }

.menu ul {
  position: static;
  display: none;
  background-color: #b33c2c;
  width: 100%;
  box-shadow: none;
  border-radius: 0;
  margin-top: 0;
}
/* on décale légèrement le sous menu  et le 2eme niveau */
/* Sous-menu direct (1er niveau) */
.menu .has-submenu > ul {
  padding-left: 1em;
  margin-left: 1em;
  width: calc(100% - 1em);
  background-color: #9c2e23; /* un peu plus foncé */
  border-left: 2px  rgba(255,255,255,0.2);
}

/* Sous-sous-menu (2e niveau) */
.menu .has-submenu > ul .has-submenu > ul {
  padding-left: 1em;
  margin-left: 1.5em;
  width: calc(100% - 2.5em);
  background-color: #a53729; /* encore un peu plus foncé */
  border-left: 2px  rgba(255,255,255,0.2);
}

/* Optionnel : corriger le bas du bloc pour éviter l'impression de double bordure */

.menu > li,
.menu .has-submenu > ul > li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* discret et uniforme */
}

.menu > li:last-child,
.menu .has-submenu > ul > li:last-child {
  border-bottom: none; /* pas de trait en bas du dernier */
}



  .hamburger {
    display: flex;

  }

  .hamburger span {
    background: white;
    height: 3px;
    width: 25px;
  }
    .menu ul {
      position: static;
      display: none;
      background-color: #b33c2c;
      width: 100%;
      box-shadow: none;
      border-radius: 0;
      margin-top: 0;
  }
  .menu > li > a {
    padding: 1em;
    border-bottom: 1px solid #ffffff33;
    font-size: 1.1em;
}
.menu > li {
  margin: 0;
  width: 80%;
  text-align: center;
}
  .menu > li > a::after, .has-submenu > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 10px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #fff;
    transition: transform 0.3s;
  }

  .menu > li.active > a::after, .has-submenu.active > a::after {
    transform: rotate(180deg);
  }



  .menu > li:not(.has-submenu) > a::after {
    display: none;
  }


} /* Fin style mobile menu */
