A federal judge in Alaska has overturned US President Donald Trump’s attempt to open vast areas of the Arctic and Atlantic oceans to oil and gas leasing.