/*
Babylone native header - production plugin.
Visibility remains server-side through WordPress, Ultimate Member and If Menu.
*/

:root {
  --bc-header-ink: #0b2239;
  --bc-header-navy: #081a2d;
  --bc-header-blue: #0076b6;
  --bc-header-accent: #69bbdd;
  --bc-header-green: #387f5c;
  --bc-header-orange: #ef7a34;
  --bc-header-paper: #f6f8fb;
  --bc-header-line: #dbe5ee;
  --bc-header-shadow: 0 16px 36px rgba(8, 26, 45, 0.11);
}

body.bc-native-header-enabled .elementor-location-header,
body.bc-native-header-enabled .elementor-16067 {
  display: none !important;
}

body.admin-bar .bc-site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .bc-site-header {
    top: 46px;
  }
}

.bc-site-header {
  position: sticky;
  top: 0;
  z-index: 9990;
  color: var(--bc-header-ink);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid rgba(105, 187, 221, 0.28);
  box-shadow: 0 8px 24px rgba(8, 26, 45, 0.05);
}

@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .bc-site-header {
    -webkit-backdrop-filter: saturate(145%) blur(12px);
    backdrop-filter: saturate(145%) blur(12px);
  }
}

.bc-site-header *,
.bc-site-header *::before,
.bc-site-header *::after {
  box-sizing: border-box;
}

.bc-site-header a {
  color: inherit;
}

.bc-site-header__inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 0 auto;
}

.bc-site-header__brand {
  min-width: 0;
}

.bc-site-header__brand .custom-logo-link,
.bc-site-header__logo-link,
.bc-site-header__name {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  min-height: 44px;
  color: var(--bc-header-ink);
  text-decoration: none;
}

.bc-site-header__brand img {
  display: block;
  width: auto;
  max-width: min(210px, 100%);
  max-height: 54px;
}

.bc-site-header__name span {
  font-size: 18px;
  font-weight: 850;
  line-height: 1.15;
}

.bc-primary-nav {
  min-width: 0;
}

.bc-primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bc-primary-nav .menu-item {
  position: relative;
  margin: 0;
}

.bc-primary-nav .menu-item > a,
.bc-primary-nav .menu-item > span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 9px;
  color: var(--bc-header-ink);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.bc-primary-nav .menu-item:not(.btn_associe):not(.menu_tdb) > a:hover,
.bc-primary-nav .menu-item:not(.btn_associe):not(.menu_tdb) > a:focus-visible,
.bc-primary-nav .current-menu-item:not(.btn_associe):not(.menu_tdb) > a,
.bc-primary-nav .current-menu-ancestor:not(.btn_associe):not(.menu_tdb) > a {
  color: var(--bc-header-blue);
  background: rgba(105, 187, 221, 0.13);
}

.bc-primary-nav .btn_associe > a,
.bc-primary-nav .menu_tdb > a {
  min-height: 40px;
  padding: 9px 15px;
  color: #ffffff;
  background: var(--bc-header-blue);
  border: 1px solid rgba(0, 118, 182, 0.18);
  box-shadow: 0 10px 22px rgba(0, 118, 182, 0.16);
}

.bc-primary-nav .btn_associe > a:hover,
.bc-primary-nav .btn_associe > a:focus-visible,
.bc-primary-nav .menu_tdb > a:hover,
.bc-primary-nav .menu_tdb > a:focus-visible {
  color: #ffffff;
  background: #005f93;
  box-shadow: 0 12px 24px rgba(0, 118, 182, 0.23);
  transform: translateY(-1px);
}

.bc-primary-nav .sub-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 9995;
  width: max-content;
  min-width: 246px;
  max-width: min(320px, calc(100vw - 40px));
  display: none;
  margin: 0;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--bc-header-line);
  border-radius: 8px;
  box-shadow: var(--bc-header-shadow);
  list-style: none;
}

.bc-primary-nav .sub-menu .sub-menu {
  top: -8px;
  left: calc(100% + 8px);
}

.bc-primary-nav .menu-item:hover > .sub-menu,
.bc-primary-nav .menu-item:focus-within > .sub-menu {
  display: grid;
  gap: 2px;
}

.bc-primary-nav .sub-menu a {
  width: 100%;
  min-height: 40px;
  justify-content: flex-start;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  white-space: normal;
}

