<?php
declare(strict_types=1);

use App\Core\Router;

return static function (Router $router): void {

    $router->get(
        '/',
        [App\Controllers\DashboardController::class, 'index']
    );

    $router->get(
        '/login',
        [App\Controllers\AuthController::class, 'show']
    );
    $router->post(
        '/login',
        [App\Controllers\AuthController::class, 'login']
    );
    $router->post(
        '/logout',
        [App\Controllers\AuthController::class, 'logout']
    );

    $router->get('/mfa', [App\Controllers\MfaController::class, 'challenge']);
    $router->post('/mfa/verifier', [App\Controllers\MfaController::class, 'verify']);
    $router->post('/mfa/activer', [App\Controllers\MfaController::class, 'enroll']);
    $router->get('/mfa/codes', [App\Controllers\MfaController::class, 'codes']);

    $router->get(
        '/clients',
        [App\Controllers\ClientController::class, 'index']
    );
    $router->get(
        '/clients/nouveau',
        [App\Controllers\ClientController::class, 'create']
    );
    $router->post(
        '/clients',
        [App\Controllers\ClientController::class, 'store']
    );
    $router->get(
        '/clients/voir',
        [App\Controllers\ClientController::class, 'show']
    );
    // Alias métier historique conservé : plusieurs contrôleurs et vues
    // redirigent vers cette URL avec la référence permanente de l'adhérent.
    $router->get(
        '/adherents/fiche',
        [App\Controllers\ClientController::class, 'show']
    );
    $router->get(
        '/adherents/dossier',
        [App\Controllers\ClientController::class, 'show']
    );
    $router->get('/mon-espace/dossier', [App\Controllers\ClientController::class, 'familyDossier']);
    $router->get('/mon-espace/dossier/identite', [App\Controllers\ClientController::class, 'familyDossier']);
    $router->get('/mon-espace/dossier/famille', [App\Controllers\ClientController::class, 'familyDossier']);
    $router->get('/mon-espace/dossier/annees', [App\Controllers\ClientController::class, 'familyDossier']);
    $router->get('/mon-espace/dossier/documents', [App\Controllers\ClientController::class, 'familyDossier']);
    $router->get('/mon-espace/dossier/factures', [App\Controllers\ClientController::class, 'familyDossier']);
    $router->get('/mon-espace/dossier/historique', [App\Controllers\ClientController::class, 'familyDossier']);
    $router->post(
        '/clients/dossier-annuel/activer',
        [App\Controllers\ClientController::class, 'activateAnnualFile']
    );
    $router->get(
        '/clients/membres/nouveau',
        [App\Controllers\ClientController::class, 'createMember']
    );
    $router->get(
        '/adherents/membres/nouveau',
        [App\Controllers\ClientController::class, 'createMember']
    );
    $router->post(
        '/clients/membres',
        [App\Controllers\ClientController::class, 'storeMember']
    );
    $router->get('/clients/modifier',[App\Controllers\ClientController::class,'edit']);
    $router->post('/clients/modifier',[App\Controllers\ClientController::class,'update']);

    $router->get(
        '/professeurs',
        [App\Controllers\ProfessorController::class, 'index']
    );
    $router->get(
        '/professeurs/nouveau',
        [App\Controllers\ProfessorController::class, 'create']
    );
    $router->post(
        '/professeurs',
        [App\Controllers\ProfessorController::class, 'store']
    );
    $router->get(
        '/professeurs/voir',
        [App\Controllers\ProfessorController::class, 'show']
    );
    $router->get(
        '/professeurs/agenda',
        [App\Controllers\ProfessorAgendaController::class, 'index']
    );
    $router->get(
        '/professeurs/modifier',
        [App\Controllers\ProfessorController::class, 'edit']
    );
    $router->post(
        '/professeurs/modifier',
        [App\Controllers\ProfessorController::class, 'update']
    );
    $router->post(
        '/professeurs/archiver',
        [App\Controllers\ProfessorController::class, 'archive']
    );
    $router->get('/presences',[App\Controllers\AttendanceController::class,'index']);
    $router->post('/presences/seance',[App\Controllers\AttendanceController::class,'create']);
    $router->get('/presences/feuille',[App\Controllers\AttendanceController::class,'sheet']);
    $router->post('/presences/pointer',[App\Controllers\AttendanceController::class,'mark']);
    $router->post('/presences/valider',[App\Controllers\AttendanceController::class,'validate']);
    $router->post('/presences/emargement',[App\Controllers\AttendanceDocumentController::class,'upload']);
    $router->get('/presences/emargements',[App\Controllers\AttendanceDocumentController::class,'page']);
    $router->get('/presences/emargement/telecharger',[App\Controllers\AttendanceDocumentController::class,'download']);
    $router->post('/presences/emargement/valider',[App\Controllers\AttendanceDocumentController::class,'validate']);
    $router->get('/presences/justificatifs',[App\Controllers\AttendanceJustificationController::class,'page']);
    $router->post('/presences/justificatif',[App\Controllers\AttendanceJustificationController::class,'upload']);
    $router->get('/presences/justificatif/telecharger',[App\Controllers\AttendanceJustificationController::class,'download']);
    $router->post('/presences/emargement/archiver',[App\Controllers\AttendanceJustificationController::class,'archiveEmargement']);

    $router->get(
        '/ateliers',
        [App\Controllers\WorkshopController::class, 'index']
    );
    $router->get(
        '/ateliers/nouveau',
        [App\Controllers\WorkshopController::class, 'create']
    );
    $router->post(
        '/ateliers',
        [App\Controllers\WorkshopController::class, 'store']
    );


    /*
     * CDA MASTER UPDATE 6.0 — Groupes et créneaux
     */
    $router->get(
        '/groupes',
        [App\Controllers\CourseGroupV6Controller::class, 'index']
    );
    $router->get(
        '/groupes/nouveau',
        [App\Controllers\CourseGroupV6Controller::class, 'create']
    );
    $router->post(
        '/groupes',
        [App\Controllers\CourseGroupV6Controller::class, 'store']
    );
    $router->get(
        '/groupes/modifier',
        [App\Controllers\CourseGroupV6Controller::class, 'edit']
    );
    $router->post(
        '/groupes/modifier',
        [App\Controllers\CourseGroupV6Controller::class, 'update']
    );
    $router->post(
        '/groupes/archiver',
        [App\Controllers\CourseGroupV6Controller::class, 'archive']
    );
    $router->get(
        '/parametres',
        [App\Controllers\ParameterController::class, 'index']
    );
    $router->post(
        '/parametres/poles',
        [App\Controllers\ParameterController::class, 'storePole']
    );
    $router->post(
        '/parametres/disciplines',
        [App\Controllers\ParameterController::class, 'storeDiscipline']
    );

    $router->get(
        '/tarifs',
        [App\Controllers\PricingController::class, 'index']
    );
    $router->post(
        '/tarifs/grille',
        [App\Controllers\PricingController::class, 'createGrid']
    );
    $router->post(
        '/tarifs/ligne',
        [App\Controllers\PricingController::class, 'addLine']
    );
    $router->get(
        '/tarifs/pdf',
        [App\Controllers\PricingController::class, 'pdf']
    );
    $router->get(
        '/tarifs/reductions',
        [App\Controllers\PricingController::class, 'reductions']
    );
    $router->post(
        '/tarifs/reductions',
        [App\Controllers\PricingController::class, 'createReduction']
    );
    $router->get(
        '/tarifs/diffusion',
        [App\Controllers\PricingController::class, 'diffusion']
    );

    $router->get(
        '/utilisateurs',
        [App\Controllers\UserController::class, 'index']
    );


    /*
     * CORRECTIF CDA V5.2.1
     */
    $router->get(
        '/parametres/pedagogie',
        [App\Controllers\ParameterController::class, 'index']
    );

    $router->get(
        '/ateliers/modifier',
        [App\Controllers\WorkshopManagementController::class, 'edit']
    );

    $router->post(
        '/ateliers/modifier',
        [App\Controllers\WorkshopManagementController::class, 'update']
    );

    $router->post(
        '/ateliers/archiver',
        [App\Controllers\WorkshopManagementController::class, 'archive']
    );

    $router->get(
        '/parametres/poles/modifier',
        [App\Controllers\ParameterManagementController::class, 'editPole']
    );

    $router->post(
        '/parametres/poles/modifier',
        [App\Controllers\ParameterManagementController::class, 'updatePole']
    );

    $router->post(
        '/parametres/poles/archiver',
        [App\Controllers\ParameterManagementController::class, 'archivePole']
    );

    $router->get(
        '/parametres/disciplines/modifier',
        [App\Controllers\ParameterManagementController::class, 'editDiscipline']
    );

    $router->post(
        '/parametres/disciplines/modifier',
        [App\Controllers\ParameterManagementController::class, 'updateDiscipline']
    );

    $router->post(
        '/parametres/disciplines/archiver',
        [App\Controllers\ParameterManagementController::class, 'archiveDiscipline']
    );


    /* CDA UPDATE 6.1 — Icônes */
    $router->get(
        '/parametres/icones',
        [App\Controllers\DisciplineIconController::class, 'index']
    );
    $router->post(
        '/parametres/icones',
        [App\Controllers\DisciplineIconController::class, 'store']
    );
    $router->post(
        '/parametres/icones/archiver',
        [App\Controllers\DisciplineIconController::class, 'archive']
    );
    $router->post(
        '/parametres/disciplines/icone',
        [App\Controllers\DisciplineIconController::class, 'assign']
    );

    /* CDA 6.2.1 */
    $router->get(
        '/parametres/types-contrats',
        [App\Controllers\ContractTypeController::class, 'index']
    );
    $router->post(
        '/parametres/types-contrats',
        [App\Controllers\ContractTypeController::class, 'store']
    );
    $router->post(
        '/parametres/types-contrats/archiver',
        [App\Controllers\ContractTypeController::class, 'archive']
    );
    $router->get(
        '/professeurs/contrats',
        [App\Controllers\ProfessorContractController::class, 'index']
    );
    $router->get(
        '/professeurs/contrats/nouveau',
        [App\Controllers\ProfessorContractController::class, 'create']
    );
    $router->post(
        '/professeurs/contrats',
        [App\Controllers\ProfessorContractController::class, 'store']
    );
    $router->get(
        '/professeurs/contrats/modifier',
        [App\Controllers\ProfessorContractController::class, 'edit']
    );
    $router->post(
        '/professeurs/contrats/modifier',
        [App\Controllers\ProfessorContractController::class, 'update']
    );
    $router->post(
        '/professeurs/contrats/archiver',
        [App\Controllers\ProfessorContractController::class, 'archive']
    );

    /* CDA CORE 1.0 - Sauvegardes */
    $router->get(
        '/studio/sauvegardes',
        [App\Controllers\BackupController::class, 'index']
    );
    $router->post(
        '/studio/sauvegardes/creer',
        [App\Controllers\BackupController::class, 'create']
    );
    $router->post(
        '/studio/sauvegardes/export-developpeur',
        [App\Controllers\BackupController::class, 'developerExport']
    );
    $router->get(
        '/studio/sauvegardes/telecharger',
        [App\Controllers\BackupController::class, 'download']
    );
    $router->post(
        '/studio/sauvegardes/restaurer',
        [App\Controllers\BackupController::class, 'restore']
    );
    $router->post(
        '/studio/sauvegardes/supprimer',
        [App\Controllers\BackupController::class, 'delete']
    );


    /* CDA 6.2.2 — Professeurs PRO */
    $router->get(
        '/professeurs-pro',
        [App\Controllers\ProfessorProController::class, 'index']
    );
    $router->get(
        '/professeurs-pro/voir',
        [App\Controllers\ProfessorProController::class, 'show']
    );
    $router->get(
        '/professeurs-pro/disciplines',
        [App\Controllers\ProfessorProController::class, 'disciplines']
    );
    $router->post(
        '/professeurs-pro/disciplines',
        [App\Controllers\ProfessorProController::class, 'saveDisciplines']
    );
    $router->get('/professeurs-rh', [App\Controllers\ProfessorProController::class, 'rhIndex']);
    $router->get('/professeurs-rh/voir', [App\Controllers\ProfessorProController::class, 'rhShow']);
    $router->get('/professeurs-pro/planning', [App\Controllers\DisciplinePlanningController::class, 'professor']);
    $router->post('/professeurs-pro/planning/creneau', [App\Controllers\DisciplinePlanningController::class, 'slot']);
    $router->post('/professeurs-pro/planning/creneau/modifier', [App\Controllers\DisciplinePlanningController::class, 'updateSlot']);
    $router->post('/professeurs-pro/planning/deplacement/demander', [App\Controllers\DisciplinePlanningController::class, 'requestMove']);
    $router->post('/professeurs-pro/planning/deplacement/decider', [App\Controllers\DisciplinePlanningController::class, 'decideMove']);
    $router->post('/professeurs-pro/planning/reunion', [App\Controllers\DisciplinePlanningController::class, 'meeting']);
    $router->get('/direction/taches', [App\Controllers\DirectionPlanningController::class, 'tasks']);
    $router->get('/direction/reunions', [App\Controllers\DirectionPlanningController::class, 'meetings']);
    $router->post('/direction/reunions/creer', [App\Controllers\DirectionPlanningController::class, 'createMeeting']);
    $router->post('/direction/reunions/invites/ajouter', [App\Controllers\DirectionPlanningController::class, 'addMeetingGuests']);
    $router->post('/professeurs-pro/planning/creneau/archiver', [App\Controllers\DisciplinePlanningController::class, 'archiveSlot']);
    $router->post('/professeurs-pro/planning/valider', [App\Controllers\DisciplinePlanningController::class, 'validatePlanning']);
    $router->get('/professeurs-pro/attente', [App\Controllers\DisciplinePlanningController::class, 'waiting']);
    $router->post('/professeurs-pro/planning/affectation', [App\Controllers\DisciplinePlanningController::class, 'proposeStudent']);
    $router->post('/professeurs-pro/planning/affectation/decider', [App\Controllers\DisciplinePlanningController::class, 'decideStudent']);
    $router->get('/professeurs-pro/teletravail', [App\Controllers\ProfessorRemoteWorkController::class, 'index']);
    $router->post('/professeurs-pro/teletravail/accorder', [App\Controllers\ProfessorRemoteWorkController::class, 'grant']);
    $router->post('/professeurs-pro/teletravail/modification/demander', [App\Controllers\ProfessorRemoteWorkController::class, 'requestChange']);
    $router->post('/professeurs-pro/teletravail/modification/decider', [App\Controllers\ProfessorRemoteWorkController::class, 'decideChange']);
    $router->post('/professeurs-pro/teletravail/envoyer', [App\Controllers\ProfessorRemoteWorkController::class, 'submit']);
    $router->post('/professeurs-pro/teletravail/decider', [App\Controllers\ProfessorRemoteWorkController::class, 'decide']);
    $router->get('/validations-affectations', [App\Controllers\DisciplinePlanningController::class, 'assignmentValidations']);
    $router->get('/professeurs/annee', [App\Controllers\ProfessorYearController::class, 'index']);
    $router->post('/professeurs/annee/generer', [App\Controllers\ProfessorYearController::class, 'generate']);
    $router->post('/professeurs/annee/demande', [App\Controllers\ProfessorYearController::class, 'request']);
    $router->post('/professeurs/annee/decider', [App\Controllers\ProfessorYearController::class, 'decide']);
    $router->get('/pilotage-disciplines', [App\Controllers\DisciplinePlanningController::class, 'index']);
    $router->post('/pilotage-disciplines/statuts', [App\Controllers\DisciplinePlanningController::class, 'statuses']);


    /* CDA 6.2.4 — Centre mises à jour */
    $router->get(
        '/studio/mises-a-jour',
        [App\Controllers\UpdateCenterController::class, 'index']
    );
    $router->post(
        '/studio/mises-a-jour/importer',
        [App\Controllers\UpdateCenterController::class, 'import']
    );
    $router->post(
        '/studio/mises-a-jour/installer',
        [App\Controllers\UpdateCenterController::class, 'install']
    );
    $router->post(
        '/studio/mises-a-jour/debloquer',
        [App\Controllers\UpdateCenterController::class, 'unlock']
    );


    /* CDA 6.2.5 — Participants groupes */
    $router->get(
        '/groupes/participants',
        [App\Controllers\GroupParticipantController::class, 'index']
    );
    $router->post(
        '/groupes/participants/affecter',
        [App\Controllers\GroupParticipantController::class, 'assign']
    );
    $router->post(
        '/groupes/participants/retirer',
        [App\Controllers\GroupParticipantController::class, 'remove']
    );


    /* CDA 6.2.6 */
    $router->get('/recherche-globale', [App\Controllers\GlobalSearchController::class, 'search']);
    $router->get('/inscriptions/nouvelle', [App\Controllers\EnrollmentController::class, 'create']);
    $router->get('/inscriptions/groupes', [App\Controllers\EnrollmentController::class, 'groups']);
    $router->post('/inscriptions', [App\Controllers\EnrollmentController::class, 'store']);

    /* CDA 6.2.7 — Membres et consentements */
    $router->get(
        '/membres/voir',
        [App\Controllers\MemberController::class, 'show']
    );
    $router->get(
        '/membres/modifier',
        [App\Controllers\MemberController::class, 'edit']
    );
    $router->post(
        '/membres/modifier',
        [App\Controllers\MemberController::class, 'update']
    );
    $router->get(
        '/consentements/nouveau',
        [App\Controllers\ConsentController::class, 'create']
    );
    $router->post(
        '/consentements',
        [App\Controllers\ConsentController::class, 'store']
    );
    $router->get(
        '/consentements/signature',
        [App\Controllers\ConsentController::class, 'signature']
    );
    $router->post(
        '/consentements/signature',
        [App\Controllers\ConsentController::class, 'sign']
    );
    $router->post(
        '/consentements/envoyer',
        [App\Controllers\ConsentController::class, 'send']
    );
    $router->get(
        '/consentement-public',
        [App\Controllers\ConsentController::class, 'publicForm']
    );
    $router->post(
        '/consentement-public/signature',
        [App\Controllers\ConsentController::class, 'publicSign']
    );
    $router->get('/mon-espace/documents/signature', [App\Controllers\ConsentController::class, 'familySignature']);
    $router->post('/mon-espace/documents/signature', [App\Controllers\ConsentController::class, 'familySign']);
    $router->get('/mon-espace/documents/telecharger', [App\Controllers\ConsentController::class, 'familyDownload']);
    $router->get(
        '/demandes-inscription/nouvelle',
        [App\Controllers\EnrollmentRequestController::class, 'create']
    );
    $router->post(
        '/demandes-inscription',
        [App\Controllers\EnrollmentRequestController::class, 'store']
    );
    $router->get('/demandes-inscription/assistant-ia', [App\Controllers\EnrollmentRequestController::class, 'aiAssistant']);
    $router->post('/demandes-inscription/assistant-ia/proposer', [App\Controllers\EnrollmentRequestController::class, 'createAiProposals']);


    /* CDA 6.2.7.1 — Membres et consentements */


    /* CDA 7.0.0 — Communications */
    $router->get(
        '/communications',
        [App\Controllers\CommunicationController::class, 'index']
    );
    $router->get(
        '/communications/nouvelle',
        [App\Controllers\CommunicationController::class, 'create']
    );
    $router->post(
        '/communications',
        [App\Controllers\CommunicationController::class, 'store']
    );
    $router->get(
        '/communications/voir',
        [App\Controllers\CommunicationController::class, 'show']
    );
    $router->post(
        '/communications/valider',
        [App\Controllers\CommunicationController::class, 'validate']
    );
    $router->post(
        '/communications/envoyer',
        [App\Controllers\CommunicationController::class, 'send']
    );


    /* CDA 7.0.1 — Communication intelligente */
    $router->get(
        '/communications/intelligente',
        [App\Controllers\SmartCommunicationController::class, 'composer']
    );
    $router->get(
        '/communications/destinataires',
        [App\Controllers\SmartCommunicationController::class, 'recipients']
    );
    $router->get(
        '/communications/adresses',
        [App\Controllers\SmartCommunicationController::class, 'addresses']
    );
    $router->post(
        '/communications/apercu-intelligent',
        [App\Controllers\SmartCommunicationController::class, 'preview']
    );


    /* CDA 7.0.1.1 — Communication intelligente */


    /* CDA 7.0.1.3 — Communication intelligente */
    $router->get(
        '/communications/repertoire/personnes',
        [App\Controllers\CommunicationDirectoryController::class, 'people']
    );
    $router->get(
        '/communications/repertoire/activites',
        [App\Controllers\CommunicationDirectoryController::class, 'activities']
    );


    /* CDA 7.0.1.5 — Communication intelligente */
    $router->get(
        '/communications/repertoire/test',
        [App\Controllers\CommunicationDirectoryController::class, 'test']
    );


    /* CDA 7.0.1.6 — Communication intelligente */
    $router->get(
        '/administration/comptes',
        [App\Controllers\AccountAdminController::class, 'index']
    );
    $router->get(
        '/administration/comptes/nouveau',
        [App\Controllers\AccountAdminController::class, 'create']
    );
    $router->post(
        '/administration/comptes',
        [App\Controllers\AccountAdminController::class, 'store']
    );
    $router->get(
        '/administration/comptes/modifier',
        [App\Controllers\AccountAdminController::class, 'edit']
    );
    $router->post(
        '/administration/comptes/modifier',
        [App\Controllers\AccountAdminController::class, 'update']
    );
    $router->post(
        '/administration/comptes/activer',
        [App\Controllers\AccountAdminController::class, 'toggle']
    );

    $router->get(
        '/administration/securite',
        [App\Controllers\SecurityAuthorizationController::class, 'index']
    );
    $router->get(
        '/administration/securite/role',
        [App\Controllers\SecurityAuthorizationController::class, 'role']
    );
    $router->post(
        '/administration/securite/role',
        [App\Controllers\SecurityAuthorizationController::class, 'saveRole']
    );
    $router->get(
        '/administration/securite/utilisateur',
        [App\Controllers\SecurityAuthorizationController::class, 'user']
    );
    $router->post(
        '/administration/securite/utilisateur',
        [App\Controllers\SecurityAuthorizationController::class, 'saveUser']
    );
    $router->get(
        '/administration/securite/journal',
        [App\Controllers\SecurityAuthorizationController::class, 'auditLog']
    );
    $router->get(
        '/administration/securite/supervision',
        [App\Controllers\SecurityDashboardController::class, 'index']
    );
    $router->get(
        '/administration/securite/zero-trust',
        [App\Controllers\ZeroTrustController::class, 'index']
    );
    $router->get('/administration/securite/mfa', [App\Controllers\MfaSettingsController::class, 'index']);
    $router->post('/administration/securite/mfa/desactiver', [App\Controllers\MfaSettingsController::class, 'disable']);
    $router->get(
        '/administration/securite/ueba',
        [App\Controllers\SecurityBehaviorAnalyticsController::class, 'index']
    );
    $router->get(
        '/administration/securite/soc',
        [App\Controllers\SecurityOperationsCenterController::class, 'index']
    );
    $router->get(
        '/administration/securite/soc/export.csv',
        [App\Controllers\SecurityOperationsCenterController::class, 'exportCsv']
    );
    $router->post(
        '/administration/securite/soc/incident',
        [App\Controllers\SecurityOperationsCenterController::class, 'updateIncident']
    );
    $router->post('/administration/securite/soc/affecter', [App\Controllers\SecurityOperationsCenterController::class, 'assignIncident']);
    $router->post('/administration/securite/soc/action', [App\Controllers\SecurityOperationsCenterController::class, 'addResponseAction']);
    $router->post('/administration/securite/soc/rouvrir', [App\Controllers\SecurityOperationsCenterController::class, 'reopenIncident']);
    $router->get('/administration/securite/soc/rapport', [App\Controllers\SecurityOperationsCenterController::class, 'reportHtml']);
    $router->get('/administration/securite/soc/playbooks', [App\Controllers\SocPlaybookController::class, 'index']);
    $router->post('/administration/securite/soc/playbooks/demarrer', [App\Controllers\SocPlaybookController::class, 'start']);
    $router->post('/administration/securite/soc/playbooks/etape', [App\Controllers\SocPlaybookController::class, 'step']);
    $router->post('/administration/securite/soc/playbooks/statut', [App\Controllers\SocPlaybookController::class, 'status']);
    $router->get('/administration/securite/soc/analytics', [App\Controllers\SiemAnalyticsController::class, 'index']);
    $router->get('/administration/securite/soc/analytics/export.csv', [App\Controllers\SiemAnalyticsController::class, 'exportCsv']);
    $router->get('/administration/securite/soc/zero-trust', [App\Controllers\ZeroTrustPolicyController::class, 'index']);
    $router->post('/administration/securite/soc/zero-trust/enregistrer', [App\Controllers\ZeroTrustPolicyController::class, 'save']);
    $router->post('/administration/securite/soc/zero-trust/simuler', [App\Controllers\ZeroTrustPolicyController::class, 'simulate']);
    $router->post('/administration/securite/soc/zero-trust/statut', [App\Controllers\ZeroTrustPolicyController::class, 'toggle']);
    $router->get('/administration/securite/audit', [App\Controllers\AuditComplianceController::class, 'index']);
    $router->post('/administration/securite/audit/executer', [App\Controllers\AuditComplianceController::class, 'run']);
    $router->get('/administration/securite/audit/export.csv', [App\Controllers\AuditComplianceController::class, 'exportCsv']);
    $router->get('/administration/securite/executive', [App\Controllers\ExecutiveSecurityController::class, 'index']);
    $router->get('/administration/securite/executive/export.csv', [App\Controllers\ExecutiveSecurityController::class, 'exportCsv']);
    $router->get('/administration/securite/executive/rapport', [App\Controllers\ExecutiveSecurityController::class, 'printReport']);
    $router->get('/administration/securite/assistant-ia', [App\Controllers\AiSecurityAssistantController::class, 'index']);
    $router->post('/administration/securite/assistant-ia/interroger', [App\Controllers\AiSecurityAssistantController::class, 'ask']);
    $router->post('/administration/securite/assistant-ia/configuration', [App\Controllers\AiSecurityAssistantController::class, 'saveSettings']);
    $router->post('/administration/securite/assistant-ia/historique/vider', [App\Controllers\AiSecurityAssistantController::class, 'clearHistory']);
    $router->get('/administration/plateforme/rollback', [App\Controllers\RollbackTransactionManagerController::class, 'index']);
    $router->post('/administration/plateforme/rollback/executer', [App\Controllers\RollbackTransactionManagerController::class, 'execute']);
    $router->get('/administration/plateforme/validation', [App\Controllers\UpdateValidationEngineController::class, 'index']);
    $router->post('/administration/plateforme/validation/simuler', [App\Controllers\UpdateValidationEngineController::class, 'simulate']);
    $router->post('/administration/plateforme/validation/live/demarrer', [App\Controllers\UpdateValidationEngineController::class, 'liveStart']);
    $router->post('/administration/plateforme/validation/live/avancer', [App\Controllers\UpdateValidationEngineController::class, 'liveAdvance']);
    $router->get('/administration/plateforme/validation/live/statut', [App\Controllers\UpdateValidationEngineController::class, 'liveStatus']);
    $router->get('/administration/plateforme/confiance-packages', [App\Controllers\PackageTrustController::class, 'index']);
    $router->post('/administration/plateforme/confiance-packages/evaluer', [App\Controllers\PackageTrustController::class, 'evaluate']);
    $router->get('/administration/plateforme/compatibilite-packages', [App\Controllers\PackageCompatibilityController::class, 'index']);
    $router->post('/administration/plateforme/compatibilite-packages/evaluer', [App\Controllers\PackageCompatibilityController::class, 'evaluate']);
    $router->get('/administration/plateforme/certification-packages', [App\Controllers\PackageCertificationController::class, 'index']);
    $router->post('/administration/plateforme/certification-packages/certifier', [App\Controllers\PackageCertificationController::class, 'certify']);
    $router->post('/administration/plateforme/certification-packages/revoquer', [App\Controllers\PackageCertificationController::class, 'revoke']);
    $router->get('/administration/plateforme/politiques-packages', [App\Controllers\PackagePolicyController::class, 'index']);
    $router->post('/administration/plateforme/politiques-packages/evaluer', [App\Controllers\PackagePolicyController::class, 'evaluate']);
    $router->post('/administration/plateforme/politiques-packages/enregistrer', [App\Controllers\PackagePolicyController::class, 'save']);
    $router->post('/administration/plateforme/politiques-packages/statut', [App\Controllers\PackagePolicyController::class, 'toggle']);

    $router->get('/administration/plateforme/packages', [App\Controllers\PackageManagerController::class, 'index']);
    $router->post('/administration/plateforme/packages/synchroniser', [App\Controllers\PackageManagerController::class, 'synchronize']);
    $router->get('/administration/plateforme/packages/export.csv', [App\Controllers\PackageManagerController::class, 'exportCsv']);
    $router->get('/administration/plateforme/deploiement-orchestre', [App\Controllers\EnterpriseDeploymentOrchestratorController::class, 'index']);
    $router->post('/administration/plateforme/deploiement-orchestre/creer', [App\Controllers\EnterpriseDeploymentOrchestratorController::class, 'create']);
    $router->post('/administration/plateforme/deploiement-orchestre/avancer', [App\Controllers\EnterpriseDeploymentOrchestratorController::class, 'advance']);
    $router->get('/administration/plateforme/deploiement-orchestre/statut', [App\Controllers\EnterpriseDeploymentOrchestratorController::class, 'status']);
    $router->post('/administration/plateforme/deploiement-orchestre/annuler', [App\Controllers\EnterpriseDeploymentOrchestratorController::class, 'cancel']);
    $router->get('/administration/plateforme/packages/dependances', [App\Controllers\PackageDependencyController::class, 'index']);
    $router->post('/administration/plateforme/packages/dependances/analyser', [App\Controllers\PackageDependencyController::class, 'analyze']);
    $router->get('/administration/plateforme/packages/reparation', [App\Controllers\PackageRepairController::class, 'index']);
    $router->post('/administration/plateforme/packages/reparation/diagnostiquer', [App\Controllers\PackageRepairController::class, 'diagnose']);
    $router->post('/administration/plateforme/packages/reparation/executer', [App\Controllers\PackageRepairController::class, 'repair']);
    $router->get('/administration/plateforme/packages/catalogue', [App\Controllers\PackageCatalogController::class, 'index']);
    $router->post('/administration/plateforme/packages/catalogue/preference', [App\Controllers\PackageCatalogController::class, 'preference']);
    $router->get('/administration/plateforme/packages/catalogue/comparer', [App\Controllers\PackageCatalogController::class, 'compare']);
    $router->get('/administration/plateforme/packages/catalogue/export.csv', [App\Controllers\PackageCatalogController::class, 'exportCsv']);

    $router->get('/administration/plateforme/rapport-compatibilite', [App\Controllers\EnterpriseCompatibilityReportController::class, 'index']);
    $router->post('/administration/plateforme/rapport-compatibilite/evaluer', [App\Controllers\EnterpriseCompatibilityReportController::class, 'evaluate']);
    $router->get('/administration/plateforme/rapport-compatibilite/export.csv', [App\Controllers\EnterpriseCompatibilityReportController::class, 'exportCsv']);
    $router->get('/administration/plateforme/rapport-compatibilite/rapport', [App\Controllers\EnterpriseCompatibilityReportController::class, 'report']);
    $router->get('/administration/securite/soc/threat-intelligence', [App\Controllers\ThreatIntelligenceController::class, 'index']);
    $router->post('/administration/securite/soc/threat-intelligence/ajouter', [App\Controllers\ThreatIntelligenceController::class, 'add']);
    $router->post('/administration/securite/soc/threat-intelligence/detecter', [App\Controllers\ThreatIntelligenceController::class, 'detect']);
    $router->get(
        '/administration/securite/siem',
        [App\Controllers\SecurityInformationEventManagementController::class, 'index']
    );
    $router->get(
        '/administration/securite/siem/export.csv',
        [App\Controllers\SecurityInformationEventManagementController::class, 'exportCsv']
    );
    $router->get(
        '/administration/securite/incidents',
        [App\Controllers\SecurityIncidentResponseController::class, 'index']
    );
    $router->post(
        '/administration/securite/incidents/traiter',
        [App\Controllers\SecurityIncidentResponseController::class, 'update']
    );
    $router->get(
        '/administration/securite/sessions',
        [App\Controllers\SecuritySessionControlController::class, 'index']
    );
    $router->post(
        '/administration/securite/sessions/revoquer',
        [App\Controllers\SecuritySessionControlController::class, 'revokeUser']
    );
    $router->post(
        '/administration/securite/sessions/revoquer-autres',
        [App\Controllers\SecuritySessionControlController::class, 'revokeOthers']
    );
    $router->get('/administration/systeme/sante', [App\Controllers\HealthMonitorController::class, 'index']);
    $router->post('/administration/systeme/sante/analyser', [App\Controllers\HealthMonitorController::class, 'run']);
    $router->post('/administration/systeme/sante/baseline', [App\Controllers\HealthMonitorController::class, 'baseline']);
    $router->post('/administration/systeme/sante/acquitter', [App\Controllers\HealthMonitorController::class, 'acknowledge']);

    $router->get('/administration/securite/integrite-runtime', [App\Controllers\RuntimeIntegrityController::class, 'index']);
    $router->post('/administration/securite/integrite-runtime/analyser', [App\Controllers\RuntimeIntegrityController::class, 'scan']);
    $router->post('/administration/securite/integrite-runtime/politique', [App\Controllers\RuntimeIntegrityController::class, 'policy']);
    $router->get(
        '/administration/securite/integrite',
        [App\Controllers\SecurityAuditIntegrityController::class, 'index']
    );



    /* AXIOM PLATFORM V8.7 — KERNEL 1.0 */
    $router->get(
        '/administration/axiom/kernel',
        [App\Controllers\KernelController::class, 'index']
    );


    /* AXIOM PLATFORM V8.8 — META FRAMEWORK */
    $router->get(
        '/administration/axiom/meta',
        [App\Controllers\MetaController::class, 'index']
    );
    $router->post(
        '/administration/axiom/meta/entity/save',
        [App\Controllers\MetaController::class, 'saveEntity']
    );
    $router->post(
        '/administration/axiom/meta/field/save',
        [App\Controllers\MetaController::class, 'saveField']
    );
    $router->post(
        '/administration/axiom/meta/entity/archive',
        [App\Controllers\MetaController::class, 'archiveEntity']
    );


    /* AXIOM PLATFORM V8.9 — OBJECT MODEL */
    $router->get(
        '/administration/axiom/objects',
        [App\Controllers\ObjectModelController::class, 'index']
    );
    $router->post(
        '/administration/axiom/objects/save',
        [App\Controllers\ObjectModelController::class, 'save']
    );
    $router->post(
        '/administration/axiom/objects/archive',
        [App\Controllers\ObjectModelController::class, 'archive']
    );

    /* AXIOM PLATFORM V9.0 — WORKFLOW ENGINE */
    $router->get(
        '/administration/axiom/workflows',
        [App\Controllers\WorkflowController::class, 'index']
    );
    $router->post(
        '/administration/axiom/workflows/save',
        [App\Controllers\WorkflowController::class, 'saveWorkflow']
    );
    $router->post(
        '/administration/axiom/workflows/state/save',
        [App\Controllers\WorkflowController::class, 'saveState']
    );
    $router->post(
        '/administration/axiom/workflows/transition/save',
        [App\Controllers\WorkflowController::class, 'saveTransition']
    );
    $router->post(
        '/administration/axiom/workflows/instance/start',
        [App\Controllers\WorkflowController::class, 'startInstance']
    );
    $router->post(
        '/administration/axiom/workflows/instance/transition',
        [App\Controllers\WorkflowController::class, 'applyTransition']
    );
    $router->post(
        '/administration/axiom/workflows/task/complete',
        [App\Controllers\WorkflowController::class, 'completeTask']
    );

    /* AXIOM PLATFORM 9.2 — PLANNING ENGINE */
    $router->get('/administration/axiom/planning', [\App\Controllers\PlanningController::class, 'index']);
    $router->post('/administration/axiom/planning/calendar/save', [\App\Controllers\PlanningController::class, 'saveCalendar']);
    $router->post('/administration/axiom/planning/resource/save', [\App\Controllers\PlanningController::class, 'saveResource']);
    $router->post('/administration/axiom/planning/event/save', [\App\Controllers\PlanningController::class, 'saveEvent']);
    $router->post('/administration/axiom/planning/event/delete', [\App\Controllers\PlanningController::class, 'deleteEvent']);
    $router->post('/administration/axiom/planning/absence/save', [\App\Controllers\PlanningController::class, 'saveAbsence']);

    /* AXIOM PLATFORM V8.4 — IDENTITY ENGINE */
    $router->get(
        '/administration/axiom/documents',
        [\App\Controllers\DocumentController::class, 'index']
    );
    $router->post('/administration/axiom/documents/upload', [\App\Controllers\DocumentController::class, 'upload']);
    $router->post('/administration/axiom/documents/version/add', [\App\Controllers\DocumentController::class, 'addVersion']);
    $router->post('/administration/axiom/documents/category/save', [\App\Controllers\DocumentController::class, 'saveCategory']);
    $router->post('/administration/axiom/documents/link', [\App\Controllers\DocumentController::class, 'link']);
    $router->post('/administration/axiom/documents/signature/request', [\App\Controllers\DocumentController::class, 'requestSignature']);
    $router->post('/administration/axiom/documents/signature/mark', [\App\Controllers\DocumentController::class, 'markSigned']);
    $router->post('/administration/axiom/documents/template/save', [\App\Controllers\DocumentController::class, 'saveTemplate']);
    $router->post('/administration/axiom/documents/archive', [\App\Controllers\DocumentController::class, 'archive']);
    $router->get('/administration/axiom/documents/download', [\App\Controllers\DocumentController::class, 'download']);

    $router->get(
        '/administration/axiom/identites',
        [App\Controllers\IdentityController::class, 'index']
    );
    $router->get(
        '/administration/axiom/identites/nouveau',
        [App\Controllers\IdentityController::class, 'create']
    );
    $router->post(
        '/administration/axiom/identites/enregistrer',
        [App\Controllers\IdentityController::class, 'store']
    );
    $router->get(
        '/administration/axiom/identites/voir',
        [App\Controllers\IdentityController::class, 'show']
    );
    $router->post(
        '/administration/axiom/identites/archiver',
        [App\Controllers\IdentityController::class, 'archive']
    );

    /* AXIOM PLATFORM V8.3 — REFERENCE ENGINE */
    $router->get(
        '/administration/axiom/referentiels',
        [App\Controllers\ReferenceController::class, 'index']
    );
    $router->post(
        '/administration/axiom/referentiels/type/enregistrer',
        [App\Controllers\ReferenceController::class, 'saveType']
    );
    $router->post(
        '/administration/axiom/referentiels/valeur/enregistrer',
        [App\Controllers\ReferenceController::class, 'saveValue']
    );
    $router->post(
        '/administration/axiom/referentiels/valeur/archiver',
        [App\Controllers\ReferenceController::class, 'archiveValue']
    );
    $router->post(
        '/administration/axiom/referentiels/valeur/restaurer',
        [App\Controllers\ReferenceController::class, 'restoreValue']
    );

    /* AXIOM PLATFORM V8.2 — STUDIO */
    $router->get(
        '/administration/axiom',
        [App\Controllers\AxiomStudioController::class, 'index']
    );

    $router->get('/administration/axiom/modules', [App\Controllers\AxiomStudioController::class, 'modules']);
    $router->get('/administration/axiom/modules/nouveau', [App\Controllers\AxiomStudioController::class, 'createModule']);
    $router->post('/administration/axiom/modules', [App\Controllers\AxiomStudioController::class, 'storeModule']);
    $router->get('/administration/axiom/generateurs', [App\Controllers\AxiomStudioController::class, 'generators']);
    $router->get('/administration/axiom/fonctionnalites', [App\Controllers\AxiomStudioController::class, 'features']);
    $router->get('/administration/axiom/sdk', [App\Controllers\AxiomStudioController::class, 'documentation']);
    $router->get('/administration/axiom/entity-designer', [App\Controllers\AxiomStudioController::class, 'entityDesigner']);
    $router->post('/administration/axiom/entity-designer/entite', [App\Controllers\AxiomStudioController::class, 'storeEntity']);
    $router->post('/administration/axiom/entity-designer/champ', [App\Controllers\AxiomStudioController::class, 'storeField']);
    $router->post('/administration/axiom/entity-designer/relation', [App\Controllers\AxiomStudioController::class, 'storeRelation']);
    $router->post('/administration/axiom/entity-designer/archiver', [App\Controllers\AxiomStudioController::class, 'archiveDesignerObject']);
    $router->get('/administration/axiom/form-designer', [App\Controllers\AxiomStudioController::class, 'formDesigner']);
    $router->post('/administration/axiom/form-designer/composant', [App\Controllers\AxiomStudioController::class, 'storeFormComponent']);
    $router->post('/administration/axiom/form-designer/ordre', [App\Controllers\AxiomStudioController::class, 'reorderFormComponents']);
    $router->post('/administration/axiom/form-designer/archiver', [App\Controllers\AxiomStudioController::class, 'archiveFormComponent']);
    $router->get('/administration/axiom/crud-generator', [App\Controllers\AxiomStudioController::class, 'crudGenerator']);
    $router->post('/administration/axiom/crud-generator/generer', [App\Controllers\AxiomStudioController::class, 'generateCrud']);
    $router->get('/administration/axiom/workflow-designer', [App\Controllers\AxiomStudioController::class, 'workflowDesigner']);
    $router->post('/administration/axiom/workflow-designer/workflow', [App\Controllers\AxiomStudioController::class, 'storeWorkflow']);
    $router->post('/administration/axiom/workflow-designer/noeud', [App\Controllers\AxiomStudioController::class, 'storeWorkflowNode']);
    $router->post('/administration/axiom/workflow-designer/transition', [App\Controllers\AxiomStudioController::class, 'storeWorkflowTransition']);
    $router->post('/administration/axiom/workflow-designer/publier', [App\Controllers\AxiomStudioController::class, 'publishWorkflow']);
    $router->post('/administration/axiom/workflow-designer/archiver', [App\Controllers\AxiomStudioController::class, 'archiveWorkflowObject']);
    $router->get('/administration/axiom/dashboard-designer', [App\Controllers\AxiomStudioController::class, 'dashboardDesigner']);
    $router->post('/administration/axiom/dashboard-designer/dashboard', [App\Controllers\AxiomStudioController::class, 'storeDashboard']);
    $router->post('/administration/axiom/dashboard-designer/dashboard/modifier', [App\Controllers\AxiomStudioController::class, 'updateDashboard']);
    $router->post('/administration/axiom/dashboard-designer/dashboard/dupliquer', [App\Controllers\AxiomStudioController::class, 'duplicateDashboard']);
    $router->post('/administration/axiom/dashboard-designer/widget', [App\Controllers\AxiomStudioController::class, 'storeDashboardWidget']);
    $router->post('/administration/axiom/dashboard-designer/widget/modifier', [App\Controllers\AxiomStudioController::class, 'updateDashboardWidget']);
    $router->post('/administration/axiom/dashboard-designer/ordre', [App\Controllers\AxiomStudioController::class, 'reorderDashboardWidgets']);
    $router->post('/administration/axiom/dashboard-designer/publier', [App\Controllers\AxiomStudioController::class, 'publishDashboard']);
    $router->post('/administration/axiom/dashboard-designer/archiver', [App\Controllers\AxiomStudioController::class, 'archiveDashboardObject']);
    $router->get('/administration/axiom/report-designer', [App\Controllers\AxiomStudioController::class, 'reportDesigner']);
    $router->post('/administration/axiom/report-designer/enregistrer', [App\Controllers\AxiomStudioController::class, 'saveReport']);
    $router->post('/administration/axiom/report-designer/publier', [App\Controllers\AxiomStudioController::class, 'publishReport']);
    $router->post('/administration/axiom/report-designer/archiver', [App\Controllers\AxiomStudioController::class, 'archiveReport']);
    $router->get('/administration/axiom/report-designer/export-csv', [App\Controllers\AxiomStudioController::class, 'exportReportCsv']);

    $router->get('/administration/axiom/api-builder', [App\Controllers\AxiomStudioController::class, 'apiBuilder']);
    $router->post('/administration/axiom/api-builder/enregistrer', [App\Controllers\AxiomStudioController::class, 'saveApiDefinition']);
    $router->post('/administration/axiom/api-builder/publier', [App\Controllers\AxiomStudioController::class, 'publishApiDefinition']);
    $router->post('/administration/axiom/api-builder/archiver', [App\Controllers\AxiomStudioController::class, 'archiveApiDefinition']);
    $router->post('/administration/axiom/api-builder/cles', [App\Controllers\AxiomStudioController::class, 'createApiKey']);
    $router->post('/administration/axiom/api-builder/cles/revoquer', [App\Controllers\AxiomStudioController::class, 'revokeApiKey']);
    $router->get('/administration/axiom/api-builder/openapi', [App\Controllers\AxiomStudioController::class, 'apiOpenApi']);
    $router->get('/api/axiom', [App\Controllers\ApiGatewayController::class, 'gateway']);
    $router->post('/api/axiom', [App\Controllers\ApiGatewayController::class, 'gateway']);



    $router->get('/administration/axiom/rule-builder', [App\Controllers\AxiomStudioController::class, 'ruleBuilder']);
    $router->post('/administration/axiom/rule-builder/enregistrer', [App\Controllers\AxiomStudioController::class, 'saveRule']);
    $router->post('/administration/axiom/rule-builder/conditions', [App\Controllers\AxiomStudioController::class, 'addRuleCondition']);
    $router->post('/administration/axiom/rule-builder/actions', [App\Controllers\AxiomStudioController::class, 'addRuleAction']);
    $router->post('/administration/axiom/rule-builder/publier', [App\Controllers\AxiomStudioController::class, 'publishRule']);
    $router->post('/administration/axiom/rule-builder/archiver', [App\Controllers\AxiomStudioController::class, 'archiveRuleItem']);
    $router->post('/administration/axiom/rule-builder/simuler', [App\Controllers\AxiomStudioController::class, 'simulateRule']);


    $router->get('/administration/axiom/document-designer', [App\Controllers\AxiomStudioController::class, 'documentDesigner']);
    $router->post('/administration/axiom/document-designer/enregistrer', [App\Controllers\AxiomStudioController::class, 'saveDocumentTemplate']);
    $router->post('/administration/axiom/document-designer/publier', [App\Controllers\AxiomStudioController::class, 'publishDocumentTemplate']);
    $router->post('/administration/axiom/document-designer/dupliquer', [App\Controllers\AxiomStudioController::class, 'duplicateDocumentTemplate']);
    $router->post('/administration/axiom/document-designer/archiver', [App\Controllers\AxiomStudioController::class, 'archiveDocumentTemplate']);
    $router->post('/administration/axiom/document-designer/restaurer', [App\Controllers\AxiomStudioController::class, 'restoreDocumentTemplateVersion']);
    $router->post('/administration/axiom/document-designer/generer', [App\Controllers\AxiomStudioController::class, 'generateDocumentTemplate']);

    /* PLATFORM-023.5.6 — RELEASE TRAIN MANAGER · SPRINT 1.1 */
    $router->get('/administration/plateforme/release-trains', [App\Controllers\ReleaseTrainController::class, 'index']);
    $router->post('/administration/plateforme/release-trains/enregistrer', [App\Controllers\ReleaseTrainController::class, 'save']);
    $router->post('/administration/plateforme/release-trains/archiver', [App\Controllers\ReleaseTrainController::class, 'archive']);
    $router->post('/administration/plateforme/release-trains/etapes/enregistrer', [App\Controllers\ReleaseTrainController::class, 'saveStep']);
    $router->post('/administration/plateforme/release-trains/etapes/archiver', [App\Controllers\ReleaseTrainController::class, 'archiveStep']);
    $router->post('/administration/plateforme/release-trains/etapes/deplacer', [App\Controllers\ReleaseTrainController::class, 'moveStep']);
    $router->post('/administration/plateforme/release-trains/dependances/enregistrer', [App\Controllers\ReleaseTrainController::class, 'saveDependency']);
    $router->post('/administration/plateforme/release-trains/dependances/archiver', [App\Controllers\ReleaseTrainController::class, 'archiveDependency']);
    $router->post('/administration/plateforme/release-trains/jalons/enregistrer', [App\Controllers\ReleaseTrainController::class, 'saveMilestone']);
    $router->post('/administration/plateforme/release-trains/jalons/archiver', [App\Controllers\ReleaseTrainController::class, 'archiveMilestone']);
    $router->post('/administration/plateforme/release-trains/jalons/restaurer', [App\Controllers\ReleaseTrainController::class, 'restoreMilestone']);

    /* PLATFORM-023.5.6 — RELEASE AUTOMATION · DELIVERY 2.1.1 */
    $router->get('/administration/plateforme/release-automation', [App\Controllers\ReleaseAutomationController::class, 'index']);
    $router->post('/administration/plateforme/release-automation/enregistrer', [App\Controllers\ReleaseAutomationController::class, 'save']);
    $router->post('/administration/plateforme/release-automation/statut', [App\Controllers\ReleaseAutomationController::class, 'status']);
    $router->post('/administration/plateforme/release-automation/archiver', [App\Controllers\ReleaseAutomationController::class, 'archive']);
    $router->post('/administration/plateforme/release-automation/simuler', [App\Controllers\ReleaseAutomationController::class, 'simulate']);

    /* AXIOM PLATFORM V8.0 — FOUNDATION */
    $router->get(
        '/administration/fondation',
        [App\Controllers\FoundationController::class, 'index']
    );
    $router->get(
        '/administration/fondation/diagnostic',
        [App\Controllers\FoundationController::class, 'diagnostic']
    );

    /* AXIOM PLATFORM 0.9 RC1 — CORE SYSTEM */
    $router->get(
        '/administration/axiom/systeme',
        [App\Controllers\CoreSystemController::class, 'index']
    );

    $router->post('/administration/axiom/kernel/module-toggle', [App\Controllers\KernelController::class, 'toggleModule']);

    /* AXIOM CDA 9.6.63 — Sélecteur multi-espace restauré */
    $router->get('/espaces', [App\Controllers\SpaceController::class, 'index']);
    $router->post('/espaces/selectionner', [App\Controllers\SpaceController::class, 'select']);
    $router->post('/espaces/simulation/professeur', [App\Controllers\SpaceController::class, 'simulateProfessor']);
    $router->post('/espaces/simulation/adherent', [App\Controllers\SpaceController::class, 'simulateClient']);
    $router->post('/espaces/simulation/quitter', [App\Controllers\SpaceController::class, 'stopSimulation']);

    /* AXIOM CDA 9.7.2 — Portail adhérent en lecture et messagerie Direction */
    $router->get('/mon-espace/demandes', [App\Controllers\FamilyMessageController::class, 'index']);
    $router->get('/mon-espace/demandes/nouvelle', [App\Controllers\FamilyMessageController::class, 'create']);
    $router->post('/mon-espace/demandes', [App\Controllers\FamilyMessageController::class, 'store']);
    $router->get('/mon-espace/demandes/voir', [App\Controllers\FamilyMessageController::class, 'show']);
    $router->post('/mon-espace/demandes/repondre', [App\Controllers\FamilyMessageController::class, 'reply']);
    $router->get('/mon-espace/factures', [App\Controllers\FamilyBillingPortalController::class, 'index']);
    $router->get('/mon-espace/factures/pdf', [App\Controllers\FamilyBillingPortalController::class, 'print']);

    /* AXIOM CDA 9.5.9 — Facturation et comptabilité */
    $router->get('/facturation',[App\Controllers\BillingController::class,'index']);
    $router->get('/facturation/a-preparer',[App\Controllers\BillingController::class,'prepared']);
    $router->post('/facturation/a-preparer/synchroniser',[App\Controllers\BillingController::class,'syncPrepared']);
    $router->post('/facturation/a-preparer/generer',[App\Controllers\BillingController::class,'generatePrepared']);
    $router->post('/facturation/a-preparer/supprimer',[App\Controllers\BillingController::class,'cancelPrepared']);
    $router->get('/facturation/paiements-a-valider',[App\Controllers\BillingController::class,'pendingPayments']);
    $router->post('/facturation/paiements-a-valider',[App\Controllers\BillingController::class,'validatePendingPayments']);
    $router->post('/facturation/brouillons/regrouper',[App\Controllers\BillingController::class,'mergeDrafts']);
    $router->get('/facturation/modifier',[App\Controllers\BillingController::class,'edit']);
    $router->post('/facturation/modifier',[App\Controllers\BillingController::class,'update']);
    $router->post('/facturation/brouillon/supprimer',[App\Controllers\BillingController::class,'deleteDraft']);
    $router->get('/facturation/nouvelle',[App\Controllers\BillingController::class,'create']);
    $router->post('/facturation',[App\Controllers\BillingController::class,'store']);
    $router->get('/facturation/voir',[App\Controllers\BillingController::class,'show']);
    $router->post('/facturation/emettre',[App\Controllers\BillingController::class,'issue']);
    $router->post('/facturation/brouillons/emettre-ensemble',[App\Controllers\BillingController::class,'issueTogether']);
    $router->post('/facturation/reglement',[App\Controllers\BillingController::class,'payment']);
    $router->post('/facturation/echeancier',[App\Controllers\BillingDocumentsController::class,'schedule']);
    $router->post('/facturation/banque',[App\Controllers\BillingController::class,'bank']);
    $router->post('/facturation/avoir',[App\Controllers\BillingController::class,'credit']);
    $router->get('/facturation/imprimer',[App\Controllers\BillingController::class,'print']);
    $router->post('/facturation/email',[App\Controllers\BillingController::class,'email']);
    $router->get('/facturation/ecritures.csv',[App\Controllers\BillingController::class,'csv']);
    $router->get('/facturation/parametres',[App\Controllers\BillingController::class,'settings']);
    $router->post('/facturation/parametres',[App\Controllers\BillingController::class,'saveSettings']);
    $router->post('/facturation/parametres/affectation',[App\Controllers\BillingController::class,'assignment']);
    $router->get('/administration/corbeille',[App\Controllers\AdminTrashController::class,'index']);
    $router->post('/administration/corbeille/archiver',[App\Controllers\AdminTrashController::class,'archive']);
    $router->post('/administration/corbeille/restaurer',[App\Controllers\AdminTrashController::class,'restore']);
    $router->post('/administration/corbeille/supprimer',[App\Controllers\AdminTrashController::class,'purge']);
    $router->get('/familles',[App\Controllers\FamilyController::class,'index']);
    $router->get('/familles/nouveau',[App\Controllers\FamilyController::class,'create']);
    $router->post('/familles',[App\Controllers\FamilyController::class,'store']);
    $router->get('/familles/voir',[App\Controllers\FamilyController::class,'show']);
    $router->get('/familles/modifier',[App\Controllers\FamilyController::class,'edit']);
    $router->post('/familles/modifier',[App\Controllers\FamilyController::class,'update']);

    /* CDA-FINAL-001.1 — Comptes portail isolés */
    $router->get('/portail/activation', [App\Controllers\PortalAccountController::class, 'activationForm']);
    $router->post('/portail/activation', [App\Controllers\PortalAccountController::class, 'activate']);
    $router->get('/administration/comptes-portail', [App\Controllers\PortalAccountController::class, 'index']);
    $router->post('/administration/comptes-portail/invitation', [App\Controllers\PortalAccountController::class, 'resend']);
    $router->post('/administration/comptes-portail/statut', [App\Controllers\PortalAccountController::class, 'status']);

    $router->get(
    '/studio/mises-a-jour/creer',
    [App\Controllers\UpdateCenterController::class, 'create']
);

$router->get(
    '/studio/mises-a-jour/build',
    [App\Controllers\UpdateCenterController::class, 'build']
);

$router->get(
    '/test-build',
    [App\Controllers\UpdateCenterController::class, 'test']
);

};
