Introduction

The Azrou-Khenifra Basin (AKB) is, together with the Fourhal‒Telt Basin (FTB), the largest Carboniferous basin in the Variscan Moroccan Meseta (Fig. 1) (e.g., Allary et al. 1976; Bouabdelli 1989; El Houicha 1994; Huvelin and Mamet 1997; Ben Abbou 2001; Ben Abbou et al. 2001). Details of the tectonic style, sedimentology, as well as the lithostratigraphical framework are still poorly understood, and the existence of a complex framework of formations and ages complicates the understanding of the tectono-sedimentary evolution of the basin. This poor knowledge of the basin is related to the fact that the northern and southern parts of the basin (separated by the Aguelmous Fault; Fig. 1), have been usually studied separately, almost as two independent basins. Currently, these differences are substantial and need to be lithostratigraphically/biostratigraphically harmonised.

Fig. 1
figure 1

Geological map of the Azrou-Khenifra Basin (AKB). Location of the AKB in the Moroccan Meseta showing the main Carboniferous basins (inset map)

One of the main features of the carbonates in the AKB is the presence of common and diverse reef patterns as ecological responses to the tectono-sedimentary evolution of the basin. These reefs occur as corals reefs, as well as microbial buildups or microbialite reefs (sensu Neuweiler 1993), and are usually described as independent and unrelated structures (Chanton-Güvenç et al. 1971; Chanton-Güvenç and Morin 1973; Berkhli et al. 2001; Cózar et al. 2008; Aretz and Herbig 2010; Said et al. 2010, 2011, 2013; Rodríguez et al. 2012, 2016, 2022; Somerville et al. 2012).

To precisely establish the biostratigraphic and lithostratigraphic similarities and dissimilarities in the region, is an additional tool in determining the evolution of the basin, and to determine when and how the collision between Laurussia and Gondwana affected the Moroccan Meseta during the onset of the Variscan Orogeny in the region.

The aim of this study is to establish an uniformised lithostratigraphical framework of the various types of reefs and the inferred basin evolution. The observed different patterns in the reefs are a tool for determining different tectonic, subsidence, glacioeustasy and ecological controlling factors operating in the basin, and thus, to precisely date when the regional extension (preorogenic extensional movements) passed into a more compressional phase (synorogenic syncontractional), responsible for the final structure of the basin.

Geological background

The AKB and FTB are genetically linked; their formation postdates an early compressional event (Eovariscan phase) occurring during the Devonian-Tournaisian transition to early-mid Viséan interval, and which is recognised in the pre-late Viséan basement (SE central massif) and over the entire Eastern Meseta (e.g., Allary et al. 1976; Hoepffner 1987; Boubadelli 1989; Michard et al. 2010; Accotto et al. 2020). The eastern border of the AKB is characterised by various nappes defining the so-called Nappe Zone, with older rocks overthrusting the younger formations towards the west (e.g., Allary et al. 1972, 1976; Huvelin 1973; Faik 1988; Bouabdelli 1989; El Houicha 1994). There is a consensus that these larger nappes were rooted in the Eastern Meseta, with westward vergence, although, originally, the Mrirt and Ziar nappes were interpreted as gliding nappes (Allary et al. 1972), succeeding an early compressional nappe (Khenifra Nappe). This hypothesis is still debated in more recent studies (e.g., Bouabdelli 1989; El Houicha 1994; Huvelin and Mamet 1997; Ben Abbou 2001). Nappes were transported during the preorogenic phase to the main post-Viséan phase of the Variscan Orogeny (Michard et al. 2010).

Hence, the most widely accepted model interprets the AKB (excluding the eastwards-directed tectonic nappes) as an autochthonous basin, with platforms developed on horsts, inclined and deepening to the east and west from the emerging Zaian Mountains and Jbel Hadid in the southern AKB (Fig. 1), and with the slope settings composed of shales directly deposited in a deep-water trough (e.g., Beauchamp and Izart 1987). A similar model, where the main environmental settings are controlled by horsts, was proposed by Huvelin (1973); Verset (1983); El Houicha (1994); Ghfir (1993) and Huvelin and Mamet (1997) for the southern AKB. Ouarhache (1987); Faik (1988); Habibi (1989) and Bouabdelli (1989) focused their studies mostly on the northern AKB, and they considered most of the Devonian units (some of them are Ordovician in age) as a result of gliding nappes, although the internal units stacked in Azrou were related to the main compressional phase. Ben Abbou (2001) and Ben Abbou et al. (2001) considered all the units as tectonic nappes, with deposition and migration of the depocentres from east to west in the Nappe Zone, and the FTB was controlled by the westward propagation of a thrust fault detached on the Middle Ordovician slates and/or Silurian black shales during the late Tournaisian up to the Namurian-Westphalian (in two thrusting sequences).

Materials and methods

For the study of the reefs, 30 stratigraphic sections have been studied from a biostratigraphical and sedimentological point of view, including twenty stratigraphic sections from the northern zone of the AKB, and ten from the southern zone. Most sections span the latest Asbian to early Serpukhovian (Fig. 2), although three sections also include the late Serpukhovian-earliest Bashkirian (see details of their location and biostratigraphy in online resource 1). In the Souk el Had, Akerchi 1, Idmarrach 1, Idmarrach 2 and Tirhela sections (northern zone), as well as at Kef en N’sour (southern zone), only coral biostromes are recorded (Said et al. 2013; Rodríguez et al. 2016, 2022), with no microbial facies recognised. From these sections, a total of 526 samples have been studied by means of more than 877 standard thin-Sects. (28 × 48 mm) and 226 large thin-Sects. (50 × 80 mm). Carbonate classifications by Dunham (1962) and Embry and Klovan (1971) were used to describe the non-microbial microfacies (Table 1). For the microbial facies, terms such as skeletal and non-skeletal components are used (Online resource 2), as in Rodríguez-Martínez et al. (2010) and Blanco-Ferrera et al. (2021). The abundance of grains, cement and matrix were visually estimated using the charts of Baccelle and Bosellini (1965). Furthermore, more than 1200 thin-sections have been prepared for the taxonomic study of the rugose corals.

Fig. 2
figure 2

Stratigraphic range of the selected sections and the extension of the reef types. BASH Bashkirian, ELBT early-late brigantian transition (geographic location of the section in Online resource 1)

Table 1 Main types of carbonate facies

Microbialites in the AKB are usually rather monotonous lithologies, with scarce fossil content and sedimentary structures for their interpretation, and the main differences are mostly related to the microbial fabrics (i.e., characteristic associations of microbialites and allochems; Shen and Webb 2005), more than for the skeletal or non-skeletal components. Fabrics frequently vary, apparently randomly or in patches, but they do not follow a clear pattern. Hence, classical limestone classifications such as that of Dunham (1962) cannot be used to distinguish facies and thus, environmental differences.

