Dress for the heat and avoid anything too 'out there' that may attract attention. In the evening, linen trousers or chinos with closed shoes work well, as well as a jacket or blazer for the cooler weather. Make sure to pack a few jumpers if you're visiting Marrakech in the cooler seasons.