/* telechargement-ebook.com — maquette V2 claire et bleue. Mobile-first, sans dépendance. */
:root {
  --blue: #0757f9;
  --blue-700: #0444c4;
  --blue-50: #eef4ff;
  --navy: #0b1934;
  --text: #1d2a44;
  --muted: #56637a;
  --line: #e2e8f3;
  --soft: #f4f7fd;
  --white: #fff;
  --green: #11804a;
  --green-50: #e8f6ee;
  --amber: #8a5300;
  --amber-50: #fff4e0;
  --red: #e1263c;
  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 20px;
  --shadow: 0 1px 2px rgba(11, 25, 52, .06), 0 6px 18px rgba(11, 25, 52, .07);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.55; color: var(--text); background: var(--white); }
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--blue-700); text-underline-offset: .15em; }
a:hover { color: var(--blue); }
h1, h2, h3 { color: var(--navy); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.2vw + .6rem, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 1.4vw + .9rem, 1.75rem); font-weight: 800; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-s); }
.skip-link:focus { top: 8px; }
.js-only { display: none; }
.js .js-only { display: revert; }
.js .js-only[hidden] { display: none; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }

.env-banner { background: #fff4c2; color: #4a3b00; text-align: center; font-size: .82rem; padding: .35rem 16px; border-bottom: 1px solid #ecd77a; }

/* ---------------------------------------------------------------- en-tête */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.header-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "logo actions" "search search"; align-items: center; gap: 10px 16px; padding-top: 12px; padding-bottom: 12px; }
.logo { grid-area: logo; display: block; width: min(250px, 100%); }
.logo img { width: 100%; height: auto; }
.search-form { grid-area: search; display: flex; border: 1.5px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--white); }
.search-form:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7, 87, 249, .15); }
.search-form input { flex: 1; min-width: 0; border: 0; padding: .7rem .9rem; font: inherit; font-size: .95rem; color: var(--text); background: transparent; }
.search-form input:focus { outline: none; }
.search-btn { border: 0; background: var(--blue); color: #fff; width: 52px; display: grid; place-items: center; cursor: pointer; }
.search-btn:hover { background: var(--blue-700); }
.header-actions { grid-area: actions; display: flex; gap: 4px; }
.header-action { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: .72rem; color: var(--navy); text-decoration: none; background: none; border: 0; padding: 6px 8px; border-radius: var(--radius-s); cursor: pointer; }
.header-action:hover { background: var(--blue-50); color: var(--blue-700); }
.fav-count { position: absolute; top: 0; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--blue); color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; }

.main-nav ul { list-style: none; margin: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.main-nav ul::-webkit-scrollbar { display: none; }
.main-nav a { display: block; white-space: nowrap; padding: .75rem .8rem; color: var(--navy); text-decoration: none; font-size: .92rem; font-weight: 500; border-bottom: 3px solid transparent; }
.main-nav a:hover { color: var(--blue); }
.main-nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); font-weight: 700; }
/* Mobile : menu repliable si JS, défilement horizontal sinon */
.js .main-nav { display: none; border-top: 1px solid var(--line); }
.js .main-nav.is-open { display: block; }
.js .main-nav ul { flex-direction: column; overflow: visible; padding-top: 4px; padding-bottom: 8px; }
.js .main-nav a { border-bottom: 0; border-left: 3px solid transparent; }
.js .main-nav a[aria-current="page"] { border-left-color: var(--blue); background: var(--blue-50); }
.menu-toggle { display: none; }
.js .menu-toggle { display: flex; }

@media (min-width: 900px) {
  .header-row { grid-template-columns: auto 1fr auto; grid-template-areas: "logo search actions"; gap: 28px; padding-top: 16px; padding-bottom: 14px; }
  .logo { width: 260px; }
  .search-form { max-width: 520px; justify-self: center; width: 100%; }
  .js .main-nav, .main-nav { display: block; border-top: 0; }
  .js .main-nav ul, .main-nav ul { flex-direction: row; justify-content: center; padding: 0 16px; }
  .js .main-nav a { border-left: 0; border-bottom: 3px solid transparent; }
  .js .main-nav a[aria-current="page"] { background: none; border-bottom-color: var(--blue); }
  .js .menu-toggle { display: none; }
}

