/* NIVEAU 1 */

.site-header-wrapper {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  left: 0;
  right: 0;
  z-index: 999;
}

.site-header {
  background-color: white;
  box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.25);
  position: relative;
  transition: 0.2s background-color;
}

.site-header .container {
  display: flex;
  padding: 0 1rem;
}

.site-header .container .white-logo {
  display: none;
}

.site-header .container > a {
  padding: 1rem 0;
  display: flex;
  align-items: center;
  margin-right: auto;
  width: 10rem;
}

.site-header .container > a img {
  width: 100%;
}

.site-header .container > nav {
  display: flex;
  gap: 1rem;
}

.site-header .container > nav > a {
  color: var(--blue);
  margin: auto 0;
  margin-right: 0.5rem;
  padding-bottom: 0.2rem;
}

.site-header .primary-menu-container ul {
  margin: 0;
  list-style: none;
}

@media screen and (min-width: 901px) {
  .site-header .primary-menu-container > ul {
    display: flex;
    gap: 1rem;
  }

  .site-header .primary-menu-container > ul > li > a {
    text-transform: uppercase;
    color: var(--dark-gray);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 1rem 0;
    display: inline-flex;
    text-align: center;
    border-bottom-style: solid;
    border-bottom-width: 0.25rem;
    border-bottom-color: transparent;
    transition: 0.2s border-bottom-color;
    height: 100%;
    display: flex;
    align-items: center;
  }

  .site-header .primary-menu-container > ul > li > a[aria-current="page"] {
    border-bottom-color: var(--blue);
  }

  .site-header
    .primary-menu-container
    ul
    > li
    > a:hover:not([aria-current="page"]) {
    border-bottom-color: var(--light-blue);
  }

  #primary-menu-toggle {
    display: none;
  }

  .sub-menu-toggle {
    display: none;
  }

  /* Barre de navigation transparente */

  .site-header.transparent {
    background-color: transparent;
    box-shadow: 0 0 0 transparent;
  }

  .site-header.transparent::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4rem;
    z-index: -1;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), transparent);
  }

  .site-header.transparent .container > a > img.white-logo {
    display: initial;
  }

  .site-header.transparent .container > a > img:not(.white-logo) {
    display: none;
  }

  .site-header.transparent .container > nav > a {
    color: white;
  }

  .site-header.transparent .sub-menu-container[depth="1"] {
    opacity: 0;
    transition: 0s;
  }

  .site-header.transparent #primary-menu-list > li > a {
    color: white;
  }

  /* WPML SELECTEUR DE LANGUE */
  .wpml-ls {
    border: none;
    width: auto;
    margin: auto 0;
    line-height: 1;
    border-bottom: solid 0.2rem transparent;
    font-size: 0.875rem;
    margin-left: -0.5rem;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
  }

  .site-header.transparent .wpml-ls {
    color: white;
  }

  .wpml-ls ul {
    color: inherit;
  }

  .wpml-ls a.wpml-ls-item-toggle {
    border: none;
    background-color: transparent;
    padding: 0.5rem;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .wpml-ls a.wpml-ls-item-toggle:hover,
  .wpml-ls .wpml-ls-current-language:hover > a {
    background-color: var(--light-blue);
  }

  .wpml-ls a.wpml-ls-item-toggle::after {
    display: inline-block;
    border: none;
    content: "";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: static;
  }

  .wpml-ls a.wpml-ls-item-toggle span {
    vertical-align: unset;
  }

  .wpml-ls ul.wpml-ls-sub-menu {
    border: none;
  }

  .wpml-ls ul.wpml-ls-sub-menu a {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    border: none;
  }

  .wpml-ls ul.wpml-ls-sub-menu a:hover {
    background-color: var(--light-blue);
  }

  /* NIVEAU 2 */

  /* Sous-menu entier */

  .site-header .sub-menu-container[depth="1"] {
    background-color: white;

    position: absolute;
    top: 100%;

    left: 0;
    right: 0;
    z-index: -1;
    overflow: hidden;
    transform: translateY(-100%);
    transition: 0.4s 0.1s;
    opacity: 0%;
  }

  .site-header li:hover > .sub-menu-container[depth="1"] {
    transform: translateY(0%);
    opacity: 100%;
    box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.25);
  }

  /* Container */

  .site-header .sub-menu-container[depth="1"] > .sub-menu {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1rem 1rem;
  }

  /* 1ère colonne descriptive */

  .sub-menu-intro {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.75rem 0;
    color: var(--dark-gray);
  }

  .sub-menu-intro > * {
    margin: 0;
  }

  .sub-menu-intro .heading {
    font-weight: bold;
  }

  /* 2ème colonne */

  .site-header .sub-menu-container[depth="2"] {
    position: relative;
    height: 100%;
  }

  .site-header .sub-menu-container[depth="2"] {
    max-width: 50%;
    transition: 0.2s;
  }

  /* Liens de la seconde colonne */

  .site-header .sub-menu-container[depth="2"] > ul > li > a {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--dark-gray);
    transition: 0.2s;
  }

  /* Animation en hover des liens de la seconde colonne */

  .site-header .sub-menu-container[depth="2"] > ul > li:hover > a {
    padding-left: 2rem;
    background-color: var(--light-blue);
  }

  /* NIVEAU 3 */

  /* Font bleu derrière liens */

  .site-header .sub-menu-container[depth="2"] > ul.sub-menu::after {
    background-color: var(--light-blue);
    content: "";
    display: block;
    position: absolute;
    left: 100%;
    top: 0;
    bottom: 0;
    width: 100%;
    box-shadow: 100vw 0 0 100vw var(--light-blue);
    z-index: 0;
    transition: 0.2s;
  }

  /* Liste des liens */

  .site-header .sub-menu-container[depth="3"] > ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 100%;
    top: 0;
    bottom: 0;
    z-index: 1;
    transform: translateX(50%);
    opacity: 0%;
    width: 0%;
    overflow: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.5) rgba(255, 255, 255, 0.25);
    transition: 0s 0.2s all, 0.2s opacity;
  }

  .site-header .sub-menu-container[depth="3"] > ul::-webkit-scrollbar {
    height: 0.5rem;
    width: 0.5rem;
    background: rgba(255, 255, 255, 0.25);
  }

  .site-header .sub-menu-container[depth="3"] > ul::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5);
  }

  /* Animation de la liste des liens en hover */

  .site-header
    .sub-menu-container[depth="2"]
    li:hover
    > .sub-menu-container[depth="3"]
    > ul {
    transform: translateX(0%);
    opacity: 100%;
    width: 100%;
    transition: 0.2s all, 0s width;
    /* background-color: red; */
  }

  /* Liens de la troisième colonne */

  .site-header .sub-menu-container[depth="3"] > ul > li > a {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--dark-gray);
    transition: 0.2s;
  }

  /* Animations des liens en hover */

  .site-header .sub-menu-container[depth="3"] > ul > li:hover > a {
    padding-left: 2rem;
  }
}

