/* =========================================================
NAVIGATION — STRUCTURE GÉNÉRALE
========================================================= */

/* ---------------------------------------------------------
1. BASE NAVIGATION
--------------------------------------------------------- */

.nav-toggle,
label {
  display: none;
}

header nav {
  width: min(90%, 1400px);
  margin-inline: auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: 100px;
  position: relative;
  z-index: 50;
  margin-top: 35px;
}




/* ---------------------------------------------------------
2. ACCESSIBILITÉ
--------------------------------------------------------- */

.sr-only {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -50px;
  overflow: hidden;
  display: inline;
  background-color: white;
  padding: 5px;
  transition: all ease-in-out 0.2s;
  z-index: 100;
}

.sr-only:focus {
  left: 50%;
  transform: translateX(-50%);
  top: 0px;
}

#main {   scroll-margin-top: -120px; }
:target {   scroll-margin-top: -120px; }


/* ---------------------------------------------------------
3. LOGO
--------------------------------------------------------- */

header nav #logo {
  display: block;
  width: 135px;
  height: 50px;
  margin-top: 6px;
  background-image: url(../media/Emeria_logo.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
}

/* ---------------------------------------------------------
4. STRUCTURE DU MENU
--------------------------------------------------------- */

header nav > ul {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  padding: 0;
  align-items: center;
}


/* ---------------------------------------------------------
5. RESET SUMMARY / DETAILS
--------------------------------------------------------- */

summary {
  list-style: none;
  appearance: none;
  -webkit-appearance: none;
}

summary::-webkit-details-marker {
  display: none;
}

header nav li details > summary::-webkit-details-marker {
  display: none !important;
}


/* ---------------------------------------------------------
6. STYLES DES LIENS NAVIGATION
--------------------------------------------------------- */

header nav li a,
header nav li details summary {
  display: flex;
  align-items: center;
  cursor: pointer;
  line-height: 1;
  padding: 8px 10px;
  font-size: 16px;
  font-weight: 600;
  color: #06187D;
  position: relative;
  transition: color 0.2s ease-in-out;
  list-style: none;
}

header nav li a:hover,
header nav li details summary:hover,
#menu-1 .menu-item-1 summary,
#menu-2 .menu-item-2 a,
#menu-3 .menu-item-3 summary,
#menu-4 .menu-item-4 a,
#menu-5 .menu-item-5 a {
  color: #06187D;
}


/* ---------------------------------------------------------
TRIANGLE SUMMARY (GLOBAL)
--------------------------------------------------------- */

header nav details summary {
  position: relative;
}

header nav details summary::after {
  content: '';
  width: 15px;
  height: 15px;
  opacity: 0.5;
  position: absolute;
  top: 9px;
  right: -8px;
  background-image: url(../media/triangle.svg);
  background-size: contain;
}

header nav details summary:hover::after {
  opacity: 1;
}


/* ---------------------------------------------------------
GESTION DES LANGUES (GLOBAL)
--------------------------------------------------------- */

html[lang="en"] #langage .fr,
html[lang="en"] #langage .de,
html[lang="en"] #langage .en-selector {
  display: none;
}

html[lang="fr"] #langage .en,
html[lang="fr"] #langage .de,
html[lang="fr"] #langage .fr-selector {
  display: none;
}

html[lang="de"] #langage .en,
html[lang="de"] #langage .fr,
html[lang="de"] #langage .de-selector {
  display: none;
}


 /* ---------------------------------------------------------
CTA FINANCE
--------------------------------------------------------- */

header nav li#finance a {
  font-size: 15px;
  background-color: #06187D;
  color: white;
  background-image: url(../media/picto_dashboard.svg);
  background-repeat: no-repeat;
  background-position: center right 13px;
  background-size: 12px;
  padding: 8px 35px 8px 16px;
  border-radius: 999px;
  line-height: 1;
}


/* =========================================================
DESKTOP NAVIGATION
========================================================= */

