/* =========================================================
   Trading Evolution — blog (index, rubriques, articles, page Marchés) et calculateur.
   Complète styles.css + pages.css (mêmes jetons). Chargé uniquement par ces pages.
   Deux thèmes : clair blanc et bleu (défaut) et sombre sous html[data-theme="dark"].
   Presque tout passe par les jetons partagés (styles.css :root = sombre, fin de styles.css :
   html:not([data-theme="dark"]) = clair) et par quelques jetons propres au blog (--bl-*),
   posés sur body.bl-page (classe mise par api/_lib/blog/render.js).
   ========================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Jetons du blog : clair par défaut, sombre ensuite ---------- */
body.bl-page {
  --bl-bg: var(--surface);
  --bl-glow: rgba(37, 99, 235, .10);
  --bl-card: var(--card);
  --bl-solid: #ffffff;                        /* fond plein (champ de recherche, pastilles) */
  --bl-bd: var(--line);
  --bl-bd-h: rgba(37, 99, 235, .34);
  --bl-sh: 0 1px 2px rgba(10, 22, 40, .05), 0 10px 28px -14px rgba(10, 22, 40, .14);
  --bl-sh-h: 0 2px 4px rgba(10, 22, 40, .04), 0 30px 60px -24px rgba(29, 78, 216, .32);
  --bl-tint: #f5f8fd;                         /* encarts discrets, lignes survolées */
  --bl-accent: #1d4ed8;                       /* liens et rubriques : 6,7:1 sur blanc */
  --bl-head: #0a1628;
  --bl-text: #1f2a44;                         /* corps d'article : 13:1 sur blanc */
  --bl-soft: rgba(37, 99, 235, .07);
  --bl-soft-bd: rgba(37, 99, 235, .18);
  --bl-spark: #2563eb;
  --bl-amber-bg: #fffbeb; --bl-amber-bd: #fcd989; --bl-amber: #b45309; --bl-amber-2: #8a3c0b;
  --bl-midnight:
    radial-gradient(70% 110% at 100% 0%, rgba(56, 189, 248, .34), transparent 60%),
    radial-gradient(55% 90% at 0% 100%, rgba(59, 130, 246, .42), transparent 62%),
    linear-gradient(135deg, #0a1b4d 0%, #11318c 44%, #1d4ed8 100%);
  --bl-midnight-sh: 0 1px 0 rgba(255, 255, 255, .10) inset, 0 40px 80px -42px rgba(29, 78, 216, .62);
  --bl-foot: var(--surface-2);
  color: var(--ink);
}
html[data-theme="dark"] body.bl-page {
  --bl-glow: rgba(59, 130, 246, .13);
  --bl-solid: rgba(255, 255, 255, .04);
  --bl-bd-h: rgba(96, 165, 250, .5);
  --bl-sh: none;
  --bl-sh-h: 0 24px 60px rgba(0, 0, 0, .45);
  --bl-tint: rgba(255, 255, 255, .03);
  --bl-accent: #8fb4ff;
  --bl-head: #ffffff;
  --bl-text: #c3cce0;                         /* corps d'article : 11:1 sur #070a12 */
  --bl-soft: rgba(59, 130, 246, .10);
  --bl-soft-bd: rgba(96, 165, 250, .24);
  --bl-spark: #60a5fa;
  --bl-amber-bg: rgba(245, 158, 11, .07); --bl-amber-bd: rgba(245, 158, 11, .32); --bl-amber: #fbbf24; --bl-amber-2: #e3b35c;
  --bl-midnight:
    radial-gradient(70% 110% at 100% 0%, rgba(56, 189, 248, .26), transparent 60%),
    radial-gradient(55% 90% at 0% 100%, rgba(59, 130, 246, .36), transparent 62%),
    linear-gradient(135deg, #070f26 0%, #0b1f55 45%, #1c46c9 100%);
  --bl-midnight-sh: 0 0 0 1px rgba(147, 197, 253, .16) inset, 0 40px 90px -40px rgba(37, 99, 235, .5);
  --bl-foot: #0a0e18;
}
/* fond : le clair reprend celui des pages (pages.css, .pg-body) ; en sombre, halo bleu très léger en haut */
html[data-theme="dark"] body.bl-page {
  background: radial-gradient(1200px 560px at 50% -140px, var(--bl-glow), transparent 70%) no-repeat, var(--bl-bg);
}
.bl-page ::selection { background: rgba(37, 99, 235, .2); color: var(--ink); }
.bl-page :is(h1, h2, h3) { font-family: var(--f-disp); text-wrap: balance; }

/* ---------- Coquille : en-tête, sélecteur, pied de page = ceux du site (styles.css, pages.css) ----------
   Seul ajout : le lien « Blog » de l'en-tête reste marqué (aria-current posé par render.js). */
body.bl-page .pg-links a[aria-current] { color: var(--bl-head); font-weight: 700; }
@media (min-width: 861px) { body.bl-page .pg-links a[aria-current]::after { opacity: 1; transform: none; } }
body.bl-page .pg-foot { margin-top: var(--s-8); }
body.bl-page main.bl:has(.bl-art) .crumbs { max-width: 46rem; margin-inline: auto; }
/* ---------- Bandeau d'en-tête (index, rubriques, Marchés) : carte « nuit bleue », grille, courbe ---------- */
body.bl-page .pg-hero.bl-hero {
  display: block; max-width: none; position: relative; overflow: hidden; isolation: isolate; color: #fff;
  padding: clamp(2rem, 1rem + 4.4vw, 4.75rem) clamp(1.4rem, .6rem + 4.2vw, 4.75rem);
  border-radius: 28px; margin-bottom: var(--s-8);
  background: var(--bl-midnight); box-shadow: var(--bl-midnight-sh);
}
/* grille fine, fondue vers le bas */
body.bl-page .bl-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 44px 44px;
  -webkit-mask-image: radial-gradient(120% 100% at 75% 0%, #000 25%, transparent 78%);
  mask-image: radial-gradient(120% 100% at 75% 0%, #000 25%, transparent 78%);
}
/* courbe de marché stylisée (SVG en ligne : aucune requête), côté fin de ligne */
body.bl-page .bl-hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset-inline-end: 0; bottom: 0; width: min(44%, 560px); height: 80%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 38%); mask-image: linear-gradient(90deg, transparent, #000 38%);
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 320' preserveAspectRatio='xMaxYMax meet' fill='none'><defs><linearGradient id='a' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%237dd3fc' stop-opacity='.42'/><stop offset='1' stop-color='%237dd3fc' stop-opacity='0'/></linearGradient><linearGradient id='l' x1='0' y1='0' x2='1' y2='0'><stop offset='0' stop-color='%2393c5fd' stop-opacity='0'/><stop offset='.4' stop-color='%2393c5fd'/><stop offset='1' stop-color='%23ffffff'/></linearGradient></defs><path d='M0 96H600M0 176H600M0 256H600' stroke='%23fff' stroke-opacity='.12' stroke-dasharray='2 7'/><g fill='%23fff' fill-opacity='.09'><rect x='8' y='302' width='12' height='18' rx='2'/><rect x='34' y='294' width='12' height='26' rx='2'/><rect x='60' y='300' width='12' height='20' rx='2'/><rect x='86' y='288' width='12' height='32' rx='2'/><rect x='112' y='296' width='12' height='24' rx='2'/><rect x='138' y='290' width='12' height='30' rx='2'/><rect x='164' y='298' width='12' height='22' rx='2'/><rect x='190' y='284' width='12' height='36' rx='2'/><rect x='216' y='292' width='12' height='28' rx='2'/><rect x='242' y='280' width='12' height='40' rx='2'/><rect x='268' y='290' width='12' height='30' rx='2'/><rect x='294' y='286' width='12' height='34' rx='2'/><rect x='320' y='276' width='12' height='44' rx='2'/><rect x='346' y='288' width='12' height='32' rx='2'/><rect x='372' y='282' width='12' height='38' rx='2'/><rect x='398' y='272' width='12' height='48' rx='2'/><rect x='424' y='284' width='12' height='36' rx='2'/><rect x='450' y='278' width='12' height='42' rx='2'/><rect x='476' y='268' width='12' height='52' rx='2'/><rect x='502' y='280' width='12' height='40' rx='2'/><rect x='528' y='270' width='12' height='50' rx='2'/><rect x='554' y='262' width='12' height='58' rx='2'/></g><path d='M0 262C40 256 64 238 96 242S150 214 180 220 236 178 268 188 328 142 360 152 420 104 452 112 506 66 540 70 586 40 600 36L600 320 0 320Z' fill='url(%23a)'/><path d='M0 262C40 256 64 238 96 242S150 214 180 220 236 178 268 188 328 142 360 152 420 104 452 112 506 66 540 70 586 40 600 36' stroke='url(%23l)' stroke-width='3' stroke-linecap='round'/><circle cx='540' cy='70' r='15' fill='%237dd3fc' fill-opacity='.22'/><circle cx='540' cy='70' r='5.5' fill='%23fff'/></svg>") no-repeat 100% 100% / contain;
}
body.bl-page .bl-hero .pg-hero-copy { position: relative; max-width: 40rem; }
body.bl-page .pg-hero.bl-hero h1 {
  color: #fff; font-size: clamp(2.2rem, 1.25rem + 3.5vw, 4rem); font-weight: 700;
  letter-spacing: -.042em; line-height: 1.04; margin-bottom: var(--s-5);
  /* blanc qui glisse vers un bleu glacier (remplace le dégradé encre des en-têtes clairs de pages.css) */
  background: linear-gradient(180deg, #fff 45%, #c7dbff 125%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
body.bl-page .pg-hero.bl-hero .lead { color: rgba(255, 255, 255, .84); margin-bottom: 0; font-size: clamp(1.02rem, .97rem + .3vw, 1.2rem); line-height: 1.6; max-width: 36rem; }
body.bl-page .pg-hero.bl-hero .eyebrow {
  background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .24); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); margin-bottom: var(--s-6);
}
body.bl-page .pg-hero.bl-hero .eyebrow .dot { background: #7dd3fc; }
body.bl-page .bl-hero .bl-mk-link { margin: var(--s-8) 0 0; }
body.bl-page .bl-hero .btn-white { background: #fff; color: #0b1f4d; border: 0; box-shadow: 0 12px 30px -10px rgba(2, 8, 30, .55); }
body.bl-page .bl-hero .btn-white:hover { background: #eef4ff; transform: translateY(-2px); }
body.bl-page .bl-hero .bl-mk-upd { display: flex; align-items: center; gap: .55rem; margin: var(--s-6) 0 0; color: rgba(255, 255, 255, .8); font-size: var(--t-sm); }
body.bl-page .bl-hero .bl-mk-upd::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); }

/* ---------- Recherche : barre unique, loupe, bouton dégradé ---------- */
body.bl-page .bl-search {
  position: relative; display: flex; align-items: center; gap: .5rem; max-width: 44rem; margin: 0 0 var(--s-5);
  padding: .35rem; padding-inline-start: 0; background: var(--bl-solid); border: 1px solid var(--bl-bd); border-radius: 16px;
  box-shadow: var(--bl-sh); transition: border-color var(--d-fast), box-shadow var(--d-base) var(--ease);
}
body.bl-page .bl-search::before {
  content: ""; position: absolute; inset-inline-start: 1.05rem; top: 50%; width: 18px; height: 18px; margin-top: -9px; background: var(--muted); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.6-3.6'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.6-3.6'/></svg>") center / contain no-repeat;
}
body.bl-page .bl-search:focus-within { border-color: var(--bl-bd-h); box-shadow: 0 0 0 4px var(--bl-soft), var(--bl-sh); }
body.bl-page .bl-search input {
  flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; box-shadow: none; outline: none;
  padding: .6rem .75rem; padding-inline-start: 2.9rem; font: 500 1rem var(--f-body); color: var(--ink);
}
body.bl-page .bl-search input::placeholder { color: var(--muted); opacity: 1; }
body.bl-page .bl-search input::-webkit-search-cancel-button { cursor: pointer; }
body.bl-page .bl-search .btn {
  flex: none; min-height: 44px; padding-inline: 1.3rem; border: 0; border-radius: 12px;
  background: var(--accent-grad); color: #fff; box-shadow: 0 8px 18px -8px rgba(37, 99, 235, .65);
}
body.bl-page .bl-search .btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -10px rgba(37, 99, 235, .75); background: var(--accent-grad); }

/* ---------- Rubriques : pastilles ---------- */
body.bl-page .bl-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 var(--s-12); }
body.bl-page .bl-chips a {
  display: inline-flex; align-items: center; min-height: 40px; padding: .45rem 1.05rem; border-radius: var(--r-full);
  background: var(--bl-solid); border: 1px solid var(--bl-bd); color: var(--ink-2); font-size: .92rem; font-weight: 600;
  text-decoration: none; box-shadow: var(--sh-sm);
  transition: color var(--d-fast), border-color var(--d-fast), background var(--d-fast), transform var(--d-base) var(--ease);
}
html[data-theme="dark"] body.bl-page .bl-chips a { box-shadow: none; }
body.bl-page .bl-chips a:hover { border-color: var(--bl-bd-h); color: var(--bl-accent); transform: translateY(-1px); }
body.bl-page .bl-chips a[aria-current] { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -8px rgba(37, 99, 235, .6); }

/* ---------- Titres de liste : pastille dégradée + filet jusqu'au bord ---------- */
body.bl-page .pg-sec h2 { color: var(--bl-head); letter-spacing: -.035em; }
body.bl-page .bl-list, body.bl-page .bl-mk { max-width: none; }
body.bl-page :is(.bl-list, .bl-mk) > h2 {
  display: flex; align-items: center; gap: .8rem; margin-bottom: var(--s-6);
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.1rem); font-weight: 700; line-height: 1.15;
}
body.bl-page .pg-sec:is(.bl-list, .bl-mk) > h2::before { content: ""; display: block; flex: none; width: 10px; height: 10px; margin: 0; border-radius: 3px; background: var(--accent-grad); box-shadow: 0 0 0 5px var(--bl-soft); }
body.bl-page :is(.bl-list, .bl-mk) > h2::after { content: ""; flex: 1; min-width: 2rem; height: 1px; background: linear-gradient(90deg, var(--bl-bd), transparent); }
[dir="rtl"] body.bl-page :is(.bl-list, .bl-mk) > h2::after { background: linear-gradient(270deg, var(--bl-bd), transparent); }

