/* Détails non couverts par les utilitaires Tailwind (CDN) */

::selection {
  background: #4f46e5;
  color: #fff;
}

html {
  scroll-behavior: smooth;
}

/* Scrollbar discrète (WebKit) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Icônes de navigation */
.nav-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

/* Liens de la sidebar desktop */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-link:hover {
  background-color: rgba(148, 163, 184, 0.08);
  color: #e2e8f0;
}
.nav-link.active {
  background-color: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
}

/* Liens de la bottom nav mobile */
.bottomnav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  font-weight: 500;
  color: #64748b;
  transition: color 0.15s ease;
}
.bottomnav-link.active {
  color: #a5b4fc;
}

/* Animation d'apparition légère pour les vues */
.view-enter {
  animation: view-fade-in 0.18s ease-out;
}
@keyframes view-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Champs de formulaire du panneau admin */
.admin-input {
  width: 100%;
  font-size: 0.875rem;
  background-color: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: #e2e8f0;
  outline: none;
  transition: border-color 0.15s ease;
}
.admin-input:focus {
  border-color: #6366f1;
}

/* Parcours façon Duolingo : rétroéclairage des niveaux */
.node-glow-completed {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 0 18px 2px rgba(99, 102, 241, 0.55);
}
.node-glow-current {
  animation: node-pulse 2s ease-in-out infinite;
}
.node-glow-current-amber {
  animation: node-pulse-amber 2s ease-in-out infinite;
}
@keyframes node-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12), 0 0 14px 2px rgba(99, 102, 241, 0.45); }
  50% { box-shadow: 0 0 0 7px rgba(99, 102, 241, 0.18), 0 0 26px 6px rgba(99, 102, 241, 0.7); }
}
@keyframes node-pulse-amber {
  0%, 100% { box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12), 0 0 14px 2px rgba(251, 191, 36, 0.45); }
  50% { box-shadow: 0 0 0 7px rgba(251, 191, 36, 0.18), 0 0 26px 6px rgba(251, 191, 36, 0.7); }
}
.node-shake {
  animation: node-shake 0.4s ease-in-out;
}
@keyframes node-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* Backdrop de modal */
.modal-backdrop {
  animation: modal-fade-in 0.15s ease-out;
}
@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
