/* ================================================================
   STYLES-QUIZ.CSS — Culture Civique
   Styles pour les pages "quiz" : mises-en-situation-quiz-t1,
   mises-en-situation-quiz-t3, mises-en-situation-quiz-tous
   (et futurs quiz thématiques + examen blanc)
   À utiliser avec : styles-base.css
   ================================================================ */

/* ----------------------------------------------------------------
   1. LAYOUT QUIZ
   ---------------------------------------------------------------- */
   body {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    flex-grow: 1;
}

.glass-card {
    padding: 25px;
}

.back-btn {
    margin-bottom: 15px;
}


/* ----------------------------------------------------------------
   2. BARRE DE PROGRESSION QUIZ
   ---------------------------------------------------------------- */
.quiz-progress {
    font-size: 0.95em;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.progress-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 25px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-cyan);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}


/* ----------------------------------------------------------------
   3. QUESTION + ANIMATION
   ---------------------------------------------------------------- */
.question-container {
    animation: fadeSlide 0.4s ease-out;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.question-text {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 25px;
    line-height: 1.45;
    color: var(--text-white);
}


/* ----------------------------------------------------------------
   4. OPTIONS DE RÉPONSE
   ---------------------------------------------------------------- */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid transparent;
    padding: 16px 20px;
    border-radius: 50px;
    color: var(--text-white);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1em;
    line-height: 1.4;
    width: 100%;
    font-family: inherit;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.option-btn.correct {
    background: rgba(102, 187, 106, 0.25);
    border-color: var(--success);
    color: #A5D6A7;
    animation: glowPulse 0.8s ease-out;
}

.option-btn.incorrect {
    background: rgba(239, 83, 80, 0.25);
    border-color: var(--error);
    color: #FFCDD2;
    animation: gentleShake 0.4s;
}

.option-btn.disabled {
    pointer-events: none;
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 0 rgba(102, 187, 106, 0); }
    50% { box-shadow: 0 0 20px rgba(102, 187, 106, 0.6); }
    100% { box-shadow: 0 0 10px rgba(102, 187, 106, 0.3); }
}

@keyframes gentleShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}


/* ----------------------------------------------------------------
   5. FEEDBACK (après réponse)
   ---------------------------------------------------------------- */
.feedback-area {
    margin-top: 20px;
    animation: slideDown 0.3s ease-out;
}

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

.feedback-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
}

.explanation-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid var(--accent-cyan);
    margin-bottom: 20px;
}

.explanation-box p {
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 12px;
}

.explanation-box p:last-child {
    margin-bottom: 0;
}

.explanation-box strong {
    color: var(--text-white);
}


/* ----------------------------------------------------------------
   6. BOUTONS D'ACTION
   ---------------------------------------------------------------- */
.action-btn {
    width: 100%;
    padding: 16px;
    border-radius: 50px;
    border: none;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: scale(1.02);
}

.btn-primary {
    background: var(--accent-cyan);
    color: var(--deep-blue);
    box-shadow: 0 4px 15px rgba(77, 182, 172, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-muted);
    margin-top: 10px;
}

.btn-secondary:hover {
    border-color: var(--text-white);
    color: var(--text-white);
}


/* ----------------------------------------------------------------
   7. RÉSULTATS
   ---------------------------------------------------------------- */
.results-container {
    text-align: center;
}

.results-container h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.results-container .subtitle {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 25px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-inner {
    background: var(--deep-blue);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-percent {
    font-size: 2.5em;
    font-weight: bold;
}

.score-label {
    font-size: 0.85em;
    color: var(--text-muted);
}

.result-message {
    font-size: 1.15em;
    margin-bottom: 25px;
    font-weight: 500;
}


/* ----------------------------------------------------------------
   8. REVUE DES RÉPONSES
   ---------------------------------------------------------------- */
.review-section {
    margin-top: 30px;
    text-align: left;
}

.review-section h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.review-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    border-left: 4px solid;
}

.review-item.good {
    border-color: var(--success);
}

.review-item.bad {
    border-color: var(--error);
}

.review-item strong {
    color: var(--text-white);
    display: block;
    margin-bottom: 5px;
    font-size: 0.95em;
    line-height: 1.4;
}

.review-item span {
    font-size: 1em;
}


/* ----------------------------------------------------------------
   9. MODAL ABANDON
   ---------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 43, 68, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--soft-blue);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 12px;
}

.modal-text {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-btn {
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.modal-btn-cancel {
    background: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-muted);
}

.modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-white);
    color: var(--text-white);
}

.modal-btn-confirm {
    background: var(--error);
    color: white;
}

.modal-btn-confirm:hover {
    background: #e53935;
}


/* ----------------------------------------------------------------
   10. RESPONSIVE QUIZ
   ---------------------------------------------------------------- */
@media (max-width: 480px) {
    .glass-card {
        padding: 20px;
    }

    .question-text {
        font-size: 1.1em;
    }

    .option-btn {
        padding: 14px 18px;
        font-size: 0.95em;
        border-radius: 20px;
    }
}