/* Blog page styles, after the design passport (docs/passeport-design.md): Space Grotesk titles,
   Plus Jakarta Sans text, ink and slate on white, hairlines, one blue for what to do next. Colors
   copied from frontend/src/index.css, so the blog looks like the rest of Projance without
   depending on the app's compiled CSS. Fonts self-hosted, Latin subset only. */

@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/blog/assets/fonts/plus-jakarta-sans-latin-400-normal-503e7cbdb4848280b74a437e8fa00809.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/blog/assets/fonts/plus-jakarta-sans-latin-500-normal-e5e6761eaecbb78ddf898f03b9092952.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/blog/assets/fonts/plus-jakarta-sans-latin-600-normal-79e62f3332cd59b418eaefaeacab09e5.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('/blog/assets/fonts/space-grotesk-latin-500-normal-ab4861869c91f3c339f3a9f0a0d5a0b5.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --background: oklch(1 0 0);
  --foreground: oklch(0.17 0.02 260);
  --primary: oklch(0.55 0.21 260);
  --primary-hover: oklch(0.49 0.21 260);
  --primary-strong: oklch(0.45 0.19 260);
  --primary-subtle: oklch(0.96 0.025 260);
  --primary-foreground: oklch(0.99 0 0);
  --slate: oklch(0.47 0.035 255);
  --border: oklch(0.91 0.008 260);
  --input: oklch(0.89 0.01 260);
  --muted: oklch(0.97 0.006 260);
  --brand-surface: oklch(0.975 0.015 260);
  --radius: 0.625rem;
  --display: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 640px) { body { font-size: 16px; } }
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }

/* The site's 1 200 px column. */
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 640px) { .wrap { padding-inline: 40px; } }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--background); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* Header: the site's visitor header. */
header.site {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--background) 90%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
header.site nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo img { height: 40px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 14.5px; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--slate); padding-block: 6px; }
.nav-links a:not(.btn):hover, .nav-links a.active { color: var(--foreground); }
.nav-links a.active { box-shadow: inset 0 -2px 0 var(--foreground); }
.nav-links .signin { margin-left: 16px; }
@media (max-width: 760px) {
  .nav-links { gap: 16px; }
  .nav-links .hide-sm { display: none; }
  .logo img { height: 34px; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 8px; font-weight: 600; font-size: 14.5px; line-height: 1.2;
  min-height: 40px; padding: 8px 18px; text-decoration: none; border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-lg { min-height: 48px; padding: 12px 24px; font-size: 15px; }

/* Shared elements */
.label { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--slate); }
.label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex: none; }
h1 { font-size: clamp(34px, 4vw, 48px); line-height: 1.08; margin: 0; }
.lede { color: var(--slate); max-width: 34em; margin: 0; font-size: 16px; line-height: 1.55; }
@media (min-width: 640px) { .lede { font-size: 18px; } }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; color: var(--slate); font-variant-numeric: tabular-nums; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.cat { font-weight: 600; color: var(--primary-strong); }
.cover { overflow: hidden; background: var(--muted); aspect-ratio: 1200 / 630; border-radius: var(--radius); border: 1px solid var(--border); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.excerpt { margin: 0; color: var(--slate); font-size: 15px; }
.read-more { font-size: 15px; font-weight: 600; color: var(--primary-strong); }

/* Article list */
.blog-head { border-bottom: 1px solid var(--border); }
.blog-head .wrap { padding-top: 56px; display: grid; gap: 18px; }
.blog-head h1 { max-width: 18em; }
.tabs { display: flex; gap: 28px; overflow-x: auto; margin-top: 22px; margin-bottom: -1px; }
.tab {
  font: inherit; font-size: 14.5px; font-weight: 500; padding: 12px 0; cursor: pointer; white-space: nowrap;
  border: 0; background: none; color: var(--slate); min-height: 44px;
}
.tab:hover { color: var(--foreground); }
.tab[aria-pressed="true"] { color: var(--foreground); box-shadow: inset 0 -2px 0 var(--foreground); }
.blog-head .wrap:not(:has(.tabs)) { padding-bottom: 48px; }
.list-body { padding-block: 48px 88px; display: grid; gap: 48px; }
.empty { color: var(--slate); margin: 0; }

.feat { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; text-decoration: none; }
.feat h2 { font-size: clamp(28px, 3vw, 36px); line-height: 1.12; margin: 14px 0; }
.feat .excerpt { font-size: 16px; margin-bottom: 22px; }
.feat:hover h2, .card:hover h3 { color: var(--primary-strong); }
@media (max-width: 900px) { .feat { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; border-top: 1px solid var(--foreground); padding-top: 20px; }
.card h3 { margin: 0; font-size: 21px; line-height: 1.3; letter-spacing: -0.01em; }

@media (prefers-reduced-motion: no-preference) {
  .card .cover img, .feat .cover img { transition: transform .35s ease; }
  .card:hover .cover img, .feat:hover .cover img { transform: scale(1.03); }
}

/* Article */
.article-top .wrap { max-width: 880px; padding-top: 44px; display: grid; gap: 18px; }
.crumbs { font-size: 14px; color: var(--slate); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--foreground); text-decoration: underline; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 10px; padding-block: 18px; border-top: 1px solid var(--foreground); border-bottom: 1px solid var(--border); }
.author { font-size: 15px; font-weight: 600; }
.author small { display: block; color: var(--slate); font-size: 14px; font-weight: 400; }
.byline .meta { margin-left: auto; }
@media (max-width: 600px) { .byline .meta { margin-left: 0; width: 100%; } }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--primary-subtle); color: var(--primary-strong); display: grid; place-items: center; font-weight: 600; }
.hero-cover { max-width: 1040px; margin-top: 36px; }
.hero-cover .cover { border-radius: 12px; }

