Habitat amount and distribution modify community dynamics under climate change

Habitat fragmentation may present a major impediment to species range shifts caused by climate change, but how it affects local community dynamics in a changing climate has so far not been adequately investigated empirically. Using long-term monitoring data of butterﬂy assemblages, we tested the effects of the amount and distribution of semi-natural habitat (SNH), moderated by species traits, on climate-driven species turnover. We found that spatially dispersed SNH favoured the colonisation of warm-adapted and mobile species. In contrast, extinction risk of cold-adapted species increased in dispersed (as opposed to aggregated) habitats and when the amount of SNH was low. Strengthening habitat networks by maintaining or creating stepping-stone patches could thus allow warm-adapted species to expand their range, while increasing the area of natural habitat and its spatial cohesion may be important to aid the local persistence of species threatened by a warming climate.


INTRODUCTION
Species are shifting their distributions in response to climate change (Chen et al. 2011;Pecl et al. 2017).At a local scale, climate change is causing a re-organisation of biological communities that depends on the climatic preference of the species.Specifically, species adapted to relatively cold climates go locally extinct when temperature exceeds their thermal tolerance, while those adapted to warmer climates colonise sites that were previously too cold when they become suitable (Jackson & Sax, 2010).
Community reorganisation during climate warming has been revealed empirically by a positive trend in Community Temperature Index (CTI), a community-weighted mean index of species-specific temperature preferences (Devictor et al. 2008), in a variety of taxa around the world (e.g.Devictor et al. 2012;Fourcade et al. 2019;Martin et al. 2019).An increasing CTI, as typically observed, means that a species assemblage is increasingly dominated by species adapted to warm climates.However, studies investigating CTI trends provide evidence that most communities do not restructure fast enough to keep pace with climate change and lag behind temperature warming, creating a so-called climatic debt (Devictor et al. 2012;Savage & Vellend, 2015).More generally, biological communities show various levels of disequilibrium with regard to climate that depend on species traits, local drivers of environmental filtering and historical legacy (Blonder et al. 2015;Ga€ uz ere et al. 2018).
Local species turnover in response to climate change is dependent on the ability of climate-tracking species to actually disperse in the landscape and colonise new habitats (Opdam & Wascher, 2004;Schloss et al. 2012;McGuire et al. 2016;Littlefield et al. 2017).For this reason, ensuring that presentday climates and their future analogues are connected in space is increasingly highlighted as an important feature of landscape management and reserve design in a changing climate (McGuire et al. 2016;Littlefield et al. 2017).Habitat fragmentation, that is the subdivision of habitats into smaller and more isolated patches, leads to both a reduction of the amount of habitat that is available for species and an alteration of its spatial distribution (Fahrig, 2003).Although the respective effect of changing habitat area and distribution remains controversial (Fahrig, 2017;Fletcher et al. 2018), we know that fragmentation sensu lato contributes to reducing population viability and connectivity between the remnant patches (Thomas, 2000).As such, it can potentially prevent species from colonising habitats that have otherwise become suitable as a result of climate change, and thus contribute to a lag in community response to climate change (Schloss et al. 2012).Still, there is only little empirical evaluation of the simultaneous and interacting effects of both the amount and spatial configuration of habitat on recent climate-change-driven reorganisation of biological communities (but see Jarzyna et al. 2015;Oliver et al. 2015;Kuczynski et al. 2018).
To better understand how habitat fragmentation affects community dynamics under climate change, we also need to examine long-term dynamics of individual species.Indeed, we expect species to respond differently to temperature change and landscape configuration depending on their traits.Specifically, the probability for a species to successfully shift its range depends on various life-history traits linked to its emigration propensity, its movement ability and its capacity to establish and proliferate in new habitats (Estrada et al. 2016).Moreover, species' dispersal ability is a key to predict their response to habitat fragmentation (Thomas, 2000;€ Ockinger et al. 2010), so that we expect this trait to be highly influential with regard to species' probability to shift their range in a fragmented landscape.
In this study, we built on data from long-term monitoring of butterflies in two European countries (Finland and the Netherlands) and European-scale land cover maps to test whether local species turnover in response to climate change is affected by habitat fragmentation.First, we assessed how long-term community dynamics in response to climate change was affected by the amount and configuration of semi-natural habitat (SNH) at different spatial scales.Second, we tested for the effect of the amount and configuration of SNH and various species traits, alone and in interaction, on colonisations by warm-adapted species and extinctions of cold-adapted species, that is the processes that underlie changes in community composition in a changing climate.Our combination of analyses at the community level with estimates of local colonisation and extirpation events, coupled with information on species traits, allows to assess empirically how landscape configuration shapes community dynamics in a changing climate.

