\documentclass[a4paper,11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[french]{babel}
\usepackage[a4paper,top=3.2cm,bottom=2cm,left=2cm,right=2cm]{geometry}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{fancyhdr}
\usepackage{qrcode}
\usepackage[table]{xcolor}
\usepackage{amsmath,amssymb}
\usepackage{enumitem}
% Puces nettes (babel-french remplace sinon la puce par un tiret « – » peu pro).
% Vaut pour TOUTES les fiches qui importent ce module. AtBeginDocument pour
% passer après la personnalisation des listes faite par babel-french.
\AtBeginDocument{%
  \setlist[itemize]{leftmargin=1.8em,itemsep=0.5ex,topsep=0.4ex,parsep=0pt}%
  \setlist[itemize,1]{label=\textcolor{red!75!black}{\small\textbullet}}%
  \setlist[itemize,2]{label=\textcolor{red!75!black}{\scriptsize\textbullet}}%
}
% Titres compacts (gain de place vertical, fiches plus denses) — vaut pour tous.
\usepackage{titlesec}
\titlespacing*{\section}{0pt}{1.4ex}{0.6ex}
\titlespacing*{\subsection}{0pt}{1.0ex}{0.3ex}
% multicol : listes denses (calcul mental) sur 2 colonnes — neutre tant qu'il
% n'est pas utilisé, dispo pour tous les générateurs.
\usepackage{multicol}
\setlength{\columnsep}{1.5em}
% needspace : empêche un titre d'exercice de rester orphelin en bas de page
% (réserve quelques lignes ; sinon le titre passe à la page suivante avec sa
% liste). Neutre tant qu'il n'est pas appelé — dispo pour tous les générateurs.
\usepackage{needspace}
\usepackage{tikz}
\usetikzlibrary{decorations.text}

\usepackage{tgheros}
\pagestyle{fancy}
\fancyhf{}
\setlength{\headheight}{75pt}
\setlength{\headsep}{10pt}

\newcommand{\logowouf}{%
\begin{tikzpicture}[baseline={(current bounding box.center)},scale=0.55,
                    line cap=round,line join=round]
    \path[use as bounding box] (-2.20,-1.45) rectangle (2.20,2.20);
    \path[
        postaction={decorate},
        decoration={
            text along path,
            text={|\fontfamily{qhv}\bfseries\fontsize{9}{9}\selectfont|site2wouf.fr},
            text align={center},
            raise=0.03ex
        }
    ] (-1.29,0.48) arc[start angle=160,end angle=20,radius=1.29];
    \begin{scope}[xshift=-0.06cm]
        \fill[black] (-0.66,0.14) ellipse (0.21 and 0.31);
        \fill[black] ( 0.66,0.14) ellipse (0.21 and 0.31);
        \fill[black] (-0.23,0.49) ellipse (0.22 and 0.35);
        \fill[black] ( 0.23,0.49) ellipse (0.22 and 0.35);
        \fill[black]
            (0,-0.10)
            .. controls (-0.36,-0.02) and (-0.63,-0.24) .. (-0.58,-0.58)
            .. controls (-0.52,-0.93) and (-0.16,-1.12) .. (0,-0.90)
            .. controls (0.16,-1.12) and (0.52,-0.93) .. (0.58,-0.58)
            .. controls (0.63,-0.24) and (0.36,-0.02) .. (0,-0.10)
            -- cycle;
    \end{scope}
\end{tikzpicture}%
}

\newcommand{\titre}{Carrelages de couleur}
\newcommand{\soustitre}{Reconstituer les carreaux bleus et rouges par déduction}

\fancyhead[C]{%
\raisebox{4pt}{%
\begin{minipage}[c]{0.15\textwidth}
    \centering
    \logowouf
\end{minipage}
\begin{minipage}[c]{0.62\textwidth}
    \centering
    {\Large\bfseries \titre\par}
    {\small\color{gray} \soustitre}
\end{minipage}
\begin{minipage}[c]{0.21\textwidth}
    \centering
    \qrcode[height=1.5cm]{https://site2wouf.fr/carrelages.php?x=381}\\[2pt]
    {\small\ttfamily\bfseries\color{red} CARR0381}
\end{minipage}%
}
}

\begin{document}

\begin{center}
    \small Reconstituez le carrelage d'origine composé de carreaux bleus et rouges. Chaque indice révèle le nombre de carreaux bleus adjacents à sa case (haut, bas, gauche, droite, mais pas en diagonale).
\end{center}
\vspace{0.5em}

{\bfseries\color{red} Recopie et colorie pour retrouver le carrelage d'origine :}\par\medskip

\begin{center}\begin{tikzpicture}[line cap=round]
  \draw[line width=0.4pt] (0.000,0.000) -- (4.340,0.000);
  \draw[line width=0.4pt] (0.000,-0.620) -- (4.340,-0.620);
  \draw[line width=0.4pt] (0.000,-1.240) -- (4.340,-1.240);
  \draw[line width=0.4pt] (0.000,-1.860) -- (4.340,-1.860);
  \draw[line width=0.4pt] (0.000,-2.480) -- (4.340,-2.480);
  \draw[line width=0.4pt] (0.000,-3.100) -- (4.340,-3.100);
  \draw[line width=0.4pt] (0.000,-3.720) -- (4.340,-3.720);
  \draw[line width=0.4pt] (0.000,0.000) -- (0.000,-3.720);
  \draw[line width=0.4pt] (0.620,0.000) -- (0.620,-3.720);
  \draw[line width=0.4pt] (1.240,0.000) -- (1.240,-3.720);
  \draw[line width=0.4pt] (1.860,0.000) -- (1.860,-3.720);
  \draw[line width=0.4pt] (2.480,0.000) -- (2.480,-3.720);
  \draw[line width=0.4pt] (3.100,0.000) -- (3.100,-3.720);
  \draw[line width=0.4pt] (3.720,0.000) -- (3.720,-3.720);
  \draw[line width=0.4pt] (4.340,0.000) -- (4.340,-3.720);
  \node[font=\small, black] at (0.310,-0.310) {1};
  \node[font=\small, black] at (0.930,-0.310) {0};
  \node[font=\small, black] at (1.550,-0.310) {2};
  \node[font=\small, black] at (2.170,-0.310) {1};
  \node[font=\small, black] at (2.790,-0.310) {2};
  \node[font=\small, black] at (3.410,-0.310) {3};
  \node[font=\small, black] at (4.030,-0.310) {0};
  \node[font=\small, black] at (0.310,-0.930) {1};
  \node[font=\small, black] at (0.930,-0.930) {1};
  \node[font=\small, black] at (1.550,-0.930) {1};
  \node[font=\small, black] at (2.170,-0.930) {3};
  \node[font=\small, black] at (2.790,-0.930) {3};
  \node[font=\small, black] at (3.410,-0.930) {2};
  \node[font=\small, black] at (4.030,-0.930) {2};
  \node[font=\small, black] at (0.310,-1.550) {0};
  \node[font=\small, black] at (0.930,-1.550) {3};
  \node[font=\small, black] at (1.550,-1.550) {1};
  \node[font=\small, black] at (2.170,-1.550) {2};
  \node[font=\small, black] at (2.790,-1.550) {4};
  \node[font=\small, black] at (3.410,-1.550) {3};
  \node[font=\small, black] at (4.030,-1.550) {1};
  \node[font=\small, black] at (0.310,-2.170) {3};
  \node[font=\small, black] at (0.930,-2.170) {0};
  \node[font=\small, black] at (1.550,-2.170) {3};
  \node[font=\small, black] at (2.170,-2.170) {3};
  \node[font=\small, black] at (2.790,-2.170) {2};
  \node[font=\small, black] at (3.410,-2.170) {2};
  \node[font=\small, black] at (4.030,-2.170) {1};
  \node[font=\small, black] at (0.310,-2.790) {0};
  \node[font=\small, black] at (0.930,-2.790) {3};
  \node[font=\small, black] at (1.550,-2.790) {2};
  \node[font=\small, black] at (2.170,-2.790) {1};
  \node[font=\small, black] at (2.790,-2.790) {2};
  \node[font=\small, black] at (3.410,-2.790) {1};
  \node[font=\small, black] at (4.030,-2.790) {0};
  \node[font=\small, black] at (0.310,-3.410) {1};
  \node[font=\small, black] at (0.930,-3.410) {1};
  \node[font=\small, black] at (1.550,-3.410) {1};
  \node[font=\small, black] at (2.170,-3.410) {2};
  \node[font=\small, black] at (2.790,-3.410) {0};
  \node[font=\small, black] at (3.410,-3.410) {0};
  \node[font=\small, black] at (4.030,-3.410) {0};
  \node[gray, font=\scriptsize\itshape] at (-0.248,-0.310) {6};
  \node[gray, font=\scriptsize\itshape] at (-0.248,-0.930) {5};
  \node[gray, font=\scriptsize\itshape] at (-0.248,-1.550) {4};
  \node[gray, font=\scriptsize\itshape] at (-0.248,-2.170) {3};
  \node[gray, font=\scriptsize\itshape] at (-0.248,-2.790) {2};
  \node[gray, font=\scriptsize\itshape] at (-0.248,-3.410) {1};
  \node[gray, font=\scriptsize\itshape] at (0.310,-3.968) {A};
  \node[gray, font=\scriptsize\itshape] at (0.930,-3.968) {B};
  \node[gray, font=\scriptsize\itshape] at (1.550,-3.968) {C};
  \node[gray, font=\scriptsize\itshape] at (2.170,-3.968) {D};
  \node[gray, font=\scriptsize\itshape] at (2.790,-3.968) {E};
  \node[gray, font=\scriptsize\itshape] at (3.410,-3.968) {F};
  \node[gray, font=\scriptsize\itshape] at (4.030,-3.968) {G};
\end{tikzpicture}\end{center}


\newpage

{\Large\bfseries\color{red} Correction}\par\medskip

\begin{center}\begin{tikzpicture}[line cap=round]
  \fill[red] (0.000,0.000) rectangle (0.620,-0.620);
  \fill[blue] (0.620,0.000) rectangle (1.240,-0.620);
  \fill[red] (1.240,0.000) rectangle (1.860,-0.620);
  \fill[blue] (1.860,0.000) rectangle (2.480,-0.620);
  \fill[blue] (2.480,0.000) rectangle (3.100,-0.620);
  \fill[red] (3.100,0.000) rectangle (3.720,-0.620);
  \fill[blue] (3.720,0.000) rectangle (4.340,-0.620);
  \fill[red] (0.000,-0.620) rectangle (0.620,-1.240);
  \fill[red] (0.620,-0.620) rectangle (1.240,-1.240);
  \fill[red] (1.240,-0.620) rectangle (1.860,-1.240);
  \fill[red] (1.860,-0.620) rectangle (2.480,-1.240);
  \fill[blue] (2.480,-0.620) rectangle (3.100,-1.240);
  \fill[blue] (3.100,-0.620) rectangle (3.720,-1.240);
  \fill[red] (3.720,-0.620) rectangle (4.340,-1.240);
  \fill[blue] (0.000,-1.240) rectangle (0.620,-1.860);
  \fill[red] (0.620,-1.240) rectangle (1.240,-1.860);
  \fill[blue] (1.240,-1.240) rectangle (1.860,-1.860);
  \fill[blue] (1.860,-1.240) rectangle (2.480,-1.860);
  \fill[blue] (2.480,-1.240) rectangle (3.100,-1.860);
  \fill[blue] (3.100,-1.240) rectangle (3.720,-1.860);
  \fill[red] (3.720,-1.240) rectangle (4.340,-1.860);
  \fill[red] (0.000,-1.860) rectangle (0.620,-2.480);
  \fill[blue] (0.620,-1.860) rectangle (1.240,-2.480);
  \fill[red] (1.240,-1.860) rectangle (1.860,-2.480);
  \fill[red] (1.860,-1.860) rectangle (2.480,-2.480);
  \fill[blue] (2.480,-1.860) rectangle (3.100,-2.480);
  \fill[blue] (3.100,-1.860) rectangle (3.720,-2.480);
  \fill[red] (3.720,-1.860) rectangle (4.340,-2.480);
  \fill[blue] (0.000,-2.480) rectangle (0.620,-3.100);
  \fill[red] (0.620,-2.480) rectangle (1.240,-3.100);
  \fill[blue] (1.240,-2.480) rectangle (1.860,-3.100);
  \fill[blue] (1.860,-2.480) rectangle (2.480,-3.100);
  \fill[red] (2.480,-2.480) rectangle (3.100,-3.100);
  \fill[red] (3.100,-2.480) rectangle (3.720,-3.100);
  \fill[red] (3.720,-2.480) rectangle (4.340,-3.100);
  \fill[red] (0.000,-3.100) rectangle (0.620,-3.720);
  \fill[red] (0.620,-3.100) rectangle (1.240,-3.720);
  \fill[blue] (1.240,-3.100) rectangle (1.860,-3.720);
  \fill[red] (1.860,-3.100) rectangle (2.480,-3.720);
  \fill[red] (2.480,-3.100) rectangle (3.100,-3.720);
  \fill[red] (3.100,-3.100) rectangle (3.720,-3.720);
  \fill[red] (3.720,-3.100) rectangle (4.340,-3.720);
  \draw[line width=0.4pt] (0.000,0.000) -- (4.340,0.000);
  \draw[line width=0.4pt] (0.000,-0.620) -- (4.340,-0.620);
  \draw[line width=0.4pt] (0.000,-1.240) -- (4.340,-1.240);
  \draw[line width=0.4pt] (0.000,-1.860) -- (4.340,-1.860);
  \draw[line width=0.4pt] (0.000,-2.480) -- (4.340,-2.480);
  \draw[line width=0.4pt] (0.000,-3.100) -- (4.340,-3.100);
  \draw[line width=0.4pt] (0.000,-3.720) -- (4.340,-3.720);
  \draw[line width=0.4pt] (0.000,0.000) -- (0.000,-3.720);
  \draw[line width=0.4pt] (0.620,0.000) -- (0.620,-3.720);
  \draw[line width=0.4pt] (1.240,0.000) -- (1.240,-3.720);
  \draw[line width=0.4pt] (1.860,0.000) -- (1.860,-3.720);
  \draw[line width=0.4pt] (2.480,0.000) -- (2.480,-3.720);
  \draw[line width=0.4pt] (3.100,0.000) -- (3.100,-3.720);
  \draw[line width=0.4pt] (3.720,0.000) -- (3.720,-3.720);
  \draw[line width=0.4pt] (4.340,0.000) -- (4.340,-3.720);
  \node[font=\small, white] at (0.310,-0.310) {1};
  \node[font=\small, white] at (0.930,-0.310) {0};
  \node[font=\small, white] at (1.550,-0.310) {2};
  \node[font=\small, white] at (2.170,-0.310) {1};
  \node[font=\small, white] at (2.790,-0.310) {2};
  \node[font=\small, white] at (3.410,-0.310) {3};
  \node[font=\small, white] at (4.030,-0.310) {0};
  \node[font=\small, white] at (0.310,-0.930) {1};
  \node[font=\small, white] at (0.930,-0.930) {1};
  \node[font=\small, white] at (1.550,-0.930) {1};
  \node[font=\small, white] at (2.170,-0.930) {3};
  \node[font=\small, white] at (2.790,-0.930) {3};
  \node[font=\small, white] at (3.410,-0.930) {2};
  \node[font=\small, white] at (4.030,-0.930) {2};
  \node[font=\small, white] at (0.310,-1.550) {0};
  \node[font=\small, white] at (0.930,-1.550) {3};
  \node[font=\small, white] at (1.550,-1.550) {1};
  \node[font=\small, white] at (2.170,-1.550) {2};
  \node[font=\small, white] at (2.790,-1.550) {4};
  \node[font=\small, white] at (3.410,-1.550) {3};
  \node[font=\small, white] at (4.030,-1.550) {1};
  \node[font=\small, white] at (0.310,-2.170) {3};
  \node[font=\small, white] at (0.930,-2.170) {0};
  \node[font=\small, white] at (1.550,-2.170) {3};
  \node[font=\small, white] at (2.170,-2.170) {3};
  \node[font=\small, white] at (2.790,-2.170) {2};
  \node[font=\small, white] at (3.410,-2.170) {2};
  \node[font=\small, white] at (4.030,-2.170) {1};
  \node[font=\small, white] at (0.310,-2.790) {0};
  \node[font=\small, white] at (0.930,-2.790) {3};
  \node[font=\small, white] at (1.550,-2.790) {2};
  \node[font=\small, white] at (2.170,-2.790) {1};
  \node[font=\small, white] at (2.790,-2.790) {2};
  \node[font=\small, white] at (3.410,-2.790) {1};
  \node[font=\small, white] at (4.030,-2.790) {0};
  \node[font=\small, white] at (0.310,-3.410) {1};
  \node[font=\small, white] at (0.930,-3.410) {1};
  \node[font=\small, white] at (1.550,-3.410) {1};
  \node[font=\small, white] at (2.170,-3.410) {2};
  \node[font=\small, white] at (2.790,-3.410) {0};
  \node[font=\small, white] at (3.410,-3.410) {0};
  \node[font=\small, white] at (4.030,-3.410) {0};
  \node[gray, font=\scriptsize\itshape] at (-0.248,-0.310) {6};
  \node[gray, font=\scriptsize\itshape] at (-0.248,-0.930) {5};
  \node[gray, font=\scriptsize\itshape] at (-0.248,-1.550) {4};
  \node[gray, font=\scriptsize\itshape] at (-0.248,-2.170) {3};
  \node[gray, font=\scriptsize\itshape] at (-0.248,-2.790) {2};
  \node[gray, font=\scriptsize\itshape] at (-0.248,-3.410) {1};
  \node[gray, font=\scriptsize\itshape] at (0.310,-3.968) {A};
  \node[gray, font=\scriptsize\itshape] at (0.930,-3.968) {B};
  \node[gray, font=\scriptsize\itshape] at (1.550,-3.968) {C};
  \node[gray, font=\scriptsize\itshape] at (2.170,-3.968) {D};
  \node[gray, font=\scriptsize\itshape] at (2.790,-3.968) {E};
  \node[gray, font=\scriptsize\itshape] at (3.410,-3.968) {F};
  \node[gray, font=\scriptsize\itshape] at (4.030,-3.968) {G};
\end{tikzpicture}\end{center}

\end{document}
