/*** Menu Hamburger ***/
/* bouton hamburger */
.hamburger {
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  display: none;
}

/* menu normal desktop */
nav {
  background: var(--background-color);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}
nav ul > li > a {
  color: var(--color-menu);
  padding: 0 clamp(0.4rem, -1.2rem + 3.2vw, 1rem);
  text-decoration: underline;
  text-underline-offset: 10px;
  text-decoration-color: transparent;
  transition: 0.25s ease-in-out, text-underline-offset 0.35s ease-in-out,
    text-decoration-color 0.35s ease-in-out;
}
nav ul > li > a:hover {
  translate: 0 -4px;
  text-underline-offset: 3px;
  text-decoration: underline;
  text-decoration-color: currentColor;
}
.close-menu {
  position: fixed;
  top: 1rem;
  right: 1rem;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  display: none;
}

.nav-cta {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vert-fonce);
  border: 1px solid var(--vert-fonce);
  background-color: var(--background-body);
  padding: 10px 24px;
  font-weight: 300;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
  text-decoration: none;

  position: fixed;
  right: 1rem;
  top: 1rem;
  transition: 0.25s ease-in-out;
  z-index: 10;
}
.nav-cta:hover {
  background: var(--vert-fonce);
  color: var(--creme-chaud);
}

li.langue > div {
  margin: 0 auto;
  text-align: center;
}
nav ul li.langue {
  margin: 0.5rem;
}
nav ul li.langue a {
  display: block;
  width: 1.5rem;
  aspect-ratio: 4/3;
  margin: 0 auto;
  margin-inline: 0;
  background-position: center;
  background-size: cover;
  padding: 0.5rem;
}
nav ul li.langue a.fr {
  background-image: url(images/fr.svg);
}
nav ul li.langue a.en {
  background-image: url(images/gb.svg);
}
nav ul li.langue a:hover {
  text-decoration: none;
}
nav ul li.langue {
  position: relative;
  width: fit-content;
  padding: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  overflow: visible;

  position: absolute;
  left: 200px; /* largeur du header */
  left: clamp(12.5rem, 6.25rem + 10vw, 13.75rem);
}
nav ul li.langue div {
  transition: 0.2s ease-in-out;
}

nav ul li.langue:hover a {
  translate: 0;
}
nav ul li.langue:hover {
  background-color: transparent;
}

nav ul li.langue div:nth-child(1) {
  z-index: 2;
}
nav ul li.langue div:nth-child(2) {
  position: absolute; /* sort du flux */
  left: 50%;
  transform: translate(-50%, 0);
  opacity: 1;
}
nav ul li.langue:hover div:nth-child(2) {
  transform: translate(-50%, 160%);
  opacity: 1;
}

.nav-contact {
  display: flex;
  justify-content: center;
  align-items: center;
}
.nav-contact a {
  display: block;
}
.nav-contact img {
  width: auto;
  height: 18px;
  display: block;
}
.nav-contact img {
  width: auto;
  height: 18px;
  display: block;
}
/* MOBILE */
@media (max-width: 768px) {
  .hamburger {
    display: block;
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;

    padding: 0.2rem;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 0.15rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #222;
    border: solid 1px rgba(0, 0, 0, 0.3);
    background: var(--background-menu);
  }

  nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: white;

    translate: -120%;
    transition: 0.3s ease-out;
    z-index: 10;
    height: 100%;
  }

  nav ul {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 20px;
    min-height: 80vh;
    margin-block: 15% auto;
  }

  nav a {
    text-decoration: none;
    font-size: 1.2rem;
  }

  .close-menu {
    display: block;
  }

  nav.open {
    translate: 0;
  }

  .nav-cta {
    right: 5rem;
  }
  li.langue {
  }
  nav ul li.langue {
    position: relative;
    flex-direction: row;
    left: auto;
    gap: 2rem;
  }
  nav ul li.langue a {
    width: 1.6rem;
  }
  li.langue > div span {
    width: 30px;
    height: 20px;
  }
  li.langue > div {
    display: inline-block;
    width: fit-content;
  }

  nav ul li.langue:hover div:nth-child(2) {
    translate: 0;
    position: relative;
    transform: none;
  }
  nav ul li.langue div:nth-child(2) {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    translate: 0;
    opacity: 1;
  }
}
@media (min-width: 769px) and (max-width: 950px) {
  nav ul {
    margin-inline: 230px auto !important;
  }
}
/*** Menu ***/
@media (min-width: 769px) {
  nav {
    position: fixed;
    top: 0;
    height: fit-content;
    width: 100%;
    padding-block: 0;
    z-index: 4;
    transition: transform 0.3s ease;
    background: var(--background-menu);
  }
  nav.hide {
    transform: translateY(-100%);
  }
  nav ul {
    display: flex;
    justify-content: center;
    flex-direction: row;
    gap: 0;
    max-width: 98%;
    width: fit-content;
    margin-inline: auto;
    padding-block: 1rem;
  }

  nav ul li {
    line-height: 2rem;
    padding: 0;
    cursor: pointer;
    font-size: 0.75rem;
    text-transform: uppercase;
  }
  nav a {
    text-decoration: none;
    display: inline-block;
  }
  nav li a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}
