/* ==========================================================================
   Bon de commande (impression ou « Enregistrer au format PDF »).
   Partagé par l'admin et l'app boutique : seul #print-area est imprimé.
   ========================================================================== */

#print-area { display: none; }

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; font-family: Figtree, system-ui, sans-serif; color: #1F1A24; }
  .bon { page-break-after: always; font-size: 11pt; }
  .bon:last-child { page-break-after: auto; }
  .bon-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid #1F1A24; }
  .bon-ent { display: flex; flex-direction: column; gap: 6px; }
  .bon-ent img { width: 120px; height: auto; }
  .bon-ent p { font-size: 8.5pt; line-height: 1.4; color: #3D3642; margin: 0; }
  .bon-title { text-align: right; }
  .bon-title h1 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 22pt; margin: 0; }
  .bon-title p { margin: 4px 0 0; }
  .bon-refus { margin: 12px 0 0; padding: 8px 12px; border: 2px solid #A31117; color: #A31117; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: 10pt; }
  .bon-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 16px 0; }
  .bon-cols h2 { font-size: 9pt; text-transform: uppercase; letter-spacing: 0.08em; color: #675F6B; margin: 0 0 4px; }
  .bon-cols p { line-height: 1.5; margin: 0; }
  .bon-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
  .bon-table th { text-align: left; font-size: 9pt; text-transform: uppercase; letter-spacing: 0.05em; color: #675F6B; border-bottom: 1px solid #1F1A24; padding: 6px 4px; }
  .bon-table td { border-bottom: 1px solid #E8E1D6; padding: 6px 4px; }
  .bon .r { text-align: right; }
  .bon-totals { margin: 12px 0 0 auto; border-collapse: collapse; min-width: 50%; }
  .bon-totals td { padding: 4px; }
  .bon-totals tr.b td { font-weight: 800; font-size: 12pt; border-top: 1px solid #1F1A24; }
  .bon-note { margin-top: 16px; font-size: 10pt; color: #3D3642; }
  /* Face de tour : ses produits sous la ligne de la face */
  .bon-table tr.bon-face td { border-bottom: 0; padding-top: 0; font-size: 9pt; font-weight: 700; color: #3D3642; }
  .bon-table tr.bon-sub td { border-bottom: 0; padding-top: 1px; padding-bottom: 1px; font-size: 9pt; color: #3D3642; }
  .bon-table tr.bon-sub td:nth-child(2) { padding-left: 14px; }
  .bon-table tr:has(+ tr.bon-face) td { border-bottom: 0; }
  .bon-table tr.bon-sub:not(:has(+ tr.bon-sub)) td { border-bottom: 1px solid #E8E1D6; padding-bottom: 6px; }

  /* Rapport d'activité (admin) */
  .rep h1 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 22pt; margin: 0 0 4px; }
  .rep > p { margin: 0 0 14px; color: #675F6B; }
  .rep-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
  .rep-kpis div { border: 1px solid #E8E1D6; border-radius: 6px; padding: 8px 10px; }
  .rep-kpis span { display: block; font-size: 8.5pt; color: #675F6B; }
  .rep-kpis strong { font-size: 14pt; }
  .rep h2 { font-size: 11pt; margin: 16px 0 6px; }
}