Butterfly monitoring data and community temperature index
We used data from established schemes of butterfly monitoring in Finland (101 sites from 1999 to 2016) and the Netherlands (1074 sites from 1992 to 2016) to describe long-term changes in species composition (Appendix S1, Methods S1.1).Both monitoring schemes belong to a standardised, pan-European programme of butterfly monitoring (reviewed in van Swaay et al. 2008) inspired from the national butterfly monitoring scheme initiated in the UK as early as 1976 (Pollard, 1977).As such, they allow for a comparable estimation of butterfly presence and abundance across sites and years, making them suitable for joint analysis of the long-term dynamics of European butterfly communities.During the period of monitoring, 99% of sites have experienced an increase in their mean annual temperature, with an average of + 0.024 °C year À1 in Finland and + 0.017 °C year À1 in the Netherlands (Appendix S1, Methods S1.1).
In total, 98 butterfly species have been recorded, including 10 species found only in the Netherlands and 51 found only in Finland.All of them were characterised by their species temperature index, defined as the average temperature conditions experienced by a species across its distributional range (Devictor et al. 2008).This species temperature index was used to calculate, in each monitoring site and each year, the community temperature index (CTI) by averaging the species temperature index of all co-occurring species (Appendix S1, Methods S1.2).We computed both presence-only CTI, based only on the identity of species present in a given site, and abundance-weighted CTI, weighting species temperature indices by species' abundances.Because we were interested in the process of species turnover and colonisation-extinction dynamics, we mainly discuss analyses based on presence-only data.

Landscape variables and fragmentation indices
Our evaluation of habitat fragmentation was based on land cover maps obtained from the CORINE land cover database (European Environment Agency), reclassified into semi-natural habitat (SNH) and non-habitat.Our classification of SNH essentially excluded high-intensity land use such as urban and industrial areas, or croplands that have been repeatedly shown to affect populations negatively (e.g.Maes & Van Dyck, 2001) and to limit the adaptive reorganisation of butterflies under climate warming (Oliver et al. 2017).Because all butterfly species do not necessarily use the same habitats (van Swaay et al. 2006), we produced three different maps of SNH: (1) generalist, defined as all land covers that could potentially provide high-quality habitat for butterflies, (2) open, excluding forest land cover types from the previous classification, and (3) forest, including only forest land cover categories (Appendix S1, Methods S1.3).
What is usually considered under the broad umbrella term of habitat fragmentation is both habitat loss, that is the reduction of patch area, and the spatial separation of habitat (Fahrig, 2003).To tease apart the role of these two aspects, we extracted two descriptors of the fragmentation of SNH in buffer areas (seven different radii of 1 km, 3 km, 5 km, 10 km, 20 km, 30 km and 50 km) around butterfly monitoring sites (Fig. 1a and Appendix S1, Methods S1.4).First, we calculated the proportion of SNH area, which has been shown in numerous studies to influence species richness and abundance of arthropods, including butterflies ( € Ockinger & Smith, 2006;Krauss et al. 2010;€ Ockinger et al. 2010;Oliver et al. 2013).Second, we extracted the aggregation of SNH to describe the spatial arrangement of SNH.We used as aggregation index the clumpiness index (CLUMPY), initially developed for the FRAGSTAT program (McGarigal et al. 2012), because it is independent from the amount of habitat (Appendix S1, Methods S1.4).

