/* ===== Product Quiz (pq) – styles complets ===== */

.pq-quiz {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  max-width: 1240px;
  margin-right: auto;
  margin-left: auto;
}

/* Progress bar */
.pq-progress {
  height: 8px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.pq-progress > div {
  height: 8px;
  background: #111827;
  width: 0%;
  transition: width 220ms ease;
}

/* Steps */
.pq-step {
  display: none;
  opacity: 0;
  transform: translateY(6px);
}

.pq-step.is-active {
  display: block;
  animation: pqFadeSlideIn 0.22s ease-out forwards;
}

@keyframes pqFadeSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Question + options */
.pq-q {
  font-weight: 600;
  margin: 0 0 8px;
}

.pq-options {
  display: grid;
  gap: 8px;
}

.pq-options label {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.pq-options label:hover {
  transform: translateY(-1px);
  border-color: #d1d5db;
  background: #f9fafb;
}

.pq-options input[type="radio"] {
  transform: translateY(-0.5px);
}

/* Actions */
.pq-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pq-btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease, border-color 120ms ease;
}

.pq-btn:hover {
  transform: translateY(-1px);
  border-color: #d1d5db;
  background: #f9fafb;
}

.pq-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.pq-btn.primary {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.pq-btn.primary:hover {
  background: #0b1220;
  border-color: #0b1220;
}

/* Inline message (replaces alerts) */
.pq-message {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #991b1b;
  font-size: 14px;
  display: none;
}

/* Results container */
.pq-results {
  margin-top: 18px;
  transition: opacity 200ms ease;
}

/* When results are shown: hide quiz UI smoothly via class */
.pq-quiz.is-results .pq-progress,
.pq-quiz.is-results .pq-actions,
.pq-quiz.is-results .pq-step,
.pq-quiz.is-results .pq-message {
  display: none !important;
}

/* Optional: nicer product cards inside results (works with your current HTML) */
.pq-results .pq-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 720px) {
  .pq-results .pq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pq-results .pq-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.pq-results .pq-card img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
}

.pq-results .pq-card-title {
  font-weight: 600;
  margin: 0 0 6px;
}

.pq-results .pq-muted {
  opacity: 0.7;
  font-size: 13px;
}

/* Make links inside results look clean */
.pq-results a {
  text-decoration: none;
}

.pq-results a:hover {
  text-decoration: underline;
}

.pq-stage {
  position: relative;
}

/* Chaque step prend la place, mais en overlay */
.pq-stage .pq-step {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;

  display: block;        /* important: on ne dépend plus de display none */
  opacity: 0;
  pointer-events: none;  /* évite cliquer sur step caché */
  transform: translateY(8px);
}

/* Step actif */
.pq-stage .pq-step.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}
.pq-results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}