/* lesemeur — site littéraire, 2007–2012 */
:root {
  --bg: #1c140e;
  --bg-soft: #241910;
  --cream: #e9e2cb;
  --cream-dim: rgba(233, 226, 203, 0.64);
  --cream-mute: rgba(233, 226, 203, 0.42);
  --gold: #c29956;
  --gold-soft: rgba(194, 153, 86, 0.28);
  --gold-line: rgba(194, 153, 86, 0.22);
  --ink: #1c140e;
  --max: 46rem;
  --wide: 52rem;
  --serif-display: "Playfair Display", "Times New Roman", serif;
  --serif-body: "Source Serif 4", "Palatino Linotype", Palatino, serif;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--serif-body);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.7;
  letter-spacing: 0.012em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--gold);
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  z-index: 20;
}

.skip:focus {
  top: 0.75rem;
}

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--cream);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

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

.wrap {
  position: relative;
  z-index: 1;
  width: min(var(--wide), calc(100% - 2.4rem));
  margin-inline: auto;
}

/* —— navigation —— */
.top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--cream);
  text-decoration: none;
}

.brand:hover {
  color: var(--cream);
}

.brand img {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  object-fit: cover;
}

.wordmark {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 1.42rem;
  letter-spacing: 0.16em;
  line-height: 1;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.nav a {
  color: var(--cream-dim);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--gold);
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1px;
}

/* —— home hero —— */
.banner {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  border-block: 1px solid var(--gold-line);
  background: #120e0a;
}

.banner img {
  width: 100%;
  height: auto;
  max-height: 28vh;
  min-height: 7.5rem;
  object-fit: cover;
  object-position: center;
}

.emblem {
  position: relative;
  z-index: 2;
  width: 5.25rem;
  height: 5.25rem;
  margin: -2.6rem auto 1.6rem;
  border-radius: 50%;
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 6px var(--bg);
  object-fit: cover;
}

.intro {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.4rem;
}

.lede {
  margin: 0;
  color: var(--cream);
  font-size: 1.05rem;
  line-height: 1.75;
  font-style: italic;
}

.motif {
  display: block;
  width: min(16rem, 70%);
  height: 1.4rem;
  margin: 1.5rem auto 0;
  color: var(--gold);
}

/* —— home trailer —— */
.featured {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 3rem;
}

.featured h2 {
  margin: 0 0 1.05rem;
  font-family: var(--serif-display);
  font-weight: 400;
  font-style: normal;
  font-size: 0.72rem;
  font-variant: small-caps;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.featured .embed {
  margin: 0;
}

.featured .yt-link {
  margin-top: 0.45rem;
}

/* —— corpus list —— */
.corpus-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem 1.2rem;
  margin: 0 0 0.85rem;
}

.corpus-head h1 {
  margin: 0;
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
}

.count {
  color: var(--cream-dim);
  font-size: 0.92rem;
}

.tools {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.6rem;
}

.years {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.88rem;
}

.years button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: var(--cream-dim);
  font: inherit;
  cursor: pointer;
}

.years button[aria-pressed="true"],
.years button:hover {
  color: var(--gold);
}

.search {
  display: block;
}

.search label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.search input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--gold-line);
  border-radius: 0;
  color: var(--cream);
  font: inherit;
  padding: 0.45rem 0 0.5rem;
}

.search input::placeholder {
  color: var(--cream-mute);
}

.year-block {
  margin: 0 0 2.85rem;
}

.year-block h2 {
  margin: 0 0 0.7rem;
  font-family: var(--serif-display);
  font-weight: 400;
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--gold);
}

.corpus {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--gold-line);
}

.corpus li {
  border-bottom: 1px solid var(--line, rgba(233, 226, 203, 0.1));
}

.corpus a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem 1.25rem;
  align-items: baseline;
  padding: 1.05rem 0 1.15rem;
  color: var(--cream);
  text-decoration: none;
}

.corpus a:hover .title {
  color: var(--gold);
}

.title {
  font-family: var(--serif-display);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.01em;
  text-transform: none;
  text-wrap: balance;
}

