/* Beathoven Header Final 2026 — scoped, independent of Clix / legacy BHG.
   The theme header and the old BHG banner remain installed and recoverable.
   Only their DISPLAY is suppressed while this new header is active. */
body.btvh-final-active > #bhg-header,
body.btvh-final-active #masthead.site-header {
  display: none !important;
}

#btvh-final-header {
  --btvh-black: #0b0d10;
  --btvh-deep: #101618;
  --btvh-ivory: #f5f1e9;
  --btvh-gold: #ebbf84;
  --btvh-sage: #85a991;
  --btvh-muted: #a7b0a9;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 9990;
  width: 100%;
  min-height: 76px;
  margin: 0;
  padding: 0;
  color: var(--btvh-ivory);
  background: rgba(9, 11, 14, .976);
  border-bottom: 1px solid rgba(255, 255, 255, .11);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font: 400 13px/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  text-align: left;
  letter-spacing: normal;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
}
#btvh-final-header *,
#btvh-final-header *::before,
#btvh-final-header *::after { box-sizing: border-box; }
#btvh-final-header a,
#btvh-final-header summary,
#btvh-final-header button {
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
  box-shadow: none;
  text-shadow: none;
}
#btvh-final-header a { color: var(--btvh-ivory); text-decoration: none; border: 0; }
#btvh-final-header a:focus-visible,
#btvh-final-header summary:focus-visible,
#btvh-final-header button:focus-visible {
  outline: 3px solid var(--btvh-sage);
  outline-offset: 4px;
}
#btvh-final-header button { cursor: pointer; }
#btvh-final-header img { display: block; max-width: 100%; }
#btvh-final-header [hidden] { display: none !important; }
#btvh-final-header .btvh-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(1360px, calc(100% - 44px));
  min-height: 76px;
  margin: 0 auto;
}

/* Identity — never reuse `.logo`, which Clix stretches to height: 100%. */
#btvh-final-header .btvh-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 15px;
  min-width: 0;
  height: auto;
  padding: 0;
}
#btvh-final-header .btvh-brand img {
  flex: 0 0 auto;
  width: 124px;
  height: 51px;
  object-fit: contain;
  object-position: left center;
}
#btvh-final-header .btvh-brand-note {
  display: block;
  max-width: 158px;
  padding-left: 14px;
  color: var(--btvh-gold);
  border-left: 1px solid rgba(235, 191, 132, .36);
  font-size: 8px;
  font-weight: 780;
  line-height: 1.55;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Desktop link rhythm and visually centered mega panels. */
#btvh-final-header .btvh-desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  gap: clamp(10px, 1.45vw, 21px);
  min-width: 0;
  margin-left: auto;
}
#btvh-final-header .btvh-nav-link,
#btvh-final-header .btvh-mega > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0;
  color: #e0dfda;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.1;
  cursor: pointer;
  white-space: nowrap;
  list-style: none;
}
#btvh-final-header .btvh-mega > summary::-webkit-details-marker { display: none; }
#btvh-final-header .btvh-chevron { color: var(--btvh-gold); font-size: 15px; line-height: 1; transition: transform .16s ease; }
#btvh-final-header .btvh-mega[open] .btvh-chevron { transform: rotate(180deg); }
#btvh-final-header .btvh-nav-link:hover,
#btvh-final-header .btvh-mega > summary:hover,
#btvh-final-header .btvh-mega[open] > summary { color: var(--btvh-gold); }
#btvh-final-header .btvh-mega { position: static; }
#btvh-final-header .btvh-mega-panel {
  position: absolute;
  top: calc(100% - 1px);
  left: 50%;
  z-index: 4;
  width: min(1040px, calc(100vw - 42px));
  padding: 23px 23px 14px;
  overflow: hidden;
  color: #e6e6e0;
  background: #101719;
  border: 1px solid rgba(235, 191, 132, .22);
  border-radius: 0 0 7px 7px;
  box-shadow: 0 23px 55px rgba(0, 0, 0, .40);
  transform: translateX(-50%);
}
#btvh-final-header .btvh-mega-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
#btvh-final-header .btvh-mega--expertises .btvh-mega-panel { width: min(780px, calc(100vw - 42px)); }
#btvh-final-header .btvh-mega--expertises .btvh-mega-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#btvh-final-header .btvh-mega--ressources .btvh-mega-panel { width: min(580px, calc(100vw - 42px)); }
#btvh-final-header .btvh-mega--ressources .btvh-mega-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#btvh-final-header .btvh-mega-column { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
#btvh-final-header .btvh-mega-eyebrow {
  display: block;
  min-height: 43px;
  margin-bottom: 8px;
  padding: 7px 9px 11px;
  color: var(--btvh-gold);
  border-bottom: 1px solid rgba(235, 191, 132, .18);
  font-size: 9px;
  font-weight: 790;
  line-height: 1.4;
  letter-spacing: .135em;
  text-transform: uppercase;
}
#btvh-final-header a.btvh-mega-link {
  display: block;
  padding: 10px 9px;
  border-radius: 3px;
  color: #e1e4de;
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.35;
  white-space: normal;
}
#btvh-final-header a.btvh-mega-link:hover,
#btvh-final-header a.btvh-mega-link:focus-visible { background: rgba(135, 174, 150, .14); color: #f5c995; }
#btvh-final-header .btvh-mega-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 17px;
  padding: 14px 9px 2px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #9fab9f;
  font-size: 10px;
  line-height: 1.5;
}
#btvh-final-header .btvh-mega-foot a { color: var(--btvh-gold); font-weight: 700; white-space: nowrap; }

