<link rel="stylesheet" href="/public/assets/css/cda-v4-11.css">

<section class="page-intro">
<div>
<span class="page-kicker">Communication</span>
<h2>Diffusion de la grille tarifaire</h2>
<p>Préparez l'envoi aux adhérents actifs.</p>
</div>
<a class="button button-secondary" href="/public/tarifs">Retour aux tarifs</a>
</section>

<section class="distribution-kpis">
<article><span>Adhérents actifs</span><strong><?= (int)$summary['total_actifs'] ?></strong></article>
<article><span>Avec e-mail</span><strong><?= (int)$summary['avec_email'] ?></strong></article>
<article><span>Sans e-mail</span><strong><?= (int)$summary['sans_email'] ?></strong></article>
</section>

<section class="pricing-layout">
<article class="form-card">
<header class="form-card-header">
<div class="form-step green">1</div>
<div><h3>Préparer l'envoi</h3><p>Le canal principal recommandé est l'e-mail.</p></div>
<div class="form-icon green">✉</div>
</header>

<div class="distribution-form">
<label><span>Destinataires</span><select><option>Tous les adhérents actifs</option><option>Adhérents ayant un enfant</option><option>Adhérents d'un pôle</option><option>Adhérents d'un cours</option><option>Sélection manuelle</option></select></label>
<label><span>Objet</span><input value="Tarifs du Carrefour des Arts"></label>
<label class="full"><span>Message</span><textarea rows="8">Bonjour,

Vous trouverez ci-joint la grille tarifaire du Carrefour des Arts.

Cordialement,
Le Carrefour des Arts de Bray-Dunes</textarea></label>
<div class="distribution-actions">
<a class="button button-secondary" href="/public/tarifs/pdf" target="_blank">Prévisualiser le PDF</a>
<button class="button button-secondary" type="button">Envoyer un test</button>
<button class="button button-primary" type="button">Préparer la diffusion</button>
</div>
</div>
</article>

<article class="card">
<header class="card-header">
<div><span>Destinataires</span><h3>Aperçu</h3></div>
</header>

<div class="recipient-list">
<?php foreach(array_slice($adherents,0,20) as $adherent): ?>
<div>
<div>
<strong><?= htmlspecialchars((string)$adherent['nom'].' '.(string)$adherent['prenom']) ?></strong>
<span><?= htmlspecialchars((string)$adherent['code_client']) ?></span>
</div>
<b class="<?= !empty($adherent['email'])?'mail-ok':'mail-missing' ?>">
<?= htmlspecialchars((string)($adherent['email']?:'Sans e-mail')) ?>
</b>
</div>
<?php endforeach; ?>
</div>
</article>
</section>
