/* ShakaBot Motion v1.7.2 — chargé après le CSS du module principal. */

.shka-mascot,
.shka-header-mascot {
	position: relative;
	overflow: visible;
}
.shka-flight-mascot {
	overflow: visible;
}

/* Taille constante : grande présence, sans changement brutal entre les états. */
#shka-root #shka-toggle {
	width: 148px;
	height: 148px;
}

#shka-root .shka-flight-mascot {
	pointer-events: none;
}

#shka-root:not(.is-open) #shka-toggle {
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}
#shka-root:not(.is-open) .shka-mascot {
	opacity: 1 !important;
	visibility: visible !important;
}

/* L'image et le visage restent solidaires. */
#shka-root .shka-header-mascot img,
#shka-root .shka-flight-mascot img,
#shka-root.is-thinking .shka-flight-mascot img,
#shka-root.is-uploading .shka-flight-mascot img,
#shka-root.is-answering .shka-header-mascot img {
	animation: none !important;
	transform: none !important;
}

/* ============================================================
   TRANSFORMATION DU LOGO EN SHAKABOT
   ============================================================ */
#shka-root.shakabot-morphing:not(.is-open) #shka-toggle .shka-mascot,
#shka-root.shakabot-intro-flight:not(.is-open) #shka-toggle .shka-mascot,
#shka-root.shakabot-intro-quick:not(.is-open) #shka-toggle .shka-mascot {
	opacity: 0 !important;
}

.shakabot-logo-transforming {
	opacity: 0 !important;
}
.shakabot-logo-return {
	animation: shakabotLogoReturn .72s cubic-bezier(.2,.85,.25,1) both !important;
}
.shakabot-logo-large {
	transform: scale(var(--shakabot-logo-large-scale,1.9)) !important;
	transform-origin: 50% 50% !important;
}
@keyframes shakabotLogoReturn {
	0%   { opacity: 0; transform: scale(.72); filter: drop-shadow(0 0 16px rgba(255,107,44,.9)); }
	62%  { opacity: 1; transform: scale(var(--shakabot-logo-large-scale,1.9)); filter: drop-shadow(0 0 8px rgba(255,107,44,.5)); }
	100% { opacity: 1; transform: scale(var(--shakabot-logo-large-scale,1.9)); filter: drop-shadow(0 0 0 rgba(255,107,44,0)); }
}

