/**
 * api-client.js - Gestionnaire des appels AJAX sécurisés
 */
export const APIClient = {
    post: function(action, data = {}) {
        const payload = {
            action: action,
            nonce: window.avisionSettings ? window.avisionSettings.nonce : '',
            ...data
        };
        const ajaxUrl = window.avisionSettings ? window.avisionSettings.ajaxUrl : '/api.php';
        return jQuery.post(ajaxUrl, payload);
    }
};
