EU divorce deal thrown into doubt as Brexit minister resigns