/* header */

#header {
  position: fixed;
  z-index: 3;
  width: 100%;
  height: var(--header-height);
}

#header > div {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

#header .logo {
  position: relative;
  z-index: 80;
  width: 104px;
  margin-left: 10px;
}

#header .logo > a > img:not(.logo_main) {
  display: none;
}

/* menu */

header .menu ul {
  margin: 0;
  padding: 0;
}

header .menu .menu-item {
  list-style: none;
  color: var(--blanc);
}

#menu_top {
  position: relative;
  z-index: 8;
}

#menu_top ul li.contact a:hover {
  background: var(--tertiary) url("../images/base/bouton.svg") no-repeat right
    1em center / 1.25em;
  color: var(--primary);
}
#menu_top ul li.linkedin {
  background: none;
  align-items: flex-start;
  justify-content: flex-start;
  display: flex;
}
#menu_top ul li.linkedin a {
  display: inline-block;
  aspect-ratio: 1;
  width: auto;
  border: 1px solid var(--tertiary);
}

@media (max-width: 1199px) {
  #header > div.container {
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: var(--Spaces-XS, 10px);
    padding-bottom: var(--Spaces-XS, 10px);
    border-bottom: 1px solid;
    height: calc(2 * var(--Spaces-XS, 10px) + 70px);
  }
  body:not(.open) #header {
    background: linear-gradient(
        90deg,
        #d3d2d2 5.14%,
        #ffffff 50%,
        #fedecc 93.12%
      ),
      var(--Colors-Blanc, #fff);
  }
  body.open #header {
    background: var(--primary);
  }

  #header .logo {
    position: absolute;
    left: 0;
    top: var(--Spaces-XS, 10px);
    z-index: 9;
    z-index: 0;
  }

  #header .logo,
  #header .logo a,
  #header .logo a img {
    width: 70px;
    height: 70px;
    display: inline-block;
  }
  #header .logo a img {
    object-fit: contain;
  }

  #menu_top ul li.linkedin a {
    height: 42px;
    background: url("../images/base/linkedin_tertiary.svg") no-repeat center /
      55%;
  }

  #header a.bouton {
    padding: 0.7rem 2.2em 0.7rem 0.7rem;
    color: var(--tertiary);
    border-color: var(--tertiary);
    background: url("../images/base/bouton_tertiary.svg") no-repeat right 0.7rem
      center / 1rem;
  }
  #menu_top ul li.contact {
    order: -1;
    margin-bottom: 1.5em;
  }

  #menu_top ul li.contact a {
    border: 1px solid;
    background: url("../images/base/bouton_tertiary.svg") no-repeat right 1em
      center / 1.25em;
    display: block;
    font-family: var(--Font-type-font-primary, Anton);
    font-size: var(--Font-Size-fs-h3, 18px);
    font-style: normal;
    font-weight: 400;
    line-height: var(--Font-Line-height-lh-h3, 22px);
    letter-spacing: var(--Global-layout-interlettrage, 1px);
    text-transform: uppercase;
    color: var(--tertiary);
    display: flex;
    padding: var(--Spaces-XS, 10px);
  }

  /* start of menu open */

  body.open #header {
    height: 100vh;
    overflow-y: scroll;
  }

  body.open #header .logo {
  }

  body.open #header .logo > a > img.logo_main {
  }

  body.open #header .logo > a > img:not(.logo_main) {
    display: initial;
  }

  #header .menu {
    display: none;
  }

  #header .menu_container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    -webkit-box-pack: flex-start;
    -ms-flex-pack: flex-start;
    justify-content: flex-start;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
  }

  #menu_principal {
    order: -1;
  }

  body.open #header .menu_container {
    padding-top: var(--header-height);
  }

  body.open #header .menu_container .menu {
    margin-top: 2rem;
    display: block;
    width: 100%;
  }
  body.open #header .logo,
  body.open #header a.bouton {
    display: none;
  }
  body.open #header .container {
    justify-content: flex-start;
    padding-top: 20px;
  }
  #menu_top ul {
    display: flex;
    flex-direction: column-reverse;
    flex-wrap: wrap;
  }
  #menu_top ul li {
    width: 100%;
  }

  /* tog menu */
  #togMenu {
    position: relative;
    top: 0;
    right: 0;
    transform: none;
    z-index: 4;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    cursor: pointer;
    color: var(--blanc);
    text-transform: uppercase;
    border: 1px solid var(--Colors-color-bordure, #5e5e5e);
    background: var(--Colors-color-primary, #21201e);
    padding: var(--Spaces-XS, 10px);
    align-items: center;
    gap: var(--Spaces-XS, 10px);
  }
  #togMenu > span {
    color: var(--Colors-Blanc, #fff);
    font-family: var(--Font-type-font-primary, Anton);
    font-size: var(--Font-Size-fs-h3, 18px);
    font-style: normal;
    font-weight: 400;
    line-height: var(--Font-Line-height-lh-h3, 22px); /* 122.222% */
    letter-spacing: var(--Global-layout-interlettrage, 1px);
    text-transform: uppercase;
  }

  #togMenu.open {
    width: auto;
  }

  #togMenu .burger {
    display: block;
    width: 22px;
    position: relative;
    aspect-ratio: 1/1;
    transform: translateY(-1px);
    -webkit-transform-origin: center;
    -ms-transform-origin: center;
    transform-origin: center;
  }

  .burger span {
    -webkit-transition: all 0.3s;
    -o-transition: all 0.3s;
    -webkit-transition: all 0.1s;
    -o-transition: all 0.1s;
    transition: all 0.1s;
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--blanc);
    border: 0px solid;
    -webkit-transform-origin: center;
    -ms-transform-origin: center;
    transform-origin: center;
  }

  #burger span#t1 {
    top: 15%;
  }

  #burger span#t2 {
    top: calc(50%);
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
  }

  #burger span#t3 {
    bottom: calc(15% - 1px);
  }

  #togMenu.open .burger span {
    width: 131%;
    height: 1px;
    -webkit-transform-origin: center;
    -ms-transform-origin: center;
    transform-origin: center;
  }

  #togMenu.open #burger span#t1 {
    -webkit-transform-origin: top left;
    -ms-transform-origin: top left;
    transform-origin: top left;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
    top: 0;
  }

  #togMenu.open #burger span#t2 {
    display: none;
  }

  #togMenu.open #burger span#t3 {
    -webkit-transform-origin: bottom left;
    -ms-transform-origin: bottom left;
    transform-origin: bottom left;
    -webkit-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
    bottom: 0;
  }

  /* end of tog menu */
  /* start of menu mobile */
  #header .menu > ul {
    width: 100%;
    margin: 0 auto;
    font-size: 18px;
    min-height: calc(100% - 5rem - 48px - 5rem - 4rem);
    display: flex;
    flex-direction: column;
  }

  #header .menu a {
    color: var(--Colors-Blanc, #fff);
    font-family: var(--Font-type-font-primary, Anton);
    font-size: var(--Font-Size-fs-h2, 25px);
    font-style: normal;
    font-weight: 400;
    line-height: var(--Font-Line-height-lh-h2, 26px); /* 104% */
    letter-spacing: var(--Global-layout-interlettrage, 1px);
    text-transform: uppercase;
    text-decoration: none;
  }

  #header .menu > ul > li:not(:last-child) {
    margin-bottom: 0;
  }

  #header .menu-item-has-children > a {
    position: relative;
    padding-right: 25px;
  }
  #header #menu_principal > ul > li {
    border-bottom: 1px solid;
  }
  #header #menu_principal > ul > li > a {
    padding-right: 3rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--Spaces-M, 30px);
    align-self: stretch;
    padding: var(--Spaces-M) 0;
  }

  #header .menu > ul > li > .sub-menu {
    /*! margin-top: 0.875rem; */
    padding-left: 1.88rem;
    display: none;
  }

  #header .menu > ul > li.open > .sub-menu {
    display: block;
  }

  #header .menu > ul > li {
    position: relative;
  }

  #header .menu > ul > li .tog {
    position: absolute;
    right: 0px;
    top: 1.75rem;
    z-index: 1;
    height: 30px;
    width: 20px;
    margin-right: 5px;
    margin-left: 5px;
    background: url("data:image/svg+xml,%3Csvg width='9' height='6' viewBox='0 0 9 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.00006L4.5 5.00006L8 1.00006' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      no-repeat center center / 20px;
    cursor: pointer;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    font-size: 0;
  }

  .menu_with_submenus .submenu-toggle.active {
    transform: rotate(-180deg);
  }

  #header .menu > ul > li > .sub-menu > li {
    padding: 6px 0;
  }

  #header .menu > ul > li > .sub-menu a {
    display: block;
    padding: 8px 0;
    font-size: 0.85em;
  }

  #header .menu a:hover,
  #header .menu .current-menu-item > a,
  #header .menu .current-menu-parent > a,
  #header .menu .current-menu-ancestor > a {
    color: var(--secondary);
  }

  #menu_top > ul > li.lien-devis.current-menu-item > a {
    color: var(--blanc);
  }

  #menu_top {
    padding-bottom: var(--header-height);
  }
}

