How territoriality and sociality influence the habitat selection and movement of a large carnivore