/* 4.1. Header et Navigation principale */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-header);
    z-index: var(--z-index-header);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
}

.main-navigation {
    width: 100%;
    height: 100%;
}

.nav-container {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 0 10px;
}

/* Site Branding */
.site-branding {
    grid-column: 1;
    display: flex;
    align-items: center;
    padding-left: 20px;
}
.site-logo {
    display: flex;
    align-items: center;
}
.custom-logo {
    height: 58px;
    width: auto;
}

/* Navigation Buttons */
.nav-buttons {
    grid-column: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.nav-button {
    color: var(--color-text);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
    position: relative; /* Pour contenir le canvas animé */
    overflow: hidden;   /* Cache tout débordement */
    isolation: isolate; /* empêche le blending de baver */
    --wisp-radius: 14px;      /* coins arrondis de l'animation */
  --wisp-ringA: rgba(24,180,255,.8);
  --wisp-ringB: rgba(0,150,255,.85);
  --wisp-glow: 12px;
  display: inline-flex;        /* force le shrink-wrap */
  align-items: center;         /* centre verticalement le texte */
  line-height: 1;              /* évite l'effet de ligne trop haute */
  height: auto;                /* ne pas s'étirer en hauteur */
  padding: 8px 14px;           /* ajuste si tu veux plus/moins de hauteur */
  align-self: center;          /* ceinture+bretelles si le parent change d'align-items */
  min-height: 40px;            /* optionnel: garde un minimum propre */
}
/* Canvas d'animation */
.nav-button > .nv-wisps{
  position: absolute; inset: 0;
  display: block; pointer-events: none;
  z-index: 0; /* sous ton texte si ton label est z-index:1 */
  mix-blend-mode: lighten; /* optionnel, pour un look plus hextech */
  opacity: 0;
  transition: opacity .25s ease;
}
.nav-button.active > .nv-wisps{
  opacity: 1;
}
/* Actif = plus lumineux + animation ON (le JS détecte .active) */
.nav-button.active::before{ opacity: 1; }
.nav-button:hover::before{ opacity: .9; }

/* Assure que le texte est au-dessus du canvas */
.nav-button > *:not(.nv-wisps){ position: relative; z-index: 1; }
.nav-button::before {
    content: "";
    z-index: 2;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    border-radius: inherit;
    background:
      linear-gradient(to right, var(--color-accent) 50%, transparent 50%) top left/30% 2px no-repeat,
      linear-gradient(to bottom, var(--color-accent) 50%, transparent 50%) top left/2px 30% no-repeat,
      linear-gradient(to left, var(--color-accent) 50%, transparent 50%) top right/30% 2px no-repeat,
      linear-gradient(to bottom, var(--color-accent) 50%, transparent 50%) top right/2px 30% no-repeat,
      linear-gradient(to right, var(--color-accent) 50%, transparent 50%) bottom left/30% 2px no-repeat,
      linear-gradient(to top, var(--color-accent) 50%, transparent 50%) bottom left/2px 30% no-repeat,
      linear-gradient(to left, var(--color-accent) 50%, transparent 50%) bottom right/30% 2px no-repeat,
      linear-gradient(to top, var(--color-accent) 50%, transparent 50%) bottom right/2px 30% no-repeat;
}
.nav-button .nav-label {
  position: relative;
  z-index: 3;                           /* texte au-dessus de tout */
  pointer-events: none;                  /* clics restent sur le <a> */
}
.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.nav-button.active {
    background-color: #111;
}
/* Canvas pour animation de fumée */
.nav-buttons-canvas {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 30px;
    pointer-events: none;
    z-index: 1;
}

.mobile-menu-toggle {
    display: none; /* Géré en responsive */
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}