/* HERO DE LA FORMATION */
.formation-detail-hero {
  background: var(--couleur-fond);
  color: var(--couleur-texte);
  padding: 50px 40px;
  text-align: center;
}

.formation-detail-hero .breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 12px;
  opacity: 0.85;
}

.formation-detail-hero .breadcrumb a {
  color: var(--couleur-texte);
  text-decoration: none;
}

.formation-detail-hero .breadcrumb a:hover {
  text-decoration: underline;
}

.formation-detail-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.formation-detail-hero p {
  font-size: 1rem;
  color: var(--couleur-texte);
  max-width: 700px;
  margin: 0 auto;
}

/* CORPS DE LA PAGE */
.formation-detail-section {
  background: var(--couleur-fond);
  padding: 50px 40px 70px;
}

.formation-detail-container {
  max-width: 950px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.detail-block {
  background: var(--couleur-carte);
  border-radius: 12px;
  padding: 30px 35px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.detail-block h2 {
  color: var(--couleur-texte);
  font-size: 1.3rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-block h2 i {
  color: var(--couleur-texte);
}

.detail-block p {
  color: #444;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* PROGRAMME / CHAPITRES */
.chapters-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chapter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 18px;
  background: #fafbfc;
  border: 1px solid #e2e8ec;
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.chapter-item:hover {
  border-color: var(--couleur-texte);
  background: #f2f9fa;
}

.chapter-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.chapter-number {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: var(--couleur-bouton);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.chapter-title {
  color: var(--couleur-texte);
  font-size: 0.95rem;
  font-weight: 500;
}

.chapter-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.chapter-duration {
  color: var(--couleur-texte);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.chapter-right i.fa-lock {
  color: #999;
  font-size: 0.85rem;
}

.chapters-total {
  margin-top: 18px;
  text-align: right;
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
}

/* DEBOUCHES */
.debouches-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.debouches-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #444;
  font-size: 0.95rem;
}

.debouches-list li i {
  color: var(--couleur-texte);
}

/* CTA INSCRIPTION */
.detail-cta {
  text-align: center;
  padding: 10px 0 5px;
}

.detail-cta .btn {
  display: inline-block;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .formation-detail-hero,
  .formation-detail-section {
    padding: 35px 20px 45px;
  }

  .detail-block {
    padding: 22px 20px;
  }

  .chapter-item {
    flex-wrap: wrap;
  }
}

/* MESSAGES (succès/erreur inscription) */
.admin-message {
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.admin-message-succes {
  background: #e3f7ec;
  color: #248f59;
  border: 1px solid #b7e8cc;
}

.admin-message-erreur {
  background: #fdecec;
  color: #c0392b;
  border: 1px solid #f5c2c0;
}

/* BOUTON SECONDAIRE (voir mon espace) */
.btn-outline-dark {
  display: inline-block;
  padding: 11px 26px;
  border-radius: 30px;
  border: 2px solid var(--couleur-bouton);
  color: var(--couleur-texte);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.btn-outline-dark:hover {
  background: var(--couleur-bouton);
  color: #fff;
}

/* =========================================================
   SUIVI DE PROGRESSION (chapitres terminés)
   ========================================================= */
.progression-barre-conteneur {
  margin-bottom: 20px;
}

.progression-barre-fond {
  background: #eef3f7;
  border-radius: 20px;
  height: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progression-barre-remplissage {
  background: linear-gradient(90deg, var(--couleur-texte), var(--couleur-bouton));
  height: 100%;
  border-radius: 20px;
  transition: width 0.3s ease;
}

.progression-texte {
  font-size: 0.82rem;
  color: #666;
  font-weight: 600;
}

.chapter-item-checkable {
  cursor: pointer;
}

.chapter-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--couleur-texte);
  cursor: pointer;
  flex-shrink: 0;
}

.chapter-item-checkable:has(.chapter-checkbox:checked) {
  background: #f2f9fa;
  border-color: var(--couleur-texte);
}

.chapter-item-checkable:has(.chapter-checkbox:checked) .chapter-title {
  color: var(--couleur-texte);
  text-decoration: line-through;
  text-decoration-color: #b7d9de;
}

/* =========================================================
   FENÊTRE MODALE - Paiement Mobile Money (CamPay)
   ========================================================= */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 59, 79, 0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.actif {
  display: flex;
}

.modal-box {
  background: var(--couleur-carte);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  padding: 35px 32px;
  position: relative;
  animation: modalApparait 0.2s ease;
}

@keyframes modalApparait {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #999;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--couleur-texte);
}

.modal-header {
  text-align: center;
  margin-bottom: 25px;
}

.modal-header .icon-circle-lg {
  width: 60px;
  height: 60px;
  background: var(--couleur-bouton);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  margin: 0 auto 12px;
  box-shadow: 0 3px 8px var(--couleur-ombre-bouton);
}

.modal-header h2 {
  font-size: 1.3rem;
  color: var(--couleur-texte);
  margin-bottom: 6px;
}

.modal-header p {
  font-size: 0.9rem;
  color: #666;
}

.modal-header p strong {
  color: var(--couleur-texte);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-form .form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--couleur-texte);
}

.modal-form .input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #dbe3e8;
  border-radius: 10px;
  padding: 0 14px;
  background: #fafbfc;
  transition: border-color 0.2s;
}

.modal-form .input-wrapper:focus-within {
  border-color: var(--couleur-texte);
}

.modal-form .input-wrapper i {
  color: var(--couleur-texte);
  font-size: 0.9rem;
  margin-right: 10px;
}

.modal-form .input-wrapper input {
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 0;
  width: 100%;
  font-size: 0.95rem;
  color: #1e2a33;
  font-family: inherit;
}

.modal-form .btn-full {
  width: 100%;
  text-align: center;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 13px;
  margin-top: 5px;
}

@media (max-width: 500px) {
  .modal-box {
    padding: 28px 22px;
  }
}

.modal-message {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 18px;
  text-align: center;
}

.modal-message-succes {
  background: #e3f7ec;
  color: #248f59;
  border: 1px solid #b7e8cc;
}

.modal-message-erreur {
  background: #fdecec;
  color: #c0392b;
  border: 1px solid #f5c2c0;
}
