i'm trying to customize the title of sections in my document using the packages tikz and titlesec.
Unfortunately, that does not work and i need some help to solve my problem.
I get this error :
! Argument of \tikz@next has an extra }.
<inserted text>
\par
l.25 \section{Problem}
I've run across a `}' that doesn't seem to match anything.
Here is my code :
\documentclass[a4paper, 11pt]{article}
\usepackage[francais]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{titlesec}
\usepackage[x11names]{xcolor}
\usepackage{tikz}
\titleformat{\section}
{\normalfont\Large\sffamily\bfseries\color{CadetBlue4}}
{%
\tikz[anchor=base,baseline,outer sep=0pt]
\node[anchor=base,rectangle,rounded corners,fill=CadetBlue4]
{\normalfont\Large\sffamily\bfseries{\textcolor{CadetBlue2!20}{\thesection}}};%
}{0em}{}
\begin{document}
\tikz[anchor=base,baseline,outer sep=0pt]
\node[anchor=base,rectangle,rounded corners,fill=CadetBlue4]
{\normalfont\Large\sffamily\bfseries{\textcolor{CadetBlue2!20}{That works}}};
\section{Problem}
\end{document}
Thank you for your help.

\begin{tikzpicture}...\end{tikzpicture}– touhami Oct 07 '15 at 14:58