Trump faces biggest legal threat as documents case opens in court