/* Film « agences » de la landing. Scène fixe mise à l'échelle :
   paysage 1280×720 (légende à gauche) ou portrait 720×960 (légende en haut). */
:root {
  --ink: #26232B; --ink-2: #4b5563; --dim: #6b7280; --line: rgba(38,35,43,.08);
  --cream: #FDF4E7; --rail: #eef0f3; --dark: #303434;
  --wa-bg: #efeae2; --wa-out: #d9fdd3; --ok: #2f7d4f; --ok-bg: #e6f3ea; --marker: #f3c969;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--rail); color: var(--ink); font-family: 'Jost', system-ui, sans-serif; overflow: hidden; }
.vp { position: fixed; inset: 0; overflow: hidden; }
.stage { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; background: var(--rail); overflow: hidden; }
.tall .stage { width: 720px; height: 960px; }

/* ---------- légende ---------- */
.rail { position: absolute; left: 0; top: 0; width: 440px; height: 720px; padding: 48px 44px; }
.tall .rail { width: 720px; height: 330px; padding: 40px 48px 0; }
.rail-logo { display: none; }
.prog { display: none; }
.prog button { flex: 1; height: 22px; padding: 9px 0; border: 0; background: none; cursor: pointer; }
.prog button i { display: block; height: 4px; border-radius: 4px; background: rgba(38,35,43,.14); overflow: hidden; }
.prog button i::after { content: ""; display: block; height: 100%; width: 100%; background: var(--dark); transform: scaleX(0); transform-origin: left; }
.prog button.done i::after { transform: none; }
.prog button.on i::after { animation: fill var(--dur, 6s) linear both; }
.prog button:focus-visible { outline: 2px solid var(--dark); outline-offset: 2px; border-radius: 4px; }
@keyframes fill { to { transform: none; } }
.caps { position: relative; }
.cap { position: absolute; left: 0; right: 0; top: 150px; opacity: 0; transform: translateY(16px); transition: opacity .4s, transform .5s cubic-bezier(.2,.8,.2,1); }
.tall .cap { top: 34px; }
.cap.on { opacity: 1; transform: none; transition-delay: .1s; }
.cap .k { margin: 0 0 16px; font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #8b9096; }
.cap h2 { margin: 0 0 18px; font-family: 'Bricolage Grotesque', 'Jost', sans-serif; font-weight: 800; font-size: 40px; line-height: 1.1; letter-spacing: -.01em; color: #1f2124; text-wrap: balance; }
.tall .cap h2 { font-size: 46px; margin-bottom: 14px; }
.cap p { margin: 0; font-size: 19px; line-height: 1.55; color: #4a4f55; }
.tall .cap p { font-size: 25px; }

/* ---------- plateau ---------- */
.set { position: absolute; left: 440px; top: 0; width: 840px; height: 720px; }
.tall .set { left: 0; top: 330px; width: 720px; height: 630px; }
.scene { position: absolute; inset: 0; display: none; }
.scene.on { display: block; }
/* Boîte de composition commune : 660×600 centrée. */
.scene > * { position: absolute; }

/* Téléphone */
.phone {
  left: 50%; top: 50%; width: 340px; height: 590px; margin: -295px 0 0 -300px;
  display: flex; flex-direction: column;
  border-radius: 34px; overflow: hidden; background: var(--wa-bg);
  border: 8px solid #1d1f20; box-shadow: 0 40px 70px -36px rgba(0,0,0,.55);
}
.tall .phone { height: 560px; margin-top: -290px; }
.phone.short { height: 330px; margin-top: -40px; }
.tall .phone.short { margin-top: -30px; }
.phone-head { display: flex; align-items: center; gap: 12px; padding: 16px; background: #f7f5f2; border-bottom: 1px solid rgba(0,0,0,.06); }
.who { display: flex; flex-direction: column; line-height: 1.25; }
.who b { font-size: 17px; }
.who small { font-size: 13.5px; color: var(--ok); }
.av { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--dark); color: #fff; font-weight: 600; font-size: 16px; }
.av.sm { width: 34px; height: 34px; font-size: 14px; }
.av.g { background: #c9c3b8; }
.chat { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px 14px 18px; }
.msg { position: relative; margin: 10px 0 0; max-width: 86%; padding: 10px 13px 22px; border-radius: 14px; font-size: 17px; line-height: 1.4; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.msg time { position: absolute; right: 10px; bottom: 5px; font-size: 12px; color: #667; }
.msg.in { align-self: flex-start; background: #fff; border-top-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--wa-out); border-top-right-radius: 4px; }
.typing { align-self: flex-end; margin: 0; display: flex; align-items: center; gap: 5px; padding: 0 14px; height: 0; opacity: 0; overflow: hidden; border-radius: 14px; background: var(--wa-out); }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: #6b7b6b; animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Cartes */
.notif, .panel, .pop, .cal, .pass, .crm {
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 30px 60px -34px rgba(0,0,0,.45);
}
.notif { left: 50%; top: 52px; width: 400px; margin-left: -20px; padding: 16px 20px; display: flex; flex-direction: column; gap: 3px; font-size: 16px; z-index: 2; }
.notif .app { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ok); }
.notif b { font-size: 18px; }
.notif span:last-child { color: var(--ink-2); }
.notif.agent { left: 50%; top: 70px; width: 470px; margin-left: -235px; }
.notif.agent .app { color: #8a6a2a; }
.chip { margin: 0; padding: 10px 18px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 16px; font-weight: 600; box-shadow: 0 14px 28px -16px rgba(0,0,0,.35); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
[data-s="2"] .chip { left: 50%; bottom: 40px; margin-left: -20px; z-index: 2; }
[data-s="4"] .chip { left: 50%; top: 56px; transform: translateX(-50%); }

.panel { left: 50%; top: 50%; width: 300px; margin: -110px 0 0 70px; padding: 20px 22px; z-index: 2; }
.panel-k { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.facts li { display: flex; justify-content: space-between; gap: 10px; font-size: 18px; padding-bottom: 10px; border-bottom: 1px dashed rgba(0,0,0,.08); }
.facts li:last-child { border: 0; padding: 0; }
.facts span { color: var(--dim); }

/* Passport */
.pass { left: 50%; top: 50%; width: 460px; margin: -190px 0 0 -230px; padding: 26px 28px 30px; }
.pass-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.pass-head b { display: block; font-size: 21px; }
.pass-head small { font-size: 15px; color: var(--dim); }
.mark { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--dark); color: var(--cream); font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 20px; }
.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.checks li { display: flex; align-items: center; gap: 12px; font-size: 19px; }
.checks li::before {
  content: ""; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.meter { position: relative; margin-top: 24px; height: 8px; border-radius: 99px; background: #ece8e1; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--ok); transform-origin: left; }
.stamp { position: absolute; right: -26px; bottom: -26px; margin: 0; padding: 10px 16px; border: 3px solid var(--ok); border-radius: 12px; background: #fff; color: var(--ok); font-size: 17px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; transform: rotate(-5deg); }

/* CRM */
.crm { left: 50%; top: 50%; width: 650px; margin: -230px 0 0 -325px; padding: 18px 18px 10px; }
.tall .crm { margin-top: -250px; }
.crm-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 14px; }
.crm-head b { font-size: 21px; }
.tabs { display: flex; gap: 6px; font-size: 14px; color: var(--dim); }
.tabs span { padding: 6px 12px; border-radius: 999px; }
.tabs .on { background: var(--dark); color: #fff; }
.row { display: grid; grid-template-columns: 34px minmax(0,1fr) 72px 46px 64px 100px; align-items: center; gap: 12px; padding: 12px 10px; border-top: 1px solid var(--line); font-size: 15px; }
.row.new { border-radius: 14px; background: #fbf6e9; border-top-color: transparent; box-shadow: inset 0 0 0 2px var(--marker); }
.nm { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.nm b { font-size: 16px; } .nm small { color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { justify-self: start; padding: 4px 10px; border-radius: 999px; background: #eef0f3; font-size: 13px; font-weight: 600; }
.score { font-weight: 700; font-size: 18px; color: var(--ok); }
.score.mid { color: #8a6a2a; } .score.low { color: var(--dim); }
.ag { color: var(--ink-2); }
.st { justify-self: start; padding: 4px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: 13px; font-weight: 600; }
.st.grey { background: #f1f1f0; color: var(--dim); }
.pop { right: 30px; bottom: 34px; width: 300px; padding: 18px 20px; z-index: 2; }
.tall .pop { right: 24px; bottom: 18px; }
.bars { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.bars li { display: grid; grid-template-columns: 96px 1fr 22px; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.bars i { height: 7px; border-radius: 99px; background: #ece8e1; overflow: hidden; }
.bars i::after { content: ""; display: block; height: 100%; width: var(--w); background: var(--dark); border-radius: inherit; transform-origin: left; }
.bars em { font-style: normal; font-weight: 700; color: var(--ink); text-align: right; }

/* Remise à l'agent */
.cal { left: 50%; top: 210px; width: 360px; margin-left: -400px; padding: 16px 18px; display: flex; align-items: center; gap: 16px; z-index: 2; }
.tall .cal { margin-left: -330px; top: 196px; }
.cal .day { display: grid; place-items: center; width: 60px; height: 64px; border-radius: 14px; background: var(--dark); color: #fff; line-height: 1; }
.cal .day small { font-size: 12px; letter-spacing: .1em; opacity: .8; } .cal .day b { font-size: 26px; }
.cal b { display: block; font-size: 17px; } .cal small { font-size: 14px; color: var(--dim); }
[data-s="6"] .phone { margin-left: -20px; }
.paused { color: #8a6a2a !important; }

/* ---------- animations (jouées quand la scène est .on) ---------- */
.on .msg { animation: msgIn .45s cubic-bezier(.2,.8,.2,1) var(--d,0s) both; }
.on .typing { animation: typing 1.2s ease var(--d,0s) both; }
.on .notif, .on .chip, .on .panel, .on .pop, .on .cal, .on .pass { animation: pop .55s cubic-bezier(.2,.9,.25,1.15) var(--d,0s) both; }
[data-s="4"].on .chip { animation-name: popX; }
.on .facts li, .on .checks li { animation: up .4s ease var(--d,0s) both; }
.on .checks li::before { animation: tick .35s ease calc(var(--d,0s) + .25s) both; }
.on .meter i { animation: grow 2.2s cubic-bezier(.3,.7,.3,1) var(--d,0s) both; }
.on .stamp { animation: stamp .5s cubic-bezier(.2,.9,.25,1.3) var(--d,0s) both; }
.on .row.new { animation: rowIn .6s cubic-bezier(.2,.8,.2,1) var(--d,0s) both; }
.on .row:not(.new) { animation: rowShift .6s cubic-bezier(.2,.8,.2,1) .8s both; }
.on .bars i::after { animation: grow .8s cubic-bezier(.2,.8,.2,1) var(--d,0s) both; }
.on .paused { animation: fadeIn .4s ease var(--d,0s) both; }
.on .phone { animation: fadeIn .4s ease both; }

@keyframes msgIn { from { opacity: 0; max-height: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; max-height: 300px; transform: none; } }
@keyframes typing { 0% { opacity: 0; height: 0; margin-top: 0; } 12%, 85% { opacity: 1; height: 34px; margin-top: 10px; } 100% { opacity: 0; height: 0; margin-top: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes popX { from { opacity: 0; transform: translate(-50%, 16px) scale(.94); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes tick { from { transform: scale(0); } 70% { transform: scale(1.25); } to { transform: scale(1); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes stamp { from { opacity: 0; transform: scale(1.7) rotate(-12deg); } to { opacity: 1; transform: rotate(-5deg); } }
@keyframes rowIn { from { opacity: 0; transform: translateY(-14px); max-height: 0; padding-top: 0; padding-bottom: 0; } to { opacity: 1; transform: none; max-height: 80px; } }
@keyframes rowShift { from { transform: translateY(-62px); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition: none !important; }
  .typing { display: none; }
}

/* ---------- portrait : légende plus haute, plateau resserré ---------- */
.tall .rail { height: 410px; }
.tall .set { top: 410px; height: 550px; }
.tall .phone { height: 500px; margin-top: -255px; }
.tall .phone.short { height: 280px; margin-top: -5px; }
.tall .notif { top: 30px; }
.tall .notif.agent { top: 14px; }
.tall .cal { top: 128px; }
.tall .pass { margin-top: -150px; }
.tall [data-s="4"] .chip { top: 30px; }
.tall .crm { margin-top: -250px; }
.tall .pop { bottom: 10px; }
.tall [data-s="2"] .chip { bottom: 20px; }
.tall [data-s="2"] .notif { width: 360px; margin-left: -40px; }
.tall [data-s="2"] .chip { left: auto; right: 24px; margin-left: 0; bottom: 8px; }
.tall .panel { width: 290px; margin-left: 30px; }

/* ---------- vrais écrans du produit, dans une fenêtre de navigateur ---------- */
.shot {
  left: 50%; top: 50%; width: 780px; margin: -265px 0 0 -390px;
  border-radius: 16px; overflow: hidden; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 40px 80px -40px rgba(0,0,0,.5);
}
.tall .shot { width: 680px; margin: -250px 0 0 -340px; }
.shot-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; background: #f3f1ee; border-bottom: 1px solid var(--line); }
.shot-bar i { width: 11px; height: 11px; border-radius: 50%; background: #d9d5cf; }
.shot-bar span { margin-left: 14px; padding: 4px 14px; border-radius: 8px; background: #fff; font-size: 13px; color: var(--dim); }
.shot-view { position: relative; overflow: hidden; height: 470px; }
.tall .shot-view { height: 440px; }
.shot-zoom { position: relative; transform-origin: var(--ox, 50%) var(--oy, 50%); }
.shot-zoom img { display: block; width: 100%; height: auto; }
.hl { position: absolute; border-radius: 12px; box-shadow: 0 0 0 3px var(--marker), 0 0 0 9999px rgba(30, 28, 26, .14); opacity: 0; }

[data-s="1"] .chip { left: 50%; bottom: 46px; transform: translateX(-50%); z-index: 2; }
[data-s="5"] .chip { left: 50%; top: 40px; transform: translateX(-50%); z-index: 2; }
[data-s="5"] .pop { right: 20px; bottom: 30px; }
[data-s="6"] .shot { margin-left: -420px; }
[data-s="6"] .phone.short { left: auto; right: 16px; top: auto; bottom: 24px; width: 320px; height: 300px; margin: 0; z-index: 2; }
.tall [data-s="6"] .shot { margin-left: -340px; margin-top: -265px; }
.tall [data-s="6"] .phone.short { right: 24px; bottom: 8px; height: 270px; }
.tall [data-s="1"] .chip { bottom: 22px; }
.tall [data-s="5"] .chip { top: 8px; }

.on .shot { animation: pop .6s cubic-bezier(.2,.9,.25,1.1) var(--d,0s) both; }
.on .shot-zoom { animation: zoomTo 1.6s cubic-bezier(.45,.05,.2,1) var(--zd, 1.5s) both; }
.on .hl { animation: hlIn .5s ease var(--d,0s) both; }
[data-s="1"].on .chip, [data-s="5"].on .chip { animation-name: popX; }
@keyframes zoomTo { from { transform: none; } to { transform: scale(var(--z, 1.5)); } }
@keyframes hlIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }

/* ---------- iPhone (cadre titane, Dynamic Island, barre d'état, WhatsApp) ---------- */
.phone.kc-phone {
  display: flex; flex-direction: column;
  width: 300px; height: 624px; margin: -312px 0 0 -290px;
  padding: 9px; border: 0; border-radius: 54px; overflow: visible;
  background: linear-gradient(150deg, #57535e 0%, #2a282e 22%, #3d3a43 55%, #1e1c22 100%);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22), inset 0 0 0 5px #0b0a0d, 0 50px 90px -40px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.2);
}
.tall .phone.kc-phone { width: 252px; height: 528px; margin: -264px 0 0 -262px; border-radius: 46px; }
.kc-phone::before { content: ""; position: absolute; left: -3px; top: 104px; width: 3px; height: 26px; border-radius: 2px 0 0 2px; background: #2f2c34; box-shadow: 0 46px 0 0 #2f2c34, 0 96px 0 0 #2f2c34; }
.kc-phone::after { content: ""; position: absolute; right: -3px; top: 150px; width: 3px; height: 78px; border-radius: 0 2px 2px 0; background: #2f2c34; }
.kc-phone__screen {
  position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column;
  border-radius: 45px; overflow: hidden; background-color: var(--wa-bg);
  background-image: radial-gradient(rgba(84,101,111,.08) 1px, transparent 1.3px); background-size: 14px 14px;
}
.tall .kc-phone__screen { border-radius: 38px; }
.kc-status { position: relative; flex: none; height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 4px 24px 0 32px; background: #f6f5f3; font: 600 15px/1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Jost', sans-serif; color: #111; }
.kc-island { position: absolute; left: 50%; top: 10px; width: 96px; height: 28px; margin-left: -48px; border-radius: 20px; background: #000; }
.kc-sys { display: flex; align-items: center; gap: 5px; }
.kc-sys svg { height: 12px; width: auto; fill: currentColor; }
.wa-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 2px 12px 10px 6px; background: #f6f5f3; border-bottom: 1px solid rgba(0,0,0,.08); }
.wa-head .av { width: 36px; height: 36px; font-size: 15px; background: #8a6a2a; }
.wa-head .who { flex: 1; min-width: 0; }
.wa-head .who b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-head .who small { font-size: 12.5px; color: #667781; }
.wa-ico { flex: none; width: 23px; height: 23px; fill: none; stroke: #1b7cf5; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kc-phone .chat { padding: 10px 12px 12px; }
.kc-phone .msg { font-size: 15.5px; }
.wa-note { align-self: center; margin: 0 0 4px; padding: 5px 11px; border-radius: 9px; background: #fdf3c4; font-size: 12.5px; color: #54656f; }
.kc-by { display: block; margin-bottom: 2px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--ok); }
.msg.out time { color: #53bdeb; }
.wa-input { flex: none; display: flex; align-items: center; gap: 10px; padding: 9px 12px 5px; background: #f6f5f3; border-top: 1px solid rgba(0,0,0,.06); }
.wa-input span { flex: 1; height: 32px; display: flex; align-items: center; padding: 0 12px; border-radius: 17px; background: #fff; border: 1px solid #e3e3e3; font-size: 14px; color: #9aa0a6; }
.kc-home { flex: none; height: 24px; display: grid; place-items: center; background: #f6f5f3; }
.kc-home::after { content: ""; width: 36%; height: 5px; border-radius: 5px; background: #111; }

/* Petit iPhone posé sur la fiche lead (chapitre 6) */
[data-s="6"] .phone.short.kc-phone { left: auto; top: auto; right: 18px; bottom: 6px; width: 240px; height: 500px; margin: 0; border-radius: 44px; z-index: 2; }
[data-s="6"] .kc-phone__screen { border-radius: 36px; }
[data-s="6"] .kc-phone .msg { font-size: 13.5px; }
.tall [data-s="6"] .phone.short.kc-phone { width: 200px; height: 420px; right: 14px; bottom: 4px; border-radius: 38px; }
.tall [data-s="6"] .kc-phone__screen { border-radius: 30px; }
.tall [data-s="6"] .kc-status { height: 38px; padding: 2px 16px 0 22px; font-size: 12px; }
.tall [data-s="6"] .kc-island { width: 70px; height: 22px; margin-left: -35px; top: 8px; }
.tall [data-s="6"] .wa-head .who b { font-size: 13px; }
[data-s="6"] .wa-note.paused { color: #8a6a2a; }
.on .wa-note.paused { animation: fadeIn .4s ease var(--d,0s) both; }
[data-s="6"] .kc-status { height: 40px; padding: 2px 18px 0 26px; font-size: 13px; }
[data-s="6"] .kc-island { width: 74px; height: 23px; margin-left: -37px; top: 8px; }
[data-s="6"] .kc-sys svg { height: 10px; }
[data-s="6"] .wa-head .who b { font-size: 14px; }
.tall [data-s="6"] .kc-status { padding: 2px 14px 0 20px; font-size: 11px; }
.tall [data-s="6"] .kc-island { width: 60px; height: 19px; margin-left: -30px; }