/* ---------- Cartes d'articles ---------- */
.bl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 24px; }
.bl-card > a {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; text-decoration: none !important;
  background: var(--bl-card); border: 1px solid var(--bl-bd); border-radius: 22px; box-shadow: var(--bl-sh);
  transition: transform var(--d-slow) var(--ease), box-shadow var(--d-slow) var(--ease), border-color var(--d-base);
}
.bl-card > a:hover { transform: translateY(-4px); border-color: var(--bl-bd-h); box-shadow: var(--bl-sh-h); }
.bl-cover { display: block; position: relative; aspect-ratio: 1200 / 630; overflow: hidden; background: #1d4ed8; }
.bl-cover::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 -1px 0 var(--bl-bd); pointer-events: none; }
.bl-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.bl-card > a:hover .bl-cover img { transform: scale(1.04); }
.bl-card-in { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.bl-kicker { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--bl-accent); margin-bottom: .65rem; }
.bl-kicker a { color: inherit; text-decoration: none; }
body.bl-page .bl-card h3 { color: var(--bl-head); font-size: 1.24rem; font-weight: 700; line-height: 1.28; letter-spacing: -.025em; margin: 0 0 .6rem; transition: color var(--d-fast); }
.bl-card > a:hover h3 { color: var(--bl-accent); }
body.bl-page .bl-card p { flex: 1; color: var(--ink-2); font-size: .98rem; line-height: 1.6; margin: 0 0 1.1rem; }
.bl-meta { color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.bl-more { display: inline-flex; align-items: center; gap: .35rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line-2); color: var(--bl-accent); font-weight: 700; font-size: .92rem; }
.bl-card > a:hover .bl-more { text-decoration: underline; text-underline-offset: 4px; }
.bl-card-lead { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .bl-card-lead > a { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  /* image entière (jamais rognée) : le fond reprend le dégradé de l'illustration si la colonne est plus haute */
  .bl-card-lead .bl-cover { aspect-ratio: auto; height: 100%; display: flex; align-items: center; background: linear-gradient(135deg, #0b3aa8, #1d4ed8 55%, #3b82f6); }
  .bl-card-lead .bl-cover img { height: auto; aspect-ratio: 1200 / 630; }
  .bl-card-lead .bl-card-in { padding: clamp(28px, 3vw, 52px); justify-content: center; }
  body.bl-page .bl-card-lead h3 { font-size: clamp(1.6rem, 1.05rem + 1.3vw, 2.35rem); line-height: 1.12; letter-spacing: -.038em; margin-bottom: .9rem; }
  body.bl-page .bl-card-lead p { flex: 0 1 auto; font-size: 1.06rem; margin-bottom: 1.4rem; }
  .bl-card-lead .bl-more { border-top: 0; padding-top: 0; margin-top: 1.1rem; }
}
body.bl-page .bl-empty { margin: 0; color: var(--muted); padding: var(--s-8) var(--s-6); background: var(--bl-tint); border: 1px dashed var(--bl-bd); border-radius: var(--r-lg); text-align: center; }

/* ---------- Pagination, flux RSS ---------- */
.bl-pager { display: flex; justify-content: space-between; gap: var(--s-3); margin: var(--s-8) 0 var(--s-10); }
body.bl-page .bl-pager .btn { background: var(--bl-solid); color: var(--bl-head); border: 1px solid var(--bl-bd); border-radius: var(--r-full); padding-inline: 1.3rem; box-shadow: var(--bl-sh); }
body.bl-page .bl-pager .btn:hover { border-color: var(--bl-bd-h); color: var(--bl-accent); transform: translateY(-2px); box-shadow: var(--bl-sh-h); }
.bl-rss { margin-top: var(--s-6); color: var(--muted); font-size: var(--t-sm); }
.bl-rss a { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; color: var(--ink-2); font-weight: 600; text-decoration: none; transition: color var(--d-fast); }
.bl-rss a::before {
  content: ""; width: 16px; height: 16px; background: #f97316; border-radius: 4px;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='5' cy='19' r='2.4'/><path d='M3 10.5a10.5 10.5 0 0 1 10.5 10.5M3 3a18 18 0 0 1 18 18' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='5' cy='19' r='2.4'/><path d='M3 10.5a10.5 10.5 0 0 1 10.5 10.5M3 3a18 18 0 0 1 18 18' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/></svg>") center / contain no-repeat;
}
.bl-rss a:hover { color: var(--bl-accent); }

/* =========================================================
   Article : colonne de lecture centrée, typographie éditoriale
   ========================================================= */
.bl-art { max-width: 46rem; margin: 0 auto; }
.bl-page .bl-head .bl-kicker { margin-bottom: 1rem; }
.bl-page .bl-head .bl-kicker a {
  display: inline-flex; align-items: center; min-height: 32px; padding: .3rem .85rem; border-radius: var(--r-full);
  background: var(--bl-soft); border: 1px solid var(--bl-soft-bd); color: var(--bl-accent); transition: background var(--d-fast);
}
.bl-page .bl-head .bl-kicker a:hover { background: var(--blue-100); }
.bl-page .bl-head h1 {
  color: var(--bl-head); font-size: clamp(2.05rem, 1.25rem + 2.9vw, 3.35rem); font-weight: 700;
  line-height: 1.06; letter-spacing: -.042em; margin: 0 0 var(--s-5);
}
.bl-page .bl-head .lead { color: var(--ink-2); font-size: clamp(1.1rem, 1.02rem + .35vw, 1.28rem); line-height: 1.6; margin-bottom: var(--s-6); }
.bl-dates {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: .45rem; row-gap: .2rem;
  color: var(--muted); font-size: .9rem; margin: 0 0 var(--s-8); padding-bottom: var(--s-6); border-bottom: 1px solid var(--bl-bd);
}
/* pastille de la rédaction (même fichier que le logo de l'en-tête : aucune requête de plus) */
.bl-dates::before {
  content: ""; flex: none; width: 34px; height: 34px; margin-inline-end: .35rem; border-radius: 50%;
  background: #0b1f4d url("/assets/logo-128.webp") center / cover; box-shadow: 0 0 0 2px var(--bl-bg), 0 0 0 3px var(--bl-soft-bd);
}
.bl-hero-img { margin: 0 0 var(--s-10); border-radius: 22px; overflow: hidden; border: 1px solid var(--bl-bd); box-shadow: 0 24px 48px -28px rgba(29, 78, 216, .5); }
html[data-theme="dark"] .bl-hero-img { box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .6); }
.bl-hero-img img { width: 100%; height: auto; aspect-ratio: 1200 / 630; }

.bl-body { font-size: 1.125rem; }
.bl-page .bl-art .bl-body :is(p, ul, ol) { color: var(--bl-text); line-height: 1.8; margin-bottom: var(--s-5); }
.bl-body ul, .bl-body ol { padding-inline-start: 1.4rem; }
.bl-body ul { list-style: disc; }
.bl-body li { margin: .45rem 0; }
.bl-body li::marker { color: var(--bl-accent); }
.bl-body strong { color: var(--bl-head); font-weight: 700; }
.bl-page .bl-art .bl-body h2 {
  color: var(--bl-head); font-size: clamp(1.5rem, 1.18rem + 1.05vw, 2rem); font-weight: 700;
  letter-spacing: -.034em; line-height: 1.18; margin: var(--s-12) 0 var(--s-4); scroll-margin-top: 96px;
}
.bl-page .bl-art .bl-sec > h2::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--accent-grad); margin-bottom: 1rem; }
.bl-page .bl-art .bl-body a:not(.btn) { color: var(--bl-accent); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--bl-soft-bd); text-underline-offset: 3px; transition: text-decoration-color var(--d-fast); }
.bl-page .bl-art .bl-body a:not(.btn):hover { text-decoration-color: currentColor; }
.bl-body code { font-family: var(--f-mono); font-size: .88em; padding: .1rem .35rem; border-radius: 6px; background: var(--bl-tint); border: 1px solid var(--bl-bd); color: var(--bl-head); direction: ltr; unicode-bidi: isolate; }
.bl-body table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: var(--s-6) 0; }
.bl-body :is(th, td) { padding: .7rem .9rem; border-bottom: 1px solid var(--bl-bd); text-align: start; color: var(--bl-text); }
.bl-body th { color: var(--bl-head); font-weight: 700; background: var(--bl-tint); }

