#navbarNav .nav-link {
  position: relative;
  display: inline-block;
  text-shadow: 1px 0px rgba(0, 0, 0, 0.4);
  transition: color 200ms ease-in-out;
  z-index: 1; /* Assure que le texte reste au-dessus */
}

#navbarNav .nav-link:hover {
  color: rgba(255, 255, 255, 0.9) !important;

}

#navbarNav .nav-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #4795c3;
  transform-origin: center;
  transform: rotateX(90deg);
  transition: transform 300ms ease-in-out;
  z-index: -1;
  opacity: 0.8;
}

/* Définition des couleurs pour chaque élément */
#navbarNav li:nth-child(2) .nav-link::after {
  background: #ecc64b;
}

#navbarNav li:nth-child(3) .nav-link::after {
  background: #20B2AA;
}

#navbarNav li:nth-child(4) .nav-link::after {
  background: #f26667;
}

#navbarNav li:nth-child(5) .nav-link::after {
  background: #BA55D3;
}

/* Animation au hover */
#navbarNav .nav-link:hover::after {
  transform: rotateX(0deg);
}

.theme-dropdown {
  position: relative;
  z-index: 20;
  width: 180px;
}

.theme-menu-toggle {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.75rem;
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.theme-menu-toggle:hover,
.theme-menu-toggle[aria-expanded="true"],
.theme-menu-toggle:focus-visible {
  border-color: rgba(255, 193, 7, 0.65);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.theme-current-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(255, 193, 7, 0.25);
  border-radius: 0.55rem;
  background: rgba(255, 193, 7, 0.1);
}

.theme-current-icon svg {
  width: 19px;
  height: 19px;
}

.theme-toggle-copy,
.theme-option-copy {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.theme-toggle-caption {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.theme-toggle-label {
  margin-top: 0.18rem;
  font-size: 0.84rem;
  font-weight: 600;
}

.theme-chevron {
  width: 14px;
  height: 14px;
  margin-left: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transition: transform 180ms ease;
}

.theme-menu-toggle[aria-expanded="true"] .theme-chevron {
  transform: rotate(180deg);
}

.theme-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  display: grid;
  width: 250px;
  gap: 0.2rem;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  background: #171b24;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.4);
  animation: theme-menu-enter 150ms ease-out;
}

.theme-menu[hidden] {
  display: none;
}

.theme-menu-heading {
  padding: 0.5rem 0.65rem 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.theme-option {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 0.62rem;
  color: #f3f4f6;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.theme-option:hover,
.theme-option:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
}

.theme-option[aria-checked="true"] {
  border-color: rgba(255, 193, 7, 0.28);
  background: rgba(255, 193, 7, 0.1);
}

.theme-option-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  fill: currentColor;
}

.theme-icon-classic { color: #8ec5ff; }
.theme-icon-flatly { color: #67b7a5; }
.theme-icon-minty { color: #70d6a5; }
.theme-icon-darkly { color: #b6a4ff; }
.theme-icon-sketchy { color: #ffb86b; }
.theme-icon-zephyr { color: #f2d36b; }

.theme-option-copy > span {
  font-size: 0.84rem;
  font-weight: 600;
}

.theme-option-copy small {
  margin-top: 0.16rem;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.7rem;
}

.theme-check {
  margin-left: auto;
  color: #ffc107;
  font-size: 0.9rem;
  opacity: 0;
}

.theme-option[aria-checked="true"] .theme-check {
  opacity: 1;
}

.theme-status:not(:empty) {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 1;
  width: max-content;
  max-width: min(290px, 85vw);
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(255, 193, 7, 0.25);
  border-radius: 0.55rem;
  color: #ffe08a;
  background: #171b24;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  font-size: 0.75rem;
}

@keyframes theme-menu-enter {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 991.98px) {
  .theme-dropdown {
    margin-bottom: 0.6rem;
  }
}
