// medz/creneaux.php — disponibilités du praticien
<?php
$stmt = $pdo->prepare(
'SELECT heure, libre FROM creneaux
WHERE medecin_id = ? AND jour = ?'
);
$stmt->execute([$medecinId, $jour]);
?>
<article class="rdv-card">
<h3><?= e($medecin['nom']) ?></h3>
<?php foreach ($stmt as $c): ?>
<button <?= $c['libre'] ? '' : 'disabled' ?>>
<?= e($c['heure']) ?>
</button>
<?php endforeach; ?>
<button class="btn-confirm">Confirmer</button>
</article>