/* Shared navigation. The compact layout overrides legacy header rules only. */
body > header.site-header {
  position: relative;
  z-index: 1000;
}

.site-header .menu-toggle { display: none; }

.site-header a:focus-visible,
.site-header button:focus-visible {
  outline: 3px solid #ffe49a;
  outline-offset: 4px;
}

/* Keep the same usable desktop menu on older article templates too. */
@media (min-width: 1201px) {
  body > header.site-header {
    height: 78px !important;
    padding: 0 4% !important;
    gap: 18px;
  }
  body > header.site-header :is(.brand, .home-brand) {
    flex-shrink: 0;
    margin-right: auto !important;
    font-size: 34px !important;
    white-space: nowrap;
  }
  body > header.site-header nav {
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
  }
  body > header.site-header nav a {
    font-size: 14px !important;
    line-height: 1.2 !important;
    white-space: nowrap;
  }
  body > header.site-header :is(.rdv, .home-rdv) {
    flex-shrink: 0;
    margin-left: 0 !important;
    padding: 11px 20px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 1200px) {
  body > header.site-header {
    display: flex !important;
    flex-wrap: wrap;
    height: auto !important;
    min-height: 76px;
    padding: 12px 5% !important;
    gap: 12px;
  }

  body > header.site-header :is(.brand, .home-brand) {
    flex: 1 0 auto;
    margin: 0 auto 0 0 !important;
    font-size: 30px !important;
    white-space: nowrap;
  }

  body > header.site-header :is(.rdv, .home-rdv) {
    order: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 17px !important;
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
  }

  .site-header.nav-enhanced .menu-toggle {
    order: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #efd486;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font: 500 14px/1.2 Montserrat, Arial, sans-serif;
    cursor: pointer;
  }

  body > header.site-header nav {
    order: 3;
    flex: 0 0 100%;
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid rgba(239, 212, 134, .4);
  }

  body > header.site-header nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px !important;
    border: 0 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    white-space: normal;
  }

  body > header.site-header nav a.active {
    background: rgba(255, 255, 255, .1);
    color: #ffe49a;
    border-radius: 4px;
  }

  body > header.site-header.nav-enhanced nav { display: none !important; }
  body > header.site-header.nav-enhanced.nav-open nav { display: flex !important; }
}

@media (max-width: 359px) {
  body > header.site-header { gap: 8px; padding-inline: 12px !important; }
  body > header.site-header :is(.brand, .home-brand) { font-size: 26px !important; }
  .site-header.nav-enhanced .menu-toggle { padding-inline: 10px; }
}
