/* Polices auto-hébergées (aucun appel à Google) */
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("/assets/fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/assets/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 200 800; font-style: normal; font-display: swap;
  src: url("/assets/fonts/newsreader-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 200 800; font-style: italic; font-display: swap;
  src: url("/assets/fonts/newsreader-latin-wght-italic.woff2") format("woff2"); }

:root {
  --ink: #10222A;        /* mer du Nord, la nuit */
  --ink-soft: #1B333D;
  --fog: #E3E7E4;       /* brume */
  --paper: #EEF1EF;
  --line: #C3CBC8;
  --sea: #45625F;       /* texte secondaire sur fond clair */
  --tape: #F2C230;      /* ruban de scène de crime */
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h, 72px) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--fog);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: 0.005em; }
p { margin: 0 0 1em; }
ul { list-style: none; margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.dark :focus-visible, .tape :focus-visible { outline-color: var(--tape); }
.tape :focus-visible { outline-color: var(--ink); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--tape); color: var(--ink); padding: 10px 16px; z-index: 20; }
.skip:focus { left: 8px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); }
section { padding: clamp(56px, 8vw, 104px) 0; }
h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 0.6em; }

.dark { background: var(--ink); color: var(--fog); }
.light { background: var(--fog); color: var(--ink); }
.paper { background: var(--paper); color: var(--ink); }

