/* =========================================================
   60_feedback.css — Feedback / Flash / Overlays (dark)
   Projet : Mémo Mon Examen
   Contraintes : rétrocompatible, sans toucher au HTML/classes
   ========================================================= */

/* ========= MESSAGES FLASH (VERDICT) ========= */


.alert-danger.app-flash{
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.25), rgba(15, 23, 42, 0.98));
  border-color: rgba(248, 113, 113, 0.9);
}


.flash-hide{
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .4s ease, transform .4s ease;
}

/* On masque le flash vert "success" : on garde seulement les rouges */
.alert-success.app-flash{
  display: none !important;
}


/* ===== Bloc "bonne réponse attendue" dans la carte ===== */

.question-correct-inline{
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: radial-gradient(circle at left, rgba(248, 113, 113, 0.23), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(248, 113, 113, 0.8);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.6);
  font-size: 0.9rem;
}


/* ===== Halo / "confetti" autour du bouton Valider ===== */

.btn-answer-primary{
  position: relative;
  overflow: hidden;
}

.btn-answer-primary.btn-confetti::before,
.btn-answer-primary.btn-confetti::after{
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 2px solid rgba(46, 213, 115, 0.9);
  opacity: 0;
  transform: scale(0.7);
  pointer-events: none;
  animation: btnConfettiRing 0.6s ease-out forwards;
}

.btn-answer-primary.btn-confetti::after{
  border-color: rgba(255, 255, 255, 0.7);
  animation-delay: 0.1s;
}

@keyframes btnConfettiRing{
  0% { opacity: 1; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.3); }
}


/* =========================
   MMX — INLINE BAD ANSWER PANEL (SOLO)
   ========================= */

.mmx-inline-feedback-slot{
  margin-top: 0.75rem;
}

.answer-inline-panel{
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.6);
  color: #f8fafc;
  cursor: pointer;
  user-select: none;
}


.answer-inline-title{
  letter-spacing: 0.2px;
}


.answer-inline-correct{
  margin-top: 0.75rem;
}


.answer-inline-panel.is-hiding{
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 200ms ease, transform 200ms ease;
}


/* ==========================================
   MAUVAISE RÉPONSE — PANEL INLINE
========================================== */

.answer-inline-panel{
  background:rgba(255, 80, 80, 0.08);
  border:1px solid rgba(255,80,80,.35);
}


.answer-inline-explanation{
  margin-bottom:.75rem;
}

/* ==========================================
   PROGRESS BAR (7050ms sync)
========================================== */

.answer-inline-progress{
  margin-bottom:.5rem;
}


/* ==========================================
   Animations
========================================== */

@keyframes fadeInInline{
  from{
    opacity:0;
    transform:translateY(4px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* ==========================================
   MAUVAISE RÉPONSE — PANEL INLINE (moins rouge)
========================================== */

.answer-inline-panel{
  margin-top:1rem;
  padding:1rem 1.1rem;
  border-radius:14px;
  backdrop-filter: blur(6px);
  animation: fadeInInline .25s ease;
}

.answer-inline-panel-warn{
  background: rgba(245, 197, 66, 0.08); /* ambre doux */
  border: 1px solid rgba(245, 197, 66, 0.30);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 18px 40px rgba(0,0,0,0.35);
}

.answer-inline-title{
  font-weight:600;
  margin-bottom:.5rem;
  color: rgba(245, 197, 66, 0.95);
}

.answer-inline-correct{
  margin-bottom:.35rem;
  font-size:.95rem;
}

.answer-inline-explanation{
  font-size:.92rem;
  opacity:.88;
  margin:.55rem 0 .6rem;
}

.answer-inline-explanation.is-hidden{
  display:none;
}

/* ==========================================
   BARRE DE TEMPS (remplissage)
========================================== */

.answer-inline-progress-wrap{
  margin-top:.5rem;
}

.answer-inline-progress-label{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:.78rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  opacity:.70;
  margin-bottom:.35rem;
}

.answer-inline-progress{
  height:8px;
  background: rgba(255,255,255,.08);
  border-radius:999px;
  overflow:hidden;
  position:relative;
}

.answer-inline-progress-fill{
  height:100%;
  width:100%;
  transform: scaleX(0);
  transform-origin:left;
  border-radius:999px;
  background: linear-gradient(90deg, rgba(34,211,238,.95), rgba(168,85,247,.95)); /* cyan → violet premium */
}

.answer-inline-progress-fill.is-running{
  animation-name: mmxFillTime;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes mmxFillTime{
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ==========================================
   ACTIONS
========================================== */

.answer-inline-actions{
  display:flex;
  gap:.6rem;
  margin-top:.8rem;
  align-items:center;
  flex-wrap:wrap;
}

.answer-inline-actions .btn{
  border-radius:999px;
}


/* ==========================================
   Animations
========================================== */

@keyframes fadeInInline{
  from{ opacity:0; transform:translateY(4px); }
  to{ opacity:1; transform:translateY(0); }
}

