As I understand the Huygens principle, all points on the wavefront are sources of secondary spherical wavelets and the tangent to these wavelets will form new wavefront. This is used to prove the laws of reflection and refraction by drawing these spherical wavelets emanating from the surface separating the 2 mediums and then constructing new wavefront, like e.g. shown here.
I don't get why this construction is valid. As I understand, in Huygens principle, we derive new wavefront from the prior wavefront. But the points on the surface (separating 2 mediums) do not seem to constitute a wavefront at all. If a wavefront is a set of points having the same phase, and the original wavefront was at an angle to the surface, it seems that the points on the surface would not be in the same phase. If they are not, then the surface does not constitute a wavefront, so we can't derive reflected or refracted wavefront from it.
What am I missing here?