/**
 * Story 14.182 (AC 10) — tokens de l'identité graphite et safran (14-126 / 14-179), SOURCE UNIQUE :
 *  - `src/routes/landing.css` les importe (`@import`, en tête : cascade inchangée) ;
 *  - le générateur du site statique (`scripts/blog/`) les concatène en tête de `dist/blog/blog.css`.
 * Déplacés tels quels depuis `landing.css` (aucune valeur modifiée). Le sombre suit la classe `.dark`
 * posée sur <html> par public/theme-init.js.
 */

.lp-scope {
  --lp-bg: #f4f5f6;
  --lp-p1: #ffffff;
  --lp-p2: #eceef0;
  --lp-p3: #e1e4e8;
  --lp-ink: #16181b;
  --lp-soft: #565b63;
  /* D-SM6 : #8a9099 (3,22:1) → #696f78 */
  --lp-faint: #696f78;
  --lp-line: #dde1e5;
  /* Safran de décor (traits, pastilles, barres) — ne porte aucune information en clair (D-SM4). */
  --lp-saf: #f0a20b;
  /* Safran porteur d'information (texte, focus, contours d'état) — 5,73:1 sur blanc. */
  --lp-saf-text: #8f5b00;
  --lp-saf-wash: #fdf0d5;
  --lp-saf-wash-2: #fbe2ac;
  --lp-btn: #16181b;
  --lp-btn-fg: #f6f6f4;
  /* Gamme d'évaluation — D-SM6 : AR #c8561a → #c15319, EC #6f7d0c → #6d7b0c, AQ #0f8a3c → #0f853a */
  --lp-na: #c8283b;
  --lp-ar: #c15319;
  --lp-ec: #6d7b0c;
  --lp-aq: #0f853a;
  --lp-ma: #1f5fbf;
  --lp-on-ev: #ffffff;
  /* Couleurs de séquence et de type de ligne */
  --lp-seq1: #2f7a86;
  --lp-seq2: #8a4f78;
  --lp-seq3: #6b6f2a;
  /* D-SM6 : texte des codes sur leur fond teinté à 16 % */
  --lp-seq1-text: #27656f;
  --lp-seq2-text: #804970;
  --lp-seq3-text: #5d6024;
  --lp-comp-text: #8a5800;
  /* D-DEV1 : filet d'état actif et focus */
  --lp-indic: #8f5b00;
  --lp-focus: #8f5b00;
  /* Bande du temps et appel final : graphite dans les DEUX modes (D-OP7) */
  --lp-band: #15171a;
  --lp-band-p: #1f2226;
  --lp-band-ink: #f2f2f0;
  --lp-band-soft: #a7abb2;
  --lp-band-saf: #f5b324;
  --lp-shadow: 0 1px 0 rgba(22, 24, 27, 0.05), 0 12px 30px -16px rgba(22, 24, 27, 0.28);
  --lp-shadow-lift: 0 26px 40px -14px rgba(0, 0, 0, 0.4);
  --lp-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --lp-out: cubic-bezier(0.22, 1, 0.36, 1);
  --lp-f-display: "Bricolage Grotesque Variable", "Avenir Next", "Segoe UI", sans-serif;
  --lp-f-body: "Atkinson Hyperlegible Next Variable", "Helvetica Neue", Arial, sans-serif;
  --lp-f-code: "JetBrains Mono Variable", ui-monospace, Menlo, monospace;

  font-family: var(--lp-f-body);
  font-size: 16.5px;
  line-height: 1.55;
  background-color: var(--lp-bg);
  color: var(--lp-ink);
  color-scheme: light;
}

