/* =============================================================================
   Accueil : animations des sections. Chargé uniquement sur la page d'accueil,
   avec public/motion.js (qui ajoute .is-in quand un bloc [data-m] entre à l'écran).

   Règles :
   - L'état affiché par défaut est l'état final. Sans JavaScript, ou si l'appareil
     demande moins d'animations, tout est visible et immobile.
   - Les états de départ (masqué, décalé) ne s'appliquent qu'avec la classe .m-on
     (posée dans <head> par config.js) et tant que le bloc n'est pas entré à
     l'écran (:not(.is-in)). Si motion.js ne démarre pas dans les 4 secondes,
     config.js enlève .m-on : tout s'affiche.
   - On n'anime que opacity, translate, scale, rotate, clip-path et des tracés SVG.
============================================================================= */
:root {
  --m-out: cubic-bezier(.16, 1, .3, 1);
  --m-spring: cubic-bezier(.34, 1.56, .64, 1);
  --m-io: cubic-bezier(.65, 0, .35, 1);
}

/* =============================================================================
   1. Mise en page des éléments ajoutés (visible avec ou sans animation)
============================================================================= */

/* Aucune animation ne doit élargir la page (états de départ décalés, tampon agrandi) : chaque section rogne à l'horizontale. */
.m-home > section { overflow-x: clip; }

/* ---- Haut de page ---- */
.home-hero { position: relative; isolation: isolate; }
.m-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.m-bg i { position: absolute; border-radius: 50%; }
.m-bg i:nth-child(1) { width: 560px; height: 560px; top: -220px; inset-inline-end: -140px; background: radial-gradient(closest-side, rgba(110, 79, 246, .2), transparent); --b: 0; }
.m-bg i:nth-child(2) { width: 460px; height: 460px; bottom: -240px; inset-inline-start: 34%; background: radial-gradient(closest-side, rgba(255, 212, 92, .26), transparent); --b: 1; }
.m-bg i:nth-child(3) { width: 380px; height: 380px; top: 22%; inset-inline-start: -200px; background: radial-gradient(closest-side, rgba(169, 150, 255, .2), transparent); --b: 2; }

.m-stage { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 640px) { .home-hero .m-stage { display: none; } }

/* Maquette en relief : légère perspective, notifications au premier plan. */
.home-hero .hero-visual { perspective: 1600px; }
.hero-3d { position: relative; min-height: inherit; transform-style: preserve-3d; --rx: 3deg; --ry: -7deg;
  transform: rotateX(calc(var(--rx) - var(--py, 0) * 4deg)) rotateY(calc(var(--ry) + var(--px, 0) * 7deg)); transition: transform .6s var(--m-out); }
[dir="rtl"] .hero-3d { --ry: 7deg; }
.hero-3d .toast { transform: translateZ(60px); }
.hero-3d .t3 { transform: translateZ(90px); }
.hero-3d .t1, .hero-3d .t2 { width: 300px; }
.toast-txt { min-width: 0; }
.toast-txt b, .toast-txt small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-kpis b { width: fit-content; font-variant-numeric: tabular-nums; }
.dash-ping { position: absolute; right: 0; top: 15.7%; width: 12px; height: 12px; margin: -6px -6px 0 0; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #fff, 0 6px 14px rgba(110, 79, 246, .45); }
.dash-ping::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); opacity: 0; }

