DFT and spectroscopy: from vertical transitions of isolated molecules to line-shapes in condensed phases