/* Articles d'aadatech.com (tools/articles.py). S'ajoute à /style.css. */
.art-page { --a1: #2F6FDB; --a2: #E8702A; --a3: #1F8F5A; --a4: #D62828; --a5: #7A4FD6; --hl: #FDEF42; }
.art-c1 { --k: #E8702A; --k2: #FFC46E; } .art-c2 { --k: #1F8F5A; --k2: #A7E3C2; } .art-c3 { --k: #2F6FDB; --k2: #B9D2FF; } .art-c4 { --k: #7A4FD6; --k2: #D6C8FF; } .art-c5 { --k: #D62828; --k2: #FFC0B8; }

/* index */
.art-hero { padding-block: 56px 18px; }
.art-hero h1 { max-width: 16ch; margin-bottom: 18px; }
.art-hero .lede { max-width: 54ch; }
.art-list { display: grid; gap: 22px; padding-block: 28px 20px; }
.art-item { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.art-item:hover, .art-item:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb, var(--k) 50%, var(--line)); box-shadow: 0 26px 50px -32px rgba(20, 20, 22, .45); }
.art-item img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.art-item div { padding: 26px 28px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.art-item h2, .art-item h3 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 600; text-wrap: balance; }
.art-item p { margin: 0; color: var(--soft); font-size: 16px; }
.art-meta { font: 500 12px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--faint); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.art-meta .tag { color: var(--k); }
.art-item:first-child { grid-template-columns: 1fr; }
.art-item:first-child img { aspect-ratio: 21 / 9; }
.art-item:first-child h2 { font-size: clamp(26px, 3.6vw, 40px); }

/* article */
.art { --col: 700px; }
.art-head { max-width: var(--col); margin: 0 auto; padding-block: 48px 26px; }
.art-head .art-meta { margin-bottom: 18px; }
.art-head h1 { font-size: clamp(34px, 5.4vw, 58px); max-width: none; margin-bottom: 18px; }
.art-dek { font-size: 21px; line-height: 1.5; color: var(--soft); margin: 0; text-wrap: pretty; }
.art-by { display: flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 14px; color: var(--soft); }
.art-by i { width: 28px; height: 28px; border-radius: 50%; background: conic-gradient(var(--k), var(--k2), var(--k)); }
.art-cover { max-width: 1040px; margin: 8px auto 0; }
.art-cover img, .art-cover svg { width: 100%; border-radius: 20px; display: block; }
.art-body { max-width: var(--col); margin: 0 auto; padding-block: 34px 10px; font-size: 18px; line-height: 1.7; }
.art-body > p, .art-body > ul, .art-body > ol { margin: 0 0 1.15em; text-wrap: pretty; }
.art-body h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.15; letter-spacing: -0.025em; font-weight: 600; margin: 2.1em 0 .7em; }
.art-body h3 { font-size: 20px; letter-spacing: -0.015em; margin: 1.6em 0 .5em; }
.art-body a { color: var(--ink); text-decoration-color: var(--k); text-underline-offset: 3px; }
.art-body b, .art-body strong { font-weight: 600; }
.art-body li { margin-bottom: .45em; }
.art-body code { font: 500 .86em var(--mono); background: var(--board); padding: 1px 6px; border-radius: 5px; }
.art-body mark { background: color-mix(in srgb, var(--hl) 70%, transparent); color: inherit; padding: 0 .12em; border-radius: 3px; }

