/* =========================================================
   VARIABLES
   ========================================================= */
:root {
  --hb-bg-scrolled: rgba(246, 244, 239, 0.92);
  --hb-border: rgba(31, 41, 55, 0.08);
  --hb-blur: 14px;

  --hb-text: #1F2937;
  --hb-muted: #4B5563;

  --hb-hover-text: #111827;
  --hb-hover-shadow: 0 0 14px rgba(31, 41, 55, 0.18);
}

/* DARK MODE */
html[data-theme="dark"] {
  --hb-bg-scrolled: rgba(18, 18, 22, 0.82);
  --hb-border: rgba(255, 255, 255, 0.08);

  --hb-text: #f2f3f5;
  --hb-muted: rgba(242, 243, 245, 0.62);

  --hb-hover-text: rgba(242, 243, 245, 1);
  --hb-hover-shadow: 0 0 18px rgba(242, 243, 245, 0.20);
}

/* =========================================================
   HEADER FIXE
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99997; /* au-dessus de Leaflet */
  pointer-events: none;
}

.site-header * {
  pointer-events: auto;
}

body.has-fixed-header {
  padding-top: 86px;
}

/* =========================================================
   HOTBAR
   ========================================================= */
.hotbar {
  width: 100%;
  padding: 22px clamp(14px, 3vw, 32px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;

  background: transparent;
  border-bottom: 1px solid transparent;

  transition: background 0.2s ease, padding 0.18s ease;
}

.site-header.scrolled .hotbar {
  background: var(--hb-bg-scrolled);
  border-bottom-color: var(--hb-border);
  backdrop-filter: blur(var(--hb-blur));
  padding: 12px clamp(14px, 3vw, 32px);
}

/* =========================================================
   BRAND
   ========================================================= */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--hb-text);
  font-weight: 600;
}

.brand-logo {
  height: 32px;
}

/* Par défaut (LIGHT MODE) → logo inversé */
.brand-logo {
  filter: invert(1) brightness(1.1);
  opacity: 0.9;
  transition: filter 0.2s ease;
}

/* En DARK MODE → logo normal */
html[data-theme="dark"] .brand-logo {
  filter: none;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  display: flex;
  justify-content: center;
}

