\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{agrphy}
\RequirePackage[dvipsnames]{xcolor}
\RequirePackage{lmodern}
\RequirePackage[utf8]{inputenc}
\usepackage[french]{babel}
\frenchbsetup{StandardLists=true}
\RequirePackage[T1]{fontenc}
\RequirePackage[most]{tcolorbox}
\RequirePackage[top=2cm, bottom=2cm, left=1.5cm, right=1.5cm]{geometry}
\RequirePackage{amsmath,amssymb,amsthm}
\RequirePackage{subfigure}
\RequirePackage{graphicx}
\RequirePackage{tabularx}
\RequirePackage{pifont}
\RequirePackage{multirow}
\RequirePackage{caption}
\RequirePackage{float}
\RequirePackage[mathscr]{euscript}
\RequirePackage{wasysym}
\RequirePackage{enumitem}
\RequirePackage{setspace}
\RequirePackage{breakcites}
\RequirePackage{titlesec}
\RequirePackage{siunitx}
\sisetup{separate-uncertainty=true}
\RequirePackage{auto-pst-pdf} 
\RequirePackage{chemfig}
\RequirePackage{fourier-orns}
\RequirePackage{marvosym}
\RequirePackage{fancyhdr}
\RequirePackage{chemist}
\RequirePackage{chemformula}
\RequirePackage{physics}
\RequirePackage{mathtools}
\RequirePackage{booktabs}
\RequirePackage{upgreek}
\RequirePackage{relsize}
\RequirePackage{exscale}
\RequirePackage{fontawesome}


%%% Ajout d'éléments tikz
\RequirePackage{standalone}
\RequirePackage[tikz]{bclogo}
\RequirePackage{pgfplots}
	\usetikzlibrary{
		calc,
		patterns,
		arrows,
		shapes.misc,
		math,
		positioning,
	}
	\pgfplotsset{
		compat=1.16,
		samples=200,
		clip=false,
		my axis style/.style={
			axis x line=middle,
			axis y line=middle,
			legend pos=outer north east,
			axis line style={
				->,
			},
			legend style={
				font=\footnotesize
			},
			label style={
				font=\footnotesize
			},
			tick label style={
				font=\footnotesize
			},
			xlabel style={
				%at={
				%	(ticklabel* cs:1)
				%},
				%anchor=west,
				font=\normalsize,
			},
			ylabel style={
				%at={
				%	(ticklabel* cs:1)
				%},
				%anchor=east,
				font=\normalsize,
			},
			ylabel near ticks,
            xlabel near ticks,
			xlabel=$x$,
			ylabel=$y$,
			width=0.8\textwidth,
            extra x ticks={0}
		},
		my axis style 2/.style={
			axis x line=middle,
			axis y line=middle,
			legend pos=outer north east,
			axis line style={
				->,
			},
			legend style={
				font=\footnotesize
			},
			label style={
				font=\footnotesize
			},
			tick label style={
				font=\footnotesize
			},
			xlabel style={
				at={
					(ticklabel* cs:1)
				},
				anchor=west,
				font=\normalsize,
			},
			ylabel style={
				at={
					(ticklabel* cs:1)
				},
				anchor=south,
				font=\normalsize,
			},
			%ylabel near ticks,
            %xlabel near ticks,
			xlabel=$x$,
			ylabel=$y$,
			width=0.8\textwidth,
            extra x ticks={0}
		},
	}
	\tikzset{
		>=stealth
	}
