/* R2 shared navigation: every destination remains visible at every width.
   The grid / wrapping structure integrates the repaired Infomaniak draft. */
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] {
  --header-line: color-mix(in srgb, var(--studio-header-text) 13%, transparent);
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background: var(--studio-header) !important;
  border-bottom: 1px solid var(--header-line) !important;
  box-shadow: 0 12px 30px #0000000b !important;
  backdrop-filter: blur(20px) saturate(135%);
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .container.nav-wrap {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  grid-template-rows: auto !important;
  align-items: center !important;
  gap: 24px !important;
  max-width: var(--r4-width) !important;
  min-height: 96px !important;
  width: 100% !important;
  margin-inline: auto !important;
  padding: 18px var(--r4-gutter) !important;
  max-height: none !important;
  overflow: visible !important;
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .brand {
  grid-column: 1 !important;
  grid-row: 1 !important;
  max-width: 260px !important;
  gap: 11px !important;
  font-size: 17px !important;
  line-height: 1.25 !important;
  letter-spacing: -.035em !important;
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .brand::before {
  width: 34px !important;
  height: 34px !important;
  border-radius: 9px !important;
  box-shadow: 0 0 0 1px #ffffff20, 0 4px 14px #00000018 !important;
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav {
  display: flex !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 0 !important;
  min-width: 0 !important;
  width: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav > a {
  position: relative !important;
  min-height: 44px !important;
  padding: 11px 9px !important;
  font-size: 12.5px !important;
  line-height: 1.35 !important;
  border-radius: 6px !important;
  text-align: center !important;
  justify-content: center !important;
  transition: background-color 160ms ease, color 160ms ease !important;
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav > a[aria-current="page"] {
  text-decoration: none !important;
  color: var(--studio-header-text) !important;
  background: var(--studio-header-alt) !important;
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav > a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto 12px 4px;
  height: 2px;
  background: var(--studio-accent-soft);
  border-radius: 2px;
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav > a.nav-cta {
  padding-inline: 15px !important;
  margin-left: 9px !important;
  background: var(--studio-accent) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 #ffffff21, 0 4px 12px #00000012 !important;
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav > a.nav-cta:hover {
  background: var(--studio-accent-hover) !important;
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .r4-menu {
  display: none !important;
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .r4-appearance {
  display: block !important;
  grid-column: 3 !important;
  grid-row: 1 !important;
  position: relative !important;
  min-width: 0 !important;
  align-self: center !important;
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .r4-appearance > summary {
  min-height: 44px !important;
  padding: 10px 12px !important;
  gap: 9px !important;
  border: 1px solid var(--header-line) !important;
  border-radius: 6px !important;
  background: transparent !important;
  font-size: 12px !important;
  justify-content: space-between !important;
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .r4-appearance > summary::after {
  content: "" !important;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .r4-appearance[open] > summary::after {
  transform: translateY(2px) rotate(225deg);
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .wdg-appearance {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  right: 0 !important;
  width: 292px !important;
  min-width: 0 !important;
  max-width: calc(100vw - 32px) !important;
  margin: 0 !important;
  padding: 20px !important;
  gap: 14px !important;
  border-color: var(--header-line) !important;
  border-radius: 12px !important;
  box-shadow: 0 18px 48px #00000030 !important;
  z-index: 2 !important;
}
html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] :is(a, summary, button, select):focus-visible {
  outline: 2px solid var(--studio-focus) !important;
  outline-offset: 3px !important;
}
@media (max-width: 1199px) {
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .container.nav-wrap {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    gap: 14px 20px !important;
    padding-block: 16px 12px !important;
    min-height: 0 !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .r4-appearance {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-content: space-between !important;
    border-top: 1px solid var(--header-line) !important;
    padding-top: 10px !important;
    gap: 4px !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav > a.nav-cta {
    margin-left: 0 !important;
  }
}
@media (max-width: 759px) {
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .container.nav-wrap {
    padding: 14px 16px 12px !important;
    gap: 12px 12px !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .brand {
    font-size: 15px !important;
    gap: 9px !important;
    max-width: 240px !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .brand::before {
    width: 30px !important;
    height: 30px !important;
    border-radius: 7px !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    grid-template-rows: auto auto !important;
    align-items: stretch !important;
    gap: 4px !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav > a {
    grid-column: span 3 !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 9px 4px !important;
    font-size: 12px !important;
    white-space: normal !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav > a:nth-child(n+5) {
    grid-column: span 4 !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav > a.nav-cta {
    padding-inline: 6px !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .r4-appearance > summary {
    padding: 10px !important;
    font-size: 11.5px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] * {
    transition: none !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav > a {
    transition: none !important;
  }
}
@media print {
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] {
    position: static !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .r4-appearance {
    display: none !important;
  }
}