/* Human + app dual CTA (the menu does not contain a separate "Nos outils" tab). */
#btvh-final-header .btvh-desktop-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 11px; }
#btvh-final-header a.btvh-signin { color: #c8ccc6; font-size: 11px; font-weight: 660; white-space: nowrap; }
#btvh-final-header a.btvh-signin:hover { color: var(--btvh-gold); }
#btvh-final-header a.btvh-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 43px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transition: border-color .16s, background .16s, color .16s;
}
#btvh-final-header a.btvh-action--outline { color: #f5f1e9; background: #ffffff07; border-color: #ffffff2b; }
#btvh-final-header a.btvh-action--outline:hover { border-color: var(--btvh-gold); background: #ffffff14; }
#btvh-final-header a.btvh-action--gold { color: #191713; background: var(--btvh-gold); border-color: #e7c18e; }
#btvh-final-header a.btvh-action--gold:hover { color: #181511; background: #f7d2a2; }
#btvh-final-header .btvh-mobile-actions,
#btvh-final-header .btvh-mobile-menu { display: none; }

@media (max-width: 1320px) {
  #btvh-final-header .btvh-brand-note { display: none; }
  #btvh-final-header .btvh-shell { gap: 15px; }
}
@media (max-width: 1160px) {
  #btvh-final-header .btvh-desktop-nav { gap: 13px; }
  #btvh-final-header .btvh-desktop-actions a.btvh-action--outline { display: none; }
  #btvh-final-header .btvh-desktop-actions { gap: 9px; }
}
@media (max-width: 1060px) {
  #btvh-final-header,
  #btvh-final-header .btvh-shell { min-height: 68px; }
  #btvh-final-header .btvh-shell { width: calc(100% - 36px); }
  #btvh-final-header .btvh-brand img { width: 115px; height: 43px; }
  #btvh-final-header .btvh-desktop-nav,
  #btvh-final-header .btvh-desktop-actions { display: none; }
  #btvh-final-header .btvh-mobile-actions { display: flex; align-items: center; gap: 11px; margin-left: auto; }
  #btvh-final-header a.btvh-mobile-epk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 0 13px;
    border: 1px solid rgba(235, 191, 132, .50);
    border-radius: 7px;
    color: #f0c995;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
  }
  #btvh-final-header .btvh-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    justify-content: center;
    min-height: 43px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 7px;
    color: #fff;
    background: transparent;
    font-size: 12px;
    font-weight: 710;
  }
  #btvh-final-header .btvh-toggle-symbol { font-size: 19px; line-height: 1; }
  #btvh-final-header .btvh-mobile-menu:not([hidden]) {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    z-index: 10;
    display: block;
    max-height: calc(100vh - 68px);
    max-height: calc(100dvh - 68px);
    padding: 0 max(20px, calc((100vw - 800px) / 2)) 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #101719;
    border-top: 1px solid #ffffff20;
    box-shadow: 0 23px 45px #0008;
  }
  #btvh-final-header .btvh-mobile-intro { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 20px 0 14px; color: #bdc6bc; font-size: 10px; letter-spacing: .12em; font-weight: 710; }
  #btvh-final-header .btvh-mobile-intro span span { color: var(--btvh-gold); }
  #btvh-final-header .btvh-mobile-intro a { color: var(--btvh-gold); font-size: 11px; letter-spacing: 0; }
  #btvh-final-header .btvh-mobile-group { border-top: 1px solid #ffffff21; }
  #btvh-final-header .btvh-mobile-group > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 55px;
    color: #faf8f2;
    font-size: 15px;
    font-weight: 710;
    list-style: none;
    cursor: pointer;
  }
  #btvh-final-header .btvh-mobile-group > summary::-webkit-details-marker { display: none; }
  #btvh-final-header .btvh-mobile-group > summary span { color: var(--btvh-gold); font-size: 23px; font-weight: 400; }
  #btvh-final-header .btvh-mobile-group[open] > summary span { transform: rotate(45deg); }
  #btvh-final-header .btvh-mobile-group-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px; padding: 0 0 22px; }
  #btvh-final-header .btvh-mobile-column { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  #btvh-final-header .btvh-mobile-column-title { display: block; padding: 12px 1px 7px; font-size: 9px; font-weight: 780; letter-spacing: .14em; text-transform: uppercase; color: var(--btvh-gold); }
  #btvh-final-header a.btvh-mobile-link { display: flex; align-items: center; min-height: 37px; padding: 7px 1px; color: #e8eae4; font-size: 12px; line-height: 1.45; }
  #btvh-final-header a.btvh-mobile-link:hover { color: var(--btvh-gold); }
  #btvh-final-header .btvh-mobile-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding-top: 20px; border-top: 1px solid #ffffff21; }
  #btvh-final-header .btvh-mobile-shortcuts a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 10px; border: 1px solid #ffffff20; border-radius: 5px; font-size: 11px; }
  #btvh-final-header .btvh-mobile-cta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 23px; }
  #btvh-final-header .btvh-mobile-cta a.btvh-action { width: 100%; white-space: normal; min-height: 48px; }
  #btvh-final-header .btvh-mobile-cta .btvh-mobile-signin { grid-column: 1 / -1; padding: 11px 4px; color: #d3d8cf; font-size: 11px; text-align: center; }
}
@media (max-width: 560px) {
  #btvh-final-header .btvh-shell { width: calc(100% - 28px); }
  #btvh-final-header .btvh-brand img { width: 104px; height: 42px; }
  #btvh-final-header .btvh-mobile-actions { gap: 7px; }
  #btvh-final-header .btvh-toggle { padding: 0 11px; }
  #btvh-final-header .btvh-toggle-text { display: none; }
  #btvh-final-header .btvh-mobile-menu:not([hidden]) { padding: 0 19px 21px; }
  #btvh-final-header .btvh-mobile-group-content { grid-template-columns: 1fr; gap: 5px; }
  #btvh-final-header .btvh-mobile-shortcuts { grid-template-columns: 1fr; }
  #btvh-final-header .btvh-mobile-cta { grid-template-columns: 1fr; }
}
@media (max-width: 359px) {
  #btvh-final-header .btvh-mobile-actions { gap: 5px; }
  #btvh-final-header a.btvh-mobile-epk { padding-inline: 8px; }
  #btvh-final-header .btvh-brand img { width: 90px; }
}
@media (min-width: 783px) {
  body.admin-bar #btvh-final-header { top: 32px; }
}
@media (max-width: 782px) {
  body.admin-bar #btvh-final-header { top: 46px; }
  body.admin-bar #btvh-final-header .btvh-mobile-menu:not([hidden]) { max-height: calc(100dvh - 114px); }
}
@media (prefers-reduced-motion: reduce) {
  #btvh-final-header *, #btvh-final-header *::before, #btvh-final-header *::after { scroll-behavior: auto !important; transition: none !important; }
}
