Introduction

Understanding how climate change impacts fertility has been defined as a major goal in recent research on climate change effects (Walsh et al. 2019), with recent evidence suggesting that fertility limits may be better predictors of population persistence under climate change than survival limits (Parratt et al. 2021; van Heerwaarden and Sgrò 2021). Furthermore, a growing number of studies done within this subject have highlighted the development stage as particularly vulnerable to climate change and demonstrated reduced fertility because of impaired gametogenesis—spermatogenesis in particular—upon thermal stress (Vasudeva et al. 2014; Sales et al. 2018, 2021; Canal Domenech and Fricke 2022). Considering the impact on fertility, together with the expected increase in the frequency and duration of abnormally hot periods such as heatwaves (IPCC 2022), it is becoming increasingly urgent to access the negative impact of heat stress on fertility and possible mechanisms that may mitigate such effects.

In the context of climate warming, modifications in mating behaviour can be an important factor for population rescue namely through sexual selection (Cally et al. 2019; Pilakouta and Ålund 2021; Moiron et al. 2022). Pre-copulatory plastic responses to heat stress may promote fertility rescue namely through increased male mating ability resulting from higher metabolism at increased temperatures (see García-Roa et al. 2020; Pilakouta and Baillet 2022). Also, changes in female mating behaviour such as flexible polyandry responses may be advantageous in avoiding fertility drops (i.e. females increase their propensity to remate following exposure to sterile, heat stressed males; Sutter et al. 2019; Vasudeva et al. 2021). However, in a recent review, Pilakouta and Baillet (2022) did not find clear effects of temperature on mating latency, choosiness, or mating success (see also Wang and Gunderson 2022). In addition, some experimental studies point to a negative impact of high developmental temperatures on adult mating parameters (Sales et al. 2018; Santos et al. 2021a; Rodrigues et al. 2022; Costa et al. 2023). For instance, Rodrigues et al. (2022) reported that high temperatures during development negatively impacted male mating success. In Tribolium, Sales et al. (2018) found that a heatwave in the adult stage increased the latency before the first successful mating and decreased mating frequency.

The discrepancies between studies could possibly be explained by interspecific differences in heat stress response (e.g. see Patton and Krebs 2001 for differences between Drosophila species). Some of these detrimental effects on adult behaviour are transient, as found by Jørgensen et al. (2006) in D. melanogaster males exposed to heat during the adult stage. It is likely that the impact of temperature on mating behaviour varies depending on other factors such as the magnitude and duration of heat stress. It is relevant to understand how these events impact on mating behaviour namely the timing of courtship and copulation as well as mating ability, as these will be relevant for species persistence under such harsh conditions.

Aspects of the mating ritual itself, which have a relevant role in sexual responses, can also be affected by thermal changes. One such aspect is the nuptial feeding. Nuptial feeding is a widespread phenomenon particularly in insects and has been shown to significantly affect mating choices (Vahed 1998). In monandrous species, a higher investment by males in such behaviours can occur due to the reduced number of mating opportunities in such species. In an experiment with Drosophila subobscura, Immonen et al. (2009) showed that male nutritional condition (satiated vs starved) impacted their ability to offer a nuptial feeding. In turn, this ability conditioned the female’s mating acceptance, suggesting a role of selection in favouring males that invest in such gifts. In the context of climate warming, it is important to assess whether this behaviour is also affected by temperature shifts, as it can be a factor in accentuating the detrimental role of heat stress on fecundity and reproductive success. More generally, it is important to quantify the impact of thermal stress on mating parameters and the subsequent effects on fertility (i.e. fecundity and reproductive success) under different ecologically relevant scenarios to generate better predictions of the effects of climate change on biodiversity.

