/* Petit Tirage : une planche de plan média sur papier millimétré. Polices système uniquement, aucune ressource externe. */
:root {
  --paper: #f3eee2;
  --paper2: #e8e1cf;
  --sheet: #fffdf7;
  --ink: #1d1b24;
  --ink2: #4a4655;
  --line: #cdc4ae;
  --red: #b8371c;
  --red-d: #8f2410;
  --blue: #1f4e9c;
  --green: #1f6b4c;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font: 1rem/1.6 var(--sans); background-color: var(--paper);
  background-image:
    linear-gradient(rgba(29, 27, 36, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 27, 36, .10) 1px, transparent 1px),
    linear-gradient(rgba(29, 27, 36, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 27, 36, .045) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { color: var(--red-d); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .6rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 5.2vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: .5rem; top: -4rem; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 50; }
.skip:focus { top: .5rem; }
main { display: block; width: 100%; max-width: 70rem; margin: 0 auto; padding: 1.6rem 1.1rem 3rem; }
main > section { margin: 0 0 2.4rem; }
[hidden] { display: none !important; }

/* En-tête : règle graduée et onglets */
.top { position: relative; z-index: 30; background: var(--sheet); border-bottom: 2px solid var(--ink); }
.ruler { height: 10px; background:
  repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 6px) bottom / 100% 5px no-repeat,
  repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 30px) bottom / 100% 10px no-repeat; opacity: .75; }
.top-in { max-width: 70rem; margin: 0 auto; padding: .7rem 1.1rem 0; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .4rem 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); padding-bottom: .55rem; }
.brand img { display: block; }
.brand-name { font: 700 1.45rem/1 var(--serif); letter-spacing: -.02em; }
.brand:hover { color: var(--red-d); }
.tabs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .25rem; margin-bottom: -2px; }
.tabs > a, .menu > summary { display: block; padding: .5rem .9rem; font: 600 .95rem/1.3 var(--sans); color: var(--ink); text-decoration: none; border: 2px solid transparent; border-bottom: 0; cursor: pointer; list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: " ▾"; }
.tabs > a:hover, .menu > summary:hover, .menu[open] > summary { background: var(--paper); border-color: var(--ink); color: var(--red-d); }
.menu { position: relative; }
.menu-panel { position: absolute; right: 0; top: 100%; z-index: 20; min-width: min(19rem, calc(100vw - 2.2rem)); background: var(--sheet); border: 2px solid var(--ink); box-shadow: 5px 5px 0 rgba(29, 27, 36, .18); padding: .4rem; display: grid; gap: 0; }
.menu-panel a { display: block; padding: .5rem .7rem; color: var(--ink); text-decoration: none; font-size: .95rem; border-bottom: 1px dotted var(--line); }
.menu-panel a:last-child { border-bottom: 0; }
.menu-panel a:hover { background: var(--paper); color: var(--red-d); }

/* Planche : bloc d'ouverture avec repères de coupe */
.sheet { position: relative; background: var(--sheet); border: 2px solid var(--ink); box-shadow: 8px 8px 0 rgba(29, 27, 36, .14); padding: 1.6rem 1.5rem 1.4rem; margin: 10px 8px 2.4rem; }
.sheet::before { content: ""; position: absolute; inset: -11px; pointer-events: none; background:
  linear-gradient(var(--ink), var(--ink)) 0 6px / 8px 1px no-repeat,
  linear-gradient(var(--ink), var(--ink)) 6px 0 / 1px 8px no-repeat,
  linear-gradient(var(--ink), var(--ink)) 100% 6px / 8px 1px no-repeat,
  linear-gradient(var(--ink), var(--ink)) calc(100% - 6px) 0 / 1px 8px no-repeat,
  linear-gradient(var(--ink), var(--ink)) 0 calc(100% - 6px) / 8px 1px no-repeat,
  linear-gradient(var(--ink), var(--ink)) 6px 100% / 1px 8px no-repeat,
  linear-gradient(var(--ink), var(--ink)) 100% calc(100% - 6px) / 8px 1px no-repeat,
  linear-gradient(var(--ink), var(--ink)) calc(100% - 6px) 100% / 1px 8px no-repeat; }
