%%%%%%%%%%%%% Titre de section

\renewcommand{\thesection}{\Roman{section}}
\titleformat{\section}[block]
{%
	\bfseries\Large
	\color{section@title@color}
	\sectiontitle@font
}
{
\raisebox{\decalnumsec}
{%
\begin{tikzpicture}
\node (numsec) {\sectiontitle@font\thesection};
\fill[rounded corners=2pt,fill=shadow@color] ($(numsec.north west)+(2pt,-2pt)$) -- ($(numsec.north east)+(1mm,0mm)+(2pt,-2pt)$) -- ($(numsec.south east)+(2pt,-2pt)$) -- ($(numsec.south west)+(-1mm,0)+(2pt,-2pt)$) -- cycle;
\fill[rounded corners=2pt,fill=section@title@color] (numsec.north west) -- ($(numsec.north east)+(1mm,0mm)$) -- (numsec.south east) -- ($(numsec.south west)+(-1mm,0)$) -- cycle;
\node[white] at (numsec) {\sectiontitle@font\thesection};
\end{tikzpicture}
}
}
{\spacetitlesec}
{}

%%%%%%%%%%%%% Titre de subsection

\renewcommand{\thesubsection}{\arabic{subsection}}
\titleformat{\subsection}[block]
{%
	\hspace*{\decalxtitlesubsec}
	\bfseries\large
	\color{subsection@title@color}
	\subsectiontitle@font
}
{
	\raisebox{\decalnumsubsec}
	{%
	\begin{tikzpicture}
	\node (numsec) {\subsectiontitle@font\thesubsection};
	\fill[rounded corners=2pt,fill=shadow@color] ($(numsec.north west)+(2pt,-2pt)$) -- ($(numsec.north east)+(1mm,0mm)+(2pt,-2pt)$) -- ($(numsec.south east)+(2pt,-2pt)$) -- ($(numsec.south west)+(-1mm,0)+(2pt,-2pt)$) -- cycle;
	\fill[rounded corners=2pt,fill=subsection@title@color] (numsec.north west) -- ($(numsec.north east)+(1mm,0mm)$) -- (numsec.south east) -- ($(numsec.south west)+(-1mm,0)$) -- cycle;
	\node[white] at (numsec) {\subsectiontitle@font\thesubsection};
	\end{tikzpicture}
	}
}
{%
	\spacetitlesubsec
}
{%
	\itemclass{subsection@title@color}{\subsection@font}
}

%%%%%%%%%%%%% Titre de subsubsection

\renewcommand{\thesubsubsection}{\alph{subsubsection}}
\titleformat{\subsubsection}[block]
{%
	\hspace*{\decalxtitlesubsubsec}
	\bfseries
	\color{subsubsection@title@color}
	\subsubsectiontitle@font
}
{
\raisebox{\decalnumsubsubsec}
{%
\begin{tikzpicture}
\node (numsec) {\subsubsectiontitle@font\thesubsubsection};
\fill[rounded corners=2pt,fill=shadow@color] ($(numsec.north west)+(2pt,-2pt)$) -- ($(numsec.north east)+(1mm,0mm)+(2pt,-2pt)$) -- ($(numsec.south east)+(2pt,-2pt)$) -- ($(numsec.south west)+(-1mm,0)+(2pt,-2pt)$) -- cycle;
\fill[rounded corners=2pt,fill=subsubsection@title@color] (numsec.north west) -- ($(numsec.north east)+(1mm,0mm)$) -- (numsec.south east) -- ($(numsec.south west)+(-1mm,0)$) -- cycle;
\node[white] at (numsec) {\subsubsectiontitle@font\thesubsubsection};
\end{tikzpicture}
}
}
{\spacetitlesubsubsec}
{}

%%%%%%%%%%%%% Titre des paragraph

\titleformat{\paragraph}[runin]
{%
	\bfseries
	\color{paragraph@title@color}
	\paragraphtitle@font
}
{}{1em}{}

%%%%%%%%%%%%% Titre des subparagraph

\titleformat{\subparagraph}[runin]
{%
	\itshape
	\color{subparagraph@title@color}
	\subparagraphtitle@font
}
{}{1em}{}