Drosophila subobscura is an interesting species to study in this context as it is an emblematic case study of thermal adaptation. This species has a well described latitudinal clinal differentiation in Europe and the Americas, with evidence supporting an adaptive nature possibly related to temperature (Balanyá et al. 2006; Rezende et al. 2010). Also, it has been shown to respond to changes in thermal environment through genetic adaptation (Castañeda et al. 2019; Mesas et al. 2021; Santos et al. 2023a, b) and plasticity (Fragata et al. 2016; Maclean et al. 2019; Santos et al. 2021a, b). This species is monandrous, showing quite low remating rates in benign conditions (Fisher et al. 2013). Its courtship behaviour involves a ritual dance and a peculiar nuptial feeding, with the passage of a regurgitated droplet from the male to the female (Immonen et al. 2009). This nuptial offering is given from the male to the female to enhance his chances of mating. In turn, feeding from regurgitated gifts is shown to improve female fecundity in certain environmental conditions (Steele 1986a, b).

In the past, we addressed the impact of historically distinct genetic backgrounds on the evolutionary response under a common laboratorial environment by analysing D. subobscura populations from contrasting European latitudes (Matos et al. 2015; Simões et al. 2015, 2017). More recently, we studied thermal plasticity patterns in two of these populations, both of southern and northern European origins (Simões et al. 2020; Santos et al. 2021a). Furthermore, we imposed different thermal selective regimes following the evolution of such historically differentiated populations ever since (Santos et al. 2021b, 2023a, b). However, these studies did not address the link between mating behaviour and fertility changes following heat stress.

Considering evidence suggesting a stronger effect of heat stress on male reproduction (e.g. Iossa 2019), here, we will examine how heatwaves affect male mating behaviour and subsequent reproductive output of mature individuals. We will focus on later developmental stage (since pupae formation) to early imago stage, which are key stages for spermatogenesis in ectotherms (see Sales et al. 2021). In our study, we specifically analyse the thermal performance of long-term lab adapted D. subobscura populations with distinct evolutionary history (see Simões et al. 2017 and above), aiming to (1) test effects of a heatwave on male mating behaviour and fertility and (2) whether these are consistent between populations with distinct evolutionary history. In addition, we will (3) test the efficacy of food dye ingested by males as a useful indicator of the occurrence of copula. Specifically, we test whether the passing of dye from males to the females’ abdomen through mating will allow detecting the occurrence of copula and dispense continued experimental observations. Finally, considering prior evidence of toxic effects of food dyes on longevity (e.g. Kalaw et al. 2002), we will (4) assess the impact of food dye on patterns of mating behaviour and fertility. We expect that populations with distinct evolutionary history might diverge in their response to the heatwave, with the lower latitude populations possibly being better in coping with the heat stress assuming they were more frequently exposed to extended high stress periods in their ancestral natural environment than higher latitude populations.

Material and methods

Experimental populations

D. subobscura populations used in this experiment were obtained from natural collections performed in two contrasting European latitudes, lower latitude: Adraga, Portugal (213 founder females) and higher latitude: Groningen, Netherlands (170 founding females). Collections were done in Late August/Early September 2013. Populations derived from Adraga were labelled “PT”, and those from Groningen “NL” (see Simões et al. 2017). They were maintained in standard laboratory conditions with controlled densities in both adult (40 individuals per 30 cm3 glass vial) and development stage (70 eggs per 30 cm3 glass vial), at 18 °C. The size of our laboratory populations typically ranges between 800 and 1000 individuals per generation. The life cycle involved discrete generations, a duration of 28 days and a 12:12 light: dark cycle. By generation 3, we established three independent replicate lines for each of the PT and NL populations (PT1-3 and NL1-3 sets of populations). They remained under similar laboratory conditions for 111 generations at the time of these assays.

Experimental assay

In this experimental assay, we aimed to test the effects of a heatwave on male mating behaviour and fertility. Furthermore, we were interested in testing the impact of food dye on such traits and test its application as an indicator of the occurrence of a copula.