Species traits
We related the species-specific responses to habitat fragmentation and climate change to the traits of each species (Appendix S1, Methods S1.2).First, we used a database of European butterflies' life-history traits that consists of 16 species traits reduced into four principal components (Wal-lisDeVries, 2014).We used here the first, third and fourth principal components that represent, respectively: species' spatial use of the landscape, including individuals' mobility but also population area and reproduction productivity, thus representing both dispersal and propagule pressure; generation time (i.e. the inverse of developmental rate) and phenology; and resource specialisation.Instead of the climatically based second principal component of WallisDeVries ( 2014), we introduce the concept of a relative species temperature index (rSTI), which we define as the difference between the species temperature index (Schweiger et al. 2014) of certain species and the community temperature index (CTI) for all species observed in a given site and in a given year.Thus, this index depends both on a species' thermal optimum and the local conditions in a given year (Appendix S1, Methods S1.7).This trait was used to identify warm-adapted species as species contributing to an increasing local CTI upon colonisation (rSTI > 0), whereas cold-adapted species (rSTI < 0) are expected to go locally extinct in a warming climate (see below).

Colonisations and extinctions
To clarify the effect of fragmentation on climate-driven community dynamics, we aimed to disentangle how the processes of colonisation and extinction contribute to long-term changes in community composition.More precisely, we assessed the role habitat fragmentation plays in the colonisations of 'warm-adapted' climate-tracking species and in local extinctions of 'cold-adapted' species extirpated by climate change, as a way to gain insights into the mechanisms behind the observed CTI trends.Our approach consisted first in identifying events of colonisations and extinctions, taking into account the risk of imperfect detection (Appendix S2, Methods S1.5).Since we based our inferences on the same data as for the analyses of CTI trends (i.e. the identity of species observed in each site and each year), we ensured that both analytical steps were directly comparable.Here, we were not interested in all colonisation or extinction events, which could arise because of many factors (e.g.stochastic metapopulation dynamics, changes in land-use, extreme climatic events), but only in those that directly contribute to an increase in CTI and hence are likely to be related to climate change, that is species turnover in response to a climate warming.

Data analysis
All statistical models described below were computed in the R environment (R Development Core Team, 2018) using the 'lme4' R package (Bates et al. 2015).Explanatory variables were centred and scaled to ease computation and to provide comparable estimates within and across models.Models were evaluated using several complementary approaches, including visual inspection of residuals, computation of goodness-of-fit metrics (R 2 ) and cross-validation of models' predictive accuracy (Appendix S1, Methods S1.6).Confidence intervals (95%) around model coefficients were estimated by a bootstrap procedure.Partial regression plots were produced using the 'visreg' R package (Breheny & Burchett, 2017) by computing the variation of the response across levels of a focal variable while keeping all other variables at their median value.

Community dynamics
In a first step, we wanted to see how changes in community temperature index over time were affected by the proportion and aggregation of semi-natural habitat around monitoring sites.We used the classification of SNH based on the location of monitoring sites: sites dominated by a forest land cover category according to the CORINE data (broad-leaved forest, coniferous forest, mixed forest) were assigned fragmentation variables corresponding to forest habitats, all the others to open habitats (Appendix S1, Methods S1.3).Then, we built linear mixed models with CTI as the response variable and the three-way interaction between year, proportion of SNH and aggregation of SNH as fixed explanatory variables.Moreover, we included as an additional predictor the two-way interaction between year and habitat type (forest vs. open habitat), to account for the fact that open and forest landscapes may have different CTI trends on average.We allowed random intercepts and random slopes of year at each site, to account for site-specific differences in mean and temporal trends of CTI.To account for spatial autocorrelation and because the buffers from which fragmentation indices were extracted overlapped, especially at large scale, we: (1) nested the site random factor within the identity of 50 9 50 km grid cells to account for regional differences, and (2) included in the models the interaction between latitude and longitude as a fixed factor.All lower-order interactions and main effects were also included.We tested the consistency of the results by repeating the analysis for different subsets of data (Finland or the Netherlands separately or the data from both countries merged), for presence-only CTI or abundance-weighted CTI, and with SNH maps defined using the same generalist classification or separating forest and open sites.In total, we fitted 84 different models (3 datasets [2 countries + both] 9 2 types of CTI [presence-only + abundance-weighted] 9 2 classification of SNH [generalist + site-specific] 9 7 spatial scales).
For illustration purposes, estimates of CTI temporal trends were computed for a few discrete values of proportion and aggregation of SNH using the 'emmeans' R package (Lenth, 2018), and compared to the mean temperature trend across all monitoring sites during the period 1990-2016 estimated from the E-OBS temperature gridded data version 17.0 (Haylock et al. 2008).Direct comparisons of estimates of CTI and temperature trends may be biased because they are based on different climate data.To make sure that they can be safely compared, we expressed them as a spatial shift in community composition or temperature (Devictor et al. 2012).Because there is a linear latitudinal gradient in both CTI and temperature, we can convert temporal trends in CTI and measured temperature into an annual northward shift (in km year À1 ) by dividing the annual rate of CTI or temperature change (in °C year À1 ) by the south-to-north decrease of CTI or temperature (in °C km À1 ).

