/* devlog.greynya.com : identité du pôle Communication (fond sombre, palette désaturée, logo blanc cassé), polices servies par le site. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/archivo-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Big Shoulders Stencil";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/big-shoulders-stencil-display-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  --night: #141513;
  --soot: #1c1d1a;
  --ash: #2b2d29;
  --line: #2f312c;
  --dust: #8b8c83;
  --bone: #d6d4c8;
  --beam: #ece3bf;
  --verdigris: #8a9a8c;
  --mud: #8a7d6b;
  --text: 720px;
  --media: 800px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: var(--beam); text-underline-offset: 3px; }
a:hover { color: #fff; }
img, video, iframe { max-width: 100%; }
img, video { height: auto; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--soot); padding: 1px 5px; border-radius: 4px; }
mark { background: #6b3a2b; color: #fff; padding: 0 4px; }
.muted { color: var(--dust); }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 12px; background: var(--bone); color: var(--night); padding: 6px 10px; z-index: 10; }

/* ---------- En-tête du site ---------- */
.top {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 16px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--bone); }
.wordmark { font-family: "Big Shoulders Stencil", "Archivo", sans-serif; font-weight: 900; font-size: 34px; letter-spacing: .08em; line-height: 1; color: var(--bone); }
.sub { font-size: 13px; text-transform: uppercase; letter-spacing: .2em; color: var(--dust); }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.top nav a, .top nav span { color: var(--dust); text-decoration: none; padding: 4px 0; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--bone); box-shadow: inset 0 -2px 0 var(--bone); }

main { max-width: 1120px; margin: 0 auto; padding: 0 16px 48px; }
h1 { font-family: "Big Shoulders Stencil", "Archivo", sans-serif; font-weight: 900; font-size: clamp(40px, 7vw, 64px); line-height: 1; letter-spacing: .02em; margin: 8px 0 12px; overflow-wrap: anywhere; }
h2 { font-size: 24px; line-height: 1.25; margin: 34px 0 10px; }
h3, h4 { font-size: 19px; line-height: 1.3; margin: 26px 0 8px; }
.lead { font-size: 19px; color: var(--bone); margin: 0 0 18px; }
.empty { color: var(--dust); }
.meta { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--dust); }
.meta a, .meta .kind { color: var(--verdigris); text-decoration: none; }

/* ---------- Pastilles d'initiales (aucune photo) ---------- */
.initials { display: inline-flex; flex: none; }
.initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ash);
  border: 2px solid var(--night);
  color: var(--beam);
  font-family: "Big Shoulders Stencil", "Archivo", sans-serif;
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
}
.initials .initial + .initial { margin-left: -9px; }
.initials .initial:nth-child(3n + 2) { background: #33392f; }
.initials .initial:nth-child(3n) { background: #3a3530; }
.authors { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; color: var(--bone); }

/* ---------- Listes : le dernier en grand, deux cartes, des lignes datées ---------- */
.listhead { max-width: var(--media); margin: 18px auto 22px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.filters a { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--dust); text-decoration: none; font-size: 14px; line-height: 1; }
.filters a:hover { color: var(--bone); border-color: var(--dust); }
.filters a[aria-current="page"] { background: var(--bone); border-color: var(--bone); color: var(--night); }
.filters.tags { margin-bottom: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--ash); color: var(--bone); font-size: 13px; line-height: 1; text-decoration: none; }
a.tag:hover { background: #3a3c37; color: #fff; }

.feat { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: var(--soot); min-height: 380px; display: flex; align-items: flex-end; }
.feat-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 21, 19, .05) 0%, rgba(20, 21, 19, .55) 45%, rgba(20, 21, 19, .96) 100%); }
.feat.nocover { min-height: 0; }
.feat.nocover::after { display: none; }
.feat-body { position: relative; z-index: 1; padding: 28px 30px; max-width: var(--text); }
.feat h2 { font-family: "Big Shoulders Stencil", "Archivo", sans-serif; font-weight: 900; font-size: clamp(34px, 5vw, 48px); line-height: 1; letter-spacing: .02em; margin: 8px 0 10px; }
.feat h2 a, .card h3 a { color: var(--bone); text-decoration: none; }
.feat h2 a:hover, .card h3 a:hover { color: #fff; text-decoration: underline; }
.feat .summary { margin: 0 0 14px; font-size: 17px; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; margin-right: 6px; border-radius: 999px; background: var(--bone); color: var(--night); font-size: 12px; font-weight: 700; letter-spacing: .06em; line-height: 1; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 22px 0 0; }
.card { margin: 0; }
.card .thumb { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--soot); aspect-ratio: 1200 / 630; }
.card .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .meta { margin-top: 12px; }
.card h3 { margin: 4px 0 6px; font-size: 22px; }
.card .summary { margin: 0; color: var(--dust); font-size: 15px; }

