/* Page quiz : une bande EJP en haut, une carte par écran, pensée pour le téléphone. */
.band {
  background: var(--deep);
  color: var(--white);
  padding-top: env(safe-area-inset-top, 0px);
  position: sticky; top: 0; z-index: 5;
}
.band-inner {
  max-width: 640px; margin: 0 auto;
  padding-block: 14px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { height: 40px; width: auto; }
.band-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; min-width: 0; }
.band-meta #metaPart { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #a8d5bf; font-weight: 600; }
.band-meta .count { font-size: .95rem; font-variant-numeric: tabular-nums; }
.band-meta .count b { font-size: 1.25rem; }

.trail {
  max-width: 640px; margin: 0 auto;
  padding-bottom: 12px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
}
.trail span { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .16); transition: background .25s; }
.trail span.current { background: rgba(255, 255, 255, .55); }
.trail span.ok { background: #5cc48c; }
.trail span.ko { background: #f08d74; }

.shell {
  max-width: 640px; margin: 0 auto;
  padding-block: 20px 32px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.card {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: 0 1px 0 var(--line), 0 12px 32px -18px rgba(16, 59, 51, .35);
  padding: 24px 20px;
  display: flex; flex-direction: column; gap: 18px;
  animation: rise .28s ease-out;
}
@keyframes rise { from { transform: translateY(6px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (min-width: 560px) { .card { padding: 32px 32px; } }

.accent { color: var(--green); }
.muted { color: var(--mute); margin: 0; }
.small { font-size: .85rem; }
.title { font-size: clamp(1.75rem, 6vw, 2.3rem); line-height: 1.1; margin: -6px 0 0; color: var(--deep); font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
.title-sm { font-size: 1.3rem; margin: 0; color: var(--deep); }
.lead { margin: 0; color: #34463f; }
.eyebrow { margin: 0; }

.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.facts li {
  display: flex; align-items: center; gap: 10px;
  font-size: .95rem; color: #34463f;
}
.facts li::before { content: ""; flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--green); }

.start { display: flex; flex-direction: column; gap: 14px; }
.resume { background: var(--mist); border-radius: var(--r-sm); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.resume p { margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.row .btn { flex: 1 1 180px; }

.verse { margin: 4px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); }
.verse p { margin: 0; font-family: var(--font-verse); font-style: italic; font-size: 1.08rem; color: var(--deep); }
.verse cite { display: block; margin-top: 6px; font-style: normal; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); font-weight: 600; }

/* Question */
.question { margin: 0; font-size: 1.18rem; line-height: 1.4; font-weight: 600; color: var(--deep); text-wrap: pretty; }
.choices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.choice {
  width: 100%; text-align: left;
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px; min-height: 56px;
  font-size: .98rem; line-height: 1.4;
  transition: border-color .15s, background .15s;
}
.choice:hover:not([disabled]) { border-color: var(--green); background: var(--paper); }
.choice .letter {
  flex: 0 0 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--mist); color: var(--deep); font-weight: 700; font-size: .85rem;
}
.choice .txt { flex: 1; min-width: 0; padding-top: 2px; }
.choice .mark { flex: 0 0 auto; font-weight: 700; padding-top: 2px; font-size: .85rem; }
.choice[disabled] { cursor: default; }
.choice.pending { border-color: var(--green); background: var(--paper); }
.choice.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.choice.is-correct .letter { background: var(--ok); color: var(--white); }
.choice.is-correct .mark { color: var(--ok); }
.choice.is-wrong { border-color: var(--ko); background: var(--ko-bg); }
.choice.is-wrong .letter { background: var(--ko); color: var(--white); }
.choice.is-wrong .mark { color: var(--ko); }
.choice.faded { opacity: .55; }

.feedback {
  border-radius: var(--r-sm); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
  animation: rise .25s ease-out;
}
.feedback p { margin: 0; }
.feedback.ok { background: var(--ok-bg); }
.feedback.ko { background: var(--ko-bg); }
.feedback .verdict { font-weight: 700; font-size: 1.05rem; }
.feedback.ok .verdict { color: var(--ok); }
.feedback.ko .verdict { color: var(--ko); }
.feedback .answer { font-weight: 600; color: var(--deep); }
.feedback .explain { color: #34463f; font-size: .95rem; }

/* Résultat */
.result { text-align: left; }
.score { display: flex; align-items: baseline; gap: 8px; color: var(--deep); margin-top: -6px; }
.score-num { font-size: 4.2rem; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.score-of { font-size: 1.4rem; font-weight: 500; color: var(--mute); }
.level-chip {
  align-self: flex-start; margin: 0;
  padding: 6px 14px; border-radius: 999px;
  font-weight: 600; font-size: .92rem;
  background: var(--mist); color: var(--deep);
}
.level-chip[data-level="acquis"] { background: var(--ok); color: var(--white); }
.level-chip[data-level="bien"] { background: var(--green); color: var(--white); }
.level-chip[data-level="encours"] { background: #f6ecd8; color: #7a5212; }
.level-chip[data-level="reprendre"] { background: var(--ko-bg); color: var(--ko); }

.scale { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.scale li { display: flex; flex-direction: column; gap: 6px; font-size: .72rem; color: var(--mute); line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 479px) { .scale { grid-template-columns: repeat(2, 1fr); row-gap: 12px; } }
.scale li::before { content: ""; height: 6px; border-radius: 3px; background: var(--line); }
.scale li.here { color: var(--deep); font-weight: 600; }
.scale li.here::before { background: var(--green); }
.scale li b { font-variant-numeric: tabular-nums; }

.missed h3 { margin: 0 0 10px; font-size: 1rem; color: var(--deep); }
.missed ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.missed li { border-left: 3px solid var(--ko); padding: 4px 0 4px 12px; display: flex; flex-direction: column; gap: 4px; }
.missed .q { font-weight: 600; font-size: .95rem; }
.missed .yours { font-size: .88rem; color: var(--ko); }
.missed .right { font-size: .88rem; color: var(--ok); font-weight: 600; }
.missed .why { font-size: .88rem; color: var(--mute); }

.foot { text-align: center; font-size: .75rem; color: var(--mute); padding: 0 16px 28px; letter-spacing: .04em; }
