/* ==========================================================================
   Styles pour Résoudre un problème graphique - Facture d'eau (p2_l5_t6)
   Écoles Pionnières - 2AC Mathématiques
   (Fonds 100% blancs purs selon consigne)
   ========================================================================== */

.rpgw-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. Énoncé du problème en haut (Fond blanc avec bordure soignée) */
.rpgw-statement-card {
  background: #ffffff;
  border: 1.5px solid #fed7aa;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 18px -2px rgba(249, 115, 22, 0.06);
}

.rpgw-statement-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  align-items: center;
}

@media (max-width: 840px) {
  .rpgw-statement-grid {
    grid-template-columns: 1fr;
  }
}

.rpgw-statement-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f97316;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.rpgw-statement-text {
  font-size: 15.5px;
  color: #1e293b;
  line-height: 1.6;
  margin: 0 0 10px 0;
}

.rpgw-question-box {
  background: #ffffff;
  border: 1.5px solid #fdba74;
  border-radius: 10px;
  padding: 10px 14px;
  color: #c2410c;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Conteneur des 5 étapes */
.rpgw-steps-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rpgw-step-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.rpgw-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 14px 0;
}

.rpgw-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;
}

.rpgw-bullets-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  color: #334155;
  line-height: 1.5;
}

.rpgw-bullet-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.rpgw-dot {
  color: #f97316;
  font-weight: bold;
  font-size: 18px;
  line-height: 1;
}

/* Étape 2 : Layout avec graphe de zoom */
.rpgw-step2-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  align-items: center;
}

@media (max-width: 800px) {
  .rpgw-step2-grid {
    grid-template-columns: 1fr;
  }
}

/* Étape 3 : Calculs */
.rpgw-calc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
  color: #0284c7;
  font-size: 15.5px;
  font-weight: 700;
}

.rpgw-calc-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rpgw-calc-text {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 500;
  color: #334155;
  font-size: 15px;
}

.rpgw-fraction {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  line-height: 1;
  margin: 0 3px;
}

.rpgw-fraction .num {
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
}

.rpgw-fraction .den {
  padding-top: 2px;
}

/* Étape 4 & 5 : Vérification et Conclusion (Fond blanc) */
.rpgw-step-verify {
  background: #ffffff;
  border-left: 5px solid #3b82f6;
}

.rpgw-step-conclusion {
  background: #ffffff;
  border: 1.5px solid #86efac;
  border-left: 5px solid #22c55e;
}

.rpgw-conclusion-text {
  font-size: 16px;
  font-weight: 600;
  color: #166534;
  margin: 0;
}

/* Graphiques SVG */
.rpgw-svg-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  display: flex;
  justify-content: center;
}

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

.rpgw-svg-zoom {
  width: 100%;
  max-width: 270px;
  height: auto;
  display: block;
}

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

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

.rpgw-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;
}
