/* =========================================================
   STYLE SPÉCIFIQUE - SÉANCE 4 : Structures itératives (Boucles)
   Visualisation des boucles Pour, Tant que et Répéter...Jusqu'à
   Conforme aux Conventions Officielles 2024-2025
   ========================================================= */

/* CONTENEUR DE DÉCOMPOSITION ITÉRATIVE */
.loop-visualizer-container {
  background: #0f172a;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid #334155;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.loop-header-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* GRILLE DES DIVISEURS (BOUCLE POUR) */
.divisors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 160px;
  overflow-y: auto;
  padding: 0.5rem;
  background: #1e293b;
  border-radius: var(--radius-sm);
  border: 1px solid #334155;
}

.divisor-chip {
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-family: monospace;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.divisor-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.3);
}

/* CHAÎNE DE DIVISIONS PAR 2 (BOUCLE TANT QUE) */
.division-chain-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.75rem;
  background: #1e293b;
  border-radius: var(--radius-sm);
  border: 1px solid #334155;
}

.chain-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #0f172a;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-family: monospace;
}

.chain-val {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.chain-label {
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
}

.chain-arrow {
  color: #f59e0b;
  font-size: 0.9rem;
}

/* CARTE DU STATUT NOMBRE PARFAIT */
.perfect-status-box {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 2px solid #334155;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.perfect-status-box.is-perfect {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.25));
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.perfect-status-box.not-perfect {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.1), rgba(71, 85, 105, 0.15));
  border-color: #64748b;
}

.perfect-badge-icon {
  font-size: 2rem;
  display: inline-block;
  margin-bottom: 0.25rem;
}
