/* La silhouette et son ombre restent deux calques indépendants. */
.mascot-figure{--shadow-opacity:.16;position:relative;display:block;aspect-ratio:2/3;pointer-events:none;user-select:none;isolation:isolate}
.mascot-thinking{--mascot-image:url('../images/mascotte/reflechir-v1.png')}
.mascot-thinking img{transform:none}
.mascot-walking{--mascot-image:url('../images/mascotte/marcher-v1.png')}
.mascot-guiding{--mascot-image:url('../images/mascotte/montrer-v1.png')}
.mascot-figure img{position:relative;z-index:1;width:100%;height:100%;object-fit:contain}
.mascot-shadow{position:absolute;inset:0;background:#352c23;opacity:var(--shadow-opacity);-webkit-mask:var(--mascot-image) center/contain no-repeat;mask:var(--mascot-image) center/contain no-repeat;transform-origin:50% 94%;transform:skewX(52deg) scaleY(.18);filter:blur(1px)}
.mascot-thinking .mascot-shadow{transform:skewX(52deg) scaleY(.18)}
.chapter-topline{display:flex;justify-content:space-between;align-items:center;gap:1.5rem;margin-bottom:1.2rem}
.chapter-topline>.eyebrow,.chapter-topline>.section-title{margin-bottom:0}
.mascot-stop{width:5.5rem;flex-shrink:0;margin-block:-1.25rem -.5rem}
.mascot-follower{--mascot-style-version:6;display:none;pointer-events:none;user-select:none}
.mascot-trigger{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;pointer-events:auto}
.mascot-trigger:hover{filter:drop-shadow(0 3px 4px rgba(53,44,35,.12))}
.mascot-trigger:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.mascot-message{position:absolute;left:0;bottom:calc(100% + .75rem);width:min(22rem,calc(100vw - 2rem));max-height:calc(100dvh - 7rem);overflow:auto;overscroll-behavior:contain;padding:1.25rem;background:var(--white);border:1px solid var(--rule);box-shadow:0 1rem 2.5rem rgba(53,44,35,.16);color:var(--ink);text-align:left;pointer-events:auto;user-select:text}
.mascot-message[hidden]{display:none}
.mascot-message-close{position:absolute;top:.65rem;right:.75rem;width:2rem;height:2rem;border:0;background:transparent;color:var(--muted);font:400 1.6rem/1 var(--sans);cursor:pointer}
.mascot-message-close:hover{color:var(--accent)}
.mascot-message-kicker{padding-right:2rem;color:var(--accent);font-size:.7rem;font-weight:600;letter-spacing:.13em;text-transform:uppercase}
.mascot-message h2{margin-top:.3rem;font-size:1.65rem;line-height:1.1}
.mascot-message>p{margin-top:.6rem;color:var(--muted);font-size:.875rem;line-height:1.5}
.mascot-message form{display:grid;grid-template-columns:1fr;gap:.9rem;margin:1rem 0 0;max-width:none}
.mascot-message .field{gap:.3rem}
.mascot-message .field label{font-size:.8rem}
.mascot-message .field input,.mascot-message .field textarea{padding:.65rem .7rem;background:var(--bg);font-size:.9rem}
.mascot-message .field textarea{min-height:6rem;resize:vertical}
.mascot-message .mascot-message-send{justify-self:start;padding:.7rem 1rem;font-size:.875rem}
.mascot-message-error{margin-top:.8rem;padding:.65rem .75rem;border-left:3px solid var(--accent);background:#FFF0EB;font-size:.8rem;line-height:1.45}
.mascot-captcha{width:100%;min-height:65px;overflow:hidden}
.mascot-message .cf-turnstile{margin-inline:auto}
.walk-cycle{display:none;position:absolute;inset:0;overflow:hidden;z-index:1}
.walk-sheet{display:block;position:absolute;top:0;left:6.6%;width:300%;height:100%;background:url('../images/mascotte/marche-cycle-v1.png') 0 0/100% 100% no-repeat;clip-path:inset(0 72.6% 0 0)}
.walk-cycle-shadow{position:absolute;inset:0;transform-origin:50% 94%;transform:skewX(52deg) scaleY(.18);opacity:var(--shadow-opacity);filter:brightness(0) blur(1px)}
.mascot-enhanced .mascot-stop{display:none}
/* Une seule figure, à gauche et tournée vers la suite de la page. */
.mascot-enhanced .mascot-follower{display:block;position:fixed;left:max(16px,env(safe-area-inset-left,0px));bottom:calc(1rem + env(safe-area-inset-bottom,0px));width:clamp(3rem,12vw,4rem);aspect-ratio:2/3;z-index:20}
.mascot-walking,.mascot-guiding{transform:scaleX(-1)}
.mascot-pose{position:absolute;inset:0;display:none}
.mascot-pose.is-active{display:block}
@media(min-width:1360px){
  .mascot-enhanced .mascot-follower{top:0;bottom:auto;left:max(8px,calc((100vw - 64rem)/4 - 4.5rem));width:clamp(8rem,10vw,9rem);transform:translate3d(0,var(--mascot-y,28vh),0);will-change:transform}
  .mascot-message{top:0;left:calc(100% + 1rem);bottom:auto;max-height:calc(100dvh - var(--mascot-y,28vh) - 1rem)}
}
@media(prefers-reduced-motion:no-preference){
  .mascot-follower.is-walking .walk-still{visibility:hidden}
  .mascot-follower.is-walking .walk-cycle{display:block;animation:mascot-weight var(--walk-cycle-ms,800ms) linear infinite}
  .mascot-follower.is-walking .walk-sheet{animation:mascot-stride var(--walk-cycle-ms,800ms) steps(1,end) infinite}
  .mascot-follower.is-walking .mascot-walking .mascot-shadow{visibility:hidden}
  .mascot-follower.is-walking .walk-cycle-shadow{animation:mascot-shadow-weight var(--walk-cycle-ms,800ms) linear infinite}
}
/* Quatre vues : appui, passage, autre appui, autre passage. */
@keyframes mascot-stride{0%,100%{left:6.6%;transform:translateX(0);clip-path:inset(0 72.6% 0 0)}25%{left:12.5%;transform:translateX(-25%);clip-path:inset(0 52.5% 0 27.5%)}50%{left:12.5%;transform:translateX(-50%);clip-path:inset(0 24% 0 49.5%)}75%{left:12.5%;transform:translateX(-75%);clip-path:inset(0 0 0 77%)}}
@keyframes mascot-shadow-weight{0%,50%,100%{opacity:var(--shadow-opacity)}25%,75%{opacity:calc(var(--shadow-opacity) * .75)}}
@keyframes mascot-weight{0%,50%,100%{translate:0 0}25%{translate:0 calc(-1 * var(--walk-lift,1px))}75%{translate:0 calc(-.7 * var(--walk-lift,1px))}}
@media(max-width:480px){.mascot-stop{width:4.75rem}.chapter-topline{gap:1rem}}
@media(max-width:360px){.mascot-message{padding:1rem}.mascot-message .cf-turnstile{margin-left:0;transform:scale(.85);transform-origin:top left}.mascot-captcha{min-height:56px}}
@media(prefers-reduced-motion:reduce){.mascot-figure,.mascot-shadow,.walk-cycle,.walk-sheet,.walk-cycle-shadow{animation:none;transition:none}}
