My theory
I know I am completely wrong on this, but this is what I first thought of the film after watching it. I think that James was the copy to her husband/ex-husband. In psychological terms what took place was transference/counter-transference of the characters. Binoche's character transferred her feelings of her ex-husband onto James and he accepted them and counter-transferred her relationship back to her.
It was obviously a dramatic change and unnatural but that's how it looked to me when I was watching it. The shift was instant instead of the more natural subtle and drawn out shift that occurs in therapy. Just my thought.
I also like the other theories that I have read. I don't marry myself to any one interpretation. It's much more enjoyable to view the film multiple times while adopting different theories to see if they fit and also to gain a new experience.