/* ==========================================================================
   Styles pour le tracé de droites à partir d'un tableau de valeurs (p2_l4_t4)
   Écoles Pionnières - 2AC Mathématiques
   ========================================================================== */

.rtg-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 règle / Je retiens */
.rtg-header-card {
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
  border: 1.5px solid #99f6e4;
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 24px;
}

.rtg-rule-box {
  background: #ffffff;
  border: 1.5px solid #ccfbf1;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.05);
}

.rtg-rule-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  color: #1e293b;
}

.rtg-rule-list li {
  position: relative;
  padding-left: 20px;
  line-height: 1.6;
}

.rtg-rule-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #0d9488;
  font-size: 20px;
  line-height: 1;
  top: 1px;
}

/* Carte de cas d'exemple */
.rtg-case-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 24px;
  transition: all 0.2s ease;
}

.rtg-case-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.rtg-case-card:last-child {
  margin-bottom: 0;
}

.rtg-case-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
}

.rtg-case-num {
  color: #ea580c;
  font-weight: 800;
  margin-right: 4px;
}

.rtg-case-badge {
  display: inline-block;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  color: #1d4ed8;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 8px;
}

.rtg-case-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

/* Colonne étapes de méthode (1 à 5) */
.rtg-steps-col {
  flex: 1;
  min-width: 290px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rtg-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: #1e293b;
  line-height: 1.5;
}

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

.rtg-step-content {
  flex: 1;
}

.rtg-hand-val {
  color: #1d4ed8;
  font-weight: 700;
  font-size: 16px;
}

/* Tableau de valeurs orange */
.rtg-mini-table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1.5px solid #f97316;
  border-radius: 8px;
  overflow: hidden;
  margin: 8px 0;
  background: #ffffff;
  text-align: center;
}

.rtg-mini-table th, 
.rtg-mini-table td {
  border-bottom: 1px solid #fed7aa;
  border-right: 1.5px solid #fed7aa;
  padding: 6px 16px;
  font-size: 15px;
}

.rtg-mini-table tr:last-child th,
.rtg-mini-table tr:last-child td {
  border-bottom: none;
}

.rtg-mini-table td:last-child {
  border-right: none;
}

.rtg-mini-table th {
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
  width: 45px;
}

.rtg-td-hand {
  font-size: 17px;
  color: #1d4ed8;
  font-weight: 700;
  min-width: 45px;
}

.rtg-conclusion-line {
  background: #f0fdf4;
  border-left: 3.5px solid #16a34a;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  color: #166534;
  margin-top: 4px;
}

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

.rtg-plot-svg {
  width: 280px;
  height: 250px;
}

/* Responsive */
@media (max-width: 768px) {
  .rtg-section {
    padding: 16px;
  }
  .rtg-case-layout {
    flex-direction: column;
    align-items: center;
  }
  .rtg-steps-col {
    width: 100%;
  }
}
