Factorization of primes and $Spec(\mathcal{O}_K)$

Let $K$ be a quadratic number field, and $\mathcal{O}_K$ the ring of integers of $K$.

The map $\pi: Spec(\mathcal{O}_K) \rightarrow Spec(\mathbb{Z})$ that sends a prime ideal $\mathbb{p}$ to $\mathbb{p} \cap \mathbb{Z}$ is induced since $\mathcal{O}_K$ contains $\mathbb{Z}$. And the fiber $\pi^{-1}$ of the prime ideal $(p)$ of $\mathbb{Z}$ is then understood as the decomposition of $(p)$ in $\mathcal{O}_K$.

We then obtain a geometric interpretation of how p factors in $\mathcal{O}_K$ using results obtained from Algebraic number theory.

I'm looking for hints to (major or minor!) results that can be proved regarding the behaviour of $(p)$ in $\mathcal{O}_K$, or other interesting aspects of $\mathcal{O}_K$ using "as much as possible" Algebraic geometry (at level of a first course in Schemes, using, say first seven chapters of Liu's "Algebraic Geometry and Arithmetic Curves").

I'd also appreciate a recommendation of a textbook or notes that discusses these ideas in details.

-
Neukirch's Algebraic Number Theory takes this perspective quite seriously, to the point of proving a Riemann-Roch theorem in this setting. There is also a nice discussion of the etale fundamental group in Szamuely's Galois Groups and Fundamental Groups, as well as bonus chapters on Dedekind schemes. –  Qiaochu Yuan Mar 1 '11 at 9:10
As one example, the theory of Weil and Cartier divisors can be applied to the $\mathrm{Spec}$ of a Dedekind domain, which is locally factorial. (One can thus show for instance that line bundles on a Dedekind domain are classified by the ideal class group -- of course, this is not that deep, as they are just nonzero ideals up to isomorphism!) –  Akhil Mathew Mar 1 '11 at 13:03
@Quiachu Yuan: I didn't know about Szamuely's bonus chapters, they seem very interesting. Thanks a lot for your suggestions. –  Weaam Mar 1 '11 at 14:26
@Akhil Mathew: Thanks a lot, these are precisely the kind of hints I was asking for. I hope if you outline a few more hints, basically to give me some sense of direction, which I find quite difficult I must say in AG. –  Weaam Mar 1 '11 at 14:35
Dear Weaam, in a locally factorial (noetherian separated integral) scheme, it is known that there is a correspondence between Weil and Cartier divsors (see Hartshorne or these notes: people.fas.harvard.edu/~amathew/linebund.pdf). As a result, there is a correspondence between isomorphism classes of line bundles (which are the same thing as Cartier divisors mod principal divisors), and Weil divisors modulo principal equivalence. The Weil divisors in the Dedekind case correspond to nonzero primes. –  Akhil Mathew Mar 1 '11 at 19:33

As suggested in a comment by Quiaochu Yuan, Neukirch's book is really good, but I'd recommend you to have a look also at the beautiful lecture notes on Arithmetic Geometry by Lucien Szpiro. You can find them in his webpage, here. These are the notes of a course given by Szpiro in Orsay and they are in French (Cours De Géométrie Arithmétique), but it looks like somebody TeX-ed and translated (alas, just part of) them (Basic Arithmetic Geometry Notes). Szpiro starts by studying Picard groups and one-dimensional rings and then discusses in a very geometric flavour some classical results of algebraic number theory (finiteness of $Pic$, Dirichlet's unit theorem...).