Spain plans switch to 100pc renewable energy