EU’s top court rules for stronger democratic scrutiny of trade agreements