/*
 * The blog of hunbroken.app (/blog, /blog/<slug>) — the landing's own look (index.html): its tokens,
 * its night header, its white cards, Archivo, light or dark as the reader's system is. The pages are
 * written by `pnpm blog:build` (tools/blog/); this file is hand-written.
 */
:root {
  --bg: #f5f3fa;
  --bg2: #ece8f7;
  --surface: #ffffff;
  --ink: #12101a;
  --ink2: #4a465c;
  --mut: #8a869a;
  --line: #e4e0ee;
  --accent: #6c4bf4;
  --accent-ink: #4e2fd6;
  --accent-soft: #efebfe;
  --on-accent: #ffffff;
  --night: #12101a;
  --on-night: #ffffff;
  --on-night2: #b5b0c6;
  --shadow: 0 1px 2px rgba(18, 16, 26, 0.04), 0 10px 30px rgba(48, 28, 140, 0.08);
  --f: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gut-l: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0d16;
    --bg2: #16131f;
    --surface: #1b1826;
    --ink: #f3f1f9;
    --ink2: #bdb8cc;
    --mut: #8c879e;
    --line: #2b2739;
    --accent: #8a6fff;
    --accent-ink: #b7a5ff;
    --accent-soft: #251e45;
    --night: #07060b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 34px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0d16;
  --bg2: #16131f;
  --surface: #1b1826;
  --ink: #f3f1f9;
  --ink2: #bdb8cc;
  --mut: #8c879e;
  --line: #2b2739;
  --accent: #8a6fff;
  --accent-ink: #b7a5ff;
  --accent-soft: #251e45;
  --night: #07060b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 34px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a {
  color: var(--accent-ink);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}
img {
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3 {
  font-family: var(--f);
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}
h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  font-weight: 900;
}
h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.05;
  font-weight: 900;
}
h3 {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}
p {
  margin: 0;
  text-wrap: pretty;
}
.wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding-left: var(--gut-l);
  padding-right: var(--gut-r);
}

/* header — la nuit du hero */
.hdr {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(11, 9, 20, 0.92);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hdr .wrap {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-variation-settings: "wdth" 118;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: block;
}
.nav {
  display: flex;
  gap: 26px;
  font-weight: 600;
  font-size: 15px;
  margin-left: auto;
}
.nav a {
  color: #bdb8cc;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: #fff;
  text-decoration: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 22px;
  border-radius: 23px;
  border: 0;
  font: 700 15px var(--f);
  white-space: nowrap;
}
.btn:hover {
  text-decoration: none;
}
.hdr .btn {
  background: #fff;
  color: #12101a;
  height: 40px;
  padding: 0 18px;
}
@media (max-width: 760px) {
  .nav .opt {
    display: none;
  }
  .hdr .wrap {
    gap: 16px;
  }
}
@media (max-width: 420px) {
  .hdr .btn {
    display: none;
  }
}

/* fil d'Ariane, en-têtes de page */
.page {
  padding-block: clamp(32px, 5vw, 60px) 0;
}
.crumb {
  font-size: 14px;
  font-weight: 700;
  color: var(--mut);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
}
.crumb a {
  color: var(--mut);
}
.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink2);
  margin-top: 16px;
  max-width: 38em;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--mut);
}
.meta .c {
  color: var(--accent-ink);
}

/* cartes d'articles — celles de l'accueil */
.posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.post {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  transition: transform 0.2s;
}
.post:hover {
  text-decoration: none;
  transform: translateY(-2px);
}
.post .img {
  display: block;
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--bg2);
}
.post .b {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}
.post .meta {
  margin: 0;
  font-size: 12.5px;
}
.post h2,
.post h3 {
  font-size: 19px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.post p {
  color: var(--ink2);
  font-size: 15px;
}
@media (max-width: 960px) {
  .posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .posts {
    grid-template-columns: minmax(0, 1fr);
  }
}
.cat {
  margin-top: clamp(40px, 5vw, 64px);
}

/* article */
.article {
  max-width: 740px;
}
.cover {
  display: block;
  width: 100%;
  aspect-ratio: 16/8;
  object-fit: cover;
  border-radius: 26px;
  background: var(--bg2);
  margin: 28px 0 8px;
}
.toc {
  margin: 28px 0 0;
  padding: 18px 22px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.toc b {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mut);
  margin-bottom: 8px;
}
.toc ol {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-weight: 600;
}
.body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink2);
  margin-top: 30px;
}
.body h2 {
  font-size: clamp(24px, 3vw, 30px);
  margin: 42px 0 12px;
  letter-spacing: -0.03em;
}
.body h3 {
  margin: 28px 0 8px;
}
.body p + p {
  margin-top: 16px;
}
.body ul,
.body ol {
  padding-left: 22px;
  margin: 14px 0;
}
.body li {
  margin: 7px 0;
}
.body strong {
  color: var(--ink);
}
.body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.body .table {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.body th,
.body td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.body th {
  color: var(--ink);
  font-weight: 800;
  background: var(--bg2);
}
.body tr:last-child td {
  border-bottom: 0;
}
.body .note {
  margin: 22px 0;
  padding: 18px 22px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--ink);
}
.box-cta {
  margin-top: 44px;
  padding: 24px;
  border-radius: 24px;
  background: var(--accent-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.box-cta p {
  font-weight: 800;
  font-size: 19px;
  color: var(--ink);
  max-width: 34ch;
  letter-spacing: -0.01em;
}
.related {
  margin-top: clamp(56px, 7vw, 88px);
}
.related h2 {
  margin-bottom: 22px;
}

/* boutons des stores */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  height: 56px;
  padding: 0 20px 0 16px;
  border-radius: 15px;
  background: var(--night);
  color: var(--on-night);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.store:hover {
  text-decoration: none;
  color: var(--on-night);
}
.store svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.store small {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--on-night2);
  line-height: 1.1;
}
.store b {
  display: block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* appel final et pied de page */
.final {
  margin-top: clamp(64px, 8vw, 104px);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 36px;
  padding: clamp(28px, 5vw, 56px);
}
.final h2 {
  color: #fff;
}
.final p {
  color: rgba(255, 255, 255, 0.86);
  margin-top: 12px;
  font-size: 18px;
}
.final .stores {
  margin-top: 24px;
}
.foot {
  border-top: 1px solid var(--line);
  margin-top: clamp(64px, 8vw, 104px);
}
.foot .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-block: 48px 28px;
}
.foot .brand {
  color: var(--ink);
}
.foot h4 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mut);
}
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.foot ul a {
  color: var(--ink2);
  font-weight: 600;
  font-size: 15px;
}
.foot .about {
  color: var(--ink2);
  font-size: 15px;
  margin-top: 14px;
  max-width: 32ch;
}
.foot .legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 20px 36px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--mut);
  font-weight: 500;
}
@media (max-width: 800px) {
  .foot .wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .foot .wrap > div:first-child {
    grid-column: 1/-1;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}
