/* ==========================================================================
   Styles pour Propriétés de l'addition (1AC - p1_l2_t3)
   Commutativité, Associativité & Astuces de calcul
   Écoles Pionnières - AlloNajah
   (Fonds 100% blancs purs selon consigne de l'utilisateur)
   ========================================================================== */

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

.rap-cards-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Carte principale de chaque propriété */
.rap-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-left: 5px solid #0284c7;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.rap-card.theme-comm {
  border-left-color: #10b981;
}

.rap-card.theme-assoc {
  border-left-color: #ec4899;
}

.rap-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rap-card.theme-comm .rap-card-title {
  color: #047857;
}

.rap-card.theme-assoc .rap-card-title {
  color: #be185d;
}

/* Rangée horizontale pour la commutativité */
.rap-flow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.rap-flow-arrow {
  font-size: 24px;
  font-weight: bold;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bloc d'exemples de calcul avec accolades inférieures */
.rap-calc-box {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.rap-underbrace-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.rap-under-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rap-under-brace {
  font-size: 18px;
  line-height: 0.8;
  color: #0284c7;
  transform: scaleX(1.8);
}

.rap-under-val {
  font-family: 'Segoe Print', cursive, sans-serif;
  font-size: 15px;
  font-weight: bold;
  color: #0369a1;
  margin-top: 2px;
}

/* Boîte de texte de règle (Commutativité / Associativité) */
.rap-rule-badge-box {
  background: #ffffff;
  border: 1.5px solid #a7f3d0;
  border-radius: 14px;
  padding: 14px 18px;
  max-width: 380px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.rap-card.theme-assoc .rap-rule-badge-box {
  border-color: #fbcfe8;
}

.rap-badge-header {
  font-weight: 700;
  font-size: 14.5px;
  color: #047857;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rap-card.theme-assoc .rap-badge-header {
  color: #be185d;
}

.rap-badge-text {
  font-size: 14.5px;
  color: #1e293b;
  line-height: 1.5;
  margin: 0;
}

/* Boîte de formule géométrique */
.rap-geom-box {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

/* Formes géométriques SVG inline */
.rap-shape {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

/* Bloc Associativité */
.rap-assoc-calc-box {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 15.5px;
  font-weight: 600;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.rap-assoc-bracket {
  color: #be185d;
  font-weight: 700;
}

/* ========================================================
   Section "J'étudie l'exemple"
   ======================================================== */
.rap-examples-card {
  background: #ffffff;
  border: 1.5px solid #fed7aa;
  border-left: 5px solid #f97316;
  border-radius: 16px;
  padding: 22px;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.rap-examples-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.rap-examples-pill {
  background: #ffffff;
  border: 1.5px solid #f97316;
  color: #ea580c;
  font-size: 16px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rap-ex-block {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.rap-ex-block:last-child {
  margin-bottom: 0;
}

.rap-ex-block-title {
  font-weight: 700;
  font-size: 15.5px;
  color: #c2410c;
  margin-bottom: 12px;
}

.rap-opposite-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.rap-calc-steps {
  font-family: 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #0284c7;
  line-height: 1.8;
}

.rap-bubble-opposite {
  background: #ffffff;
  border: 1.5px solid #7dd3fc;
  border-radius: 999px;
  padding: 8px 18px;
  color: #0284c7;
  font-family: 'Segoe Print', cursive, sans-serif;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.rap-sub-examples-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 12px;
}

@media (max-width: 720px) {
  .rap-sub-examples-grid {
    grid-template-columns: 1fr;
  }
}

.rap-sub-ex-item {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Accordéon Arabe */
.rap-arabic-card {
  margin-top: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
}

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

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