/* chiffres clés */
.kpis { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 12px; margin: 1.8em 0; padding: 0; list-style: none; }
.kpis li { padding: 18px 18px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); position: relative; overflow: hidden; }
.kpis li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--k); }
.kpis b { display: block; font-size: clamp(28px, 3.4vw, 38px); line-height: 1; letter-spacing: -0.04em; font-weight: 700; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.kpis span { display: block; font-size: 14px; line-height: 1.35; color: var(--soft); }

/* figures */
.fig { margin: 2em calc(-1 * min(120px, (100vw - var(--col)) / 2 - 24px)) 2em; }
.fig-box { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px 22px 18px; }
.fig svg { width: 100%; height: auto; display: block; overflow: visible; }
.fig figcaption { font-size: 14px; line-height: 1.5; color: var(--soft); margin: 10px 4px 0; }
.fig figcaption b { color: var(--ink); }
.fig-img img { width: 100%; border-radius: 16px; }
.fig .ax { stroke: var(--line); stroke-width: 1; }
.fig .lbl { fill: var(--soft); font: 500 13px var(--sans); }
.fig .lbl-s { fill: var(--faint); font: 500 11px var(--mono); letter-spacing: .03em; }
.fig .val { fill: var(--ink); font: 700 15px var(--sans); font-variant-numeric: tabular-nums; }
.fig .bar { fill: var(--k); }
.fig .bar.alt { fill: color-mix(in srgb, var(--faint) 55%, var(--card)); }
.fig .bar.bad { fill: #D62828; }
.fig .line { fill: none; stroke: var(--k); stroke-width: 2; stroke-linejoin: round; }
.fig .line.alt { stroke: #D62828; }
.fig .dot { fill: var(--k); }
.fig .cell { fill: color-mix(in srgb, var(--k) 16%, var(--card)); }
.fig .cell.hit { fill: #D62828; }
.fig .band { fill: color-mix(in srgb, #D62828 12%, transparent); }
.leg { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 12px; font-size: 13px; color: var(--soft); padding: 0; list-style: none; }
.leg li::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; background: var(--c, var(--k)); vertical-align: -1px; }

/* encadrés */
.callout { margin: 1.8em 0; padding: 20px 22px; border-radius: 16px; background: color-mix(in srgb, var(--k2) 30%, var(--card)); border: 1px solid color-mix(in srgb, var(--k) 25%, var(--line)); font-size: 16px; line-height: 1.6; }
.callout p { margin: 0 0 .6em; } .callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout ul { margin: 0; padding-left: 1.2em; }
.callout .label { margin-bottom: 10px; color: var(--k); }
.callout--limits { background: var(--card); border-style: dashed; }
.callout--limits .label { color: var(--soft); }
.pull { margin: 1.8em 0; padding: 0 0 0 20px; border-left: 4px solid var(--k); font-size: 23px; line-height: 1.4; letter-spacing: -0.015em; font-weight: 500; }
.art-foot { max-width: var(--col); margin: 30px auto 0; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--faint); }
.art-foot p { margin: 0 0 8px; }
.art-next { max-width: 1040px; margin: 54px auto 0; }
.art-next .label { margin-bottom: 14px; }
.art-next .art-list { padding-top: 0; grid-template-columns: 1fr 1fr; }
.art-next .art-item, .art-next .art-item:first-child { grid-template-columns: 1fr; }
.art-next .art-item:first-child img { aspect-ratio: 16 / 9; }
.art-next .art-item:first-child h2, .art-next .art-item h2, .art-next .art-item h3 { font-size: 21px; }
.art-next .art-item div { padding: 18px 20px 22px; }

/* animation (seulement si JS : sans JS, tout est dans l'état final) */
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .rv.in { opacity: 1; transform: none; }
.js .fig .grow { transform: scaleX(0); transform-box: fill-box; transform-origin: left center; transition: transform 1.1s cubic-bezier(.2, .8, .2, 1); }
.js .fig .grow-y { transform: scaleY(0); transform-box: fill-box; transform-origin: center bottom; transition: transform 1s cubic-bezier(.2, .8, .2, 1); }
.js .fig.in .grow, .js .fig.in .grow-y { transform: none; }
.js .fig .draw { stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 1.8s ease; }
.js .fig.in .draw { stroke-dashoffset: 0; }
.js .fig .pop { opacity: 0; transition: opacity .4s ease; }
.js .fig.in .pop { opacity: 1; transition-delay: var(--d, .9s); }
.js .fig .cell.hit { animation: none; }
.js .fig.in .cell.hit { animation: blink 1.2s ease 1.1s 3; }
@keyframes blink { 50% { fill: #FFC0B8; } }
@media (prefers-reduced-motion: reduce) {
  .js .rv, .js .fig .grow, .js .fig .grow-y, .js .fig .draw, .js .fig .pop { opacity: 1; transform: none; stroke-dashoffset: 0; transition: none; }
  .js .fig.in .cell.hit { animation: none; }
  .art-item { transition: none; }
}

@media (max-width: 860px) {
  .art-item { grid-template-columns: 1fr; }
  .art-next .art-list { grid-template-columns: 1fr; }
  .fig { margin-inline: 0; }
}
@media (max-width: 560px) {
  .art-hero { padding-block: 32px 8px; }
  .art-head { padding-block: 28px 18px; }
  .art-dek { font-size: 18px; }
  .art-body { font-size: 17px; }
  .art-item div { padding: 20px 20px 22px; }
  .art-cover img, .art-cover svg { border-radius: 14px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .fig-box { padding: 16px 12px 12px; border-radius: 16px; }
  .pull { font-size: 20px; }
}

/* bascule avec / sans */
.sw-btns { display: none; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.sw-on .sw-btns { display: flex; }
.sw-btns button { font: 500 14px var(--sans); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--soft); cursor: pointer; }
.sw-btns button[aria-pressed="true"] { background: var(--k); border-color: var(--k); color: #fff; }
.sw-t { margin: 0 0 8px; font: 600 13px var(--sans); color: var(--soft); }
.sw-on .sw-t { display: none; }
[data-panel] + [data-panel] { margin-top: 18px; }
.sw-on [data-panel] + [data-panel] { margin-top: 0; }
/* liste écrite */
.check { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; font-size: 16px; line-height: 1.4; }
.check li { display: flex; gap: 10px; align-items: baseline; }
.check .ck { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--k); transform: translateY(4px); }
.check em { display: block; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--k); font-style: normal; margin-top: 2px; }
.check li:has(em) { grid-column: span 1; }
@media (max-width: 560px) {
  .check { grid-template-columns: 1fr; }
  .fig-box { overflow-x: auto; }
  .fig-box svg { min-width: 600px; }
}