A canonical correspondence analysis (CCA) has been performed in the most representative fourteen sections for the development of the microbial carbonates: as an ordination method to compare the quantitative variables (cement, allomicrite, automicrite, non-skeletal and skeletal components) as a function of the qualitative variables (facies and fabrics). This CCA allows the recognition of ecological and environmental parameters in monotonous successions (Cózar et al. 2019). The CCA are stratigraphically analysed by means of the projections of the scores on the axes, and recalculated from 0 to 100 in samples and components, thus defining an environmental gradient (see Hennebert and Lees 1991). These values are an expression of the CCA, as they show the same gradients over the axes, but they allow a more visual representation through the stratigraphic succession. Two main indices have been recognized in the CCA from the AKB sections (online resource 2), which are recalculated as a gradient (Table 2).

Table 2 Ecological gradients for the CCA, axes 1 and 2

Details of the methodology used for the CCA and for the constructions of the gradients were described in Cózar et al. (2019, 2022). Therefore, the different values in the CCA for each sampled level, are an interpretation of the combination of skeletal, non-skeletal components and textures ordered into a vertical ecological gradient.

In addition, in those levels/intervals with a higher concentration of rugose corals, the species richness (Margalef index) and the taxonomic diversity have been calculated (online resource 3) as an additional tool to characterise the reef taxonomical structure, as a response to ecological parameters.

Reef patterns in the northern AKB

Microbial reefs in the northern part of the AKB (Adarouch region) are recorded in situ in the Tizra Formation (Cózar et al. 2008; Said et al. 2011). There are small reefs in Idmarrach 3 section, although corals are predominant in intermound and offmound strata (sensu Bridges and Chapman, 1988), whereas at Akerchi, Idmarrach 1 and 2 and Tirhela, coral biostromes occur (Rodríguez et al. 2016). Farther to the east, microbial carbonates are known in olistolites of the Ain Ichou Formation (Fig. 1) in the Azarhare region (Karim et al. 2005), although they have not been studied in detail.

The most complete succession is located in the northern outcrops of the Tizra Formation (Fig. 2), which include an excellent exposure of the basal microbial reefs (Cózar et al. 2022, Fig. 2), whereas the stratigraphically younger reefs are, in general, well represented through the Tizra ridge from south to north (Fig. 3a).

Fig. 3
figure 3

Typical field features of reefs AKB. a Type 3 and 4 reefs showing the location of sections (north to the right; arrows indicate younging direction). b Bedded bioclastic limestones passing laterally to massive limestones of Type 2 reefs (looking from south to north). c Type 4 microbial reef at Idmarrach 3 section (outlined by blue dashed line) with flanking bioclastic limestones (red dotted line) and surrounded by shale (north to the left). d Basal breccia passing up into conglomerates (cong) at the base of Tabaïnout reef complex and bioclastic facies as precursor of the reefs (pre) (see Fig. 1 for location). e Coral-rich cap strata in the upper metres of Tabaïnout mound complex with abundant large solitary dissepimented rugose corals. f Transition from conglomerates (cong) to sandstones (sst) to bioclastic limestones (lst) at the base of Tiaouinine 2 section. g Large-scale cross-bedding in the slope facies at Taiouinine

Five types of reefs are recorded in this northern zone, which will be used as a reference-record to compare them with the reefs recognised in the southern AKB (Table 3). The main bulk in types 1 to 4 reefs are microbially mediated carbonates, where it is assumed that the main bioconstructors are microbes, whereas in type 5, microbial carbonates are negligible, and the bioconstructions are mostly formed by rugose corals.

Table 3 Main types of reefs in the AKB

Reef type 1

Bioclastic/oolitic shoal facies generated over a shaley substrate in the north pass laterally into massive microbial reefs to the south (Cózar et al. 2022, Fig. 2). Carbonate deposits are not continuous through the region, and in parts, they are laterally replaced by shales. Microbial reef type 1 and interbedded non-microbial facies show, at outcrop, lateral extensions of less than 500 m. Individual microbial buildups are 5–20 m thick, and extend laterally for about 50–60 m, showing slight palaeorelief with domical forms. However, they are commonly stacked laterally, cropping as stratiform deposits, where boundaries of the microbial structures are only recognised by the occurrence of packstone deposits. Individual dome-shaped structures are rarely observed, mostly in the small reefs in the northern part, growing isolated between grainstone facies. Microbial and non-microbial carbonates are organised mostly in three thick intervals (20–70 m thick) separated by thinner shale units (4–10 m thick). Reefs in the north started growing directly over the oolitic and bioclastic deposits, whereas in the southern part, where the growth of the microbial facies is more continuous (Cózar et al. 2022; Fig. 2), they grew directly over the underlying shales, without any observed precursor strata (sensu Lees and Miller 1995). Palaeorelief on top of the reefs is conditioned by, initially, extensional synsedimentary faults, generating differences in thickness of the reefs on both sides of the faults, and small palaeoramps, which subsequently, also suffered post-sedimentary movements, generating the displacement of the coeval lithologies (Cózar et al. 2022, Fig. 2).

Except for the oncoidal packstone and floastone facies (F7 and F14 in Table 1), these outcrops of type 1 reef have the highest diversity in facies (Table 4). This diversity decreases progressively from type 1 to type 4 reefs (Table 4), and the main difference between the bioconstructions is the relative proportion of facies. Thus, illustrations of the facies in Cózar et al. (2022, Figs. 4, 5, 6), include most of the facies described in Table 1, as well as details of the interbedded bioclastic and oolitic facies. In the southern part, the reef type 1 are only interrupted by some cross- and parallel-laminated packstones (F8 and F9; Table 1), whereas, in the northern outcrops, much thinner reefs are common, and commonly interbedded with grainstones and packstone/grainstones (F1 to F6). These reefs show a marked predominance of matrix-supported and micritic fabrics (F13c, F13e) in the microbial limestones and near absence of cementstones (Table 4), with average values of automicrites of about 52% of the total content, whereas cements represent only 16% (Table 5), which are predominantly granular, blocky and equant sparite.

Table 4 Ratio of facies per number of samples
Fig. 4
figure 4

Margalef richness index and taxonomic diversity of the main coral assemblages in the AKB. Note that the sections are arranged from oldest (right) to youngest (left). Coral distribution in the AKB can be found in Online resource 3. Ak Akerchi, Ass Association, ID Idmarrach, K’nS Kef en Nsour, SeH Souk el Had, TB Tabaïnout, TIH Tirhela, TIO Tiaouinine

Fig. 5
figure 5

