Singular moduli for real quadratic fields: a rigid analytic approach