/* ===============================
   MODALE SCHÉMA CE1
================================ */

.schema-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.schema-modal.open {
  display: flex;
}
.bar.hidden {
  background: #ccc;
  color: transparent;
}
.bar.hidden {
  background-color: #5fcfa0; /* vert résultat */
  color: #ffffff;           /* texte visible */
  font-size: 24px;
  font-weight: bold;
}


/* Contenu modale */
.schema-content {
  background: #ffffff;
  width: 90%;
  max-width: 420px;
  padding: 22px 24px;
  border-radius: 16px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* Bouton fermeture */
.close-schema {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
}

/* Titre */
.schema-content h3 {
  margin-top: 0;
  font-size: 22px;
}

/* Texte pédagogique */
#schemaText {
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: 500;
}

/* ===============================
   SCHÉMA VISUEL
================================ */

.schema-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}

.bar {
  min-width: 54px;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 18px;
  color: #ffffff;
  text-align: center;
}

/* ===============================
   COULEURS PAR TYPE
================================ */

/* Quantité de départ / parties */
.bar.total {
  background-color: #4da3ff; /* bleu = quantité */
}

/* Diminution */
.bar.remove {
  background-color: #ff6b6b; /* rouge = on enlève */
}

/* Augmentation */
.bar.add {
  background-color: #7bd389; /* vert = on ajoute */
}

/* Résultat final */
.bar.result {
  background-color: #5fcfa0; /* vert foncé = résultat */
}

/* ===============================
   BOUTON SCHÉMA
================================ */
.problem-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.btn-schema {
  background-color: #7bd389;
  border: none;
  padding: 10px 18px;
  font-size: 16px;
  border-radius: 10px;
  cursor: pointer;
  color: #1f3b2d;
  font-weight: 600;
}

.lecture{height:30px;}
.btn-schema:hover {
  opacity: 0.9;
}