/**
 * OHB — Système de navigation (marketing · portail · cohérence produit)
 * Jetons + grille — pas de flex « qui se bat » entre logo, centre et CTA.
 */

:root {
  --ohb-nav-hit: 44px;
  --ohb-nav-bar-pad-y: 8px;
  --ohb-nav-bar-pad-x: clamp(12px, 2.4vw, 20px);
  --ohb-nav-max: 1280px;
  --ohb-nav-gap: 8px;
  --ohb-nav-gap-end: 10px;
  --ohb-nav-primary-fs: clamp(12px, 1.05vw, 14px);
  --ohb-nav-primary-pad-x: clamp(10px, 1.2vw, 16px);
  --ohb-nav-primary-pad-y: 9px;
  --ohb-nav-secondary-fs: clamp(11px, 0.95vw, 13px);
  --ohb-nav-cta-fs: clamp(11px, 0.9vw, 12px);
  --ohb-nav-drawer-bp: 1080px;
  --ohb-nav-compact-bp: 1200px;
  --ohb-nav-glass: color-mix(in srgb, var(--bg2, #020c1a) 88%, transparent);
  --ohb-nav-line: color-mix(in srgb, var(--b, #00b4ff) 20%, transparent);
  --ohb-nav-line-strong: color-mix(in srgb, var(--b, #00b4ff) 38%, transparent);
  --ohb-nav-glow-soft: color-mix(in srgb, var(--b, #00b4ff) 14%, transparent);
  --ohb-nav-t: 0.2s ease;
}

/* ── Shell ── */
.ohb-site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  isolation: isolate;
}

.ohb-site-header__bar {
  position: relative;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bg, #010812) 96%, transparent) 0%,
    color-mix(in srgb, var(--bg2, #020c1a) 82%, transparent) 100%
  );
  border-bottom: 1px solid var(--ohb-nav-line);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--g, #00ff87) 8%, transparent),
    0 20px 50px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.ohb-site-header__bar::before {
  content: '';
  position: absolute;
  left: 6%;
  right: 6%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ohb-nav-line-strong), transparent);
  opacity: 0.75;
  pointer-events: none;
}

/* Flex marketing : marque | rack (flex) | burger — le tiroir fixed ne vole pas de place sur mobile */
.ohb-site-header__inner {
  max-width: var(--ohb-nav-max);
  margin: 0 auto;
  padding: var(--ohb-nav-bar-pad-y) var(--ohb-nav-bar-pad-x);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(10px, 1.8vw, 18px);
  min-height: calc(var(--ohb-nav-hit) + var(--ohb-nav-bar-pad-y) * 2);
}

.ohb-site-header__brand {
  flex: 0 0 auto;
  flex-shrink: 0;
  min-width: 0;
  overflow: visible;
  z-index: 2;
}

/* Rack : gouttières flexibles = nav primaire réellement centrée */
.ohb-site-header__flyout {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: stretch;
  min-height: var(--ohb-nav-hit);
}

.ohb-site-header__gutter {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
}

.ohb-site-header__gutter--start {
  justify-content: flex-start;
}

.ohb-site-header__gutter--end {
  justify-content: flex-end;
  gap: var(--ohb-nav-gap-end);
  flex-wrap: nowrap;
  align-items: center;
}

.ohb-site-header__mid {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: none;
}

.ohb-site-header__primary-inner {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 3px 4px;
  min-width: 0;
  max-width: 100%;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--g) 11%, transparent);
  background: linear-gradient(180deg, var(--ohb-nav-glass), color-mix(in srgb, var(--bg3) 70%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(0, 0, 0, 0.2);
}

.ohb-site-header__link {
  font-family: var(--f-mono);
  font-size: var(--ohb-nav-primary-fs);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text2);
  text-decoration: none;
  padding: var(--ohb-nav-primary-pad-y) var(--ohb-nav-primary-pad-x);
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.2;
  transition:
    color var(--ohb-nav-t),
    border-color var(--ohb-nav-t),
    background var(--ohb-nav-t),
    box-shadow var(--ohb-nav-t);
}

.ohb-site-header__link:hover {
  color: var(--text);
  border-color: var(--ohb-nav-line-strong);
  background: color-mix(in srgb, var(--b) 9%, transparent);
  box-shadow: 0 0 20px var(--ohb-nav-glow-soft);
}

.ohb-site-header__link:focus-visible {
  outline: 2px solid var(--b);
  outline-offset: 2px;
}

.ohb-site-header__link[aria-current='page'],
.ohb-site-header__link--active {
  color: var(--b);
  border-color: color-mix(in srgb, var(--b) 42%, transparent);
  background: color-mix(in srgb, var(--b) 11%, transparent);
}

.ohb-site-header__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--ohb-nav-gap-end);
  min-width: 0;
  flex: 0 1 auto;
}

.ohb-site-header__session {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
  max-width: min(100%, 340px);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
  mask-size: 100% 100%;
}

.ohb-site-header__session .ohb-cn-link,
.ohb-site-header__session .ohb-cn-link.ohb-cn-btn {
  padding: 8px 12px;
  font-size: var(--ohb-nav-secondary-fs);
  font-weight: 600;
  letter-spacing: 0.045em;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 10px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.ohb-site-header__session .ohb-cn-link--ghost {
  border-color: color-mix(in srgb, var(--b) 28%, var(--g) 12%);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  background: color-mix(in srgb, var(--bg3) 55%, transparent);
}

.ohb-site-header__session .ohb-cn-link--ghost:hover {
  border-color: color-mix(in srgb, var(--b) 32%, transparent);
  color: var(--b);
  box-shadow: 0 0 16px var(--ohb-nav-glow-soft);
}

.ohb-site-header__session .ohb-cn-chip {
  flex-shrink: 0;
  max-width: 160px;
  font-size: 11px;
}

.ohb-site-header__cta {
  font-family: var(--f-display);
  font-size: var(--ohb-nav-cta-fs);
  font-weight: 800;
  letter-spacing: 0.11em;
  padding: 10px 16px;
  min-height: var(--ohb-nav-hit);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  color: var(--ohb-cta-text-on-accent, #061018);
  text-shadow: var(--ohb-cta-text-shadow, none);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--b) 72%, #020810) 0%,
    var(--b) 48%,
    color-mix(in srgb, var(--g) 85%, var(--b)) 100%
  );
  border: 1px solid color-mix(in srgb, var(--b) 50%, transparent);
  box-shadow:
    0 4px 24px color-mix(in srgb, var(--b) 32%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition:
    transform var(--ohb-nav-t),
    box-shadow var(--ohb-nav-t),
    filter var(--ohb-nav-t);
}

.ohb-site-header__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px color-mix(in srgb, var(--b) 42%, transparent);
  filter: brightness(1.03);
}

.ohb-site-header__cta:focus-visible {
  outline: 2px solid var(--g);
  outline-offset: 3px;
}

/* Burger */
.ohb-site-header__menu-btn {
  display: none;
  flex: 0 0 auto;
  margin-left: auto;
  width: var(--ohb-nav-hit);
  height: var(--ohb-nav-hit);
  padding: 0;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--b) 30%, transparent);
  background: color-mix(in srgb, var(--b) 7%, transparent);
  color: var(--b);
  cursor: pointer;
  transition:
    border-color var(--ohb-nav-t),
    box-shadow var(--ohb-nav-t),
    background var(--ohb-nav-t);
  z-index: 3;
}

.ohb-site-header__menu-btn:hover {
  border-color: color-mix(in srgb, var(--b) 50%, transparent);
  box-shadow: 0 0 20px var(--ohb-nav-glow-soft);
}

.ohb-site-header__menu-btn:focus-visible {
  outline: 2px solid var(--b);
  outline-offset: 2px;
}

.ohb-site-header__menu-icon {
  position: relative;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: background var(--ohb-nav-t);
}

.ohb-site-header__menu-icon::before,
.ohb-site-header__menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--ohb-nav-t), top var(--ohb-nav-t);
}