For this, we assessed the mating behaviour and fertility of couples in which males were subjected to one of four treatments: (1) males exposed to 18 °C control conditions, non-dyed; (2) males exposed to 18 °C control conditions, dyed; (3) males subjected to a heatwave treatment, non-dyed; and (4) males subjected to a heatwave treatment, dyed. Eight males were studied per replicate population and treatment (8 males × 6 replicate populations × 4 treatments = 192 males in total). The heatwave treatment involved an 11-day exposure to a constant temperature of 26 °C that spanned from the end of the third instar larvae period (around day 8 of development) to the fourth day of adulthood. Such period covers key stages for spermatogenesis allowing to measure heat effects on the reproductive performance of mature adults. The heat temperature of 26 °C was chosen as it is near the upper viable limit for the species development (Moreteau et al. 1997). Also, an 8-degree increase relative to control conditions (18 °C) is within an acceptable range of thermal increase associated with heatwaves (IPCC 2007 for instance points to at least a 5 °C degree difference relative to average temperatures). Before the treatment started, individuals were kept at a benign temperature of 18 °C. Upon emergence, virgin males—from control and heatwave treatments—and females—from control conditions—were anaesthetised with CO2 and separated. The females and the non-stressed males were maintained at 18 °C until the day of the mating (that occurred when the individuals had five days) while stressed males were maintained at 26 °C until 18 h before the assay at which point they returned to control conditions for a short recovery.

During the period of recovery (18 h), half of the males from the heatwave treatment and half from the control treatment were allowed to feed from a red food dyed medium, while the other half fed from non-dyed medium. We used red food dye, considering the low sensitivity of Drosophila to light of long wavelengths such as red (Kelber and Henze 2013) and information from previous pilot tests that showed this dye produced conspicuous colouring of the male’s abdomen and had no apparent effects on its overall condition. 20 µl of red dye were added to 1 ml of the anexic medium (David 1962), adapting the protocol of Verspoor et al. (2015). As described by Verspoor et al. (2015) the colouration duration was relatively short (approximately 4 to 5 h).

After the recovery period, males were paired with virgin females for 26 h, in a 30-cm3 glass vial with axenic medium without food dye. Mating pairs were observed during the first 2-h at room temperature (~ 21 °C). Direct observations involved a total of 4 observers that were not aware of the experimental treatments. Each observer had 16 vials each, these including a subsample of each experimental unit included in a block (e.g. samples from NL1 and PT1 with different temperature and food dye treatments; see below), with each block totalizing 64 vials analysed. The timing of the start of the courtship, the copulation beginning, and its end were registered, as well as the eventual passage of the droplet (gift) and its acceptance by the female. Additionally, females were checked visually for a dyed abdomen after (1) the nuptial feeding and (2) after copula to assess the origin of the dyed abdomen (nuptial gift or copula) thus ascertaining whether a dyed abdomen is a reliable indicator of a copula. These observations allowed to estimate the following parameters: courtship latency (time elapsed between pairing and beginning of male courtship), the offering of a nuptial feeding (droplet) by the male, the acceptance of the nuptial feeding by the female, mating occurrence (whether a mating occurred or not within the first 2 h), copulation latency (time elapsed until copulation started), and copulation duration.

After the observation period, the couples were maintained at 18 °C for 24 h after which time the females were kept for egg laying in the same vials used in the observation period—with medium and no food dye. At this stage, vials were attributed to experimental racks following a “block” design, with each block being the set of same numbered replicate populations assayed in synchrony in the same experimental rack with randomization of populations and treatments. Females were allowed to lay eggs for 48 h. Fecundity was assessed by the number of eggs laid (in each vial) while reproductive success was determined by the number of adult individuals that emerged from those eggs.

We would like to highlight that our experimental setup was established to avoid any possible bias in the study and in this sense adheres to the STRANGE framework (see Webster and Rutz 2020). These aspects include large number of founder females when lab populations were established (> 150, see section Experimental populations above); known ancestry of our populations; individuals assayed represent a random sample of the original population and were subjected to similar assay conditions except for the factors under test; factors such as age, sex, and mating status were accounted for; sample sizes were balanced between populations / treatments in study; finally, observers had no prior knowledge of the experimental treatments during the assay and received a balanced subsample of the different experimental treatments.