Colonisations and extinctions
In a second step, we aimed to find out which butterfly species are affected by climate change and habitat fragmentation, by assessing how these factors contributed to colonisations and extinctions.For this purpose, we ran two generalised linear mixed models with a binomial distribution and a logit link, for the colonisations vs. non-colonisations of warm-adapted species, and for the extinction vs. persistence of cold-adapted species respectively (see above the classification of colonisations and extinctions).We included three species traitsspecies' spatial use, generation time and resource specialisationand the proportion and aggregation of SNH as fixed explanatory variables.We also added the three-way interactions between species' spatial use and the proportion of SNH and the aggregation of SNH.Thus, we tested how colonisation and extinction probabilities varied depending on habitat fragmentation, and whether they depended on species' mobility, while accounting for other traits that might also influence colonisations and extinctions.As with the models of CTI change over time, we added site identity nested within the identity of 50 9 50 km grid cells as a random intercept, as well as the interaction between latitude and longitude as an additional fixed factor.In this procedure, instead of the classification based on site's location as in the CTI analysis, we used a species-specific definition of SNH based on an evaluation of butterflies' biotope use in Europe (van Swaay et al. 2006).Specifically, colonisation and extinction events involving species known as forest specialists were modelled using fragmentation variables derived from the forest definition of SNH.Similarly, colonisation and extinction events involving grassland specialists were based on the open SNH, while the generalist classification of SNH was used for all other species.To account for this additional factor, we included the habitat type (forest, open or generalist) as a fixed factor.Finally, species identity and year were incorporated in the models as random intercepts.In this second set of analyses, we fitted a total of 14 different models (2 processes analysed (colonisation + extinction) 9 7 spatial scales).

Community dynamics
As expected, we found a positive overall temporal trend in CTI, that was insensitive to habitat type (Appendix S2, Results S2.4).However, we found that both the amount and configuration of SNH in the surrounding landscape or region independently influenced the observed trend in CTI within a site (Fig. 1b).These effects appeared to increase with spatial scale, becoming clearly discernible from 0 at all spatial scales larger than 10 km (except for the interaction).The maximum effect sizes were reached at 10-30 km scale depending on the variable considered, then levelled-off or decreased, suggesting that habitat amount and configuration had the highest effect on CTI trends at spatial scales of a few dozen kilometres.Specifically, there was a positive effect of the proportion of SNH on CTI trend, while higher aggregation of SNH had a negative effect on CTI trend.At intermediate scales, the negative effect of the aggregation of SNH on CTI trend was even reinforced in landscapes comprising a large amount of SNH as indicated by the negative interaction term (Fig. 1b).
Considering an average velocity of observed temperature change across all monitoring sites equivalent to a northward shift of 9.13 km year À1 , butterfly communities lagged behind climate change at median levels of fragmentation (e.g.CTI change equivalent to 1.34 (95% CI: À0.865-3.55)km year À1 for a proportion of SNH = 0.26 and an aggregation of SNH = 0.89, measured at 30 km scale).Larger amounts of SNH associated with a low aggregation reduced this lag, but only sites featuring very high amount and very low aggregation of SNHrelative to the observed valuesprovide conditions sufficient for communities to keep up with the velocity of climate change (e.g.10.00 [95% CI: 6.69-13.3]km year À1 for a proportion of SNH = 0.53 and an aggregation of SNH = 0.80 measured at 30 km scale [90 th and 10 th percentile of the observed values]).
When we used CTI weighted by abundance instead of presence only, we were unable to find an interacting effect of the proportion and aggregation of SNH but the positive effect of the proportion of SNH and the negative effect of aggregation of SNH on CTI trend remained at intermediate spatial scales (Appendix S2,Results S2.3 and S2.4).Confidence intervals around effect sizes increased when we split data by country, probably because it shortened the gradient of fragmentation (sites with a maximum proportion of SNH were found in Finland due to the existence of large forested areas, while agriculture covers a large part of the Netherlands) and reduced data size (Appendix S2, Results S2.3).However, the fact that the same patterns remain suggests that the results hold true for distinct countries and landscape contexts.In addition, results were largely insensitive to the classification of SNH (Appendix S2, Results S2.3).

