/* ===== STYLES SPÉCIFIQUES PAGE TEST DE NIVEAU ===== */

/* Variables spécifiques au quiz */
:root {
    --rouge-erreur: #dc3545;
    --vert-succes: #28a745;
    --bleu-principal: #217346;
    --texte-fonce: #333333;
    --texte-gris: #666666;
    --shadow-quiz: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Styles spécifiques à la page de test supprimés - utilisation des styles communs */

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, var(--vert-fonce) 0%, var(--vert-moyen) 100%);
    color: var(--blanc);
    text-align: center;
    padding: 8rem 0 4rem;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #e8f5e8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: var(--spacing-xl) 0;
    background: var(--blanc);
}

/* ===== QUIZ CONTAINER ===== */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-quiz);
    margin-bottom: 3rem;
}

.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-header h2 {
    color: var(--vert-fonce);
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.quiz-header p {
    color: var(--gris-moyen);
    font-size: 1.1rem;
}

/* ===== TEST SELECTION ===== */
.test-selection {
    text-align: center;
    padding: 40px 20px;
}

.test-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    margin-top: 40px;
    align-items: stretch;
}

.test-option {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: var(--shadow-quiz);
    transition: var(--transition-smooth);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.test-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--vert-principal), var(--bleu-principal));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.test-option:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--vert-clair);
}

.test-option:hover::before {
    transform: scaleX(1);
}

.test-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--vert-principal), var(--bleu-principal));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3);
}

.test-option h3 {
    color: var(--texte-fonce);
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 700;
}

.test-option p {
    color: var(--texte-gris);
    line-height: 1.6;
    margin-bottom: 25px;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.test-topics {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: left;
    flex-grow: 1;
}

.test-topics li {
    padding: 8px 0;
    color: var(--texte-gris);
    font-size: 14px;
}

.test-topics i {
    color: var(--vert-principal);
    margin-right: 10px;
    width: 16px;
}

.test-btn {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    transition: var(--transition-smooth);
    margin-top: auto;
}

.test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.btn-back-selection {
    background: var(--gris-clair);
    color: var(--texte-gris);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 20px;
}

.btn-back-selection:hover {
    background: var(--gris-moyen);
    color: var(--texte-fonce);
}

/* ===== QUIZ PROGRESS ===== */
.quiz-progress {
    background: var(--gris-tres-clair);
    border-radius: 10px;
    height: 10px;
    margin: 2rem 0;
    overflow: hidden;
}

.quiz-progress-bar {
    background: linear-gradient(135deg, var(--vert-fonce), var(--vert-moyen));
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

/* ===== QUESTIONS ===== */
.question-container {
    margin-bottom: 2rem;
}

.question {
    display: none;
}

.question.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.question h3 {
    color: var(--vert-fonce);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.question-number {
    background: var(--vert-fonce);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.answers {
    display: grid;
    gap: 1rem;
}

.answer {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    background: white;
}

.answer:hover {
    border-color: var(--vert-moyen);
    background: var(--vert-tres-clair);
}

.answer.selected {
    border-color: var(--vert-fonce);
    background: var(--vert-tres-clair);
}

/* ===== QUIZ NAVIGATION ===== */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.quiz-btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.quiz-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-previous {
    background: var(--gris-tres-clair);
    color: var(--gris-moyen);
}

.btn-previous:hover:not(:disabled) {
    background: #e0e0e0;
}

.btn-next {
    background: linear-gradient(135deg, var(--vert-fonce), var(--vert-moyen));
    color: white;
}

.btn-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(5, 150, 105, 0.3);
}

/* ===== QUIZ RESULTS ===== */
.quiz-results {
    display: none;
    text-align: center;
    padding: 2rem;
}

.quiz-results.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.result-score {
    font-size: 3rem;
    font-weight: bold;
    color: var(--vert-fonce);
    margin-bottom: 1rem;
}

.result-level {
    font-size: 1.8rem;
    color: var(--vert-moyen);
    margin-bottom: 1rem;
}

.result-description {
    font-size: 1.1rem;
    color: var(--gris-moyen);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.result-recommendations {
    background: var(--vert-tres-clair);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.result-recommendations h4 {
    color: var(--vert-fonce);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== CORRECTIONS SECTION ===== */
.corrections-section {
    margin-top: 2rem;
    text-align: left;
}

.corrections-title {
    color: var(--vert-fonce);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.correction-item {
    background: var(--gris-clair);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--rouge-erreur);
}

.correction-item.correct {
    border-left-color: var(--vert-succes);
    background: #f8fff9;
}

.correction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.question-num {
    font-weight: 600;
    color: var(--vert-fonce);
}

.result-icon {
    font-size: 1.2rem;
}

.correction-question {
    font-weight: 600;
    color: var(--vert-fonce);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.correction-answers {
    margin-bottom: 1rem;
}

.correction-answer {
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.user-answer.incorrect {
    color: var(--rouge-erreur);
    font-weight: 500;
}

.user-answer.correct {
    color: var(--vert-succes);
    font-weight: 500;
}

.correct-answer {
    color: var(--vert-succes);
    font-weight: 500;
}

.correction-explanation {
    background: var(--vert-tres-clair);
    padding: 1rem;
    border-radius: 8px;
    color: var(--vert-fonce);
    font-style: italic;
    margin-top: 1rem;
}

.toggle-corrections {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    margin: 1rem auto;
    display: block;
    transition: var(--transition-smooth);
}

.toggle-corrections:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */


/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN SPÉCIFIQUE QUIZ ===== */

/* Tablettes */
@media (max-width: 768px) {
    .page-header {
        padding: 6rem 0 3rem;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .test-options {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 10px;
    }

    .test-option {
        padding: 30px 20px;
    }

    .test-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .test-option h3 {
        font-size: 20px;
    }

    .quiz-container {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .quiz-header h2 {
        font-size: 1.8rem;
    }

    .quiz-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .result-actions {
        flex-direction: column;
    }
}

/* Mobiles */
@media (max-width: 480px) {
    .page-header {
        padding: 5rem 0 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .quiz-container {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .quiz-header h2 {
        font-size: 1.6rem;
    }

    .question h3 {
        font-size: 1.2rem;
    }

    .quiz-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .result-score {
        font-size: 2.5rem;
    }

    .result-level {
        font-size: 1.5rem;
    }

    .result-recommendations {
        padding: 1.5rem;
    }

    .correction-item {
        padding: 1rem;
    }
}