Statistical methods

Models applied for each trait—courtship latency, copulation latency, droplet given, droplet accepted, mating occurrence, copulation duration, fecundity, and reproductive success—included the factors evolutionary history (lower latitude—PT; higher latitude—NL), thermal treatment (males subjected to either heatwave or control treatment), and male dye (dyed male or non-dyed male). Interactions between the fixed factors evolutionary history and thermal treatment were also tested. Block was defined as a random effect, with three levels corresponding to the three different sets of same numbered replicate populations that were assayed in synchrony (see “Experimental assay”). The raw data used in the analyses were the individual values for each couple, i.e. sample size of eight for each replicate population and treatment (see Table S1). Specific models applied for each trait are described below (see also a detailed description of the models applied in Table S2 and the supplementary text S1 for the R code). The best model for each trait was chosen based on Akaike Information Criterion.

Courtship latency and copulation latency were analysed with a coxme generalized mixed-effects model (GLMM) using the occurrence of mating (observed or estimated through the existence of progeny) as censor (function Surv; coxme package v3.5; Therneau 2023) to distinguish between unobserved copulas (after the observation period) and non-existent ones. Copulation duration was analysed using a linear mixed-effect model (LMM) with a gaussian distribution (function lmer; lme4 package v1.1.25; Bates et al. 2015). Data was box cox transformed in these three traits (courtship latency: λ = − 0.03, copulation latency: λ = 0.21, and copulation duration: λ = 0.51; MASS package v7.3.56; Venables and Ripley 2002) for a better model fit.

Droplet given (by the male), droplet accepted (by the female), and mating occurrence were defined as binary traits (0 = absence; 1 = presence) and analysed with generalized mixed-effects models (GLMM), applying a binomial distribution with logit link (function glmmtmb; glmmTMB package v1.1.3; Brooks et al. 2017). For the trait droplet given, the absence/presence of courtship was included as a covariate. Droplet accepted was analysed using a subset where only males that offered a droplet were considered (when droplet given = 1). For mating occurrence, droplet accepted was included as covariate. In this last model, the interaction term with evolutionary history were not included due to convergence issues.

For reproductive success and fecundity, generalized mixed-effects models (GLMM) were used, either applying a negative binomial distribution (reproductive success) or a Quasi-Poisson distribution (fecundity). Within both models, zero inflation was accounted for by including a specific parameter (ziformula ~ 1; glmmTMB package v1.1.3).

We also tested whether a female’s dyed abdomen was indicative of mating occurrence, using only the data subset of red dyed males. For this, we applied a GLMM with a binomial distribution and logit link (function glmmtmb; glmmTMB package v1.1.3; Brooks et al. 2017), with mating occurrence (defined as binary trait, 0 = absence; 1 = presence) as dependent variable, thermal treatment as factor, and dyed female (presence/absence of dye in female’s abdomen) as covariate. Block was again defined as a random effect, with three levels as explained above. The factor evolutionary history was not included in this model as it had no significant impact on mating occurrence in the full model.

Significance testing was obtained through Type III Wald chi-square tests for the GLMM models and Type III Wald F tests (Kenward-Roger degrees of freedom) for the LMM models (car package v3.1.1, Fox and Weisberg 2019). Statistical analyses were performed in R, and ggplot2 package v3.3.3 (Wickham 2016) was used for graphical representations.

Results

Mating behaviour