.breadcrumbs { padding-top: 14px; font-size: .85rem; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: #9aa6ba; }
.breadcrumbs a { color: var(--muted); }

/* ---------------------------------------------------------------- boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: .8rem 1.3rem; border-radius: var(--radius-s); font: inherit; font-weight: 700; font-size: .98rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; line-height: 1.2; }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(7, 87, 249, .25); }
.btn--primary:hover { background: var(--blue-700); color: #fff; }
.btn--ghost { background: var(--white); color: var(--blue-700); border-color: #cfdcf7; }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn--block { width: 100%; }

/* ---------------------------------------------------------------- héros accueil */
.hero { position: relative; background: #f7efe2; overflow: hidden; }
.hero__media { position: relative; aspect-ratio: 16 / 8; }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; }
.hero__inner { position: relative; padding-top: 22px; padding-bottom: 30px; background: var(--white); }
.hero h1 { margin-bottom: .45em; }
.hero h1 .hl { color: var(--blue); }
.hero__text p { font-size: 1.05rem; color: var(--text); max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.2rem; }
@media (min-width: 760px) {
  .hero { min-height: 400px; display: flex; align-items: center; }
  .hero__media { position: absolute; inset: 0; aspect-ratio: auto; }
  .hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.9) 34%, rgba(255,255,255,.35) 56%, rgba(255,255,255,0) 72%); }
  .hero__inner { background: transparent; padding-top: 56px; padding-bottom: 56px; }
  .hero__text { max-width: 560px; }
}
@media (min-width: 1200px) { .hero { min-height: 440px; } }

/* bandeau d'atouts */
.features { background: var(--soft); border-bottom: 1px solid var(--line); }
.features ul { list-style: none; margin: 0 auto; padding-top: 18px; padding-bottom: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.features li { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--text); }
.features li .ico { flex: none; color: var(--navy); }
.features li.f-green .ico { color: var(--green); }
.features strong { display: block; color: var(--navy); }
@media (min-width: 900px) { .features ul { grid-template-columns: repeat(4, 1fr); } }

