/**
 * Menu mobile commun : bouton #top-nav-toggle + panneau #site-nav-links (≤768px).
 * Utiliser .pub-header-brand-row { display: contents } sur grand écran pour intégrer le titre au flex parent.
 */

.pub-header-brand-row {
  display: contents;
}

.pub-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 136, 0.38);
  background: rgba(0, 0, 0, 0.28);
  color: #00ff88;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.pub-nav-toggle:hover {
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.55);
}

.pub-nav-toggle:focus-visible {
  outline: 2px solid #00ff88;
  outline-offset: 2px;
}

.pub-nav-toggle .lucide {
  width: 1.35rem;
  height: 1.35rem;
}

@media (min-width: 769px) {
  .pub-nav-toggle {
    display: none !important;
  }

  #site-nav-links {
    display: flex !important;
  }
}

@media (max-width: 768px) {
  .pub-header-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
  }

  .pub-nav-toggle {
    display: inline-flex;
  }

  .pub-nav-hide-mobile {
    display: none !important;
  }

  #site-nav-links:not(.is-open) {
    display: none !important;
  }

  #site-nav-links.is-open {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.5rem;
    margin-top: 0.65rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 255, 136, 0.14);
  }

  #site-nav-links.is-open > a {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    padding: 0.5rem 0.85rem;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    box-sizing: border-box;
  }

  .pub-site-header__row--with-nav,
  .header__row--with-pub-nav,
  .lb-header__row--with-pub-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .pub-nav-stack-header.pub-site-header {
    align-items: stretch;
  }

  .pub-site-header .pub-site-nav {
    width: 100%;
  }
}
