/* Ma planif — impression éditoriale N&B propre. Aucune note privée ne peut fuiter (même sur Ctrl+P). */
#print-root { display: none; }

@media print {
  @page { size: letter portrait; margin: 10mm; }
  @page week { size: letter landscape; margin: 8mm; }

  html, body { background: #fff !important; color: #0f172a !important; font-size: 10pt; }
  /* Protection inconditionnelle contre Ctrl+P : jamais de notes privées, modales ou UI écran. */
  .ld-private, dialog, .side-panel, .side-backdrop, #banners, .toasts, .menu, .no-print { display: none !important; }
  body[data-print] > *:not(#print-root) { display: none !important; }
  body[data-print] #print-root { display: block !important; }
  * { animation: none !important; transition: none !important; box-shadow: none !important; }
  #print-root, #print-root * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .print-head-bar { border-top: 2pt solid #1e3a8a; padding-top: 2.5mm; margin-bottom: 3mm; }
  #print-root h1 { font-size: 14.5pt; margin: 0 0 1.5mm; color: #0f172a; }
  #print-root h2 { font-size: 10.5pt; margin: 0 0 1mm; color: #1e3a8a; text-transform: uppercase; letter-spacing: .04em; }
  .print-date { margin: 0; color: #475569; font-size: 10pt; }
  .print-date::first-letter { text-transform: uppercase; }
  .print-day-note {
    border: 1px solid #94a3b8; border-left: 3pt solid #1e3a8a; border-radius: 1.5mm;
    background: #f8fafc; padding: 1.8mm 2.8mm; margin-bottom: 3mm; font-size: 9.5pt;
  }
  .print-table { width: 100%; border-collapse: collapse; }
  .print-table thead { display: table-header-group; }
  .print-table th, .print-table td { border: 1px solid #cbd5e1; padding: 1.5mm 2mm; vertical-align: top; text-align: left; }
  .print-table thead th { background: #f8fafc; font-weight: 700; color: #334155; border-bottom: 1.2pt solid #94a3b8; }
  .print-table tr { break-inside: avoid; }
  .print-table .pause td { background: #f1f5f9; font-size: 8.5pt; color: #475569; padding: .8mm 2mm; }
  .print-table .fixed-row td { background: #f8fafc; color: #334155; }
  .print-table td.off { background: #f1f5f9; color: #475569; text-align: center; vertical-align: middle; }
  .print-table td.is-cancelled { opacity: .55; text-decoration: line-through; }
  .print-table p { margin: 1mm 0 0; }
  .dot { display: inline-block; width: 2.6mm; height: 2.6mm; border-radius: 50%; margin-right: 1.5mm; vertical-align: middle; }
  .print-tag { display: inline-block; font-size: 7pt; border: 1px solid #94a3b8; border-radius: 1.5mm; padding: 0 1.2mm; margin-right: 1mm; font-weight: 600; color: #334155; }
  .print-mat { display: block; margin-top: .8mm; font-size: 7.5pt; color: #475569; }

  .print-week { page: week; }
  .print-week .print-table { table-layout: fixed; font-size: 8.4pt; }
  .print-week .print-table th:first-child, .print-week .print-table td:first-child { width: 14mm; font-size: 7.8pt; font-variant-numeric: tabular-nums; }
  .print-week .clip { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: #334155; }

  .print-sub + .print-sub { break-before: page; page-break-before: always; }
  .print-sub .print-fixed { border: 1px solid #cbd5e1; border-left: 2.5pt solid #475569; border-radius: 1.5mm; padding: 2mm 3mm; margin-bottom: 3.5mm; font-size: 9pt; }
  .print-sub .print-table td:first-child { width: 17mm; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .print-sub .print-table td:nth-child(2) { width: 38mm; }
  .print-sub .print-table td:last-child { width: 38mm; }
  .print-foot { margin-top: 4.5mm; font-weight: 700; font-size: 9.5pt; }
  .print-lines { height: 26mm; background: repeating-linear-gradient(#fff 0 6.5mm, #cbd5e1 6.5mm 6.8mm); }

  .print-annual .term-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; margin-bottom: 3.5mm; }
  .print-annual .term-card { border: 1px solid #cbd5e1; border-radius: 2mm; padding: 2mm; break-inside: avoid; }
  .print-annual .term-card h3 { font-size: 10.5pt; margin: 0; }
  .print-annual .stats { display: flex; gap: 3mm; font-size: 8.5pt; flex-wrap: wrap; }
  .print-annual .cov-bar { display: flex; height: 2.5mm; border: 1px solid #94a3b8; border-radius: 2mm; overflow: hidden; margin: 1mm 0; }
  .print-annual .cov-bar > span { display: block; height: 100%; }
  .print-annual .cov-bar .cov-a_voir { background: #cbd5e1; }
  .print-annual .cov-bar .cov-planifie { background: #3b82f6; }
  .print-annual .cov-bar .cov-vu { background: #16a34a; }
  .print-annual .cov-bar .cov-reinvesti { background: #7c3aed; }
  .print-annual .cov-legend { display: flex !important; flex-wrap: wrap; gap: 2mm; font-size: 7.2pt; color: #475569; margin-bottom: 1mm; }
  .print-annual .cov-dot { display: inline-block; width: 2mm; height: 2mm; border-radius: 50%; margin-right: .8mm; vertical-align: middle; }
  .print-annual .cov-dot.cov-a_voir { background: #cbd5e1; }
  .print-annual .cov-dot.cov-planifie { background: #3b82f6; }
  .print-annual .cov-dot.cov-vu { background: #16a34a; }
  .print-annual .cov-dot.cov-reinvesti { background: #7c3aed; }
  .print-annual .essential { display: inline-block; width: 1.8mm; height: 1.8mm; border-radius: 50%; background: #b45309; margin-left: 1mm; vertical-align: middle; }
  .print-annual .annual-subject { margin: 3.5mm 0 1mm; }
  .print-annual .annual-subject > h3 { font-size: 11.5pt; margin: 0 0 1mm; break-after: avoid; }
  .print-annual .annual-table { width: 100%; border-collapse: collapse; font-size: 8.2pt; }
  .print-annual .annual-table thead { display: table-header-group; }
  .print-annual .annual-table th, .print-annual .annual-table td { border: 1px solid #cbd5e1; padding: 1mm 1.5mm; text-align: left; vertical-align: top; }
  .print-annual .annual-table tr { break-inside: avoid; }
  .print-annual .comp-row th, .print-annual .comp-row td { background: #f8fafc; font-weight: 700; }
  .print-annual .status { font-size: 7.6pt; border: 1px solid #94a3b8; border-radius: 2mm; padding: 0 1.4mm; white-space: nowrap; }
  .print-annual button { display: none !important; }
  .print-annual .prog-cell { text-align: center; }
}
