/**
 * @file
 * The header components.
 *
 * It includes styles for the header itself and their
 * component as the logotype or the main menu.
 */
/**
 * Global header rules
 */
 
.header {
  max-width: 1440px;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  /* padding: 1rem 2rem; */
  box-shadow: 0px 10px 20px -10px rgba(0,0,0,0.05);
}
ul.menu a.is-active {
  color: var(--color-neutral--2);
}
@media all and (min-width: 1000px) {
  .header {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    top: inherit;
    left: inherit;
    right: inherit;
    box-shadow: none;
    padding: 0;
    height: auto;
    gap: 0;
    margin: 0 auto;
    width: 100%;
  }
}
@media all and (min-width: 1200px) {
  .header {
    height: auto;
  }
}
/**
 * Site Brand
 */
.header__brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1rem;
}
.header__brand::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background-color: var(--color-neutral--light);
  z-index: -1;
}
.path-frontpage .header__brand::before {
  background-color: var(--color-primary--clear);
}
.header__brand .region-header-identity {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}
.header__brand .site-logo {
  display: inline-block;
  max-width: 110px;
}
.header__brand .site-logo img {
  width: 163px;
  height: 58px;
  max-width: none;
  max-height: none;
}
@media all and (min-width: 1000px) {
  .header__brand {
    flex: 0 0 100%;
    width: 100%;
    min-height: 0;
    margin-left: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    height: 100px;
  }
  .header__brand .region-header-identity {
    display: flex;
    align-items: center;
    width: auto;
    height: 100%;
    flex: 1 1 auto;
  }
  .header__brand .block-system-branding-block {
    height: 100%;
  }
  .header__brand .site-logo {
    height: 100%;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
  }
  .header__brand .site-logo img {
    max-height: 100%;
  }
  .header__brand .region-header-identity .menu--menu-area {
    margin-left: auto;
  }
  .header__brand .header__search {
    flex: 0 0 auto;
    height: 100%;
    margin-left: 2rem;
    display: flex;
    align-items: center;
  }
}
@media all and (min-width: 1200px) {
  .header__brand .site-logo {
    max-width: 250px;
  }
  .header__brand .header__search {
    margin-left: 4rem;
  }
}
/**
 * Menu
 */
