We use the third conditional to talk about a condition in the past that didn’t happen. So, this condition is impossible as well as the result.
The third conditional has the following structure:
If + Past Perfect + would have + the third form of the verb.
If I had seen you, I would have told you about it.
If she had read his message, she would have called him.
If I hadn’t heard about your problem, I would have been angry.
Would you have visited him if you had come to the city?
We can use could/should/might have instead of would have.