/* ---- Réalisations : chaque capture dans une fenêtre de navigateur avec la vraie adresse ---- */
.p-shot { display: flex; flex-direction: column; }
.p-bar { flex: none; display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; background: #F3F5FA; border-bottom: 1px solid var(--line); direction: ltr; }
.p-bar i { width: 7px; height: 7px; border-radius: 50%; background: #D5DAE5; }
.p-bar em { flex: 1; min-width: 0; margin-left: 8px; padding: 2px 9px; border-radius: 6px; background: #fff; font: 600 11px/1.5 var(--font); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.p-card:hover .p-bar em { color: var(--accent); }
.p-shot img { flex: 1; min-height: 0; height: auto; }

/* ---- Offres : maquettes animées à la place des photos ---- */
.offer-ico { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: #fff; color: var(--accent); box-shadow: 0 8px 20px -10px rgba(36, 22, 83, .35); }
.offer-side .offer-ico { width: 44px; height: 44px; border-radius: 13px; background: var(--accent-soft); box-shadow: none; }
.offer-ico .mi { width: 28px; height: 28px; }
.offer-side .offer-ico .mi { width: 25px; height: 25px; }

.m-mock { position: relative; height: 174px; margin: calc(-1 * var(--offer-pad, 30px)) calc(-1 * var(--offer-pad, 30px)) 22px; padding: 22px 24px 0; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0, #E4DCFF, transparent 60%), linear-gradient(180deg, #F1EDFF, #F9F8FF); border-bottom: 1px solid #E4DCFF; }
.mk-win { height: 100%; background: #fff; border: 1px solid #E2E8F0; border-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: 0 22px 40px -22px rgba(36, 22, 83, .45); overflow: hidden; }
.mk-bar { display: flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; background: #F4F6FA; border-bottom: 1px solid var(--line); }
.mk-bar i { width: 6px; height: 6px; border-radius: 50%; background: #D5DAE5; }
.mk-bar span { margin-left: 8px; max-width: 62%; padding: 1px 8px; border-radius: 5px; background: #fff; font: 600 9.5px/1.5 var(--font); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Site vitrine */
.mk-page { display: grid; gap: 11px; padding: 11px 12px; }
.mk-nav { display: flex; align-items: center; gap: 7px; }
.mk-nav b { width: 30px; height: 7px; margin-right: auto; border-radius: 4px; background: var(--ink); }
.mk-nav u { width: 18px; height: 4px; border-radius: 3px; background: #CBD5E1; }
.mk-nav s { width: 30px; height: 10px; border-radius: 6px; background: var(--accent); }
.mk-hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; align-items: center; }
.mk-copy { display: grid; gap: 6px; justify-items: start; }
.mk-copy em { width: var(--w); height: 8px; border-radius: 4px; background: var(--ink); }
.mk-copy span { width: 84%; height: 4px; border-radius: 3px; background: #CBD5E1; }
.mk-btn { position: relative; display: block; width: 52px; height: 15px; margin-top: 3px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #8D72FF); }
.mk-btn::after { content: ""; position: absolute; inset: -4px; border: 2px solid var(--accent); border-radius: 11px; opacity: 0; }
.mk-pic { position: relative; height: 56px; overflow: hidden; border-radius: 8px; background: linear-gradient(135deg, #FFE9A8, #FFD45C); }
.mk-pic i { position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: #fff; opacity: .7; }
.mk-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.mk-trio i { height: 30px; border: 1px solid var(--line); border-radius: 7px; background: var(--tint); }
.mk-cursor { position: absolute; left: 62%; top: 52%; z-index: 2; width: 15px; height: 18px; fill: #fff; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
.mk-pop { position: absolute; right: 16px; bottom: 14px; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 6px 11px 6px 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 12px 26px -10px rgba(10, 21, 48, .35); font: 700 11px/1 var(--font); color: var(--ink); }
.mk-pop b { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #DCFCE7; color: #0B7A3B; font-size: 10px; }

/* Application */
.mk-appbody { display: grid; grid-template-columns: 34px 1fr; height: calc(100% - 22px); }
.mk-side { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 11px 0; background: var(--navy); }
.mk-side b { width: 14px; height: 14px; margin-bottom: 3px; border-radius: 4px; background: var(--accent); }
.mk-side i { width: 12px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); }
.mk-side i.on { background: var(--yellow); }
.mk-main { display: grid; grid-template-columns: 1.55fr 1fr; gap: 10px; padding: 10px; }
.mk-rows { position: relative; display: grid; gap: 6px; align-content: start; }
.mk-row { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; height: 22px; padding: 0 7px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 255, 255, .85); }
.mk-row span { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #E0D8FF; }
.mk-row em { width: var(--w); height: 5px; border-radius: 3px; background: #CBD5E1; }
.mk-row b { flex: none; width: 26px; height: 9px; margin-left: auto; border-radius: 5px; background: #22C55E; }
.mk-scan { position: absolute; left: -3px; right: -3px; top: -3px; height: 28px; border: 1px solid #D9CFFF; border-radius: 9px; background: var(--accent-soft); opacity: 0; }
.mk-bars { display: flex; align-items: flex-end; gap: 4px; padding: 8px 6px 0; border-radius: 8px; background: var(--tint); }
.mk-bars i { flex: 1; height: var(--h); border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--accent), #A996FF); transform-origin: 50% 100%; }

/* ---- Méthode : frise et scènes illustrées ---- */
.m-build { position: relative; margin-top: 8px; }
.m-build .process { gap: 24px; }
.m-build .process li { padding: 0; background: none; border: 0; }
.m-build .p-num { position: relative; z-index: 1; width: 44px; height: 44px; margin: 0 0 18px; background: var(--accent); color: #fff; box-shadow: 0 0 0 7px var(--tint); }
.m-rail { position: absolute; top: 21px; left: 22px; right: 0; height: 2px; overflow: hidden; border-radius: 2px; background: linear-gradient(90deg, #DCE2EC 85%, transparent); }
.m-rail i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--accent), #A996FF 80%, transparent); transform-origin: 0 50%; }
[dir="rtl"] .m-rail { left: 0; right: 22px; background: linear-gradient(270deg, #DCE2EC 85%, transparent); }
[dir="rtl"] .m-rail i { background: linear-gradient(270deg, var(--accent), #A996FF 80%, transparent); transform-origin: 100% 50%; }
.m-scene { position: relative; height: 112px; margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 14px 30px -22px rgba(10, 21, 48, .35); }
@media (max-width: 1080px) { .m-rail { display: none; } }
@media (max-width: 640px) {
  .m-build .process { gap: 34px; }
  .m-build .process li { position: relative; padding-inline-start: 62px; }
  .m-build .p-num { position: absolute; top: 0; inset-inline-start: 0; margin: 0; }
  .m-build .process li:not(:last-child)::before { content: ""; position: absolute; top: 52px; bottom: -28px; inset-inline-start: 21px; width: 2px; border-radius: 2px; background: #D8D0FF; transform-origin: 50% 0; }
}

/* 1 · Cadrage : liste qui se coche */
.sc-brief { display: grid; align-content: center; gap: 12px; padding: 0 18px; }
.sc-brief p { display: flex; align-items: center; gap: 10px; margin: 0; }
.sc-brief svg { flex: none; width: 16px; height: 16px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sc-brief rect { stroke: #C9BCFF; stroke-width: 1.6; }
.sc-brief path { stroke: var(--accent); stroke-width: 2.2; stroke-dasharray: 1; }
.sc-brief em { width: var(--w); height: 7px; border-radius: 4px; background: #E2E8F0; transform-origin: 0 50%; }
.sc-brief p:first-child em { background: #D9CFFF; }
[dir="rtl"] .sc-brief em { transform-origin: 100% 50%; }

/* 2 · Maquettes : blocs en pointillés, sélection comme dans un outil de design */
.sc-wire i { position: absolute; border: 1.5px dashed #C9D2E2; border-radius: 6px; background: #F1F4F9; }
.sc-wire .w1 { top: 12px; left: 14px; right: 14px; height: 12px; }
.sc-wire .w2 { top: 32px; left: 14px; width: 46%; height: 44px; border-color: #C9BCFF; background: #EEE9FF; }
.sc-wire .w3 { top: 36px; right: 14px; width: 34%; height: 8px; }
.sc-wire .w4 { top: 50px; right: 14px; width: 26%; height: 8px; }
.sc-wire .w5 { top: 64px; right: 14px; width: 20%; height: 12px; border-color: #B7A6FF; border-radius: 7px; background: #D8CEFF; }
.sc-sel { position: absolute; top: 28px; left: 10px; width: calc(46% + 8px); height: 52px; border: 1.5px solid var(--accent); border-radius: 8px; }
.sc-sel b { position: absolute; width: 7px; height: 7px; border: 1.5px solid var(--accent); border-radius: 2px; background: #fff; }
.sc-sel b:nth-child(1) { top: -4px; left: -4px; } .sc-sel b:nth-child(2) { top: -4px; right: -4px; }
.sc-sel b:nth-child(3) { bottom: -4px; left: -4px; } .sc-sel b:nth-child(4) { right: -4px; bottom: -4px; }

/* 3 · Développement : éditeur de code */
.sc-code { display: grid; align-content: center; gap: 9px; padding: 0 16px; border-color: #0F1530; background: #0F1530; }
.sc-code p { display: flex; align-items: center; gap: 6px; margin: 0; padding-left: calc(var(--in) * 14px); }
.sc-code i { width: var(--w); height: 7px; border-radius: 4px; transform-origin: 0 50%; }
.sc-code .t0 { background: #A996FF; } .sc-code .t1 { background: #FFD45C; } .sc-code .t2 { background: rgba(255, 255, 255, .35); }
.sc-caret { width: 2px; height: 12px; border-radius: 1px; background: #fff; }

/* 4 · Lancement : jauge de performance et site en ligne */
.sc-launch svg { position: absolute; top: 12px; left: 50%; width: 120px; height: 68px; margin-left: -60px; fill: none; stroke-width: 9; stroke-linecap: round; }
.sc-track { stroke: #EEF1F7; }
.sc-gauge { stroke: #22C55E; stroke-dasharray: 1; stroke-dashoffset: .02; }
@property --sc-n { syntax: '<integer>'; inherits: false; initial-value: 98; }
.sc-launch strong { position: absolute; top: 38px; left: 0; right: 0; text-align: center; font-size: 0; counter-reset: sc var(--sc-n); }
.sc-launch strong::after { content: counter(sc); font-size: 22px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-live { position: absolute; bottom: 8px; left: 50%; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #DCFCE7; color: #0B7A3B; font-size: 11.5px; font-weight: 700; white-space: nowrap; transform: translateX(-50%); }
.sc-live i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #16A34A; }
.sc-live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #16A34A; opacity: 0; }

/* ---- Avis ---- */
.review { position: relative; }
.review::after { content: "“"; position: absolute; top: 4px; inset-inline-end: 20px; font: 800 84px/1 Georgia, 'Times New Roman', serif; color: var(--accent); opacity: .12; pointer-events: none; }
.review .stars { position: relative; display: inline-flex; gap: 2px; width: fit-content; overflow: hidden; letter-spacing: 0; }
.review .stars i { display: inline-block; font-style: normal; }
.review .stars::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .95) 50%, transparent 70%); translate: 110% 0; }

/* ---- À propos : « intermédiaire » barré, signature soulignée ---- */
.m-strike { color: #8A97AB; background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 58% / 100% .09em; }
[dir="rtl"] .m-strike { background-position: 100% 58%; }
.founder-card .signature { position: relative; width: fit-content; padding-bottom: 6px; direction: ltr; }
.m-swash { position: absolute; left: 0; bottom: -6px; width: 100%; height: 14px; overflow: visible; fill: none; stroke: var(--yellow); stroke-width: 3; stroke-linecap: round; }
.m-swash path { stroke-dasharray: 1; }

/* ---- Tarifs : devis tamponné ---- */
.m-quote { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 52px; align-items: center; max-width: 1060px; margin: 0 auto; }
.m-ticket { position: relative; padding: 0 12px 20px; filter: drop-shadow(0 26px 36px rgba(10, 21, 48, .16)); --sr: -1; }
[dir="rtl"] .m-ticket { --sr: 1; }
.tk-paper { position: relative; padding: 26px 26px 38px; border: 1px solid var(--line); border-radius: 18px 18px 0 0; background: #fff; rotate: calc(var(--sr) * 2deg);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 18px 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 18px 100%; }
.tk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding-bottom: 14px; border-bottom: 2px dashed var(--line); }
.tk-head b { font-size: 22px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.tk-head span { font-size: 13px; color: var(--muted); }
.m-ticket ul { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.m-ticket li { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--ink); }
.m-ticket li i { flex: 1; height: 0; margin-top: 8px; border-bottom: 2px dotted #CBD5E1; }
.m-ticket li b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; }
.tk-foot { margin: 18px 0 0; padding-top: 14px; border-top: 2px dashed var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.tk-stamp { position: absolute; right: 0; bottom: 34px; padding: 9px 15px; border: 3px solid var(--accent-dark); border-radius: 10px; background: rgba(240, 236, 255, .6);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); color: var(--accent-dark); font: 800 18px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; rotate: calc(var(--sr) * 12deg); }
[dir="rtl"] .tk-stamp { right: auto; left: 0; }
.m-plans { display: grid; gap: 14px; }
.m-plan { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s; }
.m-plan:hover { border-color: #D9CFFF; box-shadow: var(--shadow); transform: translateX(4px); }
[dir="rtl"] .m-plan:hover { transform: translateX(-4px); }
.m-plan h3 { margin: 0 0 4px; font-size: 19px; }
.m-plan p { margin: 0; font-size: 15px; color: var(--muted); }
.m-price { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 14px; font-weight: 800; white-space: nowrap; }
@media (max-width: 900px) { .m-quote { grid-template-columns: 1fr; gap: 40px; max-width: 560px; } }
@media (max-width: 640px) { .m-plan { flex-direction: column; align-items: flex-start; gap: 12px; } }

/* ---- Contact : ondes en fond, étapes reliées, contour lumineux du formulaire ---- */
.m-contact { position: relative; overflow: hidden; isolation: isolate; }
.m-waves { position: absolute; z-index: -1; width: 760px; height: 760px; bottom: -380px; inset-inline-start: -260px; pointer-events: none; }
.m-waves i { position: absolute; inset: 0; border: 1px solid rgba(255, 212, 92, .16); border-radius: 50%; }
.m-waves i:nth-child(2) { inset: 120px; border-color: rgba(169, 150, 255, .22); }
.m-waves i:nth-child(3) { inset: 240px; border-color: rgba(255, 255, 255, .1); }
.m-contact .steps li { position: relative; }
.m-contact .steps li:not(:last-child)::before { content: ""; position: absolute; top: 46px; bottom: -6px; inset-inline-start: 15px; width: 2px; border-radius: 2px; background: rgba(255, 212, 92, .35); transform-origin: 50% 0; }
@property --m-ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.m-contact .lead-form { position: relative; }
.m-contact .lead-form::before { content: ""; position: absolute; inset: -3px; z-index: -1; border-radius: calc(var(--radius) + 3px); background: conic-gradient(from var(--m-ang), var(--accent), var(--yellow), #A996FF, var(--accent)); opacity: 0; transition: opacity .35s; }
.m-contact .lead-form:focus-within::before { opacity: 1; }

/* =============================================================================
   2. Animations (uniquement si l'appareil ne demande pas moins d'animations)
============================================================================= */
@keyframes m-rise { from { opacity: 0; translate: 0 22px; } }
@keyframes m-word { from { opacity: 0; translate: 0 .5em; } }
@keyframes m-mark { to { background-size: 100% 100%; } }
@keyframes m-bloom { from { opacity: 0; scale: .5; } }
@keyframes m-card { from { opacity: 0; translate: 0 40px; scale: .94; } }
@keyframes m-line { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes m-fade { from { opacity: 0; } }
@keyframes m-pop { from { opacity: 0; scale: 0; } }
@keyframes m-toast { from { opacity: 0; scale: .7; rotate: -6deg; } }
@keyframes m-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }
@keyframes m-sweep { from { translate: -120% 0; } to { translate: 120% 0; } }
@keyframes m-ping { from { opacity: .6; scale: 1; } to { opacity: 0; scale: 3.2; } }
@keyframes m-blink { 50% { opacity: 0; } }
@keyframes m-spin { to { --m-ang: 360deg; } }
@keyframes m-stamp {
  0% { opacity: 0; scale: 2.6; rotate: calc(var(--sr) * 26deg); }
  55% { opacity: 1; scale: .9; rotate: calc(var(--sr) * 11deg); }
  75% { scale: 1.05; }
  100% { opacity: 1; scale: 1; rotate: calc(var(--sr) * 12deg); }
}
@keyframes m-thud { 0%, 100% { translate: 0 0; } 30% { translate: 0 3px; } 60% { translate: 0 -1px; } }
/* Maquette du site : un visiteur clique sur le bouton, une demande arrive. */
@keyframes mk-cursor { 0% { opacity: 0; translate: 70px 46px; } 15% { opacity: 1; } 45% { translate: 0 0; scale: 1; } 52% { scale: .8; } 60%, 100% { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes mk-cursor-loop { 0% { opacity: 0; translate: 70px 46px; } 15% { opacity: 1; } 45% { translate: 0 0; scale: 1; } 52% { scale: .8; } 60%, 88% { opacity: 1; translate: 0 0; scale: 1; } 100% { opacity: 0; translate: 0 0; } }
@keyframes mk-press { 0%, 47% { scale: 1; } 52% { scale: .88; } 62% { scale: 1.06; } 72%, 100% { scale: 1; } }
@keyframes mk-press-loop { 0%, 47% { scale: 1; } 52% { scale: .88; } 62% { scale: 1.06; } 72%, 100% { scale: 1; } }
@keyframes mk-ring { 0%, 49% { opacity: 0; scale: .7; } 53% { opacity: .8; } 85%, 100% { opacity: 0; scale: 2; } }
@keyframes mk-ring-loop { 0%, 49% { opacity: 0; scale: .7; } 53% { opacity: .8; } 85%, 100% { opacity: 0; scale: 2; } }
@keyframes mk-pop { 0%, 55% { opacity: 0; translate: 0 12px; scale: .9; } 70%, 100% { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes mk-pop-loop { 0%, 55% { opacity: 0; translate: 0 12px; scale: .9; } 68%, 90% { opacity: 1; translate: 0 0; scale: 1; } 100% { opacity: 0; translate: 0 0; } }
/* Maquette de l'application : la sélection descend, les rendez-vous passent au vert. */
@keyframes mk-scan { 0% { opacity: 0; translate: 0 0; } 10%, 25% { opacity: 1; translate: 0 0; } 45% { translate: 0 28px; } 65% { translate: 0 56px; } 85% { opacity: 1; translate: 0 84px; } 100% { opacity: 0; translate: 0 84px; } }
@keyframes mk-chip { 0%, 30% { background: #FBBF24; scale: .8 1; } 40%, 100% { background: #22C55E; scale: 1; } }
@keyframes mk-chip-loop { 0%, 30% { background: #FBBF24; } 40%, 92% { background: #22C55E; } 100% { background: #FBBF24; } }
/* Icônes */
@keyframes mi-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes mi-draw-again { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes mi-twinkle { 0% { scale: 1; rotate: 0deg; } 40% { scale: .6; rotate: 45deg; } 70% { scale: 1.15; } 100% { scale: 1; rotate: 90deg; } }
@keyframes mi-drop { from { opacity: 0; translate: 0 -7px; } }
@keyframes mi-turn { from { rotate: -360deg; } }
@keyframes mi-key { 0% { rotate: 0deg; } 40% { rotate: -80deg; } 100% { rotate: 0deg; } }
@keyframes mi-lock { 0%, 100% { translate: 0 0; } 35% { translate: 0 -4px; } }

@media (prefers-reduced-motion: no-preference) {

  /* ---------------------------------------------------------------- Haut de page (CSS seul) */
  .home-hero .m-eyebrow { animation: m-rise .7s var(--m-out) both; }
  .home-hero h1 .w { display: inline-block; animation: m-word .9s var(--m-out) calc(.08s + var(--i) * 55ms) both; }
  .home-hero .hl { background-repeat: no-repeat; background-position: 0 0; background-size: 0 100%; animation: m-mark .9s var(--m-io) 1s forwards; }
  [dir="rtl"] .home-hero .hl { background-position: 100% 0; }
  .home-hero .m-lead { animation: m-rise .8s var(--m-out) .45s both; }
  .home-hero .m-actions { animation: m-rise .8s var(--m-out) .6s both; }
  .home-hero .m-proof { animation: m-rise .8s var(--m-out) .75s both; }
  .home-hero .m-bg i { animation: m-bloom 2.6s var(--m-out) calc(var(--b) * .25s) both; }
  .home-hero .dash-card { animation: m-card 1.1s var(--m-out) .3s both; }
  .home-hero .dash-kpis > div { animation: m-rise .7s var(--m-out) .6s both; }
  .home-hero .dash-kpis > div:nth-child(2) { animation-delay: .72s; }
  .home-hero .dash-kpis > div:nth-child(3) { animation-delay: .84s; }
  .home-hero .dash-line { stroke-dasharray: 1; animation: m-line 1.9s var(--m-io) .85s both; }
  .home-hero .dash-area { animation: m-fade 1.1s ease 2.1s both; }
  .home-hero .dash-ping { animation: m-pop .6s var(--m-spring) 2.7s both; }
  .home-hero .toast { animation: m-toast .8s var(--m-spring) var(--t) both, m-float 6s ease-in-out calc(var(--t) + .8s) infinite; }
  .home-hero .t1 { --t: 1.4s; } .home-hero .t2 { --t: 2.1s; } .home-hero .t3 { --t: 2.8s; }
  .m-shine { position: relative; overflow: hidden; }
  .m-shine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%); translate: -120% 0; animation: m-sweep 1.1s ease 2.2s 2; pointer-events: none; }

  /* Défilement : le fond et la maquette s'écartent à des vitesses différentes (profondeur). */
  @supports ((animation-timeline: scroll()) and (animation-range: 0 1px)) {
    @keyframes m-depth { to { translate: 0 var(--depth); } }
    .home-hero .m-bg i { --depth: 150px; animation: m-bloom 2.6s var(--m-out) calc(var(--b) * .25s) both, m-depth linear both; animation-timeline: auto, scroll(root); animation-range: normal, 0 700px; }
    .home-hero .m-stage { --depth: -70px; animation: m-depth linear both; animation-timeline: scroll(root); animation-range: 0 700px; }
  }

  /* ---------------------------------------------------------------- Apparitions génériques */
  [data-m="rise"], [data-m="slide"], [data-m="deal"], [data-m="flip"] {
    --dl: calc(var(--i, 0) * 110ms);
    transition: opacity .7s var(--m-out) var(--dl), translate .9s var(--m-out) var(--dl), rotate .9s var(--m-out) var(--dl), transform .2s, box-shadow .2s, border-color .2s;
  }
  [data-m="deal"] { transition-timing-function: var(--m-out), var(--m-spring), var(--m-spring), ease, ease, ease; transition-duration: .6s, 1s, 1s, .2s, .2s, .2s; }
  .m-on [data-m="rise"]:not(.is-in) { opacity: 0; translate: 0 34px; }
  .m-on [data-m="slide"]:not(.is-in) { opacity: 0; translate: 90px 0; }
  .m-on[dir="rtl"] [data-m="slide"]:not(.is-in) { translate: -90px 0; }
  .m-on [data-m="deal"]:not(.is-in) { opacity: 0; translate: 0 70px; rotate: calc(-4deg + var(--i, 0) * 4deg); }
  .m-on [data-m="flip"]:not(.is-in) { opacity: 0; rotate: x 75deg; }
  .cards-4:has([data-m="flip"]) { perspective: 1200px; }
  [data-m="flip"] { transform-origin: 50% 100%; }

  /* ---------------------------------------------------------------- En-têtes de section : titre mot à mot */
  [data-m="head"] h2 .w, [data-m="steps"] h2 .w { display: inline-block; transition: opacity .6s var(--m-out) calc(.08s + var(--i) * 45ms), translate .8s var(--m-out) calc(.08s + var(--i) * 45ms); }
  [data-m="head"] .eyebrow { transition: opacity .6s var(--m-out), translate .7s var(--m-out); }
  [data-m="head"] > p:not(.eyebrow), [data-m="head"] > .btn { transition: opacity .7s var(--m-out) .35s, translate .8s var(--m-out) .35s, transform .15s, background .2s, box-shadow .2s, color .2s, border-color .2s; }
  .m-on [data-m="head"]:not(.is-in) .eyebrow, .m-on [data-m="head"]:not(.is-in) > p, .m-on [data-m="head"]:not(.is-in) > .btn { opacity: 0; translate: 0 16px; }
  .m-on [data-m="head"]:not(.is-in) h2 .w { opacity: 0; translate: 0 .55em; }
  [data-m="head"] .m-strike { transition: background-size .6s var(--m-io) .8s, color .6s ease 1s; }
  .m-on [data-m="head"]:not(.is-in) .m-strike { background-size: 0 .09em; color: var(--ink); }

  /* ---------------------------------------------------------------- Réalisations : la bande accélère quand on fait défiler (motion.js) */

  /* ---------------------------------------------------------------- Avis : cartes distribuées, étoiles qui s'allument */
  [data-m="deal"] .stars i { transition: opacity .3s ease calc(var(--dl) + .5s + var(--s) * 90ms), scale .55s var(--m-spring) calc(var(--dl) + .5s + var(--s) * 90ms), rotate .55s var(--m-spring) calc(var(--dl) + .5s + var(--s) * 90ms); }
  .m-on [data-m="deal"]:not(.is-in) .stars i { opacity: 0; scale: 0; rotate: -45deg; }
  [data-m="deal"] .stars::after { transition: translate .9s ease calc(var(--dl) + 1.1s); }
  .m-on [data-m="deal"]:not(.is-in) .stars::after { translate: -110% 0; transition: none; }
  [data-m="deal"]::after { transition: opacity .6s ease calc(var(--dl) + .4s), scale .8s var(--m-spring) calc(var(--dl) + .4s); }
  .m-on [data-m="deal"]:not(.is-in)::after { opacity: 0; scale: .3; }

  /* ---------------------------------------------------------------- Offres : maquettes et icônes */
  .mk-page > * { transition: opacity .5s var(--m-out) calc(var(--dl, 0s) + .4s + var(--i) * .15s), translate .6s var(--m-out) calc(var(--dl, 0s) + .4s + var(--i) * .15s); }
  .m-on .offer:not(.is-in) .mk-page > * { opacity: 0; translate: 0 12px; }
  .offer.is-in .mk-cursor { animation: mk-cursor 4s var(--m-io) calc(var(--dl) + 1s) both; }
  .offer.is-in .mk-btn { animation: mk-press 4s ease calc(var(--dl) + 1s) both; }
  .offer.is-in .mk-btn::after { animation: mk-ring 4s ease-out calc(var(--dl) + 1s) both; }
  .offer.is-in .mk-pop { animation: mk-pop 4s var(--m-spring) calc(var(--dl) + 1s) both; }
  .offer:hover .mk-cursor { animation: mk-cursor-loop 4s var(--m-io) infinite; }
  .offer:hover .mk-btn { animation: mk-press-loop 4s ease infinite; }
  .offer:hover .mk-btn::after { animation: mk-ring-loop 4s ease-out infinite; }
  .offer:hover .mk-pop { animation: mk-pop-loop 4s var(--m-spring) infinite; }
  .m-on .offer:not(.is-in) .mk-cursor, .m-on .offer:not(.is-in) .mk-pop { opacity: 0; }

  .mk-row { transition: opacity .5s var(--m-out) calc(var(--dl, 0s) + .45s + var(--i) * .12s), translate .6s var(--m-out) calc(var(--dl, 0s) + .45s + var(--i) * .12s); }
  .m-on .offer:not(.is-in) .mk-row { opacity: 0; translate: 26px 0; }
  .mk-bars i { transition: scale .7s var(--m-out) calc(var(--dl, 0s) + .6s + var(--i) * 70ms); }
  .m-on .offer:not(.is-in) .mk-bars i { scale: 1 0; }
  .offer.is-in .mk-scan { animation: mk-scan 2.4s var(--m-io) calc(var(--dl) + 1.3s) both; }
  .offer.is-in .mk-row b { animation: mk-chip 2.4s ease calc(var(--dl) + 1.3s + var(--i) * .48s) both; }
  .offer:hover .mk-scan { animation: mk-scan 2.4s var(--m-io) infinite; }
  .offer:hover .mk-row b { animation: mk-chip-loop 2.4s ease calc(var(--i) * .48s) infinite; }

  .offer .mi-draw { stroke-dasharray: 1; }
  .offer.is-in .mi-draw { animation: mi-draw 1.1s var(--m-io) calc(var(--dl) + .5s) both; }
  .offer:hover .mi-draw { animation: mi-draw-again .9s var(--m-io) both; }
  .offer.is-in .mi-s1, .offer.is-in .mi-s2 { transform-box: fill-box; transform-origin: center; animation: mi-twinkle .9s var(--m-spring) calc(var(--dl) + .5s) both; }
  .offer.is-in .mi-s2 { animation-delay: calc(var(--dl) + .7s); }
  .offer:hover .mi-s1, .offer:hover .mi-s2 { animation: mi-twinkle .9s var(--m-spring) both; }
  .offer.is-in .mi-head, .offer.is-in .mi-l1, .offer.is-in .mi-l2, .offer.is-in .mi-l3 { animation: mi-drop .5s var(--m-spring) calc(var(--dl) + 1.1s) both; }
  .offer.is-in .mi-l2 { animation-delay: calc(var(--dl) + .8s); }
  .offer.is-in .mi-l1 { animation-delay: calc(var(--dl) + .55s); }
  .m-on .offer:not(.is-in) .mi-draw { stroke-dashoffset: 1; }

  /* ---------------------------------------------------------------- Méthode : la frise se remplit, chaque étape s'anime */
  [data-m="build"] .m-rail i { transition: scale 2.2s linear .15s; }
  .m-on [data-m="build"]:not(.is-in) .m-rail i { scale: 0 1; }
  [data-m="step"] { --sd: calc(.45s + var(--i) * .55s); transition: opacity .6s var(--m-out) calc(.1s + var(--i) * .55s), translate .8s var(--m-out) calc(.1s + var(--i) * .55s); }
  .m-on [data-m="step"]:not(.is-in) { opacity: 0; translate: 0 26px; }
  [data-m="step"] .p-num { transition: scale .6s var(--m-spring) calc(.15s + var(--i) * .55s), background-color .3s ease calc(.35s + var(--i) * .55s), color .3s ease calc(.35s + var(--i) * .55s); }
  .m-on [data-m="step"]:not(.is-in) .p-num { scale: .3; background-color: #fff; color: var(--accent); }
  .m-build .process li::before { transition: scale .8s var(--m-out) .5s; }
  .m-on .m-build [data-m="step"]:not(.is-in)::before { scale: 1 0; }
  @media (max-width: 1080px) { .m-build [data-m="step"] { --i: 0 !important; } }

  .sc-brief em { transition: scale .6s var(--m-out) calc(var(--sd) + var(--i) * .25s); }
  .sc-brief path { transition: stroke-dashoffset .4s var(--m-io) calc(var(--sd) + .3s + var(--i) * .25s); }
  .m-on [data-m="step"]:not(.is-in) .sc-brief em { scale: 0 1; }
  .m-on [data-m="step"]:not(.is-in) .sc-brief path { stroke-dashoffset: 1; }

  .sc-wire i, .sc-sel { transition: opacity .4s ease calc(var(--sd) + var(--k) * .14s), scale .5s var(--m-spring) calc(var(--sd) + var(--k) * .14s); }
  .sc-wire .w1 { --k: 0; } .sc-wire .w2 { --k: 1; } .sc-wire .w3 { --k: 2; } .sc-wire .w4 { --k: 3; } .sc-wire .w5 { --k: 4; } .sc-sel { --k: 6; }
  .m-on [data-m="step"]:not(.is-in) .sc-wire i, .m-on [data-m="step"]:not(.is-in) .sc-sel { opacity: 0; scale: .6; }

  .sc-code i { transition: scale .3s steps(4, end) calc(var(--sd) + var(--i) * .22s + var(--k) * .1s); }
  .m-on [data-m="step"]:not(.is-in) .sc-code i { scale: 0 1; }
  [data-m="step"].is-in .sc-caret { animation: m-blink 1s steps(1) calc(var(--sd) + 1.2s) 4; }

  .sc-gauge { transition: stroke-dashoffset 1.4s var(--m-out) calc(var(--sd) + .2s); }
  .sc-launch strong { transition: --sc-n 1.4s var(--m-out) calc(var(--sd) + .2s); }
  .sc-live { transition: opacity .4s ease calc(var(--sd) + 1.4s), scale .5s var(--m-spring) calc(var(--sd) + 1.4s); }
  .m-on [data-m="step"]:not(.is-in) .sc-gauge { stroke-dashoffset: 1; }
  .m-on [data-m="step"]:not(.is-in) .sc-launch strong { --sc-n: 0; }
  .m-on [data-m="step"]:not(.is-in) .sc-live { opacity: 0; scale: .5; }
  [data-m="step"].is-in .sc-live i::after { animation: m-ping 1.4s var(--m-out) calc(var(--sd) + 1.7s) 3; }

  /* ---------------------------------------------------------------- Sécurité : les icônes s'animent quand la carte se rabat */
  .mi-shackle { transition: translate .5s var(--m-spring) calc(var(--dl) + .7s); }
  .m-on [data-m="flip"]:not(.is-in) .mi-shackle { translate: 0 -5px; }
  [data-m="flip"] .mi-draw { stroke-dasharray: 1; transition: stroke-dashoffset 1s var(--m-io) calc(var(--dl) + .5s); }
  [data-m="flip"] .mi-late { transition-delay: calc(var(--dl) + 1.2s); transition-duration: .5s; }
  .m-on [data-m="flip"]:not(.is-in) .mi-draw { stroke-dashoffset: 1; }
  .mi-spin { transform-origin: 16px 16px; transition: rotate 1.2s var(--m-out) calc(var(--dl) + .5s); }
  .m-on [data-m="flip"]:not(.is-in) .mi-spin { rotate: -360deg; }
  .mi-turn { transform-origin: 10.5px 16px; transition: rotate .9s var(--m-spring) calc(var(--dl) + .6s); }
  .m-on [data-m="flip"]:not(.is-in) .mi-turn { rotate: -90deg; }
  .card:hover .mi-spin { animation: mi-turn 1s var(--m-out); }
  .card:hover .mi-turn { animation: mi-key .9s var(--m-spring); }
  .card:hover .mi-shackle { animation: mi-lock .7s var(--m-spring); }
  .card:hover .mi-draw { animation: mi-draw-again .9s var(--m-io); }

  /* ---------------------------------------------------------------- À propos : photo dévoilée, signature tracée */
  [data-m="founder"] .founder-photo img { clip-path: inset(0 0 0 0 round 18px); transition: clip-path 1.1s var(--m-io) .15s, scale 1.6s var(--m-out) .15s; }
  .m-on [data-m="founder"]:not(.is-in) .founder-photo img { clip-path: inset(100% 0 0 0 round 18px); scale: 1.18; }
  [data-m="founder"] .founder-text > * { transition: opacity .7s var(--m-out) calc(.5s + var(--k, 0) * .15s), translate .8s var(--m-out) calc(.5s + var(--k, 0) * .15s); }
  [data-m="founder"] .founder-text > :nth-child(2) { --k: 1; } [data-m="founder"] .founder-text > :nth-child(3) { --k: 2; }
  .m-on [data-m="founder"]:not(.is-in) .founder-text > * { opacity: 0; translate: 0 14px; }
  [data-m="founder"] .signature { clip-path: inset(-30% -12% -30% -12%); transition: clip-path 1.5s cubic-bezier(.45, .05, .35, 1) 1.4s; }
  .m-on [data-m="founder"]:not(.is-in) .signature { clip-path: inset(-30% 112% -30% -12%); }
  [data-m="founder"] .m-swash path { transition: stroke-dashoffset .8s var(--m-io) 2.7s; }
  .m-on [data-m="founder"]:not(.is-in) .m-swash path { stroke-dashoffset: 1; }

  /* ---------------------------------------------------------------- Tarifs : le devis s'imprime, le tampon tombe */
  .tk-paper { transition: opacity .6s var(--m-out), translate .9s var(--m-out), rotate 1s var(--m-spring); }
  .m-on [data-m="ticket"]:not(.is-in) .tk-paper { opacity: 0; translate: 0 50px; rotate: calc(var(--sr) * -6deg); }
  .m-ticket li { clip-path: inset(0 0 0 0); transition: clip-path .5s var(--m-io) calc(.7s + var(--i) * .28s); }
  .m-on [data-m="ticket"]:not(.is-in) li { clip-path: inset(0 100% 0 0); }
  .m-on[dir="rtl"] [data-m="ticket"]:not(.is-in) li { clip-path: inset(0 0 0 100%); }
  .m-ticket li b { transition: scale .45s var(--m-spring) calc(1s + var(--i) * .28s); }
  .m-on [data-m="ticket"]:not(.is-in) li b { scale: 0; }
  .tk-foot { transition: opacity .5s ease 2s; }
  .m-on [data-m="ticket"]:not(.is-in) .tk-foot { opacity: 0; }
  .m-on [data-m="ticket"]:not(.is-in) .tk-stamp { opacity: 0; }
  [data-m="ticket"].is-in .tk-stamp { animation: m-stamp .55s cubic-bezier(.3, 0, .4, 1) 2.3s both; }
  [data-m="ticket"].is-in .tk-paper { animation: m-thud .35s ease 2.62s; }

  /* ---------------------------------------------------------------- Contact : étapes en séquence */
  [data-m="steps"] .eyebrow, [data-m="steps"] h3 { transition: opacity .6s var(--m-out), translate .7s var(--m-out); }
  [data-m="steps"] h3 { transition-delay: .4s; }
  .m-on [data-m="steps"]:not(.is-in) .eyebrow, .m-on [data-m="steps"]:not(.is-in) h3 { opacity: 0; translate: 0 14px; }
  .m-on [data-m="steps"]:not(.is-in) h2 .w { opacity: 0; translate: 0 .55em; }
  [data-m="steps"] .steps li { transition: opacity .6s var(--m-out) calc(.6s + var(--i) * .2s), translate .7s var(--m-out) calc(.6s + var(--i) * .2s); }
  [data-m="steps"] .steps span { transition: scale .5s var(--m-spring) calc(.7s + var(--i) * .2s); }
  [data-m="steps"] .steps li::before { transition: scale .5s var(--m-out) calc(.9s + var(--i) * .2s); }
  .m-on [data-m="steps"]:not(.is-in) .steps li { opacity: 0; translate: -18px 0; }
  .m-on[dir="rtl"] [data-m="steps"]:not(.is-in) .steps li { translate: 18px 0; }
  .m-on [data-m="steps"]:not(.is-in) .steps span { scale: 0; }
  .m-on [data-m="steps"]:not(.is-in) .steps li::before { scale: 1 0; }
  .m-waves i { transition: opacity 1.4s ease calc(var(--w, 0) * .25s), scale 1.8s var(--m-out) calc(var(--w, 0) * .25s); }
  .m-waves i:nth-child(2) { --w: 1; } .m-waves i:nth-child(3) { --w: 2; }
  .m-on .m-contact:not(:has(.is-in)) .m-waves i { opacity: 0; scale: .6; }
  .m-contact .lead-form:focus-within::before { animation: m-spin 4s linear infinite; }
}