.sheet::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: var(--c, var(--red)); }
.sheet > * { margin-left: .6rem; }
.sheet.hero { padding: 2.2rem 1.5rem 1.6rem; }
.sheet.hero h1 { max-width: 16em; }
.sheet h1 mark { background: none; color: var(--red); }
.stamp { display: inline-block; font: 700 .78rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--red-d); border: 1.5px solid var(--red-d); padding: .3rem .55rem; margin-bottom: 1rem; transform: rotate(-1deg); }
.lead { font-size: 1.1rem; color: var(--ink2); max-width: 46rem; }
.count { font: 600 .95rem/1.4 var(--mono); color: var(--ink2); }
.count b { font-size: 1.5rem; color: var(--red-d); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.2rem 0 1rem .6rem; }
.byline { display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: var(--ink2); margin-top: .8rem; }
.byline img { flex: none; border: 1.5px solid var(--ink); }
.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1.4rem 0 0 .6rem; border: 1.5px solid var(--ink); background: var(--paper); }
.specs div { padding: .7rem .9rem; border-right: 1.5px solid var(--ink); min-width: 0; }
.specs div:last-child { border-right: 0; }
.specs dt { font: 600 .74rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink2); }
.specs dd { margin: 0; font: 700 1.9rem/1.2 var(--serif); color: var(--red-d); }
.portrait { display: block; border: 2px solid var(--ink); margin-bottom: 1rem; }
.crumbs { font: .82rem/1.5 var(--mono); color: var(--ink2); margin-bottom: .9rem; }
.crumbs a { color: var(--ink2); }
.crumbs i { font-style: normal; margin: 0 .35rem; color: var(--red-d); }

/* Boutons */
.btn { display: inline-block; font: 700 1rem/1.2 var(--sans); padding: .8rem 1.3rem; background: var(--red); color: #fff; border: 2px solid var(--ink); text-decoration: none; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.btn:hover { color: #fff; background: var(--red-d); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.alt { background: var(--sheet); color: var(--ink); }
.btn.alt:hover { background: var(--paper2); color: var(--ink); }
.btn.small { padding: .55rem .95rem; font-size: .92rem; box-shadow: 3px 3px 0 var(--ink); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: .3rem 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; margin-right: 1rem; }

/* Bandes et grilles */
.cats > h2, .band > h2, .directory > h2, .faq > h2 { padding-bottom: .4rem; border-bottom: 3px double var(--ink); }
.note { color: var(--ink2); font-size: .95rem; max-width: 52rem; }
.grid { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.grid > li { display: flex; min-width: 0; }
.cat { flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "i b" "i s"; column-gap: .8rem; align-items: center; padding: .85rem 1rem; background: var(--sheet); color: var(--ink); text-decoration: none; border: 1.5px solid var(--ink); border-left: 9px solid var(--c, var(--red)); transition: transform .12s, box-shadow .12s; }
.cat:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); color: var(--ink); }
.cat i { grid-area: i; font-style: normal; font-size: 1.7rem; line-height: 1; }
.cat b { grid-area: b; font: 700 1.02rem/1.25 var(--serif); }
.cat span { grid-area: s; font-size: .85rem; color: var(--ink2); line-height: 1.35; }
.guide-card .cat { border-style: solid; }
.cat.tool { border-style: dashed; border-left-style: solid; }
.band { margin-bottom: 2.4rem; }
.steps { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1.5px solid var(--ink); background: var(--sheet); counter-reset: s; }
.step { padding: 1.1rem 1.1rem 1.2rem; border-right: 1.5px dashed var(--ink); min-width: 0; }
.step:last-child { border-right: 0; }
.step-n { display: inline-block; font: 700 .85rem/1 var(--mono); color: #fff; background: var(--ink); padding: .3rem .5rem; margin-bottom: .6rem; }
.step h3 { margin-bottom: .4rem; }
.step p { font-size: .92rem; color: var(--ink2); }

/* Annuaire */
.finder { margin: 1rem 0; }
.finder-row { position: relative; max-width: 30rem; }
.finder input[type="search"] { width: 100%; padding: .75rem 2.6rem .75rem .9rem; font: 1rem var(--sans); border: 2px solid var(--ink); background: #fff; color: var(--ink); border-radius: 0; -webkit-appearance: none; appearance: none; }
.finder-clear { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 1.1rem; cursor: pointer; color: var(--ink); padding: .4rem .6rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: .9rem 0 0; }
.chips button { font: 600 .85rem/1.2 var(--sans); padding: .45rem .75rem; border: 1.5px solid var(--ink); background: var(--sheet); color: var(--ink); cursor: pointer; }
.chips button:hover { background: var(--paper2); }
.chips button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.finder-count { font: .88rem var(--mono); color: var(--ink2); margin: .8rem 0 0; }
.grid.sites { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr)); gap: .65rem; }
.grid.sites > li { position: relative; }
.site { flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "i b" "i s"; column-gap: .6rem; align-items: center; padding: .6rem 2.4rem .6rem .75rem; background: var(--sheet); color: var(--ink); text-decoration: none; border: 1px solid var(--ink); border-left: 6px solid var(--c, var(--red)); }
.site:hover { background: #fff6dc; color: var(--ink); }
.site i { grid-area: i; font-style: normal; font-size: 1.3rem; }
.site b { grid-area: b; font: 700 .93rem/1.25 var(--sans); overflow-wrap: anywhere; }
.site span { grid-area: s; font-size: .75rem; color: var(--ink2); line-height: 1.3; }
.fav { position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 1.35rem; line-height: 1; cursor: pointer; color: var(--red-d); padding: .45rem .5rem; }
.favbox { border: 1.5px dashed var(--ink); background: var(--sheet); padding: 1rem; margin: 1rem 0 1.4rem; }
.favbox-h { font-size: 1.15rem; border: 0; padding: 0; }
.favbox-actions { margin: .8rem 0 .4rem; }
.empty { text-align: center; padding: 2rem 1rem; border: 1.5px dashed var(--ink); background: var(--sheet); }
.empty-emoji { font-size: 2rem; }
.rnote { font-size: .85rem; color: var(--ink2); margin-top: .8rem; }
.callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; background: var(--sheet); border: 1.5px solid var(--ink); border-left: 9px solid var(--c, var(--red)); padding: 1rem 1.2rem; margin: 1.6rem 0; }
.callout p { margin: 0; flex: 1 1 18rem; font-weight: 600; }

