US-Iran deal within reach, but war still looms