<?php $status=is_array($status??null)?$status:[]; ?>
<link rel="stylesheet" href="/public/assets/css/cda-security.css?v=7220">
<section class="security-hero"><div><span class="security-kicker">Administration · Sécurité · Enterprise</span><h2>Authentification multifacteur</h2><p>Protection TOTP native des comptes sensibles, avec codes de secours à usage unique.</p></div><a href="/public/administration/securite" class="security-btn security-btn-light">← Retour sécurité</a></section>
<section class="security-grid"><article class="security-card"><header><span class="security-card-icon">◉</span><div><strong>État du compte courant</strong><small>Second facteur</small></div></header><div class="security-metrics"><span><b><?=!empty($status['enabled'])?'Activé':'Non activé'?></b></span></div></article><article class="security-card"><header><span class="security-card-icon">⌁</span><div><strong>Codes de secours</strong><small>Restants</small></div></header><div class="security-metrics"><span><b><?=(int)($status['backup_codes_remaining']??0)?></b></span></div></article></section>
<?php if(!empty($status['enabled'])):?><section class="security-card" style="margin-top:16px"><header><span class="security-card-icon">⚠</span><div><strong>Désactivation</strong><small>Réservée à une authentification récente et aux administrateurs.</small></div></header><form method="post" action="/public/administration/securite/mfa/desactiver" onsubmit="return confirm('Désactiver la double authentification et fermer toutes vos sessions ?')"><?=\App\Core\Csrf::field()?><button class="security-btn" type="submit">Désactiver le MFA</button></form></section><?php endif;?>