.nav-link {
  padding: 16px 22px;
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
  color: var(--hb-muted);
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.nav-link:hover {
  color: var(--hb-hover-text);
  text-shadow: var(--hb-hover-shadow);
}

/* =========================================================
   ACTIONS
   ========================================================= */
.actions{
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* =========================================================
   THEME TOGGLE (base)
   ========================================================= */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.theme-toggle:focus-visible{
  outline: 2px solid var(--hb-border);
  outline-offset: 2px;
  border-radius: 12px;
}

/* Icônes (PNG) */
.theme-icon{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.theme-icon img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* PNG blancs de base :
   - dark => blanc (pas de filtre)
   - light => noir (invert) */
html[data-theme="dark"] .theme-toggle .theme-icon img{
  filter: none !important;
}
html:not([data-theme="dark"]) .theme-toggle .theme-icon img{
  filter: invert(1) !important;
}

/* =========================================================
   DESKTOP : bouton "icône uniquement" + animation swap
   ========================================================= */
.theme-toggle--icononly{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  padding: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* superposition des deux icônes */
.theme-toggle--icononly .theme-icon{
  width: 22px;
  height: 22px;
  position: absolute;
  inset: 0;
  margin: auto;
  transition: opacity 180ms ease, transform 180ms ease;
}

/* Light (par défaut) : on montre day */
html:not([data-theme="dark"]) .theme-toggle--icononly .theme-icon--day{
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
html:not([data-theme="dark"]) .theme-toggle--icononly .theme-icon--night{
  opacity: 0;
  transform: scale(0.9) rotate(-12deg);
}

/* Dark : on montre night */
html[data-theme="dark"] .theme-toggle--icononly .theme-icon--day{
  opacity: 0;
  transform: scale(0.9) rotate(12deg);
}
html[data-theme="dark"] .theme-toggle--icononly .theme-icon--night{
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* =========================================================
   DRAWER : toggle "ancien format" (switch qui glisse)
   ========================================================= */
.theme-toggle--drawer .theme-icon{
  width: 22px;
  height: 22px;
}

.theme-switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  position: relative;
}

.theme-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #111;
  border-radius: 50%;
  transition: transform 0.18s ease;
}

html[data-theme="dark"] .theme-knob {
  transform: translateX(18px);
  background: #f2f3f5;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 720px) {
  .nav {
    display: none;
  }
}

/* =========================================================
   MOBILE DRAWER (hamburger + panneau coulissant)
   ========================================================= */

/* Hamburger button */
.menu-toggle{
  display: none; /* affiché seulement en mobile */
  border: none;
  background: transparent;
  padding: 6px;             /* collé à droite */
  margin-right: -2px;       /* micro-ajustement (optionnel) */
  cursor: pointer;
  border-radius: 12px;
  width: 44px;
  height: 44px;
}

.menu-toggle:focus-visible{
  outline: 2px solid var(--hb-border);
  outline-offset: 2px;
}

/* Hamburger (3 barres) */
.hamburger{
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}

.hamburger span{
  width: 34px;
  height: 4px;
  background: var(--hb-text);
  border-radius: 999px;
  display: block;
}

/* Backdrop */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 99998;
}

/* Drawer */
.hotbar-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: fit-content;
  max-width: 88vw;
  background: var(--hb-bg-scrolled);
  border-left: 1px solid var(--hb-border);
  backdrop-filter: blur(var(--hb-blur));
  z-index: 99999;

  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.drawer-inner {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: max-content;
  max-width: 88vw;
}

.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Dans le drawer, on garde le bouton thème compact */
.drawer-top .theme-toggle--icononly{
  width: 44px;
  height: 44px;
}

.drawer-close {
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 12px;
  color: var(--hb-text);
  font-size: 18px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-link {
  padding: 14px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--hb-muted);
  font-weight: 650;
  font-size: 18px;
  transition: color 0.15s ease, text-shadow 0.15s ease, background 0.15s ease;
}

.drawer-link:hover {
  color: var(--hb-hover-text);
  text-shadow: var(--hb-hover-shadow);
}

/* Etat ouvert */
body.drawer-open .hotbar-drawer {
  transform: translateX(0);
}

/* Mobile rules */
@media (max-width: 720px) {
  /* on enlève le toggle desktop à droite */
  .theme-toggle--desktop {
    display: none;
  }

  /* on met le hamburger */
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
.hotbar,
.hotbar * {
  user-select: none;
  -webkit-user-select: none; /* Safari / iOS */
  -ms-user-select: none;     /* ancien Edge */
}
/* =========================================================
   BOTTOM BAR (footer fixe)
   ========================================================= */

:root{
  --bb-bg: rgba(10, 10, 12, 0.45);
  --bb-border: rgba(255,255,255,0.10);
  --bb-text: rgba(242, 243, 245, 0.70);
  --bb-link: rgba(242, 243, 245, 0.85);
  --bb-link-hover: rgba(242, 243, 245, 1);
}

/* LIGHT MODE – barre claire + texte foncé */
html:not([data-theme="dark"]){
  --bb-bg: rgba(246, 244, 239, 0.92);   /* gris clair "papier" */
  --bb-border: rgba(31, 41, 55, 0.10);

  --bb-text: #1F2937;                  /* texte noir/gris foncé */
  --bb-link: #1F2937;
  --bb-link-hover: #111827;

  --bb-glow: rgba(31, 41, 55, 0.22);   /* glow subtil en light */
}

/* Important : éviter que le contenu passe sous la barre */
body{
  padding-bottom: 42px; /* ajuste si tu changes la hauteur */
}

.bottom-bar{
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 99996;
  background: var(--bb-bg);
  border-top: 1px solid var(--bb-border);
  backdrop-filter: blur(12px);

  /* 👇 caché par défaut */
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.bottom-bar__inner{
  padding: 8px clamp(14px, 3vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.bottom-bar__text{
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--bb-text);
  max-width: 980px;
}

.bottom-bar__links{
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
}

.bottom-bar__link{
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--bb-link);
  transition: color 0.15s ease, opacity 0.15s ease, text-shadow 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  padding: 8px 10px;          /* petit “bouton” */
  border-radius: 12px;
}

.bottom-bar__link:hover{
  text-decoration: none;      /* ✅ empêche le soulignement (même si un style global force underline) */
  color: var(--bb-link-hover);
  text-shadow: 0 0 12px var(--bb-glow);
  box-shadow: 0 0 16px var(--bb-glow);
  /* no movement */
}

/* Mobile : on empile comme souvent sur ce type de barre */
@media (max-width: 720px){
  body{
    padding-bottom: 64px;
  }

  .bottom-bar__inner{
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .bottom-bar__links{
    width: 100%;
    justify-content: flex-end;
  }
}

/* visible quand on est en bas */
.bottom-bar.is-visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.bottom-bar__link:focus-visible{
  outline: 2px solid var(--bb-border);
  outline-offset: 2px;
  text-decoration: none;
  text-shadow: 0 0 12px var(--bb-glow);
  box-shadow: 0 0 16px var(--bb-glow);
}