Features of mostly non-microbial facies. (scale bar = 2 mm, except for a = 1 mm). a Oolitic grainstone (F1), composed mostly by superficial ooids with thin cortices, foraminifers and bioclasts in the core, and few layers, Q11, Assekkij, reef type 1. b Peloidal grainstone with common foraminifers (F3) passing upwards into microbial micritic fabric with geopetal mud (F13e), 3811, Tizra 9, reef type 3. c Bioclastic grainstone with common large irregular ooids, and common broken fragments of the green algae (F4), Q11, Assekkij, reef type 1. d Oncoidal packstone-grainstone (F7) with large oncoids, 2393, Tizra 2, intermound facies in reef type 2. e Lithoclastic packstone (F8), with two large microbial lithoclast in the lower part, and accumulation of the crinoids in the upper part, 3809, Tizra 9, precursor facies in reef type 3. f Bioclastic packstone (F9), 2396, Tizra 2, intermound facies in reef type 2. g Bioclastic wackestone-packstone (F10) rich in large fragments of brachiopods and large oncoids in a micritic fine-grained matrix. 2395, Tizra 2, intermound facies in reef type 2. h Micropeloidal cement-supported fabric (lower part; F13b), eroded by a wackestone (F11), Fij-4, Bir en Nhall, reef type 1

Fig. 6
figure 6

Features of microbial facies. (scale bar = 2 mm). a Cementstone in the lower part (F13a) with large cavities inside molluscs, and micropeloidal cement-supported (F13b) in the upper part, separated by an encrusting bryozoan, 4266, Tabaïnout 2, coeval to reef type 4. b Bands of cementstone (F13a) and micropeloidal cement-supported fabric (F13b), 3843, Tizra 10, reef type 2. c Micritic at the base (F13e), cementstone (F13a) in the middle and micropeloidal cement-supported fabrics at the top (F13c), 2408, Tizra 2, reef type 3. d Low-energy euphotic micropeloidal cement-supported fabric (F13) with large dasycladal thalli (Koninckopora) in growth position with geopetal sediment, 4254, Tiaouinine 1, reef type 2. e Intraclastic-bioclastic cement-supported fabric (F13d) in the lower part, covered by lumpy bands of micropeloidal cement-supported fabric (F13b), 3854, Tizra 11, reef type 3. f Micritic facies (F13d) (lower right) passing into (upper left) micropeloidal matrix-supported fabric (F13c) with stromatactis cavities and large dasycladal thallus preserved intact (Palaepimastoporella), Fij-9, Bir en Nhall, reef type 1. g Micropeloidal matrix-supported fabric (F13c), rich in articulated ostracods, 3842, Tizra 10, reef type 2. h Micritic fabric with common crinoids and trilobites and some small cavities mostly filled by micrite. 4261, Tabaïnout, reef type 3

Table 5 Average value (ratio by number of thin-sections) of the main automicrites, cements and bioclasts recorded in the microbial facies

Radiaxial fibrous cements are rare, and only observed forming thin rims around some bioclasts. Large stromatactis cavities are rare, and mostly concentrated in the microbial reefs in the south, whereas smaller spar-filled fenestrae are common in all the sections. Skeletal components are comparatively abundant, including all the different groups of taxa characteristic of different bathymetries and life styles of microbial reefs (Table 4). The main constructors for those buildups are calcimicrobes. Other elements which contribute to the framework are Ungdarella, some genera of attached aoujgaliids, calcifoliids (mostly the encrusting Fasciella), the red alga Hortonella, bryozoans, corals, some cyanobacteria (Renalcis) and sponges, all of them attached to the soft substrate, but their abundance is never volumetrically important as to constitute framework builders of large parts of the buildups, and thus they are considered as dwellers. Their preservation is in general good, although rare levels with broken bioclasts are recognized. Other elements, such as the palaeoberesellids, donezellids and dasycladales, which could potentially also generate bafflestones, never reach the abundance necessary to form these structures, and in addition, the availability of allomicrite in the environments is negligible, in pure microbial facies 0%. This latter group is also considered as dwellers. Rare binder taxa are recognized in the assemblages, composed of cyanobacteria Girvanella, Aphralysia, red algae Archaeolithophyllum and encrusting bryozoans, but only Girvanella reaches values higher than 1% (Table 5), which form low percentages in the total bioconstruction. The rest of the biota is composed of typical dweller assemblages, and compared with the other reef types, all the groups are abundant (Table 5). Bioturbation is common in these type 1 reefs, highlighted by the common Terebella-like tubes, as well as by common disarticulated and broken bioclasts.

Corals are very rare, and assemblages are represented by the Association 5 of Said et al. (2011) (Table 6), which is characterised by rare, large dissepimented solitary rugosans. The assemblages show low species richness and taxonomic diversity indices (Fig. 4).

Table 6 Main types of coral associations in the AKB

Reef type 2

These microbial reefs may frequently contain intermound strata in the lower part, mostly non-microbial, locally passing into small dome-shaped mounds (1 m thick, < 4 m width). These reef structures, are 10–20 m in thickness, and are mostly tabular, and lumpy tops. The intermound strata are also common in the extreme northern outcrops of the Tizra Formation (Said et al. 2011; Fig. 3b). The intermound strata pass gradually into the microbial core and palaeoramps are negligible. These tabular reefs may laterally extend up to 5 km, where only locally, the intermound strata are recorded passing to shales. However, between areas without intermound facies, neither internal differentiation nor individual buildups are observed, only frequent precursor facies (packstone) at the base of the reef. The intermound strata contain numerous packstones with fragmented fossils, but also oncoidal packstones with many non-fragmented fossils (F7 to F10; Fig. 5d, f, g), and a near absence of grainstone facies (Table 4). Coral assemblages are represented by Associations 1, 2 and 3 of Said et al. (2011). Association 1 contains abundant fasciculate and cerioid colonies, with occasional large dissepimented solitary corals; Association 2 comprises sparse large dissepimented solitary corals; Association 3 contains a rich assemblage of large dissepimented solitary corals, as well as fasciculate and cerioid colonies (Table 6). The assemblages are characterised by low to moderate species richness and taxonomic diversity (Fig. 4).

These intermound strata pass laterally to typical microbial mounds. Microbial facies show a slight predominance of micropeloidal matrix-supported and micritic fabrics (F13c and F13e; Fig. 6g), although other fabrics occur, even cementstones (Fig. 6b) (Table 4). The percentage of automicrites is similar to that of reef type 1 (50%), although the proportion of cements is higher, up to 21% (Table 5). Cements are similar to those in reef type 1, although there are more common radiaxial cements filling large stromatactis cavities, which are also scarce, and mostly concentrated in the lower part of the reefs, whereas the spar-filled fenestrae are predominant through the bioconstructions. In the bioclastic content, dwellers are less abundant than in the core facies, with high values for the CCA index 1, and a marked increase in groups with intermediate values, and taxa with low value for this index are scarce (Table 5), and the average bioclastic content is higher than in reef type 1.

Significantly, coral assemblages are not recognised in these core of the reefs, only the rare occurrence of isolated specimens, which can be compared to Association 5 of the core mounds (Table 6).

Reef type 3

