/* ==========================================================================
   TDV Media, Page Appel Stratégique (questionnaire 14 étapes)
   ========================================================================== */

html, body { height: 100%; }

.quiz-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--black);
}

.quiz-header {
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quiz-header__back {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.quiz-header__back:hover {
  color: var(--white);
}

@media (max-width: 480px) {
  .quiz-header__back { font-size: 0.82rem; }
}

.quiz-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.quiz-card {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: var(--anthracite);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}

/* ---------- Progress bar ---------- */
.quiz-progress {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin-bottom: 28px;
}
.quiz-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--silver-gradient);
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* ---------- Back button ---------- */
.quiz-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
}
.quiz-back:hover { color: var(--white); }

/* ---------- Steps ---------- */
.quiz-step { animation: quiz-fade-in 0.35s ease; }

@keyframes quiz-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-step h1 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  margin: 10px 0 26px;
}

.quiz-step input[type="text"],
.quiz-step input[type="tel"],
.quiz-step input[type="email"],
.quiz-step textarea,
.quiz-step select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--black);
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.quiz-step textarea { min-height: 120px; }
.quiz-step input::placeholder,
.quiz-step textarea::placeholder { color: var(--muted); }
.quiz-step input:focus,
.quiz-step textarea:focus,
.quiz-step select:focus {
  outline: none;
  border-color: var(--silver-light);
  box-shadow: 0 0 0 4px rgba(245, 245, 245, 0.1);
}
.quiz-step.has-error input,
.quiz-step.has-error textarea {
  border-color: #dc2626;
}

.quiz-error {
  display: block;
  min-height: 1.2em;
  margin-top: 10px;
  font-size: 0.85rem;
  color: #f07171;
}

/* ---------- Choice options ---------- */
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--white);
  font-size: 0.98rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.quiz-option:hover { border-color: var(--muted); transform: translateY(-1px); }
.quiz-option.is-selected {
  border-color: var(--silver-light);
  background: rgba(255, 255, 255, 0.06);
}
.quiz-option__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 12px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  font-size: 0.7rem;
  vertical-align: -3px;
  color: transparent;
}
.quiz-option.is-selected .quiz-option__check {
  border-color: var(--silver-light);
  background: var(--silver-gradient);
  color: var(--black);
}

/* ---------- Navigation ---------- */
.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}
.quiz-continue { opacity: 1; transition: opacity 0.2s ease; }
.quiz-continue:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.quiz-continue:disabled:hover { transform: none; }

/* ---------- Honeypot (invisible, anti-spam) ---------- */
.quiz-honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Confirmation ---------- */
.quiz-step--confirmation { text-align: center; }
.quiz-confirmation__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--silver-gradient);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
}
.quiz-confirmation h1 { margin-bottom: 14px; }
.quiz-confirmation .btn { margin: 6px; }
.quiz-confirmation p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 30px;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .quiz-card { padding: 32px 24px; }
  .quiz-nav { flex-wrap: wrap; }
  .quiz-nav .btn { flex: 1; }
}