Colonisations and extinctions
We found that extinction probability of cold-adapted species increased with species' degree of resource specialisation and, although less significantly, tended to be higher in species with low mobility (low values of the spatial use trait) and having a slow development rate (longer generation time).Reciprocally, colonisation probability of warm-adapted species decreased with species' generation time.Species mobility alone (but see below its effect in interaction with SNH fragmentation) and resource specialisation did not influence the probability of colonisation by warm-adapted species (Fig. 2a and b).
We observed an effect of both habitat amount and spatial distribution on the colonisation and extinction processes, notably in interaction with species' spatial use (Fig. 2a).As for community dynamics, effect sizes were mostly indiscernible from 0 at the smallest spatial scales, then increased with increasing spatial scale until they levelled-off, or decreased for some variables or interactions, at the largest spatial scales.The effects of species' mobility and habitat fragmentation were stronger, and thus easier to interpret, for the extinction process than for colonisations (Fig. 2c): a higher proportion and a higher aggregation of SNH clearly decreased the extirpation of cold-adapted species.The negative effect of habitat aggregation of extinction probability was stronger for little mobile species and in a context of low proportion of SNH.Although effect sizes were generally lower, we also observed a negative effect of habitat aggregation on colonisation probability, mostly when species had higher values of the spatial use trait (i.e. when species were more mobile), and when the proportion of SNH was low (Fig. 2a-c).