Stratigraphically younger parts of the carbonate succession in the Tizra Formation show thicker reefs (Fig. 3a). These reef type 3, individually, are > 45 m thick, and 50–200 m wide, with marked domical shapes. At the base, there is usually an interval of shales (8–30 m), or they can be amalgamated with the top of the reef type 2, only separated by some precursor strata composed of muddier packstone. Individual reefs show a marked zonation, with, as mentioned above, 1–2 m-thick precursor beds (Fig. 5b, e), thin capping strata on top (< 0.5 m) and thick mound flank strata (sensu Bridges and Chapman 1988) (> 10 m thick). The percentage of automicrites in the core facies is slightly lower than that of reef types 1 and 2, up to 45% on average, but with an important increase in the amount of cement compared to the other reefs (average value 34%). This increase in cement is explained by a much higher abundance in radiaxial cements, which become predominant in the lower part of the reefs. The large stromatactis cavies are common through the entire thickness of the reefs. Another manifestation of this higher abundance in cements is the predominance of micropeloidal cement-supported fabrics, although the cementstone and intraclastic-bioclastic fabrics are also common (F13a, F13b and F13d; Fig. 6c, e; Table 4). Biota in these reefs experienced a notable change, principally marked by a decrease in the total bioclastic content (on average 17%) compared to reef types 1 and 2 (Table 5). In addition, biota with high values of index 1 are scarce, whereas those with low index 1 nearly duplicate those in reef types 1 and 2 (Table 5). Two coral associations are recorded in these type 3 reefs, Associations 4 and 5 of Said et al. (2011). Association 4 is recorded in the flanks of the reefs, and is composed of small non-dissepimented solitary rugosans. Although the species richness is low, the taxonomic diversity is high (Fig. 4). In contrast, the core strata show a much more restrictive suite of large dissepimented solitary corals, represented by the Association 5 (Table 6).

Reef type 4

The stratigraphically youngest bioconstruction is a laterally discontinuous microbial biostrome that developed isolated from previous reefs, and is surrounded by shales (Fig. 3c). Microbial facies constitute small frameworks, less than 6 m thick, with tabular form, and interbedded with mudstone-wackestone, rarely grainstone in the upper part (Table 4). Automicrites are predominant in the reefs, reaching up to 62%, whereas blocky and equant cement are rare (on average 4%) showing mostly micropeloidal matrix-supported fabrics (Table 4), although the values are not particularly representative, due to the low number of samples. The bioclastic content is high, up to 30–40% in some beds, due to the occurrence of bryopsidales algal remains (Saccamminopsis) and rugose colonial corals, that are unusual in the rest of reef structures. In contrast, the bioclasts with high index 1 are negligible and binder cyanobacteria become common (Table 5). Large stromatactis cavities are not observed, only fenestrae. The recorded Coral Association 6 is characterised by abundant fasciculate and cerioid colonies and large dissepimented solitary rugosans. In this case, corals appear to constitute a significant part of the framework of the structure, and there are entire beds composed of colonies in growth position, with a microbial matrix (Said et al. 2011). The abundance of colonies is a notable difference with previous reefs, where only in the intermound facies of reef type 2, colonies can be common. The coral assemblages show high species richness, whereas taxonomic diversity is very low (Association 6 and ID3 in Fig. 4).

Reef type 5

Rich coral assemblages developed behind (landward of) oolitic shoals, such as those of Akerchi and Souk el Had (Table 6) (see details of those biostromes in Said et al. 2010, 2013). They form biostromes with a high richness value, and also a moderate taxonomic diversity (Fig. 4). In this case, microbial facies are not recorded in the biostrome, or they are negligible. Other coral biostromes in the northern AKB recorded in the late Serpukhovian contain a high richness and low taxonomic diversity (Fig. 4), whereas the assemblages recorded in the early Bashkirian show a low abundance but high taxonomic diversity (see details in Rodríguez et al. 2016, 2022). Those latter biostromes occur in inner platform settings passing into transitional to continental siliciclastic sediments in the Bashkirian, interbedded with common red shales, sandstones and channelised conglomerates (Cózar et al. 2011).

Interpretation of the reef patterns in the northern AKB

The synsedimentary faults observed in the field allowed the generation of accommodation space for the growth of the type 1 reefs capped by bioclastic/oolitic beds, mostly into deeper parts of the platforms to the north, whereas in the shallower parts, there is an alternation of microbial facies and grainstones. These variations are exemplified by means of index 1 of the CCA. Index 1 is attributed to the energy of the environments, which also corresponds to the bathymetry. Using the ecological characters discussed in Cózar et al. (2019), the index is subdivided into a deeper/low-energy environment, with a value of 40, and shallower/high-energy environment, with a value of 72. In values below 40, all the components are typically represented in deep-water settings, such as Terebella-like tubes, agglutinated foraminifers, sponge spicules, aphralysiaceans, cyanobacteria and bryozoans (Table 2). In values above 72, allomicrite is recorded, together with higher concentrations of lithoclasts, grapestone, ooids and peloids (Table 2). These values allow us to identify three main groups of taxa: those occurring predominantly in shallow-water, those in deep-water and a third intermediate bathymetric group (Table 2). These variations between microbial facies and grainstone give rather fluctuating energy conditions, mostly in the shallower outcrops in Tizra 3 sections (Fig. 7a‒c). These fluctuations also correspond in this case to shallower/deeper water conditions. Most samples recorded very low-energy conditions in the CCA analysis (index 1 value < 40), whereas the higher energy conditions (index 1 value > 72) are recorded through Tizra 3–3 section, predominantly near the base and top of Tizra 3–2, and only near the top of Tizra 3–1 section. Samples with intermediate values of index 1 (between values 50–65) are rare, nearly absent in the deepest parts of the platform. The higher occurrence of biota associated with shallow-water environments, also suggest the overall shallow-water setting for the development of the reef type 1, although the deep-water biota suggest that possibly due to a high rate of subsidence, they reached rapidly deeper water settings. Variation in the values, not only between shallower water bioclastic facies and tempestites, but also within the deeper water microbial facies, allowed Cózar et al. (2022) to recognize 10 high-frequency deepening-shallowing cycles (Table 3).

Fig. 7
figure 7

Stratigraphical gradient index 1 (energy/bathymetry) for the main components in the CCA. Stratigraphical sections in the margin are all at the same scale in the graphics. Dark areas contain the interval of rocks with reefs. Arrows indicate the main shallowing- and deepening-upward sequences. The horizontal axis represents gradient index 1 and the vertical axis the thickness of the section (metres) from the base. See details of sections in Fig. 1 and Online resource 1 and 4