.mark {
  color: var(--gold);
  font-style: normal;
  padding-left: 0.4rem;
  letter-spacing: 0;
  font-size: 0.72em;
  opacity: 0.55;
  vertical-align: 0.12em;
}

.meta {
  display: flex;
  gap: 0.9rem;
  color: var(--cream-dim);
  font-size: 0.82rem;
  white-space: nowrap;
}

.meta .n {
  min-width: 1.4rem;
  text-align: right;
  color: var(--gold);
}

.empty {
  color: var(--cream-dim);
  font-style: italic;
  padding: 1.2rem 0 2rem;
}

/* —— article —— */
.article {
  padding: 0.9rem 0 3.6rem;
  max-width: var(--max);
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  margin: 0 0 0.85rem;
}

.article h1 {
  margin: 0 0 2.15rem;
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.4vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: 0.012em;
  text-wrap: balance;
  text-transform: none;
}

.article h1::after {
  content: "";
  display: block;
  width: 2.85rem;
  height: 1px;
  background: var(--gold);
  margin-top: 1.05rem;
}

.poem {
  font-size: 1.16rem;
  line-height: 1.95;
  margin: 0 0 3.2rem;
  max-width: 34rem;
}

.poem p {
  margin: 0 0 2em;
}

.poem p:last-child {
  margin-bottom: 0;
}

.demande {
  margin: 0 0 2.2rem;
  padding: 1.15rem 1.25rem 1.2rem 1.35rem;
  border-left: 1px solid var(--gold);
  color: var(--cream-mute);
  font-size: 0.86rem;
  line-height: 1.65;
}

.demande .label,
.demande {
  font-style: italic;
}

.embeds {
  display: grid;
  gap: 1.6rem;
  margin: 0.2rem 0 2.6rem;
}

.embeds.duo {
  margin-bottom: 2.6rem;
}

@media (min-width: 820px) {
  .embeds.duo {
    grid-template-columns: 1fr 1fr;
  }
}

.embed figure {
  margin: 0;
}

.frame {
  position: relative;
  padding-top: 56.25%;
  background: #0a0806;
  border: 1px solid var(--gold-line);
}

.frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.caption {
  margin: 0.55rem 0 0;
  text-align: center;
  color: var(--gold);
  font-family: var(--serif-display);
  font-style: normal;
  font-size: 0.68rem;
  font-variant: small-caps;
  letter-spacing: 0.2em;
  text-transform: lowercase;
}

.yt-link {
  display: block;
  margin: 0.25rem 0 0;
  text-align: center;
  font-size: 0.72rem;
}

.yt-link a {
  color: var(--cream-mute);
  text-decoration: none;
}

.yt-link a:hover {
  color: var(--gold);
}

/* —— comments —— */
.comments {
  margin-top: 2.8rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--gold-line);
}