DISCUSSION
Over the last decades, land use intensification and anthropisation have been the primary drivers of drastic changes in community composition of arthropods globally (e.g.Rader et al. 2014;Hallmann et al. 2017).Climate change, by causing range shifts and acting as an environmental filter of community assembly, also plays a role in the reorganisation of communities (Jackson & Sax, 2010).While the synergetic effects of habitat fragmentation and climate change were recognised more than 15 years ago (Travis, 2003;Opdam & Wascher, 2004), an empirical evaluation of the impact of fragmentation on long-term, climate-driven, dynamics of biological Figure 2 Interactive effect of habitat fragmentation and species traits on colonisation and extinction probabilities.(a) Model coefficients AE 95% confidence intervals show the effect of species traits, fragmentation indices (proportion and aggregation of SNH, measured at various scales from 1 to 50 km) and their interaction on colonisation and extinction probabilities.We illustrate in (b) the effect of three species traits on the colonisation of warm-adapted species, that is those with rSTI > 0 (orange), and the extinction of cold-adapted species, that is those with rSTI < 0 (blue).We show in (c) the interactive effect of species' spatial use (mobility) and fragmentation by plotting the predicted effect of the aggregation of SNH on colonisation (left) or extinction (right) probability, for species classified in low and high spatial use (solid vs. dotted lines), and in landscapes with a low and high amount of SNH (blue vs. communities has been lacking so far.Community turnover in a changing climate and in the presence of landscape fragmentation also depends on contrasting species' responses determined by their traits, which control their sensitivity to temperature changes and anthropogenic disturbance, and influence their spatial dynamics.We provide here the first assessment of this complex interaction between habitat amount, spatial distribution of habitat, climate change, species' thermal niche and mobility.We were able to identify contrasting effects of the amount and spatial distribution of semi-natural habitat on the temporal trends of CTI (mostly presence-only CTI, see additional discussion in Appendix S3), an index of community composition reflecting the relative proportion of warm-and coldadapted species.Specifically, we observed a faster turnover of local communities towards more warm-adapted species in sites with a relatively high cover of SNH in the surrounding area and with a less-aggregated configuration.Congruent studies already showed that large areas of SNH are associated with higher butterfly species richness ( € Ockinger & Smith, 2006;Krauss et al. 2010) and higher resilience of butterfly populations (Oliver et al. 2013;Oliver et al. 2015).Therefore, the positive relationship between CTI trend and the proportion of SNH in the landscape likely reflects the restriction of the successful establishment of range-expanding species by high-intensity land use.The aggregation of habitat patches, especially when the proportion of SNH is low, may contribute to isolate habitats, hence preventing range-expanding species to disperse (Hodgson et al. 2011).
To gain better insights into the actual processes acting on individual species under various landscape configurations, we directly related events of colonisations by warm-adapted species and local extinctions of cold-adapted species, that is the processes of species turnover that drive an increase in CTI in a warming climate, to species' traits and habitat fragmentation.The observed effects of species traits were in line with expectations: in the context of climate and landscape changes, diet generalists, fast-developing and mobile species are likely to better cope with environmental changes (WallisDeVries, 2014).In this regard, specialist species are known to be more affected by land-use change (van Swaay et al. 2006;€ Ockinger et al. 2010).The influence of species' generation time on their extinction risk is also congruent with what has been observed before and linked to the impact of nitrogen availability and microclimatic conditions during larval development (Wal-lisDeVries & Van Swaay, 2006;WallisDeVries, 2014).Moreover, higher mobility and faster development were expected to favour colonisation of new habitats that have become recently suitable (Estrada et al. 2016).
Furthermore, we also provided evidence of an interactive effect of species traits and both SNH amount and configuration on climate-driven species-turnover.Specifically, warm-adapted species (relative to the species pool in the focal site) had larger colonisation probability when SNH was spatially dispersed, this effect being stronger when they were also highly mobile or when SNH was present in low amount.At the same time, larger proportion of SNH and higher aggregation of SNH also decreased extinction risk of cold-adapted species, especially for those that are less mobile.This could reflect the fact that habitat contiguity facilitates population rescue via re-colonisation or dispersion to colder microclimates at the rear edge (Suggitt et al. 2018).In this regard, another landscape feature that could be an important driver of extinction risk at the rear edge is the heterogeneity of habitats that favours the presence of various microclimates.At the local scale, vegetation or topography may create favourable microclimates that allow species to persist long after the regional macroclimate exceeds their thermal tolerance (Turlure et al. 2009;Suggitt et al. 2011;De Frenne et al. 2013) or serve as stepping stones (Hannah et al. 2014).Overall, these results suggest that the negative correlation between CTI trend and SNH aggregation that we observed could be driven by facilitated colonisations of species at their expanding margin when the dispersion of SNH improved connectivity between habitat patches, providing that species' mobility was sufficient to allow such movements, and by faster extinctions of cold-adapted species when SNH is highly dispersed.This effect of habitat aggregation we describe here for butterflies can certainly apply to a wide range of organisms, although its importance in driving long-term community change at larger spatial and taxonomic scales is likely to be highly dependent on the traits of the organisms considered.For example, we expect taxa that are restricted to a specific habitat type to have a stronger need for stepping-stone habitats compared to taxa that are able to use the landscape matrix for their dispersal (Baum et al. 2004).Similarly, organisms with limited dispersal ability may need a finer mosaic of SNH to be able to colonise new habitats as a response to climate change compared to, e.g.birds or large mammals that can sometimes disperse over hundreds of kilometres (Paradis et al. 1998).
Until now, although it was known that some local factors such as local climatic trends, topography, or habitat diversity contribute to the variability in the climatic debts of species and communities (Ga€ uz ere et al. 2016;Ga€ uz ere et al. 2017;Oliver et al. 2017), the impact of habitat fragmentation on community reorganisation during climate change has remained relatively unknown.Three previous studies showed that a higher proportion of (semi-)natural habitat in the landscape contributed to a better adjustment of communities to temperature change in birds and butterflies (Ga€ uz ere et al. 2017;Oliver et al. 2017;Platts et al. 2019), a result we also observed.However, quantifying the effect of the spatial distribution of habitats constituted a serious knowledge gap for the management of landscapes in a context of climate change (but see Hodgson et al. 2011), especially given the ongoing debate around the impact of habitat fragmentation per seas opposed to habitat amounton biodiversity (Fahrig, 2017;Fletcher et al. 2018).The results we report are the first to show a faster re-organisation of communities in sites surrounded by highly dispersed SNH, that is with a low habitat aggregation.We were then able to clarify the complex interaction between climate change, the amount and spatial distribution of semi-natural habitat and species traits, in driving colonisations and extinctions.Knowing how much these factors can be generalised to all kinds of organisms and regions would require additional, similar studies conducted in different contexts.However, we note that all our statistical models had high cross-validation predictive performance (Appendix S2, Results S2.2), showing that they were able to accurately predict CTI and events of colonisations or extinctions in new sites.This suggests that our results have a fair potential of transferability, at least in similar organisms and similar climate and landscape contexts (e.g.insect communities throughout temperature/boreal regions).
By analysing the effects of habitat amount and distribution over a range of spatial scales, we were able to observe that the impact of fragmentation on community dynamics mainly occurred at a scale of 10-30 km, which is far larger than what is usually assumed a relevant scale to detect direct effects of landscape on butterfly communities (e.g.€ Ockinger & Smith, 2006;Krauss et al. 2010).A possible explanation for the small effect sizes observed at small spatial scales could be the coarse resolution of the CORINE database.However, it also suggests that this pattern reflects the detected effect of habitat fragmentation acting on long-term processes such as range expansion and contraction.It is congruent with our hypothesis that, although higher aggregation of SNH may favour the local persistence of species, it could also be detrimental for range-expanding species that need stepping-stone habitats to colonise new sites at their leading edge.
In conclusion, we demonstrated that long-term community dynamics in a changing climate are largely driven by non-random extinctions and colonisations in favour of warm-adapted, mobile, resource generalists and fast-developing species.In the long-term, these trends may lead to considerable species loss and a functional homogenisation of butterfly assemblages (Clavel et al. 2011).We showed that habitat amount and distribution add additional filters, such that highly mobile species could benefit from lower aggregation of the SNH and contribute to the expansion of warm-adapted species, while the local extirpation of cold-adapted species is slowed down in landscapes characterised by an aggregated SNH.This conclusion contrasts with the habitat-amount hypothesis, which postulates that the spatial configuration of habitats does not influence community patterns such as species richness and population abundance (Fahrig, 2017).We demonstrate that, even if this hypothesis is true, it does not apply to community dynamics under climate change, a process for which the distribution of habitat appears important.It also shows that maintaining and increasing habitat area and habitat connectivity in the form of dispersed, stepping-stone patches, is an important strategy to facilitate range shift of species at their leading edge margin.However, we also provide evidence that cold-adapted species, those that naturally tend to be extirpated because of climate warming, may need a different strategy, as their risk of extinction increases when semi-natural habitat is spatially dispersed and rare.Therefore, although retraction of species' ranges at their trailing edge may be inevitable in a warming climate, improving the existing habitat while ensuring its spatial cohesion should be key to slow down extirpations caused by climate change.

