A major heatwave has pushed temperatures above 40°C in Italy, Spain and Greece as climate change makes extreme weather increasingly common in southern Europe.