Fundamental groups of rationally connected varieties. Continuity of plurisubharmonic envelopes in non-Archimedean geometry and test ideals. With an appendix by José Ignacio Burgos Gil and Martín Sombra. 