.shakabot-morph-stage {
	position: fixed;
	left: 28px;
	top: 28px;
	width: 100px;
	height: 100px;
	display: block;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	z-index: 999999;
	transform-origin: 50% 55%;
	filter: drop-shadow(0 8px 14px rgba(0,0,0,.48));
	isolation: isolate;
}
.shakabot-morph-stage.is-active {
	opacity: 1;
	visibility: visible;
	animation: shakabotBirthStage var(--shakabot-morph-duration,5600ms) cubic-bezier(.3,.02,.22,1) both;
}
.shakabot-morph-logo,
.shakabot-birth-video,
.shakabot-morph-fragment,
.shakabot-morph-part,
.shakabot-morph-bot,
.shakabot-morph-pose {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: contain !important;
	pointer-events: none;
}
.shakabot-birth-video {
	z-index: 30;
	opacity: 0;
	object-fit: contain;
	filter: drop-shadow(0 8px 14px rgba(0,0,0,.42));
}
.shakabot-morph-stage.uses-birth-video {
	animation: none;
	filter: none;
}
.shakabot-morph-stage.uses-birth-video .shakabot-birth-video { opacity: 1; }
.shakabot-morph-stage.uses-birth-video > :not(.shakabot-birth-video) { opacity: 0 !important; animation: none !important; }
.shakabot-morph-pose {
	z-index: 8;
	opacity: 0;
	transform-origin: 50% 60%;
	filter: drop-shadow(0 7px 10px rgba(0,0,0,.42));
	will-change: opacity, transform;
}
.shakabot-morph-pose.is-visible { opacity: 1; }
.shakabot-morph-logo {
	z-index: 4;
	animation: shakabotBirthLogo var(--shakabot-morph-duration,5600ms) ease-in-out both;
}
.shakabot-morph-bot {
	z-index: 8;
	opacity: 0;
	transform-origin: 50% 64%;
	animation: shakabotBirthComplete var(--shakabot-morph-duration,5600ms) ease-out both;
}
.shakabot-morph-part {
	z-index: 5;
	opacity: 0;
	transform-origin: 50% 58%;
}
.shakabot-morph-chassis {
	clip-path: polygon(7% 0,95% 0,95% 54%,72% 54%,70% 73%,60% 98%,36% 98%,25% 73%,25% 58%,7% 58%);
	animation: shakabotBirthChassis var(--shakabot-morph-duration,5600ms) cubic-bezier(.15,.78,.18,1) both;
}
.shakabot-morph-face {
	z-index: 6;
	clip-path: polygon(43% 27%,72% 27%,70% 58%,45% 58%);
	animation: shakabotBirthFacePanel var(--shakabot-morph-duration,5600ms) cubic-bezier(.22,.72,.2,1) both;
}
.shakabot-morph-arm-left {
	z-index: 7;
	clip-path: polygon(2% 39%,23% 38%,31% 50%,43% 53%,43% 66%,34% 72%,17% 67%,2% 56%);
	transform-origin: 39% 57%;
	animation: shakabotBirthLeftArm var(--shakabot-morph-duration,5600ms) cubic-bezier(.2,.75,.16,1) both;
}
.shakabot-morph-arm-right {
	z-index: 7;
	clip-path: polygon(64% 51%,77% 51%,84% 63%,93% 74%,94% 90%,82% 93%,72% 79%,66% 67%);
	transform-origin: 68% 57%;
	animation: shakabotBirthRightArm var(--shakabot-morph-duration,5600ms) cubic-bezier(.2,.75,.16,1) both;
}
.shakabot-morph-reactors {
	z-index: 9;
	clip-path: polygon(39% 79%,58% 79%,58% 98%,39% 98%);
	transform-origin: 48.5% 82%;
	animation: shakabotBirthReactors var(--shakabot-morph-duration,5600ms) cubic-bezier(.22,.72,.2,1) both;
}
.shakabot-morph-fragment {
	z-index: 12;
	opacity: 0;
	animation: shakabotBirthFragment var(--shakabot-morph-duration,5600ms) cubic-bezier(.12,.66,.18,1) var(--mfd,0ms) both;
}
.shakabot-morph-fragment-a { clip-path: polygon(0 0,52% 0,45% 38%,0 49%); --mfx:-84px; --mfy:-58px; --mfr:-32deg; --mfd:0ms; }
.shakabot-morph-fragment-b { clip-path: polygon(52% 0,100% 0,100% 43%,58% 35%); --mfx:91px; --mfy:-63px; --mfr:37deg; --mfd:18ms; }
.shakabot-morph-fragment-c { clip-path: polygon(0 48%,44% 38%,52% 66%,19% 100%,0 100%); --mfx:-103px; --mfy:28px; --mfr:29deg; --mfd:32ms; }
.shakabot-morph-fragment-d { clip-path: polygon(44% 37%,59% 35%,69% 69%,51% 100%,19% 100%,52% 65%); --mfx:-19px; --mfy:91px; --mfr:-25deg; --mfd:10ms; }
.shakabot-morph-fragment-e { clip-path: polygon(59% 35%,100% 43%,100% 78%,69% 69%); --mfx:105px; --mfy:22px; --mfr:-39deg; --mfd:42ms; }
.shakabot-morph-fragment-f { clip-path: polygon(69% 69%,100% 78%,100% 100%,51% 100%); --mfx:72px; --mfy:82px; --mfr:31deg; --mfd:24ms; }
.shakabot-morph-fragment-g { clip-path: polygon(17% 21%,49% 12%,43% 48%,22% 53%); --mfx:-55px; --mfy:-87px; --mfr:42deg; --mfd:50ms; }
.shakabot-morph-fragment-h { clip-path: polygon(48% 14%,83% 20%,72% 51%,43% 47%); --mfx:49px; --mfy:-92px; --mfr:-35deg; --mfd:58ms; }

