/* ==========================================================================
   Thème « Accès » - portfolio et blog DevSecOps et IAM
   Polices auto-hébergées, aucun appel externe, aucun style en ligne (CSP stricte).
   ========================================================================== */

@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/schibsted-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/schibsted-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/schibsted-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

/* ------------------------------------------------------------------ jetons */
:root {
  color-scheme: light;
  --bg: #eef2f1;
  --surface: #ffffff;
  --ink: #14213d;
  --muted: #51607a;
  --line: #d3dbda;
  --accent: #1f7a5c;
  --accent-strong: #17604a;
  --accent-soft: #dcefe7;
  --on-accent: #ffffff;
  --pass: #1f7a5c;
  --flag: #b97a0e;
  --flag-soft: #fbf0d9;
  --warn: #8a5a00;
  --warn-soft: #fbf0d9;
  --contact-bg: #14213d;
  --contact-ink: #ffffff;
  --contact-muted: #c5cede;
  /* Blocs de code : sombres dans les deux thèmes. */
  --panel: #14213d;
  --panel-line: #2b3b5c;
  --panel-pass: #5cc79c;
  --code-bg: #14213d;

  --display: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 10px;
  --radius-lg: 18px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1828;
    --surface: #16223a;
    --ink: #e6ecf2;
    --muted: #9aa7bd;
    --line: #26344f;
    --accent: #5cc79c;
    --accent-strong: #7fd9b3;
    --accent-soft: #173a30;
    --on-accent: #0f1828;
    --pass: #5cc79c;
    --flag: #e0a83c;
    --flag-soft: #3a2c10;
    --warn: #f0b54a;
    --warn-soft: #33290f;
    --contact-bg: #16223a;
    --contact-ink: #e6ecf2;
    --contact-muted: #9aa7bd;
    --panel: #16223a;
    --code-bg: #0a1220;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1828;
  --surface: #16223a;
  --ink: #e6ecf2;
  --muted: #9aa7bd;
  --line: #26344f;
  --accent: #5cc79c;
  --accent-strong: #7fd9b3;
  --accent-soft: #173a30;
  --on-accent: #0f1828;
  --pass: #5cc79c;
  --flag: #e0a83c;
  --flag-soft: #3a2c10;
  --warn: #f0b54a;
  --warn-soft: #33290f;
  --contact-bg: #16223a;
  --contact-ink: #e6ecf2;
  --contact-muted: #9aa7bd;
  --panel: #16223a;
  --code-bg: #0a1220;
}

