\definecolor{corrigepage}{HTML}{ebc7e6}
\definecolor{corrigenumbg}{HTML}{87287a}

\newcommand\corriges{
	\tcbstoprecording
	\newpage
	\pagestyle{corriges}
	\begin{tikzpicture}[remember picture,overlay]
		\fill[corrigenumbg!50] (current page.north west) rectangle ($(current page.north east)+(0,-2.5cm)$);
		\fill[corrigenumbg!50,decorate, decoration={zigzag, segment length=4mm, amplitude=0.5mm}] ($(current page.north west)+(0,-2.3cm)$) rectangle ($(current page.north east)+(0,-2.7cm)$);
		% Ellipse rouge en haut à gauche
		\node[fill=corrigenumbg, text=white, ellipse, minimum height=1cm, minimum width=2cm, anchor=north west, scale=4] (num)
			at ([xshift=0cm,yshift=0cm]current page.north west) {\fontfamily{lmss}\fontsize{20}{18}\selectfont \bfseries \thechapter};
			% Titre
			\node[font=\Huge\bfseries\color{corrigenumbg}\fontfamily{lmss}\selectfont, align=right] at ([xshift=2cm,yshift=0cm]num.east) {Corrigés};
    \end{tikzpicture}%
	\itemclass{corrigenumbg}
	\arrayrulecolor{corrigenumbg}
	\phantomsection
	\addcontentsline{toc}{section}{\color{corrigenumbg}\fontfamily{lmss}\selectfont\large Corrigés des exercices}
	\hypersetup{linkcolor=sectioncolor}
	\vspace*{2cm}
	\tcbinputrecords
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Définition des styles
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\fancypagestyle{corriges}
{
	\pagecolor{corrigepage!20}
	\fancyhf{}
	\fancyfoot[C]{%
		\tikz\node[fill=corrigenumbg,text=white,rectangle,rounded corners=5pt,inner sep=2mm]{\fontfamily{lmss}\bfseries\thepage};%
	}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Définition des solutions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NewTotalTColorBox{\solution}{mm}{%
    enhanced,
	breakable,
	boxrule=0pt,
    colframe = corrigepage!20,
    colback = corrigepage!20,
    coltitle = corrigenumbg,
    fonttitle = \fontfamily{lmss}\selectfont\bfseries,
	watermark zoom=1,
	watermark color=gray,
	watermark opacity=.1,
	clip watermark,
	watermark text={\rotatebox{30}{mathweb.fr}},
    title={Corrigé de l'exercice~\ref{exercice:#1} page~\pageref{exercice:#1}\arrayrulecolor{corrigenumbg}},
    phantomlabel={solution:#1},
    attach title to upper=\par
}{\input{#2}}