.main-header {
  background: #111;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  position: sticky;
  top: 0;
  height: 90px;
  align-items: center;  
  z-index: 1000;  
  flex-wrap: wrap; 
}

.bd-main {
  margin-top: 30px; /* ou padding-top */
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #00bcd4;
  padding: 15px;
}

.logo,
.user-actions {
  display: flex;
  align-items: center;
  height: 100%; /* assure le centrage vertical */
  z-index: 1000; /* supérieur à backdrop */

}


.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.login-btn {
  white-space: nowrap;
}

.navbar a {
  color: #ccc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}
.navbar a:hover {
  color: #00bcd4;
}

.user-actions {
  display: flex;
  gap: 0.8rem;
   margin-left: auto; /* pousse le bouton à droite */
}

.btn {
  padding: 0.4rem 1rem;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.login-btn {
  background: transparent;
  border: 1px solid #00bcd4;
  color: #00bcd4;
  margin-right: 80px;
}

.login-btn:hover {
  background: #00bcd4;
  color: #000 !important;
}

.register-btn {
  background: #00bcd4;
  color: #000;
}
.register-btn:hover {
  background: #00a7ba;
}



/* === BURGER & CLOSE === */
/*.main-header {
  background: #111;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 90px;
}*/

/* Burger */
.burger {
  display: none;
  font-size: 2rem;
  color: #00bcd4;
  cursor: pointer;
  z-index: 1101;
  position: relative;
}

/* Menu mobile */
.navbar {
  display: flex;
  gap: 1.5rem;
}

.user-actions {
  display: flex;
  gap: 0.8rem;
}

/* === RESPONSIVE === */


@media (max-width: 768px) {
  .burger {
    display: block;
     z-index: 1002;
  }

  .navbar {
    flex-direction: column;
    align-items: flex-start;
    background: #111;
    position: fixed;
    top: 0;
    left: 0;
    width: 60%; /* ou 70% selon ce que tu veux */
    height: 100vh; /* plein écran */
    padding: 2rem 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    gap: 1rem;
    justify-content: space-between; /* permet de garder les liens en haut, bouton en bas */
    display: flex;
  }

  .navbar.active {
    transform: translateX(0);
  }

  .navbar .user-actions {
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }

  .navbar a {
    margin: 0.5rem 0;
    font-size: 1.2rem;
    color: #fff;
  }

  .user-actions {
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }

  .close-btn {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
  }

  /* cacher le bouton burger quand menu ouvert */
  .burger.hidden {
    display: none;
  }

  .slider-kmp {
    background: none;  
    background-image: none;
  }

  .slider-dave {
    background: none;  
    background-image: none;
  }

 
}


/*-------------------------------------------------*/

body.menu-open {
  overflow: hidden;
}

/* Masquer le bouton burger quand le menu est actif */
.navbar.active + .burger,
.user-actions.active + .burger {
  display: none;
}

/*------------------------------------*/

/*.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000; 
}

.backdrop.active {
  opacity: 1;
  pointer-events: auto;
}


/*---------------------------------------------------------------*/

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Force le bouton à rester visible à droite sur desktop */
.user-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* Responsive ajusté */
@media (max-width: 1024px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-actions {
    align-self: flex-end;
    margin-top: 0.5rem;
  }

  
}

/*-------------------------------------------------------------------------*/


.navbar a i {
  margin-right: 8px;
}

.navbar a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar a i {
  font-size: 1.1rem;
  color: #00bcd4 !important; /* ou #ff4500 si tu veux un contraste chaud */
  transition: transform 0.3s ease;
}

.navbar a:hover i {
  transform: scale(1.2);
}

.login-btn:hover {
  background: #00bcd4;
  color: #000 !important;
}

.login-btn:hover i {
  color: #000 !important; /* force l’icône à être lisible */
}


/************************************************************************/



@media (max-width: 768px) {
  .navbar {
    align-items: stretch;          /* la colonne prend toute la largeur */
  }
  .navbar a {
    width: 100%;
    justify-content: flex-start;   /* icône + texte alignés à gauche */
    text-align: left;
  }
}


/* --- Burger layout mobile --- */
@media (max-width: 768px) {
  .burger { display:block; z-index:1102; }

  .navbar {
    flex-direction: column;
    align-items: flex-start;
    background: #111;
    position: fixed;
    top: 0; left: 0;
    width: 60%;
    height: 100vh;
    padding: 2rem 1.5rem;
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 1400;           /* au-dessus du portal user */
    overflow-y: auto;
    gap: 1rem;
    justify-content: flex-start;
  }
  .navbar.active { transform: translateX(0); }

  .close-btn {
    display: block;
    position: absolute;
    top: 1rem; right: 1.5rem;
    font-size: 2rem; color: #fff; z-index: 1500; cursor:pointer;
  }

  /* Liens alignés à gauche */
  .navbar a {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }
}

/* Cache le menu user mobile quand le burger est ouvert (pour laisser le X cliquable) */
#userMenuPortal { z-index:1300; }
body.menu-open #userMenuPortal { display: none !important; }

/*------------------------------------------------------------*/
/* Header avatar (si pas déjà stylé) */
.user-toggle, .user-menu .avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;overflow:hidden}
.user-toggle img, .user-menu .avatar img{width:100%;height:100%;object-fit:cover;display:block}



/* =========================================================
   CORRECTION HEADER DESKTOP - bouton de droite visible
   À mettre tout en bas de headerbd.css
========================================================= */

@media (min-width: 769px) {
  .main-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    height: 90px;
    padding: 0 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    z-index: 5000 !important;
  }

  .logo,
  .bd-logo {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    margin-right: 24px;
  }

  .navbar {
    width: auto !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 22px !important;
    overflow: visible !important;
  }

  .navbar a {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .user-actions {
    flex: 0 0 auto !important;
    margin-left: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    white-space: nowrap !important;
  }

  .login-btn {
    margin-right: 0 !important;
    white-space: nowrap !important;
  }

  .nav-donate,
  .navbar .nav-donate {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }
}