First-encounter time of two diffusing particles in confinement.