Gauge-invariant variables and infrared confinement in QCD