/* Fichier css/svc-3d.css · chargé par : service-3d */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap");
/* =========================================================
   IAI — page métier 3D · « Le jumeau »
   L'espace numérique : noir profond, cyan holographique, reflets irisés, grilles de sol, fil de fer.
   Une seule scène WebGL (svc-3d.js) derrière la page : la sculpture de l'ouverture, puis le jumeau numérique.
   ========================================================= */
html[data-svc="3d"] {
  --bg-rgb: 3 6 10;          --surface-rgb: 9 16 24;    --text-rgb: 228 246 252;
  --acc-rgb: 120 225 255;    --acc-hi-rgb: 186 242 255; --on-acc-rgb: 2 16 24;
  --acc2-rgb: 255 150 222;   --space-rgb: 8 22 32;      --space-glow: 40 150 180;
  --mint-rgb: 196 255 238;   --muted-rgb: 122 148 162;  --mutesp-rgb: 172 206 220;
  --deep-rgb: 1 3 6;         --alert-rgb: 255 96 128;   --warn-rgb: 255 204 102;
  --ink-rgb: 6 22 32;        --ink2-rgb: 0 132 176;     --ink-mid-rgb: 64 98 116;
  --d3-mono: "JetBrains Mono", ui-monospace, monospace;
  --d3-irid: linear-gradient(100deg, rgb(120 225 255) 0%, rgb(186 160 255) 22%, rgb(255 150 222) 38%, rgb(255 226 170) 52%, rgb(150 255 224) 68%, rgb(120 225 255) 84%, rgb(186 160 255) 100%);
  --d3-line: rgb(var(--acc-rgb) / .16);
}
html[data-svc="3d"] .svx-page, html[data-svc="3d"] body { background: rgb(var(--bg-rgb)); }

/* ---------- la scène WebGL (derrière le contenu) ---------- */
.d3-gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; pointer-events: none; visibility: hidden; }
.d3-gl.is-on { visibility: visible; }
.svx--3d > section:not(.d3-hero):not(.d3-twin) { position: relative; background: rgb(var(--bg-rgb)); }
.svx--3d .svx-more, .svx--3d .rl-cta { position: relative; background: rgb(var(--bg-rgb)); }

/* ---------- titres ---------- */
.svx--3d .d3-h2 { font-size: var(--fs-h2); font-weight: 680; line-height: .92; letter-spacing: -.05em; text-transform: uppercase; max-width: 16ch; }
.svx--3d .d3-h2 em { font-style: normal; background: var(--d3-irid); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }

/* =========================================================
   OUVERTURE : la sculpture
   ========================================================= */
.d3-hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: center; overflow: hidden; isolation: isolate; }
.d3-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 70% at 72% 50%, rgb(var(--acc-rgb) / .07), transparent 70%), linear-gradient(transparent 70%, rgb(var(--bg-rgb)) 100%); }
.d3-hero__stage { position: absolute; z-index: 1; left: 40%; right: 0; top: 10%; bottom: 14%; touch-action: pan-y; cursor: grab; }
.d3-hero__stage.is-drag { cursor: grabbing; }
html.has-cursor .d3-hero__stage { cursor: none; }
.d3-fallback { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .85; }
html.d3-nogl .d3-fallback { display: block; }
.d3-hero__in { position: relative; z-index: 2; padding-top: clamp(96px, 15svh, 150px); padding-bottom: clamp(70px, 12svh, 120px); pointer-events: none; }
.d3-hero__in > * { pointer-events: auto; max-width: min(41vw, 640px); }
.d3-h1 { position: relative; display: inline-block; font-size: clamp(6rem, min(21vw, 36svh), 26rem); font-weight: 800; line-height: .8; letter-spacing: -.075em; margin-left: -.04em; }
.d3-h1__t { position: relative; z-index: 1; display: inline-block; background: var(--d3-irid); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: d3-irid 14s linear infinite; will-change: background-position; }
/* l'extrusion : couches nettes (pas d'ombre floue), dessinées une fois */
.d3-h1::before { content: "3D"; content: "3D" / ""; position: absolute; left: 0; top: 0; z-index: 0; color: rgb(10 36 48);
  text-shadow: .006em .006em 0 rgb(12 44 58), .012em .012em 0 rgb(12 44 58), .018em .018em 0 rgb(11 40 54), .024em .024em 0 rgb(10 36 50), .03em .03em 0 rgb(9 32 46), .036em .036em 0 rgb(8 28 40), .042em .042em 0 rgb(7 24 34), .048em .048em 0 rgb(6 20 30); }
