The ballot box is made of transparent plastic (something like [1]), and you don't slide the envelope in it yourself. The slot is blocked until an official pulls a lever to let it go through.
So you put the envelope by the slot, if you keep holding it you will be asked you to let it go (so you can't cleverly hold multiple of them while it looks like one). They'll check again who you are and if you can actually vote and so on. If all is good, an official will pull the lever.
[1] https://www.jpg.fr/content/images/product/09812-00J_1_xnl.jp...