/* encarts du corps d'article */
.bl-takeaways, .bl-example, .bl-cta, .bl-data, .bl-method { margin: var(--s-8) 0; border-radius: 20px; }
.bl-page .bl-art .bl-body :is(.bl-takeaways, .bl-data, .bl-sources, .bl-related, .bl-faq) h2 { margin-top: 0; font-size: 1.2rem; letter-spacing: -.02em; }

/* À retenir : liste cochée sur fond bleuté */
.bl-takeaways { padding: var(--s-6) var(--s-6) var(--s-4); background: linear-gradient(180deg, var(--bl-soft), transparent 140%); border: 1px solid var(--bl-soft-bd); }
.bl-page .bl-art .bl-body .bl-takeaways h2 { display: flex; align-items: center; gap: .6rem; color: var(--bl-accent); margin-bottom: var(--s-4); }
.bl-takeaways h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px var(--bl-soft); }
.bl-page .bl-art .bl-body .bl-takeaways ul { list-style: none; padding: 0; margin: 0; }
.bl-page .bl-art .bl-body .bl-takeaways li { position: relative; margin: 0 0 .7rem; padding-inline-start: 2rem; line-height: 1.65; font-size: 1.05rem; }
.bl-takeaways li::before { content: ""; position: absolute; inset-inline-start: 0; top: .22em; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--bl-soft); border: 1px solid var(--bl-soft-bd); }
.bl-takeaways li::after {
  content: ""; position: absolute; inset-inline-start: .3rem; top: calc(.22em + .3rem); width: .7rem; height: .7rem; background: var(--bl-accent);
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'><path d='M4.5 12.5l5 5L19.5 7'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'><path d='M4.5 12.5l5 5L19.5 7'/></svg>") center / contain no-repeat;
}