.d3-h1::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.06em; height: 1px; background: linear-gradient(90deg, rgb(var(--acc-rgb) / .7), transparent); }
@keyframes d3-irid { to { background-position: -220% 0; } }
.d3-prom { margin-top: clamp(18px, 3.4svh, 36px); font-size: clamp(1.5rem, 1rem + 1.8vw, 3rem); font-weight: 620; line-height: 1.02; letter-spacing: -.04em; }
.d3-prom em { font-style: normal; color: rgb(var(--acc-rgb)); }
.d3-sous { margin-top: 16px; color: rgb(var(--text-rgb) / .72); max-width: 46ch !important; font-size: var(--fs-body); }
.d3-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(22px, 3.6svh, 36px); max-width: none !important; }
.d3-view { position: absolute; z-index: 3; left: 70%; transform: translateX(-50%); bottom: clamp(22px, 5svh, 48px); display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgb(var(--surface-rgb) / .7); border: 1px solid rgb(var(--acc-rgb) / .2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.d3-view button { font: 500 .72rem/1 var(--d3-mono); letter-spacing: .02em; color: rgb(var(--text-rgb) / .65); background: none; border: 0; padding: 10px 14px; border-radius: 999px; cursor: pointer; transition: color .3s, background .3s; white-space: nowrap; }
.d3-view button:hover { color: rgb(var(--text-rgb)); }
.d3-view button[aria-pressed="true"] { background: rgb(var(--acc-rgb) / .16); color: rgb(var(--acc-rgb)); }
.d3-view button:focus-visible { outline: 1px solid rgb(var(--acc-rgb)); outline-offset: 1px; }
html.d3-nogl .d3-view, html.d3-nogl .d3-hero__note .d3-hint { display: none; }
.d3-hero__note { position: absolute; z-index: 3; left: 70%; transform: translateX(-50%); top: clamp(92px, 13svh, 130px); font: 400 .7rem/1.4 var(--d3-mono); color: rgb(var(--text-rgb) / .5); text-align: center; white-space: nowrap; }
.d3-hint { color: rgb(var(--acc-rgb) / .9); }
/* curseur « Glisser » */
.d3-grab { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; width: 74px; height: 74px; margin: -37px 0 0 -37px; display: grid; place-items: center; opacity: 0; transform: translate3d(var(--gx, -200px), var(--gy, -200px), 0) scale(.6); transition: opacity .25s, scale .3s; }
.d3-grab.is-on { opacity: 1; }
.d3-grab i { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgb(var(--acc-rgb) / .8); animation: d3-spin 6s linear infinite; }
.d3-grab b { font: 500 .62rem/1 var(--d3-mono); color: rgb(var(--acc-rgb)); letter-spacing: .04em; }
.d3-grab::before, .d3-grab::after { content: ""; position: absolute; top: 50%; width: 6px; height: 6px; border-top: 1px solid rgb(var(--acc-rgb)); border-left: 1px solid rgb(var(--acc-rgb)); }
.d3-grab::before { left: -12px; transform: translateY(-50%) rotate(-45deg); } .d3-grab::after { right: -12px; transform: translateY(-50%) rotate(135deg); }
@keyframes d3-spin { to { transform: rotate(360deg); } }

/* ouverture : téléphone et tablette en portrait (sculpture en haut, texte dessous) */
html.f-stack .d3-hero { align-items: start; }
html.f-stack .d3-hero__stage { position: relative; left: auto; right: auto; top: auto; bottom: auto; grid-row: 1; height: 44svh; margin-top: 76px; }
html.f-stack .d3-hero__in { grid-row: 2; padding-top: 0; padding-bottom: 64px; }
html.f-stack .d3-hero__in > * { max-width: 100%; }
html.f-stack .d3-h1 { font-size: clamp(6rem, 34vw, 15rem); }
html.f-stack .d3-view { left: 50%; top: calc(76px + 44svh - 46px); bottom: auto; }
html.f-stack .d3-hero__note { left: 50%; top: 82px; }
html.f-phone.f-stack .d3-hero__stage { height: 35svh; margin-top: 68px; }
html.f-phone.f-stack .d3-view { top: calc(68px + 35svh - 44px); }
html.f-phone.f-stack .d3-h1 { font-size: clamp(5rem, 30vw, 9rem); }
html.f-phone.f-stack .d3-hero__note { top: 72px; font-size: .62rem; }
html.f-phone .d3-view button { padding: 9px 10px; font-size: .64rem; }
html.f-phone .d3-btns .btn { flex: 1 1 auto; }
/* téléphone à l'horizontale : tout tient dans l'écran, le bouton d'abord */
html.f-short .d3-hero__in { padding-top: 70px; padding-bottom: 30px; display: flex; flex-direction: column; align-items: flex-start; }
html.f-short .d3-h1 { font-size: min(17vw, 30svh); }
html.f-short .d3-prom { margin-top: 10px; font-size: 1.3rem; }
html.f-short .d3-btns { order: 3; margin-top: 14px; } html.f-short .d3-btns .btn { height: 44px; padding: 0 18px; }
html.f-short .d3-sous { order: 4; font-size: .85rem; margin-top: 12px; }
html.f-short .d3-hero__stage { left: 46%; top: 14%; bottom: 16%; }
html.f-short .d3-view { left: 73%; bottom: 10px; }
html.f-short .d3-hero__note { left: 73%; top: 62px; font-size: .6rem; }
html.f-short .d3-hero__note .d3-hint { display: none; }

/* =========================================================
   DOULEURS → RENDU (rendu par tuiles)
   ========================================================= */
.d3-pain { padding: clamp(100px, 16svh, 180px) 0 clamp(80px, 12svh, 140px); }
.d3-pain .d3-h2 { padding-right: 90px; }
.d3-pain__l { list-style: none; margin-top: clamp(40px, 7svh, 80px); border-top: 1px solid var(--d3-line); }
.d3-pr { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(20px, 4vw, 70px); align-items: center; padding: clamp(26px, 4.5svh, 46px) 0; border-bottom: 1px solid var(--d3-line); position: relative; }
.d3-pr::before { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: rgb(var(--acc-rgb)); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease); }
.d3-pr.is-in::before { transform: scaleX(1); }
.d3-pr__a { display: flex; gap: 14px; align-items: baseline; color: rgb(var(--muted-rgb)); font: 400 clamp(.86rem, .8rem + .25vw, 1.02rem)/1.5 var(--d3-mono); }
.d3-ico { flex: none; width: 14px; height: 14px; border: 1px dashed rgb(var(--muted-rgb) / .8); transform: rotate(45deg) translateY(1px); }
.d3-pr__b { position: relative; font-size: clamp(1.35rem, .95rem + 1.6vw, 2.6rem); font-weight: 620; line-height: 1.08; letter-spacing: -.035em; }
.d3-pr__txt { position: relative; }
.d3-tiles { position: absolute; inset: -6px -8px; display: grid; grid-template-columns: repeat(var(--tc, 10), 1fr); grid-template-rows: repeat(var(--tr, 3), 1fr); pointer-events: none; }
.d3-tiles i { background: rgb(var(--bg-rgb)); box-shadow: inset 0 0 0 .5px rgb(var(--acc-rgb) / .14); transition: opacity .32s var(--d, 0ms) steps(2), box-shadow .3s var(--d, 0ms); }
.d3-tiles i.is-hot { box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .9); }
.d3-pr.is-in .d3-tiles i { opacity: 0; }
html.d3-rm .d3-tiles { display: none; }

