A Poncelet theorem in space