/* ============================================================
   learning-path.css — Styles spécifiques à la page Learning Path
   Nodes, connecteurs courbes, lesson card expandable, historique.
   À n'importer QUE sur les pages qui affichent un parcours.
   ============================================================ */

/* ===========================================
   ZONE DU PARCOURS — Colonne centrale
   =========================================== */
.path-area {
  flex: 1;
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* ===========================================
   NODES — Étapes du parcours d'apprentissage
   =========================================== */

/* Ligne de nœuds (alignement vertical) */
.node-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 520px;
}

/* Wrapper cliquable autour d'un nœud */
.node-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

/* Positions horizontales pour créer le serpentin */
.node-wrapper.left   { align-self: flex-start; margin-left: 20%; }
.node-wrapper.center { align-self: center; }
.node-wrapper.right  { align-self: flex-end; margin-right: 20%; }

/* --- Cercle du nœud --- */
.node-circle {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.node-circle:hover { transform: scale(1.08); }

/* Variante : leçon terminée */
.node-circle.completed {
  width: 60px; height: 60px;
  background: var(--secondary);
  box-shadow: 0 0 20px rgba(107, 255, 143, 0.35);
}

/* Variante : leçon en cours */
.node-circle.active {
  width: 76px; height: 76px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  box-shadow: 0 0 40px rgba(163, 166, 255, 0.5), 0 0 80px rgba(163, 166, 255, 0.2);
  border: 3px solid rgba(6, 14, 32, 1);
  outline: 2px solid var(--primary);
}

/* Variante : leçon verrouillée */
.node-circle.locked {
  width: 56px; height: 56px;
  background: var(--surface-highest);
  border: 2px solid var(--outline-variant);
}

/* --- Anneau de pulsation (nœud actif uniquement) --- */
.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
   margin-top: -40px;  /* -(height/2) */
 
  transform: translate(-50%, -50%);
  width: 170px;   
  height: 170px;  
  border-radius: 50%;
  background: rgba(163, 166, 255, 0.15);
  animation: pulseRing 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulseRing {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50%       { transform: translate(-50%, -50%) scale(1.15); opacity: 0; }
}

/* --- Badge XP superposé sur le nœud --- */
.xp-badge {
  position: absolute;
  top: -6px; right: -10px;
  background: var(--tertiary);
  color: #624900;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* --- Label sous le nœud --- */
.node-label {
  text-align: center;
  margin-top: 12px;
}

.node-status {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.node-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--on-surface);
  letter-spacing: -0.01em;
}
.node-title.active { font-size: 18px; }
.node-title.locked { color: var(--on-surface-variant); }

/* ===========================================
   CONNECTEURS — Lignes entre les nœuds
   =========================================== */

/* Connecteur droit simple */
.connector {
  width: 3px;
  height: 56px;
  background: linear-gradient(to bottom, var(--secondary), var(--primary));
  position: relative;
  margin: 8px 0;
  border-radius: 2px;
  opacity: 0.4;
  align-self: center;
}
.connector.dim    { background: var(--outline-variant); opacity: 0.3; }
.connector.bright { opacity: 0.7; }

/* Connecteur courbe (SVG inline, pas de classe CSS nécessaire) */
.curve-connector {
  width: 100%;
  height: 70px;
  position: relative;
}

/* ===========================================
   LESSON CARD — Carte expansible du nœud actif
   Apparaît sous le nœud "In Progress" au clic.
   =========================================== */
.lesson-card {
  background: rgba(15, 25, 48, 0.8);
  border: 1px solid rgba(163, 166, 255, 0.2);
  border-radius: 20px;
  padding: 20px 24px;
  margin-top: 16px;
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 40px rgba(163, 166, 255, 0.1);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Barre de progression interne à la lesson card */
.lesson-progress-bar {
  height: 4px;
  background: var(--surface-highest);
  border-radius: 2px;
  overflow: hidden;
  margin: 12px 0;
}
.lesson-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--primary-dim));
  border-radius: 2px;
  transition: width 1s ease;
  width: 0%; /* Valeur initiale — animée via JS au chargement */
}

/* ===========================================
   MICRO-LEÇONS — Liste dans la lesson card
   Variantes : .done | .current | .todo
   =========================================== */
.micro-lesson {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  margin: 4px 0;
}
.micro-lesson:hover { background: rgba(255, 255, 255, 0.04); }

/* Pastille colorée à gauche */
.micro-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.micro-lesson.done    .micro-dot { background: var(--secondary); }
.micro-lesson.current .micro-dot {
  background: var(--primary);
  box-shadow: 0 0 10px rgba(163, 166, 255, 0.5);
}
.micro-lesson.todo .micro-dot { background: var(--outline-variant); }

/* ===========================================
   HISTORIQUE DES LEÇONS — Section en bas du parcours
   =========================================== */
.history-section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  max-width: 520px;
}

/* Item individuel de l'historique */
.history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(15, 25, 48, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.history-item:hover {
  border-color: rgba(163, 166, 255, 0.2);
  background: rgba(163, 166, 255, 0.05);
}
