/* En-tête animé de la page Queen Loca : sortie du véhicule, remise des clés, départ du client.
   Composant includes/loca-handover.php — boucle de 14 s, CSS seul. Préfixe lh- / loca-handover. */
.loca-handover{--lh-t:14s;padding:46px 0 30px;background:linear-gradient(135deg,var(--ink) 0%,color-mix(in srgb,var(--ink) 78%,var(--red)) 100%);color:#fff;overflow:hidden}
.loca-handover-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}
.loca-handover-head h1{margin:6px 0 0;color:#fff;line-height:1.05}
.loca-handover-head .eyebrow{color:var(--gold)}
.loca-handover-stage{position:relative;width:min(1180px,calc(100% - 32px));margin:0 auto;border-radius:22px;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.28)}
.lh-scene{display:block;width:100%;height:auto}
.lh-toggle{position:absolute;right:12px;bottom:12px;padding:7px 13px;border:1px solid rgba(255,255,255,.35);border-radius:999px;background:rgba(0,0,0,.45);color:#fff;font:700 12px/1 var(--font);cursor:pointer}
.lh-toggle:hover,.lh-toggle:focus-visible{background:rgba(0,0,0,.7);outline:2px solid var(--gold);outline-offset:2px}
.loca-handover-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px;margin-bottom:0;padding:0;list-style:none}
.lh-step{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:700;color:#fff}
.lh-step b{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:var(--gold);color:var(--ink);font-size:13px}

/* Décor */
.lh-sky-top{stop-color:var(--ink)}
.lh-sky-bottom{stop-color:color-mix(in srgb,var(--ink) 55%,var(--red))}
.lh-sky-horizon{stop-color:color-mix(in srgb,var(--red) 55%,var(--gold))}
.lh-sun{fill:var(--gold);opacity:.92}
.lh-stars circle{fill:#fff;opacity:.55}
.lh-cloud ellipse{fill:#fff;opacity:.13}
.lh-mountain{fill:rgba(0,0,0,.26)}
.lh-mountain-far{fill:rgba(0,0,0,.13)}
.lh-sea{fill:color-mix(in srgb,var(--gold) 35%,#3b7fa0);opacity:.55}
.lh-trunk{fill:rgba(0,0,0,.42)}
.lh-trunk-rings{fill:none;stroke:rgba(255,255,255,.08);stroke-width:2}
.lh-leaf{fill:rgba(0,0,0,.4)}
.lh-coco{fill:rgba(0,0,0,.5)}
.lh-wall{stroke:rgba(0,0,0,.06)}
.lh-plinth{fill:#cfc4b2}
.lh-roof{fill:#26262b}
.lh-roof-edge{fill:var(--gold)}
.lh-wall-shadow{fill:rgba(0,0,0,.08)}
.lh-sign{stroke:#8a6b12;stroke-width:1}
.lh-sign-in{fill:none;stroke:rgba(255,255,255,.55);stroke-width:1.2}
.lh-sign-crown{fill:var(--ink)}
.lh-sign-post{stroke:#26262b;stroke-width:4}
.lh-sign-text{fill:var(--ink);font:800 19px var(--display);letter-spacing:.08em}
.lh-garage-light{fill:rgba(255,236,190,.05)}
.lh-garage-frame{fill:none;stroke:#3a3a40;stroke-width:6}
.lh-door-bar{fill:#a79f92}
.lh-door-handle{fill:#6d665b}
.lh-awning{fill:var(--red)}
.lh-awning-stripes{stroke:#fff;stroke-width:9;opacity:.85}
.lh-awning-edge{fill:var(--red);stroke:color-mix(in srgb,var(--red) 70%,#000);stroke-width:1}
.lh-door-frame{fill:var(--red);stroke:color-mix(in srgb,var(--red) 70%,#000);stroke-width:2}
.lh-door-glass{opacity:.9}
.lh-door-knob{fill:var(--gold)}
.lh-window-frame{fill:#3a3a40}
.lh-window-shine{fill:rgba(255,255,255,.35)}
.lh-pot{fill:#a0522d}
.lh-leaves{fill:#2f7d4a}
.lh-road-line{stroke:rgba(255,255,255,.55);stroke-width:3;stroke-dasharray:26 22}
.lh-curb{fill:#8d857a}
.lh-walk-joints{stroke:rgba(0,0,0,.12);stroke-width:1.5}

/* Véhicule (repère d'origine 738 × 369, réduit à 40 %) */
.lh-van-shadow{fill:rgba(0,0,0,.35)}
.lh-v-well{fill:#101114}
.lh-v-body{stroke:#9fa4ad;stroke-width:2.5;stroke-linejoin:round}
.lh-v-roofshine{fill:none;stroke:#fff;stroke-width:5;stroke-linecap:round;opacity:.9}
.lh-v-flare{fill:none;stroke:rgba(40,50,65,.12);stroke-width:7}
.lh-v-crease{fill:none;stroke:rgba(40,50,65,.12);stroke-width:3}
.lh-v-crease-hl{fill:none;stroke:#fff;stroke-width:3}
.lh-v-panel{fill:rgba(40,50,65,.03);stroke:#cdd0d6;stroke-width:2.2}
.lh-v-cut{fill:none;stroke:#a9aeb7;stroke-width:2.4}
.lh-v-lowshine{stroke:#fff;stroke-width:7;stroke-linecap:round;opacity:.8}
.lh-v-molding{stroke:#2a2c31;stroke-width:4;stroke-linecap:round}
.lh-v-dark{fill:#25272c}
.lh-v-window{stroke:#16191e;stroke-width:4;stroke-linejoin:round}
.lh-v-seat{fill:rgba(0,0,0,.3)}
.lh-v-reflect{fill:rgba(255,255,255,.12)}
.lh-v-mirror{fill:#202227}
.lh-v-line-dark{stroke:#26282d;stroke-width:3.5;stroke-linecap:round}
.lh-v-repeater{fill:#f1a33a}
.lh-v-lamp-case{fill:#1b1e24}
.lh-v-led{stroke:#fff;stroke-width:2;stroke-linecap:round}
.lh-v-grille{stroke:#4a4d55;stroke-width:3}
.lh-v-tail{fill:#a8141b}
.lh-v-tail-hl{fill:#ff5a5f;opacity:.85}
.lh-v-reflector{fill:#e9e9ec}
.lh-tyre-wall{fill:none;stroke:#34363c;stroke-width:2}
.lh-rim-ring{fill:none;stroke:#9a9ea6;stroke-width:2}
.lh-rim-holes circle{fill:#55585f}
.lh-hub{fill:#3a3c42}
.lh-hub-cap{fill:#a5a9b0}
.lh-hub-mark{stroke:#a5a9b0;stroke-width:2.5}
.lh-puff circle{fill:rgba(255,255,255,.55)}
/* Décor Queen Loca sur le flanc */
.lh-d-gold{fill:var(--gold)}
.lh-d-grey{fill:#6c6c72}
.lh-d-dark{fill:#1f1f24}
.lh-d-red{fill:#e0242c}
.lh-d-lines{stroke:#1f1f24;stroke-width:1.4}
.lh-d-small{stroke:#8b8f96;stroke-width:2.2;stroke-dasharray:5 2}
.lh-decal-text{fill:#3a2f2a;font:italic 800 14px var(--display);letter-spacing:.04em}

/* Personnages */
.lh-shadow{fill:rgba(0,0,0,.28)}
.lh-far{filter:brightness(.78)}
.lh-dress{fill:var(--red)}
.lh-cloth-shade{fill:rgba(0,0,0,.18)}
.lh-cloth-hl{fill:none;stroke:rgba(255,255,255,.28);stroke-width:1.2;stroke-linecap:round}
.lh-skin-agent{fill:#4a2c1d}
.lh-hair-agent{fill:#120c09}
.lh-hair-shine{fill:none;stroke:rgba(255,255,255,.22);stroke-width:1;stroke-linecap:round}
.lh-neck-shade,.lh-face-shade{fill:rgba(0,0,0,.18)}
.lh-cheek{fill:rgba(255,255,255,.07)}
.lh-ear{fill:#3d2417}
.lh-ear-2{fill:#93603d}
.lh-belt,.lh-bracelet,.lh-belt-buckle,.lh-necklace{fill:var(--gold)}
.lh-belt-buckle{stroke:#8a6b12;stroke-width:.6}
.lh-earring{fill:none;stroke:var(--gold);stroke-width:1.2}
.lh-brow{fill:none;stroke:#120c09;stroke-width:.9;stroke-linecap:round}
.lh-brow-thick{stroke:#2b1d16;stroke-width:1.3}
.lh-eye{fill:#140d0b}
.lh-lash{stroke:#140d0b;stroke-width:.7;stroke-linecap:round}
.lh-nose{fill:none;stroke:rgba(0,0,0,.35);stroke-width:.8;stroke-linecap:round}
.lh-nose-2{stroke:rgba(0,0,0,.22)}
.lh-lips-fill{fill:#b3262e}
.lh-mouth{fill:none;stroke:#6e3b2a;stroke-width:.9;stroke-linecap:round}
.lh-heel{fill:#1f1f24}
.lh-skin-2{fill:#a86f48}
.lh-shirt-client{fill:#2a9d8f}
.lh-collar{fill:#f4f1ea}
.lh-placket{stroke:rgba(0,0,0,.25);stroke-width:1}
.lh-button{fill:#f4f1ea}
.lh-watch{fill:#1f1f24}
.lh-jeans{fill:#33507a}
.lh-jeans-seam{stroke:rgba(255,255,255,.18);stroke-width:.7}
.lh-sneaker{fill:#f4f4f6;stroke:#c9c9cf;stroke-width:.6}
.lh-sole{stroke:var(--red);stroke-width:1.2}
.lh-hair{fill:#2b1d16}
.lh-beard{fill:rgba(43,29,22,.55)}
.lh-key-ring{fill:none;stroke:var(--gold);stroke-width:3}
.lh-key{fill:var(--gold);stroke:#1f1f24;stroke-width:1.6;paint-order:stroke}
.lh-keys{filter:drop-shadow(0 0 3px rgba(255,255,255,.9))}
.lh-key-fob{fill:#1f1f24}
.lh-key-btn{fill:var(--red)}
.lh-spark circle{fill:var(--gold);opacity:.25}
.lh-spark path{stroke:var(--gold);stroke-width:3;stroke-linecap:round}
.lh-bubble{filter:drop-shadow(0 6px 10px rgba(0,0,0,.25))}
.lh-bubble rect,.lh-bubble path{fill:#fff}
.lh-bubble text{fill:var(--ink);font:800 18px var(--font)}
/* Origines des transformations */
.lh-wheel,.lh-puff,.lh-spark{transform-box:fill-box;transform-origin:50% 50%}
.lh-door,.lh-arm,.lh-leg{transform-box:fill-box;transform-origin:50% 0}
.lh-bubble{transform-box:fill-box;transform-origin:50% 100%}
.lh-palm{transform-box:fill-box;transform-origin:50% 100%}

/* Chronologie (14 s) : 0-10 % rideau, 10-32 % sortie, 34-42 % l'agent s'avance,
   44-58 % remise des clés, 60-69 % le client monte, 68-92 % départ, 74-84 % rideau. */
.lh-van{animation:lh-van var(--lh-t) infinite}
.lh-wheel{animation:lh-wheel var(--lh-t) infinite}
.lh-door{animation:lh-door var(--lh-t) ease-in-out infinite}
.lh-puff{opacity:0;animation:lh-puff var(--lh-t) infinite}
.lh-agent{animation:lh-agent var(--lh-t) linear infinite}
.lh-leg-agent{animation:lh-leg-agent var(--lh-t) linear infinite}
.lh-leg-agent-b{animation-name:lh-leg-agent-b}
.lh-arm-agent{animation:lh-arm-agent var(--lh-t) ease-in-out infinite}
.lh-client{animation:lh-client var(--lh-t) linear infinite}
.lh-leg-client{animation:lh-leg-client var(--lh-t) linear infinite}
.lh-leg-client-b{animation-name:lh-leg-client-b}
.lh-cloud{animation:lh-cloud 38s linear infinite alternate}
.lh-cloud-2{animation-duration:52s;animation-direction:alternate-reverse}
.lh-palm{animation:lh-sway 6s ease-in-out infinite alternate}
.lh-palm-small{animation-delay:-2.5s}
.lh-arm-client{animation:lh-arm-client var(--lh-t) ease-in-out infinite}
.lh-keys{opacity:0;animation:lh-keys var(--lh-t) ease-in-out infinite}
.lh-spark{opacity:0;animation:lh-spark var(--lh-t) ease-out infinite}
.lh-bubble{opacity:0}
.lh-bubble-keys{animation:lh-bubble-keys var(--lh-t) infinite}
.lh-bubble-thanks{animation:lh-bubble-thanks var(--lh-t) infinite}
.lh-bubble-road{animation:lh-bubble-road var(--lh-t) infinite}
.lh-step-1{animation:lh-step-1 var(--lh-t) infinite}
.lh-step-2{animation:lh-step-2 var(--lh-t) infinite}
.lh-step-3{animation:lh-step-3 var(--lh-t) infinite}
.loca-handover.is-paused *{animation-play-state:paused!important}

@keyframes lh-van{
  0%,10%{transform:translateX(0);opacity:1;animation-timing-function:cubic-bezier(.25,.6,.35,1)}
  32%{transform:translateX(330px)}
  68%{transform:translateX(330px);animation-timing-function:cubic-bezier(.55,0,.85,.45)}
  92%{transform:translateX(1000px);opacity:1}
  92.4%{transform:translateX(1000px);opacity:0}
  93%{transform:translateX(0);opacity:0}
  95%,100%{transform:translateX(0);opacity:1}
}
@keyframes lh-wheel{
  0%,10%{transform:rotate(0);animation-timing-function:cubic-bezier(.25,.6,.35,1)}
  32%{transform:rotate(946deg)}
  68%{transform:rotate(946deg);animation-timing-function:cubic-bezier(.55,0,.85,.45)}
  92%,92.4%{transform:rotate(2866deg)}
  93%,100%{transform:rotate(0)}
}
@keyframes lh-door{0%,3%{transform:scaleY(1)}10%,74%{transform:scaleY(.08)}84%,100%{transform:scaleY(1)}}
@keyframes lh-puff{
  0%,9%{opacity:0;transform:translateX(0) scale(.6)}11%{opacity:.75}15%{opacity:0;transform:translateX(-24px) scale(1.4)}
  66%{opacity:0;transform:translateX(0) scale(.6)}68.5%{opacity:.75}73%,100%{opacity:0;transform:translateX(-24px) scale(1.4)}
}
@keyframes lh-agent{0%,33%{transform:translateX(-104px);opacity:0}34.5%{transform:translateX(-92px);opacity:1}42%{transform:translateX(0)}89%{transform:translateX(0);opacity:1}93%,100%{transform:translateX(0);opacity:0}}
@keyframes lh-leg-agent{0%,34%{transform:rotate(0)}35.5%{transform:rotate(18deg)}37%{transform:rotate(-18deg)}38.5%{transform:rotate(18deg)}40%{transform:rotate(-18deg)}41.3%{transform:rotate(14deg)}42%,100%{transform:rotate(0)}}
@keyframes lh-arm-agent{0%,43%{transform:rotate(0)}45%,55%{transform:rotate(-75deg)}57%,72%{transform:rotate(0)}74%,78%,82%{transform:rotate(-155deg)}76%,80%,84%{transform:rotate(-125deg)}86.5%,100%{transform:rotate(0)}}
@keyframes lh-client{0%,4%{transform:translateX(330px);opacity:1}22%,60%{transform:translateX(0)}66%{transform:translateX(-175px);opacity:1}69%{transform:translateX(-175px);opacity:0}97%{transform:translateX(330px);opacity:0}98%,100%{transform:translateX(330px);opacity:1}}
@keyframes lh-leg-client{
  0%,4%{transform:rotate(0)}5.5%{transform:rotate(18deg)}7%{transform:rotate(-18deg)}8.5%{transform:rotate(18deg)}10%{transform:rotate(-18deg)}11.5%{transform:rotate(18deg)}13%{transform:rotate(-18deg)}14.5%{transform:rotate(18deg)}16%{transform:rotate(-18deg)}17.5%{transform:rotate(18deg)}19%{transform:rotate(-18deg)}20.5%{transform:rotate(14deg)}22%,60%{transform:rotate(0)}
  61.5%{transform:rotate(18deg)}63%{transform:rotate(-18deg)}64.5%{transform:rotate(18deg)}66%,100%{transform:rotate(0)}
}
@keyframes lh-leg-client-b{
  0%,4%{transform:rotate(0)}5.5%{transform:rotate(-18deg)}7%{transform:rotate(18deg)}8.5%{transform:rotate(-18deg)}10%{transform:rotate(18deg)}11.5%{transform:rotate(-18deg)}13%{transform:rotate(18deg)}14.5%{transform:rotate(-18deg)}16%{transform:rotate(18deg)}17.5%{transform:rotate(-18deg)}19%{transform:rotate(18deg)}20.5%{transform:rotate(-14deg)}22%,60%{transform:rotate(0)}
  61.5%{transform:rotate(-18deg)}63%{transform:rotate(18deg)}64.5%{transform:rotate(-18deg)}66%,100%{transform:rotate(0)}
}
@keyframes lh-leg-agent-b{0%,34%{transform:rotate(0)}35.5%{transform:rotate(-18deg)}37%{transform:rotate(18deg)}38.5%{transform:rotate(-18deg)}40%{transform:rotate(18deg)}41.3%{transform:rotate(-14deg)}42%,100%{transform:rotate(0)}}
@keyframes lh-cloud{from{transform:translateX(-40px)}to{transform:translateX(60px)}}
@keyframes lh-sway{from{transform:rotate(-1.6deg)}to{transform:rotate(1.8deg)}}
@keyframes lh-arm-client{0%,49%{transform:rotate(0)}51.5%,57%{transform:rotate(-75deg)}59.5%,100%{transform:rotate(0)}}
@keyframes lh-keys{0%,44%{opacity:0;transform:translate(0,0)}45%,48%{opacity:1;transform:translate(0,0)}51%{transform:translate(100px,-36px)}54%{transform:translate(200px,0)}56.5%{opacity:1;transform:translate(200px,0)}58.5%,100%{opacity:0;transform:translate(200px,0)}}
@keyframes lh-spark{0%,53%{opacity:0;transform:scale(.4)}55%{opacity:1;transform:scale(1)}59%,100%{opacity:0;transform:scale(1.5)}}
@keyframes lh-bubble-keys{0%,42.5%{opacity:0;transform:translateY(10px) scale(.9)}44.5%,53%{opacity:1;transform:none}55%,100%{opacity:0;transform:none}}
@keyframes lh-bubble-thanks{0%,54.5%{opacity:0;transform:translateY(10px) scale(.9)}56.5%,62%{opacity:1;transform:none}64%,100%{opacity:0;transform:none}}
@keyframes lh-bubble-road{0%,72%{opacity:0;transform:translateY(10px) scale(.9)}74%,87%{opacity:1;transform:none}89%,100%{opacity:0;transform:none}}
@keyframes lh-step-1{0%,31%{opacity:1}34%,97%{opacity:.42}100%{opacity:1}}
@keyframes lh-step-2{0%,32%{opacity:.42}35%,66%{opacity:1}69%,100%{opacity:.42}}
@keyframes lh-step-3{0%,67%{opacity:.42}70%,96%{opacity:1}99%,100%{opacity:.42}}

/* Préférence « réduire les animations » : image fixe de la remise des clés */
@media (prefers-reduced-motion:reduce){
  .loca-handover *{animation:none!important}
  .lh-van{transform:translateX(330px)}
  .lh-door{transform:scaleY(.08)}
  .lh-agent,.lh-client{transform:none;opacity:1}
  .lh-arm-agent,.lh-arm-client{transform:rotate(-75deg)}
  .lh-keys{opacity:1;transform:translate(100px,-36px)}
  .lh-bubble-keys{opacity:1}
  .lh-step{opacity:1}
  .lh-toggle{display:none}
}

@media (max-width:760px){
  .loca-handover{padding:30px 0 22px}
  .loca-handover-head{flex-direction:column;align-items:flex-start;gap:14px;margin-bottom:16px}
  .loca-handover-stage{width:100%;border-radius:0}
  .lh-scene{height:200px}
  .lh-toggle{top:10px;bottom:auto;right:10px;padding:6px 10px;font-size:11px}
  .loca-handover-steps{grid-template-columns:1fr;gap:8px}
  .lh-step{font-size:13px}
}

/* Scène intégrée dans une autre page (chapitre « Après-midi » de l'accueil) */
.loca-handover-embed{padding:0;background:none;overflow:visible}
.loca-handover-embed .loca-handover-stage{width:100%}
.loca-handover-embed .loca-handover-steps{width:100%;padding:0}
@media (max-width:760px){.loca-handover-embed .loca-handover-stage{border-radius:16px}}