Index 2 of the CCA is attributed to turbidity or light penetration in the environments, allowing us to distinguish between aphotic (with values < 34), dysphotic (between 34 to 63) and euphotic (values > 63) zones. Values below 34 record the allomicrite, whereas a value of 63, indicates dasycladal green algae are recorded (Table 2). The predominant microbial facies of Tizra 3–1 and 3–2 sections formed in euphotic conditions (index 2 values > 62), whereas most of the fluctuating conditions in Tizra 3–3 section record more dysphotic conditions for the microbial facies (Table 3), due to the inputs of muddier material emanating from the prodeltaic belts disposed landward of the carbonate platforms (Fig. 8a‒c). The low species richness and taxonomic diversity indices in the coral assemblages suggest stressed and hostile environments for the development of corals, a fact which confirms the fluctuating energy conditions and the high turbidity levels.

Fig. 8
figure 8

Stratigraphical gradient index 2 (turbidity/light penetration) for the main components in the CCA. Stratigraphical sections are all at the same scale in the graphs. Dark areas contain the interval of rocks with reefs. The horizontal axis represents gradient index 2 and the vertical axis the thickness of the section (m) from the base

Type 2 reefs are characterized by the presence of common intermound strata, which are characterised by shallow and of moderate to high energetic conditions, with an index 1 value usually higher than 65 (Fig. 7h). The interval shows common tempestites, and the euphotic to aphotic conditions (Table 3) are also strongly fluctuating, depending on the transported muds, and even given the concentration of bioclasts, apparently aphotic, but also commonly in dysphotic conditions (Fig. 8h). These levels with common allomicrite concentration, indicates rather turbid conditions. The rare microbial facies locally recorded in those intermounds correspond to less turbid levels in euphotic conditions. The overall trend of the samples shows a shallowing-upward sequence in the lower half of this interval, and deepening-upward in the upper half (Fig. 7h), much more poorly recognised in terms of variation between the aphotic to euphotic levels (lower half), and from euphotic to aphotic (upper half) (Fig. 8h). Coral assemblages suggest slightly less stressed environments than in Association 5, but still, do not represent the most favourable conditions for coral settlement. This fact does not seem to be conditioned by the energy conditions, but possibly, by the rapid variations in photic conditions and substrate in the environments. In the large lateral core of the microbial mounds, facies of low energy or deeper water are common, but also those of moderate energy, with index 1 values between 40 and 72, and high-energy (shallower) horizons may be present (Fig. 7i‒j). These facies were generated in scarcely turbid environments with strong euphotic conditions, and rather scarce dysphotic levels (Fig. 8i‒j). However, similar to the intermound strata, a composite shallowing-/deepening-upward trend is recognised, as well as less/more turbid environments.

Type 3 reefs, in general, show low to moderate energy/deeper conditions (Table 3). Compared to the underlying type 1 and 2 reefs, sampled horizons of moderate energy levels (index 1 values between 40 and 72) are much more commonly recorded. These samples of moderate energy levels mask the overall trend, mostly in the Tizra 11 section, which is interpreted as an overall deepening-upward sequence (Fig. 7h‒i, k). Most samples correspond to values of euphotic conditions, although local dysphotic conditions are observed in Tizra 9 section (Fig. 7k), but the pure microbial facies show similar indices as the underlying beds (Fig. 8h‒i). An overall upward trend to more turbid settings is also observed in these reefs, though more masked in the Tizra 11 section (Fig. 8i). The predominance of fabrics with cements, as well as the intraclastic-bioclastic intervals (usually rich in cements), suggest that their formation needs more tranquil environments, and mostly, free of mud in suspension. However, the abundance of radiaxial cements compared to previous reefs and higher amount of large stromatactis cavities and deep-water biota suggest a deeper water setting than type 1 and 2 reefs. This implies that the formation of the reefs was controlled by rather specific bathymetry/energy/light conditions. The coral Association 4 suggests a certain stability in the ecological and environmental conditions of these deposits, although due to stressed conditions, the corals capable of inhabiting those environments are restricted to a limited suite of genera adapted to turbid conditions. In contrast, Association 5, as in previous reefs, suggests rather hostile environments for coral settlement.

Type 4 reefs show an extremely rapid variation of facies and environmental conditions (Table 3), from deep-low energy at the base passing into shallow water in the upper part, as well as from dysphotic to euphotic conditions (Figs. 7k, 8k), in shallowing-upward and less turbid-upward trends. These facts suggest that there is no stability in the environment, and that the fluctuating conditions control the occurrence of numerous corals, but that the genera could not diversify under such conditions. Some values of index 1 suggest that the high species richness can be attributed to shallower water environments than the overlying reefs. In general, there seems to be an increasing trend in the water bathymetry between reef types 1–3, whereas type 4 is more similar to bathymetric conditions in type 1.

Type 5 coral reefs are localized in rather stable environments, as indicated by the high richness values, and usually they seem to be juxtaposed to oolitic shoals in protected areas (Strasser et al. 2015). Detailed composition, distribution, and ecological factors affecting these biostromes have been discussed by previous scholars (e.g., Said et al. 2010; 2011; Rodríguez et al. 2016, 2022).

Comparison with reefs in the southern AKB

The southern region is located south of the Aguelmous Fault (Fig. 1). Some local formation names have been described in the southern AKB (e.g., Huvelin 1969, 1973; Verset 1988; Izart 1990). There is only a consensus that the youngest Carboniferous deposits in Khenifra yields flysch and wild-flysch deposits.

Abundant rugose corals are recorded in Tabaïnout (Fig. 3e), as well as in Tiaouinine (Bou Guergour), and in both sections the microbial facies are predominant, growing directly on the Cambro-Ordovician basement on horst structures, only separated by some basal siliciclastic deposits. In contrast, within the wild-flysch, there is a predominance of microbial carbonates occurring in folded carbonate ridges along the main valleys of the region (see details of the ridges in the geological map of El Houicha 1994). Some of those ridges are formed by olistostromes with microbial carbonate blocks (frequently decameter in size), where local patches with rugose corals are recorded, but of low diversity and abundance as to be considered in this study. However, from north to south, some ridges contain intact parts of the platform which, according to previous authors, have been possibly involved in downslope sliding into the basin and subsequently deformed in post-sedimentary events. These platforms yield common bioclastic/oolitic and microbial carbonates.

Tabaïnout

The Tabaïnout section in the west contains a basal unit, predominantly non-microbial, as precursor strata, composed of breccias, conglomerates (Fig. 3d), tempestitic packstones, with local patches of microbial carbonates (Table 4). These packstones contain abundant corals (TB1 in Fig. 4), with high species richness and moderate taxonomic diversity. Similar parameters are only observed in the coral biostrome of Souk el Had (SeH in Fig. 4), which is also representative of the same biostratigraphic levels. Slightly younger in age, but showing a similar coral bioherm, is the coral reef in the Kef en N’sour section, although there, the abundance, and mostly the taxonomic diversity is lower than in the above localities (K’nS in Fig. 4). Coeval strata in the northern part of the basin, however, do not contain corals (bioclastic-siliciclastic base of Tizra Formation below the reefs). They show similar diversity and richness parameters as in the bioconstruction type 5, although with a different age, and subsequently with a different taxonomic composition.

