@font-face {
  font-family: "Lato";
  font-weight: 900;
  font-display: swap;
  src: url("lato-black.woff2") format("woff2");
}

:root {
  --bg: #ffeeee;
  --surface: #ffffff;
  --ink: #261c21;
  --muted: #6f6168;
  --line: #f3d6d9;
  --accent: #c2185b;
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgb(38 28 33 / .06), 0 8px 24px rgb(38 28 33 / .08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --display: "Lato", "Helvetica Neue", Arial, sans-serif;
  --logo-pink: #ff3d77;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17121a;
    --surface: #211a24;
    --ink: #f3ebee;
    --muted: #b3a5ac;
    --line: #362b38;
    --accent: #f06292;
    --accent-ink: #17121a;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .2em; }
main { min-height: 70vh; }

/* En-tête */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .75rem max(1rem, calc((100% - 1200px) / 2));
  background: #ffeeee;
  border-bottom: 1px solid #f3d6d9;
}
.brand { display: block; line-height: 0; }
.brand img { height: 52px; width: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.more { margin: .4rem 0 0; font-weight: 600; }
.site-nav { display: flex; gap: .25rem 1.1rem; flex-wrap: wrap; font-size: .95rem; }
.site-nav a { color: #6f6168; text-decoration: none; }
.site-nav a:hover { color: #261c21; }
.site-nav .lang {
  color: #261c21; border: 1px solid #e8c3c8; border-radius: 999px; padding: 0 .7em;
}

/* Accueil */
.hero {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  max-width: 1200px; margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) 1rem;
}
.hero h1 {
  font: 700 clamp(2.8rem, 7vw, 5rem)/.95 var(--serif); margin: .2em 0 .35em; letter-spacing: -.02em;
}
.hero h1 em { color: var(--accent); }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 34em; }
.hero-img { border-radius: 14px; box-shadow: var(--shadow); transform: rotate(1.2deg); }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--muted); margin: 0; }
.kicker a { color: inherit; }
.cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.btn {
  display: inline-block; padding: .7em 1.3em; border-radius: 999px; font-weight: 600; text-decoration: none;
  background: var(--accent); color: var(--accent-ink); border: 1.5px solid var(--accent);
}
.btn.ghost { background: transparent; color: var(--accent); }

.season { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 2.5rem; }
.season h2 {
  font: 900 clamp(1.9rem, 4vw, 2.6rem)/1 var(--display); letter-spacing: -.035em; color: var(--logo-pink); margin: 0 0 1.2rem; display: flex; align-items: baseline; gap: .6rem;
  border-top: 1px solid var(--line); padding-top: 1.8rem;
}
.season h2 small { font: 500 .85rem var(--sans); color: var(--muted); letter-spacing: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.25rem; }
.card {
  display: grid; grid-template-columns: auto 1fr; gap: .15rem .6rem; align-content: start;
  text-decoration: none; color: var(--ink);
}
.card img {
  grid-column: 1 / -1; aspect-ratio: 900 / 637; object-fit: cover; width: 100%;
  border-radius: 10px; background: var(--line); margin-bottom: .45rem;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover img { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-num { font: 700 .95rem var(--serif); color: var(--accent); }
.card-title { font-weight: 600; font-size: .95rem; line-height: 1.35; }

/* Lecture d'un épisode */
.episode { max-width: 960px; margin: 0 auto; padding: 2rem 0 3rem; }
.episode-head { padding: 0 1rem 1.5rem; text-align: center; }
.episode-head h1 { font: 700 clamp(1.7rem, 4.5vw, 2.6rem)/1.15 var(--serif); margin: .3em 0 0; }
.planches { display: flex; flex-direction: column; gap: clamp(.4rem, 1.5vw, 1rem); }
.planches img { display: block; width: 100%; background: var(--line); }
@media (min-width: 960px) { .planches img { border-radius: 6px; box-shadow: var(--shadow); } }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 2rem 1rem 0; }
.pager a {
  display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.2rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600;
  line-height: 1.3;
}
.pager a:hover { border-color: var(--accent); }
.pager small { color: var(--muted); font-weight: 500; font-size: .8rem; }
.pager a[rel="next"] { text-align: right; }
.back { text-align: center; margin-top: 1.5rem; }

/* Pages de texte */
.prose { max-width: 42rem; margin: 0 auto; padding: 2.5rem 1rem 3rem; }
.prose h1 { font: 700 clamp(2rem, 5vw, 2.8rem)/1.1 var(--serif); margin: .2em 0 1em; }
.prose h2 { font: 700 1.45rem/1.25 var(--serif); margin: 2.2em 0 .3em; }
.prose h2 strong { font-weight: inherit; }
.prose img { border-radius: 8px; }
.prose figure { margin: 1.5rem 0; }
.prose figcaption { color: var(--muted); font-size: .85rem; margin-top: .3rem; }
.page-characters h2 { display: flex; align-items: center; gap: 1rem; clear: both; }
.page-characters h2 a { flex: none; }
.page-characters h2 img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; display: block; }
.portrait { float: right; width: min(45%, 200px); margin: .3rem 0 1rem 1.5rem !important; }
.news-list { list-style: none; padding: 0; }
.news-list a {
  display: flex; flex-direction: column; padding: .9rem 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink); font-weight: 600;
}
.news-list time { color: var(--muted); font-size: .8rem; font-weight: 500; }