We found that heat stressed males took longer to begin courtship (13 × higher courtship latency) and copulas involving these males also took longer to begin (11 × higher copulation latency) (significant effect of factor thermal treatment, see Table 1 and Fig. 1A, B). Variation in the offering of nuptial feeding (droplet) by males was significantly explained by the occurrence of courtship (significant effect of factor courtship, see Table S3) and by an interaction between male thermal environment and evolutionary history (Table S3). This interaction resulted from a tendency for decreased droplet offering in the heat stressed lower latitude males relative to controls, but not in the heat stressed higher latitude males (Tukey’s test, PT control–PT heatwave: t ratio = 2.556, p = 0.055; NL control–NL heatwave: t ratio = − 0.473, p = 0.965; see also Fig. S1A). We also found a lower female acceptance of the nuptial feeding when males where heat stressed (see Table S3 and Fig. S1B). In fact, we observed that females accepted the droplet in 75.0% of the cases when it was offered by a control male, but only in 35.8% of the cases when it was offered by a heat stressed male. Mating occurrence was also significantly reduced when males were heat stressed (44% versus 97% in the control treatment, see Table 1 and Fig. 2). However, variation in the acceptance of the droplet by females as well as its interaction with the male thermal environment did not have a significant effect on mating occurrence (factor droplet accepted and droplet accepted × thermal treatment interaction term, Table 1). Copulation duration was not significantly affected by the male thermal environment (see Table 1 and Fig. 3).

Table 1 Effect of heat stress and food dye on mating behaviour
Fig. 1
figure 1

Effect of a heatwave and food dye on courtship and copulation latencies. A Courtship latency: time elapsed between the formation of a mating pair and the beginning of courtship. B Copulation latency: time elapsed between the formation of a mating pair and the beginning of copulation. The colour black represents pairs with males that were not dyed, while the red colour represents pairs with dyed males. The diamonds represent the mean of the replicate populations. The error bars represent the standard error (variation between sampled individuals within each replicate population and treatment) of the means

Fig. 2
figure 2

Effect of a heatwave and food dye on mating occurrence. Mating occurrence: proportion of pairs in which mating was observed relative to the total number of pairs sampled. The colour black represents pairs with males that were not dyed, while the red colour represents pairs with dyed males. The diamonds represent the mean of the replicate populations. The error bars represent the standard error (variation between sampled individuals within each replicate population and treatment) of the means

Fig. 3
figure 3

Effect of a heatwave and food dye on copulation duration. Copulation duration: time elapsed between the beginning of the copula and its ending. The colour black represents pairs with males that were not dyed, while the red colour represents pairs with dyed males. The diamonds represent the mean of the replicate populations. The error bars represent the standard error (variation between sampled individuals within each replicate population and treatment) of the means

We did not observe significant effects of evolutionary history on mating behaviour nor did this factor interact significantly with the thermal environment of the males. Male dye also did not have any significant effect on mating behaviour (Table 1, Figs. 1, 2, and 3 and S1).

Using only the data subset of red dyed males, we observed that variation in mating occurrence was not significantly explained by the presence of dye in the female’s abdomen (factor dyed female, χ2 = 2.775, Df = 1, p = 0.096) when including the (significant) effect of the male thermal environment in the model (thermal treatment, χ2 = 11.946, Df = 1, p < 0.001). Consistent with this, we observed that only 55.7% of females mated with dyed males were dyed themselves (see Fig. S2 for example of dyed females). We have no evidence suggesting that this results from variation in the intensity of dye in males. Furthermore, we found that 8% of females were dyed without mating, suggesting that the colouration can also be transmitted during the nuptial feeding.

Fertility

Fecundity and reproductive success of females coupled with heat stressed males was significantly reduced—respectively 78.9% and 99.9% reduction on average—when compared to pairs involving non-stressed males (significant effect of factor thermal treatment, see Table 2, Fig. 4). As observed for the mating parameters, fecundity and reproductive success were not significantly affected by population evolutionary history or food dye, nor any interaction of these factors with the thermal environment of the males (see Table 2, Fig. 4). Extreme reductions in fecundity and reproductive success were also observed when considering only data from vials where matings were observed, with a 78.1% reduction in fecundity of matings with heat stressed males relative to control ones, and a correspondent 99.8% reduction in reproductive success.

Table 2 Effect of heat stress and food dye on male fertility
Fig. 4
figure 4

