:root {
  --bg: #3d3d3d;
  --paper: #f7f5ef;
  --ink: #242424;
  --muted: #5d635c;
  --accent: #b8d470;
  --accent-dark: #6c7c2a;
  --line: rgba(36, 36, 36, 0.15);
  --card: #ffffff;
  --shadow: 0 14px 35px rgba(0, 0, 0, 0.15);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(184, 212, 112, 0.18), transparent 36%),
    linear-gradient(180deg, #4a4a4a 0%, #2f2f2f 100%);
  color: var(--ink);
  font-family: "Trebuchet MS", "Century Gothic", Verdana, sans-serif;
  line-height: 1.58;
}

a { color: var(--accent-dark); text-decoration-thickness: 0.08em; }
a:hover { color: #3f4a16; }
img { max-width: 100%; display: block; }

.page-shell {
  width: min(calc(100% - 32px), var(--max));
  margin: 24px auto;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,245,239,0.98)),
    url("./theme/separador2.gif");
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
}

.site-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.brand-mark {
  min-height: 0;
  padding: 16px 12px 12px 22px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.brand-mark img {
  width: auto;
  height: auto;
  max-width: min(100%, 596px);
  max-height: 92px;
}

.brand-copy {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--muted);
}

.brand-copy h1,
.page-intro h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.03em;
}

.brand-copy h1 a { color: var(--ink); text-decoration: none; }
.brand-copy p { max-width: 54ch; margin: 10px 0 0; color: var(--muted); }

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px;
  background: var(--accent);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.main-nav a {
  color: #172100;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  padding: 6px 10px;
  border-radius: 999px;
}

.main-nav a:hover { background: rgba(255,255,255,0.45); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  padding: 24px;
}

.content-column { min-width: 0; }

.page-intro {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.page-intro.compact {
  margin-bottom: 12px;
}

.page-intro.compact h2 {
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-intro.compact p:last-child {
  font-size: 1.05rem;
  max-width: 72ch;
}

.page-intro p:last-child { margin-bottom: 0; color: var(--muted); max-width: 64ch; }

.story-card,
.sidebar-box,
.article-frame,
.audio-card,
.author-card,
.section-card {
  background: var(--card);
  border: 1px solid rgba(36,36,36,0.08);
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.05);
}

.story-card {
  padding: 20px 22px;
  margin-bottom: 16px;
}

.story-card h2 {
  margin: 8px 0 12px;
  font-size: 1.5rem;
  line-height: 1.2;
}

.story-card h2 a { text-decoration: none; color: var(--ink); }
.story-card p { margin: 0; color: #414141; }

.story-meta,
.story-footer,
.story-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  font-size: 0.83rem;
}

.story-meta { color: var(--muted); }
.story-rubrique {
  background: rgba(184, 212, 112, 0.22);
  color: #283106;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.story-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.story-tags { margin-top: 12px; }
.story-tags span {
  font-size: 0.78rem;
  background: #f1f2ea;
  padding: 4px 8px;
  border-radius: 999px;
}

.article-frame { padding: 28px; }
.article-header h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
}
.article-header h2 {
  margin: 0;
  color: var(--muted);
  font-style: italic;
  font-size: 1.05rem;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  color: var(--muted);
  font-size: 0.9rem;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.article-body {
  font-size: 1.04rem;
}
.article-body p { margin: 1.1em 0; }
.article-body h3 {
  margin-top: 2em;
  margin-bottom: 0.5em;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inline-media {
  margin: 1.4rem 0;
  background: #f2f4eb;
  padding: 10px;
}
.inline-media img { width: 100%; height: auto; }
.align-left { max-width: 58%; float: left; margin-right: 20px; }
.align-right { max-width: 58%; float: right; margin-left: 20px; }
.align-center { max-width: 100%; }

.media-audio figcaption,
.media-file figcaption {
  font-weight: 700;
  margin-bottom: 10px;
}

.media-audio audio {
  width: 100%;
}

.media-audio.pending,
.media-file.pending {
  border: 1px dashed rgba(36,36,36,0.25);
  background: linear-gradient(180deg, rgba(184,212,112,0.18), rgba(255,255,255,0.9));
}

.media-video {
  padding: 0;
  overflow: hidden;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
}

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

.attachments,
.comments,
.section-grid,
.audio-grid,
.author-grid {
  margin-top: 28px;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.article-nav a,
.article-nav span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--accent-dark);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.article-nav span {
  color: var(--muted);
  font-weight: 400;
}

.article-nav .next-link {
  text-align: right;
}

.forum-divider {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 3px double rgba(36,36,36,0.18);
}

.attachments h3,
.comments h3,
.section-grid h3,
.audio-grid h3,
.author-grid h3 {
  margin: 0 0 12px;
}

.attachment-list,
.comments-list,
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.attachment-list li,
.comments-list li,
.sidebar-list li {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.attachment-list li:first-child,
.comments-list li:first-child,
.sidebar-list li:first-child { border-top: 0; padding-top: 0; }

.audio-card,
.author-card,
.section-card {
  padding: 18px 20px;
  margin-bottom: 14px;
}

.audio-card h3,
.author-card h3,
.section-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-box {
  padding: 18px;
}

.sidebar-box h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-box.accent {
  background: linear-gradient(180deg, rgba(184,212,112,0.26), rgba(255,255,255,1));
}

.small-note { color: var(--muted); font-size: 0.82rem; }
code {
  background: rgba(0,0,0,0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.site-footer {
  padding: 18px 24px 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 920px) {
  .site-header,
  .layout { grid-template-columns: 1fr; }
  .brand-mark {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 22px;
  }
  .brand-mark img { max-width: 100%; }
  .sidebar { order: -1; }
}

@media (max-width: 640px) {
  .page-shell { width: min(calc(100% - 16px), var(--max)); margin: 8px auto; }
  .brand-copy,
  .layout,
  .article-frame { padding: 18px; }
  .article-nav {
    flex-direction: column;
    align-items: flex-start;
  }
  .article-nav .next-link { align-self: flex-end; }
  .align-left,
  .align-right { float: none; max-width: 100%; margin: 1.2rem 0; }
}
