/* HPGRB V18.5 — Navigation institutionnelle sur une ligne et publications. */
.site-header.hpgrb-navigation {
  height: auto;
  background: #fff;
  border-bottom: 1px solid #dce6f1;
  box-shadow: 0 5px 22px #0827500a;
}
.hpgrb-navigation.site-header .header-content {
  width: min(100% - 40px, 1560px);
  height: 88px;
  gap: 14px;
  justify-content: space-between;
}
.hpgrb-navigation.site-header .brand img {
  width: clamp(160px, 15vw, 242px);
  max-height: 63px;
  height: auto;
  object-fit: contain;
  object-position: left center;
}
.hpgrb-navigation.site-header .header-contact-link {
  display: inline-flex;
  margin-left: 0;
  flex: 0 0 auto;
  min-height: 44px;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid #0a356e;
  border-radius: 10px;
  background: #0a356e;
  color: white;
  font-size: 13px;
  box-shadow: 0 5px 14px #0a356e24;
}
.hpgrb-navigation.site-header .header-contact-link:hover { background: #14539a; }
.hpgrb-navigation.site-header .header-contact-link::after { content: none; }
.hpgrb-navigation.site-header .header-contact-link[aria-current="page"] { background: #14539a; }
.hpgrb-navigation.site-header .main-nav {
  flex: 1 1 auto;
  margin-inline: 0;
  gap: 3px;
  min-width: 0;
  align-self: center;
  justify-content: center;
  padding-block: 0;
}
.hpgrb-navigation.site-header .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px clamp(6px, 0.65vw, 12px);
  min-height: 45px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 660;
  line-height: 1.3;
  color: #28435e;
  transition: background .18s, color .18s, border-color .18s;
}
.hpgrb-navigation .nav-link-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: #567693;
}
.hpgrb-navigation.site-header .nav-link:hover {
  background: #edf3fa;
  color: #0a356e;
  border-color: #e0eaf5;
}
.hpgrb-navigation.site-header .nav-link.active {
  color: #124b96;
  background: #e5eefb;
  border-color: #d4e3f8;
  font-weight: 750;
}
.hpgrb-navigation .nav-link.active .nav-link-icon { color: #1762c4; }
.hpgrb-navigation.site-header .nav-link.active::after {
  content: '';
  position: absolute;
  height: 3px;
  width: 28px;
  left: 50%;
  right: auto;
  bottom: 2px;
  transform: translateX(-50%);
  background: #1762c4;
  border-radius: 3px 3px 0 0;
}
.hpgrb-navigation .nav-link:focus-visible,
.hpgrb-navigation .nav-toggle:focus-visible,
.hpgrb-navigation .header-contact-link:focus-visible {
  outline: 3px solid #70aafc;
  outline-offset: 2px;
}
@media (min-width: 1101px) and (max-width: 1280px) {
  .hpgrb-navigation.site-header .header-content { gap: 10px; }
  .hpgrb-navigation.site-header .brand img { width: 175px; }
  .hpgrb-navigation.site-header .header-contact-link { padding-inline: 11px; gap: 6px; font-size: 12px; }
  .hpgrb-navigation.site-header .header-contact-link svg:last-child { display: none; }
  .hpgrb-navigation.site-header .nav-link { font-size: 12px; padding-inline: 8px; gap: 6px; }
  .hpgrb-navigation .nav-link-icon { display: none; }
}
@media (min-width: 1440px) {
  .hpgrb-navigation.site-header .nav-link { font-size: 14px; }
}
@media (min-width: 1101px) {
  .hpgrb-navigation.site-header .nav-toggle { display: none; }
  .hpgrb-navigation.site-header .main-nav { display: flex; }
}
@media (max-width: 1100px) {
  .hpgrb-navigation.site-header .header-content { height: auto; min-height: 74px; gap: 12px; flex-wrap: wrap; }
  .hpgrb-navigation.site-header.nav-ready .header-content { height: 74px; flex-wrap: nowrap; }
  .hpgrb-navigation.site-header .brand img { width: min(43vw, 235px); }
  .hpgrb-navigation.site-header .header-contact-link { margin-left: auto; }
  .hpgrb-navigation.site-header .main-nav {
    display: flex;
    position: static;
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    max-height: none;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: 12px max(18px, 4vw) 20px;
    box-shadow: none;
    border-top: 1px solid #e2eaf4;
  }
  /* Sans JavaScript, les liens restent visibles au lieu d'être inaccessibles. */
  .hpgrb-navigation.site-header.nav-ready .main-nav { display: none; }
  .hpgrb-navigation.site-header.nav-ready.menu-open .main-nav {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: calc(100vh - 160px);
    max-height: calc(100dvh - 160px);
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 15px 32px #08275024;
    background: #fff;
  }
  .hpgrb-navigation.site-header .nav-toggle { display: none; }
  .hpgrb-navigation.site-header.nav-ready .nav-toggle {
    display: flex;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-color: #cfddec;
    border-radius: 10px;
    color: #0a356e;
    background: #f4f8fc;
    margin: 0;
  }
  .hpgrb-navigation.site-header .nav-link {
    justify-content: flex-start;
    gap: 12px;
    padding: 13px 15px;
    min-height: 48px;
    white-space: normal;
    font-size: 15px;
    flex-shrink: 0;
  }
  .hpgrb-navigation.site-header .nav-link.active::after {
    height: 22px;
    width: 3px;
    left: 0;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 0 4px 4px 0;
  }
  .hpgrb-navigation .language-switcher--mobile {
    display: flex;
    justify-content: flex-start;
    color: #24598c;
    margin: 5px 0 0;
    padding: 8px 14px;
    border-top: 1px solid #e7edf4;
  }
  .hpgrb-navigation .language-switcher--mobile a.is-active { color: #083975; background: #eaf3fd; }
  .hpgrb-navigation.site-header .mobile-contact-link { display: flex; margin-top: 4px; min-height: 44px; background: #0a356e; color: white; padding: 12px 14px; border-radius: 8px; font-size: 14px; }
  .hpgrb-navigation.site-header.menu-open .nav-toggle-open { display: none; }
  .hpgrb-navigation.site-header.menu-open .nav-toggle-close { display: block; }
}
@media (max-width: 640px) {
  .hpgrb-navigation.site-header .header-content { width: calc(100% - 32px); min-height: 68px; gap: 10px; }
  .hpgrb-navigation.site-header.nav-ready .header-content { height: 68px; }
  .hpgrb-navigation.site-header .brand img { width: min(51vw, 210px); }
  .hpgrb-navigation.site-header .header-contact-link { padding: 10px; min-width: 44px; }
  .hpgrb-navigation.site-header .header-contact-link span,
  .hpgrb-navigation.site-header .header-contact-link svg:last-child { display: none; }
  .hpgrb-navigation.site-header .header-contact-link svg { width: 20px; height: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .hpgrb-navigation.site-header .nav-link,
  .hpgrb-navigation.site-header .header-contact-link { transition: none; }
}

/* Menu natif details/summary : utilisable même sans JavaScript. */
.hpgrb-navigation .nav-publications { position: relative; flex: 0 0 auto; }
.hpgrb-navigation .nav-publications summary { cursor: pointer; list-style: none; }
.hpgrb-navigation .nav-publications summary::-webkit-details-marker { display:none; }
.hpgrb-navigation .nav-chevron { display:inline-flex; margin-left:1px; transition:transform .2s; }
.hpgrb-navigation .nav-publications[open] .nav-chevron { transform:rotate(180deg); }
.hpgrb-navigation .publication-submenu { position:absolute; z-index:40; top:calc(100% + 8px); right:0; width:270px; padding:7px; border:1px solid #dce6f1; border-radius:12px; background:white; box-shadow:0 14px 38px #08275024; }
.hpgrb-navigation .nav-publications:not([open]) .publication-submenu { display:none; }
.hpgrb-navigation .publication-submenu a { display:flex; align-items:center; gap:11px; padding:12px 10px; border-radius:8px; color:#28435e; white-space:normal; }
.hpgrb-navigation .publication-submenu a>svg { flex:0 0 19px; color:#1762c4; }
.hpgrb-navigation .publication-submenu a strong,.hpgrb-navigation .publication-submenu a small { display:block; line-height:1.4; }
.hpgrb-navigation .publication-submenu a strong { font-size:14px; }
.hpgrb-navigation .publication-submenu a small { margin-top:3px; color:#58718c; font-size:12px; }
.hpgrb-navigation .publication-submenu a:hover,.hpgrb-navigation .publication-submenu a[aria-current] { background:#e9f1fb; color:#124b96; }
@media(max-width:1100px) {
  .hpgrb-navigation .nav-publications summary { justify-content:flex-start; }
  .hpgrb-navigation .nav-publications .nav-chevron { margin-left:auto; }
  .hpgrb-navigation .publication-submenu { position:static; width:auto; margin:4px 0 4px 22px; padding:4px; border:0; border-left:2px solid #d4e3f8; border-radius:0; box-shadow:none; }
}
@media(prefers-reduced-motion:reduce){.hpgrb-navigation .nav-chevron{transition:none}}
