@import url("responsive-global.css");
     /* Fichier: math-exercises.css (Intégré) */
        @import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

        :root {
            --primary-color: #3f51b5;
            --secondary-color: #2196f3;
            --success-color: #4caf50;
            --warning-color: #ff9800;
            --danger-color: #f44336;
            --info-color: #17a2b8;
            --light-color: #f8f9fa;
            --dark-color: #343a40;
            --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --gradient-success: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
            --gradient-info: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
            --gradient-warning: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
            --shadow-soft: 0 10px 35px rgba(0, 0, 0, 0.07);
            --shadow-hover: 0 18px 45px rgba(0, 0, 0, 0.1);
            --border-radius: 20px;
            --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.8;
            background: var(--gradient-primary);
            min-height: 100vh;
            padding: 20px;
            font-size: 16px;
            color: #333;
        }

        .math-container {
            max-width: 1200px;
            margin: 0 auto;
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(15px);
            border-radius: var(--border-radius);
            padding: 40px;
            box-shadow: var(--shadow-soft);
            border: 1px solid rgba(255, 255, 255, 0.3);
            position: relative;
            overflow: hidden;
            animation: slideInUp 0.8s ease-out;
        }

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

        .math-header {
            text-align: center;
            margin-bottom: 40px;
            padding: 25px;
            background: rgba(102, 126, 234, 0.08);
            border-radius: var(--border-radius);
        }

        .math-header h1 {
            color: var(--primary-color);
            font-size: 2.5em;
            font-weight: 700;
        }

        .math-header .sub-header {
            font-size: 1.1em; color: #666; display: flex; justify-content: space-between; padding: 0 20px;
        }

        .exercises-grid {
            display: grid; grid-template-columns: 1fr; gap: 30px;
        }

        .exercise-card {
            background: #ffffff;
            border-radius: var(--border-radius);
            padding: 30px;
            margin-bottom: 30px;
            box-shadow: var(--shadow-soft);
            border: 1px solid #e0e0e0;
            transition: var(--transition);
        }
        
        .exercise-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-hover);
        }

        .exercise-header {
            display: flex; align-items: center; gap: 20px; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 2px solid #f0f0f0;
        }

        .exercise-title {
            color: var(--primary-color); font-size: 1.5em; font-weight: 700; flex-grow: 1;
        }
        .exercise-number {
            background: var(--gradient-primary); color: white; padding: 8px 16px; border-radius: 50px; font-weight: 600; font-size: 0.9em;
        }
        .exercise-content {
            color: #34495e; line-height: 2.2; margin-bottom: 25px;
        }
        .math-expression {
            background: rgba(248, 249, 250, 0.8); padding: 15px; border-radius: 10px; margin: 15px 0; border-left: 4px solid var(--primary-color); text-align: center; direction: ltr;
        }

        .progress-stats {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            padding: 15px; border-radius: 10px; margin: 20px 0; text-align: center; border: 1px solid #dee2e6;
        }
        .progress-indicator {
            display: flex; gap: 8px; justify-content: center; margin-bottom: 10px;
        }
        .progress-dot {
            width: 12px; height: 12px; border-radius: 50%; background: #dee2e6; transition: all 0.3s ease;
        }
        .progress-dot.active { background: var(--success-color); transform: scale(1.2); }
        .progress-dot.current { background: var(--warning-color); transform: scale(1.3); box-shadow: 0 0 10px rgba(255, 152, 0, 0.5); }
        
        .progress-buttons {
            display: flex; gap: 15px; margin: 25px 0; flex-wrap: wrap; align-items: center;
        }
        .progress-btn {
            font-family: 'Cairo', sans-serif; border: none; padding: 12px 24px; border-radius: 50px; cursor: pointer; font-size: 14px; font-weight: 600; transition: var(--transition); display: flex; align-items: center; gap: 8px;
        }
        .progress-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }
        .progress-btn:not(:disabled):hover { transform: translateY(-3px); }
        .btn-hint { background: var(--gradient-success); color: white; }
        .btn-method { background: var(--gradient-warning); color: white; }
        .btn-solution { background: var(--gradient-info); color: white; }
        .btn-reset { background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%); color: white; margin-right: auto; }
        
        .correction-section {
            display: none; margin: 20px 0; padding: 25px; border-radius: 15px; animation: fadeInSlide 0.6s ease-out;
        }
        .correction-section.visible { display: block; }

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

        .correction-hint { background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%); border: 1px solid #c3e6cb; color: #155724; }
        .correction-hint h4 { color: #28a745; display: flex; align-items: center; gap: 8px; margin-bottom: 15px; font-size: 1.2em; }
        .correction-method { background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%); border: 1px solid #faebcc; color: #856404; }
        .correction-method h4 { color: #d39e00; display: flex; align-items: center; gap: 8px; margin-bottom: 15px; font-size: 1.2em; }
        .correction-solution { background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%); border: 1px solid #b8daff; color: #0c5460; }
        .correction-solution h4 { color: #138496; display: flex; align-items: center; gap: 8px; margin-bottom: 15px; font-size: 1.2em; }

        .bounce-in { animation: bounceIn 0.8s ease-out; }
        @keyframes bounceIn { 0% { transform: scale(0.3); opacity: 0; } 50% { transform: scale(1.05); } 70% { transform: scale(0.9); } 100% { transform: scale(1); opacity: 1; } }
        .pulse { animation: pulse 2s infinite; }
        @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(63, 81, 181, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(63, 81, 181, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 81, 181, 0); } }