.header__menu {
  position: fixed;
  right: 100%;
  left: 0;
  top: 80px;
  bottom: 0;
  transition: 0.3s ease;
  background-color: var(--color-neutral--light);
  z-index: 10;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.path-frontpage .header__menu {
  background-color: var(--color-primary--clear);
}
.user-logged-in .header__menu {
  top: 113px;
}
.header.js-active .header__menu {
  right: 0;
}
.header__menu ul.menu {
  margin: 0;
}
.header__menu .menu--level-0 {
  padding: 1.5rem 1.5rem 0;
}
.header__menu .menu__link {
  color: var(--color-neutral--2);
  width: 100%;
  padding: 0.5rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  font-size: 1rem;
  position: relative;
  cursor: pointer;
  margin-bottom: 0.625rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
  font-weight: 700;
}
.header__menu .menu__link:hover {
  text-decoration: none;
}
.menu__main .menu__link::after {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url('../../images/header/arrow.svg');
}

.menu__main .menu--level-1 .menu__link::after {
  display: none;
}
/* Expended */
.menu__main .menu--level-1 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 0;
  overflow: hidden;
}
.menu__main .menu__item--expanded.js-active .menu--level-1 {
  gap: 0.3rem;
  height: max-content;
  overflow: unset;
}
.header__menu .menu--level-1 .menu__link {
  font-weight: 500;
  color: var(--color-primary--2);
  margin-left: 1rem;
}
.header__menu .menu--level-1 .menu__link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--color-neutral--3);
  transform: translateY(50%);
}
.menu__main .menu__item--expanded.js-active > .menu__link::after {
  transform: rotate(90deg);
}
@media all and (min-width: 975px) {
  .user-logged-in .header__menu {
    top: 168px;
  }
}
@media all and (min-width: 1000px) {
  .menu__main,
  .region-header-menu,
  .menu--main,
  .header__menu .menu--level-0,
  .header__menu .menu__item {
    height: 100%;
  }
  .header__menu {
    height: 0;
    flex: 0 0 100%;
    width: 100%;
    order: 2;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    position: relative;
    right: inherit;
    left: inherit;
    bottom: inherit;
    top: inherit;
    transition: none;
    background: inherit;
    overflow-y: inherit;
    gap: 1rem;
    background-color: unset;
  }
  .menu__main {
    background-color: #fff;
    border-radius: 60px;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    width: fit-content;
    margin-top: -12px;
    height: 80px;
  }
  .header__menu .menu--level-0 > .menu__item > .menu__link {
    font-weight: 700;
  }
  .user-logged-in .header__menu {
    top: inherit;
  }
  .header.js-active .header__menu {
    transform: none;
  }
  .header__menu .menu--level-0 {
    display: flex;
    align-items: center;
    padding: 0;
    gap: 2rem;
  }
  .header__menu .menu__item {
    display: flex;
    position: relative;
  }
  .header__menu .menu__link {
    padding: 0 0.5rem;
  font-size: var(--text-size-s);
    margin-bottom: 0;
  }
  .menu__main .menu__link:after {
    content: none;
  }
.header__menu .menu--level-0 > .menu__item--expanded > .menu__link {
    cursor: pointer;
  }
  .header__menu .menu--level-0 > .menu__item:hover > .menu__link {
    background-color: var(--color-primary--4);
  }
  /* Sous-menu : panneau flottant détaché de la pastille */
  .menu__main .menu--level-1 {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: -1rem;
    width: 340px;
    height: max-content;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
    z-index: 3;
  }
  /* Zone tampon invisible : garde le survol actif dans l'espace vide */
  .menu__main .menu__item--expanded::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 14px;
  }
  .menu__main .menu__item--expanded:hover .menu--level-1 {
    display: flex;
  }
  .menu__main .menu--level-1 .menu__link {
    padding: 0.5rem;
  }

  .menu__main .menu--level-0 > .menu__item > .menu__link::after {
    content: none;
  }
  .menu__main .menu--level-1 .menu__link::after {
    content: '';
    transition: 0.2s;
  }
  .menu__main .menu--level-1 .menu__link:hover::after {
    transform: translateX(5px);
  }
  .header__menu .menu--level-1 .menu__link::before {
    bottom: -0.5rem;
  }
  .header__menu .menu--level-1 .menu__item:last-child .menu__link::before {
    content: none;
  }
  .header__menu .menu--level-1 .menu__link {
    font-weight: 700;
    color: var(--color-primary--2);
    margin-left: unset;
  }
}
@media all and (min-width: 1200px) {
  .header__menu {
    gap: 2rem;
  }
  .header__menu .menu__link {
    font-size: 1rem;
  }
}
@media all and (min-width: 1350px) {
  .header__menu .menu__link {
    padding: 0 1rem;
  }
}

/**
 * Ordre d'affichage dans le menu mobile
 * 1. menu principal — 2. menu espace — 3. recherche
 */
@media all and (max-width: 999px) {
  .header__menu .menu__main {
    order: 1;
    flex: 0 0 auto;
  }
  .header__menu .menu--menu-area {
    order: 2;
    flex: 0 0 auto;
  }
  .header__menu .header__search {
    order: 3;
    flex: 0 0 auto;
  }
  
}
/**
 * Custom Element
 */
.menu__link.menu__link-cta {
  display: inline-block;
  padding: 0.5rem 1rem;
  width: fit-content;
  border: 1px solid var(--color-neutral--2);
  color: var(--color-neutral--2);
  font-weight: 700;
  border-radius: 40px;
  transition: background-color 0.2s;
  margin-top: 0.5rem;
}
.menu__link.menu__link-cta:hover {
  background-color: var(--color-primary--4);
}
.menu__link.menu__link-cta::after {
  content: none;
}
.header__menu .menu--level-0 > .menu__item > .menu__link.menu__link-cta {
  cursor: pointer;
}
@media all and (min-width: 1000px) {
  .menu__link.menu__link-cta {
    height: fit-content;
    margin: auto 0 auto 1rem;
  }
}
/**
 * Search — champ de recherche unique, visible partout
 */
