  A characterization of subvarieties of Shimura varieties which contain a
Zariski dense subset of weakly special subvarieties has been proved by the
second author, by combining o-minimality results and functional transcendence
results. In this paper, we obtain a new proof of this statement by dynamics
techniques on homogeneous spaces in the spirit of the earlier work of Clozel
and the second author. The proof combines ergodic theory \`a la Ratner, with a
statement on the dimension of a Hausdorff limit of a sequence of definable
subsets (in an o-minimal theory) extracted from a definable family. One obtains
in passing general homogeneous dynamics statements valid on arbitrary
arithmetic quotients which are of independent interest, that can be applied in
the study of variations of Hodge structures and their associated period
domains.
