France has always been conflicted when it comes to race. I'm sorry you had to experience the ugly side of it.
While spouting Liberty and Egalite!, even the most radical parties of the French Revolution would not agree to free the slaves in the French colonies. Yet, the most prominent general of the Republic was born a slave in Haiti - Thomas-Alexandre Dumas, father of the novelist Alexander Dumas, who based many of his stories on his father's real-life. See Tom Reiss, The Black Count: Glory, Revolution, Betrayal, and the Real Count of Monte Cristo (2012).
Our son (I am Jewish, my wife Black) had a better experience when he went to college in Paris. He told us it was different outside of Paris, though. In Paris, he was in a bubble of young people from all over the world, just enjoying being together. That bubble was burst by the 2015 Bataclan theatre terrorist attack. (After several agonizing hours not being able to reach him, we heard he was safe, just a few blocks away). I believe one of the motivations of the terrorists was to attack this mixing of young people of different religions and races.
This dichotomy extends to the treatment of Jews in France as well. My cousin studied medicine in Paris when the Nazis invaded. He joined the Resistance, and was caught and escaped several times. But then, one of his French "comrades" in the Resistance turned him in as a Jew, and he spent the rest of the War in a Death Camp.
Perhaps France is an extreme version of the United States, in which there is a wide gap between its high ideals and the hard reality of racism. Our job is to reach for those ideals and bring them down to Earth.