/* VERSION MOBILE */
/* https://www.mazars.fr/Accueil/A-propos */

@media screen and (max-width: 1080px) and (min-width: 901px) {
  .site-header .container > a {
    width: 6rem;
  }
  .site-header .primary-menu-container > ul > li > a {
    font-size: 0.8rem;
  }
}

@media screen and (max-width: 900px) {
  #primary-menu-toggle {
    background-color: transparent;
    padding: 0 1rem;
    border: none;
    font-size: 1.25rem;
    color: var(--blue);
    margin-right: -1rem;
  }

  .site-header #primary-menu-toggle::before {
    content: "";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
  }

  .site-header.menu-is-open #primary-menu-toggle::before {
    content: "";
  }

  .site-header.menu-is-open .container > nav {
    display: flex;
    z-index: -1;
    padding-top: 1rem;
  }

  .site-header .container > nav {
    display: none;
    position: fixed;
    top: calc(
      var(--wp-admin--admin-bar--height, 0px) + var(--site-header-height, 0px)
    );
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    flex-direction: column;
  }

  .site-header .container > nav a {
    text-decoration: none;
    color: black;
  }

  .site-header .container > nav > ul {
    display: flex;
    flex-direction: column;
  }

  .site-header .container > nav ul > li {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr;
  }

  .site-header .container > nav > ul > li .sub-menu-toggle {
    grid-column: 2 / 3;
    grid-row: 1/2;
    background-color: transparent;
    font-weight: bold;
    border: none;
    color: black;
    border-bottom: solid 2px var(--light-gray);
    border-radius: 0;
    padding: 1rem;
    height: 100%;
    margin: 0;
    transition: 0.2s;
  }

  .site-header .container > nav ul > li > .sub-menu-container {
    grid-column: 1 / 3;
  }

  .site-header .container > nav ul > li > .sub-menu-container > .sub-menu > li {
    display: none;
  }

  .site-header
    .menu[depth="0"]
    > li.sub-menu-is-open
    .sub-menu-container[depth="1"]
    > .sub-menu
    > li,
  .site-header
    .menu[depth="0"]
    > li.sub-menu-is-open
    .sub-menu-container[depth="1"]
    .sub-menu-container[depth="2"]
    > .sub-menu
    > li,
  .site-header
    .container
    li.sub-menu-is-open
    > .sub-menu-container[depth="3"]
    > ul
    > li {
    display: grid;
  }

  .site-header .container > nav ul > li > a {
    padding: 1rem;
    border-bottom: solid 2px var(--light-gray);
    transition: 0.2s;
  }

  .site-header .container > nav ul > li:hover > :is(a, .sub-menu-toggle) {
    border-color: var(--blue);
    color: var(--blue);
  }

  /* .site-header .container > nav .sub-menu-container {
    padding-left: 1rem;
  } */

  .site-header .container > nav .sub-menu-is-open {
    position: relative;
    grid-template-columns: auto 1fr;
  }

  .site-header .container > nav .sub-menu-is-open > a {
    background-color: var(--light-blue);
    font-weight: bold;
    grid-column: 1 / 3;
    grid-row: 1 / 2;
    color: var(--blue);
  }

  .site-header .container > nav .sub-menu-is-open > a::before {
    content: "";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 0.5rem;
  }

  .site-header .container > nav .sub-menu-is-open > button.sub-menu-toggle {
    opacity: 0;
    grid-column: 1 / 3;
    grid-row: 1 / 2;
    transition: 0s;
  }

  .sub-menu-is-open ~ li {
    background-color: red;
    display: none !important;
  }

  .sub-menu-parent-is-open > :is(a, button.sub-menu-toggle) {
    background-color: red;
    display: none;
  }

  .sub-menu-is-hidden {
    display: none !important;
  }

  .primary-menu-container > a {
    display: none;
  }

  .sub-menu-intro {
    display: none;
  }

  .sub-menu a > i {
    display: none;
  }
}

.alert-langue {
  padding: 1rem 0.5rem;
  font-size: 1.2rem;
  text-align: center;
  background-color: var(--yellow);
  color: var(--blue);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}
