/* Menu principal Ressources — Guides et outils */
.nws-nav-resources {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nws-nav-resources-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 25px;
  margin: 0 -2px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nws-red);
  cursor: pointer;
}

.nws-nav-resources-trigger span {
  position: relative;
  width: 13px;
  height: 10px;
  border: 0;
  color: var(--nws-red);
  transform: translateY(3px);
  transition: transform .18s var(--nws-ease), color .18s var(--nws-ease);
}

.nws-nav-resources-trigger span::before,
.nws-nav-resources-trigger span::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 8px;
  height: 1px;
  border-radius: 1px;
  background: currentColor;
  transition: transform .18s var(--nws-ease);
}

.nws-nav-resources-trigger span::before {
  left: 0;
  transform: rotate(37deg);
  transform-origin: right center;
}

.nws-nav-resources-trigger span::after {
  right: 0;
  transform: rotate(-37deg);
  transform-origin: left center;
}

.nws-nav-resources-trigger:hover span,
.nws-nav-resources-trigger:focus-visible span {
  color: #ec2639;
}

.nws-nav-resources-trigger:focus-visible {
  outline: 2px solid var(--nws-cyan);
  outline-offset: 3px;
}

.nws-nav-resources.is-open .nws-nav-resources-trigger span {
  transform: translateY(3px) rotate(180deg);
}

@media (min-width: 761px) {
  .nws-nav-resources {
    align-items: baseline;
  }

  .nws-nav-resources > a {
    transform: translateY(1.5px);
  }

  .nws-nav-resources-trigger {
    align-self: baseline;
    width: 18px;
    height: 18px;
    margin: 0 -2px 0 1px;
    transform: translateY(-1px);
  }
}

.nws-nav-resources-menu {
  position: absolute;
  /* Le panneau touche l’onglet : aucun vide ne doit interrompre le survol. */
  top: 100%;
  left: 50%;
  z-index: 70;
  display: flex;
  width: min(660px, calc(100vw - 48px));
  border-top: 3px solid var(--nws-cyan);
  background: #0b1133;
  box-shadow: 0 20px 42px rgba(5, 12, 38, .24);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity .18s var(--nws-ease), transform .18s var(--nws-ease), visibility .18s var(--nws-ease);
}

.nws-nav-resources:hover .nws-nav-resources-menu,
.nws-nav-resources:focus-within .nws-nav-resources-menu,
.nws-nav-resources.is-open .nws-nav-resources-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nws-nav-resources-menu-intro {
  display: flex;
  flex: 0 0 37%;
  flex-direction: column;
  align-items: flex-start;
  padding: 25px 26px 24px;
  border-right: 1px solid rgba(255, 255, 255, .16);
}

