<link rel="stylesheet" href="/public/assets/css/cda-v5-2.css">

<section class="page-intro">
<div>
<span class="page-kicker">Facturation</span>
<h2>Réductions applicables</h2>
<p>Les règles sont paramétrées dans Paramètres Studio.</p>
</div>
<a class="button button-secondary"
href="/public/parametres/reductions">
Paramétrer les réductions
</a>
</section>

<section class="studio-card">
<div class="rule-list">
<?php foreach($rules as $rule): ?>
<article>
<div>
<span><?= htmlspecialchars((string)$rule['code']) ?></span>
<strong><?= htmlspecialchars((string)$rule['libelle']) ?></strong>
<p><?= nl2br(htmlspecialchars((string)$rule['explication'])) ?></p>
</div>
<b>
<?= $rule['type_reduction']==='pourcentage'
    ? number_format((float)$rule['valeur'],2,',',' ').' %'
    : number_format((float)$rule['valeur'],2,',',' ').' €' ?>
</b>
</article>
<?php endforeach; ?>
</div>
</section>
