/* =========================
   Reset global
========================= */
* {
  margin: 0;
  padding: 0;
  touch-action: pan-y;
  scroll-behavior: smooth;
}

/* =========================
   Header de base
========================= */
#header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 60px;
  background-color: white;
  padding: 0 20px;
  box-sizing: border-box;
  border-bottom: 1px solid green;
}

.title, .title a {
  font-size: 1em;
  color: rgb(11, 170, 109);
  animation: slide-down 2000ms 1;
  text-decoration: none;
  font-weight: bold;
}

.leftPart {
  display: flex;
  align-items: center;
  margin-left: 4vw;
  gap: 15px;
}

.rightPart {
  display: flex;
  align-items: center;
  margin-right: 4vw;
  gap: 3vw;
  position: relative;
}

/* =========================
   Burger menu
========================= */
.burger {
  display: none;
  font-size: 1.8em;
  cursor: pointer;
  background-color: white;
  border: none;
  color: rgb(0, 120, 75);
}

/* =========================
   Liens et boutons dropdown
========================= */
.link, .dropdown-btn {
  text-decoration: none;
  color: black;
  font-weight: bold;
  font-size: 0.9em;
  padding: 10px 25px;
  cursor: pointer;
  background: none;
  border: none;
  position: relative; /* nécessaire pour flèche */
}

.linkClicked,
.dropdown-btn.linkClicked {
  background-color: #E8F8DE;
}

/* =========================
   Dropdown menu
========================= */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  gap: 15px;         /* espace entre options */
  padding: 10px;
  min-width: 180px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 1000;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* =========================
   Dropdown items
========================= */
.dropdown-item {
  text-decoration: none;
  color: black;
  padding: 6px 10px;
  transition: 0.2s;
  border-radius: 8px;
}

.dropdown-item:hover {
  background: #f2f2f2;
}

/* option active */
.optionSelectClicked {
  font-weight: bold;
  background-color: #E8F8DE;
  border-radius: 8px;
  padding: 6px 10px;
}

/* hover desktop */
.link:hover,
.dropdown-btn:hover,
.dropdown-item:hover {
  color: rgb(11, 170, 109);
}

/* =========================
   Flèche dropdown
========================= */
.dropdown-btn::after {
  content: '▼';                 /* flèche vers le bas */
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  font-size: 0.7em;
  color: rgb(11, 170, 109);
  transition: transform 0.3s ease;
}

.dropdown.open .dropdown-btn::after {
  transform: translateY(-50%) rotate(180deg);
}

/* =========================
   Responsive mobile
========================= */
@media screen and (max-width: 968px) {
  .burger {
    display: block;
  }

  .rightPart {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    width: 180px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    background-color: white;
    padding: 15px 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 2000;
  }

  .rightPart.show {
    display: flex;
  }

  /* dropdown mobile */
  .dropdown-menu {
    display: none;       /* masqué par défaut */
    position: relative;
    top: 0;
    left: 0;
    min-width: 100%;
    padding: 0;
    gap: 0;
    opacity: 1;          /* on gère l'affichage avec display */
    transform: none;
  }

  .dropdown.open .dropdown-menu {
    display: flex;       /* affichage au clic */
    flex-direction: column;
    gap: 15px;           /* espace réel entre options */
    padding: 10px;
  }
}