Above the basal unit of conglomerates and bioclastic limestones (Fig. 3d) in the Tabaïnout section, very thick massive microbial limestones accumulated, that are 55 to 100 m thick, where bedding planes delimiting individual reefs are absent. Fabrics are mostly cement-supported, whereas in the lower part, intraclastic-bioclastic fabrics are also common and cementstone in the upper part (Table 4), although micritic fabrics are also recognised in the core of the mound (Fig. 6h). Flank strata are rare but present in the upper irregular palaeorelief, mostly yielding numerous reworked goniatites. The upper part of the mound contains about 10–20 m-thick cap strata (Figs. 3e, 6a), mostly into the southern border of the ridge, whereas they have not been recognised in more central positions of the ridge (to the northeast). The succession can be considered as partly condensed, because the late Asbian to Namurian succession (recognised by means of a specimen of the goniatite Cravenoceras 20 m above the buildup top) is about 100–150 m thick in Tabaïnout, whereas the coeval succession in the Tizra Formation is nearly 400 m thick.

The CCA index 1 values are below 40, indicating low energy/deep water, but there are also common samples with values between 40 and 65 (Fig. 7l). Apart from the muddy basal samples, the rest of the reef developed in euphotic conditions and local dysphotic conditions in the upper part (Fig. 8l). The top aphotic sample, corresponds to a turbiditic level recorded nearly 20 m above the top of the mound. High-frequency cyclicity does not seem to be present, and only some overall composite shallowing-/deepening-upward trends in the lower half of the reef, and a more generalised deepening upward in the upper half (Fig. 7l) can be discerned. There is a rugose coral assemblage recorded in the core strata, distributed sparsely, which is characterised by very rare solitary rugose corals. This assemblage shows a low species richness and a high taxonomic diversity (TB2 in Fig. 4). It is rather similar in parameters and composition to the Association 5 recorded in Tizra (Table 6). Tabaïnout is noteworthy, for the high concentration of rugose corals in the cap strata (Somerville et al. 2012; Fig. 3e), being composed mostly of fasciculate and cerioid colonies, as well as abundant solitary dissepimented rugose corals. These assemblages show a high species richness and taxonomic diversity (TB3 in Fig. 4), being more favourable conditions for the corals than the underlying core strata. In term of species richness, those strata are similar to the Assemblage 6 and Idmarrach 3 assemblages of the northern AKB (Table 6), although they differ significantly in the taxonomic diversity (see Said et al. 2013), suggesting that the environment in Tabaïnout was much more stable. Within the shales, 15–20 m above the top of the mound, a new coral assemblage occurs in turbiditic and shaley levels. It is characterised by solitary non-dissepimented rugosans and tabulate corals, and with a moderate species richness and high taxonomic diversity (TB4 in Fig. 4), which compare closely with the flanks assemblage recorded in Tizra (Association 4), suggesting similar turbid environments, limited to a few coral genera. Taking these trends into consideration, the Tabaïnout complex is compared with the composite reef types 2 and 3 of the Tizra Formation, and the basal packstone unit might be coeval with the type 1 reef.

Tiaouinine

The Tiaouinine outcrop (Bou Guergour) shows rapid facies variation over a short lateral distance, forming a complete reefal structure with back reef, main reef tract and fore reef slope units distinguishable (Rodríguez et al. 2012). The sections in the northern border (Tiaouinine 3–1 and 3–2) contain mostly the flank strata of the reefs with common breccias, whereas section Tiaouinine 1 contains mostly microbial facies of the core with a thin basal siliciclastic/bioclastic units (< 5 m) and Tiaouinine 2 exposes a thicker basal siliciclastic/bioclastic unit (Fig. 3f) and poorly developed microbial core. Laterally, a slope of the reef occurs (Fig. 3g). In spite of the varied facies, the conditions in the carbonates in the core of the reef are predominantly of low energy/deep and euphotic also for the bioclastic basal unit (Fig. 6d). However, levels with abundant corals indicate shallower/higher energy conditions (Fig. 8n). Morphological differences with Tabaïnout can be discerned by field observations (compare Rodríguez et al. 2012 and Somerville et al. 2012), but these reefs in Tiaouinine share the similar values and trends as in Tabaïnout (Fig. 7m), and thus, are mostly amalgamated bioconstruction types 2 and 3. Except for the absence of cementstone, fabrics in the microbial limestones are rather similar to those observed in Tabaïnout (Table 4). The lower part of the succession is replaced by sandstones, carbonate sandstone and bioclastic carbonate beds, and the trends are not well observed (Fig. 7n). Similarly, the turbidity trends cannot be equated to those recorded in other reefs of the same types (Fig. 8m‒n). Coral assemblages of Tiaouinine 1 are probably one of the most abundant for any Mississippian section (Rodríguez et al. 2012), yielding abundant fasciculate and cerioid rugosan and tabulate colonies, as well as abundant large solitary dissepimented rugosans. The species richness is the highest recorded in the AKB (TIO 1 in Table 6 and Fig. 4), with a moderate to high taxonomic diversity, confirming environmental stability during the growth of the bioconstruction. In contrast, most of the coral assemblages recorded in Tiaouinine 2 are recorded in levels immediately above the siliciclastic sedimentation, in packstone and grainstone facies, which seems to condition lower values than in Tiaouinine 1 (see TIO2 in Fig. 4).

Sections in the wild-flysch

The Marzekkallal section is part of a continuous ridge which extends to the north, is also present at Hejra Mkoubeba and continues up to the junction with the road from Khenifra to Aguelmous, with similar rocks and architecture. To the north of those outcrops, and separated by a fault, the Ben el Hayah section contains also a similar section with basal conglomerates and sandstones. These sections are noteworthy for the rapid facies change in nearby sections, such as Assekkij and Bir en Nehall, from predominantly oolitic to predominantly microbial facies (Fig. 5a, c, h), or mixed facies in Marzekkallal. Microbial facies are composed of predominantly micropeloidal matrix-supported and micritic fabrics (Fig. 6f) (Table 4). Changes from high-energy/shallow-water settings to low-energy/deep- water settings are frequent, with the near absence of samples with index 1 values between 40 and 72 (Fig. 7e‒g). Most samples are located in the euphotic zone, but there are common samples suggesting dysphotic conditions (Fig. 8e‒g). Rugose corals are scarce and unevenly distributed, corresponding to similar compositions to that in the Association 5 of Tizra. These features suggest that those sections are representative of reef type 1, and they present the same biostratigraphy (Fig. 2).

Discussion

Glacioeustasy

