Safety margins and adaptive capacity of vegetation to climate change