.quiz-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.quiz-topbar .counter {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.progress {
  height: 6px;
  background: var(--surface-alt);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.25s ease;
}

.question-card { padding: 1.5rem; }

.q-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.q-id {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.q-multi-hint {
  background: var(--warn-bg);
  color: var(--warn);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.78rem;
}

.q-text {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 1.25rem 0;
  white-space: pre-wrap;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 0.98rem;
  color: var(--text);
  transition: background 0.12s ease, border-color 0.12s ease;
}

.option:hover:not(:disabled) {
  background: var(--surface-alt);
  border-color: var(--text-muted);
}

.option:disabled { cursor: default; }

.option-key {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.option-text {
  flex: 1;
  white-space: pre-wrap;
}

.option.selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.option.selected .option-key {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: var(--primary);
}

.option.correct {
  border-color: var(--success);
  background: var(--success-bg);
}

.option.correct .option-key {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.option.wrong {
  border-color: var(--error);
  background: var(--error-bg);
}

.option.wrong .option-key {
  background: var(--error);
  color: #fff;
  border-color: var(--error);
}

.option.muted { opacity: 0.7; }

/* Feedback */
.feedback {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

.feedback.ok {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--text);
}

.feedback.ko {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--text);
}

.feedback .feedback-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.feedback .feedback-expl {
  color: var(--text);
  white-space: pre-wrap;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
  justify-content: flex-end;
}

.kbd-hints {
  margin-top: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Résultats */
.results-card { text-align: center; }

.score-big {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0.5rem 0 0.25rem;
  line-height: 1;
}

.score-detail {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.results-list {
  text-align: left;
  margin: 1rem 0;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.result-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.result-item:last-child { border-bottom: none; }

.result-mark {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.result-mark.ok { background: var(--success); }
.result-mark.ko { background: var(--error); }

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1rem;
}

@media (max-width: 540px) {
  .q-text { font-size: 1.05rem; }
  .question-card { padding: 1.1rem; }
  .quiz-actions { justify-content: stretch; }
  .quiz-actions button { flex: 1; }
}
