Visual and energy management of electrochromic windows in Mediterranean climate