/* jacquesseyler.com — thème noir */

:root {
  --bg: #0b0a0a;
  --bg-2: #141212;
  --line: #2a2424;
  --text: #d9d4cc;
  --muted: #8a827a;
  --red: #b3141f;
  --red-light: #e0313d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --width: 44rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.125rem/1.7 var(--serif);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red-light); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; display: block; }

/* ---------- avertissement 18+ ---------- */

.gate { display: none; }
html.age-gate body { overflow: hidden; }
html.age-gate .gate {
  display: flex;
  position: fixed; inset: 0; z-index: 100;
  align-items: center; justify-content: center;
  padding: 1rem;
  background: rgba(5, 4, 4, .97);
}
.gate-box {
  max-width: 28rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  background: var(--bg-2);
  padding: 2rem 1.75rem;
  text-align: center;
}
.gate-box .gate-mark {
  font: 700 2.5rem/1 var(--mono);
  color: var(--red-light);
  margin: 0 0 .5rem;
}
.gate-box h2 {
  margin: 0 0 1rem;
  font-size: 1rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 400;
}
.gate-box p { color: var(--muted); font-size: 1rem; }
.gate-actions { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.5rem; }
.gate-actions button {
  font: inherit; font-size: 1rem; cursor: pointer;
  background: var(--red); color: #fff; border: 0; padding: .8rem 1rem;
}
.gate-actions button:hover { background: var(--red-light); }
.gate-leave { color: var(--muted); font-size: .95rem; }

/* ---------- en-tête / pied ---------- */

.site-header {
  max-width: var(--width);
  margin: 0 auto;
  padding: 3rem 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
  position: relative;
}
.site-header::after {
  content: ""; position: absolute; left: 50%; bottom: -2px;
  width: 4rem; height: 3px; margin-left: -2rem; background: var(--red);
}
.brand {
  color: var(--text);
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  letter-spacing: .35em; text-transform: uppercase;
  padding-left: .35em; /* compense le letter-spacing */
}
.brand:hover { text-decoration: none; color: #fff; }
.tagline {
  margin: .5rem 0 1.25rem;
  font: .8rem/1.5 var(--mono); color: var(--muted); letter-spacing: .05em;
}
.site-header nav { display: flex; justify-content: center; gap: 1.75rem; flex-wrap: wrap; }
.site-header nav a {
  color: var(--muted);
  font: .8rem var(--mono); letter-spacing: .2em; text-transform: uppercase;
}
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--text); text-decoration: none; }
.site-header nav a[aria-current] { border-bottom: 1px solid var(--red); }

main { max-width: var(--width); margin: 0 auto; padding: 2.5rem 1rem 3rem; }

.site-footer {
  max-width: var(--width); margin: 0 auto; padding: 2rem 1rem 3rem;
  border-top: 1px solid var(--line);
  font: .8rem/1.6 var(--mono); color: var(--muted); text-align: center;
}
.site-footer p { margin: .25rem 0; }
.footer-links a { color: var(--muted); margin: 0 .6rem; }
.footer-links a:hover { color: var(--text); }

/* ---------- titres de page ---------- */

.page-title {
  font-weight: 400; font-size: .85rem; font-family: var(--mono);
  letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 2rem;
}
.page-sub { font: .85rem var(--mono); color: var(--muted); margin: -1.25rem 0 2rem; }
.muted { color: var(--muted); }

/* ---------- méta, tags ---------- */

.meta {
  font: .78rem/1.4 var(--mono); color: var(--muted);
  letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .5rem;
}
.suite-count { color: var(--red-light); }

