
/* base.css - socle commun a toutes les pages (refonte librairie 2026-09-30).
   Fond blanc, header marchand (recherche, rayons), boutons, cartes livre, pied de page.
   Les noms --cream / --white / --text-* / --terracotta sont conserves : la couche
   mobile (templates/mobile_ux.html) s'en sert. */
:root {
  --white: #FFFFFF;
  --paper: #F6F2EA;
  --cream: #F6F2EA;
  --cream-dark: #E8E1D4;
  --line: #E6E1D8;
  --text-dark: #1C1B19;
  --text-mid: #4B4843;
  --text-light: #7C776E;
  --terracotta: #A94A31;
  --terracotta-dark: #8C3B26;
  --ink: #22313A;
  --ok: #2F6B45;
  --radius: 6px;
  --wrap: 1240px;
  --serif: 'Cardo', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', 'Segoe UI', Helvetica, Arial, sans-serif;
  --collection-color: #3A6B8C;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.6; background: var(--white); color: var(--text-dark); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 700; line-height: 1.2; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* ---------- Bandeau de reassurance ---------- */
.topbar { background: var(--ink); color: #F2EEE6; font-size: 13px; }
.topbar ul { list-style: none; max-width: var(--wrap); margin: 0 auto; padding: 7px 24px; display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }
.topbar li { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.topbar li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #D98E6F; flex: 0 0 auto; }

/* ---------- Header / navigation ---------- */
nav.site-nav { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--line); }
.nav-main { max-width: var(--wrap); margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 28px; }
nav .logo { font-family: var(--serif); font-size: 23px; font-weight: 700; letter-spacing: .3px; color: var(--text-dark); text-decoration: none; white-space: nowrap; flex: 0 0 auto; }
nav .logo span { color: var(--terracotta); }
.nav-search { flex: 1 1 auto; max-width: 620px; display: flex; border: 1.5px solid var(--text-dark); border-radius: 999px; overflow: hidden; background: var(--white); }
.nav-search input { flex: 1 1 auto; min-width: 0; border: 0; padding: 10px 18px; font: inherit; font-size: 15px; background: transparent; color: var(--text-dark); }
.nav-search input:focus { outline: none; }
.nav-search:focus-within { box-shadow: 0 0 0 3px rgba(169,74,49,.18); }
.nav-search button { flex: 0 0 auto; border: 0; background: var(--text-dark); color: #fff; padding: 0 18px; cursor: pointer; display: flex; align-items: center; }
.nav-search button svg { width: 18px; height: 18px; }
.nav-cta { margin-left: auto; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; text-decoration: none; color: var(--text-dark); padding: 9px 14px; border-radius: var(--radius); }
.nav-cta:hover { background: var(--paper); }
.nav-cta svg { width: 20px; height: 20px; }
.nav-burger { display: none; margin-left: auto; background: none; border: 0; font-size: 26px; line-height: 1; padding: 4px 6px; cursor: pointer; color: var(--text-dark); }
.nav-menu { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a { display: block; padding: 10px 12px 12px; font-size: 15px; font-weight: 600; color: var(--text-mid); text-decoration: none; border-bottom: 2px solid transparent; }
.nav-links a:first-child { padding-left: 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text-dark); border-bottom-color: var(--terracotta); }
.lang-switch { display: flex; gap: 2px; }
.lang-switch a { font-size: 12.5px; font-weight: 600; letter-spacing: .6px; color: var(--text-light); text-decoration: none; padding: 4px 6px; border-radius: 4px; }
.lang-switch a:hover { color: var(--text-dark); background: var(--paper); }
.lang-switch a.active { color: var(--terracotta); }

/* ---------- Fil d'Ariane ---------- */
.breadcrumb { max-width: var(--wrap); margin: 0 auto; padding: 18px 24px 0; font-size: 13.5px; color: var(--text-light); }
.breadcrumb a { color: var(--text-mid); text-decoration: none; }
.breadcrumb a:hover { color: var(--terracotta); text-decoration: underline; }
.breadcrumb .sep { margin: 0 7px; color: #B7B1A6; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: var(--radius); font: inherit; font-weight: 600; font-size: 15.5px; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--terracotta); color: #fff; }
.btn-primary:hover { background: var(--terracotta-dark); }
.btn-dark { background: var(--text-dark); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-outline { background: var(--white); color: var(--text-dark); border-color: var(--text-dark); }
.btn-outline:hover { background: var(--text-dark); color: #fff; }
.link-arrow { font-weight: 600; color: var(--terracotta); text-decoration: none; white-space: nowrap; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Titres de section ---------- */
.shelf { max-width: var(--wrap); margin: 0 auto; padding: 56px 24px 0; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.shelf-head h2 { font-size: 28px; }
.shelf-head p { color: var(--text-light); font-size: 15px; margin-top: 4px; }

/* ---------- Carte livre (accueil, fiche : meme collection) ---------- */
.book-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px 24px; }
.book-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; min-width: 0; }
.book-card .bc-cover { aspect-ratio: 2 / 3; background: var(--paper); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; border-radius: 3px; }
.book-card .bc-cover img { width: 100%; height: 100%; object-fit: cover; box-shadow: 0 6px 18px rgba(0,0,0,.14); transition: transform .2s; }
.book-card:hover .bc-cover img { transform: translateY(-3px); }
.book-card .bc-coll { margin-top: 12px; font-size: 11.5px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; }
.book-card .bc-title { font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1.25; margin-top: 4px; }
.book-card:hover .bc-title { color: var(--terracotta); }
.book-card .bc-author { font-size: 14px; color: var(--text-mid); margin-top: 3px; }
.book-card .bc-price { margin-top: auto; padding-top: 8px; font-size: 15px; font-weight: 700; color: var(--text-dark); }
.book-card .bc-price small { font-weight: 400; color: var(--text-light); font-size: 13px; }

/* ---------- Pied de page ---------- */
footer.site-footer { margin-top: 88px; background: var(--text-dark); color: #CFC9BE; font-size: 15px; }
.footer-grid { max-width: var(--wrap); margin: 0 auto; padding: 56px 24px 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .logo { font-family: var(--serif); font-size: 24px; font-weight: 700; color: #fff; text-decoration: none; }
.footer-brand .logo span { color: #D98E6F; }
.footer-brand p { margin-top: 12px; line-height: 1.55; max-width: 34ch; }
.footer-brand .mail { display: inline-block; margin-top: 14px; color: #fff; }
footer.site-footer h2 { font-family: var(--sans); font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: #fff; margin-bottom: 14px; font-weight: 600; }
footer.site-footer ul { list-style: none; display: grid; gap: 8px; }
footer.site-footer ul a { color: #CFC9BE; text-decoration: none; }
footer.site-footer ul a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom-inner { max-width: var(--wrap); margin: 0 auto; padding: 18px 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: #A39D92; }
.footer-langs { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-langs a { color: #CFC9BE; text-decoration: none; }
.footer-langs a:hover, .footer-langs a.active { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .nav-cta span { display: none; }
  .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .topbar li:nth-child(n+2) { display: none; }
  .nav-main { flex-wrap: wrap; gap: 10px 12px; padding: 10px 16px 12px; }
  nav .logo { font-size: 20px; }
  .nav-burger { display: block; order: 2; }
  .nav-cta { display: none; }
  .nav-search { order: 3; flex: 1 1 100%; max-width: none; }
  .nav-search input { font-size: 16px; padding: 9px 14px; }
  .nav-menu { padding: 0; }
  .breadcrumb { padding: 14px 16px 0; }
  .wrap, .shelf { padding-left: 16px; padding-right: 16px; }
  .shelf { padding-top: 40px; }
  .shelf-head h2 { font-size: 23px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 40px 16px 28px; }
  .footer-bottom-inner { padding: 16px; }
}

/* Panier (2026-10-01) */
.nav-cart { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--radius); color: var(--text-dark); text-decoration: none; margin-left: 4px; }
.nav-cart:hover { background: var(--paper); }
.nav-cart svg { width: 24px; height: 24px; }
.cart-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #a64b2a; color: #fff; font-size: 11.5px; font-weight: 700; line-height: 18px; text-align: center; }
.cart-count[hidden] { display: none; }
.cart-modal { position: fixed; inset: 0; background: rgba(20,20,20,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.cm-box { background: #fff; border-radius: 10px; padding: 22px; max-width: 440px; width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.cm-title { font-weight: 700; font-size: 18px; margin: 0 0 6px; }
.cm-book { color: var(--text-mid); margin: 0 0 18px; line-height: 1.4; }
.cm-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cm-actions .btn { flex: 1 1 160px; text-align: center; }
.cart-page { max-width: 900px; margin: 0 auto; padding: 0 24px 64px; }
.cart-page .breadcrumb { padding-left: 0; padding-right: 0; }  /* marge portee par .cart-page (2026-10-12) */
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 64px; height: auto; border-radius: 3px; }
.cl-title { font-weight: 700; color: var(--text-dark); text-decoration: none; }
.cl-sub { font-size: 14px; color: var(--text-light); margin-top: 2px; }
.cl-ctrl { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 14px; }
.cl-ctrl select { padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; font: inherit; }
.cl-remove { background: none; border: 0; color: #a64b2a; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.cl-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-line.cl-out { opacity: .5; }
.cart-box { margin-top: 22px; border: 1px solid var(--line); border-radius: 8px; padding: 18px; max-width: 420px; margin-left: auto; }
.cart-box .od-select { margin-bottom: 14px; }
.cart-note { background: var(--paper); border-radius: 6px; padding: 10px 12px; font-size: 14px; line-height: 1.45; margin: 14px 0; }
.cart-thanks { background: #eef6ee; border: 1px solid #9c9; border-radius: 8px; padding: 14px 16px; margin: 10px 0 20px; }
.cart-thanks strong { display: block; font-size: 18px; margin-bottom: 4px; }
@media (max-width: 600px) { .cart-page { padding: 0 16px 48px; } .cart-line { grid-template-columns: 52px 1fr; } .cart-line img { width: 52px; } .cl-price { grid-column: 2; } .cart-box { max-width: none; } }

/* pages legales (2026-10-01) */
.legal-page { max-width: 760px; margin: 0 auto; padding: 0 24px 64px; }
.legal h2 { font-size: 1.25rem; margin: 2rem 0 .6rem; }
.legal p, .legal li { line-height: 1.65; }
.legal ul { padding-left: 1.2rem; }
.legal .legal-date { color: var(--text-light); font-size: .9rem; }
.legal code { font-size: .85em; background: rgba(0,0,0,.05); padding: 1px 4px; border-radius: 3px; }
.footer-legal { margin: 0; }
.footer-legal a { color: inherit; }
.cart-terms { font-size: 12.5px; color: var(--text-light); margin: 10px 0 0; }
.cart-waiver { display: block; }
.cart-waiver[hidden] { display: none; }

/* surlignage dans l'accroche de l'accueil (2026-10-01) */
.hero-lede .hl { color: var(--terracotta); font-weight: 700; }

/* A4 : vignettes catalogue/accueil, montant EUR en petit sous le prix converti */
.px .fx-main { display: inline; }
.px .fx-eur { display: inline; margin-left: 5px; font-size: .8em; font-weight: 400; color: var(--text-light); }
/* Titre du catalogue sans offre (2026-10-06) */
.soon-tag { font-size: 13px; font-weight: 600; letter-spacing: .3px; color: var(--terracotta); }

/* piliers SEO (2026-10-07) : bloc Explorer du pied de page et de l'accueil */
.footer-explore { border-top: 1px solid rgba(255,255,255,.12); }
.footer-explore-inner { max-width: var(--wrap); margin: 0 auto; padding: 24px 24px 10px; }
footer.site-footer .footer-explore h2 { margin-bottom: 10px; }
.footer-explore p { margin: 0 0 6px; line-height: 1.9; font-size: 14px; }
.footer-explore .fe-label { color: #A39D92; margin-right: 10px; }
.footer-explore a { color: #CFC9BE; text-decoration: none; margin-right: 14px; white-space: nowrap; display: inline-block; }
.footer-explore a:hover { color: #fff; text-decoration: underline; }
section.shelf.hub-explore { padding-top: 32px; }
.hub-explore .shelf-head p { color: var(--text-mid); }
.hub-explore .he-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.hub-explore h3 { font-size: 13px; font-family: var(--sans); letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-light); margin-bottom: 10px; }
.hub-explore ul { list-style: none; display: grid; gap: 6px; }
.hub-explore li a { text-decoration: none; font-size: 16px; }
.hub-explore li a:hover { color: var(--terracotta); text-decoration: underline; }
/* Lien Kindle secondaire sous l'EPUB direct (2026-10-10) */
.offer-alt{margin:-4px 0 10px;font-size:.88rem;text-align:right}
.offer-alt a{color:var(--muted,#6b6157);text-decoration:underline}

/* catalogue.css - page catalogue (refonte librairie 2026-09-30). Charge apres base.css. */
.page-header { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.page-header .breadcrumb { padding: 18px 0 0; }
.page-header .section-label { display: none; }
.page-header h1.section-title { font-family: var(--serif); font-size: 38px; font-weight: 700; margin: 14px 0 6px; line-height: 1.2; }
.page-header .section-text { color: var(--text-mid); font-size: 16px; max-width: 70ch; }
.filters { max-width: var(--wrap); margin: 22px auto 0; padding: 18px 24px 16px; display: grid; gap: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-search-input { width: 100%; max-width: 520px; font: inherit; font-size: 15px; padding: 10px 16px; border: 1.5px solid var(--text-dark); border-radius: 999px; background: var(--white); color: var(--text-dark); }
.filter-btn { font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--text-mid); cursor: pointer; transition: all .15s; }
.filter-btn:hover { border-color: var(--btn-color, var(--text-dark)); color: var(--text-dark); }
.filter-btn.active { background: var(--btn-color, var(--text-dark)); border-color: var(--btn-color, var(--text-dark)); color: #fff; }
.filter-select[hidden] { display: none; }
.filter-select, .filter-reset { font: inherit; font-size: 14.5px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--text-dark); }
.filter-reset { cursor: pointer; color: var(--text-mid); }
.filter-reset:hover { border-color: var(--text-dark); }
.mux-count { display: block; max-width: var(--wrap); margin: 0 auto; padding: 14px 24px 0; font-size: 14px; color: var(--text-light); }
.series-cta { max-width: var(--wrap); margin: 16px auto 0; padding: 0 24px; }
.series-cta a { display: inline-flex; gap: 10px; align-items: center; padding: 10px 16px; border-radius: var(--radius); background: var(--cta-color, var(--ink)); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; }
.catalogue-grid { max-width: var(--wrap); margin: 0 auto; padding: 24px 24px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 28px; }
.catalogue-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; min-width: 0; }
.catalogue-card.hidden { display: none; }
.catalogue-card-cover { aspect-ratio: 2 / 3; background: var(--paper); border-radius: 3px; overflow: hidden; }
.catalogue-card-cover img { width: 100%; height: 100%; object-fit: cover; box-shadow: 0 6px 18px rgba(0,0,0,.14); transition: transform .2s; }
.catalogue-card:hover .catalogue-card-cover img { transform: translateY(-3px); }
.catalogue-card-info { display: flex; flex-direction: column; flex: 1 1 auto; padding-top: 12px; }
.catalogue-card-collection { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.catalogue-card h3 { font-size: 18px; line-height: 1.25; margin-top: 4px; }
.catalogue-card:hover h3 { color: var(--terracotta); }
.catalogue-card-author { font-size: 14px; color: var(--text-mid); margin-top: 4px; }
.catalogue-card-desc { font-size: 14px; color: var(--text-light); margin-top: 8px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.catalogue-card-buy { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cc-formats { font-size: 13px; color: var(--text-light); }
.cc-price { font-size: 16px; font-weight: 700; white-space: nowrap; }
.no-results { max-width: var(--wrap); margin: 24px auto 0; padding: 32px 24px; text-align: center; background: var(--paper); border-radius: 10px; }
.no-results p { font-size: 17px; margin-bottom: 14px; }
/* Le catalogue a sa propre recherche (filtre instantane) : pas de doublon dans le header */
.page-catalogue .nav-search { visibility: hidden; }
@media (max-width: 600px) { .page-catalogue .nav-search { display: none; } }
.catalogue-note { max-width: var(--wrap); margin: 28px auto 0; padding: 0 24px; font-size: 13px; color: var(--text-light); }
@media (max-width: 1000px) { .catalogue-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .page-header { padding: 0 16px; }
  .page-header h1.section-title { font-size: 28px; }
  .filters { border: 0; margin-top: 6px; }
  .mux-count { padding: 10px 16px 0; }
  .catalogue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; padding: 16px 16px 0; }
  .catalogue-card h3 { font-size: 16px; }
  .catalogue-card-desc { display: none; }
  .catalogue-card-buy { flex-direction: column; gap: 2px; }
}

/* piliers SEO (2026-10-07) : ligne "Voir le dossier" */
.hub-link { max-width: var(--wrap); margin: 8px auto 0; padding: 0 24px; font-size: 15px; font-weight: 600; }
.hub-link a { color: var(--terracotta); text-decoration: none; }
.hub-link a:hover { text-decoration: underline; }
.hub-link[hidden] { display: none; }

/* pagination (2026-10-09) : .paged-out = carte hors de la page affichee (distinct de .hidden = hors filtre) */
.catalogue-card.paged-out { display: none; }
.h1-page { font-size: .55em; font-weight: 400; color: var(--text-light); white-space: nowrap; }
.pager { max-width: var(--wrap); margin: 40px auto 0; padding: 0 24px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.pager[hidden] { display: none; }
.pager a, .pager button, .pager span { font: inherit; font-size: 15px; min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); text-decoration: none; }
.pager a, .pager button { border: 1px solid var(--line); background: var(--white); color: var(--text-dark); cursor: pointer; }
.pager a:hover, .pager button:hover { border-color: var(--text-dark); }
.pager [aria-current="page"] { background: var(--text-dark); border: 1px solid var(--text-dark); color: #fff; font-weight: 700; }
.pager .pager-gap { border: 0; min-width: 20px; padding: 0; color: var(--text-light); }
@media (max-width: 600px) {
  .pager { padding: 0 16px; gap: 4px; margin-top: 28px; }
  .pager a, .pager button, .pager span { min-width: 36px; height: 38px; padding: 0 8px; font-size: 14px; }
  .h1-page { display: block; margin-top: 4px; }
}
