/* Styles pour le pattern en arbre (p1_l2_t9) */
.rpt-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

/* Énoncé & Cadre initial */
.rpt-problem-box {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 16px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 22px;
}

.rpt-box-title {
  margin: 0 0 10px;
  font-size: 16.5px;
  font-weight: 700;
  color: #92400e;
}

.rpt-problem-text p {
  margin: 6px 0;
  font-size: 15px;
  color: #1e293b;
}

.rpt-highlight-q {
  font-weight: 700;
  color: #b45309;
  margin-top: 12px !important;
}

.rpt-diagram-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.rpt-tree-svg {
  width: 100%;
  max-width: 340px;
  height: auto;
  display: block;
}

/* Étapes d'analyse */
.rpt-step-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 18px;
}

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

.rpt-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #ea580c;
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.rpt-step-body {
  font-size: 15.5px;
  color: #334155;
}

.rpt-hand-ans {
  color: #0284c7;
  font-size: 18px;
}

/* Étape 2 : Dessin étendu et compteurs */
.rpt-extended-flex {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
}

.rpt-diagram-large {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px;
}

.rpt-tree-large-svg {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: auto;
}

.rpt-lines-count-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rpt-line-count-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

.rpt-badge-line {
  background: #e2e8f0;
  color: #334155;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 6px;
  min-width: 72px;
  text-align: center;
}

.rpt-dots {
  color: #94a3b8;
  letter-spacing: 2px;
  flex: 1;
}

/* Étape 3 & 4 : Tableaux */
.rpt-table-container {
  overflow-x: auto;
}

.rpt-pattern-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1.5px solid #f97316;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
}

.rpt-pattern-table th {
  background: #ffedd5;
  color: #9a3412;
  font-weight: 700;
  padding: 10px 14px;
  border: 1px solid #fdba74;
  font-size: 15px;
}

.rpt-pattern-table td {
  padding: 12px 14px;
  border: 1px solid #fdba74;
  font-size: 16px;
  color: #1e293b;
}

.rpt-mult-indicators {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  margin-top: 10px;
  padding-right: 25px;
}

.rpt-mult-bubble {
  background: #ffffff;
  border: 1.5px solid #94a3b8;
  border-radius: 999px;
  padding: 4px 14px;
  font-family: 'Segoe Print', cursive, sans-serif;
  color: #0284c7;
  font-size: 13px;
  font-weight: bold;
}

/* Étape 4 : Puissances */
.rpt-powers-table {
  border-color: #f59e0b;
}

.rpt-powers-table th {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.rpt-powers-table td {
  border-color: #fde68a;
  font-size: 17px;
}

.rpt-c-red { color: #dc2626; font-weight: bold; }
.rpt-c-blue { color: #0284c7; font-weight: bold; }

.rpt-powers-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 14px;
  color: #0369a1;
}

/* Étape 5 : Formule finale */
.rpt-final-formula-card {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.rpt-final-pill-box {
  font-size: 17px;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.rpt-formula-badge {
  background: #ffffff;
  border: 1.5px solid #38bdf8;
  border-radius: 10px;
  padding: 4px 16px;
  font-size: 24px;
  color: #0284c7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.font-hand {
  font-family: 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
}

@media (min-width: 768px) {
  .rpt-problem-box {
    grid-template-columns: 1fr 340px;
  }
  .rpt-extended-flex {
    grid-template-columns: 1fr 240px;
  }
}
