/* ===== HEADER PRINCIPAL ===== */
#header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 900;
  border-bottom: 1px solid #e3e5e7;
}

#header .container {
  max-width: 1320px;
  height: 40px;
  margin: auto;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
#header .logo img {
  height: 0px;
}

/* Burger menu (mobile) */
#header .burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
}
#header .burger div {
  width: 100%;
  height: 3px;
  background: #333;
  border-radius: 2px;
}

/* Menu desktop */
#header .menu-desktop {
  display: flex;
  align-items: center;
}
#header .menu-desktop > div {
  position: relative;
  margin-left: 20px;
}
#header .menu-desktop a {
  color: #5e5e5e;
  font-size: 14px;
  text-decoration: none;
  padding: 8px 10px;
  transition: color 0.18s;
}
#header .menu-desktop a:hover {
  color: #305c7c;
}

#header .menu-desktop .has-submenu {
  position: relative;
}
#header .menu-desktop .has-submenu .submenu {
  display: none;
  position: absolute;
  top: 115%;
  left: 0;
  min-width: 300px;
  background: #fff;
  border: 1px solid #e7eaf2;
  border-radius: 7px;
  box-shadow: 0 4px 16px 0 rgba(40,60,110,0.07);
  z-index: 900;
  padding: 6px 0;
  transition: box-shadow .18s;
}
#header .menu-desktop .has-submenu:hover .submenu,
#header .menu-desktop .has-submenu:focus-within .submenu {
  display: block;
}
#header .menu-desktop .submenu a {
  display: block;
  padding: 8px 22px 8px 18px;
  color: #2b3a50;
  background: none;
  border: none;
  text-align: left;
  border-radius: 4px;
  font-size: 1em;
  font-weight: 500;
  transition: background .13s, color .13s, padding .12s;
  position: relative;
  margin: 0;
  letter-spacing: 0.02em;
}
#header .menu-desktop .submenu a:hover,
#header .menu-desktop .submenu a:focus {
  background: #f2f6fc;
  color: #194274;
  padding-left: 25px;
}

/* ===== Sidebar mobile (menu burger) ===== */
.msidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: #ffffff;
  padding: 20px 0;
  box-shadow: 2px 0 10px rgba(0,0,0,0.12);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  z-index: 950;
  font-family: "Segoe UI", Arial, sans-serif;
}
.msidebar.active {
  transform: translateX(0);
}

/* Liens principaux */
.msidebar a {
  display: block;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  color: #2b3a50;
  text-decoration: none;
  border-bottom: 1px solid #f1f3f6;
  transition: background 0.2s, color 0.2s;
}
.msidebar a:hover {
  background: #f2f6fc;
  color: #194274;
}

/* Sous-menus */
.msidebar .submenu {
  display: none;
  padding-left: 15px;
  background: #fafbfc;
}
.msidebar .has-submenu.active > .submenu {
  display: block;
}
.msidebar .submenu a {
  font-size: 14px;
  font-weight: 400;
  color: #4a627d;
  padding: 10px 20px;
  border-bottom: none;
}
.msidebar .submenu a:hover {
  background: #eef3f9;
  color: #163860;
}

/* Icône de flèche pour sous-menus */
.msidebar .has-submenu > a::after {
  content: "▸";
  float: right;
  font-size: 12px;
  transition: transform 0.2s;
}
.msidebar .has-submenu.active > a::after {
  transform: rotate(90deg);
}

/* Scroll doux */
.msidebar::-webkit-scrollbar {
  width: 6px;
}
.msidebar::-webkit-scrollbar-thumb {
  background: #c1c7d0;
  border-radius: 4px;
}

/* ===== RÉACTIVATION DU BURGER ET CACHER LE MENU DESKTOP SUR MOBILE ===== */
@media (max-width: 992px) {
  #header .menu-desktop {
    display: none;
  }
  #header .burger {
    display: flex;
  }
}

/* ===== CACHER LA SIDEBAR EN DESKTOP ===== */
@media (min-width: 993px) {
  .msidebar {
    display: none;
  }
}
