Autonomy, integration and marginalization in the construction of medieval states: A comparison of Gwynedd and Languedoc under outside rule