Sofia Richie appears to be playing in dangerous territory ... because Kourtney Kardashian's already peed in that sandbox.

Sofia was spotted with Younes Bendjima Thursday at Liquid Juice Bar on Melrose, and they were being undeniably flirty ... but we're told they're just friends, and have been for a while.

We saw the 23-year-old French model strolling the streets of Saint-Tropez, holding hands with Kourtney in July. Before that, they were rubbin' each other on a yacht.

Exclusivity ... definitely overrated.