My question is: Can I talk to Allah and consider him as a friend ? I mean that I will still respect him and worship but I don't know if I can talk to him as a friend. Is it haram ?
Imagine really good parents who wish the best to you, try to protect you from evil love you and would not give you up if you fail. Can the son or the daughter talk to mother or father like to a friend? You can have several friends but only two parents and One God. God is irreplaceable and encompassing all.
If you mean whether you can talk to Allah in full trust and openness, yes, you can and you should.
But also the conversation is different. You can't phone God to talk. Dua is not the same kind of dialogue as with your best friend or your parents. It's bringing your concerns to God and opening your thoughts to His answer.
But when you bring your concerns before God you can be who you are and express yourself freely, as you would speak to a good friend.