Effect of a heatwave and food dye on fertility. A Fecundity: number of laid eggs per vial. B Reproductive success: number of adult offspring resulting from laid eggs. The colour black represents pairs with males that were not dyed, while the red colour represents pairs with dyed males. The diamonds represent the mean of the replicate populations. The error bars represent the standard error (variation between sampled individuals within each replicate population and treatment) of the means

Discussion

This study shows that the occurrence of a long heatwave (~ 11 days) that spans part of the developmental and early adult stages of Drosophila subobscura males has a highly detrimental impact on both mating behaviour and reproductive output. As such, our study does not provide any evidence suggesting an ability to cope with heat stsress in our populations, as temperatures used approach thermal limits for development described for the species (Moreteau et al. 1997). Mating behaviour is clearly negatively affected by thermal stress, with matings involving heat stressed males exhibiting longer courtship and copulation latencies than matings with control males. While the heat stress was only applied to males, an impact on female mating behaviour was also evident as the female shows higher preference for non-stressed males, adjusting acceptance of the nuptial feeding to the male condition (i.e. subjected to heatwave environment or not). Previous evidence in D. subobscura suggests that the attractiveness of the nuptial feeding is dependent on the nutritional condition of the male (Immonen et al. 2009). Our findings expand this evidence to the context of thermal stress, with the nuptial feeding being less attractive to females when males are exposed to a heatwave. A female preference for non-stressed males can also partially explain the high copulation latencies in couples involving stressed males, in addition to a poor male condition. If that is the case, this ability of females to perceive male condition can be a mechanism by which they can (partially) overcome fertility drops resulting from matings with heat stressed males. On the other hand, copulation duration was not clearly affected by the heatwave. This contrasts with the expectation of a decrease in copulation duration following heat exposure (Katsuki and Miyatake 2009; Sutter et al. 2019; but see Sales et al. 2018). In fact, the negative impact of heat stress on spermatogenesis (see below) would expectedly reduce the amount of available mature sperm leading to a decrease in mating duration as less sperm is being transferred. Alternatively, our non-conclusive result might be explained by the lower percentage (44%) of matings with stressed males within the 2-h period of observation (compared to 97% of matings with non-stressed males), making this a rather biased sample and reducing statistical power.

Overall, we here show that both male and female mating behaviours are affected by heat stress exposure in males, leading to a higher probability of mating occurrence in non-stressed males. In general, our findings agree with studies that reported decreased mating ability following heat stress (Patton and Krebs 2001; Sales et al. 2018; Rodrigues et al. 2022). However, other studies do not show such relevant negative effects of heat stress on mating behaviour (e.g. see Jørgensen et al. 2006; Zhang et al. 2013; Pilakouta and Baillet 2022). One important aspect that might concur for these discrepancies between studies is the intensity and duration of the heat stress event. In our case, the heat stress involves a quite long exposure (11 days) to a sustained 8 °C above the control conditions. Other studies have also showed an impact of heat stress on mating performance following long exposure to such stressful conditions (e.g. 5 days in Sales et al. 2018; 8 to 11 days in Rodrigues et al. 2022). This contrasts with the relatively short exposure time in the studies that showed low impact on mating behaviour (heat shock treatments of 3 h in both Jørgensen et al. 2006 and Zhang et al. 2013). While the specific life stage in which the heat stress occurs could potentially promote variation in the mating response, it does not appear to play a deciding role in explaining the discrepancies between these studies since detrimental effects have been observed both following heat stress during the adult (Sales et al. 2018) and during developmental stage (Rodrigues et al. 2022). In our study, we cannot ascertain in detail the specific life stage that contributed to the reduced mating performance, as the heatwave spanned both developmental and adult stages. For a better overall understanding of the impact of temperature on mating behaviour, additional studies should test effects of heatwave duration on different life stages, as well as address a possible restauration of behavioural activity following a wide recovery period (e.g. several days after heat stress, as in Sales et al. 2021).

