/* Chuck & Co : noir sur crème, Libre Baskerville. Mobile d'abord (on arrive par un QR). */
@font-face { font-family: "LB"; src: url("fonts/libre-baskerville-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "LB"; src: url("fonts/libre-baskerville-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "LB"; src: url("fonts/libre-baskerville-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --creme: #f6f0e4;
  --papier: #fbf8f1;
  --kraft: #c9a97c;
  --kraft-pale: #eadcc4;
  --encre: #1b1714;
  --encre-douce: #4a423a;
  --trait: #d9ccb6;
  --air: #8a6f4d;
  --mesure: 42rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font: 400 1.0625rem/1.65 "LB", Georgia, "Times New Roman", serif;
}
a { color: var(--encre); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }

.page { max-width: var(--mesure); margin: 0 auto; padding: 0 16px; }

/* En-tête */
.entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 10px; border-bottom: 1px solid var(--encre); }
.entete .marque { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.entete .marque img { width: 40px; height: auto; display: block; }
.entete .marque span { font-weight: 700; letter-spacing: .12em; font-size: .9rem; }
.entete nav a { font-size: .85rem; letter-spacing: .04em; }

/* Titres */
h1, h2, h3 { line-height: 1.2; font-weight: 700; }
h1 { font-size: 2.1rem; margin: .1em 0 .15em; letter-spacing: .02em; }
h2 { font-size: 1.35rem; margin: 2.4rem 0 .8rem; padding-top: 1.2rem; border-top: 1px solid var(--trait); }
h3 { font-size: 1.08rem; margin: 1.6rem 0 .4rem; }
.surtitre { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; margin: 1.6rem 0 0; }
.soustitre { font-style: italic; margin: 0; color: var(--encre-douce); }
.petit { font-size: .88rem; color: var(--encre-douce); }

/* Fiche du sac */
.fiche { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 1.2rem 0 0; }
.fiche div { background: var(--papier); border: 1px solid var(--trait); border-radius: 6px; padding: 8px 10px; }
.fiche dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--encre-douce); }
.fiche dd { margin: 0; font-weight: 700; font-size: .98rem; }

/* Courbe */
.lecture {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px;
  background: var(--encre); color: var(--creme); border-radius: 6px 6px 0 0;
  padding: 8px 10px; font-size: .78rem; line-height: 1.35; font-variant-numeric: tabular-nums;
}
.lecture div { min-width: 0; }
.lecture span { display: block; font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.lecture b { font-size: .95rem; white-space: nowrap; }
.lecture .large { grid-column: span 2; }
.courbe { background: var(--papier); border: 1px solid var(--encre); border-top: 0; border-radius: 0 0 6px 6px; padding: 6px 0 4px; }
.courbe svg { display: block; width: 100%; height: auto; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.courbe svg:focus { outline: 2px solid var(--encre); outline-offset: 2px; }
.courbe text { font-family: "LB", Georgia, serif; }
.legende { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .82rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.legende li { display: flex; align-items: center; gap: 6px; }
.legende svg { flex: none; }
.astuce { font-size: .85rem; font-style: italic; color: var(--encre-douce); margin: .4rem 0 0; }

/* Tableaux */
table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--trait); vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; border-bottom: 1px solid var(--encre); }
td.nombre, th.nombre { text-align: right; white-space: nowrap; }

/* Phases */
.barre-phases { display: flex; height: 44px; border: 1px solid var(--encre); border-radius: 4px; overflow: hidden; margin: .8rem 0 1rem; }
.barre-phases div { display: flex; flex-direction: column; justify-content: center; align-items: center; font-size: .72rem; line-height: 1.2; border-right: 1px solid var(--encre); min-width: 0; overflow: hidden; }
.barre-phases div:last-child { border-right: 0; background: var(--encre); color: var(--creme); }
.barre-phases div:nth-child(2) { background: var(--kraft-pale); }
.barre-phases b { font-size: .8rem; }
.phase { background: var(--papier); border: 1px solid var(--trait); border-radius: 6px; padding: 4px 14px 10px; margin: 0 0 12px; }
.phase h3 { margin-top: .8rem; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.phase h3 small { font-weight: 400; font-size: .88rem; font-variant-numeric: tabular-nums; }
.phase p { margin: .4rem 0; }

/* Encadrés */
.note { background: var(--kraft-pale); border-left: 3px solid var(--encre); padding: 10px 14px; border-radius: 0 6px 6px 0; margin: 1rem 0; }
.note p { margin: .3rem 0; }

/* Origine */
.origine { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.origine dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--encre-douce); padding-top: 3px; }
.origine dd { margin: 0; }

/* Accueil */
.heros { text-align: center; padding: 2rem 0 .5rem; }
.heros img { width: min(68vw, 260px); }
.heros p { font-size: 1.15rem; font-style: italic; margin: 1rem auto 0; max-width: 28rem; }
.batchs { list-style: none; padding: 0; margin: 0; }
.batchs li { border-bottom: 1px solid var(--trait); }
.batchs a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 2px; text-decoration: none; }
.batchs a:hover b { text-decoration: underline; }
.batchs span { color: var(--encre-douce); font-size: .9rem; white-space: nowrap; }

/* Pied */
.pied { margin: 3.5rem 0 0; padding: 1.4rem 0 2.4rem; border-top: 1px solid var(--encre); text-align: center; font-size: .85rem; }
.pied img { width: 76px; display: block; margin: 0 auto .6rem; }
.pied p { margin: .2rem 0; }

@media (min-width: 640px) {
  body { font-size: 1.125rem; }
  h1 { font-size: 2.6rem; }
  .fiche { grid-template-columns: repeat(4, 1fr); }
  .lecture { grid-template-columns: .7fr 1.4fr repeat(5, 1fr); font-size: .82rem; }
  .lecture .large { grid-column: auto; }
}
@media print {
  .entete nav, .astuce { display: none; }
  body { background: #fff; }
}
