The first universal, legally binding deal to tackle global warming has been reached at the UN meeting in Paris.