html, body {
  overflow-x: hidden;
}

/* =====================
   HEADER
   ===================== */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--vert);
  color: white;
  position: relative;
  z-index: 1;
}

/* Logo */
.site-header .logo img {
  height: clamp(28px, 6vw, 50px);
}


/* =====================
   BURGER
   ===================== */

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}


/* =====================
   SIDEBAR MENU
   ===================== */

.side-menu {
  position: fixed;
  top: 0;
  right: 0;

  width: 85%;          /* 🔥 important */
  max-width: 300px;    /* limite propre */

  height: 100vh;       /* 🔥 évite bugs de hauteur */
  background: var(--vert);

  padding-top: 80px;
  z-index: 1000;

  transform: translateX(100%); /* caché complètement */
  transition: transform 0.3s ease;

  box-shadow: -5px 0 20px rgba(0,0,0,0.2);
  
  overflow-y: auto;   /* 🔥 scroll vertical */
  -webkit-overflow-scrolling: touch; /* smooth iOS */
}

/* Menu ouvert */
.side-menu.open {
  transform: translateX(0);
}


/* =====================
   LISTE
   ===================== */

.side-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.5rem;
  margin: 0;
}

.side-menu ul li {
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 0.5rem;
}

.side-menu ul li:last-child {
  border-bottom: none;
}


/* =====================
   LIENS
   ===================== */

.side-menu a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
}

.side-menu a:hover {
  color: var(--texte);
}


/* =====================
   BOUTON FERMER
   ===================== */

.menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: white;
}


/* =====================
   OVERLAY
   ===================== */

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 900;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

body.menu-open {
  overflow: hidden;
}


/* =====================
   TABLETTE
   ===================== */
@media (max-width: 768px) {

  .site-header {
    flex-direction: column;
    align-items: center;
  }
  
  .menu-toggle {
    align-self: center;
  }

}

@media (min-width: 768px) {
  .site-header {
    padding: 1rem 2rem;
  }

  .site-header .logo img {
    height: 50px;
  }
}


/* =====================
   GRAND ÉCRAN (optionnel)
   ===================== */

@media (min-width: 1024px) {
  .side-menu {
    max-width: 320px;
  }
}