/* ============================================================
   Reset basique
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f9;
}

/* ============================================================
   Barre utilitaire (contact / langues)
   -> Adaptez #0e1b2a à la couleur exacte de votre site si besoin
   ============================================================ */
.top-bar {
  background-color: #0e1b2a;
  color: #ccc;
  font-size: 0.8rem;
}
.top-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.4rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.top-bar a { color: #ccc; text-decoration: none; }
.top-bar a:hover { color: #fff; }
.langs { margin-left: auto; display: flex; gap: 6px; }
.langs img { width: 20px; height: auto; display: block; }

/* ============================================================
   Header principal
   ============================================================ */
.site-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: #16273d; /* bleu marine foncé, à ajuster si besoin */
  padding: 0.8rem 1.5rem;
  position: relative;
  flex-wrap: wrap;
}

.logo img { height: 50px; display: block; }

.search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  max-width: 260px;
}
.search-box input {
  border: none;
  padding: 0.5rem 0.7rem;
  outline: none;
  flex: 1;
}
.search-box button {
  border: none;
  background: #e5e5e5;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
}

/* ============================================================
   Liste de navigation principale
   ============================================================ */
.main-nav { margin-left: auto; }

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

.nav-list li { position: relative; }

.nav-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 1rem 1.1rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: background 0.25s;
}

.nav-list > li > a:hover { background-color: #24405f; }

.arrow { font-size: 0.65rem; }

/* ============================================================
   Sous-menus (niveaux 2 et 3)
   ============================================================ */
.dropdown {
  display: none;
  position: absolute;
  background-color: #1c3350;
  list-style: none;
  min-width: 240px;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
  z-index: 1000;
}

/* ---- Positionnement version PC ---- */
@media (min-width: 993px) {
  .nav-list > li > .dropdown { top: 100%; left: 0; }

  .dropdown .dropdown {
    top: 0;
    left: 100%;
    background-color: #16273d;
  }

  .has-dropdown:hover > .dropdown { display: block; }

  .hamburger { display: none; }
}

/* ============================================================
   Bouton hamburger (mobile / tablette)
   ============================================================ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: auto;
}
.hamburger span {
  height: 3px;
  width: 100%;
  background-color: #fff;
  border-radius: 2px;
}

/* ============================================================
   Layout mobile / tablette (< 993px)
   ============================================================ */
@media (max-width: 992px) {
  .hamburger { display: flex; order: 3; }

  .search-box { order: 4; max-width: none; width: 100%; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #16273d;
    max-height: 80vh;
    overflow-y: auto;
    order: 5;
  }

  .main-nav.is-active { display: block; }

  .nav-list { flex-direction: column; width: 100%; }

  .dropdown {
    position: static;
    background-color: #0f1e30;
    box-shadow: none;
    max-height: none;
  }

  .dropdown .dropdown { background-color: #0a1622; }

  .dropdown a { padding-left: 2rem; }
  .dropdown .dropdown a { padding-left: 3rem; }

  .has-dropdown.open > .dropdown { display: block; }

  .has-dropdown.open > a > .arrow {
    transform: rotate(90deg);
  }
}
