Consequences of the spatial configuration of resources for the distribution and dynamics of the endangered Parnassius apollo butterfly