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

.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2vw;
  padding-top: 1rem;
  color: var(--color-white);
}
.header::before,
.header::after {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  width: min(700px, 90vw);
  content: "";
}
.header::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-white), transparent );
}
.header::after {
  height: 14vh;
  background: radial-gradient(ellipse at top, #fff6, transparent 70%);
}
.header--sticky {
  background-color: var(--color-blue);
  box-shadow: 0 0 1rem #0005;
  padding-top: .5rem;
  padding-bottom: .5rem;
}

/* Logo */
.header__logo {
  max-width: 228px;
  padding: 1rem;
  background-color: var(--color-white);
  border-radius: 0 5px 5px 0;
  transition-duration: .3s;
}
.header--sticky .header__logo {
  max-width: 150px;
}

/* Burger menu */
.header__bouton-burger {
  display: none;
  width: 2rem;
  height: 2rem;
  margin: 1rem;
  background-image: url('../images/icon-burger.svg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

/* Menu */
.header__menu-list {
  display: flex;
  align-items: center;
  column-gap: 2.5rem;
  row-gap: 1.5rem;
  padding: 0;
  list-style: none;
}
.header__menu-list .menu-item a {
  padding-bottom: .25rem;
  background:
    linear-gradient(var(--color-white) 0 0) 
    0 90% /var(--d, 0) 1px 
    no-repeat;
  font-size: 1.125rem;
  letter-spacing: .1rem;
  text-decoration: none;
  text-shadow: 0 0 1rem #fff6;
}
.header__menu-list .menu-item a:is(:hover,:active,:focus) {
  --d: 100%;
}

/* Submenu */
.header__menu-list .menu-item-has-children::before {
  margin-right: .5rem;
  padding-right: .5rem;
  border-right: 1px solid var(--color-white);
  content: url('../images/arrow-down.svg');
}
.header__menu-list .menu-item {
  position: relative;
}
.header__menu-list .sub-menu {
  display: none;
  position: absolute;
  z-index: 1;
  left: -1rem;
  width: max-content;
  padding: 2rem 1rem .5rem;
  background-color: var(--color-black);
  list-style: none;
}
.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: .25rem;
  background:
    linear-gradient(var(--color-white) 0 0) 
    0 90% /var(--d, 0) 1px 
    no-repeat;
}

/* Lien contact — desktop : espace entre Contact et le tel */
.header__lien-contact {
  display: flex;
  align-items: center;
}
.header__lien-contact .btn--header--yellow {
  margin-right: 1.25rem;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
  .header {
    display: grid;
    grid-template-columns: max-content max-content;
    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;
  }
  .header--sticky .header__logo {
    max-width: 30vw;
  }
  .header__bouton-burger {
    display: block;
    justify-self: end;
  }
  .header__bouton-burger.active {
    background-image: url('../images/icon-close.svg');
  }

  :is(.header__menu, .header__lien-contact) {
    display: none;
    grid-column: 1 / -1;
  }

  /* Menu ouvert */
  .header.active .header__menu {
    display: block;
    padding-bottom: 0;
  }

  /* Tel + Contact côte à côte */
  .header.active .header__lien-contact {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 1rem;
    gap: .75rem;
    border-top: 1px solid #ffffff22;
  }

  .header.active .header__lien-contact .btn--header--white,
  .header.active .header__lien-contact .btn--header--yellow {
    flex: 1;
    justify-content: center;
    text-align: center;
    margin: 0;
  }

  /* Tel : blanc avec texte bleu, icône et séparateur masqués */
  .header.active .header__lien-contact .btn--header--white {
    background-color: var(--color-white);
    color: var(--color-blue);
    border-radius: 0 10px 10px 0;
  }
  .header.active .header__lien-contact .btn--header--white::before,
  .header.active .header__lien-contact .btn--header--white::after {
    display: none;
  }

  .header.active .header__lien-contact .btn--header::before,
  .header.active .header__lien-contact .btn--header::after {
    display: none;
  }

  .header__menu-list {
    flex-direction: column;
    align-items: start;
    padding-left: 1rem;
  }
  .menu-item-has-children a {
    pointer-events: initial;
  }
  .header__menu-list .sub-menu {
    width: 100vw;
    background-color: var(--color-dark);
  }
  .sub-menu.active {
    display: block;
  }
}