We did a 24h stop in Morrocan capital Rabat on our way to Casablanca. We've experienced the train between Fès and Rabat, which works fine and is very similar to French trains. The city is way less touristy than Marrakech and Fès and seems to be more modern than what we saw in our trip in Morroco so far. Located on the sea shore, the old part of Rabat is a fortified place (Kasbah), where the bottom part of the walls is painted in blue, to keep mosqitos away!