.prose { max-width: 720px; margin-inline: auto; padding-block: 56px 72px; font-size: 16px; line-height: 1.7; }
@media (min-width: 640px) { .prose { font-size: 17px; } }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: 26px; line-height: 1.2; margin: 1.9em 0 .6em; }
@media (min-width: 640px) { .prose h2 { font-size: 30px; } }
.prose h3 { font-size: 21px; line-height: 1.3; letter-spacing: -0.01em; margin: 1.6em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .35em; }
/* The editor wraps each list item in a paragraph: no extra margin. */
.prose li > p { margin: 0; }
.prose a { color: var(--primary-strong); }
.prose img { border-radius: var(--radius); margin: 1.4em 0; }
.prose blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--primary);
  font-family: var(--display); font-weight: 500; font-size: 21px; line-height: 1.35; letter-spacing: -0.01em; color: var(--foreground);
}
@media (min-width: 640px) { .prose blockquote { font-size: 23px; } }
.prose blockquote p { margin: 0 0 .6em; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { font-size: .9em; background: var(--muted); padding: 1px 5px; border-radius: 4px; }

/* Closing statement, as on the public pages: the sentence, then what to do. */
.cta { border-top: 1px solid var(--border); }
.cta-in { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px 56px; align-items: end; padding-block: 64px 80px; }
@media (max-width: 900px) { .cta-in { grid-template-columns: minmax(0, 1fr); padding-block: 48px 56px; } }
.cta .big { margin: 0; font-family: var(--display); font-weight: 500; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
@media (min-width: 640px) { .cta .big { font-size: 32px; } }
.cta .big strong { font-weight: 500; }
.cta .big span { color: var(--slate); }
.cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.cta-link { color: var(--primary-strong); font-weight: 600; font-size: 15px; text-decoration: none; }
.cta-link:hover { text-decoration: underline; }

/* "À lire aussi": lines on hairlines under a dark rule. */
.related { border-top: 1px solid var(--border); }
.related .wrap { padding-block: 64px 88px; }
.related h2 { font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; margin: 0 0 24px; }
.lines { border-top: 1px solid var(--foreground); }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; align-items: center; padding-block: 20px; border-bottom: 1px solid var(--border); text-decoration: none; }
.line strong { font-weight: 600; }
.line span { grid-column: 1; color: var(--slate); font-size: 14.5px; }
.line em { grid-column: 2; grid-row: 1 / 3; font-style: normal; color: var(--primary-strong); font-weight: 600; font-size: 14.5px; }
.line:hover strong { color: var(--primary-strong); }

/* Footer: the site's footer. */
footer.site { border-top: 1px solid var(--border); background: var(--brand-surface); font-size: 14.5px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 40px 64px; justify-content: space-between; padding-block: 48px; }
.footer-brand { display: grid; gap: 12px; align-content: start; max-width: 20rem; }
.footer-brand img { height: 40px; width: auto; }
.footer-brand p { margin: 0; color: var(--slate); font-size: 14px; }
.footer-navs { display: grid; grid-template-columns: repeat(3, auto); gap: 32px 48px; }
@media (max-width: 640px) { .footer-navs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
footer.site nav { display: flex; flex-direction: column; gap: 2px; }
footer.site h2 { font-family: inherit; letter-spacing: 0; font-size: 14.5px; font-weight: 600; margin: 0 0 6px; }
footer.site nav a { padding-block: 6px; color: var(--slate); text-decoration: none; }
footer.site nav a:hover { color: var(--foreground); }
.footer-bottom { border-top: 1px solid var(--border); }
.footer-bottom p { margin-block: 0; padding-block: 20px; font-size: 13px; color: var(--slate); }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--foreground); text-decoration: underline; }
