/* Documents imprimables (exercices, contrôle). Tout est limité à .pdoc pour ne pas toucher au reste de l'application. */
@page { size: A4; margin: 14mm 14mm 17mm; @bottom-left { content: var(--foot); font: 8.5pt system-ui, sans-serif; color: #667; } @bottom-right { content: counter(page) " / " counter(pages); font: 8.5pt system-ui, sans-serif; color: #667; } }

.print-bar { max-width: 820px; margin: 0 auto; padding: 12px 16px 4px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.print-bar .hint { flex-basis: 100%; margin: 2px 0 0; }
.print-bar .chk { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: .92rem; }
.print-bar .chk input { width: 20px; height: 20px; }
.print-note { max-width: 820px; margin: 0 auto 8px; padding: 0 16px; font-weight: 700; color: var(--ko); }

/* jetons clairs forcés : le papier est toujours blanc, même si l'appareil est en mode sombre */
.pdoc {
  color-scheme: light; --bg: #fff; --card: #fff; --ink: #1f2a44; --muted: #5b6784; --line: #e6dfd0; --soft: #f3eee2;
  --brand: #3b5bdb; --brand-soft: #e7ecff; --hl: #ffd6dd; --hl-ink: #8a1f3a; --yellow: #fff1b8;
  --ok: #2b9a5f; --ok-soft: #dff5e8; --ko: #d6364f; --ko-soft: #fde4e8;
  background: #fff; color: #1f2a44; font: 10.5pt/1.45 "Segoe UI", system-ui, Arial, sans-serif;
  max-width: 820px; margin: 0 auto 40px; padding: 18px 20px; border-radius: 12px; box-shadow: 0 1px 6px rgba(0, 0, 0, .12);
}
.pdoc .doc-h { border-bottom: 3px solid #3b5bdb; padding-bottom: 3mm; margin-bottom: 6mm; }
.pdoc .doc-k { font-size: 9pt; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #3b5bdb; }
.pdoc .doc-h h1 { font-size: 22pt; margin: 1mm 0; } .pdoc .doc-h p { margin: 1mm 0; color: #445; }
.pdoc .idline { display: flex; gap: 8mm; margin: 0 0 5mm; font-size: 10pt; } .pdoc .idline span { flex: 1; border-bottom: 1px dotted #667; padding-bottom: 1mm; }
.pdoc h2.sec { font-size: 14pt; margin: 7mm 0 3mm; padding-bottom: 1.5mm; border-bottom: 2px solid #3b5bdb; break-after: avoid; }
.pdoc h2.sec small { font-weight: 600; color: #667; font-size: 9.5pt; }
.pdoc .q, .pdoc .fig, .pdoc .pt-wrap, .pdoc .azx { break-inside: avoid; }
.pdoc p, .pdoc li { orphans: 3; widows: 3; }
.pdoc .fig img { max-height: 48mm; border: 0; padding: 0; background: #fff; }
.pdoc .q { margin: 0 0 4.5mm; display: grid; grid-template-columns: 8mm 1fr; column-gap: 1mm; }
.pdoc .q-n { font-weight: 800; color: #3b5bdb; } .pdoc .q-main { min-width: 0; }
.pdoc .q-t { font-weight: 600; } .pdoc .pts { float: right; font-weight: 700; color: #3b5bdb; margin-left: 4mm; font-size: 9.5pt; }
.pdoc .q .fig { margin: 2mm 0; text-align: left; }
.pdoc .opts { list-style: none; padding: 0; margin: 1.5mm 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1mm 6mm; }
.pdoc .opts li { display: flex; align-items: baseline; gap: 2mm; } .pdoc .opts li.good { font-weight: 700; color: #1d7a48; }
.pdoc .cb { display: inline-block; flex: none; width: 3.6mm; height: 3.6mm; border: 1.2px solid #333; border-radius: .6mm; } .pdoc .cb.r { border-radius: 50%; }
.pdoc .good .cb { background: #1d7a48; border-color: #1d7a48; }
.pdoc .blank { margin-top: 2.5mm; display: flex; align-items: baseline; gap: 2mm; } .pdoc .dots { flex: 1; border-bottom: 1px dotted #444; min-width: 40mm; height: 5mm; }
.pdoc .lines { margin-top: 1mm; } .pdoc .lines i { display: block; border-bottom: 1px dotted #444; height: 7.5mm; }
.pdoc .ft { border-collapse: collapse; margin-top: 1.5mm; } .pdoc .ft td { padding: 1mm 3mm 1mm 0; } .pdoc .ft td.v { border-bottom: 1px dotted #444; min-width: 36mm; }
.pdoc .gap { display: inline-block; min-width: 24mm; border-bottom: 1px dotted #444; text-align: center; font-weight: 700; color: #1d7a48; }
.pdoc .bankline { font-size: 9pt; color: #445; margin-top: 1.5mm; }
.pdoc .mt { display: grid; grid-template-columns: 1fr 1fr; gap: 2mm 8mm; margin-top: 1.5mm; } .pdoc .mt ol { margin: 0; padding-left: 5mm; } .pdoc .mt li { margin-bottom: 1.5mm; }
.pdoc .mt .sol { color: #1d7a48; font-weight: 700; }
.pdoc .sol-line { margin-top: 1.5mm; color: #1d7a48; } .pdoc .sol-line b { color: #1d7a48; }
.pdoc .expl { margin-top: 1mm; font-size: 9.5pt; color: #445; }
.pdoc .corr-h { font-size: 18pt; margin: 0 0 3mm; } .pdoc .corr-h small { font-size: 10pt; color: #667; }
.pdoc .corr-list { counter-reset: c; padding: 0; list-style: none; } .pdoc .corr-list li { margin: 0 0 2.5mm; padding-left: 8mm; position: relative; break-inside: avoid; }
.pdoc .corr-list li::before { counter-increment: c; content: counter(c) "."; position: absolute; left: 0; font-weight: 800; color: #3b5bdb; }
.pdoc .annex { break-before: page; }
.pdoc .pt { min-width: 0; width: 100%; } .pdoc .pt-legend { font-size: 8pt; } .pdoc .pt-scroll { overflow: visible; }
.pdoc .bareme { margin: 0 0 5mm; border: 1.5px solid #3b5bdb; border-radius: 2mm; padding: 2.5mm 4mm; font-size: 10pt; display: flex; justify-content: space-between; gap: 6mm; flex-wrap: wrap; }
.pdoc .total { text-align: right; font-weight: 800; margin-top: 4mm; }

@media screen and (max-width: 600px) { .pdoc { padding: 12px; } .pdoc .opts, .pdoc .mt { grid-template-columns: 1fr; } .pdoc .idline { flex-wrap: wrap; } }

@media print {
  html, body { background: #fff !important; }
  .print-bar, .print-note, .toast { display: none !important; }
  .pdoc { max-width: none; margin: 0; padding: 0; border-radius: 0; box-shadow: none; }
  .pdoc .opts { grid-template-columns: 1fr 1fr; } .pdoc .mt { grid-template-columns: 1fr 1fr; }
}