.ohb-site-header__menu-icon::before {
  top: -7px;
}

.ohb-site-header__menu-icon::after {
  top: 7px;
}

.ohb-site-header__menu-btn.is-open .ohb-site-header__menu-icon {
  background: transparent;
}

.ohb-site-header__menu-btn.is-open .ohb-site-header__menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.ohb-site-header__menu-btn.is-open .ohb-site-header__menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.ohb-site-header__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 78;
  background: rgba(0, 6, 16, 0.68);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.ohb-site-header__backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Force auth row stable dans le header */
.ohb-site-header [data-ohb-auth-nav] {
  flex-wrap: nowrap;
}

/* Portail */
.ohb-site-header--portal.pricing-topbar {
  display: block;
  margin-bottom: 18px;
  padding-bottom: 0;
  border-bottom: none;
}

.ohb-site-header--portal .ohb-site-header__bar {
  border-radius: 0;
}

/* Base portail : largeur pilotée par .ohb-site-header--portal .ohb-site-header__inner--portal (flex, pas de display:contents). */
.ohb-site-header__inner--portal {
  max-width: none;
  margin: 0;
  min-width: 0;
}

/* Legacy : rangée logo + nav (certaines pages anciennes). Les portails utilisent __inner en 3 zones. */
.ohb-site-header__portal-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1 1 0;
  min-width: 0;
}

