/* Header isolé : aucune surcharge des composants ou de l'enveloppe Humani. */
.t4hi-header { background: var(--t4hi-color-white); position: relative; z-index: 1000; }
.t4hi-header.is-fixed { position: fixed; inset: var(--t4hi-header-top, 0px) 0 auto; }
.t4hi-header.is-scrolled { box-shadow: var(--t4hi-shadow-soft); }
.t4hi-header__inner { max-width: 96rem; margin-inline: auto; padding: var(--t4hi-space-3) var(--t4hi-gutter); display: flex; align-items: center; flex-wrap: wrap; gap: var(--t4hi-space-3); }
.t4hi-header__brand { margin-right: auto; min-width: 0; }
.t4hi-header__brand .custom-logo { width: auto; max-width: min(12rem, 55vw); max-height: 64px; object-fit: contain; }
.t4hi-header__brand .custom-logo-link { display: flex; align-items: center; min-height: 44px; }
.t4hi-header a.t4hi-header__wordmark:not(.button):not(.elementor-button):not([role="button"]) { display: flex; flex-direction: column; text-decoration: none; line-height: 1.4; }
.t4hi-header__wordmark strong { font-size: 1.5rem; }
.t4hi-header__wordmark span { font-size: .75rem; }
.t4hi-header__panel { width: 100%; min-width: 0; padding: var(--t4hi-space-2); }
.t4hi-header ul { list-style: none; margin: 0; padding: 0; }
.t4hi-header li { margin: 0; position: relative; min-width: 0; }
.t4hi-header__menu > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.t4hi-header__nav a:not(.button):not(.elementor-button):not([role="button"]) { display: flex; align-items: center; min-height: 44px; padding: .5rem; text-decoration: none; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.t4hi-header__nav a:hover { background: var(--t4hi-color-background-soft); border-radius: var(--t4hi-radius-button); }
.t4hi-header__nav .current-menu-item > a { text-decoration: underline !important; text-underline-offset: .25em; }
.t4hi-header button { min-height: 44px; min-width: 44px; padding: .5rem; border: 1px solid var(--t4hi-color-primary); border-radius: var(--t4hi-radius-button); background: var(--t4hi-color-white); color: var(--t4hi-color-primary); font: inherit; line-height: 1.5; text-transform: none; letter-spacing: normal; cursor: pointer; }
.t4hi-header button:hover { background: var(--t4hi-color-background-soft); }
.t4hi-header .t4hi-header__menu-toggle,
.t4hi-header .t4hi-header__submenu-toggle { display: none; }
.t4hi-header.is-enhanced .t4hi-header__menu-toggle,
.t4hi-header.is-enhanced .t4hi-header__submenu-toggle { display: inline-flex; align-items: center; justify-content: center; }
.t4hi-header .t4hi-header__submenu-toggle { border-color: transparent; }
.t4hi-header .t4hi-header__parent-toggle,
.t4hi-header.is-enhanced .t4hi-header__parent-toggle { display: inline-flex; justify-content: space-between; gap: var(--t4hi-space-2); grid-column: 1 / -1; font-weight: 600; text-align: left; }
.t4hi-header__parent-toggle > span { flex-shrink: 0; }
.t4hi-header__submenu-toggle span { width: .5rem; height: .5rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.t4hi-header__submenu-toggle[aria-expanded="true"] span { transform: rotate(225deg); }
.t4hi-header .t4hi-header__submenu { grid-column: 1 / -1; padding: var(--t4hi-space-2); background: var(--t4hi-color-white); border-radius: var(--t4hi-radius-button); }
.t4hi-header__contact { margin-top: var(--t4hi-space-3); }
.t4hi-header [hidden] { display: none !important; }
.t4hi-header.is-enhanced .t4hi-header__panel { max-height: calc(100dvh - var(--t4hi-header-top, 0px) - var(--t4hi-header-row, 96px)); overflow-y: auto; overscroll-behavior: contain; }
/* Largeur propre au header : les six entrées principales restent sur une ligne. */
@media (min-width: 90rem) {
  .t4hi-header__inner { max-width: 90rem; display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); }
  .t4hi-header__brand { margin-right: 0; justify-self: start; }
  .t4hi-header__panel { display: contents; }
  .t4hi-header__nav { grid-column: 2; }
  .t4hi-header__contact { grid-column: 3; justify-self: end; }
  .t4hi-header .t4hi-header__parent-toggle { white-space: nowrap; padding-inline: var(--t4hi-space-1); }
  .t4hi-header__menu { display: flex; align-items: center; gap: var(--t4hi-space-1); }
  .t4hi-header__menu > li { flex-shrink: 0; grid-template-columns: max-content auto; }
  .t4hi-header__menu > li > a:not(.button):not(.elementor-button):not([role="button"]) { padding-inline: var(--t4hi-space-1); white-space: nowrap; overflow-wrap: normal; }
  .t4hi-header.is-enhanced .t4hi-header__menu-toggle { display: none; }
  .t4hi-header.is-enhanced .t4hi-header__panel { overflow: visible; max-height: none; }
  .t4hi-header.is-enhanced .t4hi-header__submenu { position: absolute; top: 100%; left: 0; width: 20rem; max-height: calc(100dvh - var(--t4hi-header-top, 0px) - var(--t4hi-header-row, 96px)); overflow-y: auto; box-shadow: var(--t4hi-shadow-soft); }
  .t4hi-header__menu > li:nth-last-child(-n+2) .t4hi-header__submenu { left: auto; right: 0; }
  .t4hi-header__contact { flex: none; margin-top: 0; }
  /* Le repli :focus du DS demeure pour les navigateurs sans :focus-visible. */
  @supports selector(:focus-visible) {
    .t4hi-header .t4hi-header__submenu-toggle:focus:not(:focus-visible) { outline: none; box-shadow: none; }
  }
}
