<!doctype html><html lang="fr"><head><meta charset="utf-8"><title><?=htmlspecialchars($receipt['receipt_number'])?></title><style>body{margin:0;background:#eef2f8;font-family:Arial,sans-serif;color:#14213d}.toolbar{padding:14px;text-align:center}.toolbar button{padding:10px 18px;border:0;border-radius:8px;background:#4166f5;color:#fff;font-weight:bold}.receipt{width:700px;max-width:calc(100% - 40px);margin:0 auto 30px;padding:42px;background:#fff;border-top:8px solid #4166f5;box-shadow:0 10px 35px #ccd4e1}.head{display:flex;justify-content:space-between;gap:20px;border-bottom:2px solid #dce3ef}.head h1{font-size:23px}.number{font-weight:bold;color:#4166f5}.amount{margin:28px 0;padding:18px;background:#f1f4ff;text-align:center;font-size:30px;font-weight:bold}.grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.legal{margin-top:35px;padding-top:15px;border-top:1px solid #ddd;font-size:12px;color:#65728a}@media print{body{background:#fff}.toolbar{display:none}.receipt{box-shadow:none;margin:0;width:auto;max-width:none}}</style></head><body><div class="toolbar"><button onclick="window.print()">Imprimer / enregistrer en PDF</button></div><main class="receipt"><div class="head"><div><img src="/public/assets/images/logo-carrefour-des-arts.jpg" alt="Carrefour des Arts" style="display:block;width:140px;height:auto;margin-bottom:8px"><h1><?=htmlspecialchars($receipt['legal_name']??'Carrefour des Arts')?></h1><p><?=htmlspecialchars($receipt['address_line1']??'96, rue Auguste Coolen')?><br><?=htmlspecialchars(($receipt['postal_code']??'59123').' '.($receipt['city']??'BRAY-DUNES'))?><br>SIRET <?=htmlspecialchars($receipt['siret']??'945 373 116 00017')?></p></div><div><h2>REÇU D’AVANCE</h2><p class="number"><?=htmlspecialchars($receipt['receipt_number'])?></p></div></div><p>Reçu de <strong><?=htmlspecialchars($receipt['prenom'].' '.$receipt['nom'])?></strong><br>Compte adhérent : <strong><?=htmlspecialchars($receipt['code_client'])?></strong></p><div class="amount"><?=number_format((float)$receipt['amount'],2,',',' ')?> €</div><div class="grid"><p><strong>Date</strong><br><?=htmlspecialchars($receipt['received_date'])?></p><p><strong>Caisse</strong><br><?=htmlspecialchars($receipt['register_name'])?></p><p><strong>Encaissé par</strong><br><?=htmlspecialchars(trim(($receipt['cashier_prenom']??'').' '.($receipt['cashier_nom']??'')))?></p><p><strong>Solde encore disponible</strong><br><?=number_format((float)$receipt['available_amount'],2,',',' ')?> €</p></div><?php if(!empty($receipt['notes'])):?><p><strong>Motif</strong><br><?=nl2br(htmlspecialchars($receipt['notes']))?></p><?php endif?><p class="legal"><?=htmlspecialchars($receipt['vat_mention']??'Association non assujettie à la TVA')?>.<br>Cette somme constitue une avance portée au compte de l’adhérent et sera imputée sur une facture ultérieure.</p></main></body></html>
