The ruined castle of Rochebaron caps the top of a rocky outcrop located in the town of Bas-en-Basset , approximately 1.5 km northwest of this town in the far northeast of the French department of Haute-Loire , bordering the Velay and the former county of Forez .