/* =========================
   === MENU PRINCIPAL ===
   ========================= */

/* Top Menu Layout */
.menu, .menu_logged_admin {
  width: 100%;
  background-color: rgb(23, 59, 73);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 10px;
  height: 50px
}

.menu .menu-inner, .menu_logged_admin .menu-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  white-space: nowrap;
}

.left-menu, .menu-title, .right-menu {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: bold;
}

.left-menu {
  text-align: left;
  white-space: nowrap;
}

.menu-title {
  position: absolute;       /* détaché du flux flex */
  left: 50%;                /* centré horizontalement */
  transform: translateX(-50%);
  top: 0;                   /* part du haut de la barre */
  height: 60px;
  line-height: 50px; 

  
  font-size: 20px;
  font-weight: bold;
  color: #000;
  background-color: #6d968e;
  padding: 8px 20px;

  /* Effet "bavette/onglet" */
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}



.right-menu {
  text-align: right;
  white-space: nowrap;
}

.menu a, .menu_logged_admin a, .dropbtn {
  color: #fff;
  text-decoration: none;
  padding: 5px 10px;
  margin: 0 3px;
  display: inline-block;
  border-radius: 4px;
  transition: background-color 0.3s;
  font-size: 14px;
}

.menu a:hover, .menu_logged_admin a:hover, .dropbtn:hover {
  background-color: #637170;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: rgb(23, 59, 73);
  min-width: 150px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  z-index: 1001;
}

.dropdown-content a {
  color: #fff;
  padding: 10px 15px;
  text-decoration: none;
  display: block;
  text-align: left;
  border-radius: 4px;
  transition: background 0.3s;
}

.dropdown-content a:hover {
  background-color: #637170;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Responsive Layout Toggle */
#desktopMenu {
  display: block;
}

#mobileMenu {
  display: none;
}

@media (max-width: 800px) {
  #desktopMenu {
    display: none;
  }
  #mobileMenu {
    display: block;
  }
}
/* ========================
   === MENU MOBILE  ===
   ======================== */

/* === Boutons principaux (avec ou sans sous-menu) === */
.mobile-nav > li > a.mobile-link,
.mobile-nav .has-submenu > span {
  display: block;
  padding: 15px;
  text-decoration: none;
  color: #fff;
  font-size: 22px;
  width: 80%;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.5);
  margin: 8px auto;
  border-radius: 12px;
  background-color: rgba(57, 57, 57, 0.265);
}

/* === Sous-menu === */
.mobile-nav .submenu {
  display: none;
  padding: 0;
  margin: 0;
}

.mobile-nav .submenu.open {
  display: block;
}

.mobile-nav .submenu li {
  margin: 0;
}

.mobile-nav .submenu li a {
  display: block;
  padding: 15px;
  text-decoration: none;
  color: #000000;
  font-size: 22px;
  width: 70%;
  text-align: center;
  border: 2px solid rgb(255, 255, 255);
  margin: 4px auto;
  border-radius: 12px;
  background-color: rgba(168, 168, 168, 0.8);
}

/* === Toggle button === */
#mainMenuToggleButton {
  position: fixed;
  top: 10px;
  left: 10px;
  width: 40px;
  height: 40px;
  font-size: 24px;
  font-weight: bold;
  color: black;
  background-color: white;
  border: none;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 1100;
  cursor: pointer;
}

#mainMenuToggleButton.hidden {
  display: none;
}

/* === Mobile menu structure === */
#mainMenuMobile {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 100%;
  height: 100%;
  background-color: rgba(23, 59, 73, 1);
  color: #fff;
  z-index: 1000;
  font-family: Arial, sans-serif;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  margin: 0;
  padding: 0;
}

#mainMenuMobile.active {
  display: flex;
}

#mainMenuMobile .menu-header {
  width: 100%;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

#mainMenuMobile .menu-title {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  flex: 1;
}

#mainMenuMobile nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
  margin-top: 20px;
}

#mainMenuMobile nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

#mainMenuMobile .menu-close {
  cursor: pointer;
  font-size: 28px;
  background-color: #fd0000 !important;
  border: 1px solid #ffffff;
  user-select: none;
  padding: 5px 10px;
  border-radius: 4px;
}



/* ========================
   === MENU ADMIN PANEL ===
   ======================== */

#admin-menu-container {
  position: fixed;
  right: 10px;
  top: 55px;
  width: 300px;
  max-height: 80vh;
  overflow-y: auto;
  background: #7d1e09;
  color: white;
  font-family: sans-serif;
  padding: 10px;
  z-index: 1000;
  border: 5px solid #444;
  border-radius: 10px;
  display: none;
}

#admin-menu-container.admin-mobile {
  display: none;
  position: fixed;
  bottom: 70px;
  right: 20px;
  background: #681a1a;
  padding: 10px;
  border-radius: 8px;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 9998;
}

/* Admin section blocks */
.admin-section {
  margin-bottom: 10px;
  border-bottom: 1px solid #444;
}

.admin-section-title {
  cursor: pointer;
  font-weight: bold;
  padding: 8px;
  background: #333;
  border-radius: 4px;
}

.admin-section-title:hover {
  background: #474747;
}

.admin-section-links {
  display: none;
  padding: 10px;
  margin-top: 5px;
}

.admin-section-links a {
  display: block;
  padding: 4px 0;
  color: #ffffff;
  text-decoration: none;
}

.admin-section-links a:hover {
  color: #fff;
}

@media (max-width: 768px) {
  #admin-menu-container {
    display: none !important;
  }

  #admin-hover-zone {
    display: none;
  }

  #admin-menu-container.admin-mobile {
    display: none;
  }
}

