The tidal deformation and atmosphere of WASP-12 b from its phase curve