.more { margin: 40px 0 8px; font-size: 20px; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 64px 120px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dateblock { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; color: var(--dust); }
.dateblock b { font-family: "Big Shoulders Stencil", "Archivo", sans-serif; font-weight: 900; font-size: 34px; color: var(--bone); }
.dateblock span { margin-top: 5px; font-size: 11px; letter-spacing: .08em; }
.rowthumb { display: block; width: 120px; aspect-ratio: 1200 / 630; border-radius: 8px; overflow: hidden; background: var(--soot); border: 1px solid var(--line); }
.rowthumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rowtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rowtext a { color: var(--bone); font-weight: 700; text-decoration: none; }
.rowtext a:hover { text-decoration: underline; }
.rowsum { color: var(--dust); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowkind { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--verdigris); }

.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; max-width: var(--media); margin: 28px auto 0; font-size: 15px; color: var(--dust); }
.pager a:last-child { justify-self: end; }

/* ---------- Article : la couverture floutée derrière le titre ---------- */
/* Pleine largeur de la fenêtre, quelle que soit la colonne (body coupe le débordement horizontal). */
.hero { position: relative; margin: 0 calc(50% - 50vw); padding: 70px 16px 46px; overflow: hidden; }
.hero-img { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); max-width: none; object-fit: cover; filter: blur(6px) saturate(.6); opacity: .45; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 21, 19, .35) 0%, rgba(20, 21, 19, .75) 60%, var(--night) 100%); }
.hero.nocover { padding-top: 34px; }
.hero.nocover::after { display: none; }
.hero-in { position: relative; z-index: 1; max-width: var(--text); margin: 0 auto; }
.hero h1 { margin: 10px 0 14px; }
.hero .lead { margin-bottom: 20px; }
.post .updated { color: var(--beam); }

.prose { max-width: var(--text); margin: 0 auto; overflow-wrap: anywhere; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose .table { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 4px; }
.prose blockquote { border-left: 3px solid var(--ash); padding-left: 16px; color: var(--dust); }
.prose pre { background: var(--soot); padding: 12px 14px; border-radius: 10px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.prose .table { overflow-x: auto; }
.prose table { border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.prose .footnote { font-size: 14px; color: var(--dust); }

/* Sections signées. */
.sec { padding: 26px 0 8px; border-top: 1px solid var(--line); margin-top: 26px; }
.prose > .sec:first-child { border-top: 0; margin-top: 0; padding-top: 8px; }
.sec > h2 { margin: 0 0 6px; font-size: 26px; }
.by { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 14px; color: var(--dust); }
.by .initial { width: 24px; height: 24px; font-size: 13px; border-width: 0; }

/* Médias plus larges que le texte, coins arrondis ; deux images côte à côte. */
.prose figure.media, .prose .pair { width: min(var(--media), calc(100vw - 32px)); margin: 26px 0; margin-left: calc((100% - min(var(--media), calc(100vw - 32px))) / 2); }
.prose figure.media img, .prose figure.media video { display: block; width: 100%; border-radius: 12px; background: var(--soot); }
.prose figure.yt iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; background: var(--soot); }
.prose figcaption { font-size: 14px; color: var(--dust); margin-top: 8px; }
.prose .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.prose .pair figure.media { width: auto; margin: 0; }
.prose .pair:has(> figure:only-child) { grid-template-columns: minmax(0, 1fr); }
.prose .embed-box { padding: 14px; border: 1px dashed var(--ash); border-radius: 12px; }
.prose .embed-box p { margin: 8px 0 0; font-size: 14px; }

/* Fin d'article. */
.post > .tags { max-width: var(--text); margin: 26px auto 0; }
.discuss { max-width: var(--text); margin: 34px auto 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--soot); }
.discuss h2 { margin: 0 0 6px; font-size: 22px; }
.discuss p { margin: 0 0 14px; color: var(--dust); }
.discuss p:last-child { margin: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; border-radius: 999px; background: var(--bone); color: var(--night); font-weight: 700; text-decoration: none; line-height: 1; }
.button:hover { background: #fff; color: var(--night); }
.neighbours { max-width: var(--text); margin: 28px auto 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.neighbours a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--bone); text-decoration: none; font-weight: 700; }
.neighbours a span { font-size: 12px; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; color: var(--dust); }
.neighbours a.newer { text-align: right; }
.neighbours a:hover { border-color: var(--dust); }

.legal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 0 0 18px; }
.legal dt { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--dust); margin-top: 10px; }
.legal dd { margin: 0; }

.foot { max-width: var(--media); margin: 0 auto; padding: 22px 16px 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--dust); }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--bone); }

/* ---------- Téléphone : une colonne ---------- */
@media (max-width: 720px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .feat { min-height: 300px; }
  .feat-body { padding: 20px; }
  .row { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
  .rowthumb, .rowkind { display: none; }
  .rowsum { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .prose .pair { grid-template-columns: minmax(0, 1fr); }
  .neighbours { grid-template-columns: minmax(0, 1fr); }
  .neighbours a.newer { text-align: left; }
  .hero { padding-top: 46px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .wordmark { font-size: 28px; }
  .top nav { gap: 2px 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
