Thank you, Ruben.
I have good and bad news.
I edited the code using Cursor AI Code Editor and the animation in Chapter 1 works. It was a matter of finding the right dimensions for the container and the cards.
I then created a new animation for Chapter 2 using Cursor, but somehow the functions of the two chapters got mixed and I had to stop.
The animation in Chapter 2 is click-based and the first card appears on the reverse side. When clicked, the card turns, the corresponding text appears and the next card appears on the reverse side. The animation goes on and on in this same way.
I could use just one animation, but it is too much fun to experiment with the EPUB3 format.