As Israel and Hamas edge toward a ceasefire, shifts are under way in both: Hamas is quietly opening up to decommissioning and Israel’s security elite is realising military victory is a myth. European leaders have a rare chance to help shift the Gaza war from attrition to political resolution