/* =========================================================
   SIGNATURE : LE JUMEAU NUMÉRIQUE
   ========================================================= */
.d3-twin { position: relative; height: 560vh; height: 560svh; }
.d3-twin__stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; touch-action: pan-y; }
html.has-cursor .d3-twin.is-look .d3-twin__stick { cursor: none; }
.d3-twin__head { position: absolute; left: 0; right: 0; top: clamp(92px, 14svh, 140px); pointer-events: none; opacity: var(--hd, 1); transform: translateY(calc((1 - var(--hd, 1)) * -20px)); }
.d3-twin__p { margin-top: 18px; max-width: 34ch; color: rgb(var(--text-rgb) / .72); }
.d3-twin__ph { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); list-style: none; display: grid; gap: 14px; counter-reset: ph; font: 400 .72rem/1 var(--d3-mono); color: rgb(var(--text-rgb) / .4); }
.d3-twin__ph li { counter-increment: ph; display: flex; gap: 10px; align-items: center; justify-content: flex-end; transition: color .4s; }
.d3-twin__ph li::after { content: ""; width: 22px; height: 1px; background: currentColor; transition: width .4s var(--ease); }
.d3-twin__ph li.is-on { color: rgb(var(--acc-rgb)); } .d3-twin__ph li.is-on::after { width: 44px; }
.d3-compass { position: absolute; right: var(--gutter); top: clamp(92px, 14svh, 140px); display: flex; align-items: center; gap: 10px; font: 500 .74rem/1 var(--d3-mono); color: rgb(var(--text-rgb) / .7); opacity: var(--vis, 0); transition: opacity .4s; }
.d3-compass svg { width: 44px; height: 44px; transform: rotate(var(--hdg, 0deg)); }
.d3-compass circle { fill: none; stroke: rgb(var(--acc-rgb) / .5); stroke-dasharray: 2 4; }
.d3-compass__n { fill: rgb(var(--acc-rgb)); }
.d3-compass span { display: inline-block; min-width: 3ch; text-align: right; color: rgb(var(--acc-rgb)); }
.d3-twin__dots { position: absolute; inset: 0; pointer-events: none; }
.d3-dot { position: absolute; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; display: grid; place-items: center; font: 700 .6rem/1 var(--d3-mono); color: rgb(var(--acc-rgb));
  border: 1px solid rgb(var(--acc-rgb) / .7); background: rgb(var(--bg-rgb) / .55); transition: opacity .4s, background .4s, color .4s, scale .4s; will-change: transform; }