@media (min-height: 380px) and (max-width: 1199px) and (max-height: 686px) {
  #header .menu > ul > li:not(:last-child) {
    margin-bottom: 0.75rem;
  }
  #header .menu-item-has-children > a {
    padding-bottom: 0.75rem;
  }
  body.open #header .menu_container .menu#menu_top {
    margin-top: 1rem;
  }
  #header .menu > ul > li .tog {
    background: url("data:image/svg+xml,%3Csvg width='9' height='6' viewBox='0 0 9 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.00006L4.5 5.00006L8 1.00006' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      no-repeat center center / 12px;
  }
}

@media (min-width: 1200px) {
  #header .container {
    max-width: 95%;
    width: 1340px;
    border-bottom: 1px solid;
    padding: 0;
    margin: 0 auto;
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: space-between;
    height: var(--header-height);
    position: relative;
    align-items: center;
  }

  #header .container:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
  }

  .logo {
    display: flex;
    align-items: center;
  }

  #header .logo img {
    transition: all 0.3s ease 0.3s;
  }

  #header #togMenu {
    display: none;
  }

  #header .container {
    transition: all 0.4s ease 0.2s;
  }

  #header .menu {
    transition: opacity 0.4s ease, transform 0.4s ease 0.3s;
  }
  #header {
    position: absolute;
  }
  /*
  .scrolled #header:not(:hover) {
    height: var(--scrolled-header-height);
  }
  .scrolled #header .logo img {
    width: 70px;
    transition: var(--ease);
  }
  .scrolled.scrollingUp #header .logo img,
  .scrolled #header:hover .logo img {
    width: 100%;
    transition: all 0.3s ease 0.3s;
  }
  .scrolled:not(.scrollingUp) #header .container {
    height: var(--scrolled-header-height);
    border: none;
  }
  .scrolled #header:hover .container:before,
  body.scrolled.scrollingUp #header .container:before {
    background: var(--blanc);
  }
  .scrolled.scrollingUp #header .container,
  .scrolled #header:hover .container {
    height: var(--header-height);
    border-left: 1px solid;
    border-bottom: 1px solid;
    border-right: 1px solid;
  }
  .scrolled:not(.scrollingUp) #header .menu {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-200%);
  }
  .scrolled #header:hover .menu {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0%);
  }
  .scrolled .entete {
  padding-top: calc(var(--scrolled-header-height) + 50px);
}  
  */

  #header .menu_container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: end;
    -ms-flex-align: end;
    align-items: flex-end;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    gap: 30px;
    transform: translateY(14px);
  }

  #header .menu {
    font-size: 16px;
    text-decoration: none;
  }

  #header .menu a {
    font-size: 16px;
    text-decoration: none;
  }

  #header .menu > ul {
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 1rem;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: stretch;
    margin: 0;
    text-wrap: balance;
    position: relative;
    z-index: 4;
  }

  #menu_principal > ul {
    gap: 3rem;
  }

  #header #menu_principal > ul > li > a {
    font-size: 20px;
    letter-spacing: 0.5px;
  }

  #header .menu > ul > li {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    justify-content: center;
    position: relative;
  }
  #header .menu > ul > li.avec_separateur {
    padding-left: var(--gap);
    position: relative;
  }
  #header .menu > ul > li.avec_separateur:before {
    content: "";
    position: absolute;
    top: 25%;
    left: 0;
    z-index: 1;
    transform: translateY(-50%);
    height: 1.2rem;
    width: 1px;
    background: var(--primary);
  }
  #header .menu > ul > li.menu-item-has-children > a {
    padding-right: 18px;
  }

  #menu_principal > ul > li.menu-item-has-children > a {
    background: url("../images/base/tog.svg") no-repeat right 0.3em / 10px 10px;
  }

  #menu_top > ul > li.menu-item-has-children > a {
    background: url("../images/base/tog.svg") no-repeat right 0.3em / 10px 10px;
  }

  #menu_top ul li.linkedin a {
    height: 48px;
    background: url("../images/base/linkedin.svg") no-repeat center / 40%;
    border: 1px solid var(--primary);
  }

  #menu_principal {
    position: relative;
    z-index: 1;
  }

  #menu_principal > ul > li > a {
    color: var(--Colors-color-primary, #21201e);
    font-family: var(--Font-type-font-primary, Anton);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 18px; /* 112.5% */
    text-transform: uppercase;
    padding-bottom: 20px;
  }

  #header .menu > ul > li .sub-menu {
    display: flex;
    position: absolute;
    background: var(--primary-light);
    top: 100%;
    left: 0px;
    /*! min-width: 100%; */
    width: 234px;
    text-wrap: nowrap;
    padding: var(--gap-s) var(--gap-s);
    z-index: 5;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
    border: 1px solid var(--primary);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    flex-direction: column;
    background: white;
    pointer-events: none;
  }
  #header .menu > ul > li:last-child .sub-menu,
  #header .menu > ul > li.align_right .sub-menu {
    left: auto;
    right: 0;
  }

  #header .menu > ul > li:hover .sub-menu {
    opacity: 1;
    transform: translateY(0px);
    pointer-events: all;
  }

  #header #menu_top > ul > li {
    position: relative;
  }

  #menu_top ul li.contact a {
    padding: 0.5em 2em 0.5em 0.5em;
    background: url("../images/base/bouton_tertiary.svg") no-repeat right 0.55em
      center / 1em;
    color: var(--Colors-color-3, #ff5e00);
    font-family: var(--Font-type-font-primary, Anton);
    font-size: var(--Font-Size-fs-p, 18px);
    font-style: normal;
    font-weight: 400;
    line-height: var(--Font-Line-height-lh-p, 28px); /* 155.556% */
    letter-spacing: var(--Global-layout-interlettrage, 1px);
    text-transform: uppercase;
    border: 1px solid;
  }

  #menu_principal > ul > li > ul > li {
    width: 100%;
    text-wrap: wrap;
  }

  #header .sub-menu a {
    color: var(--Colors-color-primary, #21201e);
    font-family: var(--Font-type-font-secondary, Poppins);
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 14px; /* 100% */
  }

  #header .menu .sub-menu li + li {
    margin-top: 0;
  }
  #header .menu .sub-menu .current-menu-item > a {
    color: var(--primary);
  }
  #header .menu a:hover,
  #header .menu .current-menu-item > a,
  #header .menu .current-menu-parent > a,
  #header .menu .current-menu-ancestor > a,
  #header .menu .sub-menu a:hover {
    color: var(--tertiary);
  }

  #menu_top ul li:not(.contact) a {
    color: var(--primary) !important;
  }
  #menu_top ul li:not(.contact):hover a {
    color: var(--tertiary) !important;
  }
}
