The Phase Transition and the Mushy Region in Constraint Satisfaction Problems