Environmental heterogeneity controls organic-matter dynamics in river-floodplain ecosystems