\usepackage[T1]{fontenc}       % gestion des accents (pour les pdf)
\usepackage[utf8]{inputenc}    % encodage du fichier source
\usepackage[french]{babel}
\usepackage{amsfonts,amsmath,amssymb}
\usepackage{multicol}
\usepackage{tikz}       % dessin
\usepackage{minted}     % coloration syntaxique
\usepackage{pstricks}
\usepackage{geometry}   % dimensions de la page
\usepackage{graphicx}   % pour les images
\usepackage{subcaption} % pour placer les figures à côté les unes des autres
\usepackage{sectsty}
\usepackage[normalem]{ulem}   % ulem pour le soulignement
\usepackage{lettrine}
\usepackage{hyperref}
\usepackage{enumitem}   % réglage liste
\usepackage{xlop}       % pour présenter les divisions euclidiennes
%\usepackage{xcolor}
\usepackage{titlesec}




\definecolor{lightgray}{gray}{.95}
\definecolor{coolblack}{rgb}{0.0, 0.18, 0.39}

\setlength{\parindent}{0pt}       %% indentation des paragraphes
\setlength{\parskip}{6pt plus 3pt minus 1pt} % Espace optimum entre les parag.
\setlength{\columnseprule}{0.25pt} % Pour la séparation avec un trait
\setlength{\columnsep}{30pt}       % Séparation entre les colonnes

\setlist[itemize]{leftmargin=0.5cm}

\geometry{
 a4paper,
 bottom=20mm, %total{170mm,257mm},
 left=17mm,
 right=17mm,
 top=10mm,
 }
 
\hypersetup{
  colorlinks   = true,  % Colours links instead of ugly boxes
  urlcolor     = blue,  % Colour for external hyperlinks
  linkcolor    = blue,  % Colour of internal links
  citecolor   = red     % Colour of citations
}

\newcommand{\citital}{\emph}
\newcommand{\formule}{\texttt}
\newcommand{\gras}{\textbf}
\newcommand{\remarque}[1]{\textbf{\underline{#1}}}
\newcommand{\fo}[1]{\textbf{\texttt{#1}}}
\newcommand{\ff}[1]{\textcolor{blue}{\textbf{\texttt{#1}}}}

\makeatletter
\newcommand{\thechapterwords}
{\categorie ~- \thechapter}
\def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@}
\def\@makechapterhead#1{%
  %\vspace*{15\p@}%
  \vspace*{0\p@}%
  {\parindent \z@ \centering \reset@font
        \thickhrulefill\quad
        \scshape \@chapapp{} \thechapterwords
        \quad \thickhrulefill
        \par\nobreak
        \vspace*{10\p@}%
        \interlinepenalty\@M
        \hrule
        \vspace*{10\p@}%
        \Huge \bfseries #1\par\nobreak
        \par
        \vspace*{10\p@}%
        \hrule
    \vskip 15\p@
  }}
\def\@makeschapterhead#1{%
  \vspace*{0\p@}%
  {\parindent \z@ \centering \reset@font
        \thickhrulefill
        \par\nobreak
        \vspace*{10\p@}%
        \interlinepenalty\@M
        \hrule
        \vspace*{10\p@}%
        \Huge \bfseries #1\par\nobreak
        \par
        \vspace*{10\p@}%
        \hrule
    \vskip 15\p@
  }}

\newminted{affichage_console}{%
    linenos,
    breaklines,
    fontsize=\footnotesize,
    frame=lines,
    tabsize=4
}

% \renewcommand{\thefigure}{\Alph{figure}}  % pour numéroter en A, B...

\allsectionsfont{\sffamily\raggedright\underline}
%\sectionfont{\color{coolblack}}
%\subsectionfont{\color{coolblack!80!black}}
%\subsubsectionfont{\color{coolblack!50!white}}

\titleformat{\section}[frame]{\normalfont}{\filcenter\footnotesize\enspace  \thesection\enspace}{0pt}{\Large\bfseries\filcenter}
%\titleformat{\section}[frame]{\normalfont}{\filright\footnotesize\enspace  \thesection\enspace}{0pt}{\Large\thesection\bfseries\filcenter}

%\titleformat*{\section}{\centering\color{purple}\bfseries\Large}
% \titleformat*{\subsection}{\color{purple}\bfseries\large}
%\titleformat*{\section}{\color{purple}\bfseries\Large\shadowbox{\thesection}}


%\titleformat{\ section
%  \thesection\hfill}{7pt}{\LARGE\bfseries\filcenter}{}
