:root {
  --page-bg: #ffffff;
  --panel-border: #e7ddcf;
  --text-main: #21312b;
  --text-soft: #62756c;
  --accent: #234a39;
  --accent-soft: #eef5f1;
  --shadow: 0 24px 70px rgba(42, 62, 52, 0.12);
  --radius-xl: 32px;
  --radius-lg: 20px;
  --max-content: 760px;
  --page-padding: 28px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Georgia, "Times New Roman", serif;
  background: var(--page-bg) url("/assets/quiz-fond.png") center center / cover no-repeat fixed;
  color: var(--text-main);
  overflow-x: hidden;
}

button,
input,
label {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  position: relative;
}

.quiz-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--page-padding);
  position: relative;
  z-index: 1;
}

.quiz-card {
  width: min(100%, var(--max-content));
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(231, 221, 207, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 42px;
  backdrop-filter: blur(10px);
}

.quiz-card__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.progress-block {
  flex: 0 0 220px;
}

.progress-block span {
  display: block;
  margin-bottom: 10px;
  text-align: right;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #efe7da;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f8066, #234a39);
  transition: width 220ms ease;
}

.question-block {
  margin-bottom: 28px;
}

.question-block h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.08;
}

.question-prompt {
  margin: 0;
  color: var(--text-soft);
  font-size: 1.04rem;
  line-height: 1.6;
}

.answers-list {
  display: grid;
  gap: 14px;
}

.answer-option {
  position: relative;
}

.answer-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.answer-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 16px;
  padding: 19px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
  background: #ffffff;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.answer-card:hover {
  transform: translateY(-1px);
  border-color: #cdbba4;
  box-shadow: 0 12px 30px rgba(82, 59, 25, 0.09);
}

.answer-option input:checked + .answer-card {
  border-color: rgba(35, 74, 57, 0.55);
  background: var(--accent-soft);
  box-shadow: 0 16px 34px rgba(35, 74, 57, 0.12);
}

.answer-marker {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #d3c8b7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent);
  background: #fffdfa;
}

.answer-text {
  font-size: 1.03rem;
  line-height: 1.5;
}

.quiz-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
}

.button {
  min-width: 150px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-secondary {
  background: #ffffff;
  border-color: var(--panel-border);
  color: var(--text-main);
}

@media (max-width: 960px) {
  .quiz-card {
    padding: 26px 20px;
  }

  .quiz-layout {
    padding: 18px;
    min-height: auto;
  }

  .quiz-card__top {
    flex-direction: column;
  }

  .progress-block {
    width: 100%;
    flex-basis: auto;
  }

  .progress-block span {
    text-align: left;
  }

  .quiz-actions {
    flex-direction: column-reverse;
  }

  .button {
    width: 100%;
  }
}
