Thermal and mechanical evolution of shear zones