On the origin of W-directed subduction zones and applications to the western Mediterranean