Energy landscapes, equilibrium and out of equilibrium physics of long and short range interacting systems