/* ===== MarQenti · Prépa Bac Informatique — printable A4 fiches (exercices + corrigés) =====
   Standalone print stylesheet. Re-styles the deck code-components (.codebox/.dual/.tdo/.trace/
   .kw/.cm/.st/.exo/.qcm/.legend) in FIXED units for A4 — the deck's cqh units only work in the
   16:9 stage. Black · red · grey. */
:root{ --ink:#0E0E0E; --red:#C3001E; --grey:#8C877D; --grey-d:#43403A; --grey-l:#DEDBD4;
  --line:rgba(14,14,14,.2); --body:#26231d; }
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; background:#fff; color:var(--body);
  font-family:'Newsreader',Georgia,serif; }
.page{ width:210mm; min-height:297mm; margin:0 auto; padding:16mm 15mm 18mm; background:#fff; }

/* header */
.fhead{ display:flex; align-items:flex-end; justify-content:space-between;
  border-bottom:2px solid var(--ink); padding-bottom:5mm; margin-bottom:7mm; }
.fhead .wm{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:15pt; color:var(--ink); }
.fhead .wm i{ font-style:normal; color:var(--red); }
.fhead .meta{ text-align:right; font-family:'Space Mono',monospace; font-size:8pt;
  letter-spacing:.1em; text-transform:uppercase; color:var(--grey); line-height:1.5; }
.ftitle{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:19pt; color:var(--ink);
  margin:0 0 1mm; letter-spacing:-.01em; }
.fkick{ font-family:'Space Mono',monospace; font-size:8.5pt; letter-spacing:.16em; text-transform:uppercase;
  color:var(--red); margin-bottom:6mm; }
.fname{ font-family:'Space Mono',monospace; font-size:8.5pt; color:var(--grey); margin:5mm 0 7mm;
  border:1px solid var(--line); padding:2.5mm 3mm; }
.ftag{ display:inline-block; font-family:'Space Mono',monospace; font-size:8pt; letter-spacing:.14em;
  text-transform:uppercase; background:var(--ink); color:#fff; padding:1mm 3mm; margin-bottom:5mm; }
.ftag.cor{ background:var(--red); }

/* exercise */
.fexo{ border-left:3px solid var(--red); padding:0 0 0 5mm; margin:0 0 8mm;
  break-inside:avoid; page-break-inside:avoid; }
.fexo.bac{ border-left-color:var(--ink); }
.fexo .eh{ display:flex; align-items:baseline; gap:4mm; margin-bottom:2.5mm; flex-wrap:wrap; }
.fexo .en{ font-family:'Space Mono',monospace; font-size:9pt; letter-spacing:.12em; text-transform:uppercase;
  background:var(--ink); color:#fff; padding:.8mm 2.5mm; }
.fexo.bac .en{ background:var(--red); }
.fexo .pts{ font-family:'Space Mono',monospace; font-weight:700; font-size:9pt; color:var(--red); }
.fexo .src{ font-family:'Space Mono',monospace; font-size:8pt; letter-spacing:.08em; text-transform:uppercase;
  color:var(--grey); margin-left:auto; }
.fexo .stmt{ font-size:11pt; line-height:1.4; color:var(--body); margin-bottom:2mm; }
.fexo .stmt b{ color:var(--ink); } .fexo .stmt em{ color:var(--grey-d); }

/* code blocks (print) */
.codebox{ margin:3mm 0; }
.codebox .hd{ font-family:'Space Mono',monospace; font-size:7.5pt; letter-spacing:.12em; text-transform:uppercase;
  background:var(--ink); color:#fff; padding:1mm 2.5mm; display:inline-block; }
.codebox.py .hd{ background:var(--red); }
.codebox .code{ margin:0; border:1px solid var(--line); background:#fafaf8; white-space:pre-wrap;
  font-family:'Space Mono',monospace; font-size:9.2pt; line-height:1.45; color:var(--ink); padding:2.5mm 3mm; }
.dual{ display:grid; grid-template-columns:1fr 1fr; gap:4mm; }
.two{ display:grid; grid-template-columns:1fr 1fr; gap:4mm; align-items:start; }
.kw{ color:var(--red); font-weight:700; } .cm{ color:var(--grey); font-style:italic; } .st{ color:var(--grey-d); }

/* tables */
.tdo,.trace{ border-collapse:collapse; margin:3mm 0; font-family:'Space Mono',monospace; font-size:9pt; }
.tdo caption{ caption-side:top; text-align:left; font-size:7.5pt; letter-spacing:.12em; text-transform:uppercase;
  color:var(--red); padding-bottom:1.5mm; }
.tdo th,.trace th{ background:var(--ink); color:#fff; font-weight:400; font-size:8pt; letter-spacing:.06em;
  padding:1.2mm 3mm; text-align:left; }
.trace th{ background:var(--grey-d); text-align:center; }
.tdo td,.trace td{ border:1px solid var(--line); padding:1.2mm 3mm; background:#fff; }
.trace td{ text-align:center; } .trace td.lab{ text-align:left; font-weight:700; color:var(--ink); background:#f2f1ee; }
.trace td.hi{ background:#fbe9ec; color:var(--red); font-weight:700; } .tdo td.obj{ font-weight:700; color:var(--ink); }

/* qcm */
.qcm{ margin:3mm 0; } .qcm .row{ display:flex; gap:3mm; align-items:flex-start; font-size:10.5pt; margin:1.5mm 0; }
.qcm .box{ width:3.5mm; height:3.5mm; border:1px solid var(--ink); flex:none; margin-top:.6mm; }

/* legend / solution note */
.legend{ font-family:'Space Mono',monospace; font-size:8.5pt; line-height:1.5; color:var(--grey-d); margin:2.5mm 0; }
.legend b{ color:var(--ink); }

/* writing space (exos sheet only) */
.write{ border:1px dashed var(--grey); min-height:34mm; margin:2mm 0 0; border-radius:1mm; }
.write.sm{ min-height:22mm; }

/* solution wrapper (corrigé) */
.fsol{ background:#fbfaf7; border:1px solid var(--line); border-left:3px solid var(--ink); padding:3mm 4mm; margin-top:2mm; }
.fsol .st-title{ display:none; }

.foot{ margin-top:9mm; border-top:1px solid var(--line); padding-top:3mm;
  font-family:'Space Mono',monospace; font-size:7.5pt; letter-spacing:.1em; text-transform:uppercase; color:var(--grey); }

@media print{ @page{ size:A4; margin:0; } .page{ margin:0; } body{ -webkit-print-color-adjust:exact; print-color-adjust:exact; } }