.shakabot-birth-face {
	position: absolute;
	inset: 0;
	z-index: 10;
	pointer-events: none;
	opacity: 0;
	animation: shakabotBirthFaceLife var(--shakabot-morph-duration,5600ms) ease-out both;
}
.shakabot-birth-face::before {
	content: '';
	position: absolute;
	left: 52.5%;
	top: 34.2%;
	width: 14.7%;
	height: 11.2%;
	background: #211c1c;
	clip-path: polygon(4% 0,96% 0,88% 100%,12% 100%);
	box-shadow: inset 0 0 7px rgba(255,103,24,.2);
}
.shakabot-birth-eye,
.shakabot-birth-mouth {
	position: absolute;
	display: block;
	background: #ff8a24;
	box-shadow: 0 0 5px #ff6b18,0 0 11px rgba(255,103,24,.85);
}
.shakabot-birth-eye {
	top: 36.15%;
	width: 2.05%;
	height: 3.7%;
	border-radius: 50%;
	transform-origin: 50% 50%;
	animation: shakabotBirthEyes var(--shakabot-morph-duration,5600ms) steps(1,end) both;
}
.shakabot-birth-eye-left { left: 55.2%; }
.shakabot-birth-eye-right { left: 63.02%; }
.shakabot-birth-mouth {
	left: 57.8%;
	top: 42.1%;
	width: 4.75%;
	height: 1.7%;
	border-radius: 0 0 999px 999px;
	clip-path: inset(45% 0 0 0 round 0 0 99px 99px);
	animation: shakabotBirthSmile var(--shakabot-morph-duration,5600ms) ease-out both;
}
.shakabot-birth-thrusters {
	position: absolute;
	inset: 0;
	z-index: 11;
	opacity: 0;
	animation: shakabotBirthIgnition var(--shakabot-morph-duration,5600ms) ease-out both;
}
.shakabot-birth-thrusters i {
	position: absolute;
	top: 86.3%;
	width: 2.8%;
	height: 13%;
	border-radius: 50% 50% 70% 70%;
	background: linear-gradient(#fff7bf 0 16%,#ffb137 36%,#ff641c 69%,transparent 100%);
	filter: drop-shadow(0 0 5px #ff6b18);
	transform-origin: 50% 0;
	animation: shakabotBirthFlame .11s ease-in-out infinite alternate;
}
.shakabot-birth-thrusters i:first-child { left: 46.15%; }
.shakabot-birth-thrusters i:last-child { left: 50.1%; animation-delay: -.05s; }

.shakabot-morph-core {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 24%;
	height: 24%;
	margin: -12%;
	border: 2px solid rgba(255,128,42,.92);
	border-radius: 50%;
	z-index: 8;
	opacity: 0;
	box-shadow: 0 0 8px #ff6b20, 0 0 22px rgba(255,91,24,.72), inset 0 0 10px rgba(255,201,116,.45);
	animation: shakabotBirthCore var(--shakabot-morph-duration,5600ms) ease-out both;
}
.shakabot-morph-scan {
	position: absolute;
	left: 16%;
	right: 16%;
	top: 22%;
	height: 2px;
	z-index: 9;
	opacity: 0;
	background: linear-gradient(90deg,transparent,#fff1bc 28%,#ff6b20 50%,#fff1bc 72%,transparent);
	box-shadow: 0 0 7px #ff6b20,0 0 15px rgba(255,107,32,.7);
	animation: shakabotBirthScan var(--shakabot-morph-duration,5600ms) ease-in-out both;
}
.shakabot-morph-stage > i {
	position: absolute;
	left: 50%;
	top: 48%;
	width: var(--ms,5px);
	height: var(--ms,5px);
	margin: calc(var(--ms,5px)/-2);
	z-index: 10;
	opacity: 0;
	border: 1px solid rgba(255,210,154,.85);
	background: linear-gradient(135deg,#eef6f8 0 28%,#657078 48%,#ff7a26 100%);
	box-shadow: 0 0 6px rgba(255,103,28,.85);
	animation: shakabotBirthParticle var(--shakabot-morph-duration,5600ms) cubic-bezier(.13,.72,.16,1) var(--md,0s) both;
}

@keyframes shakabotBirthStage {
	0%,14% { transform: scale(1) rotate(0); filter: drop-shadow(0 8px 14px rgba(0,0,0,.48)); }
	17% { transform: scale(.92) rotate(-2deg); filter: drop-shadow(0 0 10px rgba(255,107,32,.75)); }
	25% { transform: scale(1.04) rotate(1.4deg); filter: drop-shadow(0 0 24px rgba(255,107,32,.92)); }
	76% { transform: translateY(0) scale(1) rotate(-1deg); }
	87% { transform: translateY(-5px) scale(1.04) rotate(1deg); }
	94% { transform: translateY(2px) scale(.98) rotate(-.5deg); }
	100% { transform: translateY(0) scale(1) rotate(0); }
}
@keyframes shakabotBirthLogo {
	0%,14% { opacity: 1; transform: scale(var(--shakabot-logo-scale,.55)) rotate(0); filter: brightness(1); }
	18% { opacity: 1; transform: scale(var(--shakabot-logo-scale,.55)) scale(.88) rotate(-2deg); filter: brightness(2.1) sepia(.35) saturate(2); }
	23% { opacity: .55; transform: scale(var(--shakabot-logo-scale,.55)) scale(1.08) rotate(2deg); filter: brightness(3) blur(.5px); }
	30%,100% { opacity: 0; transform: scale(var(--shakabot-logo-scale,.55)) scale(.45) rotate(7deg); filter: brightness(3) blur(2px); }
}
@keyframes shakabotBirthFragment {
	0%,13% { opacity: 0; transform: scale(var(--shakabot-logo-scale,.55)) translate3d(0,0,0) rotate(0); }
	16% { opacity: 1; }
	24% { opacity: .94; transform: scale(.78) translate3d(var(--mfx),var(--mfy),0) rotate(var(--mfr)); }
	31%,100% { opacity: 0; transform: scale(.34) translate3d(var(--mfx),var(--mfy),0) rotate(var(--mfr)); }
}
@keyframes shakabotBirthChassis {
	0%,20% { opacity: 0; transform: scale(.18) rotate(-8deg); filter: brightness(2); }
	29% { opacity: .85; transform: scale(.68) rotate(4deg); filter: brightness(1.55); }
	39% { opacity: 1; transform: scale(1.06) rotate(-1.5deg); filter: brightness(1.08); }
	46%,100% { opacity: 1; transform: scale(1) rotate(0); filter: brightness(1); }
}
@keyframes shakabotBirthFacePanel {
	0%,36% { opacity: 0; transform: translateY(-18%) scale(.55); filter: brightness(2); }
	44% { opacity: 1; transform: translateY(3%) scale(1.06); }
	49%,100% { opacity: 1; transform: translateY(0) scale(1); filter: brightness(1); }
}
@keyframes shakabotBirthFaceLife {
	0%,40% { opacity: 0; }
	43%,91% { opacity: 1; }
	96%,100% { opacity: 0; }
}
@keyframes shakabotBirthEyes {
	0%,43% { transform: scaleY(0); opacity: 0; }
	45% { transform: scaleY(1); opacity: 1; }
	47% { transform: scaleY(.08); opacity: 1; }
	49%,53% { transform: scaleY(1); opacity: 1; }
	54% { transform: scaleY(.08); }
	56%,100% { transform: scaleY(1); opacity: 1; }
}
@keyframes shakabotBirthSmile {
	0%,49% { opacity: 0; transform: scaleX(.15) scaleY(.2); }
	56% { opacity: 1; transform: scaleX(1.14) scaleY(1.3); }
	60%,100% { opacity: 1; transform: scale(1); }
}
@keyframes shakabotBirthLeftArm {
	0%,54% { opacity: 0; transform: translate3d(28%,-5%,0) rotate(48deg) scale(.28); }
	60% { opacity: 1; transform: translate3d(12%,-3%,0) rotate(24deg) scale(.72); }
	68% { transform: translate3d(-4%,-4%,0) rotate(-13deg) scale(1.06); }
	75% { transform: translate3d(2%,1%,0) rotate(6deg) scale(.98); }
	82%,100% { opacity: 1; transform: translate3d(0,0,0) rotate(0) scale(1); }
}
@keyframes shakabotBirthRightArm {
	0%,56% { opacity: 0; transform: translate3d(-29%,-7%,0) rotate(-52deg) scale(.25); }
	62% { opacity: 1; transform: translate3d(-13%,-4%,0) rotate(-27deg) scale(.68); }
	69% { transform: translate3d(5%,-4%,0) rotate(15deg) scale(1.07); }
	76% { transform: translate3d(-2%,1%,0) rotate(-7deg) scale(.98); }
	82%,100% { opacity: 1; transform: translate3d(0,0,0) rotate(0) scale(1); }
}
@keyframes shakabotBirthReactors {
	0%,72% { opacity: 0; transform: translateY(-14%) scaleY(.3); }
	78% { opacity: 1; transform: translateY(3%) scaleY(1.13); }
	83%,100% { opacity: 1; transform: translateY(0) scaleY(1); }
}
@keyframes shakabotBirthIgnition {
	0%,77% { opacity: 0; transform: scaleY(.1); }
	80% { opacity: 1; transform: scaleY(.42); }
	86%,100% { opacity: 1; transform: scaleY(1); }
}
@keyframes shakabotBirthFlame { from { transform: scaleX(.7) scaleY(.68); } to { transform: scaleX(1.15) scaleY(1.18); } }
@keyframes shakabotBirthComplete {
	0%,89% { opacity: 0; }
	94%,100% { opacity: 1; }
}
@keyframes shakabotBirthCore {
	0%,13% { opacity: 0; transform: scale(.2); }
	18% { opacity: 1; transform: scale(.72); }
	24% { opacity: .82; transform: scale(3.2); }
	31%,100% { opacity: 0; transform: scale(4.2); }
}
@keyframes shakabotBirthScan {
	0%,21% { opacity: 0; transform: translateY(0); }
	26% { opacity: 1; }
	41% { opacity: .75; transform: translateY(92px); }
	46%,100% { opacity: 0; transform: translateY(108px); }
}
@keyframes shakabotBirthParticle {
	0%,13% { opacity: 0; transform: translate3d(0,0,0) rotate(0) scale(.2); }
	17% { opacity: 1; }
	25% { opacity: .92; }
	33%,100% { opacity: 0; transform: translate3d(var(--mx),var(--my),0) rotate(var(--mr)) scale(1); }
}

/* La version courte compresse le même scénario, elle ne le remplace pas. */
#shka-root.shakabot-morphing-quick .shakabot-birth-face,
#shka-root.shakabot-morphing-quick .shakabot-birth-thrusters { animation-timing-function: linear; }

/* ============================================================
   SORTIE DU LOGO DU HEADER
   ============================================================ */

#shka-root.shakabot-intro-flight .shka-flight-mascot,
#shka-root.shakabot-intro-quick .shka-flight-mascot {
	display: block !important;
	position: fixed !important;
	left: 0 !important;
	top: 0 !important;
	right: auto !important;
	bottom: auto !important;
	width: 148px !important;
	height: 148px !important;
	z-index: 999998 !important;
	opacity: 1;
	visibility: visible !important;
	pointer-events: none;
	will-change: transform, opacity, filter;
}

.shakabot-flight-pose {
	display: none;
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: contain !important;
	pointer-events: none;
}
#shka-root.shakabot-intro-flight .shakabot-flight-base,
#shka-root.shakabot-intro-quick .shakabot-flight-base {
	opacity: 0 !important;
}
#shka-root.shakabot-intro-flight .shakabot-flight-pose,
#shka-root.shakabot-intro-quick .shakabot-flight-pose {
	display: block;
}
#shka-root.shakabot-intro-flight .shka-flight-mascot .shakabot-live-face,
#shka-root.shakabot-intro-quick .shka-flight-mascot .shakabot-live-face {
	opacity: 0 !important;
}

