<section class="profile-header"><div class="profile-identity"><div class="profile-avatar"><?= $group['type_groupe']==='individuel'?'🎹':'🎭' ?></div><div><span class="section-kicker"><?= htmlspecialchars($group['code']) ?></span><h2><?= htmlspecialchars($group['libelle']) ?></h2><p><?= htmlspecialchars($group['atelier_libelle']) ?></p></div></div><a class="secondary-button button-link" href="/public/groupes">Retour</a>
<?php if (!empty($group['id']) || !empty($groupe['id'])): ?>
<?php $participantGroupId=(int)($group['id'] ?? $groupe['id']); ?>
<a class="button button-primary"
href="/public/groupes/participants?groupe_id=<?= $participantGroupId ?>">
👥 Gérer les participants
</a>
<?php endif; ?>
</section>
<?php if(!empty($_SESSION['success'])): ?><div class="alert alert-success"><?= htmlspecialchars($_SESSION['success']) ?></div><?php unset($_SESSION['success']); endif; ?>
<section class="summary-grid"><article class="summary-card"><span>Jour</span><strong><?= htmlspecialchars(ucfirst($group['jour_semaine'] ?? '')) ?></strong></article><article class="summary-card"><span>Horaire</span><strong><?= htmlspecialchars(substr($group['heure_debut'] ?? '',0,5)) ?>–<?= htmlspecialchars(substr($group['heure_fin'] ?? '',0,5)) ?></strong></article><article class="summary-card"><span>Professeur</span><strong><?= htmlspecialchars($group['professeur_nom'] ?: 'Non affecté') ?></strong></article><article class="summary-card"><span>Salle</span><strong><?= htmlspecialchars($group['salle_libelle'] ?: 'Non affectée') ?></strong></article></section>
<section class="panel"><div class="panel-header"><div><span class="section-kicker">Participants</span><h3>Liste du groupe</h3></div><span class="badge badge-blue"><?= count($participants) ?> inscrit(s)</span></div>
<?php if(!$participants): ?><div class="empty-state"><p>Aucun participant affecté pour le moment.</p></div><?php else: ?><div class="member-list"><?php foreach($participants as $p): ?><article class="member-row"><div class="client-avatar small"><?= htmlspecialchars(mb_substr($p['prenom'],0,1).mb_substr($p['nom'],0,1)) ?></div><div><strong><?= htmlspecialchars($p['nom'].' '.$p['prenom']) ?></strong><span><?= $p['heure_individuelle_debut'] ? htmlspecialchars(substr($p['heure_individuelle_debut'],0,5).'–'.substr($p['heure_individuelle_fin'],0,5)) : 'Cours collectif' ?></span></div><span class="badge badge-success"><?= htmlspecialchars($p['statut']) ?></span></article><?php endforeach; ?></div><?php endif; ?>
</section>
