/* ===========================
   Header
=========================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--header-height);
  background-color: transparent;
  mix-blend-mode: difference;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

/*
 * Quand l'off-canvas est ouvert, on désactive le blend
 * pour que le header reste lisible devant l'overlay sombre.
 */
body.offcanvas-is-open .site-header {
  mix-blend-mode: normal;
  z-index: 220; /* passe devant l'overlay plein écran pour garder le burger accessible */
}

body{
    margin-top: 100px;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 20px;
}

/* ─── Logo / Nom du site ─── */
/*
 * La couleur est blanche : avec mix-blend-mode:difference
 * elle apparaît noire sur fond clair et blanche sur fond sombre.
 */
.site-header__logo {
  font-family: var(--font-primary);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
  line-height: 1;
}

/* Logo blanc quand off-canvas plein écran noir est ouvert */
body.offcanvas-is-open .site-header__logo {
  color: #fff;
}

/* ─── Navigation desktop ─── */
.site-header__nav {
  display: flex;
  align-items: center;
}

.site-header__menu {
  display: flex;
  align-items: center;
  gap: 36px;
}

.site-header__menu li a {
  font-family: var(--font-primary);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;   /* blanc → rendu noir sur fond clair via difference */
  position: relative;
  padding-bottom: 2px;
}

body.offcanvas-is-open .site-header__menu li a {
  color: #fff;
}

/* Soulignement animé au survol */
.site-header__menu li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #fff;
  transition: width 0.3s ease;
}

body.offcanvas-is-open .site-header__menu li a::after {
  background-color: #fff;
}

.site-header__menu li a:hover::after,
.site-header__menu li.current-menu-item a::after {
  width: 100%;
}

/* ─── Burger button ─── */
.site-header__burger {
  display: none;          /* caché en desktop */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.burger-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: #fff;   /* blanc → apparent noir sur fond clair */
  transition: transform 0.35s ease, opacity 0.25s ease, background-color 0.2s ease;
  transform-origin: center;
}

body.offcanvas-is-open .burger-bar {
  background-color: #fff;
}

/* État "croix" quand l'off-canvas est ouvert */
body.offcanvas-is-open .site-header__burger .burger-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
body.offcanvas-is-open .site-header__burger .burger-bar:nth-child(2) {
  opacity: 0;
}
body.offcanvas-is-open .site-header__burger .burger-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ─── Compensateur de hauteur pour les pages intérieures ─── */
body:not(.home) .site-header + * {
  padding-top: var(--header-height);
}

/* ===========================
   Off-canvas — plein écran
=========================== */

/* L'overlay inutilisé est masqué (conservé dans le DOM mais inactif) */
.offcanvas-overlay {
  display: none;
}

/* Panneau plein écran noir */
.offcanvas {
  position: fixed;
  inset: 0;
  z-index: 210;
  background-color: #1C1C1C;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
  isolation: isolate;
}

.offcanvas.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Bouton fermeture — coin supérieur droit */
.offcanvas__close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  padding: 4px;
  transition: opacity 0.2s ease;
}

.offcanvas__close:hover {
  opacity: 0.5;
}

/* Menu centré */
.offcanvas__nav {
  text-align: center;
}

.offcanvas__menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.offcanvas__menu li a {
  font-family: var(--font-primary);
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-style: italic;
  font-weight: normal;
  letter-spacing: 0.03em;
  color: #fff;
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  transition: opacity 0.2s ease;
}

/* Soulignement au survol */
.offcanvas__menu li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #fff;
  transition: width 0.3s ease;
}

.offcanvas__menu li a:hover::after {
  width: 100%;
}

.offcanvas__menu li a:hover {
  opacity: 0.7;
}

/* ─── Responsive : afficher burger, cacher nav desktop ─── */
@media (max-width: 768px) {
  .site-header__nav {
    display: none;
  }

  .site-header__burger {
    display: flex;
  }
}
