I have had overnight and full day layovers in Casablanca while en route to Senegal from the US. The train is pretty direct, but does involve a transfer if going to the main downtown station. There's not a ton to see-it's more a business city I think than touristy. The world's second largest mosque is there, right on the Atlantic, which was pretty cool though. 5 hours may be cutting it a little close though...I didn't experience any long lines though.