\tikzset{cross/.style={cross out, draw=black, fill=none, minimum size=4*(#1-\pgflinewidth), inner sep=0pt, outer sep=0pt}, cross/.default={2pt}}




%%% Définition des couleurs

\definecolor{dgreen}{rgb}{.1,.6,.1}
\definecolor{brandeisblue}{rgb}{0.0, 0.44, 1.0}
\definecolor{capri}{rgb}{0.0, 0.75, 1.0}
\definecolor{caribbeangreen}{rgb}{0.0, 0.8, 0.6}
\definecolor{linkcolor}{rgb}{0,0,0.6}
\definecolor{notreorange}{RGB}{250, 169 , 58}
\definecolor{notrevert}{RGB}{144,248,144}
\definecolor{verttitre}{RGB}{154,205,76}
\definecolor{vertfond}{RGB}{185,221,131}
\definecolor{partieorange}{RGB}{225,69,50}
\definecolor{gr}{RGB}{200,255,210}
\definecolor{palatinatepurple}{rgb}{0.41, 0.16, 0.38}
\definecolor{grissombre}{RGB}{75,75,85}

%\definecolor{colortransi}{RGB}{255,201,14}
%\definecolor{colortransifond}{RGB}{255,236,170}
\definecolor{colortransi}{RGB}{119,136,153}
\definecolor{colortransifond}{RGB}{240,243,248}
\definecolor{colorattention}{RGB}{255,98,98}
\definecolor{colorattentionfond}{RGB}{253,234,235}
\definecolor{colorremarque}{RGB}{128,128,128}
\definecolor{colorremarquefond}{RGB}{225,224,229}
\definecolor{colorimportant}{rgb}{0.41, 0.16, 0.38}
\definecolor{colorimportantfond}{rgb}{0.9, 0.8, 1}
\definecolor{colorexperience}{RGB}{15,141,179}
\definecolor{colorexperiencefond}{RGB}{209,242,252}
\definecolor{colordefinition}{RGB}{255,160,122}
\definecolor{colordefinitionfond}{RGB}{255,239,213}
\definecolor{colormessagecle}{rgb}{0.0, 0.25, 0.42}%{RGB}{238,129,55}
\definecolor{colormessageclefond}{rgb}{0.8, 0.8, 0.93}%{RGB}{250,218,197}
\definecolor{colorbut}{rgb}{0.0, 0.25, 0.42}%{RGB}{238,129,55}
\definecolor{colorbutfond}{rgb}{0.8, 0.8, 0.93}%{RGB}{250,218,197}


%%% Couleurs des titres et définition des liens
\titleformat*{\section}{\fontfamily{cmss}\color{Fuchsia}\bfseries\Large}
\titleformat*{\subsection}{\fontfamily{cmss}\color{Violet}\bfseries\large}
\titleformat*{\subsubsection}{\fontfamily{cmss}\color{Violet}\bfseries\large}
\titleformat*{\paragraph}{\fontfamily{cmss}\color{black}\bfseries\large}

\usepackage[pdftex,
colorlinks=true,
pdfstartview=FitV,
linkcolor=linkcolor,
citecolor=linkcolor,
urlcolor=linkcolor,
hyperindex=true,
hyperfigures=false]
{hyperref}

%%%%%%%%
\makeatletter
\newcommand{\dalembertian}{\mathop{\mathpalette\dalembertian@\relax}}
\newcommand{\dalembertian@}[2]{%
  \begingroup
  \sbox\z@{$\m@th#1\square$}%
  \dimen0=\fontdimen8
    \ifx#1\displaystyle\textfont\else
    \ifx#1\textstyle\textfont\else
    \ifx#1\scriptstyle\scriptfont\else
    \scriptscriptfont\fi\fi\fi3
  \makebox[\wd\z@]{%
    \hbox to \ht\z@{%
      \vrule width \dimen0
      \kern-\dimen0
      \vbox to \ht\z@{
        \hrule height \dimen0 width \ht\z@
        \vss
        \hrule height 2\dimen0
      }%
      \kern-2.5\dimen0
      \vrule width 2.5\dimen0
    }%
  }%
  \endgroup
}
\makeatother

\newcommand\warningsign{\symbol{"26A0}}
%%%%%%%

%%%Des commandes pour le mode math
\newcommand{\derp}[2]{\dfrac{\partial #1}{\partial #2}}
\newcommand{\derps}[2]{\dfrac{\partial^2 #1}{\partial {#2}^2}}
\newcommand{\derpp}[3]{\left. \dfrac{\partial #1}{\partial #2}\right|_{#3}}
\newcommand{\integrale}[4]{\int_{#1}^{#2} #3 \,\mathrm{d}#4}
\newcommand{\der}[2]{\dfrac{\mathrm{d} #1}{\mathrm{d} #2}}
\newcommand{\ders}[2]{\dfrac{\mathrm{d}^2 #1}{\mathrm{d} {#2}^2}}
\newcommand{\rot}[1]{\grad{}\wedge\mathbf{#1}}
\newcommand{\divg}[1]{\grad{}\cdot\mathbf{#1}}
\newcommand{\ointint}{\begingroup\displaystyle\unitlength 1pt\int\mkern-7.2mu
\begin{picture}(0,3)\put(0,3){\oval(10,8)}\end{picture}\mkern-7mu\int\endgroup}
\newcommand{\intint}[1]{\int \!\!\!\! \int_{#1}}
\newcommand{\intintint}[1]{\int \!\!\!\! \int\!\!\!\! \int_{#1}}
\newcommand{\diff}[1]{\mathrm{d}#1}
\renewcommand{\Re}[1]{\operatorname{Re}\left( #1 \right)}
\renewcommand{\Im}[1]{\operatorname{Im}\left( #1 \right)}
\newcommand{\ie}{\textit{i.e.} }
\newcommand{\cf}{\textit{cf.} }
\newcommand{\EL}[1]{\der{}{t} \left( \derp{\mathcal{L}}{\dot{#1}} \right) - \derp{\mathcal{L}}{#1} }
\newcommand{\lorentz}[2]{{\Uplambda^{#1}}_{#2}}
\newcommand{\DeltaR}[1]{\Updelta_r #1}
\newcommand{\DeltaRo}[1]{\Updelta_r #1^\circ}
\newcommand{\vecuni}[1]{\mathbf{e}_{#1}}
\newcommand{\valmoy}[1]{\langle #1 \rangle}


%%%Definition des box transition, important etc

%%celle pour les transition
\newtcolorbox{mybox_transi}[2][]{
    colback=colortransifond,
    colframe=white,
    fonttitle=\bfseries,
    colbacktitle=colortransi,
    enhanced,
    boxed title style={colframe=colortransi},
    attach boxed title to top left ={xshift = 5mm, yshift*=-\tcboxedtitleheight/2},
    sharp corners,
    title=#2,#1
    }
%%%celle pour attention
\newtcolorbox{mybox_attention}[2][]{
    colback=colorattentionfond,
    colframe=white,
    fonttitle=\bfseries,
    colbacktitle=colorattention,
    enhanced,
    boxed title style={colframe=colorattention},
    attach boxed title to top left ={xshift = 5mm, yshift*=-\tcboxedtitleheight/2},
    sharp corners,
    title=#2,#1
    }
    
    %%%celle pour remarque
\newtcolorbox{mybox_remarque}[2][]{
    colback=colorremarquefond,
    colframe=white,
    fonttitle=\bfseries,
    colbacktitle=colorremarque,
    enhanced,
    boxed title style={colframe=colorremarque},
    attach boxed title to top left ={xshift = 5mm, yshift*=-\tcboxedtitleheight/2},
    sharp corners,
    title=#2,#1
    }
    
    %%%celle pour important
\newtcolorbox{mybox_important}[2][]{
    colback=colorimportantfond,
    colframe=white,
    fonttitle=\bfseries,
    colbacktitle=colorimportant,
    enhanced,
    boxed title style={colframe=colorimportant},
    attach boxed title to top left ={xshift = 5mm, yshift*=-\tcboxedtitleheight/2},
    sharp corners,
    title=#2,#1
    }
    
    
%%%celle pour les experiences    
\newtcolorbox{mybox_experience}[2][]{
    colback=colorexperiencefond,
    colframe=white,
    fonttitle=\bfseries,
    colbacktitle=colorexperience,
    enhanced,
    boxed title style={colframe=colorexperience},
    attach boxed title to top left ={xshift = 5mm, yshift*=-\tcboxedtitleheight/2},
    sharp corners,
    title=#2,#1
    }

%%celle pour les definition
\newtcolorbox{mybox_definition}[2][]{
    colback=colordefinitionfond,
    colframe=white,
    fonttitle=\bfseries,
    colbacktitle=colordefinition,
    enhanced,
    boxed title style={colframe=colordefinition},
    attach boxed title to top left ={xshift = 5mm, yshift*=-\tcboxedtitleheight/2},
    sharp corners,
    title=#2,#1
    }

    
%%%celle pour le message clé
\newtcolorbox{mybox_messagecle}[2][]{
    colback=colormessageclefond,
    colframe=white,
    fonttitle=\bfseries,
    colbacktitle=colormessagecle,
    enhanced,
    boxed title style={colframe=colormessagecle},
    attach boxed title to top left ={xshift = 5mm, yshift*=-\tcboxedtitleheight/2},
    sharp corners,
    title=#2,#1
    }

%%%celle pour le but de la lecon ou du montage
\newtcolorbox{mybox_but}[2][]{
    colback=colorbutfond,
    colframe=white,
    fonttitle=\bfseries,
    colbacktitle=colorbut,
    enhanced,
    boxed title style={colframe=colorbut},
    attach boxed title to top left ={xshift = 5mm, yshift*=-\tcboxedtitleheight/2},
    sharp corners,
    title=#2,#1
    }

%%% Commandes spéciales

\addto{\captionsfrench}{\renewcommand*{\contentsname}{Plan}}

%%%
\newcommand{\experience}[3]{
\begin{mybox_experience}{\Coffeecup \; Expérience}
\textbf{#1} - #2\\

#3
\end{mybox_experience}
}

%%%

\newcommand{\transition}[1]{
\begin{mybox_transi}{$\downarrow$\, Transition}
{\color{grissombre}#1}
\end{mybox_transi}
}

%%%%
\newcommand{\important}[2]{
\begin{mybox_important}{Important}
\textbf{#1 :}\\
#2
\end{mybox_important}
}

%%%%
\newcommand{\attention}[1]{
\begin{mybox_attention}{\faWarning\, Attention}
#1
\end{mybox_attention}
}

%%%%
\newcommand{\remarque}[1]{
\begin{mybox_remarque}{Remarque}
#1
\end{mybox_remarque}
}

%%%%
\newcommand{\references}[1]{
\begin{mybox_remarque}{\ding{45}\, Références}
#1
\end{mybox_remarque}
}

%%%%
\newcommand{\exemple}[2]{
\begin{mybox_remarque}{\Coffeecup \; Exemple}
\textbf{#1 :}\\
#2
\end{mybox_remarque}
}

%%%%
\newcommand{\definition}[2]{
\begin{mybox_definition}{Définition}
\textbf{#1 :}\\
#2
\end{mybox_definition}
}

\newcommand{\definitions}[2]{
\begin{mybox_definition}{Définitions}
\textbf{#1 :}\\
#2
\end{mybox_definition}
}

%%%%
\newcommand{\messagecle}[1]{
\begin{mybox_messagecle}{\ding{45}\, Message clé}
#1
\end{mybox_messagecle}
}

%%%%
\newcommand{\but}[1]{
\begin{mybox_but}{But}
#1
\end{mybox_but}
}

%%% En-tête et pied de page
\pagestyle{fancy}
\fancyhead[R]{\scriptsize \textsc{Agrégation de Physique}}
\fancyhead[L]{\scriptsize \textsc{2021/2022}}


%%% Fin du package
\endinput