/* Boutons */
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.btn {
  display: inline-block; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.02em;
  background: var(--tape); color: var(--ink); text-decoration: none;
  padding: 12px 26px; border: 2px solid var(--tape); border-radius: 2px; min-height: 44px;
}
.btn:hover { background: var(--fog); border-color: var(--fog); }
.btn-ghost { background: transparent; color: var(--fog); border-color: var(--fog); }
.btn-ghost:hover { background: var(--fog); color: var(--ink); }
.btn-ghost-dark { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost-dark:hover { background: var(--ink); color: var(--fog); border-color: var(--ink); }

/* En-tête */
.head { position: sticky; top: 0; z-index: 20; background: var(--ink); border-bottom: 1px solid var(--ink-soft);
  padding-top: env(safe-area-inset-top, 0px); box-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.head-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; padding-top: 16px; padding-bottom: 16px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.5rem; text-decoration: none; }
.head nav { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.head nav a { font-family: var(--display); font-weight: 500; font-size: 1.15rem; text-decoration: none; padding: 8px 0; }
.head nav a:hover { text-decoration: underline; text-decoration-color: var(--tape); text-decoration-thickness: 3px; }

/* Accueil */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(64px, 9vw, 128px); }
.hero-in { display: grid; gap: 48px; align-items: end; }
.hero-in.has-photo { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.hero h1 { font-size: clamp(3.8rem, 11vw, 8.5rem); line-height: 0.92; letter-spacing: -0.005em; }
.hero-sub { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.15; margin: 0.5em 0 0.7em; color: var(--tape); }
.hero-intro { max-width: 34em; font-size: 1.2rem; color: #C9D2D0; }
.hero-intro p { margin: 0 0 .9em; }
.hero-intro p:last-child { margin-bottom: 0; }
.hero-photo { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }

/* Ruban d'annonce */
.tape { position: relative; background: var(--tape); color: var(--ink); padding: 26px 0; }
.tape::before, .tape::after {
  content: ""; position: absolute; left: 0; right: 0; height: 8px;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 12px, var(--tape) 12px 24px);
}
.tape::before { top: 0; }
.tape::after { bottom: 0; }
.tape-in { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 32px; }
.tape p { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.2; }
.tape a { font-family: var(--display); font-weight: 700; font-size: 1.2rem; }

/* À propos */
.about-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 32px 64px; }
.about h2 { margin: 0; }
.prose { max-width: 38em; font-size: 1.25rem; }
.prose p:last-child { margin-bottom: 0; }

/* Livres */
.books h2 { margin-bottom: 0.9em; }
.featured { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 40px; align-items: start; padding-bottom: 56px; }
.cover img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.cover-fallback {
  aspect-ratio: 2 / 3; background: var(--ink-soft); color: var(--fog); border-radius: 2px;
  display: flex; align-items: flex-end; padding: 18px; position: relative; overflow: hidden;
  border-bottom: 10px solid var(--tape);
}
.cover-fallback span { font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1; }
.cover-fallback.small { padding: 8px; border-bottom-width: 5px; }
.cover-fallback.small span { font-size: 0.8rem; line-height: 1.05; }
.badge { display: inline-block; margin: 0 0 14px; padding: 2px 12px; background: var(--ink); color: var(--tape); font-family: var(--display); font-weight: 700; font-size: 1.05rem; border-radius: 2px; }
.badge-quiet { background: transparent; color: var(--sea); padding: 0; margin: 0; font-weight: 500; align-self: start; white-space: nowrap; }
.featured h3 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin-bottom: 0.35em; }
.meta { display: flex; flex-wrap: wrap; gap: 0 22px; color: var(--sea); font-size: 1rem; margin: 0 0 0.8em; }
.desc { max-width: 36em; }
.list-title { font-size: 1.7rem; margin: 8px 0 12px; }
.rows { margin-bottom: 40px; }
.row { padding: 0; border-top: 1px solid var(--line); }
.book > summary { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 8px 24px; padding: 22px 0; align-items: start; cursor: pointer; list-style: none; }
.book > summary::-webkit-details-marker, .where > summary::-webkit-details-marker { display: none; }
.book > summary:hover h4 { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--tape); }
.book > summary:focus-visible, .where > summary:focus-visible { outline: 3px solid var(--tape); outline-offset: 3px; }
.more { margin: 10px 0 0; font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--sea); }
.more::after { content: " ▾"; }
.book[open] .more::after { content: " ▴"; }
.more-open, .book[open] .more-closed { display: none; }
.book[open] .more-open { display: inline; }
.where > summary { list-style: none; cursor: pointer; margin-top: 8px; }
.where[open] > summary { margin-bottom: 4px; }
.where-panel { margin: 0 0 24px 88px; padding: 18px 22px; background: #fff; border-left: 5px solid var(--tape); border-radius: 2px; }
.where-featured .where-panel { margin: 12px 0 0; }
.where-panel h5 { margin: 0 0 8px; font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.where-list { list-style: none; margin: 0; padding: 0; }
.where-list li { margin: 6px 0; line-height: 1.45; }
.where-list a { text-decoration-thickness: 2px; text-decoration-color: var(--tape); }
.isbn { white-space: nowrap; font-variant-numeric: tabular-nums; }
.row:last-child { border-bottom: 1px solid var(--line); }
.row h4 { font-size: 1.8rem; }
.row h4 a { text-decoration-thickness: 2px; text-decoration-color: var(--tape); }
.row .meta { margin: 4px 0 0; }
.row .desc { margin: 8px 0 0; font-size: 1.05rem; }
.thumb img { width: 64px; height: 96px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }

/* Actualités */
.news-list > li { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 8px 32px; padding: 24px 0; border-top: 1px solid var(--line); }
.news-list > li:last-child { border-bottom: 1px solid var(--line); }
.news-list time { font-family: var(--display); font-weight: 500; font-size: 1.25rem; color: var(--sea); padding-top: 4px; }
.news-list h3 { font-size: 1.8rem; margin-bottom: 0.3em; }
.news-list p:last-child { margin-bottom: 0; }
.news-list ul { margin: 0 0 0.6em; padding-left: 1.2em; }
.news-list > li li { padding: 3px 0; }
.news-img { display: block; width: min(100%, 380px); margin-top: 16px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(16, 34, 42, .12); }
.news-img img { display: block; width: 100%; height: auto; transition: opacity .2s; }
.news-img:hover img { opacity: .9; }

/* Dédicaces */
.events-intro { color: #C9D2D0; max-width: 36em; margin-bottom: 40px; }
.events-list > li { display: grid; grid-template-columns: minmax(180px, 300px) minmax(0, 1fr); gap: 8px 32px; padding: 22px 0; border-top: 1px solid var(--ink-soft); align-items: baseline; }
.events-list > li:last-child { border-bottom: 1px solid var(--ink-soft); }
.ev-date { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.05; color: var(--tape); margin: 0; }
.events-list h3 { font-size: 1.6rem; margin-bottom: 0.1em; }
.events-list p { margin: 0; color: #C9D2D0; }
.ev-photos { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.ev-photos li { flex: 0 1 220px; }
.ev-photos a { display: block; border-radius: 2px; overflow: hidden; }
.ev-photos img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: opacity .2s; }
.ev-photos a:hover img { opacity: .85; }

/* Contact */
.contact-in p { max-width: 34em; }
.contact .actions { margin-top: 20px; }

.foot { padding: 28px 0; font-size: 0.95rem; color: #9FB0AE; }
.foot p { margin: 0; }

/* Téléphone et tablette */
@media (max-width: 820px) {
  .hero-in.has-photo { grid-template-columns: 1fr; }
  .hero-photo { max-width: 360px; }
  .about-in { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 1fr; gap: 24px; }
  .cover { max-width: 240px; }
  .news-list > li, .events-list > li { grid-template-columns: 1fr; }
  .book > summary { grid-template-columns: 56px minmax(0, 1fr); }
  .where-panel { margin-left: 0; }
  .row .badge-quiet { grid-column: 2; }
  .thumb img { width: 56px; height: 84px; }
  .ev-photos li { flex: 1 1 140px; }
}

/* Menu fixe compact sur mobile : une ligne de liens, défilable si besoin */
@media (max-width: 640px) {
  .head-in { padding-top: 10px; padding-bottom: 6px; gap: 2px 16px; }
  .brand { font-size: 1.3rem; }
  .head nav { flex-wrap: nowrap; gap: 20px; overflow-x: auto; width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .head nav::-webkit-scrollbar { display: none; }
  .head nav a { font-size: 1.05rem; padding: 6px 0; white-space: nowrap; }
}
