/* ============================================================
   CYBER DOOR — formation.css
   Styles du parcours interactif de la formation payante
   (acces-formation.html). Complète style.css.
   ============================================================ */

/* ---------- Tableau de bord ---------- */
.prog-globale {
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 20px;
  margin-bottom: 22px;
}
.prog-entete {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--police-titre);
}
.prog-entete strong { color: var(--encre); font-size: 1.05rem; }
#prog-texte { color: var(--sarcelle-fonce); font-weight: 700; font-size: 0.95rem; }
.barre-prog {
  height: 14px;
  border-radius: 999px;
  background: #e4ecea;
  overflow: hidden;
}
.barre-prog-remplissage {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sarcelle), #1d9a63);
  transition: width 0.6s ease;
}

.cartes-modules { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 18px; }
@media (min-width: 700px) { .cartes-modules { grid-template-columns: 1fr 1fr; } }

.carte-module {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 16px 18px;
  cursor: pointer;
  font-family: var(--police-texte);
  font-size: 1rem;
  color: var(--texte);
  transition: transform 0.15s, border-color 0.2s;
}
.carte-module:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--sarcelle); }
.carte-module:disabled { cursor: not-allowed; opacity: 0.55; }

.cm-picto {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: var(--sarcelle-pale);
  border-radius: 10px;
}
.carte-module.fait .cm-picto { background: #e2f4e9; }
.cm-infos { flex: 1; min-width: 0; }
.cm-titre {
  display: block;
  font-family: var(--police-titre);
  font-weight: 700;
  color: var(--encre);
  line-height: 1.25;
}
.cm-duree { display: block; font-size: 0.82rem; color: var(--texte-doux); margin-top: 2px; }
.cm-statut {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sarcelle-fonce);
}
.carte-module.fait .cm-statut { color: var(--vert); }
.carte-module.verrou .cm-statut { color: var(--texte-doux); font-weight: 600; }

/* ---------- Lecteur de module ---------- */
#lecteur {
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 22px;
}
@media (min-width: 700px) { #lecteur { padding: 30px; } }

.lecteur-entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 6px;
}
#btn-retour {
  background: none;
  border: none;
  color: var(--bleu);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 4px 0;
}
#btn-retour:hover { color: var(--sarcelle); text-decoration: underline; }
#etape-indic { margin-left: auto; font-size: 0.85rem; color: var(--texte-doux); font-weight: 600; }
#lecteur-titre {
  display: block;
  width: 100%;
  font-family: var(--police-titre);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--encre);
}

.points { display: flex; gap: 8px; margin: 12px 0 20px; }
.point {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dbe6e2;
  transition: background 0.3s, transform 0.3s;
}
.point.passe { background: var(--sarcelle); }
.point.actif { background: var(--sarcelle); transform: scale(1.35); }

.etape { display: none; animation: apparait 0.35s ease; }
.etape.active { display: block; }
@keyframes apparait {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.etape h2 { font-size: 1.25rem; margin-top: 0; }
.etape h3 { margin-top: 1.3em; }
.etape ul { padding-left: 20px; }
.etape li { margin-bottom: 7px; }

.lecteur-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--ligne);
}
.lecteur-nav .bouton:disabled { opacity: 0.45; cursor: not-allowed; }

/* Encadré "règle d'or" / à retenir */
.regle-or {
  background: var(--sarcelle-pale);
  border-left: 4px solid var(--sarcelle);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 16px 0;
}
.regle-or strong { color: var(--sarcelle-fonce); }

