/* -------------------------------- */
/* -----------  HEADER  ----------- */
/* -------------------------------- */

.header {
  margin-bottom: 3vh;
  color: var(--color-white);
}

.header__top {
  position: fixed;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  row-gap: 1rem;
  align-items: start;
  width: 100%;
}
.header__top--sticky {
  background-color: var(--color-dark);
}

/* Logo */
.header__logo {
  grid-column: 1/2;
  position: absolute;
  inset: 0;
  min-height: min(470px, 50dvh);
  background-image: url('../images/background-logo.svg');
  background-repeat: no-repeat;
  background-size: contain;
  /* background-color: var(--color-white);
  clip-path: polygon(0 0, 100% 0, 30% 100%, 0 60%); */
}
.header__top--sticky .header__logo {
  min-height: 100%;
  background-size: cover;
}
.header__logo .custom-logo {
  max-width: clamp(60px,11vw,230px);
  margin: 2rem 0 0 min(4vw,80px);
  transition-duration: .2s;
}
.header__logo .custom-logo-link:hover .custom-logo {
  transform: scale(1.1);
}
.header__top--sticky .header__logo .custom-logo {
  max-width: 80px;
  margin: .5rem 2rem;
}

/* Burger menu */
.header__bouton-burger {
  display: none;
  z-index: 1;
  width: 4rem;
  height: 7rem;
  padding: 1rem;
  background-color: var(--color-white);
  background-image: url('../images/icon-burger.svg');
  background-position: 80% 10%;
  background-repeat: no-repeat;
  background-size: 40%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 0);
}

/* Menu */
.header__menu {
  grid-column: 2/3;
  margin-right: 2rem;
}
.header__menu-list {
  display: flex;
  align-items: center;
  column-gap: 1.5rem;
  row-gap: .75rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding: 0;
  list-style: none;
}
.header__top--sticky .header__menu-list {
  margin-top: 1rem;
}
.header__menu-list > .menu-item {
  display: flex;
  gap: 1.5rem;
  padding: .5rem 0;
  text-align: center;
}
.header__menu-list > .menu-item:not(:last-child)::after {
  width: 1px;
  height: 1.75rem;
  background-color: var(--color-white);
  content: "";
}
.header__menu-list .menu-item a:not(.btn) {
  padding: 0 .5rem;
  background:
    linear-gradient(var(--color-white) 0 0) 
    .5rem 100% /var(--d, 0) 1px 
    no-repeat;
  text-decoration: none;
  transition-duration: .3s;
}
.header__menu-list .menu-item a:is(:hover,:active,:focus) {
  --d: calc(100% - 1rem);
}

/* Submenu */
.header__menu-list .menu-item {
  position: relative;
}
.header__menu-list .sub-menu {
  display: none;
  position: absolute;
  z-index: 1;
  top: 2.5rem;
  left: -1rem;
  width: max-content;
  padding: 2rem 1rem 1rem;
  background-color: var(--color-dark);
  list-style: none;
  text-align: left;
}
.header__menu-list .menu-item:is(:hover,:focus,:active) .sub-menu {
  display: block;
}
.header__menu-list .sub-menu a {
  display: inline-block;
  margin-bottom: .5rem;
  padding-bottom: .5rem;
  background:
    linear-gradient(var(--color-white) 0 0) 
    0 90% /var(--d, 0) 1px 
    no-repeat;
}

/* Hero */
.header__hero {
  display: grid;
  place-items: center;
  min-height: min(600px, 100dvh);
  padding: 5rem 0;
  /* background-color: var(--color-medium); */
  background-image: url('../images/background-header.svg');
  background-size: cover;
  background-position: left bottom;
  /* background-image:
    url('../images/triangles-gauche.svg'),
    url('../images/triangles-droite.svg'),
    url('../images/triangles-centre.svg'); */
  /* background-position: left, right, center;
  background-repeat: no-repeat; */
  /* clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8vh), 0 100%); */
  text-align: center;
}
.header__hero--background {
  background:
    linear-gradient(var(--color-black), transparent),
    var(--bg-image) center / cover;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8vh), 0 100%);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
  .header__top {
    display: grid;
    /* padding-top: 0; */
  }
  /* .header.active {
    background-color: var(--color-dark);
  }
  .header--sticky {
    padding-bottom: 0;
  }
  .header--sticky::after {
    display: none;
  } */
  .header__logo {
    /* max-width: 30vw;
    padding: .5rem; */
    /* height: 30vw; */
    min-height: 25vw;
    position: relative;
  }
  .header__logo .custom-logo {
    width: 40%;
    margin: .5rem 0 0 4vw;
  }
  
  .header__top--sticky .header__logo .custom-logo {
    margin: .5rem 0 0 4vw;
  }
  /* .header--sticky .header__logo {
    max-width: 30vw;
  } */
  .header__bouton-burger {
    display: block;
    justify-self: end;
    z-index: 1;
  }
  .header__bouton-burger.active {
    background-image: url('../images/icon-close.svg');
  }
  .header__top.active {
    background-color: var(--color-dark);
  }
  .header__menu {
    display: none;
    grid-column: 1 / -1;
  }
  .header__top.active .header__menu {
    display: block;
  }
  .header__menu-list {
    flex-direction: column;
    align-items: start;
    padding-left: 1rem;
    margin-top: 0;
    margin-bottom: 2rem;
  }
  .header__menu-list > .menu-item {
    display: block;
    text-align: left;
  }
  .header__menu-list > .menu-item:not(:last-child)::after {
    display: none;
  }
  .menu-item-has-children a {
    pointer-events: initial;
  }
  .header__menu-list .sub-menu {
    position: static;
    padding: 1rem 0 0;
  }
  .sub-menu.active {
    display: block;
  }

  /* Hero */
  .header__hero {
    min-height: min(300px, 30dvh);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3vh), 0 100%);
  }
}

