/* ============================================================
   Fiches mémo — feuille A4 « papier », même identité que le site
   (bleu nuit + ambre, Archivo / Inter). Volontairement claire,
   à l'écran comme à l'impression.
   ============================================================ */
.mm-root {
  --mm-ink: #0f1b2d;
  --mm-ink-2: #34496a;
  --mm-text: #1e293b;
  --mm-muted: #5b6b82;
  --mm-line: #dfe5ee;
  --mm-paper: #ffffff;
  --mm-tint: #f4f6fa;
  --mm-amber: #f59e0b;
  --mm-amber-soft: #fff6e0;
  --mm-amber-ink: #8a5300;
  --mm-display: 'Archivo', 'Inter', system-ui, sans-serif;
  --mm-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--mm-text);
  font-family: var(--mm-body);
}

/* ---------- Index (onglet Mémo) ---------- */
.mm-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: .75rem; }
.mm-card {
  display: flex; flex-direction: column; gap: .2rem; text-align: left; cursor: pointer;
  background: var(--mm-paper); border: 1px solid var(--mm-line); border-radius: .9rem; padding: .9rem 1rem;
  font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s;
}
.mm-card:hover { border-color: #94a3b8; }
.mm-card:focus-visible { outline: 3px solid rgba(245,158,11,.5); outline-offset: 2px; }
.mm-card.active { border-color: var(--mm-amber); box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.mm-card-code { font-family: var(--mm-display); font-weight: 800; font-size: .8rem; letter-spacing: .06em; color: var(--mm-amber-ink); }
.mm-card-title { font-family: var(--mm-display); font-weight: 700; font-size: 1.02rem; color: var(--mm-ink); line-height: 1.25; }
.mm-card-sub { font-size: .8rem; color: var(--mm-muted); }
.mm-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin: 1.25rem 0 .75rem; }
.mm-toolbar-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Bandeau « en cours de rédaction » */
.mm-wip { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-top: 1.25rem; padding: .8rem 1rem; border-radius: .8rem; background: var(--mm-amber-soft); border: 1px solid #f2c766; color: var(--mm-amber-ink); font-size: .9rem; line-height: 1.45; }
.mm-wip-tag { font-family: var(--mm-display); font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; background: var(--mm-amber); color: var(--mm-ink); border-radius: .35rem; padding: .2rem .5rem; white-space: nowrap; }
.mm-wip > span:last-child { flex: 1 1 260px; min-width: 0; }

/* ---------- Feuille ---------- */
.mm-sheet {
  background: var(--mm-paper); border: 1px solid var(--mm-line); border-radius: 1rem; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,27,45,.06), 0 8px 28px rgba(15,27,45,.07);
  max-width: 210mm; margin-inline: auto; font-size: .92rem; line-height: 1.5;
}
.mm-head { background: var(--mm-ink); color: #fff; padding: 1.25rem 1.5rem 1.15rem; position: relative; }
.mm-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--mm-amber); }
.mm-head-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.mm-code {
  font-family: var(--mm-display); font-weight: 800; font-size: .85rem; letter-spacing: .08em;
  background: var(--mm-amber); color: var(--mm-ink); border-radius: .4rem; padding: .2rem .55rem;
}
.mm-meta { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: #b8c4d6; }
.mm-title { font-family: var(--mm-display); font-weight: 800; font-size: 1.7rem; line-height: 1.1; margin: .6rem 0 .3rem; text-wrap: balance; color: #fff; }
.mm-lead { margin: 0; color: #d6deea; max-width: 62ch; font-size: .92rem; }

.mm-keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); border-bottom: 1px solid var(--mm-line); background: var(--mm-tint); }
.mm-key { display: flex; flex-direction: column; gap: .1rem; padding: .7rem 1rem; border-right: 1px solid var(--mm-line); }
.mm-key:last-child { border-right: 0; }
.mm-key-v { font-family: var(--mm-display); font-weight: 800; font-size: 1.3rem; color: var(--mm-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.mm-key-l { font-size: .75rem; color: var(--mm-muted); line-height: 1.3; }

.mm-body { column-count: 2; column-gap: 1.75rem; padding: 1.1rem 1.5rem .5rem; }
@media (max-width: 720px) { .mm-body { column-count: 1; } }
.mm-block { break-inside: avoid; margin: 0 0 1.05rem; }
.mm-block h3 {
  font-family: var(--mm-display); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--mm-ink-2); margin: 0 0 .45rem; padding-bottom: .3rem; border-bottom: 2px solid var(--mm-line);
  display: flex; align-items: center; gap: .4rem;
}
.mm-block b { color: var(--mm-ink); font-weight: 700; }

.mm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.mm-list li { position: relative; padding-left: .95rem; }
.mm-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: .38rem; height: .38rem; border-radius: 50%; background: var(--mm-amber); }

.mm-steps { list-style: none; margin: 0; padding: 0; counter-reset: mm; display: grid; gap: .4rem; }
.mm-steps li { counter-increment: mm; position: relative; padding-left: 1.85rem; min-height: 1.4rem; }
.mm-steps li::before {
  content: counter(mm); position: absolute; left: 0; top: .05rem; width: 1.35rem; height: 1.35rem; border-radius: 50%;
  background: var(--mm-ink); color: #fff; font-family: var(--mm-display); font-weight: 800; font-size: .72rem;
  display: grid; place-items: center;
}

.mm-table-wrap { overflow-x: auto; }
.mm-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.mm-table th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--mm-muted); font-weight: 600; padding: .3rem .5rem; background: var(--mm-tint); }
.mm-table td { padding: .38rem .5rem; border-bottom: 1px solid var(--mm-line); vertical-align: top; }
.mm-table td:first-child { font-weight: 600; color: var(--mm-ink); }
.mm-table tr:last-child td { border-bottom: 0; }
.mm-note { font-size: .82rem; color: var(--mm-muted); margin: .45rem 0 0; }

