The Catalan parliament declares independence, just minutes before Madrid officially imposes direct rule on the region.