The slated fence in my front yard needs to be replaced due to rot. I'm thinking to just use the same style but just replace.

My questions are:
- what is the recommended wood type for the slates I should use? I have a circular saw so feel confident making the cuts needed
- when in the process should I paint? Before installing while the wood pieces are not together or after I have attached to the brick.
- I've never painted anything for outdoor and I know nothing really about painting so is there any weather durable products I should apply since it's outdoor? What pre coating steps are there? I've chosen a colour already.