@font-face { font-family: "Literata"; src: url("/fonts/literata-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/fonts/literata-latin-wght-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  --paper: #E6E9E4; --page: #F6F7F3; --ink: #0E1A2B; --muted: #536071; --line: rgba(14, 26, 43, .17);
  --link: #2438D6; --link-deep: #1626A3; --mark: #FFE45C; --ok: #1C7448; --bad: #B3261E; --warn: #8A5A00;
  --serif: "Literata", "Iowan Old Style", Georgia, serif; --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --w: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans); }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-deep); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4.4vw, 46px); }
h2 { font-size: 26px; } h3 { font-size: 19px; }
p { margin: 0 0 1em; max-width: 68ch; }
small, .small { font-size: 14px; } .muted { color: var(--muted); }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; } .mid { max-width: 780px; }
main { padding: 36px 0 72px; min-height: 60vh; }

/* en-tête */
.top { background: var(--page); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.brand { font: 700 21px/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand span { background: var(--mark); padding: 1px 5px; margin-left: 2px; }
.top nav { display: flex; gap: 20px; flex: 1; flex-wrap: wrap; }
.top nav a, .top .side a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 4px 0; }
.top nav a[aria-current], .top nav a:hover, .top .side a:hover { box-shadow: 0 2px 0 var(--link); }
.top .side { display: flex; gap: 16px; align-items: center; }
footer { border-top: 1px solid var(--line); padding: 28px 0 48px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted); } footer form { display: inline; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
footer .linklike { color: var(--muted); }

/* boutons et formulaires */
.btn { display: inline-block; font: 600 16px/1 var(--sans); padding: 13px 20px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--ink); color: var(--btn-fg, #fff); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--link-deep); border-color: var(--link-deep); color: #fff; }
.btn.alt { background: transparent; color: var(--ink); } .btn.alt:hover { background: var(--ink); color: var(--btn-fg, #fff); border-color: var(--ink); }
.btn.sm { padding: 8px 12px; font-size: 14px; } .btn.danger { background: var(--bad); border-color: var(--bad); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.gbtn { display: inline-flex; align-items: center; gap: 10px; background: #fff; color: #1f1f1f; border-color: #747775; }
.btn.gbtn:hover { background: #f2f2f2; color: #1f1f1f; border-color: #747775; }
.btn.busy { pointer-events: none; opacity: .85; }
.btn.busy::before { content: ""; display: inline-block; width: .9em; height: .9em; margin-right: .55em; vertical-align: -.12em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.busy::before { animation-duration: 2.5s; } }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row form, .top .side form { display: flex; margin: 0; }
.top .side .linklike { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 4px 0; } .top .side .linklike:hover { box-shadow: 0 2px 0 var(--link); }
form.stack > * + * { margin-top: 16px; }
label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
label .hint, .hint { display: block; font-weight: 400; color: var(--muted); font-size: 14px; margin-top: 2px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=file], select, textarea {
  width: 100%; font: 400 16px/1.4 var(--sans); padding: 11px 12px; border: 1.5px solid var(--ink); border-radius: 6px; background: #fff; color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; } .check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin: 0; background: var(--page); } legend { font-weight: 700; padding: 0 6px; }

/* messages */
.flash { background: var(--ink); color: #fff; padding: 12px 0; font-weight: 500; }
.note { border-left: 4px solid var(--link); background: var(--page); padding: 14px 16px; margin: 0 0 20px; max-width: 760px; }
.note.bad { border-color: var(--bad); } .note.ok { border-color: var(--ok); } .note.warn { border-color: var(--warn); }
.note p:last-child { margin-bottom: 0; }
mark, .ai { background: var(--mark); color: var(--ink); padding: 1px 6px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.tag { display: inline-block; border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: 13px; font-weight: 600; background: var(--page); }
.tag.ok { color: var(--ok); border-color: currentColor; } .tag.bad { color: var(--bad); border-color: currentColor; } .tag.warn { color: var(--warn); border-color: currentColor; }

/* accueil */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 28px 0 56px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 58px); font-weight: 500; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 46ch; }
.device { background: var(--ink); border-radius: 22px; padding: 22px 20px 44px; max-width: 420px; justify-self: end; width: 100%; position: relative; }
.device::after { content: ""; position: absolute; left: 50%; bottom: 17px; width: 46px; height: 5px; margin-left: -23px; background: #3A4658; border-radius: 3px; }
.screen { background: var(--paper); border-radius: 4px; padding: 26px 24px 16px; font: 400 16px/1.62 var(--serif); height: 470px; overflow: hidden; display: flex; flex-direction: column; }
.screen h3 { font-size: 17px; margin-bottom: 14px; } .screen .text { flex: 1; overflow: hidden; } .screen p { margin: 0; text-indent: 1.4em; } .screen p:first-child { text-indent: 0; }
.screen .foot { display: flex; justify-content: space-between; font: 500 12px/1 var(--sans); color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--page); margin: 0 0 48px; padding: 0; list-style: none; counter-reset: s; }
.steps li { padding: 22px; border-left: 1px solid var(--line); counter-increment: s; } .steps li:first-child { border-left: 0; }
.steps li::before { content: counter(s); font: 600 30px/1 var(--serif); display: block; margin-bottom: 10px; color: var(--link); }
.steps strong { display: block; font-size: 17px; margin-bottom: 4px; }

/* livres */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 32px 24px; list-style: none; padding: 0; margin: 0; }
.shelf a { color: var(--ink); text-decoration: none; display: block; }
.shelf .t { font: 600 17px/1.25 var(--serif); margin: 10px 0 2px; } .shelf a:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.cover { aspect-ratio: 5 / 8; width: 100%; height: auto; display: block; object-fit: cover; border-radius: 2px 5px 5px 2px; background: #cfd4cc; box-shadow: -3px 0 0 rgba(14, 26, 43, .28) inset, 0 10px 22px -12px rgba(14, 26, 43, .55); }
.book { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: start; }
.book .buy { border: 1.5px solid var(--ink); border-radius: 8px; padding: 20px; background: var(--page); margin: 22px 0; max-width: 460px; }
.price { font: 600 30px/1 var(--serif); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 20px; font-size: 15px; } dl.facts dt { color: var(--muted); } dl.facts dd { margin: 0; }
.devices-line { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 28px; align-items: end; } .filters > div { min-width: 150px; } .filters label { font-size: 13px; }

/* page d'un livre */
.bp-top { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 56px; align-items: center; padding: 8px 0 48px; }
.bp-top .cover { box-shadow: -4px 0 0 rgba(14, 26, 43, .28) inset, 0 28px 48px -24px rgba(14, 26, 43, .7); }
.bp .eyebrow { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 600 13px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.bp .eyebrow a { color: var(--ink); background: var(--mark); padding: 1px 8px; border-radius: 3px; text-decoration: none; }
.bp h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 500; line-height: 1.05; margin: 0 0 10px; text-wrap: balance; }
.bp .by { font-size: 18px; margin: 0 0 22px; }
.bp .hook { font: italic 400 clamp(21px, 2.4vw, 27px)/1.35 var(--serif); max-width: 30em; margin: 0 0 6px; text-wrap: pretty; }
.bp .buy { border: 1.5px solid var(--ink); border-radius: 8px; padding: 20px; background: var(--page); margin: 22px 0 12px; max-width: 480px; }
.bp-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; border-top: 1.5px solid var(--ink); padding-top: 36px; }
.bp-body h2 { font-size: 15px; font-family: var(--sans); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.bp .pitch p { font: 400 19px/1.65 var(--serif); max-width: 34em; margin: 0 0 1em; text-wrap: pretty; }
.bp .pitch p:first-of-type::first-letter { font-size: 3.1em; line-height: .86; float: left; padding: .06em .09em 0 0; font-weight: 500; }
.bp .pitch .readers { font: 400 16px/1.55 var(--sans); border-left: 4px solid var(--mark); padding: 2px 0 2px 16px; margin-top: 1.6em; }
.bp .pitch .readers::first-letter { font-size: inherit; float: none; padding: 0; }
.bp .firstlines { margin-top: 48px; background: var(--page); border: 1px solid var(--line); border-radius: 8px; padding: 30px clamp(20px, 4vw, 44px) 26px; }
.bp .firstlines .ch { font: 600 22px/1.25 var(--serif); margin: 0 0 14px; }
.bp .firstlines p { font: 400 17px/1.7 var(--serif); max-width: 34em; margin: 0 0 .9em; }
.bp .firstlines .more { margin: 22px 0 0; }
.bp aside h3 { font-size: 16px; margin: 26px 0 6px; } .bp aside dl.facts { font-size: 15px; }
.bp-more { border-top: 1px solid var(--line); margin-top: 56px; padding-top: 32px; } .bp-more h2 { margin: 0 0 24px; }
.bp-more .shelf { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 820px) { .bp-top, .bp-body { grid-template-columns: 1fr; gap: 28px; } .bp-top { padding-bottom: 32px; } .bp-top .cover { max-width: 230px; } }

/* tableaux et tableaux de bord */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1.5px solid var(--ink); margin: 0 0 28px; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; border-radius: 6px 6px 0 0; }
.tabs a[aria-current] { background: var(--ink); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--page); margin: 0 0 28px; }
.stats div { padding: 16px 18px; border-left: 1px solid var(--line); } .stats div:first-child { border-left: 0; }
.stats b { display: block; font: 600 26px/1.1 var(--serif); } .stats span { font-size: 14px; color: var(--muted); }
.tbl-wrap { overflow-x: auto; margin: 0 0 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--page); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; } tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { border: 1.5px dashed var(--line); border-radius: 8px; padding: 32px; text-align: center; background: var(--page); margin: 0 0 28px; } .empty p { margin: 0 auto 14px; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; min-width: 80px; } .bar i { display: block; height: 100%; background: var(--link); }
.linkbox { display: flex; gap: 8px; } .linkbox input { font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
.lib { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); } .lib:first-of-type { border-top: 1px solid var(--line); }
.crit { display: grid; grid-template-columns: 130px 1fr 40px; gap: 10px; align-items: center; margin: 6px 0; font-size: 15px; }
pre.mail { white-space: pre-wrap; font: 14px/1.5 ui-monospace, Menlo, monospace; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 12px; margin: 0; }
.kv { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

/* lecteur */
body.reading { background: var(--paper); }
body.reading[data-theme=dark] { --btn-fg: #101820; --paper: #101820; --page: #17212C; --ink: #DCE2E8; --muted: #8E9AA8; --line: rgba(220, 226, 232, .18); --link: #9DB0FF; --link-deep: #C1CEFF; }
body.reading[data-theme=sepia] { --paper: #EFE3CC; --page: #F6ECD9; --ink: #3A2C1A; --muted: #7A6648; --line: rgba(58, 44, 26, .2); }
.rbar { position: sticky; top: 0; background: var(--page); border-bottom: 1px solid var(--line); z-index: 2; }
.rbar .wrap { display: flex; gap: 14px; align-items: center; min-height: 52px; font-size: 14px; }
.rbar .title { flex: 1; font: 600 15px/1.2 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.rbar button { font: 600 14px/1 var(--sans); background: transparent; color: var(--ink); border: 1.5px solid var(--line); border-radius: 6px; padding: 8px 10px; cursor: pointer; }
.rbar button[aria-pressed=true] { border-color: var(--ink); }
.rprog { height: 3px; background: var(--line); } .rprog i { display: block; height: 100%; background: var(--link); }
.prose { font: 400 var(--rsize, 19px)/1.7 var(--serif); max-width: 34em; margin: 0 auto; padding: 40px 20px 24px; color: var(--ink); }
.prose h1, .prose h2, .prose h3 { font-size: 1.35em; margin: 0 0 1.2em; }
.prose p { margin: 0; text-indent: 1.5em; max-width: none; } .prose h2 + p, .prose h3 + p, .prose p:first-child { text-indent: 0; }
.prose img { max-width: 100%; height: auto; }
.rnav { max-width: 34em; margin: 0 auto; padding: 16px 20px 64px; display: flex; justify-content: space-between; gap: 12px; }
.gate { max-width: 34em; margin: 0 auto 64px; padding: 24px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--page); text-align: center; }
.gate p { margin-left: auto; margin-right: auto; }

@media (max-width: 820px) {
  .hero, .book { grid-template-columns: 1fr; gap: 28px; } .device { justify-self: start; } .book .cover { max-width: 220px; }
  .steps { grid-template-columns: 1fr; } .steps li { border-left: 0; border-top: 1px solid var(--line); } .steps li:first-child { border-top: 0; }
  .two { grid-template-columns: 1fr; } .stats div { border-left: 0; border-top: 1px solid var(--line); }
  .top .wrap { gap: 12px; padding-top: 10px; padding-bottom: 10px; } .top nav { order: 3; flex-basis: 100%; gap: 16px; }
  .screen { height: 380px; } main { padding-top: 24px; }
}
@media (prefers-reduced-motion: no-preference) { .btn { transition: background-color .12s, border-color .12s; } }