/* Pages de contenu */
.prose { max-width: 50rem; background: var(--sheet); border: 1.5px solid var(--ink); padding: 1.6rem 1.5rem 1.2rem; box-shadow: 6px 6px 0 rgba(29, 27, 36, .1); }
.prose.wide { max-width: none; }
.prose h2 { margin-top: 1.8rem; padding-bottom: .3rem; border-bottom: 1px solid var(--ink); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .35rem; }
.prose ul.grid { padding: 0; }
.prose .grid li { margin: 0; }
.checklist ul { list-style: none; padding: 0; margin: 0; border: 1.5px dashed var(--ink); background: var(--paper); }
.checklist li { padding: .6rem .9rem .6rem 2.4rem; position: relative; border-bottom: 1px dotted var(--ink2); margin: 0; }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before { content: ""; position: absolute; left: .85rem; top: .85rem; width: .9rem; height: .9rem; border: 2px solid var(--ink); background: #fff; }
.chiplist, .plain { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: .5rem; }
.chiplist li { margin: 0; }
.chiplist a { display: inline-block; padding: .4rem .75rem; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); text-decoration: none; font-size: .9rem; }
.chiplist a:hover { background: var(--ink); color: #fff; }
.plain { display: block; }
.plain li { margin-bottom: .3rem; }
.links { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .7rem; }
.links a { display: block; border: 1.5px solid var(--ink); padding: .7rem .9rem; text-decoration: none; color: var(--ink); }
.links b, .links span { display: block; }
.links span { font-size: .8rem; color: var(--ink2); }
.facts { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 0; border: 1.5px solid var(--ink); margin: 0 0 1rem; }
.facts dt { font-weight: 700; padding: .55rem .8rem; background: var(--paper2); border-bottom: 1px solid var(--line); }
.facts dd { margin: 0; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.crit-list { grid-template-columns: minmax(0, 1fr); }
.crit-list dd { background: var(--paper); }
.guide-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.guide-nav a { display: block; border: 1.5px solid var(--ink); padding: .8rem 1rem; background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 600; }
.guide-nav a:hover { background: var(--paper2); }
.guide-nav span { display: block; font: .75rem var(--mono); text-transform: uppercase; color: var(--ink2); }
.faq details { border: 1.5px solid var(--ink); background: var(--sheet); margin: 0 0 .6rem; }
.faq summary { cursor: pointer; padding: .8rem 1rem; font-weight: 700; list-style: none; position: relative; padding-right: 2.5rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1rem; top: .7rem; font: 700 1.2rem var(--mono); color: var(--red-d); }
.faq details[open] > summary::after { content: "−"; }
.faq details > p { margin: 0; padding: 0 1rem 1rem; color: var(--ink2); }
.prose .faq { margin-bottom: 1rem; }

/* Outils : formulaire et résultat */
.toolbox { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.toolbox > * { min-width: 0; }
.toolbox form { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; background: var(--sheet); border: 1.5px solid var(--ink); padding: 1.2rem; box-shadow: 6px 6px 0 rgba(29, 27, 36, .1); }
.toolbox.atelier { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.field { min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.field label { font: 600 .88rem/1.35 var(--sans); }
.field input, .field select, .field textarea { width: 100%; max-width: 100%; min-width: 0; padding: .6rem .7rem; font: 1rem var(--sans); border: 1.5px solid var(--ink); background: #fff; color: var(--ink); border-radius: 0; }
.field textarea { resize: vertical; font-family: var(--mono); font-size: .92rem; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { background: #fffbe8; }
.result { min-width: 0; background: var(--sheet); border: 1.5px solid var(--ink); padding: 1.1rem; box-shadow: 6px 6px 0 rgba(184, 55, 28, .25); }
.res { margin: 0; display: grid; gap: 0; }
.res > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; padding: .6rem .2rem; border-bottom: 1px dotted var(--ink2); align-items: baseline; }
.res dt { color: var(--ink2); font-size: .92rem; min-width: 0; }
.res dd { margin: 0; font: 700 1rem/1.3 var(--mono); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.res .main { background: #fdebe3; border-left: 6px solid var(--red); border-bottom: 1.5px solid var(--ink); padding-left: .7rem; }
.res .main dt { color: var(--ink); font-weight: 700; }
.res .main dd { font-size: 1.25rem; color: var(--red-d); }
.err { color: #7a1c0c; background: #f9dcd5; border-left: 6px solid #7a1c0c; padding: .7rem .9rem; margin: 0; font-weight: 600; }
.example { border: 1.5px dashed var(--ink); padding: 1rem; background: var(--paper); margin-bottom: 1rem; }
.example .result { box-shadow: none; }
.example ul { margin-bottom: 1rem; }
.embedbox { border: 1.5px dashed var(--ink); padding: 1rem; background: var(--paper); margin-bottom: 1rem; }
.embedbox textarea { width: 100%; font: .82rem/1.5 var(--mono); padding: .6rem; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); border-radius: 0; margin-bottom: .6rem; }
.status { min-height: 1.4rem; font-size: .9rem; color: var(--green); font-weight: 600; margin: .5rem 0 0; }
.swap { align-self: flex-start; font: 700 .95rem var(--sans); border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); padding: .5rem .9rem; cursor: pointer; }
.swap:hover { background: var(--paper2); }
.outlist { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .3rem; max-height: 22rem; overflow: auto; }
.outlist li { font: .92rem var(--mono); padding: .3rem .6rem; background: var(--paper); border: 1px solid var(--line); overflow-wrap: anywhere; }
.linkout { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: .6rem; }
.linkout li { border: 1px solid var(--ink); background: var(--paper); padding: .5rem .7rem; min-width: 0; }
.linkout b { display: block; font-size: .85rem; }
.linkout code, .res code { display: block; font: .82rem/1.5 var(--mono); overflow-wrap: anywhere; }
td code { font: .88rem/1.5 var(--mono); }
th, td { overflow-wrap: normal; word-break: normal; }
.subh { font: 700 .95rem var(--serif); margin: 1rem 0 .2rem; }
.wide-result { grid-column: 1 / -1; }
.toolbox:has(.wide-result) { grid-template-columns: minmax(0, 1fr); }

/* Fiches à remplir */
.modele-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; margin-bottom: 2rem; }
.modele-grid > * { min-width: 0; }
.modele-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; background: var(--sheet); border: 1.5px solid var(--ink); padding: 1.2rem; box-shadow: 6px 6px 0 rgba(29, 27, 36, .1); }
.paper { background: #fff; border: 1.5px solid var(--ink); padding: 1.6rem; font: 1rem/1.6 var(--serif); min-height: 14rem; box-shadow: 6px 6px 0 rgba(29, 27, 36, .12); overflow-wrap: anywhere; }
.paper p { margin: 0 0 .3rem; }
.dl-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.modele-side h2 { font-size: 1.2rem; }

/* Calendrier, tableaux, matrice */
.tablewrap { overflow-x: auto; max-width: 100%; position: relative; margin: 0 0 1rem; border: 1.5px solid var(--ink); background: var(--sheet); }
table { border-collapse: collapse; width: 100%; }
.evlist th, .evlist td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .93rem; }
.evlist thead th { font: 700 .78rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; background: var(--ink); color: #fff; white-space: nowrap; }
.evlist tbody th { font-weight: 700; }
.badge { display: inline-block; font: 700 .78rem var(--mono); padding: .15rem .5rem; border: 1px solid; white-space: nowrap; }
.badge.ok { background: #dff0e5; color: #14532d; border-color: #14532d; }
.badge.ko { background: #f9dcd5; color: #7a1c0c; border-color: #7a1c0c; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.controls select { padding: .5rem .7rem; border: 1.5px solid var(--ink); background: #fff; font: 1rem var(--sans); border-radius: 0; }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); gap: .9rem; margin-bottom: 1.4rem; }
.month { min-width: 0; border: 1.5px solid var(--ink); background: var(--sheet); overflow-x: auto; position: relative; }
.month caption { font: 700 .95rem var(--serif); text-align: left; padding: .4rem .6rem; background: var(--paper2); border-bottom: 1.5px solid var(--ink); text-transform: capitalize; }
.month th, .month td { text-align: center; font-size: .78rem; padding: .22rem 0; width: 14.28%; }
.month th { font-family: var(--mono); color: var(--ink2); }
.mk span { display: inline-block; min-width: 1.5rem; padding: .1rem 0; font-weight: 700; }
.mk-fete span { background: #f8d9a8; }
.mk-soldes span { background: #bfdcf5; }
.mk-promo span { background: #f1c4d3; }
.mk-ferie span { background: #d9cbee; }
.grid-plan td { text-align: center; color: var(--red-d); }
.grid-plan td.on { background: #fdebe3; }
.grid-plan th, .grid-plan td { padding: .45rem .5rem; }
.grid-plan thead th { text-align: center; }
.grid-plan tbody th { white-space: nowrap; }
.matrix { background: var(--sheet); border: 1.5px solid var(--ink); padding: 1.3rem; margin-bottom: 2rem; box-shadow: 6px 6px 0 rgba(29, 27, 36, .1); }
.matrix h2 { font-size: 1.3rem; margin-top: 1.2rem; }
.matrix-top, .names, .scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .8rem; margin-bottom: .9rem; }
.matrix-top > *, .names > *, .scores > * { min-width: 0; }
.crit { border: 1.5px dashed var(--ink); background: var(--paper); padding: .9rem; margin: 0 0 .9rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; min-width: 0; }
.crit legend { font: 700 .85rem var(--mono); padding: 0 .4rem; background: var(--sheet); }
.help { color: var(--ink2); font-size: .9rem; margin: 0; }
.ranking { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.ranking li { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 8rem) auto; gap: .7rem; align-items: center; padding: .6rem .8rem; border: 1.5px solid var(--ink); background: var(--paper); }
.ranking .rk { font: 700 1rem var(--mono); color: var(--red-d); }
.ranking .bar { display: block; height: .7rem; background: var(--paper2); border: 1px solid var(--ink); }
.ranking .bar i { display: block; height: 100%; background: var(--red); }
.ranking .sc { font: 700 .95rem var(--mono); white-space: nowrap; }
.verdict { font-weight: 600; border-left: 6px solid var(--red); padding: .5rem .8rem; background: #fdebe3; }
.fallback { background: var(--paper2); border: 1.5px dashed var(--ink); padding: .8rem 1rem; }

/* Pied de page */
.foot { background: var(--ink); color: #e9e4d6; border-top: 4px double #e9e4d6; margin-top: 2rem; }
.foot a { color: #ffd7b8; }
.foot a:hover { color: #fff; }
.foot-grid { max-width: 70rem; margin: 0 auto; padding: 2.4rem 1.1rem 1.4rem; display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 1.6rem; }
.foot-grid > * { min-width: 0; }
.foot-about p { font-size: .9rem; color: #cfc9ba; margin-top: .8rem; }
.foot-h { font: 700 .78rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: #cfc9ba; border-bottom: 1px solid #5a5668; padding-bottom: .4rem; margin-bottom: .7rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: .35rem; font-size: .9rem; }
.brand.on-dark { color: #fff; padding: 0; }
.brand.on-dark:hover { color: #ffd7b8; }
.foot-bottom { border-top: 1px solid #5a5668; max-width: 70rem; margin: 0 auto; padding: 1rem 1.1rem 1.6rem; font-size: .8rem; color: #cfc9ba; }
.foot-bottom p { margin: 0; }

/* Pages intégrables */
body.embed { background: var(--sheet); background-image: none; }
.embed-wrap { max-width: 40rem; padding: 1rem; }
.embed-wrap h1 { font-size: 1.4rem; }
.embed-credit { font-size: .85rem; text-align: right; margin: 1rem 0 0; }
.embed .toolbox { grid-template-columns: minmax(0, 1fr); }

/* Écrans étroits */
@media (max-width: 860px) {
  .toolbox, .toolbox.atelier, .modele-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1.5px dashed var(--ink); }
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot-about { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  main { padding: 1.2rem .9rem 2.4rem; }
  .top-in { padding: .6rem .9rem 0; }
  .tabs { width: 100%; }
  .tabs > a, .menu > summary { padding: .45rem .6rem; font-size: .88rem; }
  .menu { position: static; }
  .menu-panel { left: .9rem; right: .9rem; min-width: 0; }
  .sheet { padding: 1.3rem 1rem 1.1rem; margin: 10px 4px 2rem; }
  .sheet.hero { padding: 1.5rem 1rem 1.2rem; }
  .specs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .specs div:nth-child(2) { border-right: 0; }
  .specs div:nth-child(-n+2) { border-bottom: 1.5px solid var(--ink); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { border-right: 0 !important; border-bottom: 1.5px dashed var(--ink); }
  .step:last-child { border-bottom: 0; }
  .guide-nav { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .prose { padding: 1.2rem 1rem .8rem; }
  .ranking li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ranking .bar { grid-column: 1 / -1; order: 5; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .res > div { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .res dd { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .cat { transition: none; }
}
@media print {
  body { background: #fff; }
  .top, .foot, .skip, .crumbs, .byline, .modele-form, .dl-actions, .cats, .prose, .sheet, .skip { display: none !important; }
  .modele-grid { display: block; }
  .paper { border: 0; box-shadow: none; padding: 0; }
  .modele-side h2 { display: none; }
  main { padding: 0; max-width: none; }
}


/* ===== kit commun : export, filtre, outils liés, impression, grandes listes ===== */
.kit-actions{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin:.9rem 0 0}
.kit-actions button{font:inherit;font-weight:700;font-size:.95rem;cursor:pointer;padding:.45rem .85rem;min-height:44px;border:2px solid currentColor;border-radius:.6rem;background:transparent;color:inherit}
.kit-actions button:hover{text-decoration:underline}
.kit-status{font-size:.9rem;min-height:1.2em}
.kit-filter{margin:0 0 1.2rem}
.kit-filter label{display:block;font-weight:700;margin-bottom:.35rem}
.kit-filter input{font:inherit;width:100%;max-width:32rem;padding:.6rem .8rem;min-height:44px;border:2px solid #222;border-radius:.6rem;background:#fff;color:#111}
.kit-count{margin:.4rem 0 0;font-size:.92rem;min-height:1.2em}
.kit-related{margin:2.2rem 0 1rem;padding:1rem 1.2rem;border:2px solid currentColor;border-radius:.8rem}
.kit-related h2{font-size:1.15rem;margin:0 0 .7rem}
.kit-related ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,15rem),1fr));gap:.4rem .8rem}
.kit-related li{min-width:0}
.kit-related a{display:block;padding:.35rem .1rem;overflow-wrap:break-word}
ul:has(> li:nth-child(40)) > li{content-visibility:auto;contain-intrinsic-size:auto 100px}
@media print{
  body.kit-printing *{visibility:hidden!important}
  body.kit-printing .kit-print-target,body.kit-printing .kit-print-target *{visibility:visible!important}
  body.kit-printing .kit-print-target{position:absolute!important;left:0;top:0;width:100%;color:#000!important;background:#fff!important;box-shadow:none!important}
}
