@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap");

/* =========================================
   CONTENEUR DU HEADER INJECTÉ
========================================= */

#header {
  position: sticky;
  top: 0;
  z-index: 1000;

  width: 100%;
  height: 70px;
}

/* =========================================
   HEADER
========================================= */

.header {
  position: relative;

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

  width: 100%;
  height: 70px;
  padding: 0 15px;

  font-family: "Montserrat", sans-serif;

  background-color: #070707;

  border-bottom: 1px solid #262626;

  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.28);
}

/* =========================================
   LOGO ET TITRE
========================================= */

.illiviumLogoRedirect {
  position: absolute;
  left: 15px;

  display: flex;
  align-items: center;

  gap: 12px;

  color: #ffffff;
  text-decoration: none;

  transition: color 150ms ease;
}

.illiviumLogoContainer {
  width: 56px;
  height: 56px;

  flex-shrink: 0;

  border: 2px solid #e7e7e7;
  border-radius: 50%;

  overflow: hidden;

  transition: border-color 150ms ease;
}

.illiviumLogo {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
}

.illiviumLogoRedirect h1 {
  margin: 0;

  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.illiviumLogoRedirect:hover {
  color: goldenrod;
}

.illiviumLogoRedirect:hover .illiviumLogoContainer {
  border-color: goldenrod;
}

/* =========================================
   NAVIGATION PRINCIPALE
========================================= */

.headerNav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbarMain {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 60px;

  margin: 0;
  padding: 0;

  list-style: none;
}

.navbarMainList {
  position: relative;

  display: flex;
  align-items: center;

  min-height: 70px;

  color: rgba(245, 245, 245, 0.62);

  font-size: 14px;
  font-weight: 600;

  cursor: default;

  transition: color 150ms ease;
}

.navbarMainList > a {
  display: flex;
  align-items: center;

  min-height: 70px;

  color: inherit;
  text-decoration: none;

  transition: color 150ms ease;
}

.navbarMainList:hover,
.navbarMainList > a:hover {
  color: goldenrod;
}

/* =========================================
   SOUS-MENU
========================================= */

.navbarSub {
  position: absolute;
  top: 100%;
  left: 50%;

  min-width: 190px;

  margin: 0;
  padding: 7px;

  list-style: none;

  background-color: #151515;

  border: 1px solid #303030;
  border-radius: 8px;

  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.42);

  opacity: 0;
  visibility: hidden;

  transform:
    translateX(-50%)
    translateY(-5px);

  transition:
    opacity 150ms ease,
    visibility 150ms ease,
    transform 150ms ease;
}

.hasSub:hover > .navbarSub,
.hasSub:focus-within > .navbarSub {
  opacity: 1;
  visibility: visible;

  transform:
    translateX(-50%)
    translateY(0);
}

.navbarSubList {
  width: 100%;
}

.navbarSubList a {
  display: block;

  width: 100%;
  padding: 11px 13px;

  color: rgba(245, 245, 245, 0.68);
  text-decoration: none;
  white-space: nowrap;

  border-radius: 6px;

  transition:
    color 150ms ease,
    background-color 150ms ease;
}

.navbarSubList a:hover {
  color: goldenrod;
  background-color: #242424;
}

/* =========================================
   PETITS ORDINATEURS
========================================= */

@media (max-width: 1150px) {
  .illiviumLogoRedirect h1 {
    display: none;
  }

  .navbarMain {
    gap: 45px;
  }
}

/* =========================================
   TABLETTES
========================================= */

@media (max-width: 850px) {
  #header {
    height: auto;
  }

  .header {
    flex-direction: column;

    height: auto;
    min-height: 70px;

    padding:
      10px
      15px
      0;
  }

  .illiviumLogoRedirect {
    position: static;

    justify-content: center;

    margin-bottom: 10px;
  }

  .illiviumLogoRedirect h1 {
    display: block;

    font-size: 18px;
  }

  .illiviumLogoContainer {
    width: 50px;
    height: 50px;
  }

  .headerNav {
    width: 100%;
  }

  .navbarMain {
    width: 100%;

    gap: 0;

    justify-content: space-around;
  }

  .navbarMainList {
    min-height: 48px;

    padding: 0 10px;

    font-size: 13px;
  }

  .navbarMainList > a {
    min-height: 48px;
  }

  .navbarSub {
    left: 50%;
  }
}

/* =========================================
   MOBILES
========================================= */

@media (max-width: 600px) {
  .navbarMain {
    flex-direction: column;

    width: 100%;
  }

  .navbarMainList {
    justify-content: center;

    width: 100%;
    min-height: 44px;

    border-top: 1px solid #222222;
  }

  .navbarMainList > a {
    justify-content: center;

    width: 100%;
    min-height: 44px;
  }

  .navbarSub {
    position: static;

    display: none;

    width: 100%;
    min-width: 0;

    margin-top: 0;

    opacity: 1;
    visibility: visible;

    transform: none;

    border-right: none;
    border-left: none;
    border-radius: 0;

    box-shadow: none;

    transition: none;
  }

  .hasSub:hover > .navbarSub,
  .hasSub:focus-within > .navbarSub {
    display: block;

    transform: none;
  }

  .navbarSubList a {
    text-align: center;
  }
}

/* =========================================
   RÉDUCTION DES ANIMATIONS
========================================= */

@media (prefers-reduced-motion: reduce) {
  .illiviumLogoRedirect,
  .illiviumLogoContainer,
  .navbarMainList,
  .navbarMainList > a,
  .navbarSub,
  .navbarSubList a {
    transition: none;
  }
}