.d3-dot::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid rgb(var(--acc-rgb) / .35); animation: d3-ping 2.4s var(--ease) infinite; }
.d3-dot.is-on { background: rgb(var(--acc-rgb)); color: rgb(var(--on-acc-rgb)); scale: 1.15; }
@keyframes d3-ping { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.d3-cap { position: absolute; left: var(--gutter); bottom: clamp(26px, 6svh, 60px); width: min(430px, calc(100% - var(--gutter) * 2 - 80px)); display: grid; gap: 6px; padding: 18px 20px 18px 22px;
  background: rgb(var(--surface-rgb) / .72); border-left: 2px solid rgb(var(--acc-rgb)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: var(--vis, 0); transform: translateY(calc((1 - var(--vis, 0)) * 16px)); transition: opacity .4s; }
.d3-cap__n { font: 500 .68rem/1 var(--d3-mono); color: rgb(var(--acc-rgb)); }
.d3-cap__t { font-size: clamp(1.15rem, .95rem + .7vw, 1.6rem); font-weight: 650; letter-spacing: -.03em; line-height: 1.1; }
.d3-cap__p { color: rgb(var(--text-rgb) / .74); font-size: .95rem; line-height: 1.45; }
.d3-cap.is-swap .d3-cap__t, .d3-cap.is-swap .d3-cap__p { animation: d3-swap .5s var(--ease); }
@keyframes d3-swap { from { opacity: 0; transform: translateY(8px); } }
.d3-twin__drag { position: absolute; left: 50%; bottom: clamp(26px, 6svh, 60px); transform: translateX(-50%); font: 400 .7rem/1 var(--d3-mono); color: rgb(var(--text-rgb) / .55); opacity: var(--look, 0); white-space: nowrap; pointer-events: none; }
.d3-twin__drag::before { content: "↔  "; color: rgb(var(--acc-rgb)); }
.d3-plan, .d3-twin__l { display: none; }
/* jumeau : téléphone et écrans bas */
html.f-phone .d3-twin__ph, html.f-short .d3-twin__ph { display: none; }
html.f-stack.f-phone .d3-twin__p { font-size: .95rem; max-width: 28ch; }
html.f-phone .d3-cap { padding: 14px 16px; width: calc(100% - var(--gutter) * 2 - 72px); }
html.f-phone .d3-cap__p { font-size: .86rem; }
html.f-phone .d3-twin__drag { left: var(--gutter); transform: none; bottom: auto; top: 140px; }
html.f-phone.f-stack .d3-compass { top: 84px; }
html.f-phone.f-stack .d3-twin__drag { top: 136px; }
html.f-short .d3-twin__head { top: 64px; } html.f-short .d3-twin__p { display: none; }
html.f-short .d3-compass { top: 64px; } html.f-short .d3-compass svg { width: 34px; height: 34px; }
html.f-short .d3-cap { bottom: 12px; padding: 10px 14px; gap: 3px; width: min(380px, 52vw); }
html.f-short .d3-cap__p { font-size: .8rem; }
html.f-short .d3-twin__drag { left: auto; right: var(--gutter); transform: none; bottom: auto; top: 110px; }
/* sans WebGL ou mouvement réduit : plan et liste, pas de longue course */
html.d3-static .d3-twin { height: auto; }
html.d3-static .d3-twin__stick { position: relative; height: auto; overflow: visible; padding: clamp(100px, 15svh, 160px) 0 clamp(70px, 10svh, 120px); }
html.d3-static .d3-twin__head { position: relative; top: auto; opacity: 1; transform: none; }
html.d3-static .d3-twin__ph, html.d3-static .d3-compass, html.d3-static .d3-cap, html.d3-static .d3-twin__drag, html.d3-static .d3-twin__dots { display: none; }
html.d3-static .d3-twin__l { display: grid; gap: 14px; list-style: none; width: 100%; max-width: 1680px; margin: 40px auto 0; padding-inline: var(--gutter); counter-reset: hs; }
html.d3-static .d3-twin__l li { counter-increment: hs; padding: 14px 0 14px 46px; border-top: 1px solid var(--d3-line); position: relative; color: rgb(var(--text-rgb) / .78); }
html.d3-static .d3-twin__l li::before { content: "0" counter(hs); position: absolute; left: 0; top: 16px; font: 500 .72rem/1 var(--d3-mono); color: rgb(var(--acc-rgb)); }
html.d3-static .d3-twin__l b { color: rgb(var(--text-rgb)); }
html.d3-static .d3-twin__stick::after { content: none; }
/* lecteurs d'écran : la liste des points d'intérêt reste lisible pendant la visite animée */
html:not(.d3-static) .d3-twin__l { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =========================================================
   LES TROIS TERRAINS
   ========================================================= */
.d3-fields { padding: clamp(100px, 16svh, 180px) 0 clamp(80px, 12svh, 140px); }
.d3-fields__head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 30px; align-items: end; padding-bottom: clamp(36px, 6svh, 70px); }
.d3-fields__head p { color: rgb(var(--text-rgb) / .7); max-width: 38ch; justify-self: end; }
.d3-f { display: grid; grid-template-columns: clamp(170px, 22vw, 320px) minmax(0, 1fr); gap: clamp(24px, 5vw, 90px); align-items: center; padding: clamp(30px, 5svh, 56px) 0; border-top: 1px solid var(--d3-line); position: relative; }
.d3-f::before { content: ""; position: absolute; left: 0; top: -4px; width: 1px; height: 8px; background: rgb(var(--acc-rgb)); box-shadow: clamp(170px, 22vw, 320px) 0 0 rgb(var(--acc-rgb)); }
.d3-f__viz { aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative;
  background: linear-gradient(rgb(var(--acc-rgb) / .07) 1px, transparent 1px) 0 0 / 20px 20px, linear-gradient(90deg, rgb(var(--acc-rgb) / .07) 1px, transparent 1px) 0 0 / 20px 20px; }
.d3-f__viz::after { content: ""; position: absolute; inset: 0; background: radial-gradient(closest-side, transparent 55%, rgb(var(--bg-rgb)) 100%); pointer-events: none; }
.d3-f__txt h3 { font-size: clamp(1.7rem, 1.1rem + 2.2vw, 3.4rem); font-weight: 650; line-height: .98; letter-spacing: -.045em; margin-bottom: 18px; }
.d3-f__txt p { max-width: 56ch; color: rgb(var(--text-rgb) / .74); margin-top: 8px; }
.d3-f__txt p b { color: rgb(var(--text-rgb)); font-weight: 650; }
.d3-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; font: 500 .74rem/1 var(--d3-mono); color: rgb(var(--acc-rgb)); }
.d3-chips li::before { content: "▸ "; opacity: .55; }
/* cube filaire en CSS 3D */
.d3-viz-cube { perspective: 600px; }
.d3-wc { --w: clamp(56px, 7vw, 100px); --s: calc(var(--w) / 2); position: relative; z-index: 1; width: var(--w); height: var(--w); transform-style: preserve-3d; animation: d3-cube 12s linear infinite; }
.d3-wc i { position: absolute; inset: 0; border: 1px solid rgb(var(--acc-rgb) / .85); background: rgb(var(--acc-rgb) / .04); }
.d3-wc i:nth-child(1) { transform: translateZ(calc(var(--s, 50px))); } .d3-wc i:nth-child(2) { transform: rotateY(180deg) translateZ(var(--s, 50px)); }
.d3-wc i:nth-child(3) { transform: rotateY(90deg) translateZ(var(--s, 50px)); } .d3-wc i:nth-child(4) { transform: rotateY(-90deg) translateZ(var(--s, 50px)); }
.d3-wc i:nth-child(5) { transform: rotateX(90deg) translateZ(var(--s, 50px)); } .d3-wc i:nth-child(6) { transform: rotateX(-90deg) translateZ(var(--s, 50px)); }
@keyframes d3-cube { from { transform: rotateX(-24deg) rotateY(0); } to { transform: rotateX(-24deg) rotateY(360deg); } }
/* timeline de motion design */
.d3-f__viz svg { position: relative; z-index: 1; width: 82%; overflow: visible; }
.d3-curve { fill: none; stroke: rgb(var(--acc-rgb)); stroke-width: 1.5; stroke-dasharray: 320; stroke-dashoffset: 320; animation: d3-draw 4s var(--ease) infinite; }
.d3-keys path { fill: rgb(var(--bg-rgb)); stroke: rgb(var(--acc2-rgb)); stroke-width: 1.2; }
.d3-ruler { stroke: rgb(var(--text-rgb) / .3); stroke-dasharray: 1 7; }
.d3-head { stroke: rgb(var(--acc2-rgb)); stroke-width: 1; animation: d3-play 4s linear infinite; }
@keyframes d3-draw { 0% { stroke-dashoffset: 320; } 60%, 100% { stroke-dashoffset: 0; } }
@keyframes d3-play { from { transform: translateX(0); } to { transform: translateX(220px); } }
/* orbite à 360° */
.d3-viz-orbit svg { width: 62%; }
.d3-viz-orbit ellipse { fill: none; stroke: rgb(var(--acc-rgb) / .5); stroke-dasharray: 2 5; }
.d3-mini { fill: rgb(var(--acc-rgb) / .1); stroke: rgb(var(--acc-rgb)); stroke-width: 1; }
.d3-cam circle { fill: rgb(var(--acc2-rgb)); }
.d3-fields:not(.is-vis) .d3-wc, .d3-fields:not(.is-vis) .d3-curve, .d3-fields:not(.is-vis) .d3-head { animation-play-state: paused; }
/* livrables */
.d3-export { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: center; margin-top: clamp(20px, 3svh, 40px); padding: clamp(24px, 4svh, 36px) clamp(20px, 3vw, 36px);
  border: 1px dashed rgb(var(--acc-rgb) / .35); position: relative; overflow: hidden; }
.d3-export::before { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--d3-irid); transform: scaleX(var(--ex, 0)); transform-origin: left; }
.d3-export__t { font-size: clamp(1.1rem, .9rem + .7vw, 1.5rem); line-height: 1.3; letter-spacing: -.02em; }
.d3-export__l { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; }
.d3-export__l li { font: 500 .72rem/1 var(--d3-mono); padding: 10px 12px; border: 1px solid rgb(var(--acc-rgb) / .3); color: rgb(var(--acc-rgb)); }
.d3-export__l li::before { content: "✓ "; }
html.f-stack .d3-fields__head { grid-template-columns: 1fr; } html.f-stack .d3-fields__head p { justify-self: start; }
html.f-phone .d3-f { grid-template-columns: 1fr; gap: 18px; } html.f-phone .d3-f__viz { max-width: 280px; aspect-ratio: 16 / 9; }
html.f-phone .d3-f::before { box-shadow: none; }
html.f-phone .d3-export { grid-template-columns: 1fr; }

