We were in Morocco last May.
We spent 2 nights in Rabat, 4 nights in Fez, and 5 nights in Marrakech.
In Fez we stayed at Dar Fes Medina--not exactly in the medina but not so far away. At one of the tobacco shops we bought a map/ guidebook titled "Fes Guide--The Thematic Tourist Circuits" which was money well spent (about 10 Euro). We liked the medina in Fes better than the one in Marrakech.
Five days in Marrakech was too many for us--2 or 3 would have been plenty. We stayed in Riad Dar Najat--it was a short walk to the medina from there. We'd recommend a visit to Majorelle Gardens. One of our favorite restaurant meals in Marrakech was Italian--Pepe Nero--we were able to have wine with dinner there--not available at every restaurant.
We liked Rabat a lot but not everyone does--we loved our stay at Riad Dar Marhaba.
We did take a half-day trip to the Atlas Mountains but the temperature was 106 degrees so it wasn't our favorite memory. We did not take a trip to the desert.
Especially in Fes and Marrakech try to find a co-op to get an idea of fair prices for goods--bargining in the medina can be a fun challenge--knowing a baseline/reasonable price is helpful.
We took the train between Fez and Marrakech and had a driver from the hotel meet us at the train station in both cases.
Wish we had gone to Essaouira and Chefchaourn.
Have a great time in Morocco! It's an exciting destination!