#shka-root:not(.shakabot-motion-js-flight).shakabot-intro-flight .shka-flight-mascot {
	animation: shakabotIntroFallback 2.18s cubic-bezier(.34,.02,.2,1) both !important;
}
#shka-root:not(.shakabot-motion-js-flight).shakabot-intro-quick .shka-flight-mascot {
	animation: shakabotIntroFallback 1.18s cubic-bezier(.34,.02,.2,1) both !important;
}
@keyframes shakabotIntroFallback {
	0%   { opacity: 0; transform: translate3d(var(--shakabot-intro-start-left,22px),var(--shakabot-intro-start-top,22px),0) scale(.14) rotate(-10deg); }
	18%  { opacity: 1; }
	70%  { transform: translate3d(calc(72vw - 74px),calc(52vh - 74px),0) scale(.88) rotate(10deg); }
	100% { opacity: 1; transform: translate3d(var(--shakabot-intro-end-left,calc(100vw - 172px)),var(--shakabot-intro-end-top,calc(100vh - 172px)),0) scale(1) rotate(0); }
}

.shakabot-logo-origin {
	animation: shakabotLogoRelease .72s cubic-bezier(.2,.8,.2,1) both !important;
}
@keyframes shakabotLogoRelease {
	0%,100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255,107,44,0)); }
	38%     { transform: scale(.9); filter: drop-shadow(0 0 13px rgba(255,107,44,.85)); }
	68%     { transform: scale(1.06); filter: drop-shadow(0 0 7px rgba(255,107,44,.45)); }
}

