Thanks m_c, Lee !

Looks complicated, but I was looking for a challenge... So here is one ! ;-)