Along with mating behaviour, fecundity and reproductive success were also clearly reduced following male heat stress. At first instance, this was a consequence of the low number of matings observed in vials with heat stressed males. However, even when such a mating occurred, there was a reduction of 78.9% and 99.9% in fecundity and reproductive success respectively. Reduction of fertility upon heat stress has been observed in other studies, particularly when stress occurs during the developmental stage (Zwoinska et al. 2020; Santos et al. 2021a; Rodrigues et al. 2022; Costa et al. 2023). This reduction could be associated with detrimental effects on spermatogenesis such as increased presence of abnormal sperm (Rohmer et al. 2004), reduced sperm number (Sales et al. 2018; 2021), and testis volume (Sales et al. 2021) or decrease sperm motility (Porcelli et al. 2017). Considering the magnitude of the reported effects, the possibility of fertility recovery—as reported in Sales et al. 2021—is unlikely at least in an ecologically relevant timeframe. Although these findings highlight the decline in key traits for population persistence following a heatwave event, it is important to mention that our experimental setting does not capture some relevant features that occur in natural environments such as high thermal variability and the possibility of behavioural thermoregulation in the adult stage.

We found that populations with distinct evolutionary history were similarly impacted by the heatwave, possibly due to phenotypic convergence during evolution in a common laboratorial environment. Convergence for several phenotypic traits due to laboratory adaptation has been previously observed in these populations (Simões et al. 2017). Curiously, convergence for behavioural traits was not found in other historically differentiated populations from the same natural locations as those studied here (Bárbaro et al. 2015). Such differences between studies might have resulted from a higher number of generations in a common environment in our study (more than 100 generations vs ca. 20 generations in Bárbaro et al. 2015) making convergence more likely. However, temporal variation in the genetic background of the natural populations might also have contributed to the discrepancies between studies. This points to a general reduction of the existing initial historical differences in genetic background. We do not foresee any potential bias in our populations and study that could prevent generalizations to the broader context of Drosophila behaviour and reproduction (see further details about the STRANGE criteria in “Material and methods”). It is of course possible that an experiment with a higher sample size than ours would have allowed (by increased statistical power) the detection of effects of low magnitude, as in traits with small differences between thermal treatments—such as copulation duration—or from historical differences.

In parallel, we set out to test the efficacy of food dye applied to males as an indicator of the occurrence of a copula (by checking the female’s abdomen for the presence of dye). If such link could be forged, this would allow for an efficient assessment of the occurrence of a mating and would provide a practical protocol to assess such events, avoiding the need for extended periods of observation. However, we did not find a strong association between the occurrence of mating and the presence of a dyed abdomen in females. We have no evidence suggesting that variation in dye uptake in dyed males is responsible for this result. Moreover, the fact that 8% of females were dyed without mating suggests that the presence of the dye in the female’s abdomen may also be passed through the nuptial feeding into the gut and not through the copula to the reproductive tract. As such, these results do not support the use of food dyes as an indicator of mating occurrence since, in some cases, the female dyed abdomen may result exclusively from the nuptial feeding itself.

Finally, we also assess whether food dye supplied to males has an impact on their mating behaviour and reproductive output. We do not find such an effect, expanding the findings of Verspoor et al. (2015)—obtained only for mating behaviour—to measures of reproductive success in experiments involving heat stress. As such, we point out that the use of food dyes should be a more common place tool to facilitate observational studies of mating behaviour.

In conclusion, we show that mating behaviour parameters—excluding mating duration—and reproductive output can be hugely affected by an extended heatwave. These results suggest that extended heatwaves—as predicted by recent climatic scenarios (IPCC 2022)—might have considerable impact on the fertility of ectotherms, potentially leading to population declines and possible biodiversity loss. Although the heat stress was only applied in males, we also provide evidence for an impact on female mating choices as a consequence of male condition. Further studies are needed to understand whether adaptive responses in mating behaviour namely in females—resulting for example from stronger sexual selection and changes in (re)mating rates—can help populations in coping with the detrimental impacts of heatwaves.