.dark .lp-scope {
  --lp-bg: #101113;
  --lp-p1: #18191c;
  --lp-p2: #202226;
  --lp-p3: #292b30;
  --lp-ink: #f2f2f0;
  --lp-soft: #a7abb2;
  /* D-SM6 : #767b84 (4,13:1) → #7f848d */
  --lp-faint: #7f848d;
  --lp-line: #2a2c31;
  --lp-saf: #f5b324;
  --lp-saf-text: #f5b324;
  --lp-saf-wash: #2e2410;
  --lp-saf-wash-2: #4a3812;
  --lp-btn: #f2f2f0;
  --lp-btn-fg: #111214;
  --lp-na: #f35a6c;
  --lp-ar: #f08a4b;
  --lp-ec: #c3d43a;
  --lp-aq: #34cf6c;
  --lp-ma: #6fa6ff;
  --lp-on-ev: #111214;
  --lp-seq1: #5fb3c0;
  --lp-seq2: #c98bb6;
  --lp-seq3: #b5b86a;
  --lp-seq1-text: #5fb3c0;
  --lp-seq2-text: #c98bb6;
  --lp-seq3-text: #b5b86a;
  --lp-comp-text: #f5b324;
  --lp-indic: #f5b324;
  --lp-focus: #f5b324;
  --lp-band: #18191c;
  --lp-band-p: #222428;
  --lp-shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 14px 34px -16px rgba(0, 0, 0, 0.7);
  --lp-shadow-lift: 0 26px 40px -14px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* bricolage-grotesque-latin-wght-normal (@fontsource-variable/bricolage-grotesque) */
@font-face {
  font-family: 'Bricolage Grotesque Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/blog/polices/bricolage-grotesque-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* bricolage-grotesque-latin-ext-wght-normal (@fontsource-variable/bricolage-grotesque) */
@font-face {
  font-family: 'Bricolage Grotesque Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/blog/polices/bricolage-grotesque-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* atkinson-hyperlegible-next-latin-wght-normal (@fontsource-variable/atkinson-hyperlegible-next) */
@font-face {
  font-family: 'Atkinson Hyperlegible Next Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/blog/polices/atkinson-hyperlegible-next-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* atkinson-hyperlegible-next-latin-ext-wght-normal (@fontsource-variable/atkinson-hyperlegible-next) */
@font-face {
  font-family: 'Atkinson Hyperlegible Next Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/blog/polices/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* atkinson-hyperlegible-next-latin-wght-italic (@fontsource-variable/atkinson-hyperlegible-next) */
@font-face {
  font-family: 'Atkinson Hyperlegible Next Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url(/blog/polices/atkinson-hyperlegible-next-latin-wght-italic.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* atkinson-hyperlegible-next-latin-ext-wght-italic (@fontsource-variable/atkinson-hyperlegible-next) */
@font-face {
  font-family: 'Atkinson Hyperlegible Next Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url(/blog/polices/atkinson-hyperlegible-next-latin-ext-wght-italic.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* jetbrains-mono-latin-wght-normal (@fontsource-variable/jetbrains-mono) */
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/blog/polices/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/*
 * Story 14.182 (AC 10, 32) — styles du blog statique.
 * Le générateur assemble `dist/blog/blog.css` = tokens `--lp-*` (`src/routes/-landing/tokens.css`, source
 * unique, rien n'est recopié ici) + `@font-face` (Fontsource, polices servies depuis le domaine) + ce fichier.
 * Identité de la landing : titres Bricolage, texte Atkinson, codes en JetBrains Mono, graphite et safran.
 * Aucune URL externe (CSP).
 */

html {
  background-color: #f4f5f6;
  -webkit-text-size-adjust: 100%;
}
html.dark {
  background-color: #101113;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body.b-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 18px;
  line-height: 1.65;
  overflow-wrap: break-word;
}
body.b-page main {
  flex: 1;
}

/* ---------- Mise en page ---------- */
.b-conteneur {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .b-conteneur {
    padding: 0 28px;
  }
}
/* Largeur de lecture ≈ 68 caractères. */
.b-lecture {
  max-width: calc(68ch + 56px);
}

/* ---------- Liens, focus, évitement ---------- */
.b-page a {
  color: var(--lp-saf-text);
  text-underline-offset: 3px;
}
.b-page a:hover {
  text-decoration-thickness: 2px;
}
.b-page :focus-visible {
  outline: 3px solid var(--lp-focus);
  outline-offset: 2px;
  border-radius: 4px;
}
.b-evitement {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 8px 14px;
  background: var(--lp-btn);
  color: var(--lp-btn-fg) !important;
  border-radius: 10px;
  z-index: 10;
}
.b-evitement:focus {
  top: 12px;
}

/* ---------- Titres ---------- */
.b-page :where(h1, h2, h3, h4) {
  font-family: var(--lp-f-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
  color: var(--lp-ink);
}
.b-page h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.75rem);
  margin: 0.4em 0 0.35em;
}
.b-corps h2,
.b-appel h2 {
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.75rem);
  margin: 1.9em 0 0.5em;
}
.b-corps h3 {
  font-size: 1.2rem;
  margin: 1.5em 0 0.4em;
}

/* ---------- En-tête ---------- */
.b-entete {
  border-bottom: 1px solid var(--lp-line);
  background: var(--lp-bg);
}
.b-entete-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.b-marque {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--lp-f-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--lp-ink) !important;
  text-decoration: none;
}
.b-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
}
.b-nav > a:not(.b-btn) {
  color: var(--lp-ink);
  font-weight: 600;
  text-decoration: none;
}

/* Logo « fiche cochée » : couleurs en dur, variante sombre par `.dark` (comme `Logo` de l'app). */
.b-logo-carre {
  fill: #16181b;
}
.b-logo-trait {
  stroke: #f4f5f6;
}
.b-logo-coche {
  stroke: #f0a20b;
}
.dark .b-logo-carre {
  fill: #2b2c31;
}
.dark .b-logo-trait {
  stroke: #f2f2f0;
}
.dark .b-logo-coche {
  stroke: #f5b324;
}

/* ---------- Boutons ---------- */
.b-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none !important;
}
@media (max-width: 460px) {
  .b-large-seulement {
    display: none;
  }
}
.b-btn-encre {
  background: var(--lp-btn);
  color: var(--lp-btn-fg) !important;
}
.b-btn-clair {
  background: var(--lp-band-ink);
  color: var(--lp-band) !important;
}

/* ---------- Bandeau brouillon (relecture) ---------- */
.b-bandeau-brouillon {
  background: var(--lp-saf-wash-2);
  color: var(--lp-ink);
  padding: 10px 0;
  font-size: 16px;
  border-bottom: 2px solid var(--lp-saf);
}

/* ---------- Article ---------- */
.b-ariane ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  padding: 0;
  margin: 24px 0 0;
  font-size: 16px;
  color: var(--lp-soft);
}
.b-ariane li + li::before {
  content: "›";
  margin: 0 8px;
  color: var(--lp-faint);
}
.b-ariane [aria-current] {
  color: var(--lp-soft);
}
.b-meta {
  color: var(--lp-soft);
  font-size: 16px;
  margin: 0 0 1.6em;
}
.b-chapeau {
  font-size: 1.1em;
  color: var(--lp-soft);
}
.b-corps p,
.b-corps ul,
.b-corps ol {
  margin: 0 0 1em;
}
.b-corps li {
  margin: 0.25em 0;
}
.b-corps li::marker {
  color: var(--lp-saf-text);
}
.b-corps strong {
  color: var(--lp-ink);
}
.b-corps blockquote {
  margin: 1.2em 0;
  padding: 0.6em 1em;
  border-left: 4px solid var(--lp-saf);
  background: var(--lp-p1);
  color: var(--lp-ink);
}
.b-corps hr {
  border: 0;
  border-top: 1px solid var(--lp-line);
  margin: 2em 0;
}
.b-corps img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--lp-line);
}
.b-corps code,
.b-code {
  font-family: var(--lp-f-code);
  font-size: max(16px, 0.9em);
  font-weight: 600;
  color: var(--lp-comp-text);
  white-space: nowrap;
}
.b-corps pre {
  overflow-x: auto;
  padding: 12px;
  background: var(--lp-p2);
  border-radius: 10px;
}
.b-corps pre code {
  white-space: pre;
}

