/* Agents IA: pillar page (agents-ia.html) and use-case library (agents-ia-cas-usage.html).
   Only tokens.css variables; prefix zp- (no other file uses it). Layout and type follow site.css.
   This file is loaded by these two pages only, so the contrast overrides below stay local. */

/* ---------- contrast (WCAG 2.2 AA) on these pages: small text never uses --text-3 ---------- */
.zs-crumb, .zs-crumb span { color: var(--text-2); }
.zs-steps .when, .zs-filter-count { color: var(--text-2); }
.zl-tag.demo { color: #8f9381; }                               /* « Démonstration », >= 4.5:1 on --surface */
.zl-tag.req { color: var(--text-2); border-style: dashed; }   /* « Sur demande » */

/* the floating « Une question ? » button must not sit on the last lines of text */
@media (max-width: 560px) { body[data-page^="agents-ia"] #zs-main { padding-bottom: 84px; } }

/* ---------- hero with the agent diagram ---------- */
.zp-hero-in { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; align-items: center; }
.zp-hero-fig { margin: 0; position: relative; }
.zp-hero-fig svg { width: 100%; height: auto; display: block; }

/* ---------- shared: icons, legend, disclosure ---------- */
.zp-ic-wrap { color: var(--lime); display: inline-flex; align-items: center; justify-content: flex-start; flex: none; }
.zp-ic-wrap svg { width: 26px; height: 26px; display: block; }
.zp-legend { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 0 0 18px; font-size: 13px; color: var(--text-2); }
.zp-legend .g { display: inline-flex; align-items: center; gap: 8px; margin-right: 10px; white-space: nowrap; }
.zp-legend .zl-tag { white-space: nowrap; }
.zp-more-d > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; color: var(--lime); }
.zp-more-d > summary::-webkit-details-marker { display: none; }
.zp-more-d > summary::after { content: "+"; font-family: var(--mono); font-size: 16px; transition: transform .3s var(--ease); }
.zp-more-d[open] > summary::after { transform: rotate(45deg); }
.zp-wide .zp-more-d > summary { display: none; }               /* wide screens: details shown, no toggle (agents-ia.js) */
.zp-more-d dl { padding-top: 4px; }

/* ---------- 1. chatbot / automatisation / agent ---------- */
.zp-def { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.zp-def .zl-card { display: flex; flex-direction: column; gap: 12px; }
.zp-def .zl-card.is-agent { border-color: var(--lime-dim); }
.zp-def .k { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.zp-def .is-agent .k { color: var(--lime); }
.zp-def h3 { font-size: 22px; font-weight: 400; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
.zp-def svg.glyph { width: 100%; max-width: 260px; height: 74px; display: block; }
.zp-def dl { margin: 4px 0 0; display: grid; gap: 10px; }
.zp-def dt { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.zp-def dd { margin: 2px 0 0; font-size: 14px; color: var(--text); }

/* ---------- 2. pipeline (animated with agents-ia.js; static and complete without JS) ---------- */
.zp-pipe-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px 26px 22px; position: relative; overflow: hidden; }
.zp-pipe-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 26px; }
.zp-pipe-top p { margin: 0; font-size: 15px; color: var(--text-2); max-width: 640px; }
.zp-pipe-top p b { font-family: var(--mono); font-weight: 400; color: var(--lime); }
.zp-pipe-ctl { display: flex; align-items: center; gap: 10px; }
.zp-replay { font: inherit; font-size: 13px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: none; color: var(--text-2); cursor: pointer; display: none; }
.zp-pipe.zp-js .zp-replay { display: inline-flex; align-items: center; }
.zp-replay:hover { color: var(--text); }
.zp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; position: relative; }
/* line from the centre of the first dot to the centre of the last one */
.zp-steps::before, .zp-steps::after { content: ""; position: absolute; left: 22px; right: calc((100% - 60px) / 6 - 22px); }
.zp-steps::before { top: 22px; height: 1px; background: var(--line-strong); }
.zp-steps::after { top: 21px; height: 3px; border-radius: 3px; background: var(--lime); transform-origin: left center; transform: scaleX(1); }
.zp-steps li { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.zp-dot { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--raised); border: 1px solid var(--lime-dim); color: var(--lime); position: relative; z-index: 1; flex: none; }
.zp-dot svg { width: 20px; height: 20px; }
.zp-steps .human .zp-dot { background: var(--lime); color: var(--bg); border-color: var(--lime); }
.zp-steps .i { font-family: var(--mono); font-size: 12px; color: var(--text-2); margin-top: 6px; }
.zp-steps h3 { font-size: 16px; font-weight: 400; margin: 0; line-height: 1.25; }
.zp-steps p { margin: 0; font-size: 13px; color: var(--text-2); }
.zp-steps .ex { font-family: var(--mono); font-size: 12px; color: var(--text); background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; line-height: 1.45; }
.zp-pipe.zp-js .zp-steps li { opacity: .4; transition: opacity .5s var(--ease); transition-delay: calc(var(--i) * 620ms); }
.zp-pipe.zp-js .zp-steps::after { transform: scaleX(0); transition: transform 3.4s linear; }
.zp-pipe.zp-js.is-run .zp-steps li { opacity: 1; }
.zp-pipe.zp-js.is-run .zp-steps::after { transform: scaleX(1); }
.zp-pipe.zp-js.is-reset .zp-steps li, .zp-pipe.zp-js.is-reset .zp-steps::after { transition: none; }
.zp-pipe-foot { margin: 22px 0 0; font-size: 13px; color: var(--text-2); }

/* ---------- 3. levels of autonomy (subgrid: the blocks line up across cards) ---------- */
.zp-levels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.zp-levels li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 10px; }
.zp-meter { display: flex; gap: 4px; align-items: flex-end; height: 34px; }
.zp-meter i { width: 14px; border-radius: 3px; background: var(--grey-1); }
.zp-meter i:nth-child(1) { height: 25%; } .zp-meter i:nth-child(2) { height: 50%; } .zp-meter i:nth-child(3) { height: 75%; } .zp-meter i:nth-child(4) { height: 100%; }
.zp-meter i.on { background: var(--lime); }
.zp-levels .n { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.zp-levels h3 { font-size: 19px; font-weight: 400; margin: 0; line-height: 1.25; letter-spacing: -.01em; }
.zp-levels p { margin: 0; font-size: 14px; color: var(--text-2); }
.zp-levels .ex { font-size: 13px; color: var(--text); border-top: 1px solid var(--line); padding-top: 10px; }
.zp-levels .ex b, .zp-levels .val b { display: block; font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--text-2); margin-bottom: 2px; }
.zp-levels .val { font-size: 13px; color: var(--text); }

/* ---------- 4. agent catalogue ---------- */
.zp-cat-filter { margin: 0 0 18px; }
.zp-count-cat { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.zp-agents { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.zp-agent { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 12px; min-width: 0; }
.zp-agent[hidden], .zp-agent.is-folded { display: none; }
.zp-agent-top { display: flex; align-items: center; gap: 12px; }
.zp-agent-top .zl-tag { margin-left: auto; }
.zp-agent .n { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.zp-agent h3 { font-size: 18px; font-weight: 400; margin: 0; line-height: 1.3; letter-spacing: -.01em; }
.zp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; align-self: start; }
.zp-chips li { font-family: var(--mono); font-size: 12px; color: var(--text-2); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 9px; }
.zp-chips li.lv { color: var(--lime); }
.zp-agent dl, .zp-case dl { margin: 0; display: grid; gap: 9px; align-content: start; }
.zp-agent dt, .zp-case dt { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.zp-agent dd, .zp-case dd { margin: 1px 0 0; font-size: 14px; color: var(--text); }
.zp-agent dd.hv, .zp-case dd.hv { color: var(--text); }
.zp-agent .zp-main { border-top: 1px solid var(--line); padding-top: 12px; }
.zp-agent .go { margin: 12px 0 0; font-size: 13px; }
.zp-agent .go a { color: var(--lime); text-decoration: none; }
.zp-agent .go a:hover { text-decoration: underline; }

/* ---------- 5. runs at home first ---------- */
.zp-home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; align-items: stretch; }
.zp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.zp-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.zp-stat .big { font-family: var(--mono); font-weight: 300; font-size: 40px; letter-spacing: -.03em; line-height: 1; color: var(--lime); margin: 6px 0 0; }
.zp-stat .big small { font-size: 14px; color: var(--text-2); margin-left: 6px; letter-spacing: 0; }
.zp-stat p { margin: 0; font-size: 14px; color: var(--text-2); }
.zp-stat .zl-tag { align-self: flex-start; white-space: nowrap; }
.zp-runs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.zp-runs h3 { font-size: 16px; font-weight: 400; margin: 0 0 4px; }
.zp-runs > p { margin: 0 0 14px; font-size: 13px; color: var(--text-2); }
.zp-runs table { width: 100%; border-collapse: collapse; font-size: 14px; }
.zp-runs th, .zp-runs td { text-align: left; padding: 11px 12px 11px 0; border-top: 1px solid var(--line); vertical-align: top; }
.zp-runs th { font-weight: 400; color: var(--text); }
.zp-runs th .nn { display: block; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.zp-runs td { color: var(--text-2); }
.zp-runs td.f { font-family: var(--mono); font-size: 12px; color: var(--lime); padding-right: 0; }
.zp-runs thead th { font-family: var(--mono); font-size: 12px; color: var(--text-2); border-top: 0; padding-top: 0; }
.zp-honest { margin: 14px 0 0; font-size: 14px; color: var(--text-2); display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }

/* ---------- 6. guardrails ---------- */
.zp-guard { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.zp-guard li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.zp-guard svg { width: 26px; height: 26px; color: var(--lime); display: block; }
.zp-guard h3 { font-size: 17px; font-weight: 400; margin: 14px 0 6px; }
.zp-guard p { margin: 0; font-size: 14px; color: var(--text-2); }

/* ---------- use-case library ---------- */
.zp-filters { display: grid; gap: 10px; width: 100%; }
.zp-frow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.zp-frow .lbl { font-family: var(--mono); font-size: 12px; color: var(--text-2); min-width: 120px; }
.zp-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.zp-filter button { font: inherit; font-size: 13px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: none; color: var(--text-2); cursor: pointer; }
.zp-filter button:hover { color: var(--text); }
.zp-filter button[aria-pressed="true"] { background: var(--lime); color: var(--bg); border-color: var(--lime); font-weight: 500; }
.zp-filters-js { display: none !important; }
.zp-has-js .zp-filters-js { display: block !important; }
.zp-has-js .zp-frow.zp-filters-js { display: flex !important; }
.zp-cases { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.zp-case { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 12px; min-width: 0; }
.zp-case[hidden], .zp-case.is-folded { display: none; }
.zp-case-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.zp-case-meta .lv { display: inline-flex; align-items: center; gap: 6px; color: var(--lime); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 10px 3px 7px; white-space: nowrap; }
.zp-case-meta .lv svg { width: 16px; height: 16px; }
.zp-case h3 { font-size: 18px; font-weight: 400; margin: 0; line-height: 1.3; letter-spacing: -.01em; }
.zp-case ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: st; align-content: start; }
.zp-case ol li { counter-increment: st; display: flex; gap: 10px; font-size: 14px; color: var(--text); align-items: baseline; }
.zp-case ol li::before { content: counter(st); font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--bg); background: var(--lime); width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; transform: translateY(3px); }
.zp-case .zp-more-d { border-top: 1px solid var(--line); padding-top: 6px; }
.zp-wide .zp-case .zp-more-d { padding-top: 12px; }
.zp-show { margin: 22px 0 0; display: none; }
.zp-has-js .zp-show:not([hidden]) { display: block; }
.zp-empty { margin: 28px 0 0; color: var(--text-2); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .zp-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 26px; }
  .zp-steps::before, .zp-steps::after { display: none; }
  .zp-levels { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1000px) {
  .zp-hero-in { grid-template-columns: minmax(0, 1fr); }
  .zp-hero-fig { display: none; }
  .zp-def, .zp-agents, .zp-guard, .zp-cases { grid-template-columns: 1fr 1fr; }
  .zp-home { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .zs-filter-bar.zp-filters-js { position: static; }
}
@media (max-width: 680px) {
  .zp-steps { grid-template-columns: 1fr; row-gap: 0; }
  .zp-steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; row-gap: 6px; padding-bottom: 22px; }
  .zp-steps li > :not(.zp-dot) { grid-column: 2; }
  .zp-steps li .zp-dot { grid-row: 1 / span 4; }
  .zp-steps li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 46px; bottom: 0; width: 1px; background: var(--line-strong); }
  .zp-steps .i { margin-top: 0; }
  .zp-pipe-box { padding: 20px 16px 18px; }
}
@media (max-width: 560px) {
  .zp-def, .zp-agents, .zp-guard, .zp-cases, .zp-levels { grid-template-columns: 1fr; }
  .zp-agent, .zp-case { padding: 16px 18px 8px; row-gap: 10px; }
  .zp-agent .zp-main { padding-top: 10px; }
  .zp-agent .go { margin: 10px 0 8px; }
  .zp-frow .lbl { min-width: 0; flex-basis: 100%; }
  .zp-stats { gap: 10px; }
  .zp-stat { padding: 16px; }
  .zp-stat .big { font-size: 30px; }
  .zp-stat .big small { display: block; margin: 6px 0 0; font-size: 13px; }
  .zp-stat p { font-size: 13px; }
  /* proof table: « Rythme » goes under « Ce qu’il livre » */
  .zp-runs thead { display: none; }
  .zp-runs table, .zp-runs tbody, .zp-runs tr, .zp-runs th, .zp-runs td { display: block; }
  .zp-runs tr { border-top: 1px solid var(--line); padding: 12px 0; }
  .zp-runs th, .zp-runs td { border-top: 0; padding: 0; }
  .zp-runs td { margin-top: 4px; }
}
@media (max-width: 400px) {
  .zp-stats { grid-template-columns: 1fr; }
  .zp-stat .big small { display: inline; margin-left: 6px; }
}
