X-ray spectroscopy of current-induced spin-orbit torques and spin accumulation in Pt/3d -transition-metal bilayers