/* DESCRIPTIF D'UN COURS MIS EN PAGE COMME UN ARTICLE
   Utilisée par la page du cours (pages/cours.php) ET par l'éditeur TinyMCE de l'administration,
   pour que l'aperçu pendant la rédaction soit identique au rendu final. */

/* POLICE HÉBERGÉE SUR LE SITE : LA MÊME SUR TOUS LES APPAREILS, DONC LES MÊMES RETOURS À LA LIGNE */
@font-face {
	font-family: "Ubuntu Article";
	src: url("polices/ubuntu-latin-400-normal.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Ubuntu Article";
	src: url("polices/ubuntu-latin-400-italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Ubuntu Article";
	src: url("polices/ubuntu-latin-700-normal.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Ubuntu Article";
	src: url("polices/ubuntu-latin-700-italic.woff2") format("woff2");
	font-weight: 700;
	font-style: italic;
	font-display: swap;
}

/* LARGEUR FIXE (636px = COLONNE CENTRALE DE pages/cours.php SUR GRAND ÉCRAN).
   Si la colonne est plus étroite, pages/cours.php réduit l'article par un zoom proportionnel :
   le texte et les images restent placés exactement comme dans l'éditeur.
   Sur téléphone, l'article redevient fluide pour rester lisible. */
.article_cours {
	font-family: "Ubuntu Article", sans-serif;
	font-size: 16px;
	line-height: 1.65;
	color: #212529;
	text-align: justify;
	box-sizing: border-box;
}

@media (min-width: 576px) {
	.article_cours { width: 636px; }
}

/* Contient les images flottantes en fin d'article */
.article_cours::after {
	content: "";
	display: block;
	clear: both;
}

.article_cours h2,
.article_cours h3,
.article_cours h4 {
	line-height: 1.25;
	margin: 1.6em 0 0.6em;
}

.article_cours h2 { font-size: 1.6rem; font-weight: 700; }
.article_cours h3 { font-size: 1.3rem; font-weight: 600; color: #0d6efd; }
.article_cours h4 { font-size: 1.1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }

.article_cours > :first-child { margin-top: 0; }

.article_cours p { margin: 0 0 1em; }

.article_cours ul,
.article_cours ol {
	margin: 0 0 1em;
	padding-left: 1.5em;
}

.article_cours li { margin-bottom: 0.3em; }

.article_cours blockquote {
	margin: 1.5em 0;
	padding: 0.5em 1em;
	border-left: 4px solid #0d6efd;
	background: #f1f6ff;
	font-style: italic;
}

.article_cours hr {
	margin: 2em 0;
	border: 0;
	border-top: 1px solid #dee2e6;
	clear: both;
}

.article_cours a { color: #0d6efd; }

/* IMAGES */
.article_cours img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	border: 1px solid #dee2e6;
}

.article_cours figure.image {
	display: table;
	margin: 1em 0;
}

.article_cours figure.image img { display: block; }

.article_cours figcaption {
	display: table-caption;
	caption-side: bottom;
	padding-top: 0.4em;
	font-size: 0.85rem;
	font-style: italic;
	color: #6c757d;
	text-align: center;
}

/* Alignement : le texte coule autour des images à gauche / à droite */
.article_cours .img-gauche {
	float: left;
	max-width: 50%;
	margin: 0.3em 1.2em 0.8em 0;
}

.article_cours .img-droite {
	float: right;
	max-width: 50%;
	margin: 0.3em 0 0.8em 1.2em;
}

.article_cours img.img-centre {
	display: block;
	margin: 1em auto;
}

.article_cours figure.img-centre {
	margin-left: auto;
	margin-right: auto;
}

.article_cours figure.img-gauche img,
.article_cours figure.img-droite img { max-width: 100%; }

/* Les titres repartent sous les images flottantes */
.article_cours h2,
.article_cours h3 { clear: both; }

/* Sur téléphone, plus d'images flottantes : elles prennent toute la largeur */
@media (max-width: 575px) {
	.article_cours .img-gauche,
	.article_cours .img-droite {
		float: none;
		max-width: 100%;
		margin: 1em 0;
	}
}
