:root {
  --papier: #fcf8f1;
  --encre: #332d28;
  --terre: #924823;
  --filet: #d8ccbc;
}
* { box-sizing: border-box; }
body {
  max-width: 41rem;
  margin: 3rem auto;
  padding: 0 1.2rem;
  background: var(--papier);
  color: var(--encre);
  font: 1.125rem/1.6 Georgia, serif;
}
h1, h2 { line-height: 1.2; }
h1 { font-size: 2rem; margin: 0; }
h2 { font-size: 1.35rem; margin: 2.4rem 0 .7rem; }
p { margin: .9em 0; }
a { color: var(--terre); text-underline-offset: .16em; }
a:hover { text-decoration-thickness: 2px; }
.byline, figcaption, caption, .note, footer, .reading {
  color: #65594e;
  font: .875rem/1.5 system-ui, sans-serif;
}
.byline { margin: .3rem 0 1.5rem; font: italic 1rem/1.5 Georgia, serif; }
nav { font: .9rem/1.8 system-ui, sans-serif; }
details { margin: .75rem 0; }
summary { cursor: pointer; color: var(--terre); font: .9rem/1.6 system-ui, sans-serif; }
.options { display: flex; flex-wrap: wrap; align-items: baseline; gap: .65rem 1rem; }
.options select { max-width: 100%; }
#comparaison .pair { margin: .8rem 0; }
button, select, label, output, .legend { font: .875rem/1.45 system-ui, sans-serif; }
button, select { color: var(--encre); background: #fffaf4; border: 1px solid #bbae9e; border-radius: .23rem; cursor: pointer; padding: .25em .6em; }
button:not(:disabled):hover, select:hover { border-color: var(--terre); }
button[aria-pressed=true] { color: white; background: var(--terre); border-color: var(--terre); }
:focus-visible { outline: 2px solid var(--terre); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
figure { margin: 1.35rem 0; }
figcaption { margin: .4rem 0; }
img { display: block; max-width: 100%; }
code, pre { font: .85em/1.5 ui-monospace, monospace; }
pre { padding: .65rem .85rem; border-left: 2px solid #c8885c; background: #f4ede1; white-space: pre-wrap; }
.extrait pre { margin: 0; overflow-x: auto; white-space: pre; }
.extrait pre code { font-size: inherit; }
.sortie { margin: 0; padding: .5rem .85rem; border-left: 2px solid var(--filet); font-size: .92rem; }
.sortie::before { content: "Output"; display: block; color: #65594e; font: .78rem/1.5 system-ui, sans-serif; }
.viewer { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.view-img { position: relative; }
.cross { position: absolute; top: 49.61%; left: 50.39%; transform: translate(-50%, -50%); color: white; text-shadow: 0 0 2px black; }
#bands { margin: .65rem 0; }
.reading, output, td { font-variant-numeric: tabular-nums; }
.legend, .transport { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.legend label { margin-left: auto; }
.legend span:not(.sr)::before { content: ""; display: inline-block; width: 1rem; vertical-align: middle; margin-right: .3rem; }
.train::before { border-top: 2px solid #ad4b23; }
.val::before { border-top: 2px dashed #176f67; }
#plot, #cnn-plot { width: 100%; display: block; margin: .4rem 0; }
:is(#plot, #cnn-plot) text { font: 14px system-ui, sans-serif; fill: #555; }
.transport input { flex: 1; min-width: 4rem; accent-color: var(--terre); }
.pair, .choices, .film { display: grid; gap: .6rem; }
.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 27rem; }
#associations { position: relative; margin: 1rem 0; user-select: none; }
.choices { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
#etiquettes { margin-top: clamp(4rem, 12vw, 6rem); align-items: stretch; }
#associations button { position: relative; z-index: 1; min-width: 0; }
#images-jeu button { width: 100%; padding: 0 0 .3rem; cursor: crosshair; touch-action: none; }
#images-jeu button[aria-pressed="true"] { outline: 2px solid var(--terre); }
#images-jeu button::after, #etiquettes button::before {
  content: ""; position: absolute; left: 50%; width: .5rem; height: .5rem;
  border-radius: 50%; background: var(--terre); transform: translate(-50%, -50%);
}
#images-jeu button::after { top: 100%; }
#etiquettes button::before { top: 0; }
#etiquettes button { min-height: 2.8rem; padding: .35rem .2rem; }
#traits { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
#traits path { fill: none; stroke: var(--terre); stroke-width: 2.5; }
#traits .provisoire { stroke-dasharray: 5 3; }
.choices .correction { display: block; font: .8rem/1.35 system-ui,sans-serif; margin-top: .4rem; }
.pair figure, .choices figure, .film figure { margin: 0; }
.pair img, .choices img, .film img { width: 100%; }
.film { grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); }
table { border-collapse: collapse; width: 100%; font: .875rem/1.4 system-ui, sans-serif; }
caption { text-align: left; margin-bottom: .3rem; }
th, td { text-align: right; padding: .4rem .15rem; border-bottom: 1px solid var(--filet); }
th:first-child { text-align: left; }
footer { border-top: 1px solid var(--filet); padding-top: 1rem; margin-top: 2.5rem; }
@media (max-width: 500px) {
  body { margin: 1.4rem auto; }
  .viewer { gap: .6rem; }
  .legend label { margin-left: 0; }
  :is(#plot, #cnn-plot) text { font-size: 19px; }
}