/* ---------- Visuels pédagogiques ---------- */
/* Trio de cartes (les 3 leviers) */
.visuel-trio { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 18px 0; }
@media (min-width: 640px) { .visuel-trio { grid-template-columns: repeat(3, 1fr); } }
.trio-carte {
  background: var(--fond);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.trio-carte .emoji { font-size: 2rem; display: block; margin-bottom: 6px; }
.trio-carte strong { display: block; color: var(--encre); font-family: var(--police-titre); }
.trio-carte span { font-size: 0.88rem; color: var(--texte-doux); }

/* Frise numérotée (anatomie d'une arnaque, chrono d'urgence) */
.frise { list-style: none; counter-reset: fr; padding: 0; margin: 18px 0; }
.frise li {
  counter-increment: fr;
  position: relative;
  padding: 0 0 18px 46px;
}
.frise li::before {
  content: counter(fr);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--encre);
  color: #fff;
  border-radius: 50%;
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 0.9rem;
}
.frise li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 32px;
  bottom: 2px;
  width: 2px;
  background: var(--ligne);
}
.frise li strong { color: var(--encre); }

/* Écran d'appel entrant */
.mockup-tel {
  max-width: 260px;
  margin: 18px auto;
  background: var(--encre);
  border-radius: 24px;
  padding: 26px 20px 22px;
  text-align: center;
  color: #fff;
  box-shadow: var(--ombre);
}
.tel-libelle { color: #9fb4ae; font-size: 0.82rem; margin: 0 0 4px; }
.tel-nom { font-family: var(--police-titre); font-weight: 800; font-size: 1.3rem; margin: 0; color: #fff; }
.tel-num { color: #cfdcd8; font-size: 0.95rem; margin: 2px 0 18px; font-family: var(--police-mono); }
.tel-boutons { display: flex; justify-content: space-around; }
.tel-btn {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 700;
}
.tel-btn.refuse { background: var(--rouge); }
.tel-btn.accepte { background: var(--vert); }
.visuel-legende {
  text-align: center;
  font-size: 0.88rem;
  color: var(--texte-doux);
  max-width: 420px;
  margin: 10px auto 0;
}

/* SMS frauduleux reconstitué */
.mockup-sms {
  max-width: 420px;
  margin: 16px 0;
  background: var(--fond);
  border: 1px solid var(--ligne);
  border-radius: 14px;
  padding: 14px 16px;
}
.sms-expediteur { font-size: 0.85rem; color: var(--texte-doux); margin: 0 0 8px; }
.sms-bulle {
  background: #e7edf3;
  border-radius: 4px 16px 16px 16px;
  padding: 12px 14px;
  line-height: 1.6;
  color: #26343c;
}

/* Éléments cliquables des exercices "chasse aux pièges" */
.clic {
  background: none;
  border: none;
  padding: 6px 3px;
  margin: -6px -3px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-bottom: 2px dotted var(--bleu);
}
.clic:hover { background: #dce8f2; }
.clic.piege.trouve {
  background: #fbeae6;
  border-bottom-color: var(--rouge);
  color: var(--rouge);
  font-weight: 700;
}
.clic.piege.trouve::after { content: " ⚠"; }
.clic.leurre.normal { border-bottom-color: var(--vert); }
.chasse-compteur-ligne { font-weight: 700; color: var(--encre); }
.chasse-compteur { color: var(--sarcelle-fonce); font-family: var(--police-mono); }
.chasse-message {
  background: #fff7e6;
  border: 1px solid var(--orange);
  color: #8a5a10;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 600;
}
.chasse-indices { list-style: none; padding: 0; margin: 14px 0 0; }
.chasse-indices li {
  background: #fbeae6;
  border-left: 3px solid var(--rouge);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 0.92rem;
  animation: apparait 0.3s ease;
}

/* Mockup appli bancaire (réglages conseillés) */
.mockup-appli {
  max-width: 360px;
  margin: 16px 0;
  background: var(--fond);
  border: 1px solid var(--ligne);
  border-radius: 14px;
  padding: 8px 0;
}
.appli-ligne {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  font-size: 0.95rem;
}
.appli-ligne + .appli-ligne { border-top: 1px solid var(--ligne); }
.interrupteur {
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #cdd8d4;
  position: relative;
}
.interrupteur::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s;
}
.interrupteur.on { background: var(--vert); }
.interrupteur.on::after { left: 21px; }

/* ---------- Quiz ---------- */
.quiz-q {
  background: var(--fond);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}
.quiz-enonce { font-weight: 600; color: var(--encre); }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opt {
  text-align: left;
  background: var(--carte);
  border: 2px solid var(--ligne);
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  color: var(--texte);
  cursor: pointer;
  transition: border-color 0.15s;
}
.quiz-opt:hover:not(:disabled) { border-color: var(--sarcelle); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.bonne { border-color: var(--vert); background: #e2f4e9; font-weight: 600; }
.quiz-opt.bonne::before { content: "✓ "; color: var(--vert); font-weight: 800; }
.quiz-opt.mauvaise { border-color: var(--rouge); background: #fbeae6; }
.quiz-opt.mauvaise::before { content: "✕ "; color: var(--rouge); font-weight: 800; }
.quiz-exp {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--texte-doux);
  border-top: 1px dashed var(--ligne);
  padding-top: 10px;
  animation: apparait 0.3s ease;
}

/* ---------- Remise en ordre ---------- */
.ordre-liste { display: grid; gap: 8px; margin: 14px 0; }
.ordre-item {
  position: relative;
  text-align: left;
  background: var(--carte);
  border: 2px solid var(--ligne);
  border-radius: 8px;
  padding: 12px 14px 12px 48px;
  font: inherit;
  color: var(--texte);
  cursor: pointer;
  transition: border-color 0.15s;
}
.ordre-item:hover:not(.place) { border-color: var(--sarcelle); }
.ordre-item::before {
  content: "?";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #e4ecea;
  color: var(--texte-doux);
  border-radius: 50%;
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 0.9rem;
}
.ordre-item.place { border-color: var(--vert); background: #e2f4e9; cursor: default; }
.ordre-item.place::before { content: attr(data-num); background: var(--vert); color: #fff; }
.ordre-item.secoue { animation: secousse 0.4s; border-color: var(--rouge); }
@keyframes secousse {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.ordre-message {
  background: #fff7e6;
  border: 1px solid var(--orange);
  color: #8a5a10;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 600;
}

/* ---------- Fin d'exercice & fin de parcours ---------- */
.exo-bravo {
  background: #e2f4e9;
  border: 1px solid var(--vert);
  color: #14603d;
  border-radius: 10px;
  padding: 14px 16px;
  font-weight: 600;
  margin-top: 16px;
  animation: apparait 0.4s ease;
}

#panneau-final {
  background: linear-gradient(150deg, var(--encre), #1b4a44);
  color: #fff;
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 30px;
  margin-top: 24px;
  text-align: center;
}
#panneau-final h2 { color: #fff; }
#panneau-final p { color: #d3e2de; max-width: 520px; margin-left: auto; margin-right: auto; }

/* ---------- Fiche réflexe ---------- */
#fiche-reflexe {
  background: var(--carte);
  border: 2px solid var(--rouge);
  border-radius: var(--rayon);
  padding: 24px;
  margin-top: 24px;
}
#fiche-reflexe h2 { color: var(--rouge); }
.fiche-grille { display: grid; gap: 10px; margin: 14px 0; }
.fiche-ligne {
  display: flex;
  gap: 12px;
  align-items: baseline;
  border-bottom: 1px dashed var(--ligne);
  padding-bottom: 10px;
}
.fiche-ligne strong { color: var(--encre); min-width: 0; }
.fiche-num { font-family: var(--police-mono); font-weight: 700; color: var(--rouge); white-space: nowrap; }
.fiche-regles { background: var(--sarcelle-pale); border-radius: 8px; padding: 12px 16px; }
.fiche-regles li { margin-bottom: 6px; }

/* Impression : seule la fiche réflexe sort sur papier */
@media print {
  body * { visibility: hidden; }
  #fiche-reflexe, #fiche-reflexe * { visibility: visible; }
  #fiche-reflexe {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border: 2px solid #000;
    box-shadow: none;
  }
  #btn-imprimer-fiche { display: none; }
}
