One thing I've never understood is how Saruman was able to imprison Gandalf in Orthanc by (presumably) magical means. Even if he was the nominal head of the Order they were both Maiar and Gandalf had Narya at his disposal.
The books don't provide specific details about how Saruman captures and imprisons Gandalf.
Gandalf describes the incident after the fact, I think it was in "Fellowship of the Ring", during the Council of Elrond at Rivendell. In Gandalf's narrative, he said he wasn't as alert as he should have been, berated himself for that when going to see Saruman. I think that realization occurred when he noticed that Saruman was wearing a robe of many swirling colors, instead of white.
Next, consider the following excerpt from an answer to a different question, about Gandalf's staff when he was held captive at Orthanc:
...most likely as a head of the order and known mind manipulator Saruman used some of his power to prevent Gandalf from fighting back... later orcs or Dunledings in his service took him through the stairs to the Orthanc's roof, where he remained until Gwaihir's rescue.
Saruman was the most gifted at super-persuasion of any of the Wizards.
Also, Saruman may have had a ring of his own at this point. Gandalf noticed it, conjectured later whether it was one of the seven rings given to the Dwarves, or even something that Saruman had made himself, as a means of focusing his power. This is another reason why Saruman was able to imprison Gandalf at Orthanc.
- Saruman was the White, while Gandalf was still the Grey, even though Gandalf had Narya;
- Gandalf was preoccupied and rushed when he went to Orthanc;
- Narya may not have been useful as a weapon of defense for Gandalf when faced with Saruman. Narya was more of an ring of warmth, ambassadorial, "tam arte, quam marte" (by skill, not by force, or such), and not useful as an offensive weapon;
- Saruman's already significant, possibly greater power may have been further amplified by his possession of this mystery ring.
I always thought the answer was pretty simple: they're both too dangerous to want to fight the other. Saruman joked to Gandalf about the new ruler with the One Ring turning to lighter matters like Gandalf's punishment for insolence--I don't have the book handy right now--to which Gandalf replied, "That may not prove to be one of the lighter matters." Both Saruman and Gandalf knew that boast to be empty, but that they were talking about it at all highlights that that each would have been exceedingly dangerous for the other to challenge physically. (They may also have been loath to resort to violence as they were of the same order.)
From Saruman's perspective, far easier to simply imprison Gandalf in a place from which he could not escape than to risk injury to himself and damage to his minions and possessions. From Gandalf's perspective, far better to accept imprisonment than near-certain defeat (and possibly imprisonment and starvation even if he was victorious!--he cannot knock the walls of Orthanc down with his head).
So the imprisonment made sense to me. Plus, the physical aspect of it would be easy enough: on top of Orthanc, made of impervious stone, with a metal door held in place with a nice thick iron bar. If Gandalf cannot burn snow, he presumably cannot burn metal either.