.ohb-site-header__portal-quick {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex-shrink: 1;
  min-width: 0;
}

.ohb-site-header__portal-quick a,
.ohb-site-header__portal-quick button {
  font-family: var(--ohb-font-body, var(--f-body, 'Exo 2', system-ui, sans-serif));
  font-size: clamp(12px, 1.1vw, 13px);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ohb-text-muted);
  text-decoration: none;
  padding: 6px 12px;
  min-height: 0;
  border-radius: 6px;
  border: none !important;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  transition: background 0.15s ease, color 0.15s ease;
}

.ohb-site-header__portal-quick a:hover,
.ohb-site-header__portal-quick button:hover {
  color: var(--ohb-text-primary);
  background: color-mix(in srgb, var(--ohb-text-primary) 7%, transparent);
  text-decoration: none;
}

.ohb-site-header__portal-quick a:focus-visible,
.ohb-site-header__portal-quick button:focus-visible {
  outline: 2px solid var(--b);
  outline-offset: 2px;
}

.ohb-site-header--portal .ohb-nav-center {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
  overflow: visible;
}

.ohb-site-header--portal .ohb-nav-center .ohb-cn-link {
  white-space: nowrap;
  flex-shrink: 0;
  font-size: clamp(12px, 1.1vw, 14px);
  padding: 6px clamp(8px, 1vw, 14px);
}

.ohb-site-header--portal .ohb-nav-hamburger,
.ohb-site-header--portal .ohb-hamburger {
  order: 4;
  flex-shrink: 0;
  align-self: center;
}

.ohb-site-header--portal .ohb-cn-link--ghost {
  border-color: color-mix(in srgb, var(--g) 12%, transparent);
  background: color-mix(in srgb, var(--bg3) 35%, transparent);
}

/* Strip partenaire / admin */
.ohb-site-header--app-strip.ohb-partner-app-nav {
  padding: 10px clamp(14px, 2.5vw, 22px);
  min-height: calc(var(--ohb-nav-hit) + 8px);
}

.ohb-site-header--app-strip .ohb-partner-app-nav-actions {
  flex-wrap: nowrap;
  gap: 8px;
}