Figure 1
Figure 1 Effect of habitat fragmentation on the temporal trend in community temperature index.(a) The descriptors of habitat fragmentation we used include both the amount of available habitat (y-axis, the proportion of semi-natural habitat (green) increases from bottom to top) and the spatial configuration of habitat (x-axis, the aggregation of semi-natural habitat increases from left to right).(b) Model coefficients AE 95% confidence intervals show that the proportion and aggregation of semi-natural habitat have a positive and negative effect, respectively, on the trend in community temperature index, especially when measured at spatial scales larger than 5 km.All model results are shown in Appendix S2, Results S2.4.We illustrate in (c) the effect of two contrasted values of proportion and aggregation of semi-natural habitat (corresponding to the 25th and 75th percentile of our dataset), measured in buffers of 30 km, on the temporal trend in community temperature index.Next to regression lines, the numbers give the temporal trends in CTI translated into northward spatial trends.
Figure2Interactive effect of habitat fragmentation and species traits on colonisation and extinction probabilities.(a) Model coefficients AE 95% confidence intervals show the effect of species traits, fragmentation indices (proportion and aggregation of SNH, measured at various scales from 1 to 50 km) and their interaction on colonisation and extinction probabilities.We illustrate in (b) the effect of three species traits on the colonisation of warm-adapted species, that is those with rSTI > 0 (orange), and the extinction of cold-adapted species, that is those with rSTI < 0 (blue).We show in (c) the interactive effect of species' spatial use (mobility) and fragmentation by plotting the predicted effect of the aggregation of SNH on colonisation (left) or extinction (right) probability, for species classified in low and high spatial use (solid vs. dotted lines), and in landscapes with a low and high amount of SNH (blue vs. red lines).Results shown in (b) and (c) plots are extracted from models built with fragmentation variables measured at 30 km scale.All model results are shown in Appendix S2, Results S2.4