1 Introduction

The courtyard housing embodies a remarkable instance and wellspring of blending indigenous architectural customs with modern techniques yielding a form of architecture that is both humane and sustainable. Originating from Neolithic settlements, the courtyard plan initially served as a protective space against external threats, be they human or wild animals.

In Morocco, the courtyard house has been influenced by three main factors: social, environmental, and cultural factors. While each factor contributes uniquely, they collectively form a network of evolutionary forces shaping the courtyard house. Recognized as a climatic moderator in hot and dry climates, the courtyard’s impact extends to various architectural and construction elements. Yet, many architectural features find explanation in socio-cultural conditions. In regions deeply rooted in tradition and religious beliefs, socio-cultural variables such as religion, culture, and customs play a crucial role in determining architectural and spatial arrangements.

The main challenge lies in applying gathered insights to develop a new generation of modern courtyard houses that align with contemporary needs and changing lifestyles. This research paper explores the characteristics, evolution, and variation of courtyard houses in Morocco. Its objective is to advocate for the courtyard house concept by delving deeply into its social, cultural, and environmental roles. By comprehending its historical impact on built forms and recognizing its potential relevance in the future, the paper aims to underscore the enduring significance of the courtyard house in the evolving architectural landscape.

2 Methodology

The methodological framework of this research involves a comprehensive understanding of the environmental and socio-cultural factors influencing Moroccan housing dynamics over time, tracking the transition from traditional courtyard houses to contemporary typologies in Morocco. This research primarily relies on qualitative methods, based upon the analysis of secondary data collected from diverse sources, alongside case studies examining various courtyard house typologies in Morocco in different climatic regions. It also provides valuable insights from modern transformation of courtyard housing examples from different countries in the Arab and East-Asian regions to provide evidence of the adaptability and applicability of the courtyard housing model in diverse climate and socio-cultural contexts.

3 Historic use of courtyards

Courtyard housing, tracing its origins to the Neolithic Yarmukian site between 6400 and 6000 BC, boasts a fascinating global evolution. Emerging with a distinctive layout of a central courtyard surrounded by rooms, this architectural style took monumental form in constructions like the Court of Lions in Andalusia during later periods. Beyond mere shelter, courtyards became multifunctional spaces, accommodating various activities such as cooking, sleeping, work, play, gardening, and even animal keeping (Fig. 1).

Fig. 1
figure 1