.mm-tag { display: inline-grid; place-items: center; width: 1.05rem; height: 1.05rem; border-radius: .25rem; font-size: .72rem; letter-spacing: 0; }
.mm-trap { background: var(--mm-amber-soft); border: 1px solid #f7d58c; border-radius: .7rem; padding: .7rem .85rem; }
.mm-trap h3 { color: var(--mm-amber-ink); border-color: #f2c766; }
.mm-trap .mm-tag { background: var(--mm-amber); color: var(--mm-ink); }
.mm-pro { border: 1.5px solid var(--mm-ink); border-radius: .7rem; padding: .7rem .85rem; }
.mm-pro h3 { color: var(--mm-ink); }
.mm-pro .mm-tag { background: var(--mm-ink); color: #fff; }
.mm-pro .mm-list li::before { background: var(--mm-ink); }

.mm-foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .6rem 1.5rem; border-top: 1px solid var(--mm-line); font-size: .7rem; color: var(--mm-muted); }

/* Fiche réflexes */
.mm-reflexes { list-style: none; counter-reset: rf; margin: 0; padding: 1.1rem 1.5rem .4rem; display: grid; gap: .6rem; }
.mm-reflexes li { counter-increment: rf; display: grid; grid-template-columns: 2rem 9.5rem 1fr; gap: .25rem .75rem; align-items: baseline; }
.mm-reflexes li::before { content: counter(rf); font-family: var(--mm-display); font-weight: 800; font-size: 1.3rem; color: var(--mm-amber); }
.mm-reflexes b { font-family: var(--mm-display); color: var(--mm-ink); }
@media (max-width: 560px) { .mm-reflexes li { grid-template-columns: 2rem 1fr; } .mm-reflexes li span { grid-column: 2; } }
.mm-numbers { border-top: 1px solid var(--mm-line); margin-top: .6rem; }
.mm-general > .mm-note { padding: .8rem 1.5rem 1rem; margin: 0; font-size: .88rem; }

/* ---------- Impression A4 ---------- */
#memo-print { display: none; }
@media print {
  @page { size: A4; margin: 9mm; }
  html, body { background: #fff !important; }
  body.mm-printing > *:not(#memo-print) { display: none !important; }
  body.mm-printing #memo-print { display: block !important; }
  .mm-sheet { box-shadow: none; border: 0; border-radius: 0; max-width: none; font-size: 9.3pt; line-height: 1.34; break-after: page; }
  .mm-sheet:last-child { break-after: auto; }
  .mm-head, .mm-head::after, .mm-code, .mm-keys, .mm-trap, .mm-steps li::before, .mm-table th, .mm-list li::before, .mm-pro .mm-tag, .mm-trap .mm-tag {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .mm-head { padding: 4mm 6mm 4mm; }
  .mm-title { font-size: 18pt; }
  .mm-body { column-count: 2; padding: 4mm 6mm 0; }
  .mm-reflexes, .mm-general > .mm-note { padding-inline: 6mm; }
  .mm-foot { display: none; }
  .mm-block { margin-bottom: 3.2mm; }
  .mm-table-wrap { overflow: visible; }
}

/* ---------- Fiche de poche « Articles de loi » (A5) ---------- */
.mm-lois { max-width: 148mm; font-size: .84rem; line-height: 1.38; }
.ml-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; background: var(--mm-ink); color: #fff; padding: .7rem 1rem; border-bottom: 3px solid var(--mm-amber); }
.ml-head h2 { font-family: var(--mm-display); font-weight: 800; font-size: 1.1rem; margin: 0; color: #fff; flex: 1 1 auto; }
.ml-asof { font-size: .68rem; color: #b8c4d6; }
.ml-body { padding: .7rem 1rem .4rem; display: grid; gap: .7rem; }
.ml-sec h3 { font-family: var(--mm-display); font-weight: 800; font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; margin: 0 0 .3rem; padding: .2rem .45rem; border-radius: .3rem; background: var(--mm-tint); color: var(--mm-ink-2); }
.ml-csi h3 { background: var(--mm-amber-soft); color: var(--mm-amber-ink); }
.ml-sec dl { display: grid; grid-template-columns: max-content 1fr; gap: .22rem .6rem; margin: 0; }
.ml-sec dt { font-family: var(--mm-display); font-weight: 800; color: var(--mm-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ml-sec dd { margin: 0; min-width: 0; }
.ml-sec dd b { color: var(--mm-ink); }
@media (max-width: 420px) { .ml-sec dl { grid-template-columns: 1fr; gap: 0; } .ml-sec dd { margin-bottom: .35rem; } }
@page lois { size: A5; margin: 6mm; }
@media print {
  .mm-lois { page: lois; max-width: none; font-size: 7.6pt; line-height: 1.28; }
  .ml-head { padding: 2.2mm 3.5mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ml-head h2 { font-size: 11pt; }
  .ml-body { padding: 2.5mm 3.5mm 0; gap: 2.2mm; }
  .ml-sec h3 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Carte « Réflexes de l'APS » (carte de visite 85 × 55 mm) ---------- */
.mm-cardsheet { background: transparent; border: 0; border-radius: 0; box-shadow: none; max-width: none; overflow: visible; }
.mm-card-help { font-size: .85rem; color: var(--mm-muted); margin: 0 0 .75rem; }
.mm-cardpair { display: flex; flex-wrap: wrap; gap: 1rem; }
.mm-bcard {
  container-type: inline-size; width: min(100%, 26rem); min-height: calc(min(100vw - 2rem, 26rem) * 55 / 85); box-sizing: border-box;
  border-radius: 8px; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,27,45,.08), 0 8px 24px rgba(15,27,45,.12); font-family: var(--mm-body);
}
.mm-bcard-front { background: var(--mm-ink); color: #fff; }
.mm-bcard-back { background: #fff; color: var(--mm-text); border: 1px solid var(--mm-line); }
.bc-head { display: flex; align-items: center; gap: 2.4cqw; padding: 3.6cqw 4.5cqw 2.2cqw; border-bottom: .9cqw solid var(--mm-amber); }
.bc-head-light { border-bottom-color: var(--mm-amber); background: var(--mm-ink); color: #fff; }
.bc-logo { font-family: var(--mm-display); font-weight: 800; font-size: 3.3cqw; background: var(--mm-amber); color: var(--mm-ink); border-radius: 1cqw; padding: .5cqw 1.4cqw; letter-spacing: .05em; }
.bc-title { font-family: var(--mm-display); font-weight: 800; font-size: 5.2cqw; line-height: 1; }
.bc-reflexes { list-style: none; counter-reset: bc; margin: 0; padding: 2.6cqw 4.5cqw 0; display: grid; gap: 1.25cqw; font-size: 3.85cqw; line-height: 1.2; flex: 1; }
.bc-reflexes li { counter-increment: bc; display: flex; gap: 1.6cqw; align-items: baseline; }
.bc-reflexes li::before { content: counter(bc); font-family: var(--mm-display); font-weight: 800; color: var(--mm-amber); width: 2.6cqw; flex: none; }
.bc-reflexes b { color: #fff; white-space: nowrap; }
.bc-reflexes span { color: #c9d3e2; }
.bc-nums { display: flex; justify-content: space-between; gap: 1cqw; padding: 2cqw 4.5cqw 3.2cqw; font-size: 2.7cqw; color: #c9d3e2; border-top: 1px solid rgba(255,255,255,.15); }
.bc-nums b { font-family: var(--mm-display); font-size: 4.2cqw; color: var(--mm-amber); display: block; line-height: 1; }
.bc-tree { list-style: none; margin: 0; padding: 2.2cqw 4.5cqw 0; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.bc-q { display: grid; grid-template-columns: 4.6cqw 1fr auto; align-items: center; gap: 2cqw; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 1.3cqw; padding: 1.15cqw 1.6cqw; }
.bc-n { display: grid; place-items: center; width: 4.6cqw; height: 4.6cqw; border-radius: 50%; background: #fff; color: var(--mm-ink); font-family: var(--mm-display); font-weight: 800; font-size: 2.8cqw; }
.bc-qt { font-size: 3.05cqw; line-height: 1.15; color: #dfe6f0; }
.bc-qt b { color: #fff; font-family: var(--mm-display); font-weight: 800; }
.bc-yes { display: flex; align-items: center; justify-content: flex-end; gap: 1cqw; white-space: nowrap; }
.bc-yes i { font-style: normal; font-weight: 700; font-size: 2.3cqw; text-transform: uppercase; letter-spacing: .04em; color: #4ade80; }
.bc-yes svg, .bc-n svg, .bc-no svg { fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bc-yes svg { width: 3cqw; height: 2.5cqw; stroke: #4ade80; }
.bc-yes b { font-family: var(--mm-display); font-weight: 800; font-size: 2.75cqw; color: var(--mm-ink); background: var(--mm-amber); border-radius: 1cqw; padding: .5cqw 1.3cqw; min-width: 21.5cqw; text-align: center; box-sizing: border-box; }
.bc-no { display: flex; align-items: center; gap: 1cqw; height: 3.5cqw; padding-left: 1.6cqw; }
.bc-no svg { width: 4.6cqw; height: 2.8cqw; stroke: #f87171; }
.bc-no i { font-style: normal; font-weight: 700; font-size: 2.3cqw; text-transform: uppercase; letter-spacing: .04em; color: #f87171; }
.bc-rest { background: var(--mm-amber); border-color: var(--mm-amber); grid-template-columns: 4.6cqw 1fr; }
.bc-rest .bc-n { background: var(--mm-ink); }
.bc-rest .bc-n svg { width: 2.8cqw; height: 2.4cqw; stroke: var(--mm-amber); }
.bc-rest .bc-qt, .bc-rest .bc-qt b { color: var(--mm-ink); }
.bc-cadre-note { margin: 0; padding: 1.6cqw 4.5cqw 2.6cqw; font-size: 2.65cqw; line-height: 1.25; color: #c9d3e2; text-align: center; }
.bc-cadre-note b { color: #fff; }
.bc-arts { display: grid; grid-template-columns: max-content 1fr; gap: 1cqw 2.4cqw; margin: 0; padding: 2.6cqw 4.5cqw 3cqw; font-size: 3.15cqw; line-height: 1.17; align-content: space-between; flex: 1; }
.bc-arts dt { font-family: var(--mm-display); font-weight: 800; color: var(--mm-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bc-arts dd { margin: 0; min-width: 0; }
.bc-arts b { color: var(--mm-ink); }
@media print {
  .mm-cardsheet { break-after: page; }
  .mm-card-help { font-size: 8pt; margin: 0 0 4mm; }
  .mm-cardpair { gap: 0; flex-wrap: nowrap; }
  .mm-bcard { width: 85mm; height: 55mm; min-height: 0; overflow: hidden; border-radius: 1.5mm; box-shadow: none; outline: .2mm dashed #94a3b8; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .mm-bcard-back { border: 0; }
  .bc-head, .bc-logo, .bc-head-light { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Pièges détaillés ---------- */
.mm-trap .mm-note { margin: 0 0 .5rem; color: var(--mm-amber-ink); }
.mm-traps { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.mm-traps > li { background: rgba(255,255,255,.75); border: 1px solid #f2d79a; border-radius: .5rem; padding: .5rem .6rem; break-inside: avoid; }
.mm-traps p { margin: 0; }
.mm-traps .tq { font-weight: 600; color: var(--mm-ink); margin-bottom: .3rem; }
.mm-traps .tn { display: inline-block; font-size: .7rem; font-weight: 700; color: var(--mm-amber-ink); background: var(--mm-amber-soft); border: 1px solid #f2c766; border-radius: 999px; padding: 0 .45rem; white-space: nowrap; }
.mm-traps .tok, .mm-traps .tko { display: grid; grid-template-columns: 6.8rem 1fr; gap: .4rem; font-size: .85rem; }
.mm-traps .tok span, .mm-traps .tko span { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding-top: .15rem; }
.mm-traps .tok span { color: #15803d; }
.mm-traps .tok { color: #14532d; font-weight: 600; }
.mm-traps .tko span { color: #b91c1c; }
.mm-traps .tko { color: #7f1d1d; }
.mm-traps .tko s { text-decoration-color: rgba(185,28,28,.5); }
.mm-traps .twhy { font-size: .82rem; color: var(--mm-muted); margin-top: .3rem; padding-top: .3rem; border-top: 1px dashed #f2d79a; }
@media (max-width: 420px) { .mm-traps .tok, .mm-traps .tko { grid-template-columns: 1fr; gap: 0; } }
@media print { .mm-traps > li, .mm-traps .tn { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
/* Les pièges occupent toute la largeur, sur deux colonnes de cartes, et peuvent se couper entre deux cartes */
.mm-block.mm-trap { column-span: all; break-inside: auto; margin-top: .4rem; }
@media (min-width: 721px) { .mm-traps { grid-template-columns: 1fr 1fr; align-items: start; } }
@media print { .mm-traps { grid-template-columns: 1fr 1fr; gap: 2.2mm; } .mm-traps > li { padding: 1.6mm 2mm; } .mm-traps .tok, .mm-traps .tko { grid-template-columns: 25mm 1fr; } }

/* Impression : pas de texte d'aide autour de la carte ; planche de 5 cartes en lot */
@media print {
  .mm-card-help { display: none !important; }
  .mm-batch { display: flex; flex-direction: column; align-items: center; }
  .mm-batch .mm-cardpair + .mm-cardpair { margin-top: 0; }
  .mm-batch .mm-bcard { border-radius: 0; }
}

/* ---------- Sigles de la fiche ---------- */
.mm-block.mm-sigles { column-span: all; break-inside: auto; border-top: 2px solid var(--mm-line); padding-top: .6rem; margin-top: .4rem; }
.mm-sigles h3 { border-bottom: 0; padding-bottom: 0; }
.mm-sigles dl { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .7rem; margin: 0; font-size: .82rem; }
@media (min-width: 721px) { .mm-sigles dl { grid-template-columns: max-content 1fr max-content 1fr; } }
.mm-sigles dt { font-family: var(--mm-display); font-weight: 800; color: var(--mm-ink); white-space: nowrap; }
.mm-sigles dd { margin: 0; min-width: 0; color: var(--mm-text); }
@media print { .mm-sigles dl { grid-template-columns: max-content 1fr max-content 1fr; font-size: 8.4pt; } }

/* ---------- Signature Haliow ---------- */
.mm-brand { display: inline-flex; align-items: center; gap: .35rem; }
.mm-brand img { height: 1.1rem; width: auto; }
.bc-brand { margin-left: auto; display: flex; align-items: center; gap: 1cqw; font-size: 2.3cqw; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: .12em; }
.bc-brand img { height: 3.8cqw; width: auto; }
@media print { .mm-foot { display: flex !important; padding: 2mm 6mm 0; } .mm-brand img { height: 4mm; } }
.mm-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.mm-by { display: inline-flex; align-items: center; gap: .35rem; padding-left: .6rem; border-left: 1px solid rgba(255,255,255,.25); }
.mm-by img { height: 1.05rem; width: auto; }
.ml-head .mm-by { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: #b8c4d6; }
@media print { .mm-by img { height: 3.4mm; } }

/* ---------- Mise en page : pièges et sigles hors des colonnes ---------- */
.mm-after { padding: 0 1.5rem .8rem; display: grid; gap: .9rem; }
.mm-after .mm-block { margin: 0; }
.mm-after .mm-sigles { border-top: 2px solid var(--mm-line); padding-top: .6rem; }
/* Recueils (pièges seuls, synthèse « En poste ») */
.mm-dhead { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; background: var(--mm-ink); color: #fff; padding: .8rem 1.5rem; border-bottom: 4px solid var(--mm-amber); margin-bottom: .9rem; }
.mm-dhead h2 { font-family: var(--mm-display); font-weight: 800; font-size: 1.25rem; margin: 0; color: #fff; }
.mm-dsub { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: #b8c4d6; }
.mm-dhead .mm-by { margin-left: auto; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #b8c4d6; }
.mm-progrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .7rem; padding: 0 1.5rem 1.2rem; }
.mm-procard { border: 1.5px solid var(--mm-ink); border-radius: .6rem; padding: .6rem .75rem; break-inside: avoid; }
.mm-procard h3 { display: flex; align-items: center; gap: .45rem; font-family: var(--mm-display); font-weight: 800; font-size: .9rem; color: var(--mm-ink); margin: 0 0 .4rem; }
.mm-procard .mm-code { font-size: .68rem; padding: .1rem .4rem; }
.mm-procard .mm-list li::before { background: var(--mm-ink); }
@media print {
  .mm-after { padding: 0 6mm 2mm; gap: 3mm; }
  /* Les pièges commencent toujours sur une nouvelle page, avec leur titre */
  .mm-sheet:not(.mm-digest) .mm-after .mm-trap { break-before: page; }
  .mm-trap h3, .mm-trap .mm-note { break-after: avoid; }
  /* Cartes de pièges en 2 colonnes, jamais coupées */
  .mm-traps { display: block; columns: 2; column-gap: 3mm; }
  .mm-traps > li { display: block; break-inside: avoid; margin: 0 0 2.2mm; }
  .mm-dhead { padding: 3mm 6mm; margin-bottom: 3mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .mm-dhead h2 { font-size: 13pt; }
  .mm-progrid { grid-template-columns: 1fr 1fr 1fr; gap: 2.5mm; padding: 0 6mm; font-size: 8.4pt; }
  .mm-procard { padding: 2mm 2.5mm; }
  .mm-procard h3 { font-size: 9pt; }
}
/* Impression plus compacte des pièges et des sigles */
@media print {
  .mm-trap { padding: 2.5mm 3mm; }
  .mm-traps > li { font-size: 8.3pt; line-height: 1.3; margin-bottom: 1.8mm; }
  .mm-traps .tok, .mm-traps .tko { font-size: 8pt; }
  .mm-traps .twhy { font-size: 7.8pt; margin-top: 1mm; padding-top: 1mm; }
  .mm-trap .mm-note { font-size: 7.8pt; margin-bottom: 2mm; }
  .mm-sigles dl { grid-template-columns: max-content 1fr max-content 1fr max-content 1fr; font-size: 7.4pt; gap: .6mm 2.5mm; }
  .mm-after .mm-sigles { padding-top: 1.5mm; }
  .mm-sigles h3 { margin-bottom: 1mm; }
}
@media print {
  .mm-traps .tok, .mm-traps .tko { grid-template-columns: 27mm 1fr; }
  .mm-traps .tok span, .mm-traps .tko span { white-space: nowrap; }
  .mm-progrid { font-size: 10pt; gap: 4mm; }
  .mm-procard { padding: 3mm 3.5mm; }
  .mm-procard h3 { font-size: 10.5pt; }
  .mm-prodigest .mm-list { gap: 1.6mm; }
}

/* Liens Légifrance + QR code de la fiche « Articles de loi » */
.ml-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--mm-amber); display: inline-flex; align-items: baseline; gap: .15em; }
.ml-link:hover, .ml-link:focus-visible { color: var(--mm-amber-ink); border-bottom-style: solid; }
.ml-ext { width: .62em; height: .62em; fill: none; stroke: var(--mm-amber); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ml-legi { margin: 0; padding: .5rem 1rem 0; font-size: .78rem; color: var(--mm-muted); line-height: 1.35; }
.ml-legi b { color: var(--mm-ink); }
.ml-hqr { display: none; }
@media print {
  .ml-link { border-bottom: 0; }
  .ml-ext, .ml-legi { display: none; }
  .mm-lois { position: relative; }
  .ml-hqr { display: flex; align-items: center; gap: 2mm; position: absolute; right: 3.5mm; bottom: 0; font-size: 6pt; line-height: 1.2; color: var(--mm-muted); text-align: right; font-weight: 600; }
  .ml-qr { width: 14mm; height: 14mm; flex: none; }
}
