:root {
  --blanc: #ffffff;
  --noir: #000000;
  --gris-fond: #E5E7E9;
}

/* === GLOBAL === */
body, html {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
}

/* === HEADER === */
.header {
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* === NAVIGATION === */
.nav-centered {
  width: 100%;
}

.nav-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 1000;
}

/* === TOGGLE BUTTON (MOBILE) === */
.nav-toggle {
  font-size: 30px;
  color: var(--noir);
  cursor: pointer;
  padding: 10px 20px;
  background-color: transparent;
  border-radius: 12px;
  z-index: 1100;
  position: fixed;
  top: -13px;
  right: 20px;
}

/* === NAV LINKS - MOBILE === */
.nav-links {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  background-color: var(--gris-fond);
  padding: 30px 20px;
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  overflow-y: auto;
  box-sizing: border-box;
  gap: 10px;
}

.nav-links.active {
  display: flex;
}

.nav-links a {
  color: var(--noir);
  text-decoration: none;
  padding: 12px 0;
  width: 100%;
  text-align: left;
}

/* Séparateur entre liens */
.nav-links hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  width: 100%;
  margin: 5px 0;
}

/* === SOUS-MENU MOBILE TOUJOURS VISIBLE === */
.submenu {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.submenu a {
  font-size: 0.95em;
  color: var(--noir);
  text-decoration: none;
}

/* === DESKTOP === */
@media (min-width: 768px) {
  .nav-container {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
  }

  .nav-links {
    display: flex !important;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 30px;
    border-radius: 10px;
    position: static;
    height: auto;
    width: auto;
    overflow: visible;
    gap: 20px;
  }

  .nav-links a {
    color: var(--blanc) !important;
    white-space: nowrap;
  }

  .nav-toggle {
    display: none;
  }

  .nav-item {
    position: relative;
  }

  /* Sous-menu masqué par défaut */
  .nav-item .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 5px;
    padding: 10px;
    min-width: 160px;
    z-index: 3000;
    flex-direction: column;
  }

  /* Affichage au hover du parent */
  .nav-item:hover > .submenu {
    display: flex;
  }

  .submenu a {
    color: var(--blanc) !important;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .submenu a:hover {
    text-decoration: underline;
  }

  /* Le lien parent reste cliquable */
  .nav-item > a {
    pointer-events: auto;
    position: relative;
    z-index: 1;
  }

  /* En desktop, cacher le sous-menu mobile par défaut */
  .nav-item .submenu {
    display: none !important;
  }

  .nav-item:hover .submenu {
    display: flex !important;
  }
}