/* =========================================================
   PREUVE : le ghost screen
   ========================================================= */
.d3-proof { padding: clamp(100px, 16svh, 180px) 0 clamp(80px, 12svh, 140px); }
.d3-ghost { position: relative; margin-top: clamp(36px, 6svh, 64px); min-height: clamp(380px, 62svh, 620px); display: grid; place-items: center; padding: 40px 20px 120px; perspective: 1100px; overflow: hidden;
  background: radial-gradient(70% 60% at 50% 100%, rgb(var(--acc-rgb) / .1), transparent 70%), rgb(var(--deep-rgb)); }
.d3-ghost__room { position: absolute; inset: 0; pointer-events: none; }
.d3-ghost__floor { position: absolute; left: -40%; right: -40%; bottom: -10%; height: 60%; transform: perspective(500px) rotateX(68deg); transform-origin: bottom;
  background: linear-gradient(rgb(var(--acc-rgb) / .22) 1px, transparent 1px) 0 0 / 46px 46px, linear-gradient(90deg, rgb(var(--acc-rgb) / .22) 1px, transparent 1px) 0 0 / 46px 46px;
  -webkit-mask: linear-gradient(transparent, #000 70%); mask: linear-gradient(transparent, #000 70%); }
.d3-ghost__beam { position: absolute; left: 50%; bottom: 52px; width: min(760px, 92%); height: 78%; transform: translateX(-50%); clip-path: polygon(48% 100%, 52% 100%, 100% 0, 0 0);
  background: linear-gradient(to top, rgb(var(--acc-rgb) / .3), rgb(var(--acc-rgb) / .02) 80%); opacity: var(--beam, .2); transition: opacity .6s; }
.d3-ghost__pane { position: relative; z-index: 1; max-width: 860px; padding: clamp(26px, 4vw, 50px) clamp(22px, 4vw, 56px); text-align: center;
  transform: rotateX(calc(6deg + var(--ry, 0) * 1deg)) rotateY(calc(var(--rx, 0) * 1deg)); transform-style: preserve-3d; transition: transform .6s var(--ease);
  background: linear-gradient(160deg, rgb(var(--acc-rgb) / .1), rgb(var(--acc-rgb) / .02) 50%, rgb(var(--acc2-rgb) / .06)); border: 1px solid rgb(var(--acc-rgb) / .28); }
.d3-ghost__pane::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(transparent 0 3px, rgb(var(--acc-rgb) / .05) 3px 4px); }
.d3-ghost__pane::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30%; pointer-events: none; background: linear-gradient(transparent, rgb(var(--acc-rgb) / .1), transparent); animation: d3-scan 5s linear infinite; }
@keyframes d3-scan { from { transform: translateY(-100%); } to { transform: translateY(340%); } }
.d3-ghost__pane blockquote p { font-size: clamp(1.4rem, .9rem + 2vw, 3rem); font-weight: 560; line-height: 1.12; letter-spacing: -.035em; color: rgb(214 248 255); text-shadow: 0 0 22px rgb(var(--acc-rgb) / .45); }
.d3-ghost__pane figcaption { margin-top: 22px; font: 400 .78rem/1.3 var(--d3-mono); color: rgb(var(--acc-rgb) / .9); }
.d3-ghost__pane figcaption b { color: rgb(var(--text-rgb)); }
.d3-ghost.is-on .d3-ghost__pane { animation: d3-flick 1.2s steps(1) 1; }
@keyframes d3-flick { 0% { opacity: 0; } 8% { opacity: .7; } 12% { opacity: .1; } 20% { opacity: .9; } 26% { opacity: .4; } 34%, 100% { opacity: 1; } }
.d3-ghost__src { position: absolute; left: 50%; bottom: 44px; width: 120px; height: 16px; margin-left: -60px; border-radius: 50%; background: radial-gradient(closest-side, rgb(var(--acc-rgb) / .5), transparent); }
.d3-proof:not(.is-vis) .d3-ghost__pane::after { animation-play-state: paused; }
.d3-case { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 3vw, 40px); align-items: center; margin-top: 18px; padding: 16px; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--d3-line); transition: background .4s; }
.d3-case:hover, .d3-case:focus-visible { background: rgb(var(--acc-rgb) / .05); }
.d3-case__img { display: flex; gap: 6px; }
.d3-case__img img { width: clamp(84px, 9vw, 130px); aspect-ratio: 3 / 4; object-fit: cover; filter: saturate(.9); transition: transform .6s var(--ease); }
.d3-case:hover .d3-case__img img:first-child { transform: rotate(-3deg) translateY(-4px); } .d3-case:hover .d3-case__img img:last-child { transform: rotate(3deg) translateY(-4px); }
.d3-case__txt { display: grid; gap: 8px; }
.d3-case__txt b { font-size: clamp(1.1rem, .9rem + .7vw, 1.6rem); letter-spacing: -.03em; font-weight: 650; }
.d3-case__txt span { color: rgb(var(--text-rgb) / .7); max-width: 56ch; }
.d3-case__txt i { font: 500 normal .76rem/1 var(--d3-mono); color: rgb(var(--acc-rgb)); }
html.f-phone .d3-ghost { padding: 30px 14px 110px; min-height: 0; }
html.f-phone .d3-case { grid-template-columns: 1fr; }
html.f-short .d3-ghost { min-height: 0; padding: 28px 20px 96px; }

