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

/*=============== VARIABLES CSS — PEN'TEE ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Palette PEN'TEE ==========*/
  --primary-color: hsl(330, 90%, 55%);          /* Rose vif hover */
  --primary-color-dark: hsl(330, 90%, 45%);     /* Hover CTA */
  --primary-color-light: hsl(330, 90%, 96%);    /* Fond léger accent */

  --black-color: hsl(0, 0%, 10%);              /* Noir profond textes */
  --black-color-light: hsl(0, 0%, 15%);        /* Noir nav mobile */
  --black-color-lighten: hsl(0, 0%, 20%);      /* Sous-menus */

  --white-color: #ffffff;
  --body-color: hsl(0, 0%, 98%);              /* Fond page blanc cassé */
  --border-color: hsl(0, 0%, 90%);            /* Séparateurs discrets */
  --text-muted: hsl(0, 0%, 50%);              /* Texte secondaire */

  /*========== Typographie ==========*/
  --body-font: "Inter", sans-serif;
  --normal-font-size: 0.9rem;
  --small-font-size: 0.8rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

@media screen and (min-width: 1024px) {
  :root {
    --normal-font-size: 0.938rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--black-color);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

/*=============== REUSABLE ===============*/
.container {
  max-width: 1200px;
  margin-inline: 1.5rem;
}

/*=============== HEADER ===============*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--white-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 12px hsla(0, 0%, 0%, 0.06);
  z-index: var(--z-fixed);
}

/*=============== NAV ===============*/
.nav {
  height: var(--header-height);
}

.nav__logo {
  color: var(--black-color);
  font-weight: var(--font-bold);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

/* Point orange sur le logo comme accent de marque */
.nav__logo span {
  color: var(--primary-color);
}

.nav__logo i {
  font-weight: initial;
  font-size: 1.25rem;
}

.nav__burger,
.nav__close {
  color: var(--black-color);
}

.nav__data {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  column-gap: 0.25rem;
}

.nav__toggle {
  position: relative;
  width: 32px;
  height: 32px;
}

.nav__burger,
.nav__close {
  position: absolute;
  width: max-content;
  height: max-content;
  inset: 0;
  margin: auto;
  font-size: 1.25rem;
  cursor: pointer;
  transition: opacity 0.1s, transform 0.4s;
}

.nav__close {
  opacity: 0;
}

/*=============== NAV — Mobile ===============*/
@media screen and (max-width: 1118px) {
  .nav__menu {
    position: absolute;
    left: 0;
    top: 2.5rem;
    width: 100%;
    height: calc(100vh - 3.5rem);
    overflow: auto;
    pointer-events: none;
    opacity: 0;
    transition: top 0.4s, opacity 0.3s;
    background-color: var(--white-color);
  }

  .nav__menu::-webkit-scrollbar {
    width: 0;
  }

  .nav__list {
    background-color: var(--white-color);
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
  }
}

.nav__link {
  color: var(--black-color);
  background-color: var(--white-color);
  font-weight: var(--font-medium);
  font-size: var(--normal-font-size);
  padding: 1.1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s, background-color 0.2s;
  border-bottom: 1px solid var(--border-color);
}

.nav__link:hover {
  color: var(--primary-color);
  background-color: var(--primary-color-light);
}

/* Bouton CTA dans la nav */
.nav__cta {
  background-color: var(--primary-color);
  color: var(--white-color) !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 6px;
  font-weight: var(--font-semi-bold) !important;
  font-size: var(--small-font-size) !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom: none !important;
  transition: background-color 0.2s !important;
}

.nav__cta:hover {
  background-color: var(--primary-color-dark) !important;
  color: var(--white-color) !important;
}

/*=============== Show menu / icon ===============*/
.show-menu {
  opacity: 1;
  top: 3.5rem;
  pointer-events: initial;
}

.show-icon .nav__burger {
  opacity: 0;
  transform: rotate(90deg);
}

.show-icon .nav__close {
  opacity: 1;
  transform: rotate(90deg);
}

/*=============== DROPDOWN ===============*/
.dropdown__item {
  cursor: pointer;
}

.dropdown__arrow {
  font-size: 1.1rem;
  font-weight: initial;
  color: var(--text-muted);
  transition: transform 0.3s;
}

.dropdown__link,
.dropdown__sublink {
  padding: 1rem 1.25rem 1rem 2.25rem;
  color: var(--black-color);
  background-color: var(--body-color);
  display: flex;
  align-items: center;
  column-gap: 0.5rem;
  font-weight: var(--font-regular);
  font-size: var(--normal-font-size);
  transition: color 0.2s, background-color 0.2s;
  border-bottom: 1px solid var(--border-color);
}

.dropdown__link i,
.dropdown__sublink i {
  font-size: 1.1rem;
  font-weight: initial;
  color: var(--primary-color);
}

.dropdown__link:hover,
.dropdown__sublink:hover {
  color: var(--primary-color);
  background-color: var(--primary-color-light);
}

.dropdown__menu,
.dropdown__submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.dropdown__item:hover .dropdown__menu,
.dropdown__subitem:hover > .dropdown__submenu {
  max-height: 1000px;
  transition: max-height 0.4s ease-in;
}

.dropdown__item:hover .dropdown__arrow {
  transform: rotate(180deg);
  color: var(--primary-color);
}

/*=============== DROPDOWN SUBMENU ===============*/
.dropdown__add {
  margin-left: auto;
}

.dropdown__sublink {
  background-color: var(--white-color);
  padding-left: 3rem;
}

/*=============== BREAKPOINTS ===============*/
@media screen and (max-width: 340px) {
  .container {
    margin-inline: 1rem;
  }

  .nav__link {
    padding-inline: 1rem;
  }
}

/* Desktop */
@media screen and (min-width: 1118px) {
  .container {
    margin-inline: auto;
  }

  .nav {
    height: calc(var(--header-height) + 1.5rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav__toggle {
    display: none;
  }

  .nav__list {
    height: 100%;
    display: flex;
    align-items: center;
    column-gap: 0.25rem;
  }

  .nav__link {
    height: 100%;
    padding: 0 0.85rem;
    justify-content: initial;
    column-gap: 0.25rem;
    border-bottom: none;
    border-bottom: 2px solid transparent;
    font-size: var(--normal-font-size);
    transition: color 0.2s, border-color 0.2s;
  }

  .nav__link:hover {
    color: var(--primary-color);
    background-color: transparent;
    border-bottom-color: var(--primary-color);
  }

  /* CTA desktop */
  .nav__cta {
    height: auto !important;
    border-bottom: none !important;
    margin-left: 0.5rem;
    padding: 0.55rem 1.1rem !important;
  }

  .nav__cta:hover {
    border-bottom: none !important;
  }

  .dropdown__item,
  .dropdown__subitem {
    position: relative;
  }

  .dropdown__menu,
  .dropdown__submenu {
    max-height: initial;
    overflow: initial;
    position: absolute;
    left: 0;
    top: 100%;           /* Collé directement sous le parent, zéro gap */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px hsla(0, 0%, 0%, 0.1);
    min-width: 220px;
    overflow: hidden;
  }

  /* Pont invisible au-dessus du menu pour ne pas perdre le hover en passant dessus */
  .dropdown__menu::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 0;
    width: 100%;
    height: 8px;
    background: transparent;
  }

  .dropdown__link,
  .dropdown__sublink {
    padding-inline: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
  }

  .dropdown__link:last-child,
  .dropdown__sublink:last-child {
    border-bottom: none;
  }

  .dropdown__subitem .dropdown__link {
    padding-inline: 1rem;
  }

  .dropdown__submenu {
    position: absolute;
    left: 100%;
    top: 0;
    border-radius: 8px;
  }

  /* Pont invisible à gauche du submenu */
  .dropdown__submenu::before {
    content: "";
    position: absolute;
    top: 0;
    left: -8px;
    width: 8px;
    height: 100%;
    background: transparent;
  }

  /* Show dropdown — plus d'animation top, juste opacity pour éviter le gap */
  .dropdown__item:hover .dropdown__menu {
    opacity: 1;
    pointer-events: initial;
  }

  /* Show submenu */
  .dropdown__subitem:hover > .dropdown__submenu {
    opacity: 1;
    pointer-events: initial;
  }
}