/* ------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--on-accent); }
code { font-family: var(--mono); font-size: 0.9em; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.icon { flex: none; vertical-align: -0.2em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border: 2px solid var(--ink); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--surface); color: var(--ink); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-small { padding: 7px 16px; font-size: 0.9375rem; border-width: 1.5px; }

/* ----------------------------------------------------------------- en-tête */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { font: 700 1.1875rem/1 var(--display); letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo span { color: var(--accent); }
.top-nav { margin-left: auto; }
.top-nav ul { display: flex; gap: 28px; }
.top-nav a { display: block; padding: 20px 0; font-size: 0.9688rem; font-weight: 500; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.top-nav a:hover, .top-nav a.is-active, .top-nav a[aria-current="page"] { color: var(--ink); }
.top-nav a.is-active, .top-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1.5px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

@media (max-width: 900px) {
  .top-in { flex-wrap: wrap; row-gap: 0; padding-top: 10px; }
  .top-actions { margin-left: auto; }
  .top-nav { order: 3; flex: 0 0 auto; width: calc(100% + var(--gutter) * 2); margin: 0 calc(var(--gutter) * -1); overflow-x: auto; scrollbar-width: none; }
  .top-nav::-webkit-scrollbar { display: none; }
  .top-nav ul { gap: 22px; padding-inline: var(--gutter); width: max-content; }
  .top-nav a { padding: 12px 0; }
  html { scroll-padding-top: 120px; }
}

/* -------------------------------------------------------------------- héro */
.hero { padding-block: clamp(48px, 8vw, 104px) clamp(56px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(40px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(2.35rem, 5.2vw, 3.75rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; max-width: 15ch; }
.hero-lead { margin-top: 24px; max-width: 34rem; font-size: 1.1875rem; line-height: 1.6; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* La revue des accès : élément signature de la page. */
.access-review { margin: 0; padding: 28px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 1px 0 var(--line), 0 24px 48px -32px rgba(20, 33, 61, .35); }
.access-review h2 { font-size: 1rem; font-weight: 600; letter-spacing: 0; margin-bottom: 20px; }
.matrix { width: calc(100% + 0.8rem); table-layout: fixed; border-collapse: separate; border-spacing: 0.4rem; margin: 0 -0.4rem; font-size: 0.875rem; }
.matrix th { font-weight: 500; color: var(--muted); text-align: left; }
.matrix thead th { text-align: center; padding-bottom: 2px; }
.matrix thead td, .matrix tbody th { width: 34%; }
.matrix tbody th { white-space: nowrap; padding-right: 8px; color: var(--ink); }
.matrix td { padding: 0; }
.cell { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-inline: auto; border-radius: 6px; font-size: 0.8125rem; font-weight: 600; }
.cell-granted { background: var(--accent-soft); color: var(--accent); }
.cell-none::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.cell-flag { background: var(--flag-soft); color: var(--flag); box-shadow: inset 0 0 0 2px var(--flag); }
.cell-flag::before { content: "!"; }
.review-status { display: grid; margin-top: 20px; font-size: 0.9375rem; color: var(--muted); }
.review-status span { grid-area: 1 / 1; }
.status-after { opacity: 0; color: var(--accent); font-weight: 500; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 7px; }
.swatch { width: 14px; height: 14px; border-radius: 3px; }
.swatch-granted { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.swatch-flag { background: var(--flag-soft); box-shadow: inset 0 0 0 1.5px var(--flag); }

/* Un seul mouvement sur la page : les droits signalés sont retirés un par un. */
@keyframes revoke { to { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); } }
@keyframes mark-out { to { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .cell-flag { animation: revoke .5s ease forwards; }
  .cell-flag::before { animation: mark-out .5s ease forwards; }
  .cell-flag.d0, .cell-flag.d0::before { animation-delay: 1.6s; }
  .cell-flag.d1, .cell-flag.d1::before { animation-delay: 1.85s; }
  .cell-flag.d2, .cell-flag.d2::before { animation-delay: 2.1s; }
  .cell-flag.d3, .cell-flag.d3::before { animation-delay: 2.35s; }
  .status-before { animation: fade-out .4s ease 2.6s forwards; }
  .status-after { animation: fade-in .4s ease 2.7s forwards; }
}
@media (prefers-reduced-motion: reduce) {
  .cell-flag { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
  .cell-flag::before { content: none; }
  .status-before { opacity: 0; }
  .status-after { opacity: 1; }
}

/* ---------------------------------------------------------------- sections */
.band { padding-block: clamp(56px, 8vw, 104px); }
.band-alt { background: var(--surface); }
.band h2 { font-size: clamp(1.75rem, 3.4vw, 2.4rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; max-width: 22ch; }
.section-intro { margin-top: 16px; max-width: 38rem; color: var(--muted); }
.band-body { margin-top: clamp(32px, 4vw, 48px); }

/* Offres : deux domaines */
.offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.domain { padding: clamp(24px, 3vw, 36px); background: var(--bg); border-radius: var(--radius-lg); }
.domain h3 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; }
.domain-question { margin: 6px 0 24px; color: var(--muted); }
.offer { padding-block: 18px; border-top: 1px solid var(--line); }
.offer:last-child { padding-bottom: 0; }
.offer-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.offer h4 { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.offer-length { flex-shrink: 0; font-size: 0.875rem; font-weight: 500; color: var(--accent); }
.offer p { margin-top: 6px; font-size: 0.9688rem; color: var(--muted); }
.offers-note { margin-top: 32px; max-width: 44rem; color: var(--muted); }
@media (max-width: 900px) { .offers { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .offer-head { flex-direction: column; gap: 2px; } }

/* Méthode : une vraie séquence, donc numérotée */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.step { counter-increment: step; padding-top: 20px; border-top: 2px solid var(--ink); }
.step::before { content: counter(step); display: block; margin-bottom: 12px; font: 600 2.5rem/1 var(--display); color: var(--accent); }
.step h3 { font-size: 1.125rem; font-weight: 600; }
.step p { margin-top: 6px; font-size: 0.9688rem; color: var(--muted); }
.principle { margin-top: clamp(40px, 5vw, 56px); max-width: 34ch; font: 500 clamp(1.25rem, 2.4vw, 1.6rem)/1.35 var(--display); letter-spacing: -0.01em; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Réalisations */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; padding: 26px; background: var(--bg); border-radius: var(--radius-lg); }
.card-cat { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 500; color: var(--accent); }
.card h3 { margin-top: 12px; font-size: 1.1875rem; font-weight: 600; line-height: 1.25; }
.card h3 + p { margin: 10px 0 20px; font-size: 0.9688rem; color: var(--muted); }
.card .tags { margin-top: auto; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 0.875rem; line-height: 1.45; }
.tags li:has(a) { padding: 0; }
.tags a { display: block; padding: 4px 12px; text-decoration: none; }
.tags li:has(a:hover) { border-color: var(--accent); }

/* Parcours */
.about { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 80px); }
.about-text p { margin-top: 16px; max-width: 34rem; color: var(--muted); }
.tools { margin-top: 40px; }
.tools h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 14px; }
.tool-groups { display: grid; gap: 14px; }
.tool-groups dt { font-size: 0.875rem; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.tool-groups dd { margin: 0; }
.track + .track { margin-top: 40px; }
.track h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 1.125rem; font-weight: 600; }
.track h3 .icon { color: var(--accent); }
.timeline { border-left: 2px solid var(--line); margin-left: 5px; }
.timeline li { position: relative; padding: 0 0 28px 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); }
.tl-period { font-size: 0.875rem; font-weight: 500; color: var(--accent); }
.timeline h4 { margin-top: 4px; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.tl-org { margin-top: 4px; font-size: 0.9375rem; }
.tl-org span { display: block; color: var(--muted); }
.tl-text { margin-top: 8px; font-size: 0.9375rem; color: var(--muted); }
@media (max-width: 900px) { .about { grid-template-columns: minmax(0, 1fr); } }

/* Recommandations */
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; }
.quote { margin: 0; padding-left: 24px; border-left: 3px solid var(--accent); }
.quote blockquote { margin: 0; font: 500 clamp(1.125rem, 1.8vw, 1.3125rem)/1.45 var(--display); letter-spacing: -0.01em; }
.quote blockquote p::before { content: "« "; }
.quote blockquote p::after { content: " »"; }
.quote figcaption { margin-top: 18px; font-size: 0.9375rem; }
.quote figcaption strong { display: block; font-weight: 600; }
.quote figcaption span { color: var(--muted); }
@media (max-width: 760px) { .quotes { grid-template-columns: minmax(0, 1fr); } }

/* Contact */
.contact { background: var(--contact-bg); color: var(--contact-ink); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 40px; align-items: end; }
.contact h2 { max-width: 18ch; }
.contact-grid p { margin-top: 16px; max-width: 32rem; color: var(--contact-muted); }
.contact .hero-cta { justify-content: flex-end; margin-top: 0; }
.contact .btn { color: var(--contact-ink); border-color: #5c6b8a; }
.contact .btn:hover { background: rgba(255, 255, 255, .08); color: var(--contact-ink); }
.contact .btn-primary { background: var(--contact-ink); border-color: var(--contact-ink); color: var(--contact-bg); }
.contact .btn-primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: #14213d; }
.contact a:focus-visible { outline-color: var(--contact-ink); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } .contact .hero-cta { justify-content: flex-start; } }

/* Pages simples (mentions légales) */
.legal { padding-bottom: clamp(56px, 8vw, 96px); }
.legal h2 { margin-top: 36px; font-size: 1.25rem; font-weight: 600; }
.legal p { margin-top: 8px; max-width: 42rem; color: var(--muted); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .access-review { padding: 20px; }
  .matrix { font-size: 0.8125rem; }
  .cell { width: 2.1rem; height: 2.1rem; }
}

/* ---------------------------------------------------------------- articles */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 32px 24px; }
.post { display: flex; flex-direction: column; min-width: 0; }
.post-cover { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.post-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s ease; }
.post:hover .post-cover img { transform: scale(1.03); }
.post-body { padding-top: 16px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 0.875rem; color: var(--muted); }
.post-cat { font-weight: 600; color: var(--accent); }
.post h2, .post h3 { margin-top: 8px; font-size: 1.3125rem; font-weight: 600; line-height: 1.2; }
.post h2 a, .post h3 a { text-decoration: none; }
.post h2 a:hover, .post h3 a:hover { text-decoration: underline; color: inherit; }
.post-summary { margin-top: 8px; font-size: 0.9688rem; color: var(--muted); }
.more { margin-top: 36px; }
.empty { padding: 28px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

.badge { padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--warn-soft); color: var(--warn); }
.notice { display: inline-block; margin-bottom: 20px; padding: 8px 14px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 0.9375rem; font-weight: 600; }

.posts-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
.posts-list .post { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px 0; border-top: 1px solid var(--line); }
.posts-list .post:first-child { border-top: 0; padding-top: 0; }
.posts-list .post-body { padding-top: 0; }
.posts-list .post h2 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); }
@media (max-width: 640px) { .posts-list .post { grid-template-columns: minmax(0, 1fr); gap: 0; } .posts-list .post-body { padding-top: 16px; } }

/* En-tête de page (blog, tag, article, 404) */
.page-head { padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 44px); }
.page-head h1 { font-size: clamp(2.125rem, 5vw, 3.5rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; max-width: 22ch; }
.page-head .post-meta { margin-bottom: 14px; }
.lead { margin-top: 20px; max-width: 62ch; font-size: clamp(1.125rem, 1.5vw, 1.25rem); line-height: 1.55; color: var(--muted); }
.lead:empty { display: none; }
.crumbs { display: flex; gap: 10px; margin-bottom: 24px; font-size: 0.9375rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.code-404 { margin-bottom: 16px; color: var(--accent); font-weight: 500; }

.blog-list { padding-bottom: clamp(56px, 8vw, 96px); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-bottom: 32px; }
.search { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; max-width: 380px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; padding: 11px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1rem; }
.filter-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: 600 0.875rem/1.3 var(--body); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filter-count { margin: -16px 0 24px; font-size: 0.875rem; color: var(--muted); }
.tag-cloud { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.tag-cloud h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 16px; }
.rss-line { display: flex; align-items: center; gap: 8px; margin-top: 32px; font-size: 0.9375rem; }
.rss-line .icon { color: var(--accent); }

/* Page d'article */
.progress { position: fixed; inset: 0 0 auto 0; z-index: 60; height: 3px; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.article-grid { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 46rem); gap: clamp(32px, 6vw, 72px); align-items: start; }
.article-grid.no-toc { grid-template-columns: minmax(0, 46rem); }
.toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; font-size: 0.9063rem; }
.toc-title { font-weight: 600; margin-bottom: 12px; }
.toc ol { border-left: 2px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc .d3 a { padding-left: 28px; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--accent); }
@media (max-width: 960px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
}

.prose { min-width: 0; font-size: 1.125rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { margin-top: 2.2em; font-size: 1.75rem; font-weight: 600; line-height: 1.15; }
.prose h3 { margin-top: 1.8em; font-size: 1.3125rem; font-weight: 600; line-height: 1.2; }
.prose h2 + *, .prose h3 + * { margin-top: 0.8em; }
.prose .anchor { margin-left: 6px; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus-visible { opacity: 1; }
.prose a:not(.anchor) { text-decoration-line: underline; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 600; }
.prose :not(pre) > code { padding: 2px 6px; border-radius: 5px; background: var(--accent-soft); font-size: 0.875em; overflow-wrap: anywhere; }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose img { display: block; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.prose figure.image { margin-inline: 0; }
.prose figure.image figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--muted); text-align: center; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.4em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.prose thead th { border-top: 0; font-weight: 600; white-space: nowrap; }
.prose .ta-center { text-align: center; } .prose .ta-right { text-align: right; }

/* Blocs de code : sombres dans les deux thèmes */
.code { margin-inline: 0; border-radius: var(--radius); background: var(--code-bg); color: #dce4ee; border: 1px solid var(--panel-line); overflow: hidden; }
.code figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 4px 6px 4px 16px; border-bottom: 1px solid var(--panel-line); font: 500 0.8125rem/1 var(--mono); color: #93a1b8; }
.code pre { margin: 0; padding: 16px; overflow-x: auto; font: 400 0.875rem/1.6 var(--mono); tab-size: 2; }
.code code { font-size: inherit; }
.copy-btn { padding: 7px 10px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #93a1b8; font: 500 0.8125rem/1 var(--body); cursor: pointer; }
.copy-btn:hover { color: #e4eaf2; border-color: var(--panel-line); }
.copy-btn.is-done { color: var(--panel-pass); }
.hljs-comment, .hljs-quote, .hljs-meta { color: #7f90ab; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-doctag, .hljs-section, .hljs-name { color: #9db1ff; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-template-string { color: #7fe0b0; }
.hljs-number, .hljs-literal, .hljs-symbol, .hljs-bullet { color: #f0b54a; }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable, .hljs-selector-class, .hljs-selector-id { color: #8fd3ff; }
.hljs-built_in, .hljs-type, .hljs-title, .hljs-title.class_, .hljs-title.function_ { color: #cbb0ff; }
.hljs-deletion { color: #ff8f86; }
.hljs-emphasis { font-style: italic; } .hljs-strong { font-weight: 500; }

.article-cover { width: 100%; }
.article-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.related { margin-top: 64px; }
.related h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 24px; }
.article-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-block: 56px clamp(56px, 8vw, 96px); }
.article-nav a { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; }
.article-nav a:hover { border-color: var(--accent); color: inherit; }
.article-nav small { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 0.875rem; color: var(--muted); }
.article-nav a > span { font: 600 1.0625rem/1.3 var(--display); }
.article-nav .next { text-align: right; }
.article-nav .next small { justify-content: flex-end; }
@media (max-width: 640px) { .article-nav { grid-template-columns: minmax(0, 1fr); } .article-nav .next { text-align: left; } .article-nav .next small { justify-content: flex-start; } }

/* ------------------------------------------------------------ pied de page */
.foot { border-top: 1px solid var(--line); font-size: 0.9375rem; }
.foot-in { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding-block: 48px 32px; }
.foot-role { margin-top: 12px; color: var(--muted); }
.foot li + li { margin-top: 8px; }
.foot a:not(.logo) { text-decoration: none; color: var(--muted); }
.foot a:not(.logo):hover { color: var(--ink); text-decoration: underline; }
.foot-legal { padding-block: 20px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
@media (max-width: 640px) { .foot-in { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-in > div { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .top, .foot, .progress, .toc, .article-nav, .related, .hero-cta, .filters, .copy-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .code { border-color: #999; }
}
