/* =====================================================================
   Direction artistique — site éditorial
   Ivoire clair · encre foncée · une couleur d'accent par collection
   Textes : Montserrat (OFL), proche de l’accroche du logo · Nom : lettrage du logo (image)
   Variantes : modifier les variables ci-dessous.
   ===================================================================== */
/* Montserrat (OFL) : police la plus proche de l'accroche du logo. Fichiers à obtenir avec
   scripts/fetch_fonts.py ; tant qu'ils sont absents, Inter (déjà hébergée) prend le relais. */
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-400-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --ivory: #FAF6EE;
  --paper: #FFFDF8;
  --sand: #F2EBDD;
  --line: #E3DACA;
  --ink: #0F1E3D;        /* bleu nuit du logo, assombri pour la lecture */
  --ink-soft: #43506A;
  --muted: #5E6779;
  --brand: #1E3D6E;        /* bleu nuit du logo : boutons, liens */
  --brand-ink: #FFFDF8;
  --accent: #1E3D6E;       /* remplacée par collection (collections.css) */
  --teal: #4FB8AE;         /* turquoise du logo : décor uniquement (contraste insuffisant pour du texte) */
  --teal-ink: #0E6B6B;     /* turquoise lisible pour du texte */
  --focus: #B3541E;
  --warn-bg: #FFF1D6;
  --warn-ink: #6B4100;

  /* Le nom de la marque n'est jamais composé dans une police : c'est le lettrage du logo (image). */
  --font-title: "Montserrat", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-text: "Montserrat", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(30,35,45,.06), 0 8px 24px rgba(30,35,45,.06);
  --wrap: 72rem;
  --narrow: 44rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font-family: var(--font-text); font-size: 1.0625rem; line-height: 1.7;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.22; letter-spacing: -.005em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code { font-size: .92em; background: var(--sand); padding: .1em .35em; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: var(--narrow); }
.wrap.narrow { width: min(100% - 2.5rem, var(--narrow)); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.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: 1rem; top: -3rem; background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: 1rem; }

/* ---- Bandeau d'aperçu ---- */
.preview-banner { background: var(--warn-bg); color: var(--warn-ink); text-align: center; padding: .55rem 1rem; font-size: .92rem; border-bottom: 1px solid #F0D9A8; }
.preview-flag, .preview-only { background: var(--warn-bg); color: var(--warn-ink); border: 1px dashed #D9B66A; border-radius: var(--radius-sm); padding: .6rem .9rem; font-size: .92rem; }
.todo { background: var(--warn-bg); color: var(--warn-ink); padding: 0 .3em; border-radius: 4px; }

/* ---- En-tête ---- */
.site-header { border-bottom: 1px solid var(--line); background: var(--ivory); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand-word { height: 2.1rem; width: auto; }
@media (max-width: 30rem) { .brand-mark { height: 2rem; } .brand-word { height: 1.75rem; } }
.brand-mark { width: auto; height: 2.4rem; }
.main-nav ul { list-style: none; display: flex; gap: .25rem 1.25rem; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a { color: var(--ink-soft); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* ---- Boutons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .25rem; min-height: 48px; padding: .7rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; line-height: 1.2; text-align: center; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: #142B50; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sub { font-weight: 400; opacity: .9; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }

/* ---- Accueil ---- */
.hero { padding-block: clamp(3rem, 6vw, 6rem) clamp(2.5rem, 5vw, 4.5rem); background:
  radial-gradient(60rem 30rem at 85% -10%, rgba(79,184,174,.12), transparent 60%),
  radial-gradient(40rem 24rem at 0% 110%, rgba(30,61,110,.08), transparent 60%); }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero-logo { display: none; }   /* mobile : symbole déjà dans l'en-tête, boutons visibles plus tôt */
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: 1fr 26rem; gap: 3rem; }
  .hero-logo { display: block; width: 100%; height: auto; }
}
.about-logo { width: min(100%, 20rem); height: auto; margin: 0 0 1.5rem; }
.hero-inner { max-width: 50rem; }
.hero-title { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); }
.lead { font-size: clamp(1.08rem, 1rem + .35vw, 1.25rem); color: var(--ink-soft); max-width: 40em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--accent); margin: 0 0 .6rem; }

.section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section-alt { background: var(--sand); }
.section-title { margin-bottom: .4em; }
.section-lead { color: var(--ink-soft); margin-bottom: 1.5rem; }
.split { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 52rem) { .split { grid-template-columns: 1.2fr 1fr; } }

.theme-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.theme-tile a { display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: 1.4rem 1.4rem 1.2rem; background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--accent); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s ease; }
.theme-tile a:hover { transform: translateY(-2px); }
.theme-name { font-family: var(--font-title); font-size: 1.3rem; font-weight: 600; }
.theme-short { color: var(--ink-soft); }
.theme-count { margin-top: auto; padding-top: .6rem; font-size: .85rem; color: var(--accent); font-weight: 600; }