/* Pied de page */
.site-footer {
  border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; text-align: center;
  padding: 2rem 1rem 2.5rem;
}
.site-footer p { margin: .2rem 0; }
.fine { font-size: .75rem; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; padding-top: 1.5rem; }
  .hero-img { order: -1; transform: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 1rem .75rem; }
  .pager { grid-template-columns: 1fr; }
  .pager a[rel="next"] { text-align: left; }
  .episode { padding-top: 1.2rem; }
  .site-header { padding: .6rem 1rem; }
}

/* Visionneuse */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; display: none; place-items: center; cursor: zoom-out;
}
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: rgb(15 10 14 / .88); backdrop-filter: blur(4px); }
.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 10px 40px rgb(0 0 0 / .5); }
.lightbox p { color: #fff; text-align: center; margin: .8rem 0 0; font-weight: 600; }
.lightbox button {
  position: fixed; top: .8rem; right: 1rem; font-size: 2rem; line-height: 1; color: #fff;
  background: none; border: 0; cursor: pointer;
}
a.zoom { cursor: zoom-in; }
@media (max-width: 760px) { .brand img { height: 40px; } }

/* Logo du bandeau d'accueil */
.hero h1 { margin: .4rem 0 1rem; line-height: 0; }
.hero-logo { width: min(100%, 460px); height: auto; }

/* Lecteur de planches */
.planches img { cursor: zoom-in; }
.reader-box {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: #120d12; color: #f3ebee;
  display: none; grid-template-rows: auto 1fr auto; overscroll-behavior: contain;
}
.reader-box[open] { display: grid; animation: reader-in .2s ease-out; }
.reader-box::backdrop { background: #120d12; }
@keyframes reader-in { from { opacity: 0; } }
.reader-bar {
  display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem;
  font: 600 .9rem/1.2 var(--sans); background: linear-gradient(#120d12, transparent);
  position: relative; z-index: 2;
}
.reader-bar .rt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-bar .rc { font: 900 1rem var(--display); color: var(--logo-pink); white-space: nowrap; }
.reader-box button {
  background: rgb(255 255 255 / .1); color: #fff; border: 0; border-radius: 999px; cursor: pointer;
  width: 2.6rem; height: 2.6rem; font-size: 1.4rem; line-height: 1; display: grid; place-items: center;
}
.reader-box button:hover { background: rgb(255 255 255 / .2); }
.reader-box button:disabled { opacity: .25; cursor: default; }
.reader-stage {
  position: relative; overflow: hidden; touch-action: none; min-height: 0;
  display: flex; align-items: center; justify-content: center;
}
.reader-stage img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; user-select: none; -webkit-user-drag: none;
  transform-origin: 0 0; will-change: transform; transition: transform .25s ease;
}
.reader-stage.dragging img { transition: none; }
.reader-stage.zoomed img { cursor: grab; }
.reader-nav { display: flex; justify-content: center; gap: 1.5rem; padding: .6rem 1rem 1rem; }
.reader-hint {
  position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 3;
  background: rgb(0 0 0 / .7); padding: .5rem 1rem; border-radius: 999px; font-size: .85rem;
  width: max-content; max-width: 90%; text-align: center; pointer-events: none; transition: opacity .6s;
}
.reader-hint.gone { opacity: 0; }
.reader-rotate { display: none; }
@media (orientation: portrait) and (max-width: 760px) {
  .reader-rotate { display: block; color: var(--muted); font-size: .8rem; text-align: center; padding: 0 1rem .4rem; }
}
.hero-logo { border-radius: 14px; }
[data-gallery] { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; margin: 1.5rem 0; }
[data-gallery] img { aspect-ratio: 1; object-fit: cover; width: 100%; display: block; }
.card.pending { cursor: default; }
.card-ph {
  grid-column: 1 / -1; aspect-ratio: 900 / 637; border-radius: 10px; margin-bottom: .45rem;
  display: grid; place-items: center; font: 900 1.1rem var(--display); letter-spacing: -.02em;
  color: var(--logo-pink); border: 2px dashed color-mix(in srgb, var(--logo-pink) 45%, transparent);
  background: color-mix(in srgb, var(--logo-pink) 7%, transparent);
}
.card.pending .card-title, .card.pending .card-num { opacity: .6; }

/* Accueil sur téléphone : directement les épisodes, la présentation reste dans « À propos ». */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .home .hero { display: none; }
  .home .season:first-child h2 { border-top: 0; padding-top: .5rem; }
}

/* Lecteur en paysage sur téléphone : la planche prend toute la hauteur, les flèches passent sur les côtés. */
@media (max-height: 500px) {
  .reader-box { grid-template-rows: auto 1fr; }
  .reader-bar { padding: .3rem 1rem; }
  .reader-bar button { width: 2.2rem; height: 2.2rem; }
  .reader-foot { position: absolute; inset: 50% 0 auto; transform: translateY(-50%); z-index: 2; pointer-events: none; }
  .reader-foot .reader-nav { justify-content: space-between; padding: 0 .4rem; }
  .reader-foot button { pointer-events: auto; background: rgb(0 0 0 / .45); }
  .reader-foot button:disabled { visibility: hidden; }
}
