/* ===== CSS COMPLET MATHÉMATIQUES ===== */
/* Ce fichier contient TOUS les styles nécessaires pour la section Mathématiques */

:root {
    --numeration-color: #C94A1A;
    --calcul-color: #27AE60;
    --geometrie-color: #2980B9;
    --mesures-color: #8E44AD;
    --problemes-color: #E74C3C;
    --math-primary: #C94A1A;
    --math-secondary: #6A4C93;
    --math-accent: #4ECDC4;
}

[x-cloak] {
    display: none !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #C94A1A 0%, #2C3E50 100%);
    min-height: 100vh;
}

.maths-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.section-header {
    margin-bottom: 20px;
}

.back-btn {
    background: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.section-title {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.section-title h1 {
    font-size: 3em;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.section-title p {
    font-size: 1.2em;
    margin: 0;
}

.domains-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.domain-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    background: white;
    color: #333;
}

.domain-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.domain-btn.active {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    background: var(--math-primary);
    color: white;
}

.domain-btn.numeration.active { background: #C94A1A; color: white; }
.domain-btn.calcul.active { background: #27AE60; color: white; }
.domain-btn.geometrie.active { background: #2980B9; color: white; }
.domain-btn.mesures.active { background: #8E44AD; color: white; }
.domain-btn.problemes.active { background: #E74C3C; color: white; }
.domain-btn.solides.active { background: #16A085; color: white; }
.domain-btn.proportionnalite.active { background: #D35400; color: white; }
.domain-btn.donnees.active { background: #2471A3; color: white; }
.domain-btn.calcul_litteral.active { background: #7D3C98; color: white; }
.domain-btn.problemes_complexes.active { background: #C0392B; color: white; }

.domain-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.domain-section h2 {
    font-size: 2.5em;
    margin: 0 0 10px 0;
    color: #333;
}

.domain-description {
    font-size: 1.2em;
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.action-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-quiz {
    background: linear-gradient(135deg, #C94A1A 0%, #E74C3C 100%);
    color: white;
}

.btn-visual {
    background: linear-gradient(135deg, #8E44AD 0%, #9B59B6 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #27AE60 0%, #229954 100%);
    color: white;
}

/* ===== ILLUSTRATION ===== */
.illustration-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.illustration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.illustration-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.8em;
}

.close-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.close-btn:hover {
    background: #cc0000;
    transform: scale(1.05);
}

.domain-illustration {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

/* ===== SECTION LEÇON ===== */
.lesson-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 2.5rem;
    margin-top: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 2px solid #C94A1A;
    animation: slideDown 0.3s ease-out;
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, #C94A1A 0%, transparent 100%);
    padding: 1rem;
    border-radius: 8px;
}

.lesson-header h3 {
    font-size: 1.6rem;
    color: white;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.lesson-content {
    line-height: 1.9;
    color: #2c3e50;
    font-size: 1.05rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.lesson-content h3 {
    color: white;
    background: #C94A1A;
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(201, 74, 26, 0.3);
}

.lesson-content h3:first-child { margin-top: 0; }

.lesson-content h4 {
    color: #C94A1A;
    font-size: 1.15rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
    border-left: 4px solid #C94A1A;
}

.lesson-content p {
    margin-bottom: 1.2rem;
    text-align: justify;
    padding: 0.5rem 0;
    line-height: 1.8;
}

.lesson-content ul,
.lesson-content ol {
    background: #f8f9fa;
    padding: 1.5rem 1.5rem 1.5rem 2.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid #C94A1A;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.lesson-content li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
    padding-left: 0.5rem;
}

.lesson-content li::marker { color: #C94A1A; font-weight: bold; }

.lesson-content strong {
    color: #C94A1A;
    font-weight: 700;
    background: rgba(201, 74, 26, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.lesson-header .close-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #C94A1A;
    border: 2px solid white;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lesson-header .close-btn:hover {
    background: white;
    transform: scale(1.05);
}

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

/* ===== STYLES LEÇONS MATHS (from mathematiques_BON_CSS.css) ===== */
.example-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 5px solid #27ae60;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.tip-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 5px solid #ff9800;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 600;
}

.key-points {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 5px solid #2196f3;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.number-table, .decimal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
}

.number-table th, .decimal-table th {
    background: #C94A1A;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 700;
}

.number-table td, .decimal-table td {
    border: 2px solid #ddd;
    padding: 10px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
}

.geometry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.geometry-item {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.geometry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.shape-demo { font-size: 3em; margin: 15px 0; }

.calculation {
    background: #2c3e50;
    color: #C94A1A;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    line-height: 1.6;
    margin: 15px 0;
    overflow-x: auto;
}

.method-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #C94A1A;
}

.step-number { font-size: 2.5em; min-width: 60px; text-align: center; }

.operations-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.operation-card {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.operation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #C94A1A;
}

.lesson-summary {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 3px solid #C94A1A;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

/* ===== QUIZ ===== */
.quiz-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.quiz-header h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 2em;
}

.quiz-progress { color: #666; font-size: 1.1em; margin-bottom: 10px; }

.progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    background: linear-gradient(90deg, #C94A1A, #E74C3C);
    height: 100%;
    transition: width 0.3s;
}

.question-text {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 25px;
    font-weight: 500;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #C94A1A;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.answer-btn {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    text-align: left;
    font-size: 1.1em;
    transition: all 0.3s;
}

.answer-btn:hover:not(:disabled) {
    border-color: #C94A1A;
    background: #fff3e0;
    transform: translateX(5px);
}

.answer-btn:disabled { cursor: not-allowed; }

.feedback {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.feedback.correct {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    color: #2e7d32;
}

.feedback.incorrect {
    background: #ffebee;
    border: 2px solid #f44336;
    color: #c62828;
}

.feedback-explanation {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #2196f3;
    color: #1565c0;
}

.next-btn {
    background: #C94A1A;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===== RÉSULTATS ===== */
.results-zone {
    text-align: center;
    padding: 20px;
}

.results-zone h3 {
    margin: 0 0 30px 0;
    color: #333;
    font-size: 2.5em;
}

.score-circle {
    display: inline-block;
    background: linear-gradient(135deg, #C94A1A 0%, #E74C3C 100%);
    border-radius: 50%;
    padding: 40px;
    color: white;
    margin-bottom: 20px;
}

.score-number { font-size: 4em; font-weight: bold; display: block; }
.score-total { font-size: 2em; display: block; }
.score-message { font-size: 1.3em; color: #666; margin: 20px 0; }

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== BULLE CURIO ===== */
.curio-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-width: 300px;
    z-index: 1000;
}

.curio-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.curio-avatar { font-size: 3em; text-align: center; margin-bottom: 10px; }
.curio-message { color: #333; line-height: 1.6; margin: 0; }
.curio-bubble.success { border-left: 4px solid #4caf50; }
.curio-bubble.error { border-left: 4px solid #f44336; }
.curio-bubble.info { border-left: 4px solid #2196f3; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .section-title h1 { font-size: 2em; }
    .domains-nav { flex-direction: column; }
    .domain-btn { width: 100%; }
    .action-buttons { flex-direction: column; }
    .action-btn { width: 100%; }
    .lesson-container { padding: 1.5rem; }
    .lesson-header { flex-direction: column; gap: 1rem; }
    .lesson-content { padding: 1.5rem; font-size: 1rem; }
    .geometry-grid, .operations-guide { grid-template-columns: 1fr; }
    .step { flex-direction: column; text-align: center; }
    .calculation { font-size: 1em; padding: 15px; }
    .curio-bubble { bottom: 20px; right: 20px; max-width: 250px; }
}