#shka-root.shakabot-intro-flight .shka-thruster-glow,
#shka-root.shakabot-intro-quick .shka-thruster-glow {
	opacity: 1 !important;
	animation: shakabotThrusterBoost .15s ease-in-out infinite alternate !important;
}
#shka-root.shakabot-intro-flight .shka-flight-mascot::after,
#shka-root.shakabot-intro-quick .shka-flight-mascot::after {
	opacity: .72;
	animation: shakabotTrail .2s ease-in-out infinite alternate;
}

#shka-root.shakabot-intro-land #shka-toggle .shka-mascot {
	animation: shakabotIntroLand .52s cubic-bezier(.32,1.5,.57,1) both !important;
}
@keyframes shakabotIntroLand {
	0%   { opacity: 0; transform: translate3d(-4px,-22px,0) scale(1.12) rotate(-4deg); }
	58%  { opacity: 1; transform: translate3d(1px,3px,0) scale(.97) rotate(2deg); }
	100% { opacity: 1; transform: translate3d(0,0,0) scale(1) rotate(0); }
}

#shka-root.shakabot-intro-talk #shka-toggle .shka-mascot {
	animation: shakabotIntroTalkBody .82s ease-in-out infinite !important;
}
@keyframes shakabotIntroTalkBody {
	0%,100% { transform: translate3d(0,0,0) rotate(-.7deg); }
	50%     { transform: translate3d(-1px,-3px,0) rotate(.9deg); }
}

/* ============================================================
   GESTES ENTIERS — vrais changements de pose, sans bras déformés
   ============================================================ */
.shakabot-gesture-pose,
.shakabot-thinking-pose {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: contain !important;
	opacity: 0;
	pointer-events: none;
	z-index: 5;
	transform: none !important;
	animation: none !important;
}
.shakabot-thinking-pose { display: none; }

/* Petit salut occasionnel au repos : discret, mais les bras ne restent plus
   figés indéfiniment. */
#shka-root:not(.is-open):not(.shakabot-morphing):not(.shakabot-intro-flight):not(.shakabot-intro-quick):not(.shakabot-intro-land):not(.shakabot-intro-talk) #shka-toggle .shakabot-pose-base,
#shka-root:not(.is-open):not(.shakabot-morphing):not(.shakabot-intro-flight):not(.shakabot-intro-quick):not(.shakabot-intro-land):not(.shakabot-intro-talk) #shka-toggle .shakabot-live-face {
	animation: shakabotIdleBase 12s steps(1,end) infinite !important;
}
#shka-root:not(.is-open):not(.shakabot-morphing):not(.shakabot-intro-flight):not(.shakabot-intro-quick):not(.shakabot-intro-land):not(.shakabot-intro-talk) #shka-toggle .shakabot-gesture-1 {
	animation: shakabotIdleNeutral 12s steps(1,end) infinite !important;
}
#shka-root:not(.is-open):not(.shakabot-morphing):not(.shakabot-intro-flight):not(.shakabot-intro-quick):not(.shakabot-intro-land):not(.shakabot-intro-talk) #shka-toggle .shakabot-gesture-2 {
	animation: shakabotIdleSalute 12s steps(1,end) infinite !important;
}
@keyframes shakabotIdleBase {
	0%,78%,92%,100% { opacity: 1; }
	79%,91% { opacity: 0; }
}
@keyframes shakabotIdleNeutral {
	0%,78%,82%,88%,92%,100% { opacity: 0; }
	79%,81%,89%,91% { opacity: 1; }
}
@keyframes shakabotIdleSalute {
	0%,81%,89%,100% { opacity: 0; }
	82%,88% { opacity: 1; }
}

