/* ============================================================
   ÉCRAN QUIZ
   ============================================================ */

.quiz-screen {
  padding-top: 18px;
}


/* ------------------------------------------------------------
   Ligne supérieure
   ------------------------------------------------------------ */

.quiz-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 32px;
  margin-bottom: 18px;
}

.quiz-topline .back-btn {
  margin: 0;
}

.quiz-topline .timer-box {
  margin-left: auto;
}


/* ------------------------------------------------------------
   Navigation des questions
   ------------------------------------------------------------ */

.quiz-navigation {
  display: flex;
  gap: 6px;

  width: 100%;

  margin-bottom: 24px;
  padding-bottom: 4px;

  overflow-x: auto;

  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.quiz-navigation::-webkit-scrollbar {
  height: 3px;
}

.quiz-navigation::-webkit-scrollbar-thumb {
  background: var(--line-focus);
  border-radius: 3px;
}

.quiz-pill {
  flex: 0 0 36px;

  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  background: var(--surface-card);

  border: 1px solid var(--line);
  border-radius: 9px;

  color: var(--dim);

  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease,
    transform .15s ease;
}

.quiz-pill:hover {
  border-color: var(--line-focus);
  color: var(--text);
}

.quiz-pill.active {
  background: var(--brand);
  border-color: var(--brand);

  color: #ffffff;

  box-shadow: 0 0 14px var(--brand-glow);
}

.quiz-pill.answered {
  border-color: var(--line-focus);
  color: var(--text);
}

.quiz-pill.active.answered {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}


/* ------------------------------------------------------------
   En-tête de la question
   ------------------------------------------------------------ */

.quiz-header {
  margin-bottom: 22px;
}

.quiz-header .eyebrow {
  margin-bottom: 8px;
}

.quiz-header h1 {
  margin-bottom: 12px;
}


/* ------------------------------------------------------------
   Figure
   ------------------------------------------------------------ */

.quiz-figure {
  width: 100%;
  margin: 0 0 28px;
}


/* ------------------------------------------------------------
   Réponse
   ------------------------------------------------------------ */

.answer-label {
  margin-bottom: 10px;

  color: var(--muted);

  font-size: 10px;
  font-weight: 700;

  letter-spacing: .08em;
}

.input-response-wrapper {
  margin-top: 0;
  margin-bottom: 28px;
}


/* ------------------------------------------------------------
   Actions
   ------------------------------------------------------------ */

.quiz-actions {
  display: grid;

  grid-template-columns: minmax(0, 1fr) 108px minmax(0, 1fr);

  gap: 8px;

  width: 100%;

  margin-top: 8px;
}

.quiz-actions .btn {
  min-width: 0;
  min-height: 54px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 10px 8px;

  border-radius: 10px;

  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}

.quiz-actions .btn.secondary {
  border: 1px solid var(--line);

  background: var(--surface-card);

  color: var(--muted);

  box-shadow: none;
}

.quiz-actions .btn.secondary:hover:not(:disabled) {
  border-color: var(--line-focus);
  color: var(--text);
}

.quiz-actions .btn.primary {
  background: linear-gradient(
    135deg,
    var(--brand) 0%,
    #9e330e 100%
  );

  border: none;

  color: #ffffff;

  box-shadow: 0 4px 18px var(--brand-glow);
}

.quiz-actions .btn:disabled {
  opacity: .35;
}


/* ------------------------------------------------------------
   Messages
   ------------------------------------------------------------ */

.quiz-saving {
  margin: 10px 0 0;

  color: var(--dim);

  font-family: var(--mono);
  font-size: 10px;

  text-align: center;
}

.quiz-message {
  margin-top: 12px;
  padding: 10px 12px;

  background: rgba(185, 64, 21, .06);

  border: 1px solid rgba(185, 64, 21, .2);
  border-radius: 8px;

  color: var(--muted);

  font-size: 11px;
  line-height: 1.4;

  text-align: center;
}


/* ------------------------------------------------------------
   Mobile
   ------------------------------------------------------------ */

@media (max-width: 420px) {

  .quiz-screen {
    padding-top: 14px;
  }

  .quiz-topline {
    margin-bottom: 16px;
  }

  .quiz-navigation {
    margin-bottom: 20px;
  }

  .quiz-pill {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }

  .quiz-header {
    margin-bottom: 18px;
  }

  .quiz-header h1 {
    font-size: 25px;
  }

  .quiz-figure {
    margin-bottom: 24px;
  }

  .quiz-actions {
    grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr);
    gap: 6px;
  }

  .quiz-actions .btn {
    min-height: 52px;
    padding: 8px 5px;

    font-size: 11px;
  }
}