/* ============================================================================
   site-nav.css — habillage du bandeau + sidebar partagés.

   Le markup vient de partials/site-nav.html, injecté par site-nav.js dans le
   <div id="site-nav"> de chaque page. Ces règles-là étaient jusqu'ici recopiées
   dans le <style> de chaque page qui utilisait la nav : les mêmes vingt lignes,
   autant de fois, avec la garantie qu'elles finiraient par diverger.

   Complémentaire de deux feuilles déjà en place, qui n'ont pas à être touchées :
     • desktop.css → bascule ≥ 900px (liens en ligne, burger masqué) ;
     • dark.css    → variantes sombres de nav, drawer et menu.
   ============================================================================ */

nav {
  width: 100%; background: #1e6e3e;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; z-index: 100;
}
.nav-logo {
  font-family: 'Baloo 2', cursive; font-size: 1.4rem; font-weight: 900; color: #fff;
  letter-spacing: 2px; text-transform: uppercase; font-style: italic; text-decoration: none;
}
.nav-logo span { color: #a8e6bf; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-profil { color: rgba(255, 255, 255, 0.85); font-size: 1.3rem; text-decoration: none; line-height: 1; }
.nav-profil:hover { color: #fff; }

/* Burger — masqué au-delà de 900px par desktop.css. */
.burger { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; gap: 5px; padding: 4px; }
.burger span { display: block; width: 26px; height: 3px; background: #fff; border-radius: 2px; transition: all 0.3s ease; }
.burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Sidebar. site-nav.js la sort du sous-arbre #site-nav avant affichage : un
   ancêtre sticky créerait un contexte de positionnement et comprimerait ce
   position:fixed dans la hauteur du bandeau. */
.drawer {
  position: fixed; top: 0; right: -320px; width: 280px; max-width: 85vw; height: 100vh;
  background: #fff; z-index: 200; transition: right 0.32s cubic-bezier(.4, 0, .2, 1);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12); display: flex; flex-direction: column;
}
.drawer.open { right: 0; }
.drawer-header { background: #1e6e3e; padding: 20px 20px 18px; display: flex; align-items: center; justify-content: space-between; }
.drawer-logo { font-family: 'Baloo 2', cursive; font-size: 1.2rem; font-weight: 900; color: #fff; letter-spacing: 2px; font-style: italic; }
.drawer-logo span { color: #a8e6bf; }
.drawer-close { background: none; border: none; cursor: pointer; color: #fff; font-size: 1.6rem; line-height: 1; padding: 2px 6px; }
.drawer-menu { list-style: none; padding: 8px 0; flex: 1; overflow-y: auto; }
.drawer-menu li a {
  display: flex; align-items: center; gap: 14px; padding: 15px 24px;
  font-size: 1rem; font-weight: 700; color: #1a3a25; text-decoration: none;
  transition: background 0.15s; border-left: 3px solid transparent;
}
.drawer-menu li a:hover,
.drawer-menu li a.active { background: #eef4ec; border-left-color: #1e6e3e; color: #1e6e3e; }
.menu-icon { font-size: 1.2rem; width: 24px; text-align: center; }
.drawer-divider { height: 1px; background: #e5ede8; margin: 4px 24px; }

.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 150; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.overlay.open { opacity: 1; pointer-events: all; }

/* Fil de retour interne au back-office evenements, pose sous le bandeau.
   La nav partagee ne connait que les pages publiques : ces pages-ci ont besoin
   de renvoyer vers la liste des evenements, pas vers l'accueil du site. */
.fil-retour { width: 100%; max-width: 900px; margin: 0 auto; padding: 12px 16px 0; }
.fil-retour a {
  font-family: 'Baloo 2', cursive; font-weight: 700; font-size: 0.85rem;
  color: #1e6e3e; text-decoration: none;
}
.fil-retour a:hover { text-decoration: underline; }
html.dark .fil-retour a { color: #7fc99a; }
