/* LEAVAH PARIS — Quiz page */

/* ===== Keyframes ===== */
@keyframes quizSlideIn {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes quizSlideInBack {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes quizFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes quizOptionIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes recoCardIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== Page layout ===== */
.quiz-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 56px); /* sous topbar navbar */
    background: #fdfbf8;
    overflow: hidden;
}

/* ===== Header ===== */
.quiz-header {
    height: 76px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #fff;
    border-bottom: 1px solid #ede6da;
}

.quiz-header-logo {
    font-family: var(--font-logo);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
}

.quiz-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    gap: 0;
}

.quiz-progress-dot {
    flex: 1;
    height: 2px;
    background: #e5ddd0;
    transition: background 0.5s ease;
}

.quiz-progress-dot.done { background: var(--gold); }

.quiz-back-btn {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.8rem;
    font-weight: 900;
    color: #aaa;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s, transform 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.quiz-back-btn:hover { color: #1a1a1a; transform: translateY(-50%) translateX(-3px); }

/* ===== Steps ===== */
.quiz-slides {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.quiz-step {
    display: none;
    position: absolute;
    inset: 0;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 64px 20px 60px;
}

.quiz-step.active {
    display: flex;
    animation: quizSlideIn 0.4s cubic-bezier(.25,0,.2,1) both;
}

.quiz-step.active .quiz-option {
    animation: quizOptionIn 0.4s cubic-bezier(.25,0,.2,1) both;
}
.quiz-step.active .quiz-option:nth-child(1) { animation-delay: 0.08s; }
.quiz-step.active .quiz-option:nth-child(2) { animation-delay: 0.14s; }
.quiz-step.active .quiz-option:nth-child(3) { animation-delay: 0.20s; }
.quiz-step.active .quiz-option:nth-child(4) { animation-delay: 0.26s; }
.quiz-step.active .quiz-option:nth-child(5) { animation-delay: 0.32s; }
.quiz-step.active .quiz-option:nth-child(6) { animation-delay: 0.38s; }

.quiz-step.from-back {
    animation: quizSlideInBack 0.38s cubic-bezier(.25,0,.2,1) both;
}

.quiz-step-inner {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 32px;
}

.quiz-label {
    font-family: var(--font-body);
    font-size: 0.82rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 22px;
    display: block;
    opacity: 0.9;
}

.quiz-question {
    font-family: var(--font-title);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    font-style: italic;
    color: #1a1a1a;
    margin-bottom: 40px;
    line-height: 1.2;
}

/* ===== Options ===== */
.quiz-options {
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
}

.quiz-option {
    background: none;
    border: none;
    border-bottom: 1px solid #e8dfd4;
    padding: 26px 0;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 24px;
    transition: padding-left 0.3s ease;
    position: relative;
}

.quiz-option:first-child { border-top: 1px solid #e8dfd4; }

.quiz-option::before {
    content: attr(data-num);
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 2px;
    flex-shrink: 0;
    width: 22px;
    opacity: 0.7;
    transition: opacity 0.3s, color 0.3s;
}

.quiz-option:hover { padding-left: 8px; }
.quiz-option.selected { padding-left: 8px; }
.quiz-option.selected::before,
.quiz-option:hover::before { opacity: 1; color: var(--gold); }

.quiz-option strong {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 400;
    color: #1a1a1a;
    transition: color 0.3s;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.quiz-option span {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    color: #888;
    line-height: 1.6;
    letter-spacing: 0.2px;
    transition: color 0.3s;
}

.quiz-option:hover strong,
.quiz-option.selected strong { color: #1a1a1a; }
.quiz-option:hover span,
.quiz-option.selected span { color: var(--gold); }

#qstep3 .quiz-option strong { color: #c8b89a; }
#qstep3 .quiz-option:hover strong,
#qstep3 .quiz-option.selected strong { color: var(--gold); }

/* ===== Result ===== */
.quiz-result {
    display: none;
    flex: 1;
    overflow-y: auto;
    background: #fdfbf8;
}

.quiz-result.active {
    display: block;
    animation: quizFadeIn 0.5s ease both;
}

.quiz-result-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 72px 6vw 88px;
}

.quiz-result-header {
    text-align: center;
    margin-bottom: 64px;
    padding-bottom: 48px;
    border-bottom: 1px solid #e8e0d4;
}

.quiz-result-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #c8b89a;
    margin-bottom: 20px;
}

.quiz-result-title {
    font-family: var(--font-title);
    font-size: 2.6rem;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 28px;
}

.quiz-result-profile {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #555;
    line-height: 1.9;
    max-width: 560px;
    margin: 0 auto 10px;
}

.quiz-result-divider {
    font-size: 0.6rem;
    color: var(--gold);
    letter-spacing: 10px;
    margin: 18px 0;
}

.quiz-result-metal {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.72rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 10px 28px;
    margin-top: 24px;
}

.quiz-result-reco-title {
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 36px;
    text-align: center;
}

.quiz-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 28px;
    margin-bottom: 56px;
}

/* ===== Reco cards ===== */
.quiz-reco-card {
    cursor: pointer;
    background: #fff;
    display: flex;
    flex-direction: column;
    border: 1px solid #ede6da;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
    opacity: 0;
    animation: recoCardIn 0.5s ease forwards;
    text-decoration: none;
    color: inherit;
}

.quiz-reco-card:nth-child(1) { animation-delay: 0.05s; }
.quiz-reco-card:nth-child(2) { animation-delay: 0.12s; }
.quiz-reco-card:nth-child(3) { animation-delay: 0.19s; }
.quiz-reco-card:nth-child(4) { animation-delay: 0.26s; }
.quiz-reco-card:nth-child(5) { animation-delay: 0.33s; }
.quiz-reco-card:nth-child(6) { animation-delay: 0.40s; }
.quiz-reco-card:nth-child(7) { animation-delay: 0.47s; }
.quiz-reco-card:nth-child(8) { animation-delay: 0.54s; }

.quiz-reco-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.quiz-reco-card-img {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f4ef;
    flex-shrink: 0;
}

.quiz-reco-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.quiz-reco-card:hover .quiz-reco-card-img img { transform: scale(1.05); }

.quiz-reco-card-info {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    border-top: 1px solid #f0ebe3;
}

.quiz-reco-card-name {
    font-family: var(--font-title);
    font-size: 0.92rem;
    color: #1a1a1a;
    margin-bottom: 5px;
    line-height: 1.3;
}

.quiz-reco-card-price {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 0;
}

.quiz-reco-why {
    font-family: var(--font-body);
    font-size: 0.73rem;
    color: #999;
    line-height: 1.65;
    margin-top: 10px;
}

.quiz-result-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .quiz-step-inner { padding: 0 16px; }
    .quiz-result-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .quiz-result-title { font-size: 1.5rem; }
}
