/* Apparences animées de l'assistant (source : avatars_src.py). États : st-repos, st-ecoute, st-reflexion, st-parole. */
.av-stage { position: relative; width: 100%; height: 100%; }
.av-eve { display: block; width: 100%; height: 100%; border-radius: 18%; background: radial-gradient(120% 90% at 50% 30%, #16232f, #0d1620); }
.av { width: 100%; height: 100%; overflow: visible; display: block; }
.av * { transform-box: fill-box; transform-origin: center; }
.av-body { animation: av-breathe 4.2s ease-in-out infinite; }
.av-eye { animation: av-blink 5.2s infinite; }
.av-ring { opacity: 0; }
.av-dots { opacity: 0; }
.av-dots circle { animation: av-dot 1.2s ease-in-out infinite; }
.av-dots circle:nth-child(2) { animation-delay: .2s; } .av-dots circle:nth-child(3) { animation-delay: .4s; }
.av-pearls { opacity: 0; }
.av-wave-a { animation: av-wave 3.6s ease-in-out infinite; }
.av-wave-b { animation: av-wave 3.6s ease-in-out infinite reverse; }
.av-antenna { animation: av-glow 3s ease-in-out infinite; }

.st-ecoute .av-ring { animation: av-ring 1.4s ease-out infinite; }
.st-ecoute .av-eye { animation: none; transform: scale(1.12); }
.st-ecoute .av-ear-l { animation: av-ear-l .9s ease-in-out infinite alternate; }
.st-ecoute .av-ear-r { animation: av-ear-r .9s ease-in-out infinite alternate; }
.st-ecoute .av-brows { transform: translateY(-4px); }
.st-ecoute .av-wave-a, .st-ecoute .av-wave-b { animation-duration: 1.4s; }
.st-ecoute .av-antenna { animation-duration: .7s; }

.st-reflexion .av-dots { opacity: 1; }
.st-reflexion .av-eyes { animation: av-look 2s ease-in-out infinite; }
.st-reflexion .av-wave { opacity: 0; transition: opacity .3s; }
.st-reflexion .av-pearls { opacity: 1; }
.st-reflexion .av-pearls circle { animation: av-dot 1s ease-in-out infinite; }
.st-reflexion .av-pearls circle:nth-child(2) { animation-delay: .15s; } .st-reflexion .av-pearls circle:nth-child(3) { animation-delay: .3s; }

.st-parole .av-mouth { animation: av-talk .26s ease-in-out infinite alternate; }
.st-parole .av-wave-a { animation: av-speak .32s ease-in-out infinite alternate; }
.st-parole .av-wave-b { animation: av-speak .41s ease-in-out infinite alternate-reverse; }
.st-parole .av-body { animation-duration: 1.6s; }

/* Image téléversée par l'utilisateur */
.av-photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; animation: av-breathe 4.2s ease-in-out infinite; box-shadow: 0 0 0 4px #FFFFFF, 0 6px 20px rgba(20,32,27,.18); }
.av-photo-ring { position: absolute; inset: -6%; border-radius: 50%; border: 3px solid #0F6E5C; opacity: 0; pointer-events: none; }
.st-ecoute .av-photo-ring { animation: av-ring 1.4s ease-out infinite; }
.st-parole .av-photo { animation: av-pulse .3s ease-in-out infinite alternate; }
.st-reflexion .av-photo { animation: av-tilt 2s ease-in-out infinite; }

@keyframes av-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3%); } }
@keyframes av-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes av-ring { 0% { transform: scale(.86); opacity: .75; } 100% { transform: scale(1.14); opacity: 0; } }
@keyframes av-dot { 0%, 100% { transform: translateY(0); opacity: .35; } 50% { transform: translateY(-30%); opacity: 1; } }
@keyframes av-look { 0%, 100% { transform: translateX(-8%); } 50% { transform: translateX(8%); } }
@keyframes av-talk { from { transform: scale(.9, .5); } to { transform: scale(1.1, 2.6); } }
@keyframes av-wave { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
@keyframes av-speak { from { transform: scaleY(.3); } to { transform: scaleY(1.7); } }
@keyframes av-glow { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes av-ear-l { from { transform: rotate(0); } to { transform: rotate(-9deg); } }
@keyframes av-ear-r { from { transform: rotate(0); } to { transform: rotate(9deg); } }
@keyframes av-pulse { from { transform: scale(1); } to { transform: scale(1.045); } }
@keyframes av-tilt { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .av *, .av-photo, .av-photo-ring { animation: none !important; } .st-reflexion .av-dots, .st-reflexion .av-pearls { opacity: 1; } }