Glacioeustasy is an important factor controlling successions of the late Viséan and Serpukhovian due to high-amplitude sea-level falls recorded from this interval in cratonic areas (e.g., Smith and Read 2000; Barnet et al. 2002). During the growth of reef type 1 in the northern AKB, up to 10 high-frequency deepening-shallowing cycles were recognised in the lower part of the early Brigantian, approximately with a duration of 40 Ka using ages in Davydov et al (2012), close to the orbital obliquity cycles, and 61 ka using ages in Aretz et al. (2020), which are intermediate value between the orbital obliquity and eccentricity cycles (Cózar et al. 2022). This high-frequency cyclicity is not recognised in the southern AKB, a fact that is likely attributed to a less intense sampling interval for thinner stratigraphic sections in the southern AKB. However, in sections such as Bir en Nehall and Assekkij, 4–5 deepening-shallowing cycles can be observed. An important glacioeustatic control is not inferred for the stratigraphically younger reefs (types 2–4), where energy, bathymetry and turbidity are the controlling factors, although some major shallowing- and deepening-upwards trends are recognised. The extensional tectonics and glacioeustasy allowed rapid deposition of intertidal rocks directly over the reef type 1, developing more than 10 cycles during the lower half of the early Brigantian. In contrast, a more constant subsidence during the development of the reef types 2 and 3 allowed more uniform deeper water settings and longer deepening- and shallowing-upward sequences for the uppermost early Brigantian and early Serpukovian (Fig. 9).

Fig. 9
figure 9

Lithostratigraphical comparison of type 1 to type 4 reefs in the AKB (see legend in Fig. 7 for explanation of facies). Nam base of the Namurian, Bash Bashkirian

Owing to the bathymetric trends observed within the main bulk of the microbial reefs, the mechanism for growth cessation seems to be related to the deepening sequences observed in the upper part of the reef types 2, 3 and 4 (Fig. 7), and the flourishment of the calcimicrobes stopped in excessively deep-water settings. However, in reef type 1, the interaction of several factors seem to control the cessation of their growth. Whereas, tectonics seem to be the main factor controlling the generation of accommodation space, and thus, the conditions necessary for the onset of their growth, the rapid glacioeustatic fluctuations, and generation of shallower water settings, seem to condition the cessation of the reefs. The onset for the growth of the reef types 2, 3 and 4 is not clear enough, because they have different features, in some cases with typical tempestites as precursor facies, but in others, growing directly in the shales. Possibly, this change between the shales and the microbial carbonates is associated with a shallowing event, which could be related to global glacioeustasy or local tectonics.

Relationship between the wild-flysch and the horsts

The reefs in the northern and southern AKB show similar lithostratigraphy, biostratigraphy, and ecological conditions. The main difference is the autochthony or allochthony of the lithostratigraphical units. Thus, in the case of the Tabaïnout and Tiaouinine reefs, they are preserved in situ, directly succeeding the Cambrian-Ordovician basement rocks, whereas the Tizra Formation overthrusts a shaley upper Viséan-upper Serpukhovian succession, due to post-sedimentary and post-Serpukhovian tectonics (M’Taoutoult Formation; Fig. 1). On the other hand, the flysch and wild-flysch is generally considered to be resting on the successions that accumulated on the horst (e.g., Tiaouinine and Tabaïnout). Another important point is that there are no Serpukhovian or younger strata that have been dated in the flysch/wild-flysch deposits (only uppermost early Brigantian strata might be present, represented by shales; Fig. 9). Only close to Sidi Lamine, the overlying succession to the Kef en N’sour biostrome contains lower Serpukhovian shales and siltstones (P2a and P2b ammonoid zones; Termier 1936), but the lithological succession is distinct in this region, which can be interpreted as having had a slightly different evolution than the main basin. Another difference is the occurrence of late Serpukhovian-Bashkirian carbonate platforms in the northern AKB (Fig. 9). A final difference between the southern and northern lithostratigraphical units is observed in the lower part of the mounds growing directly on the basement, where the microbial growth started with the type 2 reefs. Although the lower mid part of the succession in the Tabaïnout section is biostratigraphically poorly constrained, the Tiaouinine 2 section suggests that the siliciclastics and bioclastic limestones recorded in this lower part represent the late Asbian-early Brigantian interval, where the type 1 reefs should had been developed.

In addition, it is necessary to take into consideration that most previous dating in the region recognised the Viséan, Namurian and Westphalian, but some authors used the Serpukhovian as equivalent to the Namurian (E1 and E2 zones = Pendleian and Arnsbergian substages, respectively) (e.g., Roddaz et al. 2002; Michard et al. 2010; Ntarmaouchant et al. 2016; Lahfid et al. 2019). However, as shown in Cózar and Somerville (2016, 2021), the base of the Namurian defined on deep-water settings with goniatites in Western Europe does not coincide with the base of the Serpukhovian defined in shallow-water carbonates using foraminifers in the Russian Platform, and the base of the Namurian should be correlated with the upper part of the early Serpukhovian. This incorrect positioning of the basal Serpukhovian and Namurian, conditions many of the previous interpretations in the basin and timing of events.

The presumed stratigraphical relationship of the wild-flysch above the platform carbonates on the horst structures, implies that the latter could not be the main source area to feed the large olistostromes or klippes in the wild-flysch, because there is no reef type 1 in these locations and they are of a younger age. However, some small olistolites, as well as some pebbles in the basal conglomerates, might be derived from those successions in the horst, as interpreted by Huvelin and Mamet (1997) for the basal Tadaïssout conglomerates northeast of Jbel Hadid. This fact suggests several hypotheses.

Hypothesis A, the original platform feeding the wild-flysch would have to have been located in the north or northeast, and it was completely destroyed or it is currently overthrusted by the Khenifra and Ziar nappes. This hypothesis is further supported by the lithological similarity in the Devonian olistolites in Sidi Amar with those of the gliding Mrirt Nappe (Becker et al. 2020), suggesting that the source for the wild-flysch is in the eastern-northeastern regions. In such a scenario, and taking into account that the Namurian s.s. has been recognised in shales 15–20 m above the Tabaïnout mound complex, the age for the wild-flysch should be Namurian (late Serpukhovian and even Bashkirian). This is a rather implausible scenario, where a vast flysch does not contain any fossils to confirm the chronostratigraphy.

Hypothesis B, the entire wild-flysch is another gliding nappe with its origin in eastward or northeastward positions. Tectonic and gliding nappes are commonly described for different sectors in the region (e.g., Allary et al. 1976; Verset 1983; Bouabdelli 1989; El Houicha 1994; Huvelin and Mamet 1997), although never interpreted for the flysch as a whole. This hypothesis would imply that the tectonic phase for the emplacement of gliding nappes should have started by the latest Asbian, an age attributed to the basal conglomerates and breccias.

Hypothesis C, part of the early Brigantian platform is still preserved. The eastern outcrops contain folded ridges of sections as Assekkij, Bir en Nehall and Marzekkallal, show similar stratigraphical orientation. It is rather unusual for such a large alignment of well-preserved fragments of the platform, stratigraphically well oriented, if all of them are olistolites and klippen. Furthermore, in this region, the bivalve Posidonia becheri has been recorded in the shales, and thus, confirming the same early Brigantian age as the carbonates. This would justify the late Asbian-early Brigantian age for this sector (in carbonates and shales), whereas the rest of the wild-flysch could correspond to a Serpukhovian age, with olistolites and klippen derived from this sector. However, as in hypothesis A, the absence of any fossils confirming the later age for the flysch is a puzzling fact that needs to be further investigated.

