/* =====================================================
   QUIZ.CSS — OLFACT
   Page du quiz de culture parfum. Même DA que le site
   (luxe éditorial : crème / violet / or, Cormorant + DM Sans).
   Tokens + header + footer : voir layout.css.
   ===================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

body.quiz-page {
  font-family: "Cormorant Upright", serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: "Cormorant Upright", serif; font-weight: 500; }
::selection { background: rgba(135, 104, 48, 0.18); }

/* ----------------------- PRIMITIVES PARTAGÉES ----------------------- */
.kicker {
  display: inline-block;
  font-family: "DM Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 18px;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--gold-deep);
  vertical-align: middle;
  margin-right: 14px;
  margin-bottom: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 32px;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.25s ease;
}
.btn--solid { background-color: var(--plum); color: #fff; border-color: var(--plum); }
.btn--solid:hover { background-color: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
.btn--ghost { color: var(--ink); border-color: rgba(47, 24, 71, 0.45); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gold-deep);
  transition: color 0.25s, gap 0.25s;
}
.link-arrow:hover { color: var(--gold-text); gap: 18px; }

/* ----------------------------- LAYOUT ----------------------------- */
.quiz {
  max-width: 940px;
  margin: 0 auto;
  padding: 150px 40px 120px;
  min-height: 100vh;
}
.quiz-screen { animation: quiz-fade 0.5s cubic-bezier(0.2, 0.6, 0.2, 1); }
@keyframes quiz-fade {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .quiz-screen { animation: none; }
  .btn--solid:hover { transform: none; }
}

/* ----------------------- ÉCRAN 1 — ACCUEIL ----------------------- */
.quiz-intro { max-width: 700px; margin-bottom: 64px; }
.quiz-intro h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 1.05;
  color: var(--ink);
}
.quiz-intro h1 em { font-style: italic; font-weight: 600; color: var(--gold-text); }
.quiz-intro__lead {
  font-family: "DM Sans", sans-serif;
  font-size: 1.12rem;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(47, 24, 71, 0.78);
  max-width: 56ch;
  margin-top: 22px;
}
.quiz-intro__stats {
  font-family: "DM Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(47, 24, 71, 0.5);
  margin-top: 26px;
}

.levels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.level-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 38px 34px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.level-card:hover,
.level-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 28px 56px -28px rgba(47, 24, 71, 0.34);
  border-color: rgba(135, 104, 48, 0.4);
  outline: none;
}
.level-card--elite {
  border-color: rgba(135, 104, 48, 0.55);
  background:
    linear-gradient(180deg, rgba(215, 178, 109, 0.07), rgba(215, 178, 109, 0));
}
.level-card__badge {
  position: absolute;
  top: 22px;
  right: 22px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-text);
  border: 1px solid rgba(135, 104, 48, 0.5);
  border-radius: 999px;
  padding: 5px 11px;
}
.level-card__tag {
  font-family: "DM Sans", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 12px;
}
.level-card h3 { font-size: 2rem; color: var(--ink); margin-bottom: 12px; }
.level-card__blurb {
  font-family: "DM Sans", sans-serif;
  font-size: 0.97rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(47, 24, 71, 0.74);
  margin-bottom: 26px;
}
.level-card__dots { display: inline-flex; gap: 7px; margin-bottom: 16px; }
.level-card__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--gold-deep);
}
.level-card__dots i.on { background: var(--gold); border-color: var(--gold); }
.level-card__meta {
  font-family: "DM Sans", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(47, 24, 71, 0.55);
  margin-bottom: 22px;
}
.level-card__cta {
  margin-top: auto;
  font-family: "DM Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: gap 0.25s, color 0.25s;
}
.level-card:hover .level-card__cta { color: var(--gold-text); gap: 16px; }

.quiz-noscript {
  font-family: "DM Sans", sans-serif;
  color: var(--plum);
  margin-top: 24px;
}

/* ----------------------- ÉCRAN 2 — QUESTION ----------------------- */
.play-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.play-back {
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(47, 24, 71, 0.6);
  transition: color 0.25s;
}
.play-back:hover { color: var(--ink); }
.play-level {
  font-family: "DM Sans", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-text);
  border: 1px solid rgba(135, 104, 48, 0.4);
  border-radius: 999px;
  padding: 7px 16px;
}

