Herschel/HIFI spectral line survey of the Orion Bar - Temperature and density differentiation near the PDR surface