*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body > * {
  max-width: 100%;
  overflow-x: hidden;
}

/* ===========================
   HEADER
=========================== */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 80px;
  background: #4e3b36;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1003;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.logo-small {
  height: 55px;
  width: auto;
  border-radius: 20px;
}

/* Navigation principale (desktop) */
.main-nav {
  display: flex;
  align-items: center;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: #f4e2d8;
}

/* Sidebar mobile */
.side-nav {
  position: fixed;
  top: 0;
  right: -100%;
  /* cachée hors écran */
  height: 100%;
  width: 300px;
  background-color: #4e3b36;
  display: flex;
  flex-direction: column;
  padding: 100px 20px 20px;
  transition: right 0.3s ease;
  z-index: 1001;
  overflow-y: auto;
}

/* Quand la sidebar est active, elle glisse à droite 0 */
.side-nav.active {
  right: 0;
}

/* Gestion de l’attribut hidden */
.side-nav[hidden] {
  display: none;
}

/* Les liens dans la sidebar */
.side-nav a {
  color: #fff;
  text-decoration: none;
  margin: 15px 0;
  font-size: 18px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.side-nav a:hover,
.side-nav a:focus {
  color: #d9b382;
  outline: none;
}

/* Bouton fermer (croix) */
#close-menu {
  position: fixed;
  top: 15px;
  right: 320px;
  /* un peu à gauche de la sidebar */
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  z-index: 1100;
  display: none;
  /* caché par défaut */
}

/* Afficher le bouton fermer quand visible */
#close-menu[hidden] {
  display: none;
}

#close-menu:not([hidden]) {
  display: block;
}

/* Overlay sombre */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 15px;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Gestion de l’attribut hidden */
.overlay[hidden] {
  display: none;
}

/* ======================
   BURGER MENU - Version corrigée
   ====================== */
.burger-menu {
    display: none; /* Caché par défaut (sera affiché en mobile via media query) */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002; /* Au-dessus du header */
    gap: 6px; /* Espace entre les barres */
}

.burger-menu span {
    display: block;
    width: 30px;
    height: 3px;
    background: #fff; /* Blanc contrasté */
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animation "croix" quand ouvert */
.burger-menu.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.burger-menu.open span:nth-child(2) {
    opacity: 0;
}
.burger-menu.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ================
   SIDEBAR MOBILE
================ */
@media (max-width: 768px) {
  .burger-menu {
    display: flex;
  }

  .main-nav {
    display: none;
  }

  #close-menu {
    right: 20px; /* ou 10px */
    top: 20px;
    font-size: 32px;
  }
}