Alejandro Valverde wrapped up the Route d'Occitanie title as Anthony Roux edged a photo finish on the final stage.