flirt with

flirt with something

1to think about or be interested in something for a short time but not very seriouslyShe flirted with the idea of becoming an actress when she was younger.She flirted briefly with the idea of telling him the truth.

2to take risks or not worry about a dangerous situation that may happento flirt with danger/death/disaster