/* Quand le texte s'écrit, le bras monte vers le visage puis redescend. La
   bouche animée reste visible pendant la majeure partie du cycle. */
#shka-root.is-speaking .shka-header-mascot .shakabot-pose-base,
#shka-root.is-speaking .shka-header-mascot .shakabot-live-face {
	animation: shakabotSpeakBase 1.65s steps(1,end) infinite !important;
}
#shka-root.is-speaking .shka-header-mascot .shakabot-gesture-1 {
	animation: shakabotSpeakNeutral 1.65s steps(1,end) infinite !important;
}
#shka-root.is-speaking .shka-header-mascot .shakabot-gesture-2 {
	animation: shakabotSpeakHand 1.65s steps(1,end) infinite !important;
}
#shka-root.is-speaking .shka-header-mascot .shakabot-gesture-3 {
	animation: shakabotSpeakEye 1.65s steps(1,end) infinite !important;
}

#shka-root.shakabot-intro-talk #shka-toggle .shakabot-pose-base,
#shka-root.shakabot-intro-talk #shka-toggle .shakabot-live-face {
	animation: shakabotSpeakBase 2.1s steps(1,end) infinite !important;
}
#shka-root.shakabot-intro-talk #shka-toggle .shakabot-gesture-1 {
	animation: shakabotSpeakNeutral 2.1s steps(1,end) infinite !important;
}
#shka-root.shakabot-intro-talk #shka-toggle .shakabot-gesture-2 {
	animation: shakabotSpeakHand 2.1s steps(1,end) infinite !important;
}
#shka-root.shakabot-intro-talk #shka-toggle .shakabot-gesture-3 {
	animation: shakabotSpeakEye 2.1s steps(1,end) infinite !important;
}
@keyframes shakabotSpeakBase {
	0%,22%,76%,100% { opacity: 1; }
	23%,75% { opacity: 0; }
}
@keyframes shakabotSpeakNeutral {
	0%,22%,34%,65%,77%,100% { opacity: 0; }
	23%,33%,66%,76% { opacity: 1; }
}
@keyframes shakabotSpeakHand {
	0%,33%,49%,100% { opacity: 0; }
	34%,48% { opacity: 1; }
}
@keyframes shakabotSpeakEye {
	0%,48%,66%,100% { opacity: 0; }
	49%,65% { opacity: 1; }
}

.shakabot-intro-message {
	position: absolute;
	right: 118px;
	bottom: 110px;
	width: max-content;
	max-width: min(275px, calc(100vw - 140px));
	padding: 11px 15px;
	border: 1px solid rgba(255,112,37,.5);
	border-radius: 15px 15px 4px 15px;
	background: rgba(16,16,18,.95);
	color: #fff;
	box-shadow: 0 12px 35px rgba(0,0,0,.3), 0 0 20px rgba(255,99,28,.12);
	font: 600 13px/1.35 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
	letter-spacing: .01em;
	opacity: 0;
	visibility: hidden;
	transform: translate3d(10px,7px,0) scale(.9);
	transform-origin: 100% 100%;
	transition: opacity .22s ease, transform .36s cubic-bezier(.34,1.56,.64,1), visibility .22s;
	pointer-events: none;
	z-index: 999999;
}
.shakabot-intro-message::after {
	content: '';
	position: absolute;
	right: -7px;
	bottom: 8px;
	width: 13px;
	height: 13px;
	border-right: 1px solid rgba(255,112,37,.5);
	border-bottom: 1px solid rgba(255,112,37,.5);
	background: rgba(16,16,18,.95);
	transform: rotate(-45deg);
}
#shka-root.shakabot-intro-talk .shakabot-intro-message {
	opacity: 1;
	visibility: visible;
	transform: translate3d(0,0,0) scale(1);
}

/* Après l'accueil, la bulle reste présente tant que le panneau est fermé. */
#shka-root:not(.is-open):not(.shakabot-morphing):not(.shakabot-intro-flight):not(.shakabot-intro-quick):not(.shakabot-intro-land) .shakabot-intro-message {
	opacity: 1;
	visibility: visible;
	transform: translate3d(0,0,0) scale(1);
}

