<link rel="stylesheet" href="/public/assets/css/axiom-studio.css">
<?php $old=$_SESSION['studio_old']??[]; unset($_SESSION['studio_old']); ?>
<main class="axiom-studio"><section class="axiom-studio-hero"><div><span class="axiom-studio-kicker">MODULE DESIGNER</span><h2>Nouveau module</h2><p>Cette première étape crée une définition JSON versionnée, sans modifier le code métier existant.</p></div></section>
<?php if (!empty($_SESSION['flash_error'])): ?><div class="studio-alert error"><?= htmlspecialchars((string)$_SESSION['flash_error']); unset($_SESSION['flash_error']); ?></div><?php endif; ?>
<form class="studio-form" method="post" action="/public/administration/axiom/modules">
<?= \App\Core\Csrf::field() ?>
<div class="studio-form-grid"><label>Nom du module<input required name="name" value="<?= htmlspecialchars((string)($old['name']??'')) ?>" placeholder="Gestion des salles"></label><label>Code technique<input required name="code" value="<?= htmlspecialchars((string)($old['code']??'')) ?>" placeholder="cda.salles"></label><label>Version<input name="version" value="<?= htmlspecialchars((string)($old['version']??'1.0.0')) ?>"></label><label>Auteur<input name="author" value="<?= htmlspecialchars((string)($old['author']??'AXIOM Studio')) ?>"></label><label>Icône<input name="icon" value="<?= htmlspecialchars((string)($old['icon']??'◇')) ?>"></label><label>Catégorie<select name="category"><option value="business">Métier</option><option value="application">Application</option><option value="engine">Moteur</option><option value="plugin">Extension</option></select></label></div><label>Description<textarea name="description" rows="5"><?= htmlspecialchars((string)($old['description']??'')) ?></textarea></label><div class="studio-actions"><a href="/public/administration/axiom/modules">Annuler</a><button type="submit">Créer la définition</button></div></form></main>
