Detention order lifted for Paris gunman; attacker referred to clinic