/* ============================================================
   VISAGE VIVANT — coordonnées du PNG original 1024 × 1024
   ============================================================ */
.shakabot-live-face {
	position: absolute;
	inset: 0;
	z-index: 6;
	pointer-events: none;
}
.shakabot-eye,
.shakabot-mouth {
	position: absolute;
	display: block;
	overflow: hidden;
	background: radial-gradient(ellipse at 50% 55%, #583b34 0%, #432f2c 58%, #241e1d 100%);
	box-shadow: 0 0 2px rgba(18,12,10,.8) inset;
}
.shakabot-eye {
	top: 36.08%;
	width: 3.35%;
	height: 4.45%;
	border-radius: 48%;
}
.shakabot-eye-left  { left: 54.55%; }
.shakabot-eye-right { left: 62.38%; }
.shakabot-eye i {
	position: absolute;
	left: 22%;
	top: 7%;
	width: 56%;
	height: 86%;
	display: block;
	border-radius: 50%;
	background: linear-gradient(90deg, #ff8d28, #fff0a8 48%, #ff6b18);
	box-shadow: 0 0 5px #ff6b18, 0 0 10px rgba(255,104,24,.82);
	transform-origin: 50% 50%;
	animation: shakabotBlink 5.4s infinite;
}
.shakabot-eye-right i { animation-delay: .03s; }

.shakabot-mouth {
	left: 56.85%;
	top: 41.35%;
	width: 6.55%;
	height: 3.05%;
	border-radius: 48%;
}
.shakabot-mouth i {
	position: absolute;
	left: 14%;
	top: 43%;
	width: 72%;
	height: 16%;
	display: block;
	border-radius: 0 0 999px 999px;
	background: #ff8a24;
	box-shadow: 0 0 4px #ff6b18, 0 0 8px rgba(255,104,24,.7);
	transform-origin: 50% 18%;
}

@keyframes shakabotBlink {
	0%,43%,47%,100% { transform: scaleY(1); }
	44.5%,45.5%     { transform: scaleY(.07); }
}

#shka-root.is-thinking .shakabot-eye i,
#shka-root.is-uploading .shakabot-eye i {
	animation: shakabotLookAround 1.35s ease-in-out infinite alternate;
}
@keyframes shakabotLookAround {
	0%   { transform: translateX(-15%) scaleY(.94); }
	48%  { transform: translateX(6%) scaleY(1); }
	100% { transform: translateX(17%) scaleY(.86); }
}

#shka-root.is-speaking .shka-header-mascot .shakabot-mouth i,
#shka-root.shakabot-intro-talk #shka-toggle .shakabot-mouth i {
	left: 16%;
	top: 13%;
	width: 68%;
	height: 72%;
	border-radius: 46% 46% 54% 54%;
	background: radial-gradient(ellipse at 50% 72%, #ffd38f 0 13%, #ff7b20 30%, #5b1711 74%);
	box-shadow: 0 0 5px #ff6b18, 0 0 10px rgba(255,104,24,.72);
	animation: shakabotTalk .21s steps(2,end) infinite;
}
#shka-root.is-speaking .shka-header-mascot .shakabot-eye i,
#shka-root.shakabot-intro-talk #shka-toggle .shakabot-eye i {
	animation: shakabotTalkEyes 2.8s ease-in-out infinite;
}
@keyframes shakabotTalk {
	0%   { transform: scaleX(.82) scaleY(.22); }
	33%  { transform: scaleX(1) scaleY(1); }
	66%  { transform: scaleX(.72) scaleY(.58); }
	100% { transform: scaleX(.94) scaleY(.3); }
}
@keyframes shakabotTalkEyes {
	0%,31%,35%,68%,72%,100% { transform: translateX(0) scaleY(1); }
	33%,70%                  { transform: translateX(0) scaleY(.08); }
	52%                       { transform: translateX(13%) scaleY(.9); }
}

/* La parole reste dans le header du chat : aucune grande pose ne couvre le site. */
#shka-root.is-speaking .shka-flight-mascot {
	display: none !important;
}
#shka-root.is-speaking .shka-header-mascot {
	opacity: 1 !important;
	transform-origin: 50% 65%;
	z-index: 8;
	animation: shakabotHeaderTalkBody .72s ease-in-out infinite;
}
@keyframes shakabotHeaderTalkBody {
	0%,100% { transform: translate3d(4px,1px,0) scale(1.38) rotate(-1deg); }
	50%     { transform: translate3d(4px,-2px,0) scale(1.4) rotate(1.1deg); }
}

/* ============================================================
   RÉFLEXION — petite orbite près du chat, jamais plein écran
   ============================================================ */
