/* Système d'aide universel - Version corrigée */
.universal-help-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 50px;
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    outline: none;
    direction: rtl;
    z-index: 10000;
}

.universal-help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.universal-help-btn.active {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.universal-help-panel {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 350px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    direction: rtl;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

.universal-help-panel.show {
    max-height: 80vh;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.universal-help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    direction: rtl;
}

.universal-help-title {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.universal-help-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

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

.universal-help-content {
    padding: 25px;
    line-height: 1.6;
    color: #333;
    direction: rtl;
    text-align: right;
}

.universal-help-content h3,
.universal-help-content h4 {
    color: #667eea;
    margin-top: 20px;
    margin-bottom: 10px;
}

.universal-help-content ol,
.universal-help-content ul {
    padding-right: 20px;
    margin: 15px 0;
}

.universal-help-content li {
    margin-bottom: 8px;
}

.help-example {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border-right: 4px solid #667eea;
}

.help-note {
    background-color: #fff3cd;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border-right: 4px solid #f39c12;
    color: #856404;
}

#help-content {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .universal-help-btn {
        top: 15px;
        left: 15px;
        padding: 10px 15px;
        font-size: 13px;
    }

    .universal-help-panel {
        top: 70px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: calc(100vw - 20px);
    }

    .universal-help-content {
        padding: 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .universal-help-btn {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 12px;
    }

    .universal-help-panel {
        top: 60px;
        left: 5px;
        right: 5px;
        max-width: calc(100vw - 10px);
    }
}
}