/* Design system du site (accueil et études de cas). Même DA, même architecture :
   cette couche règle l'échelle, les surfaces, le rythme, les états et l'accessibilité. */

:root {
  --ink: #1d1d1f; --ink-2: #424245; --muted: #6e6e73; --line: #e3e3e8; --hair: rgba(0, 0, 0, 0.08);
  --tile: #f5f5f7; --bg: #ffffff;
  --r-card: 20px; --r-box: 24px; --r-ctl: 9999px; --r-chip: 8px;
  --e1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --sec: 112px; --sec-s: 80px;
  --focus: #0071e3;
}

/* ---------- rythme : mêmes respirations partout ---------- */
.section { padding-block: var(--sec); }
.reveal-section { padding-block: 128px; }
.work { padding-bottom: var(--sec-s); }
.projects { gap: 48px; }
.intro { padding: 168px 0 72px; }
.case-hero { padding-bottom: 56px; }
.kpi-band { padding-block: 0; border: 0; }

/* ---------- intro : un titre, une seule ligne de contexte ---------- */
.intro-meta { margin-top: 32px; gap: 10px 20px; }
.intro-meta .caption-2 { color: var(--muted); }
.intro-hint { margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 20px; }
.status { box-shadow: inset 0 0 0 1px var(--hair); background: #fff; }

/* ---------- tuiles projet ---------- */
.stage { border-radius: var(--r-box); box-shadow: inset 0 0 0 1px var(--hair); padding: 64px 72px; }
.stage-copy { gap: 18px; }
.stage-copy h3 { font-size: 36px; line-height: 40px; }
.stage-copy .project-tags { gap: 6px; }
.stage-copy .project-tags li, .project-tags li { border-radius: var(--r-chip); padding: 3px 8px; background: var(--tile); color: var(--ink-2); font-size: 12px; line-height: 16px; font-weight: 500; }
.stage-copy .project-tags li.tag-proto { background: var(--ink); color: #fff; }
.stage-kpis { gap: 0; border-top: 1px solid var(--line); padding-top: 18px; }
.stage-kpis div { padding-right: 24px; }
.stage-kpis div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.stage-kpis b { font-size: 28px; line-height: 32px; font-variant-numeric: tabular-nums; }
.stage-kpis .caption-2 { font-size: 13px; line-height: 18px; }
.stage-proto { display: flex; flex-direction: column-reverse; align-items: center; gap: 14px; }
.stage-proto .proto-tools .btn { min-height: 36px; padding: 6px 14px; font-size: 13px; font-weight: 500; background: transparent; box-shadow: none; color: var(--muted); }
.stage-proto .proto-tools .btn[data-tool="reset"]::before { content: "↺"; margin-right: 6px; font-size: 14px; }
.stage-proto .proto-tools .btn.xr-btn { color: #7b61ff; }
.stage-proto .proto-tools .btn.xr-btn::before { content: ""; width: 12px; height: 12px; margin-right: 6px; border: 1.5px solid currentColor; border-radius: 3px; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 6px currentColor; display: inline-block; }
.try { font-size: 14px; line-height: 20px; color: var(--ink-2); }

/* ---------- autres projets ---------- */
.alsos { gap: 20px; }
.also-visual { border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--hair); }
.also-info { gap: 4px; padding-inline: 2px; }
.also-info .logo { height: 22px !important; }
.also-info .body-6 { margin-top: 4px; }

/* ---------- profil ---------- */
.profile { border-top: 1px solid var(--line); }
.timeline li { align-items: center; padding: 14px 0; }
.timeline .logo-sm { height: 18px !important; width: auto !important; max-width: 92px; object-fit: contain; object-position: left center; }
.tl-co { min-height: 22px; }
.list-label { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- études de cas ---------- */
.facts { gap: 20px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { font-size: 15px; line-height: 21px; font-weight: 500; color: var(--ink); }
.brief-text .body-lead { font-size: 22px; line-height: 30px; letter-spacing: -0.01em; }
.did li { font-size: 16px; line-height: 24px; }
.kpi-row { gap: 16px; }
.big-kpi { padding: 24px; border-radius: var(--r-card); background: var(--tile); gap: 8px; }
.big-kpi b { font-size: 44px; line-height: 48px; font-variant-numeric: tabular-nums; }
.big-kpi span { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.fix { border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--hair); background: #fff; padding: 22px; }
.fix .was { color: var(--muted); text-decoration-color: rgba(110, 110, 115, 0.6); }
.fix-k { font-size: 12px; font-weight: 600; color: var(--muted); }
.fix .now { font-size: 15px; line-height: 22px; }
.story-steps .chapter p { opacity: 1; color: var(--muted); }
.story-steps .chapter.active p { color: var(--ink-2); }
.story-steps button { color: #a1a1a6; }
.story-steps .chapter.active button { color: var(--ink); }
.decision { border-radius: var(--r-card); }
.quote p { font-size: 32px; line-height: 40px; }
.takeaway { font-size: 22px; line-height: 30px; }
.next-project .wrap { border-radius: var(--r-box); box-shadow: inset 0 0 0 1px var(--hair); }
.case-cover .wrap, .flows .wrap { border-radius: var(--r-box); }
.display-frame { border-radius: 18px; }
.guide li { box-shadow: inset 0 0 0 1px var(--hair); background: #fff; }

/* ---------- contact ---------- */
.contact { padding-block: 120px; }
.contact .btn.is-done { background: #fff; color: #1a7f45; }
.contact .btn.is-done::before { content: "✓"; margin-right: 6px; font-weight: 700; }

/* ---------- états et accessibilité ---------- */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
.btn:focus-visible { border-radius: var(--r-ctl); }
.nav-links a[aria-current="true"], .nav-links a[aria-current="page"] { color: var(--ink); background: rgba(0, 0, 0, 0.06); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
@media (pointer: coarse) {
  .nav-links a, .stage-proto .proto-tools .btn, .proto-tools .btn, .faq summary, .back { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 980px) {
  .stage { padding: 40px 24px; }
  .stage-copy h3 { font-size: 30px; line-height: 36px; }
  .big-kpi b { font-size: 36px; line-height: 40px; }
  .section { padding-block: var(--sec-s); }
}
@media (max-width: 760px) {
  .intro { padding: 128px 0 48px; }
  .reveal-section { padding-block: 88px; }
  .stage-kpis div + div { padding-left: 16px; }
  .stage-kpis div { padding-right: 16px; }
  .quote p { font-size: 24px; line-height: 32px; }
  .brief-text .body-lead { font-size: 19px; line-height: 27px; }
}
.stage-kpis b { white-space: nowrap; font-size: clamp(22px, 2vw, 28px); }
.stage-kpis div { min-width: 0; flex: 1 1 0; }

/* ---------- avant / après ---------- */
.compare-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 64px; align-items: center; }
.compare-copy { display: grid; gap: 16px; justify-items: start; max-width: 520px; }
.cmp-legend { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.cmp-legend li { display: flex; gap: 10px; align-items: center; }
.cmp-legend i { width: 12px; height: 12px; border-radius: 3px; }
.cmp-legend i.a { background: #c7c7cc; } .cmp-legend i.b { background: var(--ink); }
.compare { margin: 0; }
.compare-device { --w: 320px; }
.compare-device .screen { background: #fff; }
.cmp-a, .cmp-b { position: absolute; inset: 0; overflow: hidden; }
.cmp-a img { position: absolute; left: 0; right: 0; top: calc(var(--w) * 0.153); width: 100%; height: auto; }
.cmp-b { clip-path: inset(0 0 0 var(--pos)); }
.cmp-b img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); z-index: 4; pointer-events: none; }
.cmp-handle i { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.06); }
.cmp-handle i::before, .cmp-handle i::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; border-top: 2px solid #1d1d1f; border-left: 2px solid #1d1d1f; }
.cmp-handle i::before { left: 10px; transform: translateY(-50%) rotate(-45deg); }
.cmp-handle i::after { right: 10px; transform: translateY(-50%) rotate(135deg); }
.cmp-tag { position: absolute; z-index: 3; bottom: 26px; padding: 4px 10px; border-radius: 999px; font: 600 12px/16px -apple-system, system-ui, sans-serif; background: rgba(29, 29, 31, 0.78); color: #fff; transition: opacity 200ms; pointer-events: none; }
.cmp-tag.a { left: 14px; } .cmp-tag.b { right: 14px; }
.compare.left .cmp-tag.a, .compare.right .cmp-tag.b { opacity: 0; }
.cmp-range { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; -webkit-appearance: none; appearance: none; }
.compare:focus-within .cmp-handle i { box-shadow: 0 0 0 3px var(--focus), 0 4px 14px rgba(0, 0, 0, 0.22); }
@media (max-width: 980px) { .compare-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 40px; } .compare-copy { justify-items: center; text-align: center; } }
