@import url("responsive-global.css");
   * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Arial', 'Tahoma', sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
            padding: 20px;
            line-height: 1.6;
            direction: rtl;
        }

        .container {
            max-width: 1000px;
            margin: 0 auto;
            background: white;
            border-radius: 15px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
            overflow: hidden;
        }

        /* EN-TÊTE SCOLAIRE */
        .school-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 25px;
            display: grid;
            grid-template-columns: 1fr 2fr 1fr;
            gap: 20px;
            align-items: center;
            text-align: center;
        }

        .teacher-info, .school-info {
            font-size: 14px;
        }

        .exam-title {
            font-size: 24px;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }

        /* EXERCICES */
        .exercise {
            margin: 30px;
            border: 2px solid #e0e6ed;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0,0,0,0.08);
            position: relative;
        }

        .exercise-header {
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
            color: white;
            padding: 15px 25px;
            font-size: 18px;
            font-weight: bold;
            text-align: center;
            position: relative;
        }

        /* ICÔNE D'AIDE - LAMPE */
        .help-icon {
            position: absolute;
            left: 20px;
            top: 50%;
            transform: translateY(-50%);
            width: 30px;
            height: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            opacity: 0.8;
        }

        .help-icon:hover {
            transform: translateY(-50%) scale(1.1);
            opacity: 1;
            filter: drop-shadow(0 0 8px rgba(255,255,255,0.6));
        }

        .help-icon svg {
            width: 100%;
            height: 100%;
            fill: #fff;
        }

        /* POPUP D'AIDE */
        .help-popup {
            position: fixed;
            left: 50px;
            top: 50%;
            transform: translateY(-50%);
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            max-width: 350px;
            width: 90%;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .help-popup.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(-50%) translateX(10px);
        }

        .help-popup::before {
            content: '';
            position: absolute;
            right: 100%;
            top: 50%;
            transform: translateY(-50%);
            border: 10px solid transparent;
            border-right-color: #667eea;
        }

        .help-close {
            position: absolute;
            top: 10px;
            right: 15px;
            background: none;
            border: none;
            color: white;
            font-size: 20px;
            cursor: pointer;
            padding: 0;
            width: 25px;
            height: 25px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.3s ease;
        }

        .help-close:hover {
            background: rgba(255,255,255,0.2);
        }

        .help-content h4 {
            margin: 0 0 10px 0;
            font-size: 16px;
            border-bottom: 1px solid rgba(255,255,255,0.3);
            padding-bottom: 8px;
        }

        .help-content p {
            margin: 8px 0;
            font-size: 14px;
            line-height: 1.5;
        }

        /* QUIZ STYLING */
        .quiz-container {
            background: #f8f9ff;
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
        }

        .quiz-progress {
            background: #e0e6ed;
            border-radius: 10px;
            height: 10px;
            margin-bottom: 20px;
            overflow: hidden;
        }

        .quiz-progress-bar {
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
            height: 100%;
            width: 0%;
            transition: width 0.3s ease;
        }

        .quiz-question {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 15px;
            border: 2px solid #e0e6ed;
            transition: all 0.3s ease;
        }

        .quiz-question.current {
            border-color: #4facfe;
            box-shadow: 0 0 20px rgba(79, 172, 254, 0.2);
        }

        .quiz-question.answered-correct {
            border-color: #4caf50;
            background: #f1f8e9;
        }

        .quiz-question.answered-wrong {
            border-color: #f44336;
            background: #ffebee;
        }

        .quiz-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 20px;
        }

        .quiz-score {
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
            color: white;
            padding: 15px 25px;
            border-radius: 25px;
            font-weight: bold;
            text-align: center;
            margin: 20px 0;
        }

        .quiz-feedback {
            padding: 15px;
            border-radius: 8px;
            margin-top: 10px;
            font-weight: bold;
        }

        .quiz-feedback.correct {
            background: #e8f5e8;
            color: #2e7d32;
            border: 1px solid #4caf50;
        }

        .quiz-feedback.wrong {
            background: #ffebee;
            color: #c62828;
            border: 1px solid #f44336;
        }

        .exercise-content {
            padding: 25px;
            background: #fafbfc;
        }

        .intro-text {
            background: #e8f4f8;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
            border-right: 4px solid #4facfe;
            font-weight: 500;
        }

        .question {
            margin: 20px 0;
            padding: 15px;
            background: white;
            border-radius: 8px;
            border-right: 3px solid #764ba2;
            font-weight: 600;
            font-size: 16px;
        }

        .math-text {
            background: #f8f9ff;
            padding: 15px;
            margin: 10px 0;
            border-radius: 8px;
            border: 1px solid #e0e6ed;
            font-family: 'Courier New', monospace;
            font-size: 16px;
            text-align: center;
        }

        /* TABLE QCM */
        .mcq-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 3px 10px rgba(0,0,0,0.1);
        }

        .mcq-table th {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 15px;
            font-weight: bold;
            text-align: center;
        }

        .mcq-table td {
            padding: 15px;
            border-bottom: 1px solid #e0e6ed;
            text-align: center;
        }

        .mcq-table tr:hover {
            background: #f8f9ff;
        }

        .mcq-option {
            padding: 8px 15px;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            background: #f0f2f5;
            display: inline-block;
            margin: 2px;
        }

        .mcq-option:hover {
            background: #e3f2fd;
            transform: translateY(-2px);
        }

        .mcq-option.correct {
            background: #4caf50;
            color: white;
            animation: pulse 0.6s ease;
        }

        .mcq-option.incorrect {
            background: #f44336;
            color: white;
            animation: shake 0.6s ease;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }

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

        /* BOUTONS */
        button {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: 25px;
            cursor: pointer;
            font-size: 14px;
            font-weight: bold;
            transition: all 0.3s ease;
            margin: 15px 0;
        }

        button:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }

        /* SOLUTIONS */
        .solution {
            display: none;
            background: #f0f8ff;
            border: 2px solid #4facfe;
            border-radius: 10px;
            padding: 20px;
            margin-top: 15px;
            animation: slideDown 0.5s ease;
        }

        .solution.show {
            display: block;
        }

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

        .calculation {
            background: white;
            padding: 15px;
            margin: 10px 0;
            border-radius: 8px;
            border-right: 3px solid #4facfe;
            font-family: 'Courier New', monospace;
        }

        .highlight {
            background: #ffeb3b;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: bold;
        }

        /* RESPONSIVE */
        @media (max-width: 768px) {
            .school-header {
                grid-template-columns: 1fr;
                text-align: center;
            }
            
            .container {
                margin: 10px;
                border-radius: 10px;
            }
            
            .exercise {
                margin: 15px;
            }
            
            .mcq-table {
                font-size: 14px;
            }
        }