/* ── Quiz Ésotérique — Styles frontend ───────────────── */

#eq-quiz-wrapper {
    max-width: 680px;
    margin: 40px auto;
    font-family: 'Georgia', serif;
}

.eq-step {
    background: linear-gradient(135deg, #1a0533 0%, #2d1058 50%, #1a0533 100%);
    border-radius: 16px;
    padding: 36px 40px;
    color: #f0e6ff;
    box-shadow: 0 8px 40px rgba(120, 40, 200, 0.35);
    position: relative;
    overflow: hidden;
}

.eq-step::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(180, 100, 255, 0.15), transparent 70%);
    pointer-events: none;
}

/* ── Header ──────────────────────────────────────────── */
.eq-header { text-align: center; margin-bottom: 28px; }
.eq-stars   { font-size: 1.4em; color: #d4b8ff; letter-spacing: 10px; margin-bottom: 8px; }
.eq-header h2 {
    font-size: 1.7em;
    color: #e8d5ff;
    margin: 0 0 8px;
    text-shadow: 0 0 20px rgba(200, 150, 255, 0.5);
}
.eq-subtitle { color: #b89ad4; margin: 0; font-size: 0.95em; }

/* ── Formulaire inscription ───────────────────────────── */
.eq-form-group { margin-bottom: 16px; }
.eq-form-group label {
    display: block;
    font-size: 0.85em;
    color: #c4a8e8;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.eq-form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(200,150,255,0.3);
    border-radius: 8px;
    color: #f0e6ff;
    font-size: 1em;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
}
.eq-form-group input:focus {
    outline: none;
    border-color: #a855f7;
    background: rgba(255,255,255,0.12);
}
.eq-form-group input::placeholder { color: rgba(200,160,255,0.5); }

/* ── Boutons ─────────────────────────────────────────── */
.eq-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1.05em;
    font-family: inherit;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.eq-btn:hover   { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.eq-btn:active  { transform: translateY(0); }
.eq-btn-primary {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    box-shadow: 0 4px 15px rgba(120,50,220,0.5);
}
.eq-btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #e0d0ff;
    border: 1px solid rgba(200,150,255,0.3);
}

/* ── Barre de progression ─────────────────────────────── */
.eq-progress-bar {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    height: 6px;
    margin-bottom: 20px;
    overflow: hidden;
}
#eq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #f0abfc);
    border-radius: 10px;
    transition: width 0.4s ease;
    width: 10%;
}

.eq-question-counter {
    text-align: right;
    font-size: 0.82em;
    color: #b89ad4;
    margin-bottom: 12px;
}

/* ── Question ─────────────────────────────────────────── */
#eq-question-box {
    font-size: 1.15em;
    color: #e8d5ff;
    margin-bottom: 24px;
    line-height: 1.55;
    text-align: center;
    min-height: 60px;
}

/* ── Options ─────────────────────────────────────────── */
#eq-options-box { display: flex; flex-direction: column; gap: 12px; }

.eq-option {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(200,150,255,0.25);
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    color: #e0d0ff;
    font-size: 0.97em;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.eq-option:hover:not(:disabled) {
    background: rgba(168,85,247,0.25);
    border-color: #a855f7;
    transform: translateX(4px);
}
.eq-option.eq-correct {
    background: rgba(16,185,129,0.25) !important;
    border-color: #10b981 !important;
    color: #a7f3d0;
}
.eq-option.eq-wrong {
    background: rgba(239,68,68,0.2) !important;
    border-color: #ef4444 !important;
    color: #fca5a5;
}
.eq-option:disabled { cursor: default; }

/* ── Résultat ─────────────────────────────────────────── */
.eq-result-icon { font-size: 3.5em; margin-bottom: 10px; }
#eq-result-title { font-size: 1.5em; margin: 0 0 8px; color: #e8d5ff; }
#eq-result-score { font-size: 1.1em; color: #b89ad4; margin: 0 0 24px; }

.eq-code-box {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(200,150,255,0.3);
    border-radius: 12px;
    padding: 20px 24px;
    text-align: center;
    margin: 0 0 20px;
}
#eq-code-label { color: #c4a8e8; margin: 0 0 12px; font-size: 0.9em; text-transform: uppercase; letter-spacing: 0.5px; }

.eq-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
#eq-code-value {
    font-family: 'Courier New', monospace;
    font-size: 1.8em;
    font-weight: 700;
    color: #f0abfc;
    letter-spacing: 3px;
    text-shadow: 0 0 15px rgba(240,171,252,0.6);
}
.eq-btn-copy {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(200,150,255,0.3);
    border-radius: 6px;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 1em;
    color: #e0d0ff;
    transition: background 0.15s;
}
.eq-btn-copy:hover { background: rgba(255,255,255,0.2); }

.eq-code-instruction { color: #9ca3af; font-size: 0.85em; margin: 10px 0 0; }

#eq-result-message { color: #b89ad4; text-align: center; font-style: italic; margin-bottom: 0; }

/* ── Explication après réponse ───────────────────────── */
.eq-explication {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-radius: 10px;
    padding: 16px 18px;
    margin-top: 16px;
    animation: eq-fadein 0.3s ease;
}
@keyframes eq-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.eq-explication--correct {
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.35);
}
.eq-explication--wrong {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
}
.eq-explication-icon {
    font-size: 1.4em;
    flex-shrink: 0;
    margin-top: 2px;
}
.eq-explication-intro {
    margin: 0 0 6px;
    font-size: 0.9em;
    color: #e0d0ff;
}
.eq-explication-intro em {
    color: #f0abfc;
    font-style: normal;
    font-weight: 600;
}
.eq-explication-text {
    margin: 0;
    font-size: 0.88em;
    color: #c4a8e8;
    line-height: 1.6;
    font-style: italic;
}

/* ── Erreur ───────────────────────────────────────────── */
.eq-error {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.4);
    color: #fca5a5;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9em;
    margin-top: 12px;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 520px) {
    .eq-step { padding: 24px 20px; }
    #eq-code-value { font-size: 1.3em; }
    .eq-header h2 { font-size: 1.35em; }
}

/* ── Case RGPD ───────────────────────────────────────── */
.eq-rgpd-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(200,150,255,0.25);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 18px 0 4px;
}
.eq-rgpd-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    line-height: 1.5;
}
.eq-rgpd-label input[type="checkbox"] {
    display: none;
}
.eq-rgpd-checkmark {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(200,150,255,0.5);
    border-radius: 5px;
    background: rgba(255,255,255,0.05);
    margin-top: 2px;
    position: relative;
    transition: background 0.2s, border-color 0.2s;
}
.eq-rgpd-label input[type="checkbox"]:checked ~ .eq-rgpd-checkmark {
    background: #7c3aed;
    border-color: #a855f7;
}
.eq-rgpd-label input[type="checkbox"]:checked ~ .eq-rgpd-checkmark::after {
    content: '✓';
    position: absolute;
    top: -1px;
    left: 3px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
.eq-rgpd-text {
    font-size: 0.82em;
    color: #b89ad4;
    line-height: 1.6;
}
.eq-rgpd-text strong { color: #e0d0ff; }
.eq-rgpd-link {
    color: #d4b8ff;
    text-decoration: underline;
}
.eq-rgpd-link:hover { color: #f0e6ff; }

/* ── Notice email envoyé ──────────────────────────────── */
.eq-mail-notice {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 8px;
    font-size: 0.87em;
    color: #a7f3d0;
    text-align: center;
}