.nws-nav-resources-menu-intro p {
  margin: 0 0 15px;
  color: #76cff2;
  font-family: var(--nws-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.nws-nav-resources-menu-intro strong {
  color: #fff;
  font-family: var(--nws-display);
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .92;
}

.nws-nav-resources-menu-intro strong em {
  color: #42bde9;
  font-style: normal;
}

.nws-nav-resources-menu-intro > span {
  margin-top: 15px;
  color: rgba(239, 246, 255, .8);
  font-size: 12px;
  line-height: 1.5;
}

.nws-nav-resources-menu a {
  text-transform: none;
}

.nws-nav-resources-menu-hub {
  margin-top: auto;
  padding-top: 18px;
  color: #d3ff00;
  font-family: var(--nws-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
}

.nws-nav-resources-menu-hub b {
  margin-left: 5px;
  font-size: 13px;
  font-weight: 400;
}

.nws-nav-resources-menu-hub:hover,
.nws-nav-resources-menu-hub:focus-visible {
  color: #fff;
  outline: 0;
}

.nws-nav-resources-menu-links {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 9px 0;
}

.nws-nav-resources-menu-links a {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  padding: 7px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
  font-family: var(--nws-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.05;
  text-decoration: none;
  transition: background .16s var(--nws-ease), color .16s var(--nws-ease), padding .16s var(--nws-ease);
}

.nws-nav-resources-menu-links a:last-child {
  border-bottom: 0;
}

.nws-nav-resources-menu-links a span {
  display: block;
  margin-bottom: 3px;
  color: #76cff2;
  font-family: var(--nws-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1;
}

.nws-nav-resources-menu-links a:hover,
.nws-nav-resources-menu-links a:focus-visible {
  padding-left: 30px;
  background: rgba(56, 174, 221, .18);
  color: #d3ff00;
  outline: 0;
}

@media (max-width: 760px) {
  .nws-nav-list .nws-nav-resources {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
    align-items: stretch;
  }

  .nws-nav-list .nws-nav-resources > a {
    grid-column: 1;
    min-width: 0;
  }

  .nws-nav-resources-trigger {
    grid-column: 2;
    grid-row: 1;
    width: 52px;
    height: auto;
    margin: 0;
    border-left: 1px solid var(--nws-line);
  }

  .nws-nav-resources-trigger span {
    width: 14px;
    height: 10px;
  }

  .nws-nav-resources-menu,
  .nws-nav-resources:hover .nws-nav-resources-menu,
  .nws-nav-resources:focus-within .nws-nav-resources-menu {
    position: static;
    grid-column: 1 / -1;
    display: none;
    width: auto;
    margin: 0;
    border-top: 2px solid var(--nws-cyan);
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: none;
  }

  .nws-nav-resources.is-open .nws-nav-resources-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nws-nav-resources-menu-intro {
    display: block;
    padding: 20px 22px 17px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
  }

  .nws-nav-resources-menu-intro p {
    margin-bottom: 10px;
  }

  .nws-nav-resources-menu-intro strong {
    font-size: 28px;
  }

  .nws-nav-resources-menu-intro > span {
    display: block;
    margin-top: 10px;
  }

  .nws-nav-resources-menu-hub {
    display: inline-block;
    margin-top: 0;
    padding-top: 14px;
  }

  /* Le thème mobile général cible aussi les ancres du sous-menu. Ces règles,
     plus spécifiques, conservent la hiérarchie visuelle du panneau sombre. */
  .nws-nav-list .nws-nav-resources-menu .nws-nav-resources-menu-hub {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 14px 0 0;
    color: #d3ff00;
    font-family: var(--nws-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: none;
  }

  .nws-nav-list .nws-nav-resources-menu .nws-nav-resources-menu-hub::before,
  .nws-nav-list .nws-nav-resources-menu .nws-nav-resources-menu-hub::after {
    content: none !important;
  }

  .nws-nav-list .nws-nav-resources-menu .nws-nav-resources-menu-hub b {
    margin: 0;
    color: var(--nws-red);
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
  }

  .nws-nav-list .nws-nav-resources-menu .nws-nav-resources-menu-links a {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    min-height: 64px;
    padding: 10px 46px 10px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    color: #fff;
    font-family: var(--nws-display);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -.025em;
    line-height: 1.05;
    text-decoration: none;
    text-transform: none;
  }

  .nws-nav-list .nws-nav-resources-menu .nws-nav-resources-menu-links a span {
    display: block;
    margin: 0 0 4px;
    color: #76cff2;
    font-family: var(--nws-mono);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1;
  }

  .nws-nav-list .nws-nav-resources-menu .nws-nav-resources-menu-links a::before {
    content: none !important;
  }

  .nws-nav-list .nws-nav-resources-menu .nws-nav-resources-menu-links a::after {
    content: "→";
    position: absolute;
    top: 50%;
    right: 22px;
    margin: 0;
    color: var(--nws-red);
    font-family: var(--nws-mono);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
    transform: translateY(-50%);
  }

  .nws-nav-resources-menu-links {
    padding: 7px 0;
  }

  .nws-nav-resources-menu-links a {
    min-height: 52px;
    padding: 9px 22px;
    font-size: 17px;
  }

  .nws-nav-resources-menu-links a:hover,
  .nws-nav-resources-menu-links a:focus-visible {
    padding-left: 22px;
  }

  .nws-nav-resources-menu-links a::before {
    content: none !important;
  }
}
