/* INTGRAL IA LAB — blog et pages légales.
   Chargée après /assets/css/lab.css, qui fournit les polices, les jetons (--c-*, --f-*, --rad-*),
   la navigation, les boutons et le pied de page. Ici : seulement la mise en page éditoriale. */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 300 800; font-display: swap; src: url(/assets/fonts/geist-normal-latin.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(/assets/fonts/geistmono-normal-latin.woff2) format('woff2'); }

:root { --ink: var(--c-text); --t2: #2c2d33; --t3: var(--c-mute); --line: var(--c-rule); --line2: rgba(10, 14, 28, .07); --e: var(--e-io); --eo: var(--e-out); }
.mono { font-family: var(--f-text); font-weight: 500; letter-spacing: 0; }
svg:where(:not([viewBox="0 0 24 24"])) { display: block; width: 100%; height: auto; }
[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* ---------- Liste : ouverture sombre, comme l'accueil ---------- */
.top { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--nav-h) + clamp(48px, 7vw, 104px)) 0 clamp(44px, 6vw, 88px); background: var(--c-ink); color: #fff; border-radius: 0 0 var(--rad-l) var(--rad-l); }
.top::before { content: ""; position: absolute; inset: 0; z-index: -1; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 180px); mask-image: linear-gradient(to bottom, transparent, #000 180px); background: radial-gradient(50% 80% at 84% 30%, rgba(255, 214, 10, .13), transparent 70%); }
.top::after { content: ""; position: absolute; right: -4%; top: 12%; bottom: 0; z-index: -1; width: 46%; background: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1.4px) 0 0 / 22px 22px; -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 96%); mask-image: radial-gradient(closest-side, #000 30%, transparent 96%); }
.label { display: inline-flex; align-items: center; gap: 12px; font-size: .9375rem; font-weight: 500; color: var(--c-mute-d); }
.label::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--c-blue); }
.top h1 { margin-top: clamp(18px, 2vw, 28px); max-width: 17em; font-size: var(--t-d2); line-height: .96; }
.intro { margin-top: clamp(18px, 2vw, 28px); max-width: 34em; font-size: var(--t-lead); line-height: 1.5; color: var(--c-mute-d); }

/* ---------- Filtres ---------- */
.filters { display: flex; gap: 6px; margin: clamp(24px, 3vw, 40px) 0 0; padding-bottom: 4px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.filters::-webkit-scrollbar { display: none; }
.filters a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-size: .9375rem; font-weight: 500; color: var(--t2); transition: background-color .3s var(--eo), color .3s var(--eo), box-shadow .3s var(--eo); }
.filters a span { font-size: .8125rem; font-variant-numeric: tabular-nums; color: var(--t3); }
.filters a:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.filters a[aria-current] { background: var(--ink); box-shadow: none; color: #fff; }
.filters a[aria-current] span { color: var(--c-glow); }

.block { padding: clamp(36px, 5vw, 64px) 0 0; }
.kick { display: flex; align-items: center; gap: 12px; margin: 0 0 clamp(18px, 2vw, 28px); font: 500 .9375rem/1.2 var(--f-text); letter-spacing: 0; color: var(--t3); }
.kick::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--c-blue-d); }

/* ---------- Catégorie ---------- */
.cat { display: flex; align-items: center; gap: 8px; font: 600 .875rem/1.2 var(--f-text); color: var(--ink); }
.cat i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.demo { margin-left: 6px; padding: 3px 9px; border-radius: 999px; background: #ffe9d6; color: #a84b06; font-size: .75rem; }

/* ---------- À la une, cartes ---------- */
.feat { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(22px, 3.4vw, 56px); align-items: center; padding: clamp(14px, 1.6vw, 22px); border-radius: var(--rad-m); background: var(--c-mist); }
.feat-t { padding: clamp(6px, 1vw, 14px) clamp(6px, 1.6vw, 24px) clamp(10px, 1vw, 14px) 0; }
.feat-img, .card-img { display: block; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line2); }
.feat-img svg, .card-img svg { transition: transform 1s var(--eo); }
.feat:hover .feat-img svg, .card:hover .card-img svg { transform: scale(1.025); }
.feat h2 { margin-top: 14px; font-size: clamp(1.7rem, 2.7vw, 2.5rem); line-height: 1.02; }
.feat .ex { margin-top: 14px; font-size: 1.0625rem; line-height: 1.55; color: var(--t2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.meta { margin-top: 14px; font-size: .875rem; color: var(--t3); }
.read { display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; font-weight: 600; color: var(--ink); }
.read svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--eo); }
.read:hover svg { transform: translateX(5px); }
h2 a, h3 a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .5s var(--eo); }
h2 a:hover, h3 a:hover { background-size: 100% 1.5px; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 3.4vw, 48px) clamp(18px, 2vw, 28px); }
.card .cat { margin-top: 18px; }
.card h3 { margin-top: 10px; font-size: 1.4375rem; line-height: 1.1; }
.card .ex { margin-top: 10px; font-size: .9875rem; line-height: 1.5; color: var(--t3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: 12px; }
@media (max-width: 1023px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .grid { grid-template-columns: 1fr; } .feat { grid-template-columns: 1fr; } .feat-t { padding: 4px 6px 10px; } }

.end { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px 32px; margin: clamp(56px, 7vw, 96px) 0 var(--s-sec); padding: clamp(24px, 3.4vw, 48px); border-radius: var(--rad-m); background: var(--c-ink); color: #fff; }
.end p { font: 800 clamp(1.5rem, 2.6vw, 2.3rem)/1.05 var(--f-display); font-stretch: 86%; }
.end .cta { --b-bg: var(--c-blue); --b-fg: var(--c-ink); --b-ico-bg: var(--c-ink); --b-ico-fg: var(--c-blue); }

/* apparition */
[data-rv] { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--eo), transform 1s var(--eo); }
[data-rv].in { opacity: 1; transform: none; }
html:not(.js) [data-rv] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-rv] { opacity: 1; transform: none; transition: none; } }

