\definecolor{exotypepage}{HTML}{ffffff}
\definecolor{exotypenumbg}{HTML}{098b0f}
\definecolor{exotypetitlebg}{HTML}{b5e7b8}

\newcommand\exotype{
	\newpage
	\pagestyle{exotype}
	\begin{tikzpicture}[remember picture,overlay]
		\fill[exotypetitlebg] (current page.north west) rectangle ($(current page.north east)+(0,-2.5cm)$);
		\fill[exotypetitlebg,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=exotypenumbg, 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{exotypenumbg}\fontfamily{lmss}\selectfont, align=right] at ([xshift=4cm,yshift=0cm]num.east) {Exercices types};
    \end{tikzpicture}%
	\phantomsection
	\addcontentsline{toc}{section}{\color{exotypenumbg}\fontfamily{lmss}\selectfont\large Exercices types}
	\hypersetup{linkcolor=sectioncolor}
	\arrayrulecolor{exotypenumbg}
	\itemclass{exotypenumbg}
	\vspace*{1cm}
}

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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Définition de l'environnement exotype
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\AtBeginEnvironment{exercicetype}{\stepcounter{nb@exos@mathweb}}

\tcbset{ExerciceTypeStyle/.style={%
	skin=bicolor,%
	colframe=white,%
	colback=exotypenumbg!20,%
	colbacklower=white,%
	sharp corners,%
	before skip=2em,%
	separator sign={\ $\blacktriangleright$},%
	frame style={%	
			left color=exotypenumbg,%
			right color=exotypetitlebg},
	boxrule=0.5pt,%
	fonttitle={\sffamily\bfseries\color{white}},%
	breakable,
	%before upper={\itemclass{exotypenumbg}},
	%before lower={\itemclass{exotypenumbg}}
	}
}
\newtcbtheorem
	{exercicetype}			% nom de l'environnement
	{Exercice type}			% texte qui s'affiche
	{ExerciceTypeStyle} 	% style
	{exotype}				% préfixe pour références éventuelles (label)