/* ---------------------------------------------------------------- sections */
.section { padding-top: 36px; padding-bottom: 8px; }
.section:last-child { padding-bottom: 48px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--blue-700); }
.more-link:hover { text-decoration: underline; }
.page-hero { background: linear-gradient(180deg, var(--blue-50), var(--white)); padding: 28px 0 18px; }
.page-hero .lead { font-size: 1.08rem; max-width: 46em; color: var(--text); }
.empty { padding: 28px; border: 1.5px dashed var(--line); border-radius: var(--radius); text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- cartes livres */
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 640px) { .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 980px) { .book-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; } }
.book-grid--row { grid-auto-flow: row; }
.book-card { position: relative; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.book-card:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.book-card__cover { position: relative; background: var(--soft); padding: 14px 14px 10px; }
.book-card__body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.book-card__title { font-size: .95rem; margin: 0; line-height: 1.3; }
.book-card__title a { color: var(--navy); text-decoration: none; }
.book-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.book-card__title a:hover { color: var(--blue); }
.book-card__title a:focus-visible { outline: none; }
.book-card__author { font-size: .84rem; color: var(--muted); margin: 0; }
.book-card__meta { margin: auto 0 0; padding-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.flags { position: absolute; top: 8px; left: 8px; z-index: 2; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.flag { font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; color: #fff; background: var(--red); }
.flag--example { background: #5b3cc4; }
.flag--draft { background: #6b7280; }
.fav-btn { position: absolute; z-index: 2; right: 8px; top: 8px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.95); color: var(--navy); place-items: center; cursor: pointer; }
.js .fav-btn { display: grid; }
.fav-btn:hover { color: var(--red); }
.fav-btn[aria-pressed="true"] { color: var(--red); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }

/* couverture générique (aucune fausse couverture) */
.cover { width: 100%; aspect-ratio: 2 / 3; border-radius: 4px 8px 8px 4px; }
.cover--img { height: auto; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 6px 10px rgba(11, 25, 52, .2)); }
.cover--generic { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 12% 10% 10%; color: #fff; overflow: hidden;
  background: linear-gradient(160deg, hsl(var(--h) 45% 34%), hsl(calc(var(--h) + 30) 55% 22%));
  box-shadow: inset 6px 0 0 rgba(0,0,0,.18), 0 6px 14px rgba(11, 25, 52, .18); }
.cover--generic::after { content: ""; position: absolute; inset: auto -20% -30% auto; width: 80%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.08); }
.cover__author { font-size: .72rem; opacity: .9; letter-spacing: .02em; }
.cover__title { font-weight: 800; font-size: clamp(.85rem, 1.1vw + .5rem, 1.1rem); line-height: 1.2; overflow-wrap: anywhere; }
.cover__mark { opacity: .8; }

/* badges d'accès */
.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.badge--free { background: var(--green-50); color: var(--green); border-color: #bfe5cf; }
.badge--paid { background: var(--blue-50); color: var(--blue-700); border-color: #cddcfb; }
.badge--unknown { background: var(--amber-50); color: var(--amber); border-color: #f3d9a6; }
.badge--aff { background: #fff; color: var(--navy); border-color: #c8d0de; }

/* ---------------------------------------------------------------- catégories */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.cat-tile { position: relative; display: block; min-height: 120px; border-radius: var(--radius); overflow: hidden; color: #fff; text-decoration: none; background: linear-gradient(135deg, #12306e, var(--blue)); }
@media (min-width: 760px) { .cat-tile { min-height: 150px; } }
.cat-tile picture, .cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-tile__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 18, 40, .35), rgba(8, 18, 40, .72)); }
.cat-tile--plain .cat-tile__shade { background: none; }
.cat-tile__content { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; height: 100%; min-height: inherit; padding: 16px 28px; }
.cat-tile__name { font-weight: 800; font-size: 1.02rem; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.cat-tile__count { font-size: .82rem; opacity: .95; }
.cat-tile__chev { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.cat-tile:hover .cat-tile__shade { background: linear-gradient(180deg, rgba(7, 87, 249, .35), rgba(8, 18, 40, .78)); }

.tree { columns: 1; padding-left: 1.1rem; }
@media (min-width: 760px) { .tree { columns: 2; column-gap: 40px; } }
.tree > li { break-inside: avoid; margin-bottom: .7rem; font-weight: 600; }
.tree ul { font-weight: 400; padding-left: 1.1rem; margin: .3rem 0 0; }
.tree .count { font-weight: 400; color: var(--muted); font-size: .85rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: .4rem .8rem; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--navy); text-decoration: none; font-size: .88rem; font-weight: 600; }
.chip span { color: var(--muted); font-weight: 400; }
.chip:hover { border-color: var(--blue); color: var(--blue); }

/* ---------------------------------------------------------------- auteurs */
.author-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.author-chip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); text-decoration: none; color: var(--navy); }
.author-chip:hover { border-color: var(--blue); }
.avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 55% 42%), hsl(calc(var(--h) + 40) 60% 30%)); }
.author-chip__name { display: block; font-weight: 700; font-size: .9rem; }
.author-chip__count { display: block; font-size: .78rem; color: var(--muted); }
.letter { margin-top: 1.4rem; font-size: 1.3rem; color: var(--blue-700); }

/* ---------------------------------------------------------------- bandeaux */
.band { display: grid; gap: 18px; align-items: center; padding: 20px; border-radius: var(--radius-l); background: var(--blue-50); border: 1px solid #dbe6fd; }
.band--free { background: var(--green-50); border-color: #cbe9d8; }
.band__img img { width: 100%; border-radius: var(--radius); }
.band__text h2 { margin-bottom: .4em; }
.eyebrow { font-size: .85rem; font-weight: 700; color: var(--blue-700); margin: 0 0 .3em; }
.band--free .eyebrow { color: var(--green); }
.band__btn { justify-self: start; }
@media (min-width: 900px) {
  .band { grid-template-columns: 280px 1fr auto; padding: 22px 28px; gap: 28px; }
  .band--guides { grid-template-columns: 320px 1fr auto; }
}
.check-list, .mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.check-list li { display: flex; gap: 8px; align-items: flex-start; }
.check-list .ico { color: var(--blue); flex: none; margin-top: 2px; }
.check-list a, .mini-list a { color: var(--navy); font-weight: 600; }
.mini-list span { color: var(--muted); font-size: .9rem; }

/* ---------------------------------------------------------------- fiche livre */
.book { padding-top: 18px; }
.book__top { display: grid; gap: 22px; }
/* Mobile : couverture réduite à gauche du titre, puis le bloc d'achat/lecture, puis les détails.
   Le bouton reste ainsi visible sans défilement, sans barre fixe ni contenu masqué. */
@media (max-width: 899px) {
  .book__top { grid-template-columns: minmax(96px, 34%) 1fr; grid-template-areas: "cover head" "aside aside" "meta meta"; gap: 16px 18px; align-items: start; }
  .book__cover { grid-area: cover; }
  .book__head { grid-area: head; min-width: 0; }
  .book__aside { grid-area: aside; }
  .book__meta { grid-area: meta; }
  .book__head h1 { font-size: clamp(1.3rem, 4.6vw + .3rem, 1.9rem); overflow-wrap: anywhere; hyphens: auto; }
  .book__by { margin-bottom: 0; }
  .book__cover .cover-note { font-size: .72rem; }
}
.book__cover { width: 100%; margin: 0; }
.book__cat { margin: 0 0 .3em; font-size: .9rem; font-weight: 600; }
.book__cat a { text-decoration: none; }
.book__by { font-size: 1.05rem; margin-bottom: 1rem; }
.book__meta { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.book__meta > div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.book__meta dt { color: var(--muted); }
.book__meta dd { margin: 0; color: var(--navy); }
.action-box { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.action-box--free { background: var(--green-50); border-color: #cbe9d8; }
.action-box--unknown { background: var(--amber-50); border-color: #f3d9a6; }
.action-box__status { display: flex; align-items: center; gap: 8px; color: var(--navy); margin-bottom: .8rem; }
.action-box .small { margin: .8rem 0 0; color: var(--text); }
.action-box .small:only-of-type { margin-top: 0; }
.fav-line { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.fav-line .fav-btn { position: static; }
.book__desc { margin-top: 30px; max-width: 760px; }
@media (min-width: 900px) {
  .book__top { grid-template-columns: 240px 1fr 300px; grid-template-rows: auto 1fr; grid-template-areas: "cover head aside" "cover meta aside"; align-items: start; column-gap: 36px; row-gap: 0; }
  .book__cover { grid-area: cover; }
  .book__head { grid-area: head; }
  .book__aside { grid-area: aside; }
  .book__meta { grid-area: meta; }
}
.notice { padding: .8rem 1rem; border-radius: var(--radius-s); background: #f1edff; border: 1px solid #d8cdfb; color: #2e1f6b; font-size: .92rem; }
.notice--draft { background: #f1f2f4; border-color: #d4d7dd; color: #374151; }
.help-strip { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius); background: var(--soft); border: 1px solid var(--line); }
.help-strip p { margin: 0; }
.help-strip .ico { flex: none; color: var(--blue); }

/* ---------------------------------------------------------------- contenus éditoriaux */
.prose { font-size: 1.04rem; }
.prose h1 { margin-top: 24px; }
.prose h2 { margin-top: 1.8em; font-size: 1.35rem; }
.prose p, .prose li { max-width: 68ch; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4em; }
article.prose { padding-bottom: 20px; }
.callout { padding: 14px 18px; border-left: 4px solid var(--blue); background: var(--blue-50); border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 1.5em 0; }
.callout p:last-child { margin: 0; }
.callout--wide { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 20px; }
.callout--wide .ico { flex: none; color: var(--blue); }
.todo { background: #fff1c2; color: #5a4300; padding: 0 4px; border-radius: 3px; font-weight: 600; }
.link-list { padding-left: 1.2rem; }
.link-list li { margin-bottom: .4rem; }

.guide-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .guide-grid { grid-template-columns: 1fr 1fr; } }
.guide-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.guide-card > .ico { color: var(--blue); }
.guide-card__title { font-size: 1.15rem; font-weight: 800; color: var(--navy); }
.guide-card:hover { border-color: var(--blue); }
.guide-card:hover .guide-card__title { color: var(--blue); }

/* ---------------------------------------------------------------- recherche */
.search-big label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.search-big__row { display: flex; gap: 8px; flex-wrap: wrap; }
.search-big input[type="search"] { flex: 1 1 240px; min-width: 0; padding: .75rem .9rem; border: 1.5px solid #c9d4e8; border-radius: var(--radius-s); font: inherit; }
.search-big input[type="search"]:focus { outline: 3px solid rgba(7, 87, 249, .25); border-color: var(--blue); }
.filters { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.filters label { font-weight: 500; display: inline-flex; gap: 6px; align-items: center; color: var(--text); margin: 0; }
.search-status { margin: 18px 0 10px; color: var(--muted); }
.result-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.result-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.result-list a { font-weight: 700; color: var(--navy); }
.result-list .meta { color: var(--muted); font-size: .88rem; }
.result-type { font-size: .75rem; font-weight: 700; color: var(--blue-700); background: var(--blue-50); padding: 1px 8px; border-radius: 999px; }
mark { background: #fff1a8; color: inherit; padding: 0 1px; }

.pagination ul { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination a, .pagination span { display: block; min-width: 40px; padding: .5rem .8rem; text-align: center; border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; }
.pagination span[aria-current] { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }

.notfound { padding: 48px 16px; }

/* ---------------------------------------------------------------- pied de page */
.site-footer { margin-top: 40px; background: var(--navy); color: #d6deec; font-size: .92rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 26px; padding-top: 36px; padding-bottom: 26px; }
.footer-grid h2 { color: #fff; font-size: 1rem; margin-bottom: .6em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-brand img { width: 240px; background: #fff; padding: 8px 10px; border-radius: var(--radius-s); margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; padding-bottom: 18px; font-size: .84rem; }
.footer-bottom p { margin: 0; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.4fr; } }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .site-header, .site-footer, .fav-btn, .env-banner { display: none !important; } }
@media (max-width: 639px) { .book-grid--row > :nth-child(5) { display: none; } }
@media (min-width: 900px) { .logo { width: 300px; } }
.cover__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; overflow: hidden; }

/* Couvertures candidates (préproduction) : image posée sur le visuel générique, cadre 2:3 fixe */
.cover-stack { position: relative; overflow: hidden; background: transparent; }
.cover-stack > .cover--generic { position: absolute; inset: 0; }
.cover-stack__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; background: var(--soft); box-shadow: 0 6px 14px rgba(11, 25, 52, .18); }
/* Fiche livre : couverture intégrale, jamais rognée */
/* Image chargée sur la fiche : le visuel générique ne doit pas apparaître dans les marges de la couverture entière */
.cover-stack--full.is-loaded > .cover--generic { visibility: hidden; }
.cover-stack--full .cover-stack__img { object-fit: contain; object-position: center bottom; box-shadow: none; background: transparent; filter: drop-shadow(0 6px 10px rgba(11, 25, 52, .2)); }
.cover-note { margin: .6rem 0 0; font-size: .78rem; line-height: 1.4; color: var(--muted); }
