/* Motion design dans les cartes des piliers (build/piliers_motion.py) : scènes SVG animées en CSS, couleur de la carte (--pc) */
.pmo { grid-column: 1 / -1; margin: 18px 0 2px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--pc) 7%, #fff), color-mix(in srgb, var(--pc) 13%, #fbfaf7)); }
.pm { display: block; width: 100%; height: auto; font-family: var(--sans, sans-serif); }
.pm text { font-size: 13px; font-weight: 600; fill: #1d2b29; }
.pm-line { fill: none; stroke: var(--pc); stroke-width: 2; stroke-dasharray: 2 8; stroke-linecap: round; opacity: .45; animation: pmDash 1.6s linear infinite; }
@keyframes pmDash { to { stroke-dashoffset: -20; } }
.pm-chip rect { fill: #fff; stroke: color-mix(in srgb, var(--pc) 35%, #fff); stroke-width: 1.5; }
.pm-hub rect { fill: #fff; stroke: var(--pc); stroke-width: 2; filter: drop-shadow(0 6px 10px rgba(16,32,29,.12)); }
.pm-hub text { font: italic 600 19px var(--serif, serif); fill: var(--pc); }
.pm-hub { animation: pmPulse 2.7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pmPulse { 0%, 100% { scale: 1; } 50% { scale: 1.06; } }
.pm-doc rect { fill: #fff; stroke: var(--pc); stroke-width: 1.5; }
.pm-doc path { stroke: color-mix(in srgb, var(--pc) 45%, #fff); stroke-width: 2; stroke-linecap: round; }
.pm-move { offset-rotate: 0deg; animation: pmMove 2.7s cubic-bezier(.45,0,.3,1) infinite; opacity: 0; }
@keyframes pmMove { 0% { offset-distance: 0%; opacity: 0; } 12% { opacity: 1; } 82% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }

/* 2 · traitement */
.pm-paper > rect { fill: #fff; stroke: color-mix(in srgb, var(--pc) 30%, #fff); stroke-width: 1.5; }
.pm-fill { stroke: color-mix(in srgb, var(--pc) 40%, #fff); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 120; stroke-dashoffset: 120; animation: pmFill 6s ease infinite; }
.pm-f2 { animation-delay: .25s; } .pm-f3 { animation-delay: .5s; }
@keyframes pmFill { 0% { stroke-dashoffset: 120; } 15%, 80% { stroke-dashoffset: 0; } 92%, 100% { stroke-dashoffset: 120; } }
.pm-sig { fill: none; stroke: var(--pc); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 220; stroke-dashoffset: 220; animation: pmSig 6s ease infinite; }
@keyframes pmSig { 0%, 30% { stroke-dashoffset: 220; } 50%, 80% { stroke-dashoffset: 0; } 92%, 100% { stroke-dashoffset: 220; } }
.pm--2 .pm-chip { opacity: .3; animation: pmStep 6s ease infinite; }
.pm--2 .pm-s2 { animation-delay: 1.4s; } .pm--2 .pm-s3 { animation-delay: 2.8s; }
@keyframes pmStep { 0%, 100% { opacity: .3; } 8%, 40% { opacity: 1; } 55% { opacity: .3; } }
.pm-folder path { fill: color-mix(in srgb, var(--pc) 22%, #fff); stroke: var(--pc); stroke-width: 1.5; }
.pm-fly { animation: pmFly 6s ease-in-out infinite; opacity: 0; }
@keyframes pmFly { 0%, 62% { transform: translate(150px, 85px); opacity: 0; } 66% { opacity: 1; } 82% { transform: translate(446px, 95px) scale(.7); opacity: 1; } 88%, 100% { transform: translate(446px, 95px) scale(.4); opacity: 0; } }

/* 4 · parcours */
.pm-phone > rect:first-child, .pm-kiosk > rect:first-child, .pm-cal > rect, .pm-visio > rect { fill: #fff; stroke: color-mix(in srgb, var(--pc) 45%, #fff); stroke-width: 1.5; }
.pm-phone > rect:first-child { fill: #24302e; stroke: none; }
.pm-scr { fill: color-mix(in srgb, var(--pc) 10%, #fff); stroke: none; }
.pm-kiosk path, .pm-cal path { stroke: color-mix(in srgb, var(--pc) 45%, #fff); stroke-width: 1.5; fill: none; }
.pm-bubble { animation: pmPop 5s ease infinite; transform-box: fill-box; transform-origin: 0 100%; }
.pm-bubble rect { fill: var(--pc); } .pm-bubble text { fill: #fff; font-size: 12px; }
.pm-qr rect { fill: #1d2b29; animation: pmBlink 5s steps(1) infinite 1.2s; }
.pm-b { fill: var(--pc); opacity: 0; animation: pmPop 5s ease infinite; transform-box: fill-box; transform-origin: 0 50%; }
.pm-b1 { animation-delay: 2s; } .pm-b2 { animation-delay: 2.3s; fill: color-mix(in srgb, var(--pc) 60%, #fff); } .pm-b3 { animation-delay: 2.6s; }
.pm-head { fill: none; stroke: var(--pc); stroke-width: 2.5; }
.pm-rec { fill: #e73d3d; animation: pmBlink 1.2s steps(1) infinite; }
.pm-labels text { font-size: 11.5px; font-weight: 500; fill: #5d6966; }
@keyframes pmPop { 0%, 6% { opacity: 0; scale: .4; } 14%, 78% { opacity: 1; scale: 1; } 90%, 100% { opacity: 0; scale: .9; } }
@keyframes pmBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .25; } }

@media (prefers-reduced-motion: reduce) {
  .pm *, .pm { animation: none !important; }
  .pm-move, .pm-fly { display: none; } .pm-fill, .pm-sig { stroke-dashoffset: 0; } .pm-b, .pm-bubble, .pm--2 .pm-chip { opacity: 1; }
}
