*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  --bg:           #07090d;
  --bg-2:         #0b0e14;
  --panel:        #0f131b;
  --panel-2:      #131826;
  --panel-hi:     #181e2c;
  --line:         rgba(255,255,255,.06);
  --line-2:       rgba(255,255,255,.10);
  --line-hi:      rgba(255,255,255,.18);

  --fg:           #e7ecf3;
  --fg-mid:       #9aa4b2;
  --fg-dim:       #5b6473;
  --fg-faint:     #3d4452;

  --acc:          oklch(0.86 0.20 145);
  --acc-hi:       oklch(0.92 0.22 145);
  --acc-glow:     oklch(0.86 0.20 145 / 0.35);
  --acc-dim:      oklch(0.40 0.10 145);
  --acc-bg:       oklch(0.86 0.20 145 / 0.10);

  --radius: 6px;
  --font-head: 'Geist', system-ui, sans-serif;
  --font-body: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
}

html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 56px 56px;
}

a { color: var(--acc); text-decoration: none; }
a:hover { color: var(--acc-hi); }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.02em; font-weight: 600; color: var(--fg); }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ── */
.topnav {
  border-bottom: 1px solid var(--line); padding: 20px 0; margin-bottom: 8px;
}
.topnav .wrap { max-width: 780px; display: flex; align-items: center; justify-content: space-between; }
.topnav .brand { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; color: var(--fg); font-weight: 500; }
.topnav .brand span { color: var(--acc); }
.topnav .back { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-dim); letter-spacing: 0.03em; }
.topnav .back:hover { color: var(--acc); }

/* ── Blog index ── */
.index-hero { padding: 56px 0 40px; }
.index-hero .kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: 14px; }
.index-hero h1 { font-size: 30px; line-height: 1.3; max-width: 560px; }
.index-hero p { color: var(--fg-mid); margin-top: 14px; max-width: 540px; font-size: 15px; }

.post-list { display: flex; flex-direction: column; gap: 2px; padding: 24px 0 80px; }
.post-card {
  display: block; padding: 22px 20px; border-radius: var(--radius);
  border: 1px solid transparent; transition: all .15s ease; position: relative;
}
.post-card:hover { background: var(--panel); border-color: var(--line); transform: translateX(2px); }
.post-card .post-date { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-dim); letter-spacing: 0.06em; margin-bottom: 8px; }
.post-card h2 { font-size: 19px; color: var(--fg); margin-bottom: 6px; }
.post-card:hover h2 { color: var(--acc-hi); }
.post-card p { color: var(--fg-mid); font-size: 13.5px; line-height: 1.55; }
.post-card .tags { display: flex; gap: 6px; margin-top: 12px; }
.post-card .tag {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--acc); background: var(--acc-bg); border: 1px solid var(--acc-dim);
  padding: 2px 8px; border-radius: 999px;
}

/* ── Article ── */
.article-header { padding: 48px 0 24px; }
.article-header .kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: 16px; }
.article-header h1 { font-size: 32px; line-height: 1.28; }
.article-header .dek { color: var(--fg-mid); font-size: 16px; margin-top: 16px; line-height: 1.55; }
.article-header .meta { font-family: var(--font-mono); font-size: 11px; color: var(--fg-faint); margin-top: 20px; letter-spacing: 0.03em; }

article.prose { padding: 8px 0 80px; }
article.prose h2 {
  font-size: 20px; margin: 48px 0 16px; padding-top: 24px; border-top: 1px solid var(--line);
}
article.prose p { color: var(--fg-mid); margin-bottom: 18px; font-size: 15.5px; line-height: 1.75; }
article.prose strong { color: var(--fg); font-weight: 600; }
article.prose ul { margin: 0 0 18px 20px; color: var(--fg-mid); }
article.prose li { margin-bottom: 8px; line-height: 1.65; font-size: 15px; }
article.prose li::marker { color: var(--acc); }