/* ---- Cartes livres ---- */
.book-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.book-grid-small { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.book-card { height: 100%; }
.book-card-link { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; height: 100%; padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s; }
.book-card-link:hover { transform: translateY(-2px); border-color: var(--accent); }
.book-card-title { font-size: 1.12rem; margin: 0 0 .25rem; }
.book-card-audience { font-size: .88rem; color: var(--muted); margin: 0 0 .4rem; }
.book-card-benefit { font-size: .95rem; color: var(--ink-soft); margin: 0 0 .5rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; background: var(--sand); color: var(--ink-soft); border: 1px solid var(--line); }
.badge-draft { background: var(--warn-bg); color: var(--warn-ink); border-color: #F0D9A8; }
.badge-coming_soon { background: #E3F2F0; color: #0E5A5A; border-color: #BFE0DB; }

/* ---- Couvertures : jamais recadrées ---- */
.cover { width: 100%; height: auto; object-fit: contain; border-radius: 3px 6px 6px 3px; box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 6px 18px rgba(30,35,45,.16); background: var(--paper); }
.cover-placeholder { aspect-ratio: 2 / 3; display: flex; flex-direction: column; justify-content: space-between; padding: 10% 9%; background:
  linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, var(--paper)), var(--paper)); border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: none; color: var(--ink); }
.ph-col { font-size: .62em; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 600; }
.ph-title { font-family: var(--font-title); font-weight: 600; line-height: 1.15; font-size: 1em; }
.ph-note { font-size: .58em; color: var(--muted); }
.cover-sm.cover-placeholder { font-size: .8rem; }
.cover-lg.cover-placeholder { font-size: clamp(1.1rem, .9rem + 1vw, 1.6rem); }

/* ---- Fiche livre ---- */
.book-hero { padding-block: clamp(2rem, 4vw, 4rem); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--ivory)), var(--ivory)); }
.book-hero-inner { display: grid; gap: 2rem; align-items: start; }
.book-hero-cover { max-width: 15rem; width: 60%; margin-inline: auto; }
@media (min-width: 46rem) {
  .book-hero-inner { grid-template-columns: minmax(14rem, 20rem) 1fr; gap: 3rem; }
  .book-hero-cover { width: 100%; max-width: none; margin: 0; }
}
.book-title { margin-bottom: .25rem; }
.book-subtitle { font-style: italic; font-size: 1.25rem; color: var(--ink-soft); }
.book-audience { color: var(--accent); font-weight: 600; margin-bottom: .6rem; }
.book-benefit { font-size: clamp(1.12rem, 1rem + .4vw, 1.3rem); margin-top: 1rem; max-width: 34em; }
.buy { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1.25rem; }
.buy-note { flex-basis: 100%; font-size: .88rem; color: var(--muted); margin: .2rem 0 0; }
.state-note { margin-top: 1.25rem; padding: .7rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink-soft); }
.book-body { max-width: var(--narrow); padding-block: 2.5rem; }
.book-section { margin-bottom: 2.5rem; }
.check-list, .dot-list, .plain-list, .toc-list { padding-left: 0; list-style: none; margin: 0; }
.check-list li, .dot-list li { position: relative; padding-left: 1.9rem; margin-bottom: .7rem; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, var(--paper)); box-shadow: inset 0 0 0 2px var(--accent); }
.dot-list li::before { content: ""; position: absolute; left: .35rem; top: .62em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent); }
.plain-list li { margin-bottom: .5rem; }
.toc-list { counter-reset: toc; }
.toc-list li { counter-increment: toc; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.toc-list li::before { content: counter(toc, decimal-leading-zero) "  "; font-family: var(--font-title); color: var(--accent); }
.excerpt { margin: 0; padding: 1.25rem 1.5rem; border-left: 4px solid var(--accent); background: var(--paper); font-style: italic; font-size: 1.05rem; }
.faq details { border-bottom: 1px solid var(--line); padding: .9rem 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.faq details p { margin: .6rem 0 0; color: var(--ink-soft); }
.caution { font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; }
.sticky-buy { position: sticky; bottom: 0; padding: .7rem 1.25rem calc(.7rem + env(safe-area-inset-bottom)); background: rgba(250,246,238,.96); border-top: 1px solid var(--line); z-index: 20; }
@media (min-width: 46rem) { .sticky-buy { display: none; } }

/* ---- Pages génériques ---- */
.page-head { padding-block: clamp(2rem, 4vw, 3.5rem) 1.5rem; }
.collection-head { padding-block: clamp(2rem, 4vw, 3.5rem); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--ivory)), var(--ivory)); border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--ink-soft); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.card-title { font-size: 1.25rem; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.facts { list-style: none; padding: 0 !important; margin-bottom: 1.5rem; }
.empty-state { padding: 2rem 0; color: var(--ink-soft); }
.collection-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.collection-row a { display: block; padding: 1.5rem; background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.collection-row p { color: var(--ink-soft); margin-bottom: .4rem; }

/* ---- Ressources ---- */
.resource-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1rem; }
.resource { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.25rem 1.4rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.resource-title { font-size: 1.2rem; margin-bottom: .25rem; }
.resource p { margin: 0; }
.resource-index { list-style: none; padding: 0; margin: 1rem 0; border-top: 1px solid var(--line); }
.resource-index a { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem .25rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.resource-index a:hover .ri-title { text-decoration: underline; }
.ri-title { font-weight: 600; }
.quiet-aside { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .95rem; }
.small-title { font-family: var(--font-text); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* ---- Filtres ---- */
.filters { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); padding: 1.1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; }
.filter-field label, .field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .3rem; }
input[type="search"], input[type="email"], input[type="text"], select {
  width: 100%; min-height: 46px; padding: .55rem .75rem; font: inherit; color: var(--ink); background: var(--ivory); border: 1.5px solid #B9B0A0; border-radius: var(--radius-sm); }
.filter-count { color: var(--muted); font-size: .92rem; min-height: 1.5em; }

/* ---- Newsletter ---- */
.nl-form .field { margin-bottom: 1rem; }
.field-check { display: flex; gap: .6rem; align-items: flex-start; }
.field-check input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; flex: none; }
.field-check label { font-weight: 400; font-size: .98rem; }
.hp { position: absolute; left: -10000px; }

/* ---- Pied de page ---- */
.site-footer { margin-top: 3rem; background: #0A2047;   /* bleu nuit du kit (logo-fond-bleu-nuit) */ color: #D9D6CF; padding-block: 2.5rem 1.5rem; font-size: .95rem; }
.site-footer a { color: #F1ECE2; }
.footer-inner { display: grid; gap: 1.5rem; }
@media (min-width: 46rem) { .footer-inner { grid-template-columns: 1fr 1.4fr; } }
.footer-brand { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.footer-mark { width: auto; height: 2.4rem; }
.footer-word { width: auto; height: 1.9rem; }
.footer-tagline { color: #B9B6AE; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-note { border-top: 1px solid #3A404B; margin-top: 1.5rem; padding-top: 1rem; color: #A9A69E; font-size: .85rem; }
body.is-minimal .site-footer { margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header nav, .site-footer, .sticky-buy, .preview-banner, .skip-link { display: none !important; }
  body { background: #fff; }
}

/* Navigation compacte sur petits écrans */
@media (max-width: 30rem) {
  .header-inner { padding-block: .75rem; }
  .main-nav ul { gap: .1rem .9rem; font-size: .95rem; }
}

/* ---- Mini-guides ---- */
.guide-hero { padding-block: clamp(2rem, 4vw, 4rem); border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--teal) 12%, var(--ivory)), var(--ivory)); }
.guide-hero-inner { display: grid; gap: 2rem; align-items: center; }
.guide-hero-visual { max-width: 13rem; width: 55%; margin-inline: auto; }
@media (min-width: 46rem) {
  .guide-hero-inner { grid-template-columns: 1fr minmax(12rem, 16rem); gap: 3rem; }
  .guide-hero-visual { width: 100%; max-width: none; }
}
.guide-placeholder { --accent: var(--teal-ink); background: linear-gradient(180deg, color-mix(in srgb, var(--teal) 22%, var(--paper)), var(--paper)); }
.guide-book { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.25rem; align-items: start; }
.guide-teaser { border-left: 5px solid var(--teal); }
.guide-list li { margin-bottom: .7rem; }

.footer-credit { margin-top: .4rem; }
.footer-credit a { color: #F1ECE2; font-weight: 600; }