.bc-primary-nav .sub-menu a:hover,
.bc-primary-nav .sub-menu a:focus-visible {
  color: var(--bc-header-blue);
  background: var(--bc-header-paper);
}

.bc-site-header__account {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.bc-account-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
}

.bc-account-link--register {
  color: #ffffff;
  background: var(--bc-header-orange);
}

.bc-account-link--login {
  color: var(--bc-header-ink);
  background: #ffffff;
  border: 1px solid var(--bc-header-line);
}

.bc-account-link:hover,
.bc-account-link:focus-visible {
  box-shadow: 0 10px 22px rgba(8, 26, 45, 0.12);
  transform: translateY(-1px);
}

.bc-nav-toggle {
  display: none;
}

.bc-site-header a:focus-visible,
.bc-nav-toggle:focus-visible {
  outline: 3px solid rgba(56, 127, 92, 0.42);
  outline-offset: 3px;
}

@media (max-width: 1120px) {
  .bc-site-header__inner {
    grid-template-columns: minmax(130px, 190px) minmax(0, 1fr) auto;
    gap: 10px;
  }

  .bc-primary-nav .menu-item > a,
  .bc-primary-nav .menu-item > span {
    padding-right: 6px;
    padding-left: 6px;
    font-size: 12px;
  }

  .bc-primary-nav .btn_associe > a,
  .bc-primary-nav .menu_tdb > a {
    padding-right: 10px;
    padding-left: 10px;
  }
}

@media (max-width: 767px) {
  .bc-site-header__inner {
    width: min(100% - 24px, 1180px);
    min-height: 74px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .bc-site-header__brand img {
    max-height: 46px;
  }

  .bc-nav-toggle {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    color: var(--bc-header-blue);
    background: #ffffff;
    border: 1px solid var(--bc-header-line);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(8, 26, 45, 0.1);
    cursor: pointer;
  }

  .bc-nav-toggle__bar {
    width: 18px;
    height: 2px;
    display: block;
    grid-area: 1 / 1;
    background: currentColor;
    border-radius: 999px;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .bc-nav-toggle__bar:nth-child(1) {
    transform: translateY(-6px);
  }

  .bc-nav-toggle__bar:nth-child(3) {
    transform: translateY(6px);
  }

  .bc-nav-toggle[aria-expanded="true"] .bc-nav-toggle__bar:nth-child(1) {
    transform: rotate(45deg);
  }

  .bc-nav-toggle[aria-expanded="true"] .bc-nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }

  .bc-nav-toggle[aria-expanded="true"] .bc-nav-toggle__bar:nth-child(3) {
    transform: rotate(-45deg);
  }

  .bc-primary-nav {
    position: fixed;
    top: 82px;
    right: 10px;
    left: 10px;
    z-index: 9995;
    display: none;
    max-height: calc(100vh - 96px);
    padding: 8px;
    overflow: auto;
    background: #ffffff;
    border: 1px solid rgba(105, 187, 221, 0.3);
    border-radius: 8px;
    box-shadow: var(--bc-header-shadow);
  }

  body.admin-bar .bc-primary-nav {
    top: 128px;
  }

  .bc-primary-nav.is-open {
    display: block;
  }

  .bc-primary-nav__list {
    display: grid;
    gap: 2px;
    justify-content: stretch;
  }

  .bc-primary-nav .menu-item > a,
  .bc-primary-nav .menu-item > span {
    width: 100%;
    min-height: 42px;
    justify-content: flex-start;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.2;
    white-space: normal;
  }

  .bc-primary-nav .btn_associe > a,
  .bc-primary-nav .menu_tdb > a {
    justify-content: center;
    margin-top: 6px;
  }

  .bc-primary-nav .sub-menu,
  .bc-primary-nav .sub-menu .sub-menu {
    position: static;
    width: auto;
    max-width: none;
    display: grid;
    gap: 2px;
    margin: 2px 0 8px 10px;
    padding: 6px 0 6px 8px;
    background: #f8fbfd;
    border: 0;
    border-left: 2px solid rgba(105, 187, 221, 0.45);
    border-radius: 0;
    box-shadow: none;
  }

  .bc-site-header__account {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .bc-account-link {
    flex: 1 1 0;
  }
}