(Source: https://projects.mcah.columbia.edu/medieval-architecture/htm/dj_islam/ma_dj_image_alh_plan01.htm)

Old court of Lions in Spain—Andalusia

The historical trajectory of courtyard houses witnessed adaptations and innovations, with small openings expanding over time to create centralized open spaces. Notable examples, like the Court of Lions in Andalusia, underscore the enduring allure of these architectural marvels. Such designs proliferated across regions and eras, finding expression in ancient China and Iran around 3000 BC. Courtyard houses, though initially associated with hot and temperate climates, demonstrated adaptability by enduring even in harsher environmental conditions. Throughout history, Courtyards have been versatile spaces accommodating cooking, sleeping, work, play, gardening, and even serving as areas for keeping animals. These dynamic outdoor areas reflect the adaptability of courtyards across different cultures and time periods, playing integral roles in various aspects of daily life.Footnote 1

Throughout history, courtyard housing has manifested in diverse forms, from Ancient Roman atrium-centered structures to unique interpretations in the Middle East, Latin America, China, Korea, and Europe.Footnote 2 Despite a historical decline in usage, there’s been a contemporary resurgence of interest in courtyard houses. This revival reflects a recognition of their potential to address challenges in dense urban housing, offering solutions aligned with modern living preferences. The enduring appeal of courtyard housing lies in its ability to provide not just shelter but also a harmonious blend of airiness, light, privacy, security, and tranquility, making it a relevant and valuable architectural concept in the evolving landscape of urban living.

4 Modern courtyard archetypes

Modern courtyard archetypes embody a recurring theme where the courtyard serves as an introspective backdrop for daily life, a distinctive element that resonates across diverse cultures and interpretations. In contemporary architecture, the concept of the courtyard is closely intertwined with a series of design approaches, each containing a component that harks back to the archetype of the traditional courtyard house. This connection reflects a deliberate effort to integrate the timeless essence of courtyard living into modern architectural paradigms. The architectural evolution not only pays homage to the historical significance of courtyards but also seeks to reinterpret and adapt this timeless concept to meet the demands of today’s lifestyles (Table 1).

Table 1 Different shapes and characteristics of modern courts

5 The environmental dimension

The evolution of the courtyard primarily emerged as a reaction to climatic requirements. Over numerous ages and up to the contemporary era, the courtyard has remained one of the quintessential configurations of housing architecture in hot climates. Inhabitants of such regions utilized the courtyard to gather cool breezes during the night and provide shelter from the sun during the day [11].Footnote 3 Courtyards are usually the heart of the dwelling spatially, socially, and environmentally.

5.1 The central courtyard as a thermal moderator

The courtyard layout operates in varied ways across diverse climates. The courtyard housing style is inherently well adapted to hot environments because it maximizes shading and allows for the creation of a pleasant microclimate.Footnote 4 Integrating plants and water features within the courtyard not only enhances comfort and aesthetics but also contributes to cooling adjacent spaces and increasing internal humidity. This building typology enhances the comfort levels of its immediate surroundings and commonly seen as a microclimate modifier [2].Footnote 5

In regions with high temperatures, it is advisable to minimize direct exposure to the sun. To achieve this, courtyards are designed with small dimensions and are shaded by tall walls, extensive overhangs, and lush vegetation. The courtyard’s layout promotes cross ventilation, and the presence of shaded verandas and patios encourages outdoor living. Additionally, within the courtyard, the use of plants and fountains aids in cooling the air through the process of evaporation.

In colder regions and northern climates, the courtyard serves to enable sunlight penetration into the house, permitting the inclusion of large windows without compromising privacy. A wide and open courtyard is essential to welcome the southern sun. Additionally, the patio house, designed as an open room, offers shelter from the cold.

5.2 Thermal comfort of the courtyard dwellings

The thermal comfort of users within a building is influenced by various elements such as the building dimensions, building materials, its orientation, etc. The thermal mass of courtyard walls and floors serves as a temperature regulator, cooled by outgoing long-wave radiation. This mass remains cool, acting as a reservoir of coolness, especially when well-shaded. Courtyards are integral components of temperature regulation, featuring surrounding colonnades and arranged rooms into balconies overlooking the courtyard to facilitate the flow of cool air throughout the house. During daytime when windows are closed, the coolness is preserved within rooms due to the thermal-mass-influenced heavy walls that absorb built-up heat.Footnote 6 The courtyard house, with its adaptive design, stands as a sophisticated regulator of temperature variations, harmonizing environmental responsiveness with architectural functionality.

6 Cultural dimension and social needs

6.1 Socio-cultural and religious considerations

Throughout history, each society has created an architecture that suits to its specific needs. Housing globally reflects the results of socio-cultural influences and environmental conditions. According to Rapoport [9], the creation of house form is predominantly shaped by social and cultural factors rather than physical forces. Socio-cultural forces take precedence, giving rise to conceptual form, while physical forces serve as secondary or modifying factors with a more tangible nature. The conceptual form of a house is not a singular outcome of any isolated factor or physical force; rather, it emerges because of a comprehensive array of socio-cultural influences and behaviors. Courtyard houses, for instance, were not only developed to meet functional requirements but also served as expressions of broader cultural values.

The values held by individuals influenced patterns of behavior, subsequently shaping the physical structures. Ultimately, values serve as the foundational source of architectural significance, legitimizing functional solutions [6].Footnote 7

Social and religious considerations frequently mandated the seclusion of women, and the courtyard house served as an ideal private recluse. The dwelling functioned as an isolated space, exclusively accessible to family, relatives, and clan members, while restricting strangers from entering anything beyond its most public areas. Privacy within the family, achieved through the courtyard, became a crucial necessity as a protective measure against overly inquisitive neighbors. Some societies took this a step further by incorporating houses with multiple consecutive courtyards, establishing a hierarchy of privacy that increased with reduced accessibility as one ventured deeper into the dwelling.

Courtyard dwellings in traditional Asian cultures serve as great examples, South Korean traditional house called “Hanok” featuring distinct levels of privacy. The outermost courtyard was reserved for strangers, while the innermost provided a highly private sanctuary for the homeowner’s family wife and daughters (Fig. 2).

Fig. 2
figure 2

This illustration describes the spatial arrangement of the Hanok house, with the courtyard orientation to suit climate, a room layout dictated by family hierarchy and gender segmentation and constructed using a natural palette of locally available materials [3]

The form and spatial arrangement of the Hanok house is an embodiment of the traditional Korean family hierarchy and structure. The main dwelling was originally intended for male family members and guests, and the smaller separate house to the rear, accessed through a separate gateway, was originally intended for female family members.

Living areas are often semi open to the enclosed courtyards and walled garden. The room layout, courtyard orientation and roof structure are all laid out in consideration of the sun and prevailing winds.Footnote 8

The walls surrounding the property are often built low enough to allow residents easy interaction with neighbors. This housing layout reflects the spatial relationship of society and culture and is considered an important symbol of the city’s history.

Although a return to courtyard housing solely for reasons related to women may not be practical in many communities, certain aspects of the need for privacy remain relevant, drawing from both traditional and contemporary considerations. In some contemporary Islamic societies, particularly those protective of women, the call for introverted living spaces persists. Beyond cultural factors, physical elements such as excessive noise or unattractive street environments contribute to the argument for a shift toward more secluded housing. Criticisms of monotonous and inefficient public spaces in 20th-century housing projects also fuel the desire for more introverted architectural designs.

6.2 The concept of privacy in housing design

The quest for privacy stands as a prominent socio-cultural determinant shaping housing design across diverse societies. In response to this fundamental need, various cultures have developed a multitude of solutions, reflecting the importance of privacy as a foundational element in architectural form. Architectural configurations attain privacy through tangible methods, involving the strategic planning, arrangement, and organization of spaces that collaborate to establish a sense of seclusion which work together to provide privacy (Fig. 3).

Fig. 3
figure 3

Organic city structure with introverted courtyard houses versus b. Suburban city structure with extroverted houses [9] (Adapted and modified from Rapoport)

Different forms of privacy are demanded by different cultures around the world. In Arab societies, the concept of privacy is profoundly influenced by religious teachings. Female privacy and family privacy emerge as two distinctive forms of privacy that significantly impact the structure and design of traditional Arab-Islamic dwellings.

7 Cases study analysis

7.1 Case of Kasbah—Southern Morocco

A Kasbah refers to a fortress, often identified as the citadel or fortified district within a city. Functioning as a small town enclosed by sturdy walls, Kasbahs offer refuge for travelers along trade routes. Primarily constructed from adobe, Kasbahs are historic fortified citadels, predominantly situated in the hot and arid climate of Southern Morocco.

A “Kasbah” is characterized by imposing high walls and typically features small-sized windows (Fig. 4). Constructed primarily with local materials, these structures are adeptly adapted to the regional climate. The Kasbah’s windows are intentionally small to minimize sun radiation, and the walls are crafted from sun-dried bricks in rich red clay tones. Despite their massive construction, Kasbahs blend into the landscape rather than dominating it. The central area of the Kasbah encompasses narrow, shaded streets, shielded from the sun by roofs made of palm trunks. To facilitate air circulation during the summer, the roofs are designed to be high. They absorb solar radiation during the day and release heat through nighttime radiation to the sky (Fig. 5).

Fig. 4
figure 4

High wall of Kasbah and small windows. Case of Kasbah Ait BenHaddou, Ouarzazate, Morocco

Fig. 5
figure 5

Typical Plan of Kasbah—South of Morocco [5]

7.2 Thermal regulation and climate adaptation

The Kasbah stands as a skillful adaptation to the challenging climate of the hot arid region, aiming primarily to shield inhabitants from the intense summer sun. Various factors, including the layout, height, orientation, and materials used, significantly contribute to the effective temperature regulation within these constructions. The introverted plan, featuring a central patio, plays a crucial role in climatic control. Kasbah dwellings boast walls as thick as 3 feet, acting as extensive thermal masses to maintain cave-like temperatures inside, with a diurnal temperature range of 20 °C. These thermal masses store coolness at night and gradually release it during the day. The exterior facades minimize fenestrations to protect against sandstorms and direct heat, with rough, thick walls aiding in absorbing sunlight (Fig. 6). The urban design contributes to ecological regulation, with narrow, non-linear streets providing shade throughout the day. Their sinusoidal form helps deter sand-carrying winds, preserving the accumulated cool air. The arrangement of dwellings sharing up to three exterior walls further mitigates exposure to heat (Fig. 7).

Fig. 6
figure 6

Section showing ventilation through convection. Illustrations from [5]

Fig. 7
figure 7

Plan showing ventilation through convection. Illustration obtained from [5]

In specific cases, the proximity of these dwellings results in covered streets below, providing shade which helps keep the surrounding environment cooler. The cool air collected in these shaded spaces is then moved naturally through convection towards the inner courtyards of the houses helping to lower their inner temperature. Additionally, as the cool air warms up, it rises towards the exterior of the house, creating a continuous cycle of air movement that aids in maintaining a cool temperature throughout the day.Footnote 9 This natural cooling process is significant as it reduces the need for artificial cooling systems, contributing to energy efficiency and environmental sustainability.

7.3 Case of “Riad” courtyard house in North of Morocco

A “Riad” is an urban courtyard house situated in the medina.Footnote 10 It is, is a typology in which all living areas are distributed around the courtyard, an enclosure, a place of contemplation and escape from the crowds of medina (Fig. 8).

Fig. 8
figure 8

Plan-sectional arrangement Dar Bouhellal in Fez, Morocco [10]

Indeed, courtyards serve as conduits for passive daylight to permeate the house, ensuring that every room benefits from natural illumination as they are all strategically positioned around this central patio. Operating entirely through passive means, the heat transfer processes occur organically, devoid of mechanical devices reliant on non-renewable energy. The courtyard house system adeptly orchestrates architectural components to optimize internal thermal comfort using natural resources, presenting a compelling lesson for a modern climatic approach to design. The courtyard, functioning as the central space, not only serves as a source of natural light but also plays a pivotal role in thermal regulation, shielded from solar radiation (Table 2).

Table 2 Characteristics of typical Moroccan courtyard house according to social and religious issues

Courtyard houses in Fez, Morocco, serve versatile functions, with shaded daytime rooms and rooftop terraces used for various activities. In response to seasonal changes, inhabitants adjust their living spaces. These houses, marked by verticality and deep courtyards, feature a rectangular layout with three stories. The courtyard, essential for shelter and privacy, has a height ranging from 9 to 18 m. Rooms are organized along a north–south axis, with main rooms facing each other. Staircases are discreetly positioned, leading to accessible terrace roofs, often equipped with extra rooms. Occasionally, adjacent houses are combined, with terrace roofs providing stunning views. The inward-looking design ensures a peaceful and private atmosphere, maintaining a constant connection with the natural world on the ground floor and offering a link to the outside world through accessible terrace roofs. Socially, these houses accommodate extended families without visible signs of wealth disparities.Footnote 11

7.4 The socio-cultural dimension: influence of religious principles and the concern of privacy

The prevalence of the Islamic courtyard in Morocco can be primarily attributed to the influence of Islam, which imbued the courtyard with its essence and identity. While various factors such as geography, climate, and culture played roles, Islam’s hierarchy of standards and morals emerged as the most significant force shaping the Islamic domestic courtyard. This architectural typology became integral to Moroccan dwelling practices, aligning with cultural habits and necessities prescribed in the holy Qur’an. In Islamic countries, the nature of private life is guided by shared cultural principles rooted in Islamic teachings. These principles emphasize the centralization of sexual and emotional activities within the family nucleus to strengthen family bonds and alleviate social stress [8]. The roles of men and women outlined in Islam directly influence architectural design, with Qur’anic verses highlighting the importance of family privacy. Visual privacy is crucial, leading to various architectural features:

  • Doors are strategically placed within streets for privacy.

  • Screens are incorporated into interiors to allow safe observation of male gatherings.

  • Architectural treatment of street-facing windows involves small, grilled openings above the line of vision.

  • Screened balconies serve as a means for female occupants to observe the outside world discreetly and modify the climate. The entrance design employs the "bent entrance" principle, requiring visitors to make turns before reaching the main reception areas. Despite the exterior being enclosed, the interior is open to the courtyard, emphasizing interior decoration with arches, terraces, and paneling.

7.5 Contemporary housing typology in Morocco

In Morocco, contemporary housing typologies have emerged in response to changing social, economic, and environmental factors. The traditional courtyard feature has almost disappeared. Despite benefiting from scientific and technological advancements with Western influences, there’s a growing disparity between global cultural trends and local needs leading to a loss of vernacular solutions in developing countries like Morocco [13,14,15,16].

Contemporary houses have shifted their orientation toward the street, prioritizing outward appearance over the traditional emphasis on internal courtyards. This change reflects a preference for expressing social status through external facades, signaling a departure from the historical roles of homes as places of comfort, privacy, and joy. The elimination of courtyards has resulted in the adoption of long corridors and internal halls. The central covered space, once a multifunctional hub for various family activities, has now been replaced by smaller and underutilized exterior spaces like verandas and balconies. These alterations prioritize a modern aesthetic rather than serving practical functions and user needs. These shifts are observable in both provincial areas and larger cities, in different degrees.

Integrating traditional courtyard house features like compact courtyards and gardens into multi-level apartment structures poses challenges. The well-documented difficulties faced by families, especially those with low incomes, and the challenges of raising children in tall apartment buildings, particularly in Western contexts, are noteworthy. Additionally, apartment structures tend to be energy-intensive and reliant on air-conditioning, necessitating consideration in long-term regional development policies, particularly in anticipation of the future when energy may no longer be inexpensive.

The dominant contemporary housing typologies in Morocco include:

1. Urban Vertical Living: due to urbanization and limited land availability in metropolitan areas like Casablanca, there’s a growing trend towards vertical habitation within urban environments. High-rise apartment buildings with modern facilities are becoming common to host the increasing population density.

2. Gated Communities: Gated communities have gained popularity, especially among the middle and upper classes. These developments offer a sense of security and privacy. They often feature villas or collective housing with shared facilities such as parks, swimming pools and recreational facilities (Fig. 9).

Fig. 9
figure 9

Source: Issued from google maps 2024

An example of gated communities of middle and high-income population, Temara Harhoura, Morocco.

3. Collective housing for middle income population involves the construction of multiple residential units within a single development for middle-income populations with different housing offers and sizes (Fig. 10).

Fig. 10
figure 10

Source: Romana garden, https://www.romana.ma/appartements-residences-sala-al-jadida-maroc/

Collective housing for middle and lower income population.

In this context, a common central courtyard is integrated into these housing projects, serving as a shared outdoor space within the development, aiming to provide opportunities for enhancing social interaction and fostering a sense of community and cohesion among residents, however, functioning primarily as a passageway to the housing blocks rather than a space for communal activities (Fig. 11).

Fig. 11
figure 11

Illustration of the common shared outdoor space of the collective housing project Romana Garden, showing no activities

Government-led initiatives promoting affordable housing solutions in the form of social housing projects. This housing typology involves the construction of multiple residential units within a single development, aimed to provide cost-effective housing solutions for lower-income populations (Fig. 12).

Fig. 12
figure 12

Social housing project for low-income population, Janane azzahrae, ain Atiq Morocco. Source: https://jnaneazzahrae.com/fr.html

Although, these initiatives prioritize efficient-cost, efficient land use, construction affordability, and access to essential services, the housing blocks are dominating the urban landscapes and altering the local context. The courtyard, symbolic of privacy and comfort in traditional towns, has given way to free-standing blocks within fragmented urban spaces, eroding human contact and diminishing the quality of life (Fig. 13).

Fig. 13
figure 13

3D view showing the Urban landscapes around Janane azzahrae project, ain Atiq Morocco. Source: https://jnaneazzahrae.com/fr.html

This shift in urban planning has not only led to environmental issues, such as discomfort, energy wastage, and pollution in the expansive and barren spaces around housing blocks but has also contributed to climatic stress and pollution in the peripheral areas of housing estates caused by cars and urban waste.

8 Results and discussion

The emerging social context is influenced by both internal socio-cultural shifts within society and the global impact of technologies. Traditional cities were meticulously planned in alignment with community values, culture, and religion, fostering a sense of communal living. However, contemporary urban design reflects a departure from these principles, mirroring a transition towards increased individualization in societal values.

Courtyard houses, once designed for extended families with large plots, have transitioned to accommodate nuclear families on smaller plots due to changing family structures and housing policies. The reorientation of houses toward the street reflects a societal change towards exposing social status, encouraged by urban planning regulations. However, this has led to negative consequences, including a lack of understanding of the relationship between buildings and the broader urban fabric. Challenges in design, particularly concerning natural light and ventilation in residential structures, highlight the significance of incorporating local needs and climatic requirements into architectural practices.

8.1 Modern transformation of courtyard housing in Arab region

Although, the use of the traditional courtyard feature has become less common in modern architecture, especially in urban areas where space is limited, there are a few projects reintroducing this element into architectural design. These projects are not only reviving a timeless feature but also enriching the built environment with elements of nature and human interaction.

8.2 Modern transformation of courtyard housing in East-Asian region

The argument against courtyard housing centers on adapting a historical dwelling form to contemporary lifestyles and rapidly evolving technological innovations. There is a concern about whether a traditional house can effectively meet the demands of the present and future.

The examples above of contemporary architecture display modern transformations of courtyard housing in the East Asian region (Korea, Japan, Taiwan) and the Arab region (Morocco, Kuwait, UAE); (Tables 3 and 4); exhibit a synthesis of traditional architectural elements maintaining the traditional spatial arrangements with contemporary design principles. Demonstrates that courtyards can be adapted to suit different purposes and applicable to different contexts. They can range from small, intimate spaces within a building to larger, more expansive areas that serve as central gathering points.

Table 3 Examples of modern projects incorporating courtyards in their design from Arab region
Table 4 Examples of modern projects incorporating courtyards in their design from East-Asian region

The projects incorporate courtyards into design to bring natural light and ventilation into buildings, provide private outdoor spaces, and create a sense of connection with nature. Both regions demonstrate a revitalization of the courtyard concept with an innovative architectural design courtyards as central gathering spaces, connecting different parts of the building and fostering family gatherings and connectivity within the living spaces while adapting to contemporary needs, modern technologies, and environmental concerns. While the specific architectural elements and cultural influences may vary between the two regions, the overarching trend of blending tradition with modernity to create functional and sustainable living spaces is evident. In the Arab region, the integration of courtyards into building blocks, along with modern material applications for sustainability, reflects a similar approach seen in East Asia. Additionally, there’s a focus on maximizing natural lighting and ventilation throughout the interior spaces, as well as maintaining privacy.

Housing must be flexible to cope with sophisticated socio-cultural demands shaped by lifestyles, customs, and human experiences. While technology changes rapidly, fundamental socio-cultural behavior remains relatively constant. The focus should be on human relationships, psychological responses, and temperaments rather than the latest technological trends. The impact of technological innovations on the dwelling should enhance and enrich life, prioritizing the shaping of humanity over formal changes. In the Islamic-Arab world, architects seek to reconcile contemporary Islamic buildings with traditional values, recognizing the importance of traditional architecture alongside modernist solutions. This recognition emerged in the mid-twentieth century as architects and the public appreciated the enduring value of their traditional architecture alongside modern developments.

9 Conclusion

Architects are increasingly exploring the integration of courtyards in contemporary housing and urban development, recognizing their potential to address sophisticated socio-cultural demands. Courtyards offer privacy, respite from urban chaos, and communal spaces for families in densely populated areas. However, the challenge lies in adapting traditional courtyard house qualities to contemporary living, considering shifts in family structures, housing affordability, and the diminishing presence of traditional houses. Despite changes, the courtyard house, with its principles of privacy, security, and community, remains relevant. Future architects must balance technological advancements and socio-economic shifts to redefine the courtyard typology, avoiding a mere reproduction of the past. A contemporary revival of the courtyard design, blending past and present values, holds promise for creating responsive urban forms that meet the evolving needs of modern society.