/* Film produit interactif : six scènes en HTML/CSS (données fictives). */
.film__wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(1.25rem, 3.5vw, 3rem); align-items: stretch; }
.film__stage { position: relative; direction: ltr; min-height: 33rem; background: radial-gradient(120% 90% at 50% 0, #26303a, var(--graphite-900) 70%); border: 1px solid var(--graphite-600); border-radius: 0.75rem; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8); }
.film__stage::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(125, 177, 230, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(125, 177, 230, 0.07) 1px, transparent 1px); background-size: 28px 28px; }
.film__demo { position: absolute; z-index: 3; top: 0.85rem; inset-inline-start: 1rem; font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite-400); direction: inherit; }
[dir="rtl"] .film__stage { direction: ltr; }
[dir="rtl"] .film__demo { inset-inline-start: auto; inset-inline-end: 1rem; }

.fs { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; visibility: hidden; transform: scale(0.97); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0s 0.45s; }
.fs.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.fs > * { position: relative; z-index: 1; }

/* Téléphone */
.phone { position: relative; width: 16rem; height: 28.5rem; background: var(--survey); color: var(--graphite-900); border: 0.55rem solid #0b0e10; border-radius: 2.1rem; display: flex; flex-direction: column; gap: 0.7rem; padding: 0 0.85rem 1rem; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px #343c44; font-size: 0.8125rem; }
.phone::before { content: ""; position: absolute; top: 0.35rem; left: 50%; width: 3.2rem; height: 0.7rem; margin-left: -1.6rem; background: #0b0e10; border-radius: 99px; z-index: 5; }
.phone__bar { margin-inline: -0.85rem; padding: 1.7rem 1rem 0.7rem; background: var(--graphite-800); color: var(--survey); font-weight: 600; font-size: 0.9375rem; }
.line { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.65rem 0.75rem; background: #fff; border: 1px solid var(--graphite-200); border-radius: 0.4rem; font-size: 0.875rem; }
.line .icon { width: 1rem; height: 1rem; color: var(--orange); }
.okline { display: flex; align-items: center; gap: 0.45rem; font-weight: 600; font-size: 0.8125rem; color: #2d7a55; }
.okline .icon { width: 1rem; height: 1rem; stroke-width: 2.4; }
.fbtn { margin-top: auto; text-align: center; padding: 0.8rem; background: var(--orange); color: var(--graphite-950); font-weight: 600; border-radius: 0.4rem; }
.ftoast { position: absolute; inset-inline: 0.75rem; bottom: 4.2rem; padding: 0.65rem 0.8rem; background: var(--graphite-900); color: #fff; border-radius: 0.4rem; font-weight: 600; font-size: 0.8125rem; border-inline-start: 4px solid var(--success); opacity: 0; transform: translateY(14px); }
.mini { font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--graphite-500); }
.chip { align-self: flex-start; padding: 0.25rem 0.7rem; border-radius: 99px; font-weight: 600; font-size: 0.75rem; }
.chip--wait { background: rgba(242, 192, 74, 0.28); color: #7a5a00; opacity: 0; transform: scale(0.8); }
.pct { font-size: 1.25rem; }

/* Navigateur */
.browser { width: min(30rem, 92%); background: var(--survey); color: var(--graphite-900); border-radius: 0.6rem; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px #343c44; font-size: 0.8125rem; }
.browser__bar { display: flex; align-items: center; gap: 0.35rem; padding: 0.55rem 0.75rem; background: var(--graphite-800); }
.browser__bar i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--graphite-500); }
.browser__bar span { margin-inline-start: 0.6rem; padding: 0.15rem 0.7rem; background: var(--graphite-900); color: var(--graphite-300); border-radius: 99px; font-size: 0.6875rem; }
.browser__body { display: grid; gap: 0.85rem; padding: 1rem; min-height: 14.5rem; align-content: start; }

/* Compteurs et animations par scène */
.fs.is-on .cnt--in { animation: cntIn 1.3s ease-out 3.6s both; }
.fs.is-on .cnt--out { animation: cntOut 1.2s ease-out 3.6s both; }
.fs.is-on .cnt--pct { animation: cntPct 1.4s ease-in-out 0.7s both; }
.fs.is-on .cnt--ring { animation: cntRing 1.4s ease-in-out 3.3s both; }
@keyframes cntIn { from { --n: 0; } to { --n: 40; } }
@keyframes cntOut { from { --n: 40; } to { --n: 28; } }
@keyframes cntPct { from { --n: 55; } to { --n: 70; } }
@keyframes cntRing { from { --n: 55; } to { --n: 70; } }
.cnt--in { --n: 0; }
.cnt--out { --n: 40; }
.cnt--pct, .cnt--ring { --n: 70; }

/* Scène 1 : réception */
.doc { position: relative; height: 8.5rem; background: #fff; border: 1px solid var(--graphite-200); border-radius: 0.4rem; padding: 0.8rem; overflow: hidden; }
.doc__lines { display: grid; gap: 0.5rem; }
.doc__lines i { height: 0.45rem; border-radius: 99px; background: var(--graphite-200); }
.doc__lines i:nth-child(2) { width: 70%; } .doc__lines i:nth-child(3) { width: 85%; } .doc__lines i:nth-child(4) { width: 55%; } .doc__lines i:nth-child(5) { width: 75%; }
.doc__scan { position: absolute; inset-inline: 0; top: 0; height: 2.4rem; background: linear-gradient(180deg, transparent, rgba(236, 122, 44, 0.45)); border-bottom: 2px solid var(--orange); opacity: 0; }
.fs.is-on .doc__scan { animation: scan 1.8s ease-in-out 0.4s both; }
@keyframes scan { 0% { opacity: 1; transform: translateY(-2.4rem); } 100% { opacity: 1; transform: translateY(8.5rem); } }
.fs[data-scene="1"] .okline, .fs[data-scene="1"] .line, .fs[data-scene="1"] .fbtn { opacity: 0; }
.fs[data-scene="1"].is-on .okline { animation: popIn 0.5s var(--ease) 2.3s both; }
.fs[data-scene="1"].is-on .line { animation: popIn 0.5s var(--ease) 2.9s both; }
.fs[data-scene="1"].is-on .fbtn { animation: popIn 0.5s var(--ease) 3.2s both, press 0.5s ease 4.3s both; }
.fs[data-scene="1"].is-on .ftoast { animation: toastIn 0.55s var(--ease) 4.8s both; }
@keyframes popIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes press { 0%, 100% { transform: none; } 50% { transform: scale(0.96); background: var(--orange-hover); } }
@keyframes toastIn { to { opacity: 1; transform: none; } }

/* Scène 2 : rangement par zone */
.qr { position: relative; align-self: center; width: 7.4rem; height: 7.4rem; padding: 0.5rem; background: #fff; border: 1px solid var(--graphite-200); border-radius: 0.4rem; overflow: hidden; }
.qr svg { width: 100%; height: 100%; fill: var(--graphite-900); }
.qr__scan { position: absolute; inset-inline: 0; top: 0; height: 2px; background: var(--orange); box-shadow: 0 0 0.6rem var(--orange); opacity: 0; }
.fs.is-on .qr__scan { animation: qrScan 1.6s ease-in-out 0.3s 2 both; }
@keyframes qrScan { 0% { opacity: 1; top: 0; } 50% { top: 100%; } 100% { opacity: 1; top: 0; } }
.zones { display: grid; gap: 0.45rem; }
.zone { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 0.5rem; padding: 0.55rem 0.75rem; background: #fff; border: 1px solid var(--graphite-200); border-radius: 0.4rem; transition: border-color 0.3s, background-color 0.3s; }
.zone span { font-weight: 600; }
.zone small { grid-column: 1 / -1; color: var(--graphite-500); font-size: 0.6875rem; }
.zone b { font-size: 1.1rem; }
.fs[data-scene="2"] .zones { opacity: 0; }
.fs[data-scene="2"].is-on .zones { animation: popIn 0.5s var(--ease) 2.2s both; }
.fs[data-scene="2"].is-on .zone--a { animation: zoneHi 0.8s ease 3.5s both; }
@keyframes zoneHi { to { border-color: var(--orange); background: rgba(236, 122, 44, 0.1); } }
.bag { position: absolute; z-index: 4; width: 1.9rem; height: 1.2rem; top: 8.2rem; inset-inline-start: 50%; margin-inline-start: -0.95rem; background: #d8cfc2; border: 2px solid #8d8272; border-radius: 0.2rem; opacity: 0; }
.fs.is-on .bag { animation: bagMove 1.1s var(--ease) 2.4s both; }
@keyframes bagMove { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-2.6rem, 6.9rem) rotate(-8deg) scale(0.8); } }

/* Scène 3 : sortie avec photo */
.photo { position: relative; height: 8rem; border-radius: 0.4rem; overflow: hidden; background: #1b2026; border: 1px solid var(--graphite-700); }
.photo__sky { position: absolute; inset: 0; background: linear-gradient(180deg, #9db4c6 0 55%, #6f6150 55% 100%); }
.photo__stack { position: absolute; inset-inline: 1.2rem; bottom: 0.7rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.2rem; }
.photo__stack i { height: 1.3rem; background: #d8cfc2; border: 2px solid #8d8272; border-radius: 0.2rem; opacity: 0; transform: translateY(-1rem); }
.fs.is-on .photo__stack i { animation: dropIn 0.4s ease both; }
.photo__stack i:nth-child(1) { animation-delay: 0.3s; } .photo__stack i:nth-child(2) { animation-delay: 0.5s; } .photo__stack i:nth-child(3) { animation-delay: 0.7s; } .photo__stack i:nth-child(4) { animation-delay: 0.9s; } .photo__stack i:nth-child(5) { animation-delay: 1.1s; } .photo__stack i:nth-child(6) { animation-delay: 1.3s; }
@keyframes dropIn { to { opacity: 1; transform: none; } }
.photo__flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
.fs.is-on .photo__flash { animation: flash 0.6s ease 2.1s both; }
@keyframes flash { 0% { opacity: 0; } 25% { opacity: 0.95; } 100% { opacity: 0; } }
.fs[data-scene="3"] .okline--late, .fs[data-scene="3"] .zones--one, .fs[data-scene="3"] .fbtn { opacity: 0; }
.fs[data-scene="3"].is-on .okline--late { animation: popIn 0.5s var(--ease) 2.8s both; }
.fs[data-scene="3"].is-on .zones--one { animation: popIn 0.5s var(--ease) 3.2s both; }
.fs[data-scene="3"].is-on .fbtn { animation: popIn 0.5s var(--ease) 3.4s both, press 0.5s ease 5s both; }

/* Scène 4 : avancement déclaré */
.slider { position: relative; height: 0.7rem; margin: 0.2rem 0.2rem 0.3rem; background: var(--graphite-200); border-radius: 99px; }
.slider__fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 70%; background: var(--orange); border-radius: 99px; }
.slider__knob { position: absolute; top: 50%; inset-inline-start: 70%; width: 1.3rem; height: 1.3rem; margin: -0.65rem 0 0 -0.65rem; background: #fff; border: 3px solid var(--orange); border-radius: 50%; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.fs.is-on .slider__fill { animation: fillTo 1.4s ease-in-out 0.7s both; }
.fs.is-on .slider__knob { animation: knobTo 1.4s ease-in-out 0.7s both; }
@keyframes fillTo { from { width: 55%; } to { width: 70%; } }
@keyframes knobTo { from { inset-inline-start: 55%; } to { inset-inline-start: 70%; } }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
.thumbs i { aspect-ratio: 1; border-radius: 0.35rem; background: linear-gradient(160deg, #8fa3b3 0 45%, #6b5a46 45% 62%, #4b4034 62%); position: relative; overflow: hidden; opacity: 0; transform: translateX(1.2rem) scale(0.9); }
.thumbs i:nth-child(2) { background: linear-gradient(160deg, #a7b6c2 0 40%, #7c6c58 40% 60%, #54483a 60%); }
.thumbs i:nth-child(3) { background: linear-gradient(160deg, #7c92a4 0 50%, #5e4f3d 50%); }
.thumbs i::after { content: ""; position: absolute; inset-inline: 18%; bottom: 14%; height: 22%; background: repeating-linear-gradient(90deg, #d8cfc2 0 0.4rem, #bdb2a2 0.4rem 0.46rem); border-radius: 2px; }
.fs.is-on .thumbs i { animation: thumbIn 0.5s var(--ease) both; }
.fs[data-scene="4"].is-on .thumbs i:nth-child(1) { animation-delay: 2.4s; } .fs[data-scene="4"].is-on .thumbs i:nth-child(2) { animation-delay: 2.7s; } .fs[data-scene="4"].is-on .thumbs i:nth-child(3) { animation-delay: 3s; }
.fs[data-scene="5"].is-on .thumbs i:nth-child(1) { animation-delay: 0.3s; } .fs[data-scene="5"].is-on .thumbs i:nth-child(2) { animation-delay: 0.45s; } .fs[data-scene="5"].is-on .thumbs i:nth-child(3) { animation-delay: 0.6s; }
@keyframes thumbIn { to { opacity: 1; transform: none; } }
.fs[data-scene="4"] .fbtn { margin-top: auto; }
.fs[data-scene="4"].is-on .fbtn { animation: press 0.5s ease 4s both; }
.fs[data-scene="4"].is-on .chip--wait { animation: chipIn 0.5s var(--ease) 4.6s both; }
@keyframes chipIn { to { opacity: 1; transform: none; } }

/* Scène 5 : vérification */
.thumbs--sm { width: 6.2rem; flex: none; }
.vrow { display: flex; align-items: center; gap: 0.85rem; padding: 0.75rem; background: #fff; border: 2px solid var(--graphite-200); border-radius: 0.5rem; opacity: 0; transform: translateY(10px); }
.fs[data-scene="5"].is-on .vrow { animation: popIn 0.5s var(--ease) 0.1s both, vrowOk 0.5s ease 3s both; }
@keyframes vrowOk { to { border-color: var(--success); background: rgba(92, 197, 147, 0.1); } }
.vrow__txt { display: grid; gap: 0.15rem; flex: 1; min-width: 0; }
.vrow__txt span { color: var(--graphite-600); font-size: 0.75rem; }
.vbtn { position: relative; display: grid; flex: none; min-width: 6rem; justify-items: center; }
.vbtn__a, .vbtn__b { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.5rem 0.9rem; border-radius: 0.4rem; font-weight: 600; font-size: 0.8125rem; }
.vbtn__a { background: var(--graphite-900); color: #fff; }
.vbtn__b { background: var(--success); color: #0f3a27; opacity: 0; transform: scale(0.85); }
.vbtn__b .icon { width: 0.95rem; height: 0.95rem; stroke-width: 2.6; }
.fs[data-scene="5"].is-on .vbtn__a { animation: press 0.5s ease 2.6s both, fadeOut 0.3s ease 3s forwards; }
.fs[data-scene="5"].is-on .vbtn__b { animation: chipIn 0.5s var(--ease) 3s both; }
@keyframes fadeOut { to { opacity: 0; } }
.vring { display: flex; align-items: center; gap: 1rem; }
.fs[data-scene="5"] .ring__fg { animation: none; }
.fs[data-scene="5"].is-on .ring { animation: ring55 1.4s ease-in-out 3.3s both; }
@keyframes ring55 { from { --p: 55; } to { --p: 70; } }
.sod { padding: 0.5rem 0.8rem; background: rgba(47, 111, 179, 0.12); color: #1f4f82; border-radius: 0.4rem; font-weight: 600; font-size: 0.8125rem; opacity: 0; }
.fs[data-scene="5"].is-on .sod { animation: chipIn 0.5s var(--ease) 1.2s both; }
.fs[data-scene="5"] .ring__n { color: var(--graphite-900); }
.fs[data-scene="5"] .ring__bg { stroke: var(--graphite-200); }
.fs[data-scene="5"] .ring__n small { color: var(--graphite-500); }

/* Scène 6 : écart détecté */
.bars { display: flex; align-items: flex-end; gap: 1.5rem; height: 7rem; padding-inline: 1rem; border-bottom: 2px solid var(--graphite-300); position: relative; margin-bottom: 1.5rem; }
.bars::before { content: ""; position: absolute; inset-inline: 0; bottom: 4.2rem; border-top: 2px dashed var(--graphite-400); opacity: 0.7; }
.bars__col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bars__col span { position: absolute; bottom: -1.5rem; font-size: 0.6875rem; color: var(--graphite-600); white-space: nowrap; }
.bar { display: block; width: 4rem; border-radius: 3px 3px 0 0; transform-origin: bottom; transform: scaleY(0); }
.bar--exp { height: 4.2rem; background: var(--blue); }
.bar--used { height: 6.2rem; background: var(--orange); }
.fs[data-scene="6"].is-on .bar--exp { animation: grow 1s var(--ease) 0.3s both; }
.fs[data-scene="6"].is-on .bar--used { animation: grow 1.4s var(--ease) 0.9s both, over 0.6s ease 2.4s both; }
@keyframes grow { to { transform: none; } }
@keyframes over { to { background: #e5534b; } }
.alertbox { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.9rem; background: #fff; border: 2px solid #e5534b; border-radius: 0.5rem; opacity: 0; transform: translateY(12px); }
.alertbox .icon { width: 1.5rem; height: 1.5rem; color: #e5534b; }
.alertbox > div { display: grid; gap: 0.15rem; }
.alertbox__link { color: var(--blue); font-weight: 600; font-size: 0.75rem; text-decoration: underline; text-underline-offset: 3px; }
.fs[data-scene="6"].is-on .alertbox { animation: popIn 0.5s var(--ease) 3.1s both, shake 0.5s ease 3.7s both; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Liste des étapes */
.film__side { display: grid; grid-template-rows: 1fr auto; gap: 1rem; align-content: start; }
.film__steps { display: grid; gap: 0.5rem; }
.film__step { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.9rem; width: 100%; padding: 0.85rem 1rem; text-align: start; color: var(--graphite-300); background: rgba(243, 245, 247, 0.03); border: 1px solid var(--graphite-700); border-radius: 0.5rem; overflow: hidden; transition: background-color 0.25s, border-color 0.25s, color 0.25s; }
.film__step:hover { border-color: var(--graphite-500); color: var(--survey); }
.film__num { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border: 1px solid var(--graphite-500); border-radius: 50%; font-size: 0.8125rem; transition: background-color 0.25s, color 0.25s, border-color 0.25s; }
.film__txt { display: grid; gap: 0.2rem; align-content: center; }
.film__txt b { font-weight: 600; font-size: 1.0625rem; color: var(--survey); }
.film__txt > span { max-height: 0; opacity: 0; overflow: hidden; font-size: 0.9375rem; line-height: 1.5; transition: max-height 0.4s var(--ease), opacity 0.3s; }
.film__step.is-active { background: rgba(236, 122, 44, 0.1); border-color: var(--orange); color: var(--graphite-200); }
.film__step.is-active .film__num { background: var(--orange); border-color: var(--orange); color: var(--graphite-950); }
.film__step.is-active .film__txt > span { max-height: 8rem; opacity: 1; margin-top: 0.15rem; }
.film__bar { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--orange); transform: scaleX(var(--prog, 0)); transform-origin: left; opacity: 0; }
[dir="rtl"] .film__bar { transform-origin: right; }
.film__step.is-active .film__bar { opacity: 1; }
.film__ctl { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.film__count { color: var(--graphite-400); font-size: 0.8125rem; }
.film__ic-play { display: none; }
.film__toggle.is-paused .film__ic-play { display: block; }
.film__toggle.is-paused .film__ic-pause { display: none; }

@media (max-width: 62rem) {
  .film__wrap { grid-template-columns: 1fr; }
  .film__stage { min-height: 32rem; }
}
@media (max-width: 30rem) {
  .film__stage { min-height: 31rem; }
  .phone { transform: scale(0.94); }
  .browser__body { padding: 0.8rem; }
  .thumbs--sm { width: 4.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .film__step.is-active .film__bar { display: none; }
}
