Below us lay a sea of terra-cotta and ruby roofs , interrupted only by the gap of a courtyard , a towering palm tree or a glistening mosque , with the outline of the Atlas Mountains framing the horizon .