 :root {
            --primary-color: #3498db;
            --gradient-primary: linear-gradient(135deg, #3498db, #2980b9);
            --border-radius: 12px;
            --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.1);
            --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
            --transition: all 0.3s ease;
        }
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            margin: 0;
            padding: 20px;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 200vh;
        }
        .main-content {
            max-width: 800px;
            margin: 0 auto;
            background: white;
            padding: 40px;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-soft);
        }
        h1 {
            color: var(--primary-color);
            text-align: center;
            margin-bottom: 30px;
        }
        .help-button {
    position: fixed !important;
    top: 20px !important;
    left: 20px !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: var(--gradient-primary) !important;
    color: white !important;
    border: none !important;
    font-size: 1.8em !important;
    font-weight: bold !important;
    cursor: pointer !important;
    box-shadow: var(--shadow-soft) !important;
    transition: var(--transition) !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
        .help-button:hover {
            transform: scale(1.1);
            box-shadow: var(--shadow-hover);
        }
        .help-panel {
            position: fixed;
            top: 80px;
            left: 20px;
            width: 320px;
            max-height: 400px;
            background: white;
            border-radius: var(--border-radius);
            padding: 0;
            box-shadow: var(--shadow-hover);
            z-index: 999;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: var(--transition);
            overflow: hidden;
        }
        .help-panel.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }
        .help-panel-content {
            padding: 20px;
            max-height: 360px;
            overflow-y: auto;
            overflow-x: hidden;
            direction: rtl;
        }
        .help-panel-content::-webkit-scrollbar {
            width: 8px;
        }
        .help-panel-content::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }
        .help-panel-content::-webkit-scrollbar-thumb {
            background: var(--primary-color);
            border-radius: 4px;
        }
        .help-panel-content::-webkit-scrollbar-thumb:hover {
            background: #2980b9;
        }
        .help-panel h3 {
            color: var(--primary-color);
            margin-bottom: 15px;
            text-align: center;
            margin-top: 0;
        }
        .help-panel h4 {
            color: #2c3e50;
            margin: 20px 0 10px 0;
            font-size: 1.1em;
        }
        .help-panel h5 {
            color: #e74c3c;
            margin: 15px 0 8px 0;
            font-size: 1em;
        }
        .help-panel p {
            line-height: 1.6;
            margin-bottom: 10px;
        }
        .help-panel ol {
            padding-right: 20px;
            margin: 10px 0;
        }
        .help-panel li {
            margin-bottom: 8px;
        }
        .help-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 998;
            background: transparent;
            display: none;
        }
        .help-overlay.show {
            display: block;
        }
        
        /* Styles pour les sections du panneau d'aide */
        .math-rule {
            background: #e8f4f8;
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 15px;
            margin: 15px 0;
            text-align: center;
        }
        
        .example-section {
            background: rgba(52, 152, 219, 0.1);
            border-right: 3px solid var(--primary-color);
            padding: 12px;
            margin: 12px 0;
            border-radius: 5px;
        }
        
        .warning-section {
            background: rgba(231, 76, 60, 0.1);
            border-right: 3px solid #e74c3c;
            padding: 12px;
            margin: 12px 0;
            border-radius: 5px;
        }
        
        .exercise-list {
            background: rgba(155, 89, 182, 0.1);
            border-right: 3px solid #9b59b6;
            padding: 12px;
            margin: 12px 0;
            border-radius: 5px;
        }
        
        .application-section {
            background: rgba(39, 174, 96, 0.1);
            border-right: 3px solid #27ae60;
            padding: 12px;
            margin: 12px 0;
            border-radius: 5px;
        }
        
        .complementary-rules {
            background: rgba(243, 156, 18, 0.1);
            border-right: 3px solid #f39c12;
            padding: 12px;
            margin: 12px 0;
            border-radius: 5px;
        }
        
        .final-tip {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 15px;
            margin: 15px 0;
            border-radius: 8px;
            text-align: center;
        }
        
        /* Styles pour MathJax */
        .help-panel-content .MathJax,
        .help-panel-content .MathJax_Display,
        .help-panel-content mjx-container {
            direction: ltr !important;
            text-align: left !important;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .help-panel {
                width: 280px;
                left: 10px;
                max-height: 350px;
            }
            .help-panel-content {
                max-height: 310px;
            }
            .help-button {
                width: 45px;
                height: 45px;
                font-size: 1.5em;
                left: 15px;
                top: 15px;
            }
        }
        @media (max-width: 480px) {
            .help-panel {
                width: calc(100vw - 30px);
                left: 15px;
                right: 15px;
            }