@media only screen and (min-width: 1000px) {

 
  header nav > ul li {
    position: relative;
  }

  #menu-1 .menu-item-1::after,
  #menu-2 .menu-item-2::after,
  #menu-3 .menu-item-3::after,
  #menu-4 .menu-item-4::after {
    width: 30px;
  }

  header nav > ul li::after {
    content: '';
    height: 2px;
    width: 0;
    background-color: #F36F1D;
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.2s ease-in-out;
  }

 header  nav li details ul li::after {
    content: none;
  }

  header nav li:hover::after {
    width: 80%;
  }

  #finance::after,
  #langage::after {
    content: none;
  }


  /* ---------------------------------------------------------
  DROPDOWN MENUS
  --------------------------------------------------------- */

  header nav li details {
    position: relative;
  }

  header nav li details ul {
    position: absolute;
    top: calc(100% + 20px);
    left: 0;
    background-color: white;
    border-radius: 14px;
    padding: 16px;
    width: 250px;
    box-shadow: 0 5px 10px rgba(37, 35, 65, 0.3);
  }


  /* ---------------------------------------------------------
  DROPDOWN LINKS
  --------------------------------------------------------- */

  header nav details ul li a {
    display: block;
    line-height: 120%;
    color: #06187D;
    opacity: 0.6;
    padding-left: 0;
    transition: opacity 0.2s ease-in-out, padding-left 0.2s ease-in-out;
  }

 header  nav details ul li a:hover {
    color: #06187D;
    opacity: 1;
    padding-left: 2px;
  }

  header nav details ul li a::after {
    content: '›';
    opacity: 0;
    transition: opacity 0.3s ease-in-out 0.1s, margin-left 0.3s ease-in-out 0.1s;
  }

 header  nav details ul li a:hover::after {
    opacity: 1;
    margin-left: 6px;
  }


 


  /* ---------------------------------------------------------
  LANGUAGE SELECTOR
  --------------------------------------------------------- */

  header nav li#langage details summary {
    background-color: white;
    border-radius: 999px;
    padding: 8px 24px 8px 14px;
    font-size: 14px;
    line-height: 1;
  }

  header nav li#langage details ul {
    font-size: 14px;
    width: 60px;
    box-shadow: 0 5px 10px rgba(37, 35, 65, 0.3);
  }

  header nav li#langage details ul a {
    font-size: 14px;
    text-align: center;
    padding-inline: 0;
  }

 header  nav #langage details summary::after {
    right: 5px;
  }

  header nav li#langage details ul li a::after {
    content: none;
  }

 header  nav li#langage details ul li a:hover {
    padding-left: 0;
  }

}


/* =========================================================
MOBILE NAVIGATION
========================================================= */

@media only screen and (max-width: 1000px) {

 header  nav {
    width: 100%;
    position: relative;
    margin-top: 0;
  }

  a#logo {
    margin: 27px 5% 0 5%;
    width: 130px;
  }


  /* ---------------------------------------------------------
  BURGER ICON
  --------------------------------------------------------- */
  
  .nav-toggle-label {
    position: absolute;
    top: 0;
    right: 5%;
    height: 100%;
    width: 30px;
    display: flex;
    align-items: center;
    opacity: 0.6;
    transition: opacity 0.2s ease-in-out;
    cursor: pointer;
  }
  
  .nav-toggle-label:hover {
    opacity: 1;
  }
  
  .nav-toggle-label span {
    display: block;
    background: #06187D;
    height: 3px;
    width: 25px;
    border-radius: 2px;
    position: relative;
  }
  
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    display: block;
    background: #06187D;
    height: 3px;
    width: 25px;
    border-radius: 2px;
    position: absolute;
  }
  
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    content: '';
    position: absolute;
  }
  
  .nav-toggle-label span::before {
    bottom: 9px;
  }
  
  .nav-toggle-label span::after {
    top: 9px;
  }


  /* ---------------------------------------------------------
  MOBILE MENU PANEL
  --------------------------------------------------------- */

  header nav > ul {
    position: absolute;
    background-color: white;
    top: 90px;
    left: 0;
    width: 100%;
    flex-direction: column;
    display: none;
    height: 80vh;
    padding-top: var(--fs-xxl);
    padding-inline: 5%;
  }
  
  header nav > ul li {
    width: 100%;
  }
  
 header  nav > ul li details {
    width: 100%;
  }
  
  /* liens et summary */
  
  header nav > ul li a,
 header  nav > ul li details summary {
    display: flex;
    align-items: center;
    width: 100%;
    font-size: 21px;
    color: #06187D;
  }
  
  /* triangle */
  
 header  nav li details summary::after {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
  }



  header nav li#finance a {
    font-size: var(--fs-m);
    padding: 15px 35px 15px 16px;
    background-position: center right 30px;
    background-size: 20px;
    margin: 0 0 0 -15px;
    width: calc(100% + 30px);
    }



  /* ---------------------------------------------------------
  MOBILE DROPDOWN
  --------------------------------------------------------- */

header nav > ul li a,
header  nav > ul li details summary {
    padding-inline: 0;

    
  }

  header nav li details ul {
    position: static;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border-bottom: 1px solid rgba(27, 25, 49, 0.2);
    border-top: 1px solid rgba(27, 25, 49, 0.2);
    padding-block: var(--fs-m);
  }

  header nav li details ul li a {
    opacity: 1;
    font-size: 18px;
    text-align: center;
    text-wrap: balance;
    opacity: 0.8;
    padding-left: 0;
  }

  header nav li details ul li a:hover {
    padding-left: 0;
    opacity: 1;
  }

  header nav li details ul li a::after {
    content: none;
  }

  details summary::-webkit-details-marker {
    display: none;
  }

  .nav-toggle:checked ~ ul {
    display: flex;
  }

}