A seismic shift in global alliances is unfolding rapidly as President Trump rewrites the diplomatic playbook, with old enemies becoming new friends and trusted allies left reeling.