/* Tableaux : défilement horizontal propre, jamais la page. */
.b-tableau {
  overflow-x: auto;
  margin: 0 0 1.4em;
  border: 1px solid var(--lp-line);
  border-radius: 12px;
  background: var(--lp-p1);
}
.b-tableau table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 16px;
}
.b-tableau th,
.b-tableau td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--lp-line);
}
.b-tableau th {
  background: var(--lp-p2);
  font-weight: 700;
}
.b-tableau tr:last-child td {
  border-bottom: 0;
}

/* Encarts « À compléter par Antoine » (relecture seulement, AC 23). */
.b-a-completer {
  margin: 1.2em 0;
  padding: 12px 16px;
  border: 2px dashed var(--lp-saf-text);
  border-radius: 12px;
  background: var(--lp-saf-wash);
  color: var(--lp-ink);
}
.b-a-completer p {
  margin: 0.2em 0;
}
.b-a-completer-titre {
  font-weight: 700;
  color: var(--lp-saf-text);
}

/* ---------- Index ---------- */
.b-liste {
  list-style: none;
  padding: 0;
  margin: 1.5em 0;
}
.b-liste > li {
  padding: 18px 0;
  border-bottom: 1px solid var(--lp-line);
}
.b-liste h2 {
  font-size: 1.35rem;
  margin: 0 0 0.25em;
}
.b-liste h2 a {
  color: var(--lp-ink);
  text-decoration: none;
}
.b-liste h2 a:hover {
  text-decoration: underline;
}
.b-liste .b-meta {
  margin: 0 0 0.4em;
}
.b-liste p {
  margin: 0;
}
.b-vide {
  margin: 1.5em 0;
  padding: 16px;
  border-radius: 12px;
  background: var(--lp-p1);
  border: 1px solid var(--lp-line);
}

/* ---------- Appel à l'action : graphite dans les deux modes (comme l'appel final de la landing) ---------- */
.b-appel {
  margin: 2.5em 0 3em;
  padding: 24px 20px;
  border-radius: 18px;
  background: var(--lp-band);
  color: var(--lp-band-ink);
}
.b-appel h2 {
  margin: 0 0 0.4em;
  color: var(--lp-band-ink);
}
.b-appel p {
  margin: 0 0 1em;
  color: var(--lp-band-soft);
}
.b-appel-liens {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.b-page .b-lien-clair {
  color: var(--lp-band-saf);
  font-weight: 700;
}
.b-appel .b-appel-mention {
  margin: 0;
  font-size: 16px;
}

/* ---------- Pied de page ---------- */
.b-pied {
  border-top: 1px solid var(--lp-line);
  padding: 20px 0 28px;
  font-size: 16px;
  color: var(--lp-soft);
}
.b-pied-in {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}
.b-pied nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.b-pied a {
  color: var(--lp-soft);
}