/* ── Cadres photo, style polaroid décalé ── */
.photo-pair {
  display: flex; gap: 28px; flex-wrap: wrap; justify-content: center;
  margin: 56px 0; padding: 0 4px;
}
.photo-frame {
  background: #f4f4f2; padding: 10px 10px 34px; border-radius: 3px;
  box-shadow: 0 22px 44px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.3);
  width: 280px; flex-shrink: 0; position: relative;
}
.photo-frame img { width: 100%; display: block; border-radius: 1px; }
.photo-frame .cap {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.04em; color: #6b7580;
  text-align: center; margin-top: 12px; text-transform: uppercase;
}
.photo-frame.rot-l { transform: rotate(-4deg); margin-top: 26px; }
.photo-frame.rot-r { transform: rotate(3deg); }
.photo-frame:hover { transform: rotate(0deg) scale(1.02); transition: transform .2s ease; z-index: 5; }

.photo-single { display: flex; justify-content: center; margin: 56px 0; }
.photo-single .photo-frame { transform: rotate(-2deg); width: 340px; }
.photo-single .photo-frame:hover { transform: rotate(0deg) scale(1.02); }

/* ── Diagramme de repartition (cadre incline, meme famille que photo-frame) ── */
.diagram-frame {
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 28px 22px; margin: 48px 0; box-shadow: 0 22px 44px rgba(0,0,0,.45);
  transform: rotate(-1deg);
}
.diagram-frame:hover { transform: rotate(0deg); transition: transform .2s ease; }
.diagram-title {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-dim); text-align: center; margin-bottom: 22px;
}
.diagram-device {
  font-family: var(--font-mono); font-size: 12px; color: var(--fg); background: var(--panel-hi);
  border: 1px solid var(--acc-dim); border-radius: 999px; padding: 7px 18px; width: fit-content;
  margin: 0 auto 4px; box-shadow: 0 0 16px var(--acc-glow);
}
.diagram-lines { display: flex; justify-content: center; gap: 0; height: 22px; }
.diagram-lines::before, .diagram-lines::after {
  content: ''; width: 1px; background: var(--line-hi); height: 100%;
}
.diagram-lines::before { margin-right: 30%; }
.diagram-lines::after { margin-left: 30%; }
.diagram-cols { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.diagram-col {
  flex: 1; min-width: 200px; max-width: 260px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px;
}
.diagram-col .col-label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--acc); text-transform: uppercase; margin-bottom: 10px;
}
.diagram-col ul { list-style: none; margin: 0; padding: 0; }
.diagram-col li {
  font-size: 12.5px; color: var(--fg-mid); padding: 6px 0; border-top: 1px solid var(--line);
}
.diagram-col li:first-child { border-top: none; }

/* ── Citation mise en avant ── */
.pull-quote {
  margin: 48px 0; padding: 4px 0 4px 26px; border-left: 3px solid var(--acc);
  position: relative;
}
.pull-quote p {
  font-family: var(--font-head); font-size: 22px; font-weight: 600; line-height: 1.4;
  color: var(--fg); letter-spacing: -0.01em; margin: 0;
}
.pull-quote .src {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-faint); margin-top: 10px; display: block;
}

/* ── Terminal / log block ── */
.termblock {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 16px 18px; margin: 28px 0; overflow-x: auto; position: relative;
}
.termblock::before {
  content: ''; position: absolute; top: -1px; left: 16px; height: 1px; width: 24px;
  background: var(--acc); box-shadow: 0 0 12px var(--acc-glow); opacity: .7;
}
.termblock pre {
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.7; color: var(--fg-mid); white-space: pre-wrap;
}
.termblock .ok { color: var(--acc); }
.termblock .label {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-faint); margin-bottom: 8px;
}

/* ── Footer ── */
.article-footer { border-top: 1px solid var(--line); padding: 32px 0 64px; }
.article-footer a.btn {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px;
  color: var(--fg-mid); border: 1px solid var(--line-2); padding: 8px 14px; border-radius: 4px;
}
.article-footer a.btn:hover { color: var(--acc); border-color: var(--acc-dim); }

@media (max-width: 640px) {
  .article-header h1 { font-size: 25px; }
  .index-hero h1 { font-size: 24px; }
  .photo-pair { gap: 18px; }
  .photo-frame { width: 100%; max-width: 300px; }
  .photo-single .photo-frame { width: 100%; max-width: 320px; }
}