/* Exemple chiffré : ambre */
.bl-example { padding: var(--s-6); background: var(--bl-amber-bg); border: 1px solid var(--bl-amber-bd); border-inline-start-width: 4px; }
.bl-example-t { font-weight: 800; color: var(--bl-amber) !important; font-size: var(--t-sm) !important; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .6rem !important; }
.bl-page .bl-art .bl-body .bl-example-n { color: var(--bl-amber-2) !important; font-size: var(--t-xs); margin: 0; }

/* Appel à l'outil : même carte « nuit bleue » que le bandeau */
.bl-cta { position: relative; overflow: hidden; isolation: isolate; padding: clamp(1.4rem, 1rem + 1.6vw, 2.1rem); color: #fff; background: var(--bl-midnight); box-shadow: var(--bl-midnight-sh); border: 0; }
.bl-cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 36px 36px, linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 36px 36px;
  -webkit-mask-image: radial-gradient(90% 120% at 100% 0%, #000 20%, transparent 70%); mask-image: radial-gradient(90% 120% at 100% 0%, #000 20%, transparent 70%);
}
.bl-cta-k { font-size: 11.5px !important; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #bfdbfe !important; margin-bottom: .35rem !important; }
.bl-cta-t { font-family: var(--f-disp); color: #fff !important; font-weight: 700; font-size: 1.3rem !important; letter-spacing: -.025em; line-height: 1.25 !important; margin-bottom: .5rem !important; }
.bl-page .bl-art .bl-body .bl-cta p { color: rgba(255, 255, 255, .86); }
.bl-page .bl-art .bl-body .bl-cta p:last-child { margin: var(--s-5) 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem; }
.bl-cta small { color: rgba(255, 255, 255, .72); font-size: var(--t-sm); }
.bl-page .bl-cta .btn-pri { background: #fff; color: #0b1f4d; box-shadow: 0 12px 28px -12px rgba(2, 8, 30, .6); text-decoration: none !important; }
.bl-page .bl-cta .btn-pri:hover { background: #eef4ff; transform: translateY(-2px); }

/* Données officielles (article et page Marchés) : tableau de marché */
.bl-data { padding: var(--s-5) var(--s-6); background: var(--bl-card); border: 1px solid var(--bl-bd); box-shadow: var(--bl-sh); }
.bl-data dl { margin: 0; display: grid; gap: 0; }
.bl-data-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3) var(--s-6); align-items: center;
  margin-inline: calc(var(--s-6) * -1); padding: .95rem var(--s-6); border-top: 1px solid var(--line-2);
  transition: background var(--d-fast);
}
.bl-data-row:hover { background: var(--bl-tint); }
.bl-data-row dt { min-width: 0; }
body.bl-page .bl-data .bl-data-row dt a { color: var(--bl-head); font-weight: 600; line-height: 1.4; text-decoration: none; transition: color var(--d-fast); }
body.bl-page .bl-data .bl-data-row dt a:hover { color: var(--bl-accent); }
.bl-data-row dt a::after {
  content: ""; display: inline-block; width: .7em; height: .7em; margin-inline-start: .35em; vertical-align: .05em; background: currentColor; opacity: .45;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M7 17 17 7M8.5 7H17v8.5'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M7 17 17 7M8.5 7H17v8.5'/></svg>") center / contain no-repeat;
}
.bl-data-row dt small { display: block; margin-top: .15rem; color: var(--muted); font-size: var(--t-xs); }
.bl-data-row dd {
  margin: 0; display: grid; grid-template-columns: auto auto; grid-template-areas: "spark val" "spark meta";
  column-gap: var(--s-5); row-gap: .1rem; align-items: center; justify-items: end; text-align: end;
}
.bl-page .bl-data-row dd strong { grid-area: val; color: var(--bl-head); font-family: var(--f-mono); font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.bl-data-row dd > span { grid-area: meta; color: var(--muted); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.bl-spark { grid-area: spark; width: 120px; height: 32px; color: var(--bl-spark); }
.bl-page .bl-art .bl-body .bl-note, .bl-note { color: var(--muted); font-size: var(--t-sm); line-height: 1.6; }
.bl-page .bl-art .bl-body .bl-data .bl-note { margin: var(--s-3) 0 0; padding-top: var(--s-3); border-top: 1px solid var(--line-2); }
.bl-model { padding: var(--s-4) var(--s-5); border-inline-start: 3px solid var(--bl-amber); background: var(--bl-amber-bg); border-radius: 10px; }

/* FAQ */
.bl-page .bl-body .faq { gap: .6rem; }
.bl-page .bl-body .faq details { background: var(--bl-card); border: 1px solid var(--bl-bd); border-radius: 16px; padding: 0 var(--s-5); box-shadow: var(--bl-sh); transition: border-color var(--d-fast), background var(--d-fast); }
.bl-page .bl-body .faq details[open] { border-color: var(--bl-bd-h); background: linear-gradient(180deg, var(--bl-soft), transparent 70%), var(--bl-bg); }
.bl-page .bl-body .faq summary { color: var(--bl-head); font-size: 1.04rem; font-weight: 700; min-height: 56px; }
.bl-page .bl-body .faq summary::after { color: var(--bl-accent); }
.bl-page .bl-body .faq summary:hover { color: var(--bl-accent); }
.bl-page .bl-art .bl-body .faq p { margin: 0; color: var(--bl-text); font-size: 1.02rem; line-height: 1.75; }

/* Sources : numérotées */
.bl-page .bl-art .bl-body .bl-sources ol { list-style: none; counter-reset: src; padding: 0; margin: 0; display: grid; gap: .55rem; }
.bl-sources li { counter-increment: src; position: relative; padding-inline-start: 2.3rem; font-size: .98rem; line-height: 1.6; margin: 0 !important; }
.bl-sources li::before {
  content: counter(src); position: absolute; inset-inline-start: 0; top: .1em; width: 1.6rem; height: 1.6rem; display: grid; place-items: center;
  border-radius: 8px; background: var(--bl-tint); border: 1px solid var(--bl-bd); color: var(--ink-2); font: 700 .75rem/1 var(--f-mono);
}
.bl-sources small { color: var(--muted); }

/* À lire aussi : cartes avec flèche */
.bl-page .bl-art .bl-body .bl-related ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: .75rem; }
.bl-page .bl-art .bl-body .bl-related li { margin: 0; }
.bl-page .bl-art .bl-body .bl-related a {
  display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; height: 100%; padding: 1rem 1.1rem;
  background: var(--bl-card); border: 1px solid var(--bl-bd); border-radius: 16px; box-shadow: var(--bl-sh);
  color: var(--bl-head); font-size: 1rem; font-weight: 700; line-height: 1.4; text-decoration: none;
  transition: transform var(--d-base) var(--ease), border-color var(--d-base), box-shadow var(--d-base), color var(--d-fast);
}
.bl-page .bl-art .bl-body .bl-related a::after { content: "→"; flex: none; color: var(--bl-accent); font-weight: 700; transition: transform var(--d-base) var(--ease); }
[dir="rtl"] .bl-page .bl-art .bl-body .bl-related a::after { content: "←"; }
.bl-page .bl-art .bl-body .bl-related a:hover { transform: translateY(-3px); border-color: var(--bl-bd-h); box-shadow: var(--bl-sh-h); color: var(--bl-accent); }
.bl-page .bl-art .bl-body .bl-related a:hover::after { transform: translateX(3px); }
[dir="rtl"] .bl-page .bl-art .bl-body .bl-related a:hover::after { transform: translateX(-3px); }

/* Méthode et avertissement */
.bl-method { padding: var(--s-5) var(--s-6); background: var(--bl-tint); border: 1px solid var(--bl-bd); }
.bl-page .bl-art .bl-body .bl-method p { color: var(--muted); font-size: var(--t-sm); line-height: 1.65; margin: 0 0 .4rem; }
.bl-page .bl-art .bl-body .bl-method p:last-child { margin: 0; }
.bl-page .bl-art .bl-body .bl-risk { color: var(--muted); font-size: var(--t-xs); line-height: 1.65; padding-top: var(--s-5); margin-top: var(--s-8); border-top: 1px solid var(--bl-bd); }
.bl-page .pg-404 h1 { color: var(--bl-head); letter-spacing: -.035em; }

/* =========================================================
   Page « Marchés » : panneaux de données et communiqués de la semaine
   ========================================================= */
.bl-mk { margin-bottom: var(--s-12); }
.bl-mk .bl-data { margin: 0; padding-block: .25rem; }
.bl-mk .bl-data-row:first-child { border-top: 0; }
.bl-releases { list-style: none; padding: 0; margin: 0; background: var(--bl-card); border: 1px solid var(--bl-bd); border-radius: 20px; overflow: hidden; box-shadow: var(--bl-sh); }
.bl-releases li {
  display: grid; grid-template-columns: 8.5rem 12rem minmax(0, 1fr); gap: .5rem var(--s-5); align-items: baseline;
  padding: .95rem var(--s-6); border-top: 1px solid var(--line-2); transition: background var(--d-fast);
}
.bl-releases li:first-child { border-top: 0; }
.bl-releases li:hover { background: var(--bl-tint); }
.bl-releases time { color: var(--muted); font-size: var(--t-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bl-rel-pub { display: flex; align-items: baseline; gap: .5rem; min-width: 0; color: var(--ink-2); font-size: var(--t-sm); font-weight: 600; }
.bl-rel-pub::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--bl-spark); transform: translateY(-2px); }
body.bl-page .bl-mk .bl-releases a { color: var(--bl-head); font-weight: 600; line-height: 1.45; text-decoration: none; overflow-wrap: anywhere; transition: color var(--d-fast); }
body.bl-page .bl-mk .bl-releases a:hover { color: var(--bl-accent); text-decoration: underline; text-underline-offset: 3px; }
.bl-mk-note { max-width: 62rem; margin: var(--s-6) 0 0; }

/* ---------- Petits écrans ---------- */
@media (max-width: 860px) {
  body.bl-page .pg-hero.bl-hero, .bl-cta { border-radius: 22px; }
  body.bl-page .pg-links a { font-size: var(--t-sm); }
  .bl-grid { gap: 18px; }
  body.bl-page .bl-card h3 { font-size: 1.18rem; }
  body.bl-page .bl-chips { margin-bottom: var(--s-10); }
  .bl-releases li { grid-template-columns: auto minmax(0, 1fr); gap: .25rem var(--s-4); padding-inline: var(--s-5); }
  .bl-releases li > a { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body.bl-page .bl-hero::after { width: 78%; height: 46%; opacity: .5; }
  body.bl-page .bl-search .btn { padding-inline: 1rem; }
  .bl-card-in { padding: 18px 20px 20px; }
  .bl-data { padding-inline: var(--s-5); }
  .bl-data-row { grid-template-columns: minmax(0, 1fr); margin-inline: calc(var(--s-5) * -1); padding-inline: var(--s-5); }
  .bl-data-row dd { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "val spark" "meta meta"; justify-items: start; text-align: start; }
  .bl-spark { justify-self: end; width: 96px; height: 28px; }
  .bl-takeaways, .bl-example { padding-inline: var(--s-5); }
  .bl-dates::before { width: 30px; height: 30px; }
}

/* ---------- Apparition au défilement (navigateurs compatibles, mouvement autorisé) ---------- */
@keyframes bl-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .bl-card:not(.bl-card-lead), .bl-related li, .bl-mk .bl-data, .bl-releases {
      animation: bl-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .bl-card > a, .bl-cover img, .bl-chips a, .bl-related a, .bl-pager .btn { transition: none !important; }
  .bl-card > a:hover, .bl-card > a:hover .bl-cover img, .bl-chips a:hover, .bl-page .bl-art .bl-body .bl-related a:hover, .bl-pager .btn:hover { transform: none !important; }
}

/* =========================================================
   Calculateur (pages outils) : le sombre reste celui du site, le clair est ajouté ici
   ========================================================= */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.calc-form { display: grid; gap: var(--s-4); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--s-5); }
.calc-form label { display: grid; gap: .35rem; color: var(--ink-2); font-size: var(--t-sm); font-weight: 600; }
.calc-form input, .calc-form select { padding: .65rem var(--s-3); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-3); color: #fff; font: 600 var(--t-base) var(--f-body); direction: ltr; }
.calc-form input:focus, .calc-form select:focus { outline: 2px solid var(--blue-200); outline-offset: 2px; }
.calc-form select option { background: var(--pop); }
.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.calc-unit { display: flex; gap: .5rem; }
.calc-unit label { flex: 1; flex-direction: row; align-items: center; gap: .4rem; }
.calc-out { display: grid; gap: var(--s-3); }
.calc-big { background: linear-gradient(135deg, rgba(59,130,246,.16), rgba(255,255,255,.02)); border: 1px solid var(--blue-100); border-radius: var(--r-xl); padding: var(--s-5); }
.calc-big small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-300); }
.calc-big strong { display: block; font-family: var(--f-mono); font-size: clamp(2rem, 1.5rem + 2vw, 3rem); color: #fff; line-height: 1.1; margin: .25rem 0; direction: ltr; }
.calc-big span { color: var(--ink-2); font-size: var(--t-sm); }
.calc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-3); margin: 0; }
.calc-facts div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-4); }
.calc-facts dt { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.calc-facts dd { margin: .3rem 0 0; color: #fff; font-weight: 700; font-family: var(--f-mono); direction: ltr; text-align: start; }
.calc-warn { color: var(--amber); font-size: var(--t-sm); min-height: 1.4em; }
.calc-spec td a { color: var(--blue-300); }
html:not([data-theme="dark"]) .calc-form { background: #fff; box-shadow: var(--sh-md); }
html:not([data-theme="dark"]) .calc-form input, html:not([data-theme="dark"]) .calc-form select { background: #fff; border-color: rgba(10, 22, 40, .14); color: var(--ink); }
html:not([data-theme="dark"]) .calc-form select option { background: #fff; color: var(--ink); }
html:not([data-theme="dark"]) .calc-big { background: linear-gradient(135deg, #eaf1ff, #fff 70%); border-color: rgba(37, 99, 235, .22); box-shadow: var(--sh-md); }
html:not([data-theme="dark"]) .calc-big strong, html:not([data-theme="dark"]) .calc-facts dd { color: var(--ink); }
html:not([data-theme="dark"]) .calc-facts div { background: #fff; box-shadow: var(--sh-sm); }
html:not([data-theme="dark"]) .calc-warn { color: #a35a00; }
@media (max-width: 860px) {
  .calc { grid-template-columns: minmax(0, 1fr); }
}
