/* ═══════════════════════════════════════════════════════════
   REGAFRIK FORMATION — Styles LawPilot
   Fichier extrait du template de référence LAWPILOT_COMPLET.html
═══════════════════════════════════════════════════════════ */

/* ════ BOUTON FORMATION — NAVBAR UNIQUEMENT ════ */
.btn-formation {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #C9A84C, #e0c068);
  color: #0D1B3E;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 14px rgba(201,168,76,0.4);
  transition: all 0.25s ease;
  position: relative;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-formation:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(201,168,76,0.55);
  color: #0D1B3E;
  text-decoration: none;
}
.btn-formation .badge-new {
  position: absolute;
  top: -7px; right: -7px;
  background: #c0392b;
  color: #fff;
  font-size: 0.5rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 10px;
  letter-spacing: 0.05em;
}

/* ════ PAGE FORMATION (body specifique) ════ */
body.formation-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f4f8;
}

/* ════ APP CONTAINER ════ */
.fm-app {
  max-width: 780px;
  margin: 0 auto;
  padding: 1.8rem 1.2rem 6rem;
}

/* ════ TOPBAR PROGRESS ════ */
.fm-topbar {
  background: #fff;
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 16px rgba(13,27,62,0.07);
  border: 1px solid rgba(74,44,143,0.1);
}
.fm-module-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #4A2C8F;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.fm-progress-track {
  flex: 1;
  height: 6px;
  background: rgba(74,44,143,0.1);
  border-radius: 99px;
  overflow: hidden;
}
.fm-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4A2C8F, #C9A84C);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
  width: 0%;
}
.fm-nav-dots { display: flex; gap: 5px; align-items: center; }
.fm-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(74,44,143,0.15);
  transition: all 0.3s ease;
  cursor: pointer;
}
.fm-dot.done   { background: #1a6b3a; }
.fm-dot.active { background: #4A2C8F; transform: scale(1.35); }
.fm-pct { font-size: 0.72rem; font-weight: 800; color: #4A2C8F; white-space: nowrap; }

/* ════ SLIDES — Animations LawPilot ════ */
.fm-slide { display: none; }
.fm-slide.active {
  display: block;
  animation: slideEnter 0.42s cubic-bezier(0.4,0,0.2,1);
}
@keyframes slideEnter {
  from { opacity: 0; transform: translateX(36px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideExit {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-24px); }
}
.fm-slide.exiting {
  display: block;
  animation: slideExit 0.22s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-1 { animation: fadeUp 0.4s ease 0.08s both; }
.anim-2 { animation: fadeUp 0.4s ease 0.22s both; }
.anim-3 { animation: fadeUp 0.4s ease 0.36s both; }
.anim-4 { animation: fadeUp 0.4s ease 0.50s both; }
.anim-5 { animation: fadeUp 0.4s ease 0.64s both; }

/* ════ NARRATEUR ════ */
.fm-narrator {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 1.8rem;
  animation: fadeUp 0.5s ease 0s both;
}
.fm-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0D1B3E, #4A2C8F);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 14px rgba(74,44,143,0.3);
  animation: breathe 3s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.04); }
}
.fm-bubble {
  flex: 1;
  background: #fff;
  border-radius: 0 16px 16px 16px;
  padding: 14px 18px;
  border: 1px solid rgba(74,44,143,0.12);
  box-shadow: 0 2px 12px rgba(13,27,62,0.06);
  position: relative;
}
.fm-bubble::before {
  content: '';
  position: absolute;
  left: -9px; top: 16px;
  width: 0; height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-right: 9px solid rgba(74,44,143,0.12);
}
.fm-bubble::after {
  content: '';
  position: absolute;
  left: -7px; top: 17px;
  width: 0; height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #fff;
}
.fm-speaker-name {
  font-size: 0.65rem;
  font-weight: 800;
  color: #4A2C8F;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
}
.fm-speech { font-size: 0.9rem; color: #333; line-height: 1.72; }
.fm-typing-cursor::after {
  content: '|';
  color: #4A2C8F;
  animation: blink 0.65s infinite;
  font-weight: 300;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ════ ÉLÉMENTS DE SLIDE ════ */
.fm-tag {
  display: inline-block;
  font-size: 0.63rem;
  font-weight: 800;
  color: #C9A84C;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.25);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.fm-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #0D1B3E;
  line-height: 1.25;
  margin-bottom: 1.4rem;
}

/* ════ CARTES CLIQUABLES ════ */
.fm-cards { display: flex; flex-direction: column; gap: 8px; }
.fm-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(74,44,143,0.12);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 1px 6px rgba(13,27,62,0.04);
}
.fm-card:hover {
  border-color: rgba(74,44,143,0.35);
  transform: translateX(5px);
  box-shadow: 0 4px 18px rgba(74,44,143,0.1);
}
.fm-card.open { border-color: #4A2C8F; background: rgba(74,44,143,0.03); }
.fm-card-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: transform 0.25s;
}
.fm-card.open .fm-card-icon { transform: scale(1.1) rotate(-5deg); }
.fm-card-title { font-size: 0.92rem; font-weight: 700; color: #0D1B3E; }
.fm-card-sub   { font-size: 0.76rem; color: #888; margin-top: 2px; }
.fm-card-body  {
  font-size: 0.82rem; color: #555; line-height: 1.68;
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, margin-top 0.3s;
}
.fm-card.open .fm-card-body { max-height: 260px; margin-top: 12px; }
.fm-card-arrow {
  color: #ccc; font-size: 1rem; margin-left: auto;
  flex-shrink: 0; transition: transform 0.25s, color 0.2s; margin-top: 3px;
}
.fm-card.open .fm-card-arrow { transform: rotate(90deg); color: #4A2C8F; }

/* ════ FORMULE ════ */
.fm-formula {
  background: #0D1B3E; color: #C9A84C;
  font-family: 'Courier New', monospace;
  font-size: 1.05rem; font-weight: 800;
  padding: 18px 24px; border-radius: 14px;
  text-align: center; margin: 1.2rem 0; letter-spacing: 0.03em;
}
.fm-formula-note {
  font-size: 0.76rem; color: rgba(255,255,255,0.45);
  margin-top: 7px; font-weight: 400; font-family: inherit;
}

/* ════ TABLEAU ════ */
.fm-table {
  width: 100%; border-collapse: collapse; font-size: 0.8rem;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 14px rgba(13,27,62,0.07); margin: 1rem 0;
}
.fm-table th {
  background: #0D1B3E; color: #fff;
  padding: 11px 14px; text-align: left;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
}
.fm-table th.accent { background: #4A2C8F; }
.fm-table td { padding: 10px 14px; border-bottom: 1px solid rgba(74,44,143,0.06); color: #444; background: #fff; }
.fm-table tr:last-child td { border-bottom: none; }
.fm-table tr:hover td { background: #fafafa; }
.fm-table .hl   { font-weight: 800; color: #4A2C8F; }
.fm-table .gold { font-weight: 800; color: #C9A84C; }
.fm-table .bold { font-weight: 700; color: #0D1B3E; }

/* ════ BLOC UEMOA ════ */
.fm-uemoa {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(201,168,76,0.06); border-radius: 12px;
  border: 1px solid rgba(201,168,76,0.25);
  padding: 14px 16px; margin: 1.2rem 0;
  animation: fadeUp 0.4s ease 0.3s both;
}
.fm-uemoa-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.fm-uemoa-text { font-size: 0.82rem; color: #555; line-height: 1.65; }
.fm-uemoa-text strong { color: #0D1B3E; }

/* ════ GLISSER-DÉPOSER ════ */
.drag-source {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 14px;
  background: rgba(74,44,143,0.03);
  border: 2px dashed rgba(74,44,143,0.2); border-radius: 12px;
  min-height: 54px; margin-bottom: 10px;
  transition: border-color 0.2s, background 0.2s;
}
.drag-zone {
  flex: 1; min-height: 68px; padding: 12px;
  background: rgba(74,44,143,0.02);
  border: 2px dashed rgba(74,44,143,0.2); border-radius: 12px;
  transition: all 0.2s; display: flex; flex-wrap: wrap;
  gap: 7px; align-content: flex-start;
}
.drag-zone.over   { border-color: #4A2C8F; background: rgba(74,44,143,0.07); }
.drag-zone.green  { border-color: rgba(26,107,58,0.4); }
.drag-zone.purple { border-color: rgba(74,44,143,0.4); }
.drag-chip {
  padding: 7px 14px; background: #fff;
  border: 1px solid rgba(74,44,143,0.2); border-radius: 20px;
  font-size: 0.78rem; font-weight: 700; color: #0D1B3E;
  cursor: grab; transition: all 0.2s; user-select: none; white-space: nowrap;
}
.drag-chip:hover { border-color: #4A2C8F; transform: translateY(-2px); box-shadow: 0 3px 10px rgba(74,44,143,0.15); }
.drag-chip.dragging { opacity: 0.4; cursor: grabbing; }
.drag-chip.placed-ok { background: rgba(26,107,58,0.08); border-color: #1a6b3a; color: #1a6b3a; animation: chipPop 0.3s ease; }
.drag-chip.placed-ko { background: rgba(192,57,43,0.08); border-color: #c0392b; color: #c0392b; animation: chipShake 0.35s ease; }
@keyframes chipPop   { 0%,100%{transform:scale(1)} 50%{transform:scale(1.1)} }
@keyframes chipShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }

/* ════ SCÉNARIO IMMERSIF ════ */
.fm-scenario { border-radius: 18px; overflow: hidden; border: 1px solid rgba(74,44,143,0.15); margin-bottom: 1.2rem; box-shadow: 0 2px 16px rgba(13,27,62,0.07); }
.fm-scenario-header { background: linear-gradient(135deg, #0D1B3E, #4A2C8F); padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
.fm-scenario-ava { width: 46px; height: 46px; border-radius: 50%; background: rgba(201,168,76,0.25); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; border: 2px solid rgba(201,168,76,0.45); flex-shrink: 0; }
.fm-scenario-role   { font-size: 0.9rem; font-weight: 800; color: #fff; }
.fm-scenario-entity { font-size: 0.72rem; color: rgba(255,255,255,0.55); }
.fm-scenario-body   { padding: 18px 20px; background: #fafafe; }
.fm-scenario-text   { font-size: 0.9rem; color: #2c2c3e; line-height: 1.78; margin-bottom: 1.2rem; }
.fm-choices { display: flex; flex-direction: column; gap: 8px; }
.fm-choice {
  display: block; width: 100%; text-align: left;
  padding: 13px 16px; border-radius: 12px;
  border: 1px solid rgba(74,44,143,0.18); background: #fff;
  font-size: 0.87rem; color: #333; cursor: pointer; font-family: inherit;
  line-height: 1.55; transition: all 0.2s ease;
}
.fm-choice:hover { border-color: #4A2C8F; background: rgba(74,44,143,0.04); transform: translateX(4px); }
.fm-choice.correct { border-color: #1a6b3a; background: rgba(26,107,58,0.06); color: #1a6b3a; font-weight: 700; pointer-events: none; }
.fm-choice.wrong   { border-color: #c0392b; background: rgba(192,57,43,0.05); color: #c0392b; pointer-events: none; }
.fm-choice.muted   { opacity: 0.3; pointer-events: none; }

/* ════ FEEDBACK ════ */
.fm-feedback {
  display: none; padding: 14px 18px; border-radius: 12px;
  font-size: 0.85rem; line-height: 1.65; margin-top: 10px;
  border-left: 4px solid transparent;
  animation: feedbackPop 0.35s cubic-bezier(0.4,0,0.2,1);
}
@keyframes feedbackPop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.fm-feedback.ok { display: block; background: rgba(26,107,58,0.07); border-left-color: #1a6b3a; color: #1c3a23; }
.fm-feedback.ko { display: block; background: rgba(192,57,43,0.06); border-left-color: #c0392b; color: #3a1c1c; }

/* ════ MICRO-QUIZ ════ */
.fm-quiz-block { background: #fff; border-radius: 16px; padding: 20px 20px 14px; border: 1px solid rgba(74,44,143,0.12); box-shadow: 0 2px 12px rgba(13,27,62,0.05); margin-bottom: 12px; }
.fm-quiz-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(74,44,143,0.1); color: #4A2C8F; font-size: 0.7rem; font-weight: 800; flex-shrink: 0; margin-right: 8px; vertical-align: middle; }
.fm-quiz-question { font-size: 0.9rem; font-weight: 700; color: #0D1B3E; line-height: 1.48; margin-bottom: 14px; }
.fm-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fm-opt { padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(74,44,143,0.18); background: #f8f8fd; font-size: 0.82rem; color: #333; cursor: pointer; text-align: center; font-family: inherit; transition: all 0.2s ease; line-height: 1.4; }
.fm-opt:hover { border-color: #4A2C8F; background: rgba(74,44,143,0.05); }
.fm-opt.ok { border-color: #1a6b3a; background: rgba(26,107,58,0.08); color: #1a6b3a; font-weight: 700; pointer-events: none; animation: pulseGreen 0.45s ease; }
.fm-opt.ko { border-color: #c0392b; background: rgba(192,57,43,0.06); color: #c0392b; pointer-events: none; animation: shakeRed 0.4s ease; }
.fm-opt.off { opacity: 0.3; pointer-events: none; }
@keyframes pulseGreen { 0%{transform:scale(1);box-shadow:none} 40%{transform:scale(1.05);box-shadow:0 0 16px rgba(26,107,58,0.35)} 100%{transform:scale(1);box-shadow:none} }
@keyframes shakeRed   { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-5px)} 60%{transform:translateX(5px)} }
.fm-quiz-feedback { font-size: 0.78rem; color: #555; line-height: 1.6; margin-top: 10px; padding: 10px 13px; border-radius: 9px; animation: feedbackPop 0.3s ease; display: none; }
.fm-quiz-feedback.ok { display: block; background: rgba(26,107,58,0.06); color: #1c3a23; border-left: 3px solid #1a6b3a; }
.fm-quiz-feedback.ko { display: block; background: rgba(192,57,43,0.05); color: #3a1c1c; border-left: 3px solid #c0392b; }

/* ════ COMPLÉTION + SCORE SVG ════ */
.fm-done-wrap { text-align: center; padding: 2.5rem 1rem; }
.fm-done-check { width: 80px; height: 80px; border-radius: 50%; background: rgba(26,107,58,0.1); border: 2.5px solid #1a6b3a; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 1.2rem; animation: checkPop 0.6s cubic-bezier(0.4,0,0.2,1); }
@keyframes checkPop { 0%{transform:scale(0.5);opacity:0} 70%{transform:scale(1.12)} 100%{transform:scale(1);opacity:1} }
.fm-score-ring { width: 110px; height: 110px; position: relative; margin: 1rem auto; display: flex; align-items: center; justify-content: center; }
.fm-score-ring svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.fm-score-inner { width: 84px; height: 84px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; z-index: 1; }
.fm-score-num { font-size: 1.5rem; font-weight: 800; color: #0D1B3E; }
.fm-score-lbl { font-size: 0.6rem; color: #888; letter-spacing: 0.06em; }
.fm-done-title { font-family: Georgia, serif; font-size: 1.7rem; font-weight: 700; color: #0D1B3E; margin-bottom: 8px; }
.fm-done-sub { font-size: 0.9rem; color: #666; line-height: 1.65; max-width: 420px; margin: 0 auto 1.5rem; }
.fm-acquis-box { background: #f8f9ff; border-radius: 14px; padding: 16px 20px; max-width: 400px; margin: 0 auto 1.5rem; text-align: left; border: 1px solid rgba(74,44,143,0.1); }
.fm-acquis-label { font-size: 0.68rem; font-weight: 800; color: #888; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.fm-acquis-item { font-size: 0.82rem; color: #555; line-height: 1.9; }

/* ════ NAVIGATION SLIDES ════ */
.fm-nav-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(74,44,143,0.1); }
.fm-btn { padding: 11px 26px; border-radius: 25px; font-size: 0.87rem; font-weight: 700; cursor: pointer; font-family: inherit; transition: all 0.2s ease; border: 1.5px solid rgba(74,44,143,0.22); background: transparent; color: #4A2C8F; }
.fm-btn:hover { background: rgba(74,44,143,0.06); transform: translateY(-1px); }
.fm-btn.primary { background: linear-gradient(135deg, #0D1B3E, #4A2C8F); color: #fff; border-color: transparent; box-shadow: 0 3px 14px rgba(74,44,143,0.3); }
.fm-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(74,44,143,0.42); }
.fm-btn:disabled { opacity: 0.28; cursor: not-allowed; transform: none !important; }
.fm-counter { font-size: 0.74rem; color: #888; }

/* ════ MOBILE ════ */
@media (max-width: 600px) {
  .fm-app { padding: 1rem 0.8rem 5rem; }
  .fm-title { font-size: 1.3rem; }
  .fm-opts { grid-template-columns: 1fr; }
  .fm-topbar { gap: 8px; padding: 10px 12px; }
  .fm-nav-dots { display: none; }
  .fm-module-label { font-size: 0.62rem; }
}
