/* ------------------------------------------------------------
   🍔 Bo-DONG — menu.css
   Styles pour le menu burger et navigation
------------------------------------------------------------- */

/* Burger Button */
#burger-button {
  position: fixed;
  top: 22px;
  left: 20px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

#burger-button:hover {
  transform: scale(1.05);
}

#burger-button:active {
  transform: scale(0.95);
}

#burger-button span {
  width: 20px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
}

#burger-button.open span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

#burger-button.open span:nth-child(2) {
  opacity: 0;
}

#burger-button.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Overlay */
#menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none !important; /* FORCER à ne jamais bloquer sauf quand visible */
  transition: opacity 0.3s ease;
  z-index: 90;
  visibility: hidden; /* Cacher complètement par défaut */
}

#menu-overlay.visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto !important;
}

/* Side Menu */
#side-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 78%;
  max-width: 300px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 18px 0 50px rgba(0, 0, 0, 0.18);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 95;
  padding: 80px 20px 24px;
  overflow-y: auto;
}

#side-menu.open {
  transform: translateX(0);
}

.side-menu-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.side-menu-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.side-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-link {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  font-size: 15px;
}

.side-link:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateX(4px);
}

.side-link:active {
  transform: translateX(2px) scale(0.98);
}

.side-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.side-link.disabled:hover {
  transform: none;
}

/* Dark mode */
body.theme-dark #burger-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

body.theme-dark #burger-button span {
  background: #f5f3ec;
}

body.theme-dark #menu-overlay {
  background: rgba(0, 0, 0, 0.6);
}

body.theme-dark #side-menu {
  background: rgba(20, 24, 32, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

body.theme-dark .side-menu-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .side-menu-header h2 {
  color: #f5f3ec;
}

body.theme-dark .side-link {
  background: rgba(255, 255, 255, 0.06);
  color: #f5f3ec;
  border-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .side-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.theme-dark .side-menu-list li[style*="border-top"] {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

