/* ─── Comment ça marche : démonstration en trois scènes ─────────────────── */
.axd-steps {
  --axd-gold-200: #e2cc96;
  --axd-gold-700: #8a6a2a;
  --axd-ink-300: #a9b0a3;
  --axd-sand: #f4ecd9;
  --axd-out: cubic-bezier(.2, .8, .2, 1);
  --axd-io: cubic-bezier(.6, 0, .2, 1);
  --axd-pop: cubic-bezier(.3, 1.6, .5, 1);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}
@media (min-width: 820px) {
  .axd-steps { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.25rem, 3vw, 2.5rem); }
}
.axd-ico { display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Liste des étapes (cliquables) */
.axd-steps__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: center; gap: .65rem; min-width: 0; }
.axd-step { position: relative; overflow: hidden; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: .9rem; align-items: start; background: var(--paper); border: 1px solid var(--line-soft); border-radius: 1.1rem; padding: 1.15rem 1.2rem 1.3rem; transition: background .3s, border-color .3s, box-shadow .3s, transform .25s; }
.axd-step:hover { transform: translateX(3px); }
.axd-step.is-on { background: var(--mint-100); border-color: var(--pine-600); box-shadow: 0 18px 34px -18px rgba(20, 30, 10, .28); }
.axd-step__num { width: 30px; height: 30px; border-radius: .55rem; background: var(--cream-100); color: var(--pine-800); font-weight: 800; font-size: .9rem; display: flex; align-items: center; justify-content: center; transition: background .3s, color .3s; }
.axd-step.is-on .axd-step__num { background: var(--pine-800); color: #fff; }
.axd-step h3 { font-size: .98rem; font-weight: 800; line-height: 1.35; margin: 0 0 .2rem; color: var(--pine-800); }
.axd-step h3 button { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.axd-step h3 button::after { content: ""; position: absolute; inset: 0; border-radius: 1.1rem; }
.axd-step h3 button:focus-visible { outline: none; }
.axd-step h3 button:focus-visible::after { outline: 3px solid var(--gold-500); outline-offset: -3px; }
.axd-step p { font-size: .87rem; line-height: 1.5; color: var(--ink-500); margin: 0; }
.axd-step__prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; }
.axd-step__prog i { display: block; height: 100%; background: var(--gold-500); transform: scaleX(0); transform-origin: left; }
.axd-steps.is-playing .axd-step.is-on .axd-step__prog i { animation: axd-grow 5.2s linear forwards; }

/* Scène animée */
.axd-stage { position: relative; overflow: hidden; border-radius: 1.4rem; min-height: 400px; min-width: 0; order: -1; background: var(--axd-bg); transition: background-color .7s;
  --axd-bg: var(--mint-100); --axd-s1: var(--gold-500); --axd-s2: var(--brand-200); --axd-s3: var(--pine-600); --axd-lbl: var(--pine-900); }
@media (min-width: 820px) { .axd-stage { order: 0; } }
.axd-stage[data-scene="1"] { --axd-bg: var(--axd-sand); --axd-s1: var(--axd-gold-200); }
.axd-stage[data-scene="2"] { --axd-bg: var(--pine-900); --axd-s1: var(--pine-600); --axd-s2: var(--pine-500); --axd-s3: var(--gold-500); --axd-lbl: var(--cream-50); }

.axd-shape { position: absolute; transition: transform 1s cubic-bezier(.7, 0, .2, 1), background-color .7s, border-color .7s, border-radius .9s; }
.axd-shape--a { width: 150px; height: 150px; border-radius: 50%; background: var(--axd-s1); top: -46px; right: -36px; }
.axd-shape--b { width: 54px; height: 54px; border-radius: 50%; border: 7px solid var(--axd-s3); top: 42%; right: 24%; }
.axd-shape--c { width: 120px; height: 120px; border-radius: 28px; background: var(--axd-s2); bottom: -52px; right: 36%; transform: rotate(16deg); }
.axd-stage[data-scene="1"] .axd-shape--a { transform: translate(-30px, 170px) scale(.72); }
.axd-stage[data-scene="1"] .axd-shape--b { transform: translate(70px, -120px) scale(1.25); }
.axd-stage[data-scene="1"] .axd-shape--c { transform: translate(110px, -14px) rotate(-12deg); border-radius: 50%; }
.axd-stage[data-scene="2"] .axd-shape--a { transform: translate(-130px, -6px) scale(.56); }
.axd-stage[data-scene="2"] .axd-shape--b { transform: translate(36px, 56px); }
.axd-stage[data-scene="2"] .axd-shape--c { transform: translate(-50px, 8px) rotate(42deg); }
.axd-steps.is-playing .axd-shape { animation: axd-float 4.5s ease-in-out infinite alternate; }
.axd-steps.is-playing .axd-shape--b { animation-duration: 3.4s; }
.axd-steps.is-playing .axd-shape--c { animation-duration: 5.6s; }

.axd-scene { position: absolute; inset: 0; z-index: 1; padding: 1.5rem 1.25rem 1.25rem; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.axd-scene.is-on { opacity: 1; visibility: visible; transition: opacity .45s .12s; }
.axd-scene__label { margin: auto 0 0; align-self: flex-end; font-size: clamp(1.7rem, 4.6vw, 2.6rem); font-weight: 800; line-height: 1; letter-spacing: -.025em; color: var(--axd-lbl); }
.axd-mock { position: relative; width: min(100%, 330px); margin-inline: auto; }
@media (min-width: 900px) { .axd-mock { margin-inline: clamp(0px, 6%, 44px) auto; } }

/* Maquettes d'interface */
.axd-mk-card { background: #fff; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 9px; font-size: .78rem; line-height: 1.5; color: var(--ink-700); box-shadow: 0 24px 40px -22px rgba(20, 30, 10, .5), 0 0 0 1px rgba(35, 56, 13, .07); }
.axd-mk-bar { display: flex; align-items: center; gap: 5px; font-weight: 700; color: var(--pine-800); font-size: .76rem; }
.axd-mk-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-soft); }
.axd-mk-bar span { margin-left: 4px; }
.axd-mk-field { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--line-soft); border-radius: 9px; padding: 7px 10px; }
.axd-mk-field span { color: var(--ink-500); }
.axd-mk-field b { color: var(--ink-900); font-weight: 700; white-space: nowrap; }
.axd-mk-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.axd-mk-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--pine-600); background: var(--mint-100); color: var(--pine-800); font-weight: 700; border-radius: 999px; padding: 4px 9px; font-size: .72rem; }
.axd-mk-chip .axd-ico { width: 10px; height: 10px; stroke-width: 3; }
.axd-mk-btn { position: relative; background: var(--gold-500); color: var(--pine-900); font-weight: 700; text-align: center; border-radius: 9px; padding: 9px; font-size: .8rem; }
.axd-mk-btn::after { content: ""; position: absolute; inset: -5px; border-radius: 13px; border: 2px solid var(--gold-500); opacity: 0; }
.axd-mk-cursor { position: absolute; z-index: 3; width: 20px; height: 20px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .28)); }
.axd-mk-btn .axd-mk-cursor { right: 17%; bottom: -11px; }
.axd-mk-toast { position: absolute; z-index: 2; top: -14px; right: -10px; display: inline-flex; align-items: center; gap: 6px; background: var(--pine-900); color: #fff; font-weight: 700; font-size: .76rem; line-height: 1.5; padding: 7px 12px; border-radius: 999px; box-shadow: 0 12px 22px -10px rgba(20, 30, 10, .6); }
.axd-mk-toast .axd-ico { width: 12px; height: 12px; stroke-width: 3; color: var(--gold-500); }

.axd-mk-cal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.axd-mk-day { text-align: center; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); }
.axd-mk-slot { position: relative; text-align: center; border: 1px solid var(--line-soft); border-radius: 8px; padding: 5px 0; font-size: .74rem; font-weight: 600; color: var(--ink-900); font-variant-numeric: tabular-nums; background: #fff; }
.axd-mk-slot.is-off { background: var(--cream-100); color: var(--axd-ink-300); text-decoration: line-through; }
.axd-mk-slot.is-pick { background: var(--pine-800); border-color: var(--pine-800); color: #fff; }
.axd-mk-slot .axd-mk-cursor { right: -4px; bottom: -13px; }
.axd-mk-notif { display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; margin: 10px 0 0 auto; background: #fff; border-radius: 11px; padding: 8px 12px 8px 9px; font-size: .74rem; line-height: 1.25; color: var(--ink-700); box-shadow: 0 14px 24px -14px rgba(20, 30, 10, .5), 0 0 0 1px rgba(35, 56, 13, .07); }
.axd-mk-notif b { display: block; color: var(--ink-900); }
.axd-mk-notif > span:first-child { flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--pine-800); color: #fff; display: grid; place-items: center; }
.axd-mk-notif .axd-ico { width: 14px; height: 14px; }

.axd-mk-sheet { transform: rotate(-1.5deg); padding-bottom: 22px; }
.axd-mk-logo { width: 16px; height: 16px; border-radius: 4px; background: var(--pine-800); }
.axd-mk-row { display: grid; grid-template-columns: 5rem minmax(0, 1fr) 18px; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line-soft); }
.axd-mk-row b { color: var(--ink-900); font-size: .76rem; }
.axd-mk-line { display: block; height: 6px; border-radius: 6px; background: var(--cream-100); transform-origin: left; }
.axd-mk-tick { width: 18px; height: 18px; border-radius: 50%; background: var(--pine-600); color: #fff; display: grid; place-items: center; }
.axd-mk-tick .axd-ico { width: 11px; height: 11px; stroke-width: 3; }
.axd-mk-sign { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.axd-mk-sign .axd-mk-line:first-child { width: 52%; }
.axd-mk-sign .axd-mk-line:last-child { width: 34%; }
.axd-mk-stamp { position: absolute; z-index: 2; right: -6px; bottom: -46px; width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .9); border: 2.5px solid var(--gold-600); outline: 1px solid var(--gold-600); outline-offset: -8px; color: var(--axd-gold-700); font-weight: 800; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; transform: rotate(-12deg); }
.axd-mk-pill { position: absolute; z-index: 2; left: 14px; bottom: -14px; background: var(--gold-500); color: var(--pine-900); font-weight: 700; font-size: .76rem; line-height: 1.5; padding: 6px 12px; border-radius: 999px; box-shadow: 0 12px 20px -10px rgba(0, 0, 0, .55); }

/* Animations (actives uniquement quand .axd-steps porte .is-playing) */
@keyframes axd-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes axd-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes axd-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes axd-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes axd-float { from { translate: 0 -5px; } to { translate: 0 6px; } }
@keyframes axd-cursor { 0% { opacity: 0; transform: translate(110px, 80px); } 12% { opacity: 1; } 70% { transform: translate(0, 0); } 84% { transform: scale(.78); } 100% { opacity: 1; transform: none; } }
@keyframes axd-press { 0%, 100% { transform: scale(1); } 50% { transform: scale(.95); } }
@keyframes axd-ripple { from { opacity: .8; transform: scale(.92); } to { opacity: 0; transform: scale(1.12); } }
@keyframes axd-chip { from { background: #fff; border-color: var(--line-soft); color: var(--ink-500); } to { background: var(--mint-100); border-color: var(--pine-600); color: var(--pine-800); } }
@keyframes axd-pick { from { background: #fff; border-color: var(--line-soft); color: var(--ink-900); } to { background: var(--pine-800); border-color: var(--pine-800); color: #fff; } }
@keyframes axd-sheet { from { opacity: 0; transform: translateY(34px) rotate(-7deg); } to { opacity: 1; transform: rotate(-1.5deg); } }
@keyframes axd-stamp { 0% { opacity: 0; transform: rotate(-12deg) scale(2.3); } 60% { opacity: 1; transform: rotate(-12deg) scale(.92); } 100% { opacity: 1; transform: rotate(-12deg) scale(1); } }

.axd-steps.is-playing .axd-scene.is-on .axd-scene__label { animation: axd-reveal .7s var(--axd-io) both .3s; }
.axd-steps.is-playing .axd-scene.is-on .axd-mk-cursor { animation: axd-cursor 1.3s var(--axd-io) both; }
/* Scène 1 : le devis */
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-card { animation: axd-rise .6s var(--axd-out) both; }
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-field { animation: axd-rise .45s var(--axd-out) both .15s; }
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-field + .axd-mk-field { animation-delay: .55s; }
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-field b { animation: axd-reveal .45s steps(10) both .35s; }
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-field + .axd-mk-field b { animation-delay: .8s; }
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-chip { animation: axd-chip .3s ease both 1.2s; }
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-chip:nth-child(2) { animation-delay: 1.4s; }
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-chip:nth-child(3) { animation-delay: 1.6s; }
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-chip .axd-ico { animation: axd-pop .3s var(--axd-pop) both 1.2s; }
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-chip:nth-child(2) .axd-ico { animation-delay: 1.4s; }
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-chip:nth-child(3) .axd-ico { animation-delay: 1.6s; }
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-cursor { animation-delay: 1.7s; }
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-btn { animation: axd-press .3s ease 2.75s; }
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-btn::after { animation: axd-ripple .6s ease-out 2.8s; }
.axd-steps.is-playing .is-on .axd-mock--devis .axd-mk-toast { animation: axd-pop .5s var(--axd-pop) both 3.05s; }
/* Scène 2 : le créneau */
.axd-steps.is-playing .is-on .axd-mock--creneau .axd-mk-card { animation: axd-rise .6s var(--axd-out) both; }
.axd-steps.is-playing .is-on .axd-mock--creneau .axd-mk-slot { animation: axd-pop .4s var(--axd-pop) both .2s; }
.axd-steps.is-playing .is-on .axd-mock--creneau .axd-mk-slot:nth-child(4n+2) { animation-delay: .28s; }
.axd-steps.is-playing .is-on .axd-mock--creneau .axd-mk-slot:nth-child(4n+3) { animation-delay: .36s; }
.axd-steps.is-playing .is-on .axd-mock--creneau .axd-mk-slot:nth-child(4n) { animation-delay: .44s; }
.axd-steps.is-playing .is-on .axd-mock--creneau .axd-mk-slot.is-pick { animation: axd-pop .4s var(--axd-pop) backwards .36s, axd-pick .25s ease both 2.05s; }
.axd-steps.is-playing .is-on .axd-mock--creneau .axd-mk-cursor { animation-delay: 1s; }
.axd-steps.is-playing .is-on .axd-mock--creneau .axd-mk-notif { animation: axd-rise .5s var(--axd-out) both 2.5s; }
/* Scène 3 : le rapport */
.axd-steps.is-playing .is-on .axd-mock--rapport .axd-mk-sheet { animation: axd-sheet .7s var(--axd-out) both; }
.axd-steps.is-playing .is-on .axd-mock--rapport .axd-mk-row .axd-mk-line { animation: axd-grow .5s var(--axd-io) both .5s; }
.axd-steps.is-playing .is-on .axd-mock--rapport .axd-mk-row .axd-mk-tick { animation: axd-pop .4s var(--axd-pop) both .8s; }
.axd-steps.is-playing .is-on .axd-mock--rapport .axd-mk-row:nth-child(3) .axd-mk-line { animation-delay: .75s; }
.axd-steps.is-playing .is-on .axd-mock--rapport .axd-mk-row:nth-child(3) .axd-mk-tick { animation-delay: 1.05s; }
.axd-steps.is-playing .is-on .axd-mock--rapport .axd-mk-row:nth-child(4) .axd-mk-line { animation-delay: 1s; }
.axd-steps.is-playing .is-on .axd-mock--rapport .axd-mk-row:nth-child(4) .axd-mk-tick { animation-delay: 1.3s; }
.axd-steps.is-playing .is-on .axd-mock--rapport .axd-mk-sign .axd-mk-line { animation: axd-grow .5s var(--axd-io) both 1.4s; }
.axd-steps.is-playing .is-on .axd-mock--rapport .axd-mk-stamp { animation: axd-stamp .55s cubic-bezier(.3, 1.2, .5, 1) both 1.9s; }
.axd-steps.is-playing .is-on .axd-mock--rapport .axd-mk-pill { animation: axd-pop .5s var(--axd-pop) both 2.4s; }

@media (prefers-reduced-motion: reduce) {
  .axd-steps *, .axd-steps *::before, .axd-steps *::after { animation: none !important; transition: none !important; }
}
