/* =========================================
   PAGE LEÇONS (LAYOUT & SIDEBAR)
   ========================================= */

.lessons-wrapper {
  display: flex;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  /* Compense la hauteur de la barre de navigation fixe */
  padding-top: 100px;
}

.lessons-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 120px; /* L'espace entre le haut de l'écran et la sidebar quand tu scrolles */
  margin-top: 160px; /* Pousse la sidebar vers le bas pour l'aligner avec les cartes (la zone blanche) */
  height: max-content;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2rem 1.5rem;
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.8rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent-gold);
}

/* =========================================
   CONTENU PRINCIPAL & SECTIONS ELO
   ========================================= */

.lessons-main {
  flex-grow: 1;
  min-width: 0; /* Empêche le contenu de déborder sur les petits écrans */
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 4rem;
}

/* Titres de section avec la ligne dorée */
.elo-section {
  margin-bottom: 5rem;
}

.elo-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.elo-header h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--accent-gold);
  white-space: nowrap;
}

.elo-line {
  flex-grow: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-gold) 0%, transparent 100%);
  opacity: 0.5;
}

/* =========================================
   CARTES DE LEÇONS (GRILLE)
   ========================================= */

.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.lesson-card {
  background: linear-gradient(145deg, #12100b, #050505);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 1.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.lesson-card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.lesson-icon {
  font-size: 1.8rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.lesson-card:hover .lesson-icon {
  color: var(--accent-gold);
}

.lesson-card h3 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 0.8rem;
  font-family: var(--font-body);
}

.lesson-card p {
  color: #888;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Bouton d'action en bas de la carte */
.lesson-action {
  font-size: 0.85rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.lesson-card:hover .lesson-action {
  opacity: 1;
  gap: 12px; /* La flèche se décale légèrement au survol */
}

@media (max-width: 992px) {
  .lessons-wrapper {
    flex-direction: column;
  }

  .lessons-sidebar {
    width: 100%;
    position: static;
    margin-top: 0; /* <-- Annule le décalage sur mobile */
    margin-bottom: 2rem;
  }

  .page-header h1 {
    font-size: 2.5rem;
  }
}