/* =========================================================
   CAS D'USAGE : le studio blanc (cyclorama)
   ========================================================= */
.svx--3d .d3-uses { padding: clamp(100px, 16svh, 180px) 0 clamp(80px, 12svh, 140px); color: rgb(8 22 32);
  background: radial-gradient(120% 80% at 50% 0%, rgb(250 253 255), rgb(226 236 242) 70%, rgb(206 220 228)); }
.d3-uses .d3-h2 { padding-right: 80px; }
.d3-uses .d3-h2 em { background: linear-gradient(100deg, rgb(0 120 168), rgb(120 70 200) 45%, rgb(200 60 150) 70%, rgb(0 120 168)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; }
.d3-uses__l { list-style: none; margin-top: clamp(36px, 6svh, 70px); }
.d3-uses__l li { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: baseline; padding: clamp(20px, 3.4svh, 34px) 18px; border-top: 1px solid rgb(8 22 32 / .14); outline: none; transition: background .4s; }
.d3-uses__l li:last-child { border-bottom: 1px solid rgb(8 22 32 / .14); }
.d3-uses__l li::before, .d3-uses__l li::after { content: ""; position: absolute; width: 18px; height: 18px; border: 0 solid rgb(0 120 168); opacity: 0; transition: opacity .3s, transform .5s var(--ease); }
.d3-uses__l li::before { left: 0; top: 6px; border-width: 1.5px 0 0 1.5px; transform: translate(-10px, -10px); }
.d3-uses__l li::after { right: 0; bottom: 6px; border-width: 0 1.5px 1.5px 0; transform: translate(10px, 10px); }
.d3-uses__l li:hover, .d3-uses__l li:focus-visible { background: rgb(255 255 255 / .55); }
.d3-uses__l li:hover::before, .d3-uses__l li:hover::after, .d3-uses__l li:focus-visible::before, .d3-uses__l li:focus-visible::after { opacity: 1; transform: none; }
@keyframes d3-rec { 50% { opacity: .2; } }
.d3-uses__l b { font-size: clamp(1.3rem, .95rem + 1.4vw, 2.4rem); font-weight: 650; letter-spacing: -.04em; line-height: 1; }
.d3-uses__l li > span:last-child { color: rgb(8 22 32 / .7); }
html.f-stack .d3-uses__l li { grid-template-columns: 90px minmax(0, 1fr); } html.f-stack .d3-uses__l li > span:last-child { grid-column: 2; }
html.f-phone .d3-uses__l li { grid-template-columns: 1fr; gap: 8px; padding-inline: 10px; } html.f-phone .d3-uses__l li > span:last-child { grid-column: auto; }

/* =========================================================
   FAQ (avec la mesure en direct)
   ========================================================= */
.d3-faq { padding: clamp(100px, 16svh, 180px) 0 clamp(80px, 12svh, 140px); }
.d3-faq .d3-h2 { padding-right: 80px; }
.d3-faq__l { margin-top: clamp(36px, 6svh, 70px); border-top: 1px solid var(--d3-line); }
.d3-faq details { border-bottom: 1px solid var(--d3-line); }
.d3-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: clamp(20px, 3.2svh, 30px) 0; font-size: clamp(1.15rem, .95rem + .8vw, 1.8rem); font-weight: 620; letter-spacing: -.03em; line-height: 1.15; }
.d3-faq summary::-webkit-details-marker { display: none; }
.d3-faq summary::after { content: ""; flex: none; width: 18px; height: 18px; border: 1px solid rgb(var(--acc-rgb)); transform: rotate(45deg); transition: transform .5s var(--ease), background .4s; }
.d3-faq details[open] summary::after { transform: rotate(225deg); background: rgb(var(--acc-rgb) / .2); }
.d3-faq summary:focus-visible { outline: 1px solid rgb(var(--acc-rgb)); outline-offset: 4px; }
.d3-faq__a { padding: 0 0 clamp(22px, 3.4svh, 34px); max-width: 70ch; color: rgb(var(--text-rgb) / .76); }
.d3-meter { margin-top: 22px; padding: 18px 20px; border: 1px dashed rgb(var(--acc-rgb) / .4); font-family: var(--d3-mono); font-size: .8rem; }
.d3-meter dl { display: grid; gap: 8px; }
.d3-meter dl > div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px dotted rgb(var(--text-rgb) / .15); padding-bottom: 6px; flex-wrap: wrap; }
.d3-meter dt { color: rgb(var(--text-rgb) / .6); } .d3-meter dd b { color: rgb(var(--text-rgb)); font-weight: 700; }