.header__search {
  display: flex;
  align-items: center;
}
.header__menu .header__search {
  margin: 1rem 1.5rem 1.5rem;
}
.header__search .search-block-form {
  background-color: #fff;
  border-radius: 30px;
  padding: 0 1rem;
  height: 44px;
  width: 321px;
  max-width: 100%;
}
.header__search form#search-block-form {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0.2rem;
}
.header__search .block-search__title {
  display: none;
}
.header__search .form-item-keys {
  margin: 0;
  flex: 1 1 auto;
}
.header__search input.form-search {
  border: none;
  background: transparent;
  outline: none;
  font-size: var(--text-size-s);
  color: var(--color-neutral--dark);
  width: 100%;
}
.header__search .form-actions {
  margin: 0;
  flex: 0 0 auto;
  margin-top: 4px;
}
.header__search input.form-submit {
  all: unset;
  text-indent: -9999px;
  overflow: hidden;
  width: 16px;
  height: 16px;
  background: url("../../images/header/search-black.svg") center / contain no-repeat;
  cursor: pointer;
  flex: 0 0 auto;
  margin-top: 4px;
}
.header__search input.form-search::placeholder {
  color: var(--color-neutral--dark);
  opacity: 1;
}
/**
 * Menu Area (Espace Parents / Espace Pro)
 */
/* Icône commune desktop + mobile */
.menu--menu-area .menu--level-0 > .menu__item > .menu__link::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  flex: 0 0 auto;
  background: url("../../images/header/icon-area.svg") no-repeat center;
  background-size: contain;
  vertical-align: middle;
  margin-bottom: 2px;
}
/* Version mobile : dans le menu déroulant, entre le menu principal et la recherche */
.header__menu .menu--menu-area {
  width: 100%;
  padding: 1rem 1.5rem 0;
}
.header__menu .menu--menu-area .menu--level-0 {
  display: block;
  padding: 0;
}
.header__menu .menu--menu-area .menu__item {
  display: block;
}
.header__menu .menu--menu-area .menu__link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: fit-content;
  margin-bottom: 0;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-neutral--2);
  border-radius: 40px;
  font-weight: 700;
  color: var(--color-neutral--2);
}
.menu--menu-area > .menu--level-0 .menu__link {
  font-weight: 500;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: transparent;
  text-underline-offset: 3.5px;
  transition: text-decoration-color 0.3s ease;
}
.menu--menu-area > .menu--level-0 .menu__link:hover {
  text-decoration-color: currentColor;
}
/* Affichage exclusif selon la largeur d'écran */
@media all and (max-width: 999px) {
  .header__brand .menu--menu-area {
    display: none;
  }
}
@media all and (min-width: 1000px) {
  .header__menu .menu--menu-area {
    display: none;
  }
}
/**
 * Mobile menu button
 */
.menu-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border-radius: 50%;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-toggle__button {
  border: none;
  width: 22px;
  height: 16px;
  padding: 0;
  text-indent: 100px;
  background-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  z-index: 1;
  position: relative;
  left: auto;
  top: auto;
}
.menu-toggle span {
  position: absolute;
  left: 1px;
  display: block;
  width: 20px;
  height: 2px;
  background-color: #000;
  transition: all ease .25s;
  -webkit-transition: all ease .25s;
  -moz-transition: all ease .25s;
  -ms-transition: all ease .25s;
  -o-transition: all ease .25s;
  border-radius: 0px;
  -webkit-border-radius: 0px;
  -moz-border-radius: 0px;
  -ms-border-radius: 0px;
  -o-border-radius: 0px;
}
.menu-toggle span:nth-child(1) {
  top: 1px;
}
.menu-toggle span:nth-child(2) {
  top: 7px;
}
.menu-toggle span:nth-child(3) {
  top: 13px;
}
.menu-toggle:hover span:nth-child(1),
.header.js-active .menu-toggle span:nth-child(1),
.menu-toggle:hover span:nth-child(3),
.header.js-active .menu-toggle span:nth-child(3) {
  width: 20px;
}
.header.js-active .menu-toggle span:nth-child(1) {
  top: 7px;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
}
.header.js-active .menu-toggle span:nth-child(2) {
  width: 0;
  left: 22px;
}
.header.js-active .menu-toggle span:nth-child(3) {
  top: 7px;
  -webkit-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
}
@media all and (min-width: 1000px) {
  .menu-toggle {
    display: none;
  }
}