/*
 * Typographie des contenus longs (fiches techniques, cours).
 *
 * Le contenu vient de l'ancien site : titres, paragraphes, images, tableaux et
 * équations. Il a besoin d'une mesure de lecture, d'une hiérarchie visible et
 * d'un traitement propre des médias.
 */

.qv-article {
	--qv-accent: #1976b8;
	--qv-marine: #0d1f35;
	--qv-texte: #374151;
	--qv-gris: #6b7280;
	--qv-bord: #e5e7eb;
	max-width: 68ch;
	font-size: 17px;
	line-height: 1.75;
	color: var(--qv-texte);
}

.qv-article > *:first-child {
	margin-top: 0;
}

.qv-article p {
	margin: 0 0 1.35em;
}

.qv-article h2 {
	margin: 2.4em 0 .7em;
	padding-top: .8em;
	font-family: "DM Sans", Inter, sans-serif;
	font-size: 25px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--qv-marine);
	text-wrap: balance;
	border-top: 1px solid var(--qv-bord);
}

.qv-article h2:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.qv-article h3 {
	margin: 1.9em 0 .5em;
	font-size: 19px;
	font-weight: 700;
	color: var(--qv-marine);
}

.qv-article h4 {
	margin: 1.6em 0 .4em;
	font-size: 17px;
	font-weight: 600;
	color: var(--qv-marine);
}

.qv-article a {
	color: var(--qv-accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.qv-article a:hover {
	color: #1565a0;
}

.qv-article strong {
	color: var(--qv-marine);
}

.qv-article em {
	color: var(--qv-gris);
}

.qv-article ul,
.qv-article ol {
	margin: 0 0 1.35em;
	padding-left: 1.3em;
}

.qv-article li {
	margin-bottom: .45em;
}

.qv-article li::marker {
	color: var(--qv-accent);
}

/*
 * Images et équations : cadrées, jamais collées au texte.
 *
 * Le contenu importé porte des photos en portrait jusqu'à 776 × 1024 px. Sans
 * plafond de hauteur, elles occupaient près de 800 px de haut et écrasaient la
 * page. On borne la hauteur et on centre : une équation en paysage garde sa
 * taille d'origine, une photo verticale rentre dans l'écran.
 */
.qv-article img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 460px;
	height: auto;
	margin: 1.8em auto;
	background: #fff;
	border: 1px solid var(--qv-bord);
}

.qv-article figure {
	margin: 1.8em 0;
}

.qv-article figure img {
	margin: 0;
}

.qv-article figcaption {
	margin-top: .6em;
	font-size: 14px;
	color: var(--qv-gris);
}

/* Un tableau large défile dans son propre cadre plutôt que de pousser la page. */
.qv-article table {
	display: block;
	width: 100%;
	margin: 1.8em 0;
	overflow-x: auto;
	font-size: 15px;
	border-collapse: collapse;;
	/* Rendue focusable par le script : une zone qui défile doit pouvoir être
	   parcourue au clavier. Le contour n'apparaît qu'au focus clavier. */
}

.qv-article table:focus-visible {
	outline: 2px solid var( --qv-accent, #1976b8 );
	outline-offset: 2px;
}

.qv-article table tbody,
.qv-article table thead {
	display: table;
	width: 100%;
}

.qv-article th,
.qv-article td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid var(--qv-bord);
}

.qv-article th {
	font-weight: 600;
	color: var(--qv-marine);
	background: #f9fafb;
}

.qv-article blockquote {
	margin: 1.8em 0;
	padding: 4px 0 4px 20px;
	color: var(--qv-marine);
	border-left: 3px solid var(--qv-accent);
}

.qv-article sup {
	font-size: .72em;
}

/* Bandeau d'en-tête d'une fiche. */

.qv-fiche-entete {
	display: flex;
	flex-direction: column;
	gap: 14px;
	align-items: flex-start;
}

.qv-fiche-entete__retour {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	font-size: 14px;
	font-weight: 600;
	color: #1976b8;
	text-decoration: none;
}

.qv-fiche-entete__retour:hover {
	color: #1565a0;
}

.qv-fiche-entete__retour .qv-icone {
	transform: rotate(180deg);
}

.qv-fiche-entete__categorie {
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
	color: #1565a0;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
}

.qv-fiche-entete__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
	margin: 0;
	font-size: 14px;
	color: #6b7280;
}

.qv-fiche-entete__meta span {
	display: inline-flex;
	gap: 8px;
	align-items: center;
}

@media (max-width: 767px) {
	.qv-article {
		font-size: 16px;
	}

	.qv-article h2 {
		font-size: 22px;
	}

	.qv-article img {
		max-height: 340px;
	}
}
