@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined');

/* Default light theme */
:root {
  --primary-bg: rgba(180, 220, 255, 0.35);
  --primary-border: rgba(255, 255, 255, 0.4);
  --primary-text: #023a6b;
  --link-bg-light: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(200, 230, 255, 0.8));
  --link-bg-light-hover: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(180, 220, 255, 0.9));
  --link-text: #034a87;
  --link-border: rgba(100, 150, 200, 0.6);
  --link-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9), 0 3px 5px rgba(0, 0, 0, 0.15);
  --link-shadow-hover: inset 0 1px 2px rgba(255, 255, 255, 0.9), 0 4px 7px rgba(0, 0, 0, 0.25);
  --menu-bg: rgba(180, 220, 255, 0.35);
  --menu-border: rgba(255, 255, 255, 0.4);
  --shadow: 0 4px 25px rgba(0, 50, 120, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  --menu-logo-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), inset 0 -2px 3px rgba(0, 0, 0, 0.2);
  --menu-hover-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-bg: rgba(30, 30, 40, 0.9); /* Darker background, with more opacity for that frosted glass effect */
    --primary-border: rgba(255, 255, 255, 0.2);
    --primary-text: #e0e0e0; /* Lighter text for dark theme */
    --link-bg-light: linear-gradient(to bottom, rgba(50, 50, 60, 0.85), rgba(60, 60, 70, 0.8)); 
    --link-bg-light-hover: linear-gradient(to bottom, rgba(70, 70, 80, 1), rgba(80, 80, 90, 0.85));
    --link-text: #a1caff; /* Light blue for contrast */
    --link-border: rgba(130, 150, 180, 0.5); /* Softer border */
    --link-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.9), 0 3px 5px rgba(0, 0, 0, 0.4);
    --link-shadow-hover: inset 0 1px 2px rgba(0, 0, 0, 0.9), 0 4px 7px rgba(0, 0, 0, 0.5);
    --menu-bg: rgba(30, 30, 40, 0.9); /* Dark frosted glass */
    --menu-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 4px 25px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    --menu-logo-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8), inset 0 -2px 3px rgba(0, 0, 0, 0.7);
    --menu-hover-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4); /* Slight white shadow for high contrast */
  }
}

/* Menu container */
.m_menu {
  position: fixed;
  box-sizing: border-box;
  top: 0;
  left: 0;
  width: 100%;
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  background: var(--menu-bg);
  border-bottom: 1px solid var(--primary-border);
  border-radius: 0 0 20px 20px;
  box-shadow: var(--shadow);
  padding: 12px 20px;
  z-index: 999;
}

.m_menu_top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.m_menu_logo {
  height: 49px;
  width: 49px;
  border-radius: 8px;
  box-shadow: var(--menu-logo-shadow);
}

.m_menu_title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--primary-text);
  text-shadow: var(--menu-hover-shadow);
  flex: 1;
  margin-left: 12px;
}

.m_menu_hamburger {
  font-family: 'Material Symbols Outlined';
  font-size: 32px;
  cursor: pointer;
  color: var(--link-text);
  text-shadow: var(--menu-hover-shadow);
  display: none; /* hidden on desktop */
}

/* Horizontal links */
.m_menu_buttons,
.m_menu_mobile {
  box-sizing: border-box;
  margin-top: 12px;
}

.m_menu_buttons a,
.m_menu_mobile a {
  box-sizing: border-box;
  font-family: 'NeutralSans', sans-serif;
  background: var(--link-bg-light);
  border: 1px solid var(--link-border);
  padding: 8px 18px;
  margin: 4px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--link-text);
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--link-shadow);
  transition: all 0.2s ease;
  text-decoration: none; /* Remove default underline */
}

.m_menu_buttons a:hover,
.m_menu_mobile a:hover {
  background: var(--link-bg-light-hover);
  box-shadow: var(--link-shadow-hover);
}

/* Mobile menu */
.m_menu_mobile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-sizing: border-box; /* Ensure padding doesn't overflow */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out, margin-top 0.5s ease-in-out;
  margin-top: 0;
}

.m_menu_mobile--open {
  max-height: 500px; /* Adjust as needed */
  margin-top: 12px;
}

.m_menu_mobile a {
  width: 100%;
  text-align: left;
}

.m_menu_subtitle {
  font-size: 1rem !important;
  color: #888;
  opacity: 0.7;
  margin-top: 2px;
  line-height: 1;
}

/* Lien actif = texte statique avec espace conservé */
.m_menu_buttons a.m_disabled,
.m_menu_mobile a.m_disabled {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--primary-text) !important;
  cursor: default !important;
  pointer-events: none !important;
  font-weight: 600;
  text-decoration: none;
}

/* Empêche tout effet hover sur le lien actif */
.m_menu_buttons a.m_disabled:hover,
.m_menu_mobile a.m_disabled:hover {
  background: none !important;
  box-shadow: none !important;
}
