*(1) Core-Level Spectra*

The surface elemental composition, expressed as atomic percentage, of fresh and PAni-modified ACC at di fferent electropolymerization times, was computed from integrated photoelectron areas and is summarized in Table S1. The small amount of nitrogen-containing surface complexes present in fresh ACC (1.2 at.%) most likely stems from nitrogen existing in the precursor carbon source [37]. Sulfur can also be present in the precursor source as elemental sulfur impurities or in the form of inorganic or organosulfur compounds at low proportion [37]. The oxygen content mostly results from carbon-oxygen surface complexes that develop as chemical defects at the edges of graphene layers.

The nitrogen and sulfur content on the surface increases with the increasing electropolymerization time in connection with the growth of polyaniline (Table S1). Nitrogen is a characteristic constituent of PAni polymeric chains either in the form of amine or imine links between benzenoid or quinonoid moieties in the linear polymer backbone or as charged (protonated) nitrogen connected to semiquinone segments. The increased amount of sulfur is due to electrolyte (bi) sulfate anions incorporated into the polymer structure as the dopant, although some residue from ine fficient electrolyte removal by rinsing cannot be ruled out. The analysis of the di fferent bonding states of these elements will be treated in detail further below.

The plot of the N/C and S/C atomic ratios vs. time (Figure 4) shows that the N and S content in the hybrid PAni-ACC composites increases moderately at short times, it seems to level o ff at intermediate electropolymerization time and eventually rises sharply at prolonged process time (120 min). The value of the N/C ratio at short electropolymerization time is lower than the theoretical one for pure linear polyaniline chains (N/CPAni = 1/6), which means that most of the C photoemission signal arises from carbon atoms belonging to either uncoated regions of the carbon fabric or covered by ultrathin, i.e. <~10-nm-thick, smooth PAni films looking featureless in SEM [36]. On the contrary, the N/C ratio is rather close to 1/6 at long electropolymerization time, indicating that XPS is mainly probing the surface chemistry of the polymeric fraction in the hybrid composite (Figure 4). Therefore, the evolution of the N/C ratio is in close agreemen<sup>t</sup> with SEM micrographs in Figures 2 and 3a,b, which showed scattered compact PAni deposits at short electropolymerization time and thick PAni layers almost completely covering the carbon cloth substrate at long treatment time (120 min). At short to moderate electropolymerization time, the N/C values corresponding to analyzed areas on the fabric side exposed to the electrolyte were only slightly lower than those described above and changed in a similar fashion (open square circles in inset to Figure 4). This suggests that a smooth thin layer of PAni also forms on this face within this time interval, although it is indiscernible by SEM imaging under our experimental conditions. The long-term N/C atomic ratio (inset to Figure 4) is high but noticeably lower than at the electrode side, in line with the surface topography shown in Figure 3c,d. Finally, the S/C ratio parallels the N/C tendency (open circles in Figure 4), which strongly suggests that most of the sulfur present on the surface of the PAni-ACC composite plays a role as a dopant ion.

**Figure 4.** Evolution of surface N/C and S/C ratios for PAni-ACC composites as a function of the electropolymerization time. Inset: Comparison of N/C ratios at both sides of the fabric.

Figure 5 shows the high-resolution photoelectron spectra of C1s, N1s and S2p core levels of fresh (Figure 5a) and PAni-modified ACC after electropolymerization at di fferent times (Figure 5b,c). The

C1s peak was satisfactorily fitted with photoelectron contributions at average values of 284.6 ± 0.1 (C1), 285.9 ± 0.3 (C2) and 287.9 ± 0.2 eV (C3) respectively (Table S2). The C1 subpeak is the major component and corresponds to aromatic carbons in graphene layers of the carbon fabric [32,38–40] and also to those belonging to carbon rings in the polymer backbone [41]. The C2 subpeak can be assigned to carbon atoms singly bound to oxygen groups (i.e., C–OH/C–O–C functionalities) [38,40], but to some extent it can be contributed to by C–N and C=N/C=N<sup>+</sup> groups from the polymeric fraction in the hybrid composite [41,42]. The chemical shift of the C3 subpeak is characteristic of double-bonded carbon–oxygen complexes (e.g., C=O functional groups) [38]. Also, C atoms singly bound to positively charged N atoms in PAni have been associated with this energy region [43].

**Figure 5.** High-resolution C1s, N1s and S2p core-level X-ray photoelectron spectra of (**a**) untreated ACC and hybrid PAni-ACC composites synthesized after (**b**) 40 min and (**c**) 120 min electropolymerization time.

In agreemen<sup>t</sup> with the low relative abundance of S, the S2p core-level spectrum of the fresh ACC sample (Figure 5a) shows a weak band centered at ca. 167.9 eV. Because of the low intensity of this band, fitting the possible components under the envelope was not attempted. According to the 10- to 30-fold increase in the amount of S (Table S1), S2p spectra in Figure 5b,c are much more intense. They appear shifted to higher BEs, therefore, pointing to a higher oxidation state of the S atom. The fitting of the S2p line revealed a single atomic environment with a spin-orbit doublet having its 2p3/2 component located at 168.6 ± 0.1 eV, so confirming the presence of (bi)sulfate anions [44].

The N1s photoemission line (Figure 5) can be decomposed into four distinct components located on average at 398.2 ± 0.1 (N1), 399.7 ± 0.2 (N2), 400.6 ± 0.2 (N3), and 402.0 ± 0.2 eV (N4), (Table S2). As far as activated carbon materials are concerned, the low-BE component was assigned to nitrogen in pyridine-like structures, and the N2 subpeak may be ascribed to aromatic amide or amine moieties, as well as to pyrrolic or pyridone structures [39,45]. The contributions above 400 eV correspond to positively-charged N structures: quaternary nitrogen (N3) and pyridine N-oxides (N4) [39,45]. By contrast, totally di fferent local chemical states for N have been described in the literature dealing with N-containing conducting polymers, like polyaniline and its derivatives [5,41,42]: The N1 peak was attributed to deprotonated imine nitrogen in quinoneimine units, N2 to amine nitrogen in benzenoid rings, and peaks at >400 eV to positively charged N atoms. In particular, a peak component at about 400.5 eV (N3) was assigned to N atoms with delocalized positive charge, while that at the highest BE (N4) was associated with N atoms bearing localized positive charge. These assignments seem more appropriate to interpret the N1s core-level spectrum in Figure 5c, since the high N/C atom ratio suggests that XPS entirely reflects the composition of a layer of conducting polymer. The PAni doping level (S/N ratio) in the hybrid composite formed of Figure 5c is 0.63, and the protonation level (N+/N ratio) is 0.56. Therefore, sulfur is most likely to be incorporated in the form of (bi) sulfate anions, which compensates for the positive charge residing on nitrogen sites. Under the assumption that cationic N atoms originate solely from protonation of quinoneimine N sites [5], the proportion of neutral imine (=N<sup>−</sup>, 398.2 eV) plus charged nitrogen (N<sup>+</sup>, >400 eV) to total nitrogen gives an intrinsic redox state of 60%. The N1s line corresponding to PAni-ACC composites formed at intermediate electropolymerization time (Figure 5b) can also be resolved into the same four aforementioned components, but their true assignment may be obscured by N photoelectrons from the carbon matrix, which represents nearly 1/3 of the total N (Table S1). Therefore, an estimation of the doping level, protonation level and redox state of polyaniline was not attempted in this case.
