/* ==========================================================================
   Styles pour Déterminer graphiquement la solution d’un système (p2_l5_t5)
   Écoles Pionnières - 2AC Mathématiques
   (Fonds 100% blancs purs selon consigne)
   ========================================================================== */

.rsgs-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. Règle / Notion clé (Fond blanc avec bordure soignée) */
.rsgs-rule-card {
  background: #ffffff;
  border: 1.5px solid #99f6e4;
  border-left: 5px solid #0d9488;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.rsgs-rule-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0d9488;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rsgs-rule-text {
  font-size: 15.5px;
  font-weight: 600;
  color: #115e59;
  line-height: 1.5;
  margin: 0;
}

/* 2. Cadre "J'étudie l'exemple" (Fond blanc) */
.rsgs-study-card {
  border: 1.5px solid #fed7aa;
  border-radius: 18px;
  padding: 22px 24px;
  background: #ffffff;
  box-shadow: 0 4px 18px -2px rgba(249, 115, 22, 0.06);
}

.rsgs-study-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f97316;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.25);
  margin-bottom: 16px;
}

/* Introduction au système (Fond blanc) */
.rsgs-intro-system {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 12px 0 20px 0;
}

.rsgs-brace-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1.5px solid #fed7aa;
  padding: 6px 14px;
  border-radius: 10px;
}

.rsgs-curly-brace {
  font-size: 32px;
  line-height: 1;
  font-weight: 300;
  color: #ea580c;
  user-select: none;
}

.rsgs-system-equations {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
}

/* Grille principale : Étapes à gauche, Graphique à droite */
.rsgs-main-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .rsgs-main-grid {
    grid-template-columns: 1fr;
  }
}

/* Colonne des étapes */
.rsgs-steps-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rsgs-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.rsgs-step-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f97316;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.rsgs-step-body {
  flex: 1;
}

.rsgs-step-label {
  font-size: 15.5px;
  color: #334155;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 8px;
}

/* Math pill / handwritten styling */
.font-hand {
  font-family: 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
}

.rsgs-eq-green {
  color: #16a34a;
  font-family: 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
  font-weight: 700;
  font-size: 16px;
}

.rsgs-eq-red {
  color: #ea580c;
  font-family: 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
  font-weight: 700;
  font-size: 16px;
}

.rsgs-eq-blue {
  color: #0284c7;
  font-family: 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
  font-weight: 700;
  font-size: 16px;
}

/* Encadré de vérification étape 3 (Fond blanc) */
.rsgs-verify-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid #bbf7d0;
  padding: 8px 16px;
  border-radius: 10px;
  margin-top: 6px;
}

.rsgs-verify-brace {
  font-size: 34px;
  line-height: 1;
  font-weight: 300;
  color: #0284c7;
  user-select: none;
}

.rsgs-verify-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  color: #0284c7;
}

/* Colonne Graphique */
.rsgs-graph-wrapper {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rsgs-svg {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
}

.rsgs-graph-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  font-size: 12.5px;
}

.rsgs-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.rsgs-legend-bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Section explicative en arabe (Fond blanc) */
.rsgs-arabic-card {
  margin-top: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
}

.rsgs-arabic-summary {
  cursor: pointer;
  font-weight: 700;
  color: #0f766e;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rsgs-arabic-content {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  line-height: 1.8;
  color: #334155;
  font-size: 14.5px;
  direction: rtl;
  text-align: right;
  background: #ffffff;
}