.progress {
  height: 3px;
  background: rgba(47, 24, 71, 0.12);
  border-radius: 3px;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  transition: width 0.45s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.progress__count {
  font-family: "DM Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(47, 24, 71, 0.5);
  margin: 16px 0 36px;
}

.question {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: 38px;
  max-width: 26ch;
}

.choices { display: grid; gap: 14px; }
.choice {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  font-size: 1.04rem;
  color: var(--ink);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.choice:hover:not(:disabled) { border-color: var(--gold-deep); transform: translateX(4px); }
.choice:disabled { cursor: default; }
.choice__letter {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(47, 24, 71, 0.25);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--gold-text);
}
.choice.is-correct {
  border-color: #5b7f5b;
  background: rgba(91, 127, 91, 0.1);
}
.choice.is-correct .choice__letter { background: #5b7f5b; border-color: #5b7f5b; color: #fff; }
.choice.is-wrong {
  border-color: #b25c4d;
  background: rgba(178, 92, 77, 0.09);
}
.choice.is-wrong .choice__letter { background: #b25c4d; border-color: #b25c4d; color: #fff; }

.feedback {
  margin-top: 24px;
  padding: 22px 26px;
  border-radius: 6px;
  border-left: 3px solid var(--gold-deep);
  background: rgba(135, 104, 48, 0.05);
}
.feedback.is-ok { border-left-color: #5b7f5b; background: rgba(91, 127, 91, 0.07); }
.feedback.is-ko { border-left-color: #b25c4d; background: rgba(178, 92, 77, 0.06); }
.feedback__verdict {
  font-family: "DM Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.feedback.is-ok .feedback__verdict { color: #4f724f; }
.feedback.is-ko .feedback__verdict { color: #a3402f; }
.feedback__explain {
  font-family: "DM Sans", sans-serif;
  font-size: 0.98rem;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(47, 24, 71, 0.82);
}

.play-bottom { display: flex; justify-content: flex-end; margin-top: 36px; }

/* ----------------------- ÉCRAN 3 — RÉSULTAT ----------------------- */
.result { max-width: 640px; margin: 0 auto; text-align: center; }
.result .kicker::before { display: none; }
.result .kicker { margin-bottom: 26px; }

.result__score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.result__num {
  font-family: "Cormorant Upright", serif;
  font-weight: 600;
  font-size: clamp(4.5rem, 12vw, 7rem);
  line-height: 1;
  color: var(--gold-text);
}
.result__den {
  font-family: "Cormorant Upright", serif;
  font-size: 2rem;
  color: rgba(47, 24, 71, 0.5);
}
.result__rank {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 16px;
}
.result__msg {
  font-family: "DM Sans", sans-serif;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(47, 24, 71, 0.76);
  max-width: 48ch;
  margin: 0 auto 40px;
}
.result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 32px;
}
.result__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 36px;
  align-items: center;
  justify-content: center;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.result__share {
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(47, 24, 71, 0.62);
  border-bottom: 1px solid transparent;
  padding-bottom: 6px;
  transition: color 0.25s, border-color 0.25s;
}
.result__share:hover { color: var(--gold-text); border-bottom-color: var(--gold-deep); }

.result__toggle {
  margin-top: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-text);
}

/* Corrigé détaillé */
.corrige { list-style: none; text-align: left; margin-top: 30px; }
.corrige__item {
  padding: 24px 26px;
  margin-bottom: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid #5b7f5b;
  border-radius: 6px;
}
.corrige__item.ko { border-left-color: #b25c4d; }
.corrige__q {
  font-family: "Cormorant Upright", serif;
  font-size: 1.35rem;
  color: var(--ink);
  margin-bottom: 10px;
}
.corrige__a {
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 8px;
  color: var(--plum);
}
.corrige__item.ok .corrige__a { color: #4f724f; }
.corrige__item.ko .corrige__a { color: #a3402f; }
.corrige__x {
  font-family: "DM Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(47, 24, 71, 0.66);
}

/* ----------------------------- RESPONSIVE ----------------------------- */
@media (max-width: 760px) {
  .quiz { padding: 120px 22px 90px; }
  .levels { grid-template-columns: 1fr; }
  .quiz-intro { margin-bottom: 48px; }
  .result__actions .btn { flex: 1 1 auto; }
}