/* ---------- apparitions ---------- */
.d3-rv { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
.d3-rv.is-in { opacity: 1; transform: none; }

/* ---------- mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .d3-h1__t, .d3-wc, .d3-curve, .d3-head, .d3-ghost__pane::after, .d3-grab i, .d3-dot::after { animation: none !important; }
  .d3-curve { stroke-dashoffset: 0; }
  .d3-rv { opacity: 1; transform: none; }
}

/* ---------- l'appel final et les blocs « profonds » gardent la palette de la page ---------- */
html[data-svc="3d"] [data-tone="deep"], html[data-svc="3d"] [data-tone="dark"] {
  --bg-rgb: 3 6 10; --surface-rgb: 9 16 24; --text-rgb: 228 246 252; --muted-rgb: 122 148 162; --mutesp-rgb: 172 206 220;
  --acc-rgb: 120 225 255; --acc-hi-rgb: 186 242 255; --on-acc-rgb: 2 16 24; --acc2-rgb: 255 150 222;
  --space-rgb: 8 22 32; --space-glow: 40 150 180; --mint-rgb: 196 255 238;
}
html[data-svc="3d"] .rl-cta { background: radial-gradient(50% 42% at 50% 36%, rgb(120 225 255 / .1), transparent 70%), rgb(3 6 10); }
html[data-svc="3d"] .rl-cta__t em { background: var(--d3-irid); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
/* couloir libre à droite des listes : la mascotte y passe sans toucher le texte */
.d3-pain__l { padding-right: clamp(44px, 6vw, 110px); }
/* téléphone : légende de l'ouverture sur deux lignes, bouton dégagé de la bulle de chat, douleurs empilées */
html.f-phone.f-stack .d3-hero__note { white-space: normal; width: calc(100% - var(--gutter) * 2); }
html.f-phone.f-stack .d3-hero__note .d3-hint { display: none; }
html.f-phone.f-stack .d3-btns { padding-right: 64px; }
html.f-phone.f-stack .d3-pr { grid-template-columns: 1fr; gap: 10px; }
html.f-stack .d3-twin__ph { display: none; }
/* le studio blanc garde son fond clair (la règle des sections sombres ne s'y applique pas) */
html[data-svc="3d"] .svx--3d > section.d3-uses { background: radial-gradient(120% 80% at 50% 0%, rgb(250 253 255), rgb(226 236 242) 70%, rgb(206 220 228)); color: rgb(8 22 32); }

/* ---------- passe 2 : version resserrée ---------- */
.d3-uses__l li { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px; padding-left: 22px; padding-right: 22px; }
html.f-stack .d3-uses__l li { grid-template-columns: 1fr; gap: 6px; } html.f-stack .d3-uses__l li > span:last-child { grid-column: auto; }
.d3-meter { display: grid; gap: 10px; margin-top: 20px; max-width: 520px; }
.d3-meter > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; border-bottom: 1px dotted rgb(var(--text-rgb) / .15); padding-bottom: 8px; }
.d3-meter > div:last-child { border-bottom: 0; padding-bottom: 0; }
.d3-meter dd b { font-size: 1.05rem; color: rgb(var(--acc-rgb)); }
.d3-export { grid-template-columns: auto 1fr; } .d3-export__l { justify-content: flex-end; }
html.f-phone .d3-export__l { justify-content: flex-start; }
.d3-pr__b { max-width: 24ch; }
.d3-twin__p { max-width: 30ch; }

/* ---------- passe 3 ---------- */
/* titre « 3D » : dégradé périodique (même couleur aux deux bouts) et boucle d'une période exacte : plus de cassure ni de saut ;
   marge intérieure pour que le fond peint couvre tout le « D » malgré l'approche négative */
.d3-h1__t { background-image: linear-gradient(100deg, rgb(120 225 255) 0%, rgb(186 160 255) 18%, rgb(255 150 222) 34%, rgb(255 226 170) 50%, rgb(150 255 224) 66%, rgb(120 225 255) 84%, rgb(120 225 255) 100%);
  background-size: 200% 100%; background-repeat: repeat-x; background-position: 0 0; padding: 0 .09em 0 .02em; margin: 0 -.09em 0 -.02em; animation: d3-irid2 16s linear infinite; }
@keyframes d3-irid2 { to { background-position: 200% 0; } }
.d3-h1::before { left: .02em; padding-right: .09em; }
@media (prefers-reduced-motion: reduce) { .d3-h1__t { animation: none; } }
/* sol de l'ouverture (CSS, plus de WebGL ici) : grille en perspective et anneau, sous le logo-mascotte */
.d3-floor { position: absolute; left: 50%; bottom: 6%; width: min(130%, 900px); height: 34%; transform: translateX(-50%) perspective(420px) rotateX(64deg); transform-origin: 50% 100%; pointer-events: none;
  background: linear-gradient(rgb(var(--acc-rgb) / .2) 1px, transparent 1px) 50% 0 / 38px 38px, linear-gradient(90deg, rgb(var(--acc-rgb) / .2) 1px, transparent 1px) 50% 0 / 38px 38px;
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 100%); mask: radial-gradient(closest-side, #000 30%, transparent 100%); }
.d3-floor::after { content: ""; position: absolute; left: 22%; right: 22%; top: 18%; bottom: 18%; border: 1px solid rgb(var(--acc-rgb) / .45); border-radius: 50%; }
/* repli (mouvement réduit ou sans WebGL : la mascotte n'est pas affichée) : le symbole IAI, irisé */
.d3-fallback { display: none; position: absolute; left: 50%; top: 50%; width: min(34%, 260px); aspect-ratio: 765 / 1169; transform: translate(-50%, -50%); inset: auto;
  background: linear-gradient(160deg, rgb(120 225 255), rgb(186 160 255) 45%, rgb(255 150 222)); -webkit-mask: url(../ui/symbole.svg) center / contain no-repeat; mask: url(../ui/symbole.svg) center / contain no-repeat; object-fit: initial; opacity: .9; }
html.d3-rm .d3-fallback, html.d3-nogl .d3-fallback { display: block; }
html.d3-rm .d3-view, html.d3-rm .d3-hero__note .d3-hint { display: none; }
/* image fixe du pavillon (rendue dans Blender) : sans WebGL ou en mouvement réduit */
.d3-still { display: none; }
html.d3-static .d3-still { display: block; width: calc(100% - var(--gutter) * 2); max-width: 1500px; height: auto; margin: 36px auto 0; border-radius: 6px; }
/* repli de l'ouverture (mouvement réduit, sans WebGL) : capture du logo en métal irisé */
.d3-fallback { background: url(../svc/3d/logo-repli.webp) center / contain no-repeat; -webkit-mask: none; mask: none; width: min(70%, 560px); aspect-ratio: 1; }
html.d3-nologo .d3-fallback { display: block; }