/* ---------- Article ---------- */
.draftbar { width: calc(100% - 2 * var(--s-edge)); max-width: var(--s-max); margin: calc(var(--nav-h) + 20px) auto 0; padding: 12px 18px; border-radius: var(--rad-s); background: #ffe9d6; color: #7a3a18; font-size: .875rem; }
.draftbar .mono { margin-right: 8px; font-weight: 700; }
.art-h { padding-top: calc(var(--nav-h) + clamp(36px, 5vw, 72px)); }
.draftbar + .art .art-h { padding-top: clamp(24px, 3vw, 40px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(20px, 2.4vw, 32px); font-size: .875rem; color: var(--t3); }
.crumbs a:hover { color: var(--ink); }
.art-h h1 { margin-top: 14px; max-width: 18em; font-size: clamp(2.2rem, 4.4vw, 4rem); line-height: .98; }
.lede { margin-top: clamp(18px, 2vw, 26px); max-width: 38em; font-size: var(--t-lead); line-height: 1.55; color: var(--t2); }
.byline { display: flex; align-items: center; gap: 14px; margin-top: 26px; font-size: .9375rem; line-height: 1.45; }
.byline img { flex: none; border-radius: 50%; }
.byline .mono { font-size: .875rem; font-weight: 400; color: var(--t3); }
.av { display: inline-grid; place-items: center; flex: none; border-radius: 50%; font-weight: 700; font-size: .9375rem; color: var(--ink); }
.art-cover { margin-top: clamp(28px, 3.4vw, 48px); max-width: 980px; border-radius: var(--rad-m); overflow: hidden; box-shadow: 0 0 0 1px var(--line2), 0 50px 80px -56px rgba(10, 14, 28, .5); }
.art-grid { display: grid; grid-template-columns: 220px minmax(0, 700px); gap: clamp(32px, 5vw, 80px); justify-content: start; padding-top: clamp(36px, 5vw, 72px); }
.toc-w { position: relative; }
.toc { position: sticky; top: calc(var(--nav-h) + 28px); display: flex; flex-direction: column; font-size: .875rem; line-height: 1.35; }
.toc p { margin-bottom: 12px; font-weight: 600; color: var(--ink); }
.toc a { padding: 7px 0 7px 14px; border-left: 2px solid var(--line2); color: var(--t3); transition: color .25s, border-color .25s; }
.toc a:hover { color: var(--ink); }
.toc a.on { border-left-color: var(--c-blue); color: var(--ink); font-weight: 600; }
.toc-m { display: none; }
@media (max-width: 899px) {
  .art-grid { grid-template-columns: minmax(0, 1fr); }
  .toc-w { display: none; }
  .toc-m { display: block; margin-bottom: 24px; border-radius: var(--rad-s); background: var(--c-mist); }
  .toc-m summary { padding: 14px 18px; font-weight: 600; cursor: pointer; }
  .toc-m nav { display: grid; gap: 2px; padding: 0 18px 14px; font-size: .9375rem; }
  .toc-m nav a { padding: 8px 0; color: var(--t2); }
}

.prose { min-width: 0; font-size: 1.125rem; line-height: 1.7; color: var(--t2); }
.prose p { margin-top: 18px; }
.prose > :first-child { margin-top: 0; }
.prose strong, .prose b { font-weight: 600; color: var(--ink); }
.prose h2 { margin-top: 56px; font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.05; color: var(--ink); }
.prose h3 { margin-top: 34px; font: 600 1.25rem/1.3 var(--f-text); letter-spacing: -.01em; color: var(--ink); }
.prose h2 + p, .prose h3 + p { margin-top: 14px; }
.prose ul, .prose ol { margin-top: 16px; padding-left: 1.2em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-top: 8px; padding-left: 4px; }
.prose li::marker { color: var(--c-blue-d); }
.prose a:not(.cta, .read) { color: var(--c-blue-d); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:not(.cta, .read):hover { text-decoration-thickness: 2px; }
.tldr { padding: 22px 24px; border-radius: var(--rad-m); background: var(--c-mist); }
.tldr .mono { font-weight: 700; color: var(--c-blue-d); }
.tldr ul { margin-top: 10px; font-size: 1.0625rem; line-height: 1.55; }
blockquote { margin-top: 36px; padding-left: 22px; border-left: 4px solid var(--c-blue); }
blockquote p { margin: 0 !important; font: 300 clamp(1.5rem, 2.4vw, 2rem)/1.15 var(--f-display); font-stretch: 86%; color: var(--ink); }
.callout, .lab { margin-top: 28px; padding: 18px 22px; border-radius: var(--rad-s); background: rgba(255, 214, 10, .22); font-size: 1.0625rem; line-height: 1.55; color: var(--ink); }
.callout .mono, .lab .mono { font-size: .875rem; font-weight: 700; color: var(--c-blue-d); }
.callout p, .lab p { margin: 6px 0 0 !important; }
.callout.warn { background: #ffefe2; }
.callout.warn .mono { color: #a84b06; }
.lab { background: var(--c-ink); color: #fff; }
.lab .mono { color: var(--c-glow); }
.lab p + p { margin-top: 10px !important; }
.lab .tw { margin-top: 12px; border-top-color: rgba(255, 255, 255, .3); }
.lab table { font-size: .9375rem; }
.lab th { color: rgba(255, 255, 255, .6); border-bottom-color: rgba(255, 255, 255, .16); }
.lab td { border-bottom-color: rgba(255, 255, 255, .1); }
.lab td:first-child { color: #fff; }
.tw { margin-top: 24px; overflow-x: auto; border-top: 2px solid var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; }
th { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); text-align: left; font: 600 .875rem/1.3 var(--f-text); color: var(--t3); }
td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line2); vertical-align: top; }
td:first-child { font-weight: 600; color: var(--ink); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 22px; margin-top: 28px; border-bottom: 1px solid var(--line); }
.kpis div { padding: 18px 0 16px; border-top: 1px solid var(--line); }
.kpis b { display: block; font: 300 2.25rem/1 var(--f-display); font-stretch: 84%; color: var(--c-blue-d); }
.kpis span { display: block; margin-top: 8px; font-size: .9375rem; line-height: 1.4; color: var(--t3); }
.code { margin-top: 24px; padding: 18px 20px; border-radius: var(--rad-s); background: var(--c-ink); color: #fff6c2; font: 400 .875rem/1.6 'Geist Mono', ui-monospace, monospace; overflow-x: auto; white-space: pre; }
.faq { margin-top: 12px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 18px 0; list-style: none; cursor: pointer; font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); background: linear-gradient(currentColor, currentColor) center / 12px 1.75px no-repeat, linear-gradient(currentColor, currentColor) center / 1.75px 12px no-repeat; transition: transform .45s var(--eo), background-color .3s, color .3s; }
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--ink); color: #fff; box-shadow: none; }
.faq details p { margin: 0 0 20px; font-size: 1.0625rem; }
.src { margin-top: 12px; font-size: 1rem; line-height: 1.5; }
.src li { margin-top: 8px; }

/* mini interfaces dans le corps d'article */
.ui { margin: 28px 0 0; }
.ui-w { padding: 5px; border-radius: 16px; background: var(--c-ink); }
.ui-bar { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; }
.ui-b { padding: 16px 18px; border-radius: 12px; background: #fff; font-size: .9375rem; line-height: 1.45; color: var(--ink); }
.ui-h { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; }
.ui-r { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line2); }
.ui-r b { font-weight: 600; }
.ui-r .mono { font-size: .875rem; font-variant-numeric: tabular-nums; }
.st { padding: 3px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.st.ok { background: #dcf5e7; color: #0b6e3d; }
.st.warn { background: #ffe9d6; color: #a84b06; }
.ui-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ui-n { padding: 8px 14px; border-radius: 999px; background: var(--c-mist); font-size: .875rem; font-weight: 500; }
.ui-n.on { background: var(--c-blue); color: var(--c-ink); }
.ui-ar { color: var(--t3); }
.ui-q { width: fit-content; max-width: 85%; margin-left: auto; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--c-ink); color: #fff; }
.ui-a { max-width: 92%; margin-top: 10px; padding: 12px 14px; border-radius: 16px 16px 16px 4px; background: var(--c-mist); }
.ui-src { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ui-src span { display: flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 999px; background: var(--c-mist); font-size: .8125rem; }
.ui-src b { color: var(--c-blue-d); }
.ui figcaption { margin-top: 10px; font-size: .875rem; color: var(--t3); }

.next { margin-top: 56px; padding: clamp(22px, 3vw, 36px); border-radius: var(--rad-m); background: var(--c-mist); }
.next p { margin: 0; font-size: 1.125rem; color: var(--ink); }
.next div { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 18px; }
.next .read { margin-top: 0; }
.rel { margin-top: clamp(48px, 6vw, 88px); padding: clamp(36px, 5vw, 64px) 0 var(--s-sec); border-top: 1px solid var(--line); }

/* pages légales : une seule colonne de lecture */
.art-grid[style] { padding-bottom: var(--s-sec); }
