Who lost access to the Mediterranean after numerous naval losses?