/* ==========================================================================
   Styles pour Tracer ax + by = c à partir de y = (-a/b)x + c/b (p2_l5_t2)
   Écoles Pionnières - 2AC Mathématiques
   ========================================================================== */

.rles-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 24px;
  margin: 24px 0;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
}

/* En-tête */
.rles-header-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1.5px solid #a7f3d0;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 24px;
}

.rles-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #16a34a;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.rles-intro-text {
  font-size: 15.5px;
  color: #1e293b;
  line-height: 1.5;
  margin: 0;
}

/* Conteneur des deux cas */
.rles-cases-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Carte d'un cas */
.rles-case-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.rles-case-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 17.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 18px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
}

.rles-case-num {
  color: #ea580c;
  font-weight: 800;
  font-size: 19px;
}

.rles-eq-pill {
  background: #f0f9ff;
  color: #0284c7;
  border: 1.5px solid #38bdf8;
  padding: 3px 14px;
  border-radius: 8px;
}

/* Grille 2 colonnes : Démarche et Graphe */
.rles-case-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

/* Sous-étapes a), b), c) */
.rles-steps-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rles-sub-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rles-sub-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.rles-letter {
  color: #ea580c;
  font-weight: 800;
}

/* Bloc d'étapes de calcul (style manuel scolaire) */
.rles-calc-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 20px;
  font-size: 16px;
  color: #0284c7;
}

/* Capsule de transformation d'équation */
.rles-trans-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 20px;
  flex-wrap: wrap;
}

.rles-capsule {
  background: #f0f9ff;
  border: 1.5px solid #38bdf8;
  color: #0284c7;
  font-size: 16.5px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 999px;
}

.rles-concl-text {
  font-size: 15px;
  color: #334155;
  line-height: 1.6;
  margin: 6px 0 0 20px;
}

/* Graphique */
.rles-graph-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.rles-svg {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Police manuscrite pour les variables et formules */
.font-hand {
  font-family: 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
}

/* Responsive */
@media (max-width: 840px) {
  .rles-case-grid {
    grid-template-columns: 1fr;
  }
  .rles-graph-col {
    width: 100%;
  }
}
