/* [CSP 19/11] Aperçu d'un document (facture, devis, acompte, avoir) fabriqué par le script (sources_js/facturation/
   13-apercu.js, buildInvoiceHTML) : mêmes valeurs que les anciens styles en ligne, refusés par la CSP bloquante de la
   page. Couleurs du PDF (facturation/pdf.py), pas celles de la charte de l'écran : l'aperçu montre le document.
   Chargé par la page du logiciel (fenêtre d'aperçu, écran « Aperçu » de l'assistant, PDF du mode invité) et par la
   fenêtre d'impression (impression.css en plus). Le conteneur porte la classe « apercu » : chaque règle commence par
   « .apercu », plus forte que les règles générales des tableaux de facturation.css (th:first-child, tbody td…), comme
   l'étaient les styles en ligne. */
.apercu .ap-entete{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:32px;gap:20px}
.apercu .ap-flex{flex:1}
.apercu .ap-logo{display:block;max-width:170px;max-height:68px;margin-bottom:10px}
.apercu .ap-nom-emetteur{font-family:'Inter',sans-serif;font-size:20px;font-weight:700;color:#111827;margin-bottom:6px}
.apercu .ap-coord-entete{font-size:11px;color:#777;line-height:1.7}
.apercu .ap-droite{text-align:right;flex-shrink:0}
.apercu .ap-type{font-family:'Inter',sans-serif;font-size:26px;font-weight:800;color:#15803d;letter-spacing:-0.5px}
.apercu .ap-num{font-size:12px;color:#555;margin-top:4px;font-weight:600}
.apercu .ap-num-attente{font-weight:500;color:#9ca3af}
.apercu .ap-date{font-size:11px;color:#888;margin-top:2px}
.apercu .ap-avoir-sur{font-size:11px;color:#555;margin-top:2px}
.apercu .ap-echeance{font-size:11px;color:#888}
.apercu .ap-alerte{font-size:11px;color:#b91c1c;margin-top:2px}
/* tampon « PAYÉ », « EN RETARD », « BROUILLON »… : vert, rouge ou gris ; plus petit pour un long texte */
.apercu .ap-tampon{display:inline-block;max-width:100%;margin-top:10px;padding:4px 14px;border:2.5px solid;border-radius:3px;font-weight:700;font-size:14px;letter-spacing:3px;text-align:center;text-transform:uppercase;transform:rotate(-6deg);opacity:.7}
.apercu .ap-tampon-long{font-size:12px;letter-spacing:1.5px}
.apercu .ap-tampon-vert{border-color:#15803d;color:#15803d}
.apercu .ap-tampon-rouge{border-color:#b91c1c;color:#b91c1c}
.apercu .ap-tampon-gris{border-color:#6b7280;color:#6b7280}
.apercu .ap-separateur{height:1.5px;background:#d4d2ca;margin-bottom:28px}
.apercu .ap-parties{display:flex;gap:40px;margin-bottom:28px}
.apercu .ap-etiquette{font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:1.2px;color:#aaa;margin-bottom:8px}
.apercu .ap-nom-partie{font-size:13px;font-weight:600;color:#111827;margin-bottom:4px}
.apercu .ap-coord{font-size:11.5px;color:#666;line-height:1.7}
.apercu .ap-livraison{font-size:10px;color:#666;margin-top:6px;padding-top:4px;border-top:1px solid #eee}
.apercu .ap-categorie{font-size:10px;color:#888;margin-bottom:12px}
.apercu .ap-prestation{background:#f7f6f2;border-left:3px solid #15803d;border-radius:4px;padding:10px 14px;margin-bottom:24px;font-size:12px;color:#444}
.apercu .ap-lieu{color:#666}
/* tableau des lignes */
.apercu .ap-table{width:100%;border-collapse:collapse;margin-bottom:24px}
.apercu .ap-tete{background:#15803d}
.apercu .ap-th{padding:10px 14px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:0.5px;color:white;text-align:left}
.apercu .ap-th-qte{text-align:center;width:60px}
.apercu .ap-th-montant{text-align:right;width:110px}
.apercu .ap-th-taux{text-align:right;width:60px}
.apercu .ap-td{padding:10px 14px;font-size:12px;border-bottom:1px solid #f0efe8}
.apercu .ap-desc{color:#222}
.apercu .ap-qte{text-align:center;color:#555}
.apercu .ap-nombre{text-align:right;color:#555}
.apercu .ap-total-ligne{text-align:right;font-weight:600;color:#222}
/* totaux et, à gauche, le règlement par virement */
.apercu .ap-bas{display:flex;flex-direction:row-reverse;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:16px 24px;margin-bottom:24px}
.apercu .ap-totaux{width:260px;max-width:100%}
.apercu .ap-ligne-totaux{display:flex;justify-content:space-between;padding:5px 0;font-size:12.5px;color:#555}
.apercu .ap-ligne-tva{gap:12px}
.apercu .ap-montant{font-weight:500}
.apercu .ap-insecable{white-space:nowrap}
.apercu .ap-ttc{display:flex;justify-content:space-between;padding:10px 0 4px;font-size:16px;font-weight:700;color:#111827;border-top:2px solid #15803d;margin-top:6px}
.apercu .ap-vert{color:#15803d}
.apercu .ap-mention-tva{padding:3px 0;font-size:10.5px;color:#4b5563}
.apercu .ap-banque{flex:1 1 220px;max-width:340px;padding:10px 14px;border:1px solid #e5e7eb;border-radius:5px;font-size:11px;color:#4b5563;line-height:1.7}
.apercu .ap-banque-titre{font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:1.2px;color:#6b7280;margin-bottom:2px}
.apercu .ap-encre{color:#111827}
.apercu .ap-notes{margin-bottom:20px;padding:12px 14px;background:#f8f8f6;border-radius:5px;font-size:11.5px;color:#555;line-height:1.6;border-left:3px solid #15803d;white-space:pre-line}
.apercu .ap-notes-titre{color:#333}
/* pied : mentions, note de la plateforme, nom du produit */
.apercu .ap-pied{margin-top:auto;padding-top:16px;border-top:1px solid #e4e2da}
.apercu .ap-mentions{font-size:8.5px;color:#bbb;line-height:1.8;text-align:center;margin-bottom:6px}
.apercu .ap-note-plateforme{font-size:8.5px;color:#6b7280;line-height:1.7;text-align:center;margin-bottom:6px}
.apercu .ap-genere{font-size:9px;color:#ccc;text-align:center}
/* PDF du mode invité (html2pdf, 15-emission-pdf.js) : le document est rendu hors de l'écran, dans ce conteneur */
.apercu-pdf{position:fixed;left:-9999px;top:0;width:794px;background:#fff;font-family:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;color:#111827}