Accommodation space

The northern and southern AKB show different intervals where the subsidence rate varies. During the early Brigantian, it is nearly three times higher in the northern part than in the southern AKB. As a consequence, there is a substantial difference in the thickness of sediments that accumulated for the early Brigantian in the northern and southern zones; it can be 300 m thick in the northern AKB, whereas in the southern AKB it is no more than 10–60 m thick, such as in Tabaïnout and Tiaouinine. Nevertheless, this interval in the wild-flysch shows a higher subsidence rate, accumulating for the same period more than 400 m of sediments. This difference is explained by a lower rate of subsidence for the platform sediments, which developed directly over rigid horst structures (Zaian Mountains and Bou Guergour).

Tectonics

In previous assessments, the compressional tectonics was attributed to the late Viséan (Allary et al. 1972, 1976), and characterised by a compressional nappe (Khenifra Nappe), followed by a subsequent gliding nappe (Ziar-Mrirt) and associated klippen from Sidi Amar. However, later, Huvelin and Mamet (1997) described three extensional phases for the Viséan, and they questioned a possible first compressional stage from the early Asbian, a period that can be readily discarded, because most sedimentation in the basin is younger, and that during this period, only extensional faults existed in the basin (El Houicha 1994; Ghfir and Hoepffner 2001).

In more recent works, the second or main compressional phase was considered to have first started at the base of the Namurian or during post-Serpukhovian times (e.g., Lahfid et al. 2019). Certainly, at the base of the Namurian s.s. (= uppermost part of the early Serpukhovian), there is a higher accumulation of flysch and wild-flysch deposits in the southern AKB, as well as is observed in the Idmarrach Formation (in the upper part of Idmarrach 3 section), Tabaïnout, and in the so-called Adarouch depocentre of Ben Abbou et al. (2001), as well as massive deltaic greywacke accumulations in the Akerchi, Idmarrach and Tirhela formations. This would suggest that a stronger tectonic phase occurred from the base of the Namurian s.s., which might also explain the low-angle unconformity recorded between the flysch and platform carbonates in the southern AKB (Chanton-Güvenç et al. 1971), but not necessarily the onset of this phase. A post-Serpukhovian onset for the compressional tectonics is only supported by the main phase of folding in the region, forming large-scale folds sealed by the Permian Ment granite at 280–270 Ma (Bouabdelli 1989; Michard et al. 2010; Lahfid et al. 2019; Fig. 1). However, there are numerous evidences of tectonics from older levels, as well as in well-dated upper Serpukhovian sections spanning the transition into the Bashkirian, marked by regressive sequences with continental conglomerates and greywackes (e.g., Tirhela and Idmarrach 2; Cózar et al. 2011).

During the growth of the reefs, extensional tectonics is recognised during the late Asbian and lowermost part of the early Brigantian, highlighted by (1) the conglomeratic deposits at the base of the formations (at the base of the Sidi Lamine region and Jbel Hadid in the south, as well as in the M’taoutoult and Izdi Hayane formations in the northern region; Fig. 1); (2) syn-sedimentary extensional faults in the lower part of the Tizra Formation (Cózar et al. 2022); (3) the more marked imprint of glacioeustasy for the early Brigantian mentioned above; and (4) different rates of subsidence for the early Brigantian attributed to the tectonics. These extensional features correspond to the latest stage of the extensional tectonic regime that acted during the Lower Carboniferous (Huvelin 1973; Beauchamp and Izart 1987). There is no direct evidence of tectonics in the reef types 2 to 4, which seem to have been developed in a more stable subsidence regime, which could be attributed still to an extensional regime leading to deepening sequences. However, at a basinal scale, there are also thick conglomerate/sandstone deposits in the uppermost early Brigantian and basal early Serpukhovian in the northern AKB (Mouarhaz, Akerchi, Idmarrach formations; Fig. 1), characterised by shallowing sequences, as well as a level coinciding with the cessation of sedimentation in other formations in the entire AKB (Oued Oulili, Oued Boumhares, Bou Issakla-Moumjtach, Mçawwar, Ben Smim, Aïn Ichou, Monchenkour and the carbonates in the southern wild-flysch; Fig. 1). These contradictory facts suggest an inversion during the tectonic regime, passing to a compressional phase approximately at the Viséan/Serpukhovian boundary in some parts of the basin, whereas in other parts, the predominant regime could be still extensional. Instead of a single event, a polyphase evolution of the basin might explain those differences, a plausible evolution which needs further biostratigraphic/lithostratigraphic investigation in this poorly known basin.

Conclusions

Four types of reefs from the Brigantian to early Serpukhovian interval are recognised in stratigraphic succession. Some of the reefs are rich in rugose corals, mostly in the intermound strata. In contrast, coral reefs are rare, occurring mostly in back oolitic shoals at different chronostratigraphic levels. The reefs in the northern AKB are very similar in many aspects to those recorded in the southern AKB, including being synchronously developed.

  • Type 1 microbial reefs grew in both shallow- and deep-water settings and with a strong control by glacioeustasy (generating common high-frequency cyclicity).

  • Type 2 microbial reefs developed in more tranquil periods, associated with common intermound strata, as well as shallower water siliciclastic/bioclastic sediments, and where, only a single major regressive-transgressive sequence is recognised.

  • Type 3 microbial reefs developed in constant deeper water conditions generated by higher rates of subsidence in the basin, and generating an overall deepening-upward sequence.

  • Type 4 microbial reefs recognised in the northern AKB have no clear counterparts in the southern AKB, but they are likely the cap strata observed in the latter area.

  • Rugose corals are unevenly distributed, and apart from the poor assemblages in the core strata of the reefs, they show few similarities. In addition, they allow to define a Type 5 coral reefs, unrelated to microbial facies, with similar environmental conditions.

  • Type 1 reefs are mostly controlled by glacioeustasy and extensional syn-sedimentary faults, whereas type 2 to 4 reefs are primary controlled by more stable subsidence rates (possibly in an extensional regime) and the coral assemblages of type 5 reefs are mostly controlled by ecological parameters

  • Similar types of reefs allow to recognise that conditions in the northern and southern AKB are not as different as previously assumed for the carbonate precipitation, and a lithostratigraphical uniformity occurs, as well as similar environmental and tectonic conditions.

  • Regional features suggest that the basin evolved from an extensional tectonic regime during the early Brigantian into a compressional regime during the early Serpukhovian in the central areas and in the wild-flysch, whereas early Serpukhovian outcrops show still extensional features. This fact questions the onset of the Variscan phase in the Moroccan Meseta in a single phase for the entire basin.