/* Navigation Morphing Container */
.gooey-nav-container {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  padding: 0.25rem;
}

.gooey-nav-container nav {
  position: relative;
  z-index: 2; /* Above the pill */
}

.gooey-nav-container ul {
  display: flex;
  gap: 0.25rem; /* Space between items */
  list-style: none;
  padding: 0;
  margin: 0;
}

.gooey-nav-container li {
  position: relative;
  cursor: pointer;
  border-radius: 9999px;
  /* inactive text color */
  color: var(--couleur-texte-base); 
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.gooey-nav-container li:hover {
    background-color: transparent; /* Disable default hover bg if any */
    color: var(--couleur-texte-titre);
}

/* Active text color (contrasting with theme color) */
.gooey-nav-container li.active {
  color: var(--couleur-texte-inverse, #ffffff);
}

/* The sliding pill */
.nav-pill {
  position: absolute;
  top: 0;
  left: 0;
  height: 0; /* JS will set this */
  width: 0;  /* JS will set this */
  background-color: var(--couleur-principale, #1d995b);
  border-radius: 9999px;
  z-index: 1; /* Behind text */
  pointer-events: none;
  opacity: 0; /* Hidden initially until positioned */
  
  /* Elastic movement */
  transition: 
    left 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
    width 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
    height 0.5s ease,
    top 0.5s ease,
    opacity 0.2s ease;
}

/* Morphing animation class (added by JS on click) */
.nav-pill.moving {
  animation: nav-morph 0.5s forwards;
}

@keyframes nav-morph {
  0% { transform: scale(1); }
  25% { transform: scale(0.9, 0.7); } /* Flatten */
  50% { transform: scale(0.9, 0.7); }
  75% { transform: scale(1.05, 0.95); } /* Stretch */
  100% { transform: scale(1); }
}