.ohb-site-header--app-strip .ohb-pw-nav-link {
  font-size: var(--ohb-nav-secondary-fs);
  padding: 8px 14px !important;
  min-height: 38px;
  border-radius: 10px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

/* Laptop compact */
@media (max-width: 1200px) and (min-width: 1081px) {
  :root {
    --ohb-nav-primary-fs: 12px;
    --ohb-nav-secondary-fs: 11px;
    --ohb-nav-cta-fs: 11px;
    --ohb-nav-primary-pad-x: 10px;
    --ohb-nav-gap-end: 8px;
  }

  .ohb-site-header__session {
    max-width: min(100%, 280px);
  }

  .ohb-site-header__flyout:has(> .ohb-site-header__nav-links) > .ohb-site-header__session {
    max-width: none !important;
  }
}

/* Marketing : évite scrollbar horizontale masquée sur la rangée session (1081–1280px). */
@media (max-width: 1280px) and (min-width: 1081px) {
  .ohb-site-header:not(.ohb-site-header--portal) .ohb-site-header__session {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 8px;
    max-width: min(100%, 400px);
    overflow-x: hidden;
    mask-image: none;
  }

  .ohb-site-header:not(.ohb-site-header--portal)
    .ohb-site-header__flyout:has(> .ohb-site-header__nav-links)
    .ohb-site-header__session {
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    max-width: none !important;
    overflow-x: visible !important;
    mask-image: none !important;
  }
}

/* Marketing (accueil) : flyout plat — nav | [data-ohb-auth-nav] | CTA en frères directs (plus de gouttières / mid qui mangent la zone auth). */
@media (min-width: 1081px) {
  .ohb-site-header:not(.ohb-site-header--portal) .ohb-site-header__inner {
    max-width: 1440px !important;
    padding-left: clamp(16px, 3vw, 40px) !important;
    padding-right: clamp(16px, 3vw, 40px) !important;
    min-height: 60px !important;
  }

  .ohb-site-header:not(.ohb-site-header--portal) .ohb-site-header__flyout:has(> .ohb-site-header__nav-links) {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: clamp(8px, 1.2vw, 14px) !important;
  }

  .ohb-site-header:not(.ohb-site-header--portal) .ohb-site-header__flyout:has(> .ohb-site-header__nav-links) > .ohb-site-header__nav-links {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    flex-wrap: nowrap !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center;
  }

  .ohb-site-header:not(.ohb-site-header--portal) .ohb-site-header__flyout:has(> .ohb-site-header__nav-links) > [data-ohb-auth-nav] {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    max-width: none !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    mask-image: none !important;
    margin-left: 0 !important;
  }

  .ohb-site-header:not(.ohb-site-header--portal) .ohb-site-header__flyout:has(> .ohb-site-header__nav-links) > .ohb-site-header__cta {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
  }

  .ohb-site-header:not(.ohb-site-header--portal)
    .ohb-site-header__flyout:has(> .ohb-site-header__nav-links)
    .ohb-site-header__session
    .ohb-cn-link,
  .ohb-site-header:not(.ohb-site-header--portal)
    .ohb-site-header__flyout:has(> .ohb-site-header__nav-links)
    .ohb-site-header__session
    .ohb-cn-link.ohb-cn-btn {
    padding: 4px 8px !important;
    min-height: 0 !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.03em;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .ohb-site-header:not(.ohb-site-header--portal)
    .ohb-site-header__flyout:has(> .ohb-site-header__nav-links)
    .ohb-site-header__session
    .ohb-cn-link--ghost {
    border: none !important;
    background: transparent !important;
  }

  .ohb-site-header:not(.ohb-site-header--portal)
    .ohb-site-header__flyout:has(> .ohb-site-header__nav-links)
    .ohb-site-header__session
    .ohb-nav-billing-link {
    font-size: 11px !important;
    padding: 4px 8px !important;
    border: none !important;
    background: transparent !important;
    color: var(--b, #00b4ff) !important;
    font-weight: 600 !important;
  }
}

/* Accueil : le CTA principal remplace le doublon « Créer un compte » injecté dans la session */
body.ohb-landing-body .ohb-site-header__session a.ohb-cn-link[href*='tab=signup'] {
  display: none !important;
}

/* Tablette / mobile — tiroir */
@media (max-width: 1080px) {
  .ohb-site-header__inner {
    gap: 10px;
  }

  .ohb-site-header__menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .ohb-site-header__backdrop {
    display: block;
  }

  /* Hors flux flex : une seule ligne marque + burger */
  .ohb-site-header__flyout {
    flex: 0 0 auto;
    position: fixed;
    z-index: 79;
    top: 0;
    right: 0;
    width: min(400px, 92vw);
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: calc(16px + env(safe-area-inset-top, 0)) 18px 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    background: linear-gradient(195deg, color-mix(in srgb, var(--bg2) 97%, transparent), color-mix(in srgb, var(--bg) 90%, transparent));
    border-left: 1px solid var(--ohb-nav-line-strong);
    box-shadow: -20px 0 56px rgba(0, 0, 0, 0.55);
    transform: translateX(105%);
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
  }

  .ohb-site-header__flyout.is-open {
    transform: translateX(0);
  }

  .ohb-site-header__gutter--start {
    display: none;
  }

  .ohb-site-header__gutter--end {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 14px;
  }

  .ohb-site-header__mid {
    max-width: none;
    justify-content: flex-start;
    width: 100%;
    flex: 0 0 auto;
  }

  .ohb-site-header__primary-inner {
    flex-direction: column;
    align-items: stretch;
    border-radius: 14px;
    padding: 6px;
    gap: 2px;
  }

  .ohb-site-header__link {
    width: 100%;
    text-align: left;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
  }

  .ohb-site-header__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: 100%;
  }

  .ohb-site-header__session {
    flex-wrap: wrap;
    max-width: none;
    overflow: visible;
    mask-image: none;
    justify-content: flex-start;
  }

  .ohb-site-header__session .ohb-cn-link,
  .ohb-site-header__session .ohb-cn-link.ohb-cn-btn {
    flex: 1 1 auto;
    min-width: 140px;
    justify-content: center;
  }

  .ohb-site-header__cta {
    width: 100%;
  }

  /* Flyout plat (index) : mêmes comportements que l’ancien mid + actions empilés */
  .ohb-site-header__flyout:has(> .ohb-site-header__nav-links) {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .ohb-site-header__flyout:has(> .ohb-site-header__nav-links) > .ohb-site-header__nav-links {
    width: 100%;
    flex: 0 0 auto;
    max-width: none;
    justify-content: flex-start;
  }

  .ohb-site-header__flyout:has(> .ohb-site-header__nav-links) > [data-ohb-auth-nav].ohb-site-header__session {
    width: 100%;
    max-width: none;
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow: visible;
    mask-image: none;
  }

  .ohb-site-header__flyout:has(> .ohb-site-header__nav-links) > .ohb-site-header__session .ohb-cn-link,
  .ohb-site-header__flyout:has(> .ohb-site-header__nav-links) > .ohb-site-header__session .ohb-cn-link.ohb-cn-btn {
    flex: 1 1 auto;
    min-width: 140px;
    justify-content: center;
  }

  .ohb-site-header__flyout:has(> .ohb-site-header__nav-links) > .ohb-site-header__cta {
    width: 100%;
  }

  body.ohb-nav-drawer-open {
    overflow: hidden;
  }
}

/* Portail — ≤900px : marque + burger ; liens + auth dans le menu mobile */
@media (max-width: 900px) {
  .ohb-site-header--portal .ohb-nav-hamburger,
  .ohb-site-header--portal .ohb-hamburger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .ohb-site-header--portal .ohb-site-header__inner--portal {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
  }

  .ohb-site-header--portal .ohb-site-header__portal-quick {
    display: none !important;
  }

  .ohb-site-header--portal [data-ohb-auth-nav] {
    display: none !important;
  }

  /* Marque lisible en mobile : pas de troncature forcée (logo + libellé complet) */
  .ohb-site-header--portal .ohb-site-header__brand-portal {
    flex: 0 0 auto;
    flex-shrink: 0;
    min-width: max-content;
    max-width: none;
    overflow: visible !important;
    margin-right: 12px;
  }

  .ohb-site-header--portal [data-ohb-nav-center] {
    display: none !important;
  }

  .ohb-site-header--portal .ohb-site-header__inner--portal.ohb-portal-nav-drawer-open [data-ohb-nav-center] {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 4px;
  }

  .ohb-site-header--portal .ohb-site-header__inner--portal.ohb-portal-nav-drawer-open [data-ohb-nav-center] .ohb-cn-link {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ohb-site-header__flyout,
  .ohb-site-header__backdrop,
  .ohb-site-header__menu-icon,
  .ohb-site-header__menu-icon::before,
  .ohb-site-header__menu-icon::after {
    transition: none !important;
  }

  .ohb-site-header__menu-btn.is-open .ohb-site-header__menu-icon,
  .ohb-site-header__menu-btn.is-open .ohb-site-header__menu-icon::before,
  .ohb-site-header__menu-btn.is-open .ohb-site-header__menu-icon::after {
    transform: none !important;
  }

  .ohb-site-header__menu-btn.is-open .ohb-site-header__menu-icon {
    background: currentColor;
  }

  .ohb-site-header__menu-btn.is-open .ohb-site-header__menu-icon::before {
    top: -7px;
  }

  .ohb-site-header__menu-btn.is-open .ohb-site-header__menu-icon::after {
    top: 7px;
  }

  .ohb-site-header__cta:hover {
    transform: none;
  }
}

/* ═══ Portail OHB — barre premium + menu mobile (≤960px) ═══ */
.ohb-site-header--portal.ohb-site-header {
  z-index: 200;
}

.ohb-site-header--portal .ohb-site-header__bar {
  position: relative;
  overflow-x: visible;
}

.ohb-site-header--portal.ohb-site-header .ohb-site-header__bar {
  background: rgba(5, 5, 16, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--ohb-border, rgba(255, 255, 255, 0.08));
}

.ohb-site-header--portal .ohb-site-header__bar {
  padding: 0;
  width: 100%;
}

/* ═══ Portail : 3 zones — logo | liens centraux | auth (jamais fusion / chevauchement) ═══ */
.ohb-site-header--portal .ohb-site-header__inner--portal {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  overflow: visible !important;
  height: 60px !important;
  min-height: 60px !important;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px);
  gap: 0;
  min-width: 0;
  border-bottom: none;
}

.ohb-site-header--portal .ohb-site-header__inner--portal > a.brand-mini,
.ohb-site-header--portal .ohb-site-header__inner--portal > a.ohb-site-header__brand-portal {
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  order: 1;
  margin-right: 20px !important;
}

/* Zone 2 — liens : occupe l’espace restant, contenu rogné si trop étroit (pas de chevauchement zone 3) */
.ohb-site-header--portal .ohb-site-header__inner--portal > .ohb-site-header__portal-quick,
header.pricing-topbar.ohb-site-header--portal .ohb-site-header__inner--portal > .ohb-site-header__portal-quick {
  order: 2;
  display: flex !important;
  align-items: center !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: 100%;
  justify-content: flex-start;
  gap: 0;
  overflow: hidden !important;
  flex-wrap: nowrap !important;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

/* Compat : ancienne rangée qui enveloppait quick + auth */
.ohb-site-header--portal .ohb-site-header__portal-row.tb-nav-row {
  display: flex !important;
  align-items: center !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  justify-content: space-between !important;
  gap: 12px;
  flex-wrap: nowrap !important;
  overflow: hidden;
}

.ohb-site-header--portal .ohb-site-header__portal-row.tb-links {
  overflow: hidden;
  flex-wrap: nowrap;
}

/* Marque : texte complet visible (pas d’ellipse) — flex-shrink 0 */
.ohb-site-header--portal .ohb-site-header__brand-portal,
.ohb-site-header--portal .brand-mini.ohb-site-header__brand-portal {
  flex: 0 0 auto;
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: auto;
  min-width: 0;
  max-width: none;
  overflow: visible !important;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 20px;
  text-decoration: none;
  z-index: 1;
  white-space: nowrap;
}

.ohb-site-header--portal .ohb-site-header__brand-portal:has(> div) {
  max-width: none;
}

.ohb-site-header--portal .ohb-site-header__brand-portal > div {
  min-width: 0;
  overflow: visible;
}

.ohb-site-header--portal .ohb-site-header__brand-portal .display {
  font-family: var(--ohb-font-display, var(--f-display, 'Orbitron', system-ui, sans-serif));
  font-size: clamp(11px, 1.3vw, 14px);
  font-weight: 800;
  color: var(--ohb-text-primary, var(--text));
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  min-width: 0;
}

.ohb-site-header--portal .ohb-site-header__brand-portal .mono {
  font-size: 11px;
  color: var(--ohb-text-faint, var(--text3));
  letter-spacing: 0.15em;
}

.ohb-site-header--portal .ohb-site-header__portal-quick a,
.ohb-site-header--portal .ohb-site-header__portal-quick button {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  font-family: var(--ohb-font-body, var(--f-body, 'Exo 2', system-ui, sans-serif));
  font-size: clamp(11px, 0.9vw, 13px) !important;
  font-weight: 500;
  color: var(--ohb-text-muted);
  padding: 6px clamp(8px, 0.8vw, 14px) !important;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  border: none !important;
  background: transparent;
  cursor: pointer;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}

.ohb-site-header--portal .ohb-site-header__portal-quick a:hover,
.ohb-site-header--portal .ohb-site-header__portal-quick button:hover {
  color: var(--ohb-text-primary);
  background: color-mix(in srgb, var(--ohb-text-primary) 7%, transparent);
  text-decoration: none;
}

.ohb-site-header--portal .ohb-site-header__portal-quick a.active {
  color: var(--ohb-accent);
  background: var(--ohb-accent-dim);
}

.ohb-site-header--portal .ohb-site-header__inner--portal > [data-ohb-auth-nav],
.ohb-site-header--portal [data-ohb-auth-nav] {
  order: 3;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  flex-wrap: nowrap !important;
  justify-content: flex-end;
  white-space: nowrap !important;
  margin-left: 16px !important;
  min-width: 0;
  max-width: none;
  mask-image: none;
  overflow: visible;
}

.ohb-site-header--portal [data-ohb-auth-nav] a,
.ohb-site-header--portal [data-ohb-auth-nav] button {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  font-size: clamp(11px, 0.9vw, 12px) !important;
  padding: 5px clamp(8px, 0.8vw, 12px) !important;
  border: none !important;
  background: transparent;
  color: var(--ohb-text-muted);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.ohb-site-header--portal [data-ohb-auth-nav] a:hover,
.ohb-site-header--portal [data-ohb-auth-nav] button:hover {
  color: var(--ohb-text-primary);
  background: rgba(255, 255, 255, 0.07);
}

/* Laptop / tablette : une seule ligne */
@media (max-width: 1180px) and (min-width: 901px) {
  .ohb-site-header--portal .ohb-site-header__portal-row {
    flex-wrap: nowrap !important;
    align-items: center;
  }

  .ohb-site-header--portal .ohb-site-header__portal-quick {
    flex-wrap: nowrap !important;
    min-width: 0;
  }

  .ohb-site-header--portal [data-ohb-auth-nav] {
    flex-wrap: nowrap !important;
  }
}

.ohb-site-header--portal .ohb-nav-email-pill,
.ohb-site-header--portal .ohb-nav-user-email,
.ohb-site-header--portal .ohb-cn-chip:not(.ohb-cn-warn):not(.ohb-cn-muted) {
  font-family: var(--ohb-font-mono, 'Share Tech Mono', monospace);
  font-size: 11px;
  color: var(--ohb-accent);
  background: color-mix(in srgb, var(--ohb-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ohb-accent) 20%, transparent);
  border-radius: 999px;
  padding: 4px 12px;
  max-width: 130px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  min-width: 0 !important;
}

[data-ohb-auth-nav] a.ohb-nav-billing-link,
[data-ohb-auth-nav] a.ohb-menu-primary,
[data-ohb-auth-nav] a[href*='account-billing'] {
  color: var(--ohb-accent) !important;
  font-weight: 600;
}

[data-ohb-auth-nav] a.ohb-nav-billing-link.ohb-cn-link--ghost {
  color: var(--ohb-accent) !important;
}

[data-ohb-auth-nav] a.ohb-nav-billing-active {
  background: color-mix(in srgb, var(--ohb-accent) 12%, transparent) !important;
}

[data-ohb-auth-nav] a.ohb-nav-billing-link:hover,
[data-ohb-auth-nav] a[href*='account-billing']:hover {
  color: var(--ohb-text-primary) !important;
  background: var(--ohb-accent-dim);
}

[data-ohb-auth-nav] button[data-ohb-nav-logout] {
  color: var(--ohb-text-faint);
}

[data-ohb-auth-nav] button[data-ohb-nav-logout]:hover {
  color: var(--ohb-red);
  background: color-mix(in srgb, var(--ohb-red) 8%, transparent);
}

.ohb-nav-hamburger,
.ohb-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: none;
  flex-shrink: 0;
  min-width: var(--ohb-nav-hit);
  min-height: var(--ohb-nav-hit);
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--ohb-text-muted);
  transition:
    border-color var(--ohb-nav-t),
    color var(--ohb-nav-t),
    background var(--ohb-nav-t);
}

.ohb-nav-hamburger:hover,
.ohb-hamburger:hover {
  color: var(--b);
  background: color-mix(in srgb, var(--b) 8%, transparent);
}

.ohb-nav-hamburger span,
.ohb-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ohb-text-muted);
  border-radius: 2px;
  transition: all 0.2s;
}

.ohb-nav-hamburger.open span:nth-child(1),
.ohb-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.ohb-nav-hamburger.open span:nth-child(2),
.ohb-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.ohb-nav-hamburger.open span:nth-child(3),
.ohb-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.ohb-nav-mobile-menu,
.ohb-mobile-menu {
  display: none;
  position: fixed;
  top: calc(60px + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  background: color-mix(in srgb, var(--ohb-bg-base) 98%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--ohb-border, rgba(255, 255, 255, 0.08));
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  flex-direction: column;
  gap: 4px;
  z-index: 199;
  box-sizing: border-box;
  max-height: min(72vh, calc(100dvh - 60px - env(safe-area-inset-top, 0px)));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@keyframes ohb-menu-slide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ohb-nav-mobile-menu.open,
.ohb-mobile-menu.open {
  display: flex;
  animation: ohb-menu-slide 0.2s ease;
}

.ohb-nav-mobile-menu a,
.ohb-nav-mobile-menu button {
  font-family: var(--ohb-font-body, system-ui, sans-serif);
  font-size: 14px;
  color: var(--ohb-text-muted, var(--text2));
  padding: 10px 12px;
  border-radius: var(--ohb-radius-sm, 6px);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
}

.ohb-nav-mobile-menu a:hover,
.ohb-nav-mobile-menu button:hover,
.ohb-mobile-menu a:hover,
.ohb-mobile-menu button:hover {
  color: var(--ohb-text-primary, var(--text));
  background: rgba(255, 255, 255, 0.06);
}

.ohb-nav-mobile-menu a.ohb-menu-primary,
.ohb-mobile-menu a.ohb-menu-primary {
  color: var(--ohb-accent);
  font-weight: 600;
}

.ohb-nav-mobile-menu .ohb-cn-link {
  width: 100%;
  justify-content: flex-start;
}

.ohb-nav-mobile-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 8px 0;
}

/* Portail / auth : annule les « pilules » bordurées de pricing-page.css sur .tb-links */
.ohb-site-header--portal .tb-links a,
header.pricing-topbar.ohb-site-header--portal .tb-links a,
.ohb-site-header--portal .tb-nav-row a:not(.ohb-cn-link):not(.ohb-site-header__link) {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font-family: var(--ohb-font-body, var(--f-body, 'Exo 2', system-ui, sans-serif));
  font-size: clamp(12px, 1.1vw, 13px);
  font-weight: 500;
  padding: 6px clamp(8px, 1vw, 14px);
  border-radius: 6px;
  color: var(--ohb-text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.ohb-site-header--portal .tb-links a:hover,
header.pricing-topbar.ohb-site-header--portal .tb-links a:hover,
.ohb-site-header--portal .tb-nav-row a:not(.ohb-cn-link):not(.ohb-site-header__link):hover {
  color: var(--ohb-text-primary);
  background: color-mix(in srgb, var(--ohb-text-primary) 7%, transparent) !important;
  text-decoration: none;
}

/* Marque : texte complet (desktop + tablette) */
.ohb-site-header__brand,
.brand-mini {
  flex-shrink: 0 !important;
  overflow: visible !important;
  white-space: nowrap;
  min-width: max-content;
  margin-right: 24px;
}

.ohb-site-header__brand .display,
.ohb-site-header__brand-portal .display,
.brand-mini .display {
  overflow: visible !important;
  text-overflow: unset !important;
  white-space: nowrap;
  font-size: clamp(11px, 1.2vw, 14px);
}

/* ═══ Fix chevauchement barre portail (Partenaires / pilule e-mail) — priorité absolue ═══ */
.ohb-site-header__inner,
.ohb-site-header__inner--portal {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  overflow: visible !important;
}

.ohb-site-header__nav-links,
.ohb-site-header__portal-quick {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  flex-wrap: nowrap !important;
  display: flex !important;
  align-items: center !important;
}

.ohb-site-header__portal-quick a,
.ohb-site-header__portal-quick button {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  font-size: clamp(11px, 0.85vw, 13px) !important;
  padding: 5px clamp(6px, 0.7vw, 12px) !important;
  border: none !important;
  background: transparent;
}

[data-ohb-auth-nav] {
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  margin-left: 16px !important;
}

[data-ohb-auth-nav] > * {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  font-size: clamp(11px, 0.85vw, 12px) !important;
}

.ohb-nav-user-email {
  max-width: 130px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
