/* Au Détail Près : catalogue de vente par correspondance et ticket de caisse. Piles de polices système, aucune ressource externe. */
:root {
  --paper: #f2e8d0;
  --paper2: #fffaf0;
  --ink: #1c1a17;
  --muted: #5a5342;
  --red: #a3231a;
  --blue: #1d3f73;
  --cream: #fff6df;
  --gold: #ffd98a;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
  --wrap: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; max-width: 100%; }
body {
  margin: 0; position: relative; max-width: 100%; overflow-x: hidden; overflow-x: clip;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, rgba(90, 83, 66, 0.1) 31px, rgba(90, 83, 66, 0.1) 32px);
  color: var(--ink); font: 17px/1.6 var(--serif);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; overflow-wrap: break-word; }
.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: 8px; top: -60px; z-index: 50; background: var(--ink); color: var(--cream); padding: 0.6rem 1rem; font: 700 0.9rem var(--sans); }
.skip:focus { top: 8px; color: var(--cream); }

/* En-tête */
.masthead { border-bottom: 4px double var(--ink); background: var(--paper); }
.strip { background: var(--ink); color: var(--cream); }
.strip p { margin: 0; max-width: var(--wrap); margin-inline: auto; padding: 0.4rem 20px; font: 600 0.72rem/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
.mast-row { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 14px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.logo img { flex: none; }
.logo-name { font: 800 1.45rem/1 var(--serif); letter-spacing: -0.01em; }
.logo-name b { color: var(--red); font-style: italic; }
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.tabs a, .menu summary { display: inline-flex; align-items: center; min-height: 40px; padding: 0.3rem 0.85rem; background: var(--paper2); border: 1.5px solid var(--ink); color: var(--ink); font: 700 0.76rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; cursor: pointer; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: "▾"; margin-left: 0.4rem; }
.menu[open] summary::after { content: "▴"; }
.tabs a:hover, .menu summary:hover, .menu[open] summary { background: var(--ink); color: var(--cream); }
.menu { position: relative; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; background: var(--paper2); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 6px; display: flex; flex-direction: column; }
.menu-panel a { border: 0; border-bottom: 1px dotted var(--muted); background: transparent; justify-content: flex-start; }
.menu-panel a:last-child { border-bottom: 0; }

/* Page */
main { max-width: var(--wrap); margin: 0 auto; padding: 0 20px 64px; }
.band { margin: 44px 0; }
.band > h2, .prose h2 { font: 800 1.6rem/1.2 var(--serif); margin: 0 0 0.7rem; padding-bottom: 0.35rem; border-bottom: 2px solid var(--ink); }
.band > h2 { margin-bottom: 0.9rem; }
.note { color: var(--muted); font-size: 0.95rem; max-width: 70ch; }
.kicker { margin: 0 0 0.6rem; font: 700 0.74rem var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
.pagehead .kicker::before { content: ""; display: inline-block; width: 0.7em; height: 0.7em; margin-right: 0.55em; background: var(--c, var(--red)); border: 1.5px solid var(--ink); vertical-align: -0.02em; }
.pagehead { padding: 26px 0 22px; border-bottom: 3px double var(--ink); margin-bottom: 8px; }
.pagehead h1 { margin: 0 0 0.6rem; font-size: clamp(1.8rem, 4.6vw, 3rem); font-weight: 800; }
.h1-ico { font-size: 0.9em; margin-right: 0.1em; }
.lead { font-size: 1.12rem; max-width: 68ch; margin: 0 0 0.9rem; }
.count { margin: 0 0 0.9rem; font: 600 0.95rem var(--mono); }
.count b { font-size: 1.3rem; color: var(--red); }
.portrait { float: right; margin: 0 0 12px 18px; border: 3px solid var(--ink); border-radius: 50%; padding: 3px; background: var(--paper2); }
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 14px; padding: 0; font: 0.84rem var(--sans); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 0.5em; color: var(--muted); }
.crumbs a { color: var(--blue); }
.byline { display: flex; align-items: center; gap: 10px; margin: 0.6rem 0 0; font: 0.88rem var(--sans); color: var(--muted); }
.byline img { border-radius: 50%; border: 2px solid var(--ink); flex: none; }

/* Couverture de l'accueil */
.cover { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 40px 0 44px; border-bottom: 3px double var(--ink); }
.cover > *, .cover-text { min-width: 0; }
.cover h1 { font-size: clamp(2.3rem, 6.2vw, 4.1rem); font-weight: 800; line-height: 1.02; margin: 0 0 1rem; letter-spacing: -0.02em; }
.cover mark { background: var(--red); color: var(--cream); padding: 0 0.15em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2rem 0 0.4rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0.55rem 1.2rem; background: var(--ink); color: var(--cream); border: 2px solid var(--ink); font: 700 0.82rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--red); border-color: var(--red); color: var(--cream); }
.btn.alt { background: transparent; color: var(--ink); }
.btn.alt:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.btn.small { min-height: 38px; padding: 0.35rem 0.85rem; font-size: 0.74rem; }
.linkbtn { background: none; border: 0; padding: 0.3rem 0; min-height: 24px; color: var(--blue); font: 600 0.9rem var(--sans); text-decoration: underline; cursor: pointer; }
.linkbtn:hover { color: var(--red); }

/* Ticket de caisse */
.ticket { position: relative; background: #fffdf5; border: 1px solid #d8c9a4; padding: 20px 20px 26px; margin-bottom: 14px; font-family: var(--mono); font-size: 0.95rem; min-width: 0; box-shadow: 0 2px 0 rgba(28, 26, 23, 0.12); }
.ticket::after { content: ""; position: absolute; left: -1px; right: -1px; bottom: -10px; height: 10px; background: linear-gradient(135deg, #fffdf5 5px, transparent 0) 0 0 / 10px 10px repeat-x, linear-gradient(225deg, #fffdf5 5px, transparent 0) 0 0 / 10px 10px repeat-x; }
.ticket-head { margin: 0 0 12px; padding-bottom: 12px; border-bottom: 2px dashed var(--ink); text-align: center; font: 800 1.15rem var(--mono); letter-spacing: 0.14em; overflow-wrap: anywhere; }
.ticket-head small { display: block; margin-top: 4px; font-weight: 400; font-size: 0.78rem; letter-spacing: 0.02em; color: var(--muted); }
.ticket-foot { margin: 14px 0 0; text-align: center; font-size: 0.78rem; color: var(--muted); }
.ticket .rnote { font-family: var(--mono); }
.res { margin: 0; }
.res > div { display: flex; flex-wrap: wrap; gap: 2px 14px; justify-content: space-between; align-items: baseline; padding: 7px 0; border-bottom: 1px dotted #7a705a; }
.res dt { flex: 1 1 12rem; min-width: 0; margin: 0; }
.res dd { flex: 0 1 auto; margin: 0 0 0 auto; text-align: right; font-weight: 700; max-width: 100%; overflow-wrap: break-word; }
.res .main { background: var(--ink); color: var(--cream); padding: 9px 10px; border-bottom: 0; margin: 6px 0; }
.res .main dd { font-size: 1.05rem; }
.rnote { margin: 0.7rem 0 0; font-size: 0.85rem; color: var(--muted); font-style: italic; }
.err { margin: 0; padding: 10px 12px; border-left: 5px solid var(--red); background: #fdeeea; color: #7d1710; font-weight: 700; }
.conv-main { margin: 0 0 8px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); font: 800 1.08rem/1.35 var(--mono); overflow-wrap: break-word; }

/* Rubriques, articles et sites */
.catalog { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.catalog > li { display: flex; min-width: 0; }
.catalog > li > a { flex: 1; min-width: 0; }
.catalog.rubs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.catalog.sites { grid-template-columns: repeat(auto-fill, minmax(min(100%, 235px), 1fr)); gap: 10px; }
.rub a { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 12px; background: var(--paper2); border: 1.5px solid var(--ink); border-top: 9px solid var(--c); color: var(--ink); text-decoration: none; }
.rub-no, .art-ref, .site-ref { font: 700 0.72rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.rub-name { font: 800 1.2rem/1.2 var(--serif); overflow-wrap: break-word; }
.rub-desc { flex: 1; font-size: 0.92rem; color: var(--muted); }
.rub-count { margin-top: 4px; padding-top: 6px; border-top: 2px dotted var(--muted); font: 700 0.86rem var(--mono); }
.art a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ref ico" "name name" "txt txt"; align-content: start; gap: 4px 10px; padding: 12px 14px 12px 16px; background: var(--paper2); border: 1.5px solid var(--ink); border-left: 9px solid var(--c); color: var(--ink); text-decoration: none; }
.art-ref { grid-area: ref; }
.art i { grid-area: ico; font-style: normal; font-size: 1.3rem; line-height: 1; }
.art b { grid-area: name; font: 800 1.02rem/1.25 var(--serif); overflow-wrap: break-word; }
.art-txt { grid-area: txt; font-size: 0.88rem; color: var(--muted); }
.rub a:hover, .art a:hover, a.site:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); color: var(--ink); }
@media (prefers-reduced-motion: no-preference) { .rub a, .art a, a.site { transition: transform 0.12s, box-shadow 0.12s; } }
.sites li { position: relative; }
a.site { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 9px 12px; background: var(--paper2); border: 1.5px dashed var(--ink); border-left: 7px solid var(--c); color: var(--ink); text-decoration: none; }
a.site b { font-weight: 700; overflow-wrap: anywhere; }
.site-cat { flex-basis: 100%; font: 0.78rem var(--sans); color: var(--muted); }
.has-fav .site { padding-right: 44px; }
.fav { position: absolute; top: 2px; right: 2px; width: 38px; height: 38px; display: grid; place-items: center; background: transparent; border: 0; font-size: 1.25rem; color: var(--ink); cursor: pointer; }
.fav:hover { color: var(--red); }
.steps ol { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 16px 16px 16px 62px; background: var(--paper2); border: 1.5px solid var(--ink); display: flex; flex-direction: column; gap: 2px; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 36px; height: 36px; display: grid; place-items: center; background: var(--ink); color: var(--cream); font: 800 1.1rem var(--mono); }
.steps b { font: 800 1.1rem var(--serif); }
.steps span { font-size: 0.93rem; color: var(--muted); }

/* Recherche et favoris */
.finder { margin-bottom: 18px; }
.finder-row { position: relative; margin-bottom: 10px; }
.finder-row input { width: 100%; min-height: 48px; padding: 0.6rem 2.8rem 0.6rem 0.9rem; background: var(--paper2); border: 2px solid var(--ink); color: var(--ink); font: 1rem var(--serif); border-radius: 0; }
.finder-clear { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; background: transparent; border: 0; font-size: 1rem; color: var(--ink); cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 10px; padding: 0; }
.chips button { min-height: 36px; padding: 0.25rem 0.7rem; background: var(--paper2); border: 1.5px solid var(--ink); color: var(--ink); font: 600 0.8rem var(--sans); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.finder-count { margin: 0; font: 600 0.88rem var(--mono); color: var(--muted); }
.favbox { margin: 0 0 22px; padding: 14px 16px; background: var(--paper2); border: 2px solid var(--ink); }
.favhead { margin: 0 0 10px; font: 800 1.15rem var(--serif); }
.favbox-actions { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; }
.empty { padding: 28px 16px; text-align: center; border: 2px dashed var(--ink); background: var(--paper2); }

/* Outils : bon de calcul et ticket */
.toolbox { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; margin: 26px 0 40px; }
.toolbox > * { min-width: 0; }
.toolbox.stack { grid-template-columns: minmax(0, 1fr); }
.slip { min-width: 0; margin: 0; }
.slip fieldset, .slip.box { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; min-width: 0; padding: 18px 18px 20px; background: var(--paper2); border: 2px solid var(--ink); box-shadow: 6px 6px 0 rgba(28, 26, 23, 0.85); }
.slip legend { padding: 0.2rem 0.7rem; background: var(--ink); color: var(--cream); font: 700 0.74rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.field label { font: 700 0.9rem/1.3 var(--sans); }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 44px; padding: 0.5rem 0.7rem; background: #fff; border: 2px solid var(--ink); border-radius: 0; color: var(--ink); font: 1rem var(--mono); }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; font-size: 0.92rem; }
.field input[type="file"] { padding: 0.45rem; font-family: var(--sans); }
.field input[type="range"] { padding: 0; min-height: 32px; }
.mini { margin: 2px 0 0; font-size: 0.85rem; }
.swap { align-self: start; min-height: 40px; padding: 0.3rem 0.9rem; background: transparent; border: 2px solid var(--ink); color: var(--ink); font: 700 0.8rem var(--sans); cursor: pointer; }
.swap:hover { background: var(--ink); color: var(--cream); }
.controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; margin: 0 0 14px; }
.controls label { font: 700 0.9rem var(--sans); }
.controls select { min-height: 44px; padding: 0.4rem 0.7rem; border: 2px solid var(--ink); background: #fff; font: 1rem var(--mono); border-radius: 0; }
.clause { margin: 0 0 14px; padding-left: 14px; border-left: 4px solid var(--blue); }
.clause p.clause-t { margin: 0 0 4px; font: 800 1.02rem var(--serif); color: var(--ink); }
.clause small { font-family: var(--mono); color: var(--muted); }
.clause p { margin: 0 0 4px; font-size: 0.88rem; color: var(--muted); font-family: var(--sans); }
.clause ul { margin: 0; padding-left: 1.1rem; font-family: var(--serif); font-size: 0.9rem; }

/* Texte courant */
.prose { max-width: 780px; margin: 32px 0; }
.prose.wide { max-width: none; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { font: 800 1.1rem var(--serif); margin: 1.5rem 0 0.4rem; }
.prose p, .prose li { max-width: 72ch; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: 0.3rem 0; }
ul.plain { list-style: square; padding-left: 1.3rem; columns: 2 280px; column-gap: 28px; }
ul.plain li { break-inside: avoid; overflow-wrap: anywhere; }
.guide .intro { font-size: 1.1rem; }
.guide .intro::first-letter { float: left; font: 800 3.6rem/0.85 var(--serif); padding: 0.06em 0.1em 0 0; color: var(--red); }
.line-no { display: inline-block; margin-right: 0.55rem; padding: 0.12rem 0.5rem; background: var(--ink); color: var(--cream); font: 700 0.68rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; vertical-align: 0.2em; }
.checklist { margin: 0 0 1rem; padding: 14px 16px; background: var(--paper2); border: 2px dashed var(--ink); }
.checklist ul { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding-left: 1.8rem; margin: 0.35rem 0; }
.checklist li::before { content: "\2610"; position: absolute; left: 0; font-family: var(--mono); font-size: 1.15rem; line-height: 1.4; }
.faq details { border-bottom: 1px dashed var(--ink); padding: 0.2rem 0; }
.faq summary { cursor: pointer; padding: 0.55rem 0; font: 700 1rem var(--sans); }
.faq details[open] summary { color: var(--red); }
.faq p { margin: 0 0 0.8rem; max-width: 70ch; }
.chiplist { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 8px; }
.chiplist li { margin: 0; max-width: 100%; }
.chiplist a { display: inline-block; padding: 0.4rem 0.8rem; background: var(--paper2); border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; font: 600 0.88rem var(--sans); overflow-wrap: anywhere; }
.chiplist a:hover { background: var(--ink); color: var(--cream); }
.embedbox { padding: 16px; background: var(--paper2); border: 2px dashed var(--ink); margin: 0 0 1rem; }
.embedbox textarea { width: 100%; min-width: 0; padding: 0.6rem; border: 2px solid var(--ink); background: #fff; color: var(--ink); font: 0.85rem/1.5 var(--mono); border-radius: 0; margin: 0 0 10px; }
.status { margin: 6px 0 0; font: 600 0.9rem var(--sans); min-height: 1.4em; }
.example { padding: 14px 16px; background: var(--paper2); border-left: 6px solid var(--red); margin: 0 0 1rem; }
.example ul { padding-left: 1.2rem; }
.callout { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 1.6rem 0; padding: 16px 18px; background: var(--paper2); border: 2px solid var(--ink); border-left: 12px solid var(--c, var(--red)); }
.callout p { flex: 1 1 260px; margin: 0; font-weight: 700; }
.guide-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 1rem; }
.guide-nav a { display: block; padding: 12px 14px; background: var(--paper2); border: 2px solid var(--ink); color: var(--ink); text-decoration: none; font: 800 1rem var(--serif); }
.guide-nav a:hover { background: var(--ink); color: var(--cream); }
.guide-nav span { display: block; font: 700 0.7rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.guide-nav a:hover span { color: var(--gold); }
dl.facts { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 6px 18px; margin: 0 0 1rem; }
dl.facts dt { font-weight: 700; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
dl.crit-list { grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); border-top: 2px solid var(--ink); padding-top: 8px; }
dl.crit-list dt { padding-bottom: 6px; border-bottom: 1px dotted var(--muted); }
dl.crit-list dd { padding-bottom: 6px; border-bottom: 1px dotted var(--muted); }
.links { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.links a { display: flex; flex-direction: column; padding: 10px 12px; background: var(--paper2); border: 1.5px solid var(--ink); text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.links span { font-size: 0.82rem; color: var(--muted); }

/* Courriers */
.modele-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; margin: 26px 0 36px; align-items: start; }
.modele-grid > * { min-width: 0; }
.modele-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px; background: var(--paper2); border: 2px solid var(--ink); }
.modele-side h2 { margin-top: 0; font: 800 1.3rem var(--serif); }
.paper { padding: 28px 26px; background: #fff; color: #111; border: 1px solid #cbbd98; box-shadow: 5px 5px 0 rgba(28, 26, 23, 0.7); font: 16px/1.55 var(--serif); min-height: 320px; overflow-wrap: anywhere; }
.paper p { margin: 0 0 0.3em; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Balance des offres */
.matrix { margin: 26px 0; }
.matrix-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 10px; }
.names { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin-bottom: 14px; }
.help { color: var(--muted); font-size: 0.92rem; margin: 0 0 12px; }
.crit { margin: 0 0 14px; padding: 12px 14px; border: 2px dashed var(--ink); background: var(--paper2); min-width: 0; }
.crit legend { padding: 0 0.5rem; font: 700 0.8rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.crit > .field { margin-bottom: 8px; }
.scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin-top: 8px; }
.ranking { list-style: none; margin: 0 0 10px; padding: 0; }
.ranking li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "rk name sc" "bar bar bar"; gap: 4px 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px dotted var(--muted); }
.rk { grid-area: rk; font-weight: 800; }
.ranking b { grid-area: name; overflow-wrap: anywhere; }
.sc { grid-area: sc; font-weight: 800; }
.bar { grid-area: bar; display: block; height: 10px; border: 1.5px solid var(--ink); background: #fff; }
.bar i { display: block; height: 100%; background: var(--red); }
.verdict { margin: 8px 0 0; padding: 8px 10px; border-left: 5px solid var(--ink); font-weight: 700; font-family: var(--sans); }
.fallback { padding: 12px 14px; border: 2px dashed var(--ink); background: var(--paper2); }

/* Tableaux */
.tablewrap { overflow-x: auto; max-width: 100%; position: relative; margin: 0 0 0.6rem; -webkit-overflow-scrolling: touch; }
table.evlist { width: 100%; border-collapse: collapse; font: 0.9rem/1.45 var(--sans); }
table.evlist th, table.evlist td { padding: 7px 10px; text-align: left; vertical-align: top; border-bottom: 1px dotted var(--muted); }
table.evlist thead th { background: var(--ink); color: var(--cream); font-weight: 700; white-space: nowrap; }
table.evlist tbody th { font-weight: 700; }

/* Pied de page */
.foot { background: var(--ink); color: #e9dfc3; margin-top: 30px; border-top: 6px double var(--paper); }
.foot a { color: var(--gold); }
.foot a:hover { color: #fff; }
.foot-top { max-width: var(--wrap); margin: 0 auto; padding: 38px 20px 26px; display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 30px; }
.foot-top > * { min-width: 0; }
.foot .logo { color: #f6ecd0; }
.foot .logo-name b { color: var(--gold); }
.foot-about p { font-size: 0.92rem; max-width: 40ch; }
.foot-title { margin: 0 0 8px; font: 700 0.74rem var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 0.4rem 0; font-size: 0.92rem; overflow-wrap: anywhere; }
.foot-bottom { max-width: var(--wrap); margin: 0 auto; padding: 16px 20px 28px; border-top: 1px dashed #7a705a; font-size: 0.82rem; }
.foot-bottom p { margin: 0 0 4px; }
.thanks { font-family: var(--mono); color: var(--gold); }

/* Pages intégrables */
body.embed { background-image: none; background-color: var(--paper2); }
.embed-wrap { max-width: 640px; padding: 14px 14px 22px; }
.embed-wrap h1 { font-size: 1.35rem; margin: 6px 0 4px; }
.embed .toolbox { grid-template-columns: minmax(0, 1fr); margin: 12px 0 18px; gap: 20px; }
.embed-credit { margin: 10px 0 0; font: 0.82rem var(--sans); text-align: right; }

@media (min-width: 900px) {
  .cover .ticket { transform: rotate(1.2deg); }
}
@media (max-width: 899px) {
  .cover { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 28px 0 34px; }
  .toolbox, .modele-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-about { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .menu { position: static; }
  .menu-panel { left: 20px; right: 20px; min-width: 0; }
  .steps ol { grid-template-columns: minmax(0, 1fr); }
  .guide-nav, .matrix-top { grid-template-columns: minmax(0, 1fr); }
  dl.facts, dl.crit-list { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  dl.facts dd { margin-bottom: 8px; }
  .portrait { float: none; display: block; margin: 0 0 12px; }
  .paper { padding: 20px 16px; }
}
@media (max-width: 520px) {
  .foot-top { grid-template-columns: minmax(0, 1fr); }
  .tabs { gap: 6px; }
  .tabs a, .menu summary { padding: 0.3rem 0.65rem; }
  .strip p { letter-spacing: 0.06em; }
}
@media print {
  body * { visibility: hidden; }
  .paper, .paper * { visibility: visible; }
  .paper { position: absolute; left: 0; top: 0; width: 100%; border: 0; box-shadow: 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}
}
