/* Blog page styles. Colors and radii copied from frontend/src/index.css, so the blog looks like the
   rest of Projance without depending on the app's compiled CSS. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/blog/assets/fonts/inter-latin-400-normal-da03732a27e16543f09d6a6a62b0cdd4.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/blog/assets/fonts/inter-latin-500-normal-51205681a1ba304816fc629e8989256b.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/blog/assets/fonts/inter-latin-600-normal-2ede57db1a3a5f41f40467e7a43a1dd4.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/blog/assets/fonts/inter-latin-700-normal-8ca0a51552960933d0fd52c19175cbe9.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);
  --muted-foreground: oklch(0.44 0.01 265);
  --border: oklch(0.91 0.008 260);
  --brand-surface: oklch(0.975 0.015 260);
  --success: oklch(0.51 0.14 149);
  --success-subtle: oklch(0.96 0.04 149);
  --warning-foreground: oklch(0.28 0.08 75);
  --warning-subtle: oklch(0.97 0.04 85);
  --radius: 0.625rem;
}

*, *::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: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
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; }

.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 16px; }

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

/* Header: same look as the app's */
header.site {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--background) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
header.site nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.logo img { height: 44px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--muted-foreground); }
.nav-links a:not(.btn):hover, .nav-links a.active { color: var(--foreground); }
.nav-links a.active { font-weight: 500; }
@media (max-width: 640px) {
  .nav-links .hide-sm { display: none; }
  .logo img { height: 36px; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: calc(var(--radius) - 2px); font-weight: 500; font-size: 14px; line-height: 1.2;
  padding: 8px 14px; 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 { padding: 11px 18px; font-size: 15px; }

/* Shared elements */
.eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--primary-strong); }
h1 { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.15; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
.lede { color: var(--muted-foreground); max-width: 60ch; margin: 0; font-size: 17px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.cat { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; color: var(--primary-strong); background: var(--primary-subtle); }
.cat-plateforme { color: var(--success); background: var(--success-subtle); }
.cat-prestataires { color: var(--warning-foreground); background: var(--warning-subtle); }
.cover { overflow: hidden; background: var(--primary-subtle); aspect-ratio: 1200 / 630; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.excerpt { margin: 0; color: var(--muted-foreground); font-size: 14.5px; }

/* Article list */
.blog-head { background: var(--brand-surface); border-bottom: 1px solid var(--border); }
.blog-head .wrap { padding-block: 40px 28px; display: grid; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip {
  font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--background); color: var(--foreground);
}
.chip[aria-pressed="true"] { background: var(--primary-strong); border-color: var(--primary-strong); color: var(--primary-foreground); }
.list-body { padding-block: 32px 56px; display: grid; gap: 32px; }
.empty { color: var(--muted-foreground); }

.featured {
  display: grid; grid-template-columns: 1.2fr 1fr;
  border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); overflow: hidden;
  text-decoration: none; background: var(--background);
}
.featured .txt { padding: 28px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.featured h2 { font-size: 26px; line-height: 1.2; margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
.read-more { font-size: 14px; font-weight: 500; color: var(--primary-strong); }
.featured:hover h2, .card:hover h3 { color: var(--primary-strong); }
@media (max-width: 760px) {
  .featured { grid-template-columns: 1fr; }
  .featured .txt { padding: 20px; }
  .featured h2 { font-size: 22px; }
}

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
@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: 12px; text-decoration: none; }
.card .cover { border-radius: var(--radius); border: 1px solid var(--border); }
.card h3 { margin: 0; font-size: 18px; line-height: 1.3; text-wrap: balance; }

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

/* Article */
.article-top { padding-block: 32px 0; display: grid; gap: 16px; max-width: 46rem; margin-inline: auto; }
.crumbs { font-size: 13px; color: var(--muted-foreground); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--foreground); text-decoration: underline; }
.byline { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; }
.byline small { display: block; color: var(--muted-foreground); font-size: 13px; font-weight: 400; }
.avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--primary-strong); color: var(--primary-foreground); display: grid; place-items: center; font-weight: 600; }
.hero-cover { max-width: 46rem; margin: 28px auto 0; }
.hero-cover .cover { border-radius: calc(var(--radius) + 4px); }

.prose { max-width: 42rem; margin-inline: auto; padding-block: 32px 16px; font-size: 17px; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: 24px; line-height: 1.3; margin: 1.7em 0 .5em; letter-spacing: -0.01em; text-wrap: balance; }
.prose h3 { font-size: 19px; line-height: 1.35; margin: 1.5em 0 .4em; }
.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.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--primary);
  font-size: 19px; line-height: 1.55; color: var(--foreground); font-weight: 500;
}
.prose blockquote p { margin: 0 0 .6em; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { font-size: .9em; background: var(--brand-surface); padding: 1px 5px; border-radius: 4px; }

.cta {
  max-width: 42rem; margin: 16px auto 64px; padding: 24px; border-radius: calc(var(--radius) + 4px);
  background: var(--primary-subtle); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.cta p { margin: 0; max-width: 36ch; }
.cta strong { display: block; font-size: 17px; margin-bottom: 2px; }

.related { border-top: 1px solid var(--border); padding-block: 36px 56px; }
.related h2 { font-size: 20px; margin: 0 0 20px; }

/* Footer: same content as the app's */
footer.site { border-top: 1px solid var(--border); background: var(--brand-surface); font-size: 14px; }
.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: 44px; width: auto; }
.footer-brand p { margin: 0; color: var(--muted-foreground); }
footer.site nav { display: flex; flex-direction: column; gap: 2px; min-width: 12rem; }
footer.site h2 { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
footer.site nav a { padding-block: 6px; color: var(--muted-foreground); 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: 12px; color: var(--muted-foreground); }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--foreground); text-decoration: underline; }
