/* ==========================================================================
   Styles pour déterminer y = ax + b à partir du graphe (p2_l4_t8)
   Écoles Pionnières - 2AC Mathématiques
   ========================================================================== */

.rdg-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);
}

/* 1. Carte "Je me prépare" */
.rdg-prep-card {
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
  border: 1.5px solid #99f6e4;
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 24px;
}

.rdg-prep-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0284c7;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.rdg-prep-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  background: #ffffff;
  border: 1px solid #ccfbf1;
  border-radius: 14px;
  padding: 18px 20px;
}

.rdg-prep-prompts {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rdg-prompt-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  color: #1e293b;
}

.rdg-prompt-label {
  font-weight: 600;
}

.rdg-answer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 999px;
  padding: 6px 24px;
  font-size: 18px;
  font-weight: 700;
  color: #15803d;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.rdg-calc-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 12px;
  padding: 6px 18px;
  font-size: 16px;
  font-weight: 700;
  color: #15803d;
  width: fit-content;
}

/* 2. Carte "J'étudie l'exemple" */
.rdg-example-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px;
}

.rdg-example-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ea580c;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.rdg-example-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  line-height: 1.5;
}

.rdg-example-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
}

/* Colonne étapes */
.rdg-steps-col {
  flex: 1;
  min-width: 290px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rdg-step-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: #1e293b;
  line-height: 1.6;
}

.rdg-step-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f59e0b;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.rdg-step-val {
  font-size: 17.5px;
  color: #1d4ed8;
  font-weight: 700;
}

.rdg-c-red {
  color: #dc2626;
  font-weight: 700;
}

.rdg-c-blue {
  color: #1d4ed8;
  font-weight: 700;
}

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

.rdg-plot-svg {
  max-width: 100%;
  height: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .rdg-section {
    padding: 16px;
  }
  .rdg-prep-layout,
  .rdg-example-layout {
    flex-direction: column;
  }
  .rdg-prep-prompts,
  .rdg-steps-col {
    width: 100%;
  }
}
