<section class="page-header"><div><span class="page-kicker">INSCRIPTION-006</span><h2>Assistant IA d’affectation</h2><p>Suggestions explicables uniquement. Aucune inscription ni facturation n’est créée sans validation de la Direction.</p></div><a class="button button-secondary" href="/public/demandes-inscription" onclick="if(document.referrer && history.length>1){history.back();return false;}">← Retour</a></section>
<section class="card"><form method="post" action="/public/demandes-inscription/assistant-ia/proposer"><?=\App\Core\Csrf::field()?>
<div style="overflow-x:auto"><table class="table"><thead><tr><th></th><th>Élève</th><th>Discipline</th><th>Suggestion</th><th>Occupation</th><th>Score</th><th>Explication</th></tr></thead><tbody>
<?php foreach($suggestions as $s): $ok=!empty($s['slot_id']); $key=(int)$s['request_id'].'-'.(int)($s['slot_id']??0); ?>
<tr><td><?php if($ok):?><input type="checkbox" name="suggestions[<?=htmlspecialchars($key)?>]" value="1"><?php endif?></td><td><strong><?=htmlspecialchars((string)$s['membre_nom'])?></strong></td><td><?=htmlspecialchars((string)$s['discipline_libelle'])?></td><td><?php if($ok):?><?=htmlspecialchars(ucfirst((string)$s['jour_semaine']).' '.substr((string)$s['heure_debut'],0,5).'–'.substr((string)$s['heure_fin'],0,5))?><br><small><?=htmlspecialchars((string)$s['professeur_nom'].' · '.(string)$s['salle_libelle'])?></small><?php else:?><strong>Aucune solution</strong><?php endif?></td><td><?=$ok?(int)$s['occupation'].'/'.(int)$s['capacite']:'—'?></td><td><strong><?=(int)$s['score']?>/100</strong></td><td><?=htmlspecialchars(implode(' · ',(array)$s['reasons']))?></td></tr>
<?php endforeach?></tbody></table></div><div style="margin-top:16px"><button class="button button-primary">Transmettre les suggestions sélectionnées</button></div></form></section>
