<?php $rows=is_array($compatibilityReports??null)?$compatibilityReports:[];$generatedAt=(string)($compatibilityGeneratedAt??'');$h=static fn($v):string=>htmlspecialchars((string)$v,ENT_QUOTES,'UTF-8'); ?>
<style>
.axc{display:grid;gap:18px}.axc-hero{background:linear-gradient(135deg,#102a43,#315f86);color:#fff;border-radius:22px;padding:24px;display:flex;justify-content:space-between;gap:20px;align-items:center}.axc-card{background:#fff;border:1px solid #dbe4ef;border-radius:18px;padding:18px;box-shadow:0 10px 28px rgba(31,55,86,.06)}.axc-nav{display:flex;gap:8px;flex-wrap:wrap}.axc-btn{display:inline-flex;padding:10px 14px;border-radius:11px;border:1px solid #cbd8e6;background:#fff;color:#183b5b;text-decoration:none;font-weight:750;cursor:pointer}.axc-btn.primary{background:#235f9d;color:#fff;border-color:#235f9d}.axc-form{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:12px;align-items:end}.axc-form input{width:100%;box-sizing:border-box;padding:11px;border:1px solid #cbd8e6;border-radius:10px}.axc-table-wrap{overflow:auto}.axc-table{width:100%;border-collapse:collapse;min-width:700px}.axc-table th,.axc-table td{padding:11px;border-bottom:1px solid #e5ebf2;text-align:left}.axc-table th{font-size:12px;text-transform:uppercase;color:#64748b}.axc-pill{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:850;background:#edf4fb;color:#1f5f96}.axc-score{font-size:44px;font-weight:900}.axc-muted{color:#64748b}@media(max-width:760px){.axc-hero{flex-direction:column;align-items:flex-start}.axc-form{grid-template-columns:1fr}}
</style>
<div class="axc"><nav class="axc-nav"><a class="axc-btn" href="/public/administration/plateforme/validation">Validation Center</a><a class="axc-btn" href="/public/administration/plateforme/confiance-packages">Trust Engine</a><a class="axc-btn" href="/public/administration/plateforme/certification-packages">Certification Center</a><a class="axc-btn" href="/public/administration/plateforme/politiques-packages">Package Policy</a></nav><section class="axc-hero"><div><small>PLATFORM-023.2.2 · AXIOM</small><h1>Compatibility Engine</h1><p>Dépendances, runtime, routes, permissions, fichiers et migrations.</p></div><div><div class="axc-score"><?= count($rows) ?></div><strong>rapports analysés</strong><br><small><?= $h($generatedAt) ?></small></div></section><section class="axc-card"><h2>Analyser un package</h2><form method="post" action="/public/administration/plateforme/compatibilite-packages/evaluer" class="axc-form"><input type="hidden" name="_csrf" value="<?= $h(\App\Core\Csrf::token()) ?>"><div><label for="package_id"><strong>Identifiant du package importé</strong></label><input id="package_id" name="package_id" type="number" min="1" required><small class="axc-muted">Disponible dans l’historique du Centre de mises à jour.</small></div><button class="axc-btn primary" type="submit">Analyser la compatibilité</button></form></section><section class="axc-card"><h2>Derniers rapports</h2><div class="axc-table-wrap"><table class="axc-table"><thead><tr><th>Date</th><th>Package</th><th>Version</th><th>Score</th><th>Décision</th></tr></thead><tbody><?php foreach($rows as $r): ?><tr><td><?= $h($r['created_at']??'') ?></td><td><?= $h($r['package_name']??'') ?></td><td><?= $h($r['package_version']??'') ?></td><td><strong><?= (int)($r['compatibility_score']??0) ?>/100</strong></td><td><span class="axc-pill"><?= $h($r['decision']??'') ?></span></td></tr><?php endforeach; ?><?php if(!$rows): ?><tr><td colspan="5">Aucun rapport disponible.</td></tr><?php endif; ?></tbody></table></div></section></div>