.tags { list-style: none; padding: 0; margin: .5rem 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags a {
  display: inline-block;
  font: .78rem/1 var(--mono);
  color: var(--red-light);
  border: 1px solid #4a1a1d;
  padding: .35rem .55rem;
}
.tags a:hover { background: var(--red); border-color: var(--red); color: #fff; text-decoration: none; }

/* ---------- liste d'articles ---------- */

.cards { display: flex; flex-direction: column; }
.card { padding: 0 0 2.25rem; margin: 0 0 2.25rem; border-bottom: 1px solid var(--line); }
.card:last-child { border-bottom: 0; }
.card h2 { font-size: 1.5rem; line-height: 1.3; font-weight: 400; margin: 0 0 .25rem; }
.card h2 a { color: var(--text); }
.card h2 a:hover { color: #fff; }
.card-cover { display: block; margin-bottom: 1rem; }
.card-cover img { width: 100%; max-height: 22rem; object-fit: cover; filter: grayscale(.25) contrast(1.05); }
.card-parent { font-size: .95rem; color: var(--muted); margin: .25rem 0; }
.excerpt { color: #b8b1a8; margin: .5rem 0 .75rem; }
.more { font: .8rem var(--mono); letter-spacing: .12em; text-transform: uppercase; }

.pagination {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
  font: .85rem var(--mono); margin-top: 1rem;
}
.pagination a, .pagination span { padding: .4rem .7rem; border: 1px solid var(--line); }
.pagination span[aria-current] { border-color: var(--red); color: var(--text); }
.pagination a:hover { border-color: var(--red); text-decoration: none; }

/* ---------- article ---------- */

.post-header { margin-bottom: 2rem; }
.post h1 { font-size: clamp(1.7rem, 5.5vw, 2.3rem); line-height: 1.2; font-weight: 400; margin: .25rem 0 .75rem; }
.post-cover { margin: 0 0 2rem; }
.post-cover img { width: 100%; }

.prose h2, .prose h3 { font-weight: 400; line-height: 1.3; margin: 2.5rem 0 1rem; }
.prose h2 { font-size: 1.45rem; border-left: 3px solid var(--red); padding-left: .75rem; }
.prose h3 { font-size: 1.2rem; color: #fff; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.25rem; }
.prose li { margin: 0 0 .6rem; }
.prose li::marker { color: var(--red-light); }
.prose strong { color: #fff; font-weight: 600; }
.prose blockquote {
  margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem;
  border-left: 2px solid var(--line); color: var(--muted); font-style: italic;
}
.prose img { margin: 1.5rem auto; }
.prose hr { border: 0; text-align: center; margin: 2.5rem 0; }
.prose hr::after { content: "✕"; color: var(--red); letter-spacing: 1em; }

.prose .alerte {
  border: 1px solid #4a1a1d; background: #170c0d;
  padding: 1rem 1.25rem; margin: 2rem 0;
}
.prose .alerte > :first-child { margin-top: 0; }
.prose .alerte > :last-child { margin-bottom: 0; }

.sommaire {
  border: 1px solid var(--line); background: var(--bg-2);
  padding: 1rem 1.25rem; margin: 0 0 2rem; font-size: 1rem;
}
.sommaire p { margin: 0 0 .5rem; font: .75rem var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.sommaire ol { margin: 0; padding-left: 1.25rem; }

/* sous-articles : la suite, sur la même page */
.suite {
  margin-top: 3rem; padding-top: 2.5rem;
  border-top: 1px solid var(--line);
  position: relative;
}
.suite::before {
  content: ""; position: absolute; top: -1px; left: 0;
  width: 3rem; height: 1px; background: var(--red);
}
.suite-label {
  font: .75rem var(--mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--red-light); margin: 0 0 .5rem;
}
.suite h2 { font-size: 1.6rem; font-weight: 400; line-height: 1.25; margin: 0 0 .5rem; }

.prevnext {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin: 3rem 0 0; padding-top: 2rem; border-top: 1px solid var(--line);
}
.prevnext a { color: var(--text); font-size: 1rem; line-height: 1.4; }
.prevnext a span { display: block; font: .75rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.prevnext .next { grid-column: 2; text-align: right; }

/* ---------- nouvelles ---------- */

.bloc-nouvelles {
  margin-top: 3rem; padding: 1.5rem 1.25rem;
  background: var(--bg-2); border: 1px solid var(--line); border-top: 3px solid var(--red);
}
.bloc-nouvelles h2 { margin: 0 0 1rem; font: .8rem var(--mono); letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.mini-nouvelle { color: var(--text); font-size: .95rem; line-height: 1.3; }
.mini-nouvelle img, .mini-nouvelle .cover-placeholder { aspect-ratio: 5 / 8; width: 100%; object-fit: cover; margin-bottom: .5rem; }

.cover-placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  aspect-ratio: 5 / 8; padding: 1rem;
  background: linear-gradient(160deg, #1d1515, #0b0a0a 70%);
  border: 1px solid var(--line);
  font-size: 1.1rem; color: var(--text);
}

.nouvelles { display: flex; flex-direction: column; gap: 2.5rem; }
.nouvelle { display: grid; grid-template-columns: 10rem 1fr; gap: 1.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.nouvelle:last-child { border-bottom: 0; }
.nouvelle-cover img { width: 100%; aspect-ratio: 5 / 8; object-fit: cover; }
.nouvelle h2 { font-size: 1.5rem; font-weight: 400; margin: 0 0 .25rem; line-height: 1.25; }
.nouvelle .prose { font-size: 1.05rem; }
.btn {
  display: inline-block; background: var(--red); color: #fff;
  font: .8rem var(--mono); letter-spacing: .15em; text-transform: uppercase;
  padding: .7rem 1.1rem;
}
.btn:hover { background: var(--red-light); text-decoration: none; }
.btn-disabled { background: transparent; border: 1px solid var(--line); color: var(--muted); }

/* encart « Dans la fiction » en fin d'article */
.nouvelle-liee {
  display: grid; grid-template-columns: 8rem 1fr; gap: 1.25rem; align-items: start;
  margin-top: 3rem; padding: 1.25rem;
  border: 1px solid #4a1a1d; background: #170c0d;
}
.nl-cover img { width: 100%; aspect-ratio: 5 / 8; object-fit: cover; }
.nl-label { margin: 0 0 .25rem; font: .75rem var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--red-light); }
.nouvelle-liee h2 { margin: 0 0 .5rem; font-size: 1.3rem; font-weight: 400; line-height: 1.25; }
.nouvelle-liee h2 a { color: var(--text); }
.nl-accroche p { margin: 0 0 1rem; font-size: 1rem; line-height: 1.5; color: #b8b1a8; }

/* ---------- thèmes ---------- */

.tag-cloud { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.tag-cloud a { font: 1rem var(--mono); color: var(--red-light); border: 1px solid #4a1a1d; padding: .5rem .75rem; display: inline-block; }
.tag-cloud a:hover { background: var(--red); color: #fff; text-decoration: none; }
.tag-cloud span { font: .8rem var(--mono); color: var(--muted); margin-left: .25rem; }

/* ---------- mobile ---------- */

@media (max-width: 560px) {
  body { font-size: 1.06rem; }
  .site-header { padding-top: 2rem; }
  .site-header nav { gap: 1.1rem; }
  .nouvelle { grid-template-columns: 1fr; }
  .nouvelle-cover { max-width: 12rem; }
  .mini-grid { grid-template-columns: repeat(2, 1fr); }
  .nouvelle-liee { grid-template-columns: 6rem 1fr; gap: 1rem; }
  .prevnext { grid-template-columns: 1fr; }
  .prevnext .next { grid-column: 1; text-align: left; }
}
