During the period is the safest time b/c any time after that, you can ovulate which means you can get pregnant. It's disgusting but it's the safest. Like you said, you can get pregnant anytime, even while on you're period. Sperm can live in your vagina 5 days. So if you ovulate 5 days after, you can get pregnant.
If you have a perfect 28 day cycle and you count from the first day of your period then days 12-16 are your most dangerous days as you should be ovulating then. However sperm can live inside the womb for a week so if you have sex before then they could be still in there waiting for the egg. Day17 until your period would theoretically be safest as the egg will have left the building. Counting days is never a good form of contraception and please remember that withdrawal is NOT a method!!!!!! I you want to try a form of contraception that is not a hormone or a barrier method then you could try buying ovulation kits which will tell you when you are ovulating or not.