#shka-root.is-open.is-thinking .shka-flight-mascot,
#shka-root.is-open.is-uploading .shka-flight-mascot {
	display: block !important;
	position: fixed !important;
	left: var(--shakabot-local-left, calc(100vw - 552px)) !important;
	top: var(--shakabot-local-top, 70px) !important;
	right: auto !important;
	bottom: auto !important;
	width: 148px !important;
	height: 148px !important;
	z-index: 999998 !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: none;
	will-change: transform, opacity, filter;
}
#shka-root.is-thinking .shka-flight-mascot .shakabot-flight-base,
#shka-root.is-uploading .shka-flight-mascot .shakabot-flight-base,
#shka-root.is-thinking .shka-flight-mascot .shakabot-flight-pose,
#shka-root.is-uploading .shka-flight-mascot .shakabot-flight-pose,
#shka-root.is-thinking .shka-flight-mascot .shakabot-live-face,
#shka-root.is-uploading .shka-flight-mascot .shakabot-live-face {
	opacity: 0 !important;
}
#shka-root.is-thinking .shka-flight-mascot .shakabot-thinking-pose,
#shka-root.is-uploading .shka-flight-mascot .shakabot-thinking-pose {
	display: block;
	opacity: 1 !important;
	animation: shakabotThinkingPose 1.8s ease-in-out infinite !important;
}
@keyframes shakabotThinkingPose {
	0%,100% { opacity: .95; filter: brightness(.98); }
	50% { opacity: 1; filter: brightness(1.08); }
}
#shka-root.shakabot-motion-js-flight.is-open.is-thinking .shka-flight-mascot,
#shka-root.shakabot-motion-js-flight.is-open.is-uploading .shka-flight-mascot {
	left: 0 !important;
	top: 0 !important;
	animation: none !important;
}
#shka-root:not(.shakabot-motion-js-flight).is-open.is-thinking .shka-flight-mascot,
#shka-root:not(.shakabot-motion-js-flight).is-open.is-uploading .shka-flight-mascot {
	animation: shakabotLocalHover 2.2s ease-in-out infinite !important;
}
@keyframes shakabotLocalHover {
	0%,100% { transform: translate3d(-4px,0,0) rotate(-1.5deg); }
	50%     { transform: translate3d(7px,-8px,0) rotate(1.7deg); }
}

#shka-root.is-thinking .shka-thruster-glow,
#shka-root.is-uploading .shka-thruster-glow,
#shka-root.shakabot-intro-flight .shka-thruster-glow,
#shka-root.shakabot-intro-quick .shka-thruster-glow {
	opacity: 1;
	animation: shakabotThrusterBoost .18s ease-in-out infinite alternate;
}
.shka-flight-mascot::after {
	content: '';
	position: absolute;
	left: 35%;
	bottom: -2%;
	width: 30%;
	height: 17%;
	border-radius: 50%;
	background: radial-gradient(ellipse, rgba(255,230,166,.62), rgba(255,91,20,.25) 42%, transparent 72%);
	filter: blur(5px);
	opacity: 0;
	z-index: 0;
}
#shka-root.is-thinking .shka-flight-mascot::after,
#shka-root.is-uploading .shka-flight-mascot::after {
	opacity: .58;
	animation: shakabotTrail .28s ease-in-out infinite alternate;
}
@keyframes shakabotThrusterBoost {
	from { transform: scaleX(.76) scaleY(.72); filter: blur(2px); }
	to   { transform: scaleX(1.14) scaleY(1.28); filter: blur(4px); }
}
@keyframes shakabotTrail {
	from { transform: translateY(-1px) scale(.76); }
	to   { transform: translateY(4px) scale(1.08); }
}

.shakabot-message-writing::after {
	content: '▌';
	display: inline-block;
	margin-left: 2px;
	color: var(--shka-accent, #ff6b2c);
	font-weight: 400;
	animation: shakabotCaret .62s steps(1,end) infinite;
}
@keyframes shakabotCaret { 50% { opacity: 0; } }

@media (max-width: 640px) {
	#shka-root #shka-toggle {
		width: 124px;
		height: 124px;
	}
	#shka-root.shakabot-intro-flight .shka-flight-mascot,
	#shka-root.shakabot-intro-quick .shka-flight-mascot {
		width: 124px !important;
		height: 124px !important;
	}
	.shakabot-intro-message {
		right: 94px;
		bottom: 94px;
		max-width: min(230px, calc(100vw - 112px));
		padding: 10px 13px;
		font-size: 12px;
	}
	#shka-root.is-open.is-thinking .shka-flight-mascot,
	#shka-root.is-open.is-uploading .shka-flight-mascot {
		width: 104px !important;
		height: 104px !important;
	}
	@keyframes shakabotHeaderTalkBody {
		0%,100% { transform: translate3d(5px,2px,0) scale(1.45) rotate(-1deg); }
		50%     { transform: translate3d(5px,-1px,0) scale(1.47) rotate(1.1deg); }
	}
}

@media (prefers-reduced-motion: reduce) {
	.shakabot-live-face *,
	.shakabot-pose-base,
	.shakabot-gesture-pose,
	.shakabot-thinking-pose,
	.shakabot-message-writing::after,
	.shakabot-logo-origin {
		animation: none !important;
	}
	.shakabot-gesture-pose { opacity: 0 !important; }
}