.comments h2 {
  margin: 0 0 0.3rem;
  font-family: var(--serif-display);
  font-weight: 400;
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.comments .sub {
  margin: 0 0 1.5rem;
  color: var(--cream-mute);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.comment {
  margin: 0 0 1rem;
  padding: 0.55rem 0 0.75rem 1rem;
  border-left: 1px solid var(--gold-line);
}

.comment .who {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.comment .pseudo {
  font-family: var(--serif-display);
  font-style: italic;
  color: var(--cream-dim);
  font-size: 0.92rem;
}

.comment time {
  color: var(--cream-mute);
  font-size: 0.82rem;
}

.comment .body {
  color: var(--cream-mute);
  font-size: 0.84rem;
  line-height: 1.58;
  opacity: 0.9;
}

.none {
  color: var(--cream-dim);
  font-style: italic;
}

/* —— pager —— */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 1.4rem;
  margin: 2.8rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--gold-line);
  font-size: 0.82rem;
}

.pager a {
  max-width: 46%;
  color: var(--cream-dim);
  text-decoration: none;
}

.pager a:hover {
  color: var(--gold);
}

.pager .dir {
  display: block;
  color: var(--gold);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  margin-bottom: 0.28rem;
}

.pager .next {
  text-align: right;
  margin-left: auto;
}

/* —— about —— */
.about {
  max-width: 36rem;
  padding: 1rem 0 3.6rem;
}

.about .portrait {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  border: 1px solid var(--gold);
  margin: 0 auto 1.4rem;
  object-fit: cover;
}

.about h1 {
  font-family: var(--serif-display);
  font-weight: 400;
  text-align: center;
  font-size: 2.15rem;
  margin: 0;
  letter-spacing: 0.16em;
}

.about h1::after {
  content: "";
  display: block;
  width: 2.85rem;
  height: 1px;
  background: var(--gold);
  margin: 1rem auto 0;
}

.about .tag {
  text-align: center;
  color: var(--gold);
  font-style: italic;
  letter-spacing: 0.04em;
  margin: 0.85rem 0 2rem;
}

.about p {
  margin: 0 0 1.2rem;
  line-height: 1.75;
}

/* —— footer —— */
.foot {
  position: relative;
  z-index: 1;
  margin-top: 1.4rem;
  padding: 1.8rem 0 2.6rem;
  border-top: 1px solid var(--gold-line);
  color: var(--cream-mute);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.8;
}

.foot a {
  color: var(--gold);
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .corpus a {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding: 0.9rem 0;
  }

  .meta {
    white-space: normal;
  }

  .top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .pager {
    flex-direction: column;
  }

  .pager a,
  .pager .next {
    max-width: none;
    text-align: left;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

/* —— live comments form —— */
.live-comments {
  margin-top: 2.4rem;
}

.live-comments .comment-form {
  position: relative;
  margin-top: 1.6rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--gold-line);
}

.comment-form label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin: 0.95rem 0 0.25rem;
}

.comment-form input[type="text"],
.comment-form textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--gold-line);
  border-radius: 0;
  color: var(--cream);
  font: inherit;
  padding: 0.45rem 0 0.5rem;
}

.comment-form textarea {
  min-height: 6.5rem;
  resize: vertical;
  line-height: 1.6;
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
  color: var(--cream-mute);
}

.comment-form textarea:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

.comment-form .hint {
  margin: 0.85rem 0 0;
  color: var(--cream-mute);
  font-size: 0.78rem;
  font-style: italic;
}

.comment-form button[type="submit"],
.mod-actions button,
.mod-login button,
.mod-bar button {
  appearance: none;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  padding: 0.7rem 1.35rem;
  min-height: 2.75rem;
  cursor: pointer;
}

.comment-form button[type="submit"]:hover,
.mod-actions button:hover,
.mod-login button:hover,
.mod-bar button:hover {
  background: var(--gold);
  color: var(--ink);
}

.comment-form button:disabled,
.mod-actions button:disabled {
  opacity: 0.45;
  cursor: wait;
}

.form-status {
  min-height: 1.4em;
  margin: 0.7rem 0 0;
  font-size: 0.84rem;
  color: var(--cream-dim);
  font-style: italic;
}

.form-status.ok {
  color: var(--gold);
}

.form-status.err {
  color: #e0b4a0;
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* —— moderation —— */
.moderer {
  padding-bottom: 4rem;
}

.mod-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem 1.2rem;
  margin: 0 0 1.4rem;
}

.mod-bar .sub {
  margin: 0;
}

.mod-login {
  max-width: 22rem;
}

.mod-login input[type="password"] {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--gold-line);
  color: var(--cream);
  font: inherit;
  padding: 0.55rem 0 0.5rem;
  margin: 0.35rem 0 1rem;
}

.mod-err {
  color: #e0b4a0;
  font-size: 0.88rem;
  font-style: italic;
}

.mod-meta {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
}

.mod-meta a {
  color: var(--gold);
  text-decoration: none;
}

.mod-meta a:hover {
  text-decoration: underline;
}

.mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.85rem 0 0;
}

.mod-actions button.ghost {
  border-color: var(--cream-mute);
  color: var(--cream-dim);
}

.mod-actions button.ghost:hover {
  background: transparent;
  color: var(--cream);
  border-color: var(--cream);
}

.comment.pending {
  padding-bottom: 1.1rem;
}
