:root {
	--mm-color-navy: #0b1f4d;
	--mm-color-blue: #1b3a8e;
	--mm-color-green: #22c55e;
	--mm-color-page: #f6f8fb;
	--mm-color-surface: #ffffff;
	--mm-color-ink: #263750;
	--mm-color-heading: #102653;
	--mm-color-secondary: #60718d;
	--mm-color-muted: #8b9ab2;
	--mm-color-border: #dce4ef;
	--mm-color-rule: #cbd6e5;
	--mm-color-rule-strong: #9eafc7;
	--mm-color-blue-tint: #f1f5ff;
	--mm-color-neutral-tint: #f9fafc;
	--mm-font-sans: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--mm-space-1: 0.25rem;
	--mm-space-2: 0.5rem;
	--mm-space-3: 0.75rem;
	--mm-space-4: 1rem;
	--mm-space-5: 1.25rem;
	--mm-space-6: 1.5rem;
	--mm-space-8: 2rem;
	--mm-space-9: 2.25rem;
	--mm-space-12: 3rem;
	--mm-space-16: 4rem;
	--mm-page-width: 73.75rem;
	--mm-reading-width: 45.5rem;
	color-scheme: light;
	font-family: var(--mm-font-sans);
	line-height: 1.68;
	color: var(--mm-color-ink);
	background: var(--mm-color-page);
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 5rem;
}

body {
	margin: 0;
	overflow-x: clip;
	color: var(--mm-color-ink);
	background: var(--mm-color-page);
	font-family: var(--mm-font-sans);
	font-size: 1rem;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.mm-site-header {
	height: 3.625rem;
	color: var(--mm-color-surface);
	background: var(--mm-color-navy);
}

.mm-site-header__inner {
	display: flex;
	align-items: center;
	width: min(calc(100% - 2.5rem), var(--mm-page-width));
	height: 100%;
	margin-inline: auto;
}

.mm-site-header__logo {
	width: 9.125rem;
	height: 2.375rem;
	object-fit: contain;
}

.mm-site-header nav {
	display: flex;
	gap: 2.125rem;
	margin-left: auto;
	font-size: 0.9375rem;
}

.mm-site-header a {
	color: inherit;
	text-decoration: none;
}

.mm-course-preview-shell {
	min-height: calc(100vh - 3.625rem);
}

.mm-course-preview-shell--pending {
	visibility: hidden;
}

.mm-preview-notice {
	position: fixed;
	right: var(--mm-space-4);
	top: 0.65rem;
	z-index: 10;
	margin: 0;
	padding: 0.4rem 0.65rem;
	border: 1px solid rgb(255 255 255 / 24%);
	border-radius: 0.5rem;
	color: rgb(255 255 255 / 82%);
	background: rgb(255 255 255 / 7%);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.mm-course {
	min-width: 0;
}

.mm-course__header {
	border-bottom: 1px solid var(--mm-color-border);
	background: var(--mm-color-surface);
}

.mm-course__header-inner {
	box-sizing: border-box;
	width: min(calc(100% - 2.5rem), var(--mm-page-width));
	margin-inline: auto;
	padding-block: var(--mm-space-8) 1.75rem;
}

.mm-course__resource-type,
.mm-semantic-block h3,
.mm-course-toc__title {
	margin: 0;
	color: var(--mm-color-blue);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	line-height: 1.4;
	text-transform: uppercase;
}

.mm-course__header h1 {
	max-width: 52rem;
	margin: var(--mm-space-2) 0 0;
	color: var(--mm-color-heading);
	font-size: clamp(2.5rem, 4vw, 2.75rem);
	font-weight: 500;
	letter-spacing: -0.045em;
	line-height: 1.13;
}

.mm-course__meta {
	margin: 0.5rem 0 0;
	color: var(--mm-color-secondary);
	font-size: 1rem;
	line-height: 1.68;
}

.mm-course__meta span {
	margin-inline: 0.75rem;
}

.mm-course__layout {
	display: grid;
	grid-template-columns: minmax(0, 48.75rem) minmax(13rem, 1fr);
	gap: var(--mm-space-12);
	box-sizing: border-box;
	width: min(calc(100% - 2.5rem), var(--mm-page-width));
	margin-inline: auto;
	padding-block: 3.25rem 6rem;
}

.mm-course__sections {
	min-width: 0;
}

.mm-course-section {
	max-width: 48.75rem;
	margin: 0 0 4.25rem;
	scroll-margin-top: 5rem;
}

.mm-course-section:last-child {
	margin-bottom: 0;
}

.mm-course-section__header {
	display: grid;
	grid-template-columns: 2rem minmax(0, 1fr);
	align-items: baseline;
	gap: var(--mm-space-5);
	margin-bottom: 1.125rem;
}

.mm-course-section__marker {
	color: var(--mm-color-blue);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.2;
}

.mm-course-section__content {
	min-width: 0;
	max-width: var(--mm-reading-width);
	margin-left: 3.25rem;
}

.mm-course-section__title {
	margin: 0;
	color: var(--mm-color-heading);
	font-size: clamp(1.625rem, 2.2vw, 1.875rem);
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.16;
}

.mm-semantic-block {
	box-sizing: border-box;
	overflow-x: clip;
	margin-block: 1.625rem;
	padding: 0.875rem var(--mm-space-6);
	border-left: 0.1875rem solid var(--mm-color-blue);
	background: var(--mm-color-neutral-tint);
}

.mm-semantic-block:first-of-type {
	margin-top: 0;
}

.mm-semantic-block:last-child {
	margin-bottom: 0;
}

.mm-semantic-block--text {
	padding: 0;
	border: 0;
	background: transparent;
}

.mm-semantic-block--definition {
	background: var(--mm-color-blue-tint);
}

.mm-semantic-block--propriete,
.mm-semantic-block--proposition,
.mm-semantic-block--theoreme,
.mm-semantic-block--corollaire {
	border-left-color: var(--mm-color-navy);
	background: transparent;
}

.mm-semantic-block--exemple {
	margin-top: 1.75rem;
	padding: var(--mm-space-5) 0 0;
	border-top: 1px solid var(--mm-color-border);
	border-left: 0;
	background: transparent;
}

.mm-semantic-block--remarque {
	padding-block: var(--mm-space-4);
	border-left: 0.125rem solid var(--mm-color-rule-strong);
	background: rgb(255 255 255 / 42%);
}

.mm-semantic-block--preuve {
	padding-block: var(--mm-space-4);
	border-left: 0.125rem solid var(--mm-color-rule);
	background: transparent;
}

.mm-semantic-block--attention,
.mm-semantic-block--technique,
.mm-semantic-block--methode,
.mm-semantic-block--complement,
.mm-semantic-block--rappel,
.mm-semantic-block--vocabulaire,
.mm-semantic-block--notations {
	background: var(--mm-color-neutral-tint);
}

.mm-semantic-block--s_entrainer {
	border: 1px solid var(--mm-color-border);
	border-left: 0.1875rem solid var(--mm-color-blue);
	background: var(--mm-color-surface);
}

.mm-semantic-block h3 {
	margin-bottom: var(--mm-space-3);
}

.mm-semantic-block p,
.mm-semantic-block li {
	font-size: 1.125rem;
	line-height: 1.68;
}

.mm-semantic-block--propriete p:nth-of-type(2) {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.375rem;
	line-height: 1.45;
}

.mm-semantic-block p {
	margin: 0 0 var(--mm-space-4);
}

.mm-semantic-block p:last-child,
.mm-semantic-block li > :last-child {
	margin-bottom: 0;
}

.mm-semantic-block strong {
	font-weight: 700;
}

.mm-semantic-block ol,
.mm-semantic-block ul {
	margin: var(--mm-space-4) 0;
	padding-left: 1.6rem;
}

.mm-semantic-block li + li {
	margin-top: var(--mm-space-2);
}

.mm-semantic-block li > ol,
.mm-semantic-block li > ul {
	margin-block: var(--mm-space-2);
}

.mm-inline-math {
	display: inline-block;
	max-width: none;
	margin-inline: 0.065em;
	overflow: visible;
	overscroll-behavior-inline: contain;
	vertical-align: -0.08em;
	white-space: nowrap;
	scrollbar-color: var(--mm-color-rule-strong) transparent;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.mm-inline-math--no-space-before {
	margin-inline-start: 0;
}

.mm-inline-math--no-space-after {
	margin-inline-end: 0;
}

.mm-inline-math--overflow {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: var(--mm-space-3) 0;
	overflow-x: auto;
	vertical-align: baseline;
}

.mm-inline-math--overflow[data-mm-overflow-end="false"] {
	border-inline-end: 0.125rem solid var(--mm-color-rule-strong);
}

.mm-display-math {
	position: relative;
	max-width: 100%;
	margin-block: var(--mm-space-4);
	padding: var(--mm-space-2) 0;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	border-inline-end: 0 solid transparent;
	scrollbar-color: var(--mm-color-rule-strong) transparent;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.mm-display-math[data-mm-overflow="true"][data-mm-overflow-end="false"] {
	border-inline-end-width: 0.125rem;
	border-inline-end-color: var(--mm-color-rule-strong);
}

.mm-display-math:focus-visible,
.mm-inline-math--overflow:focus-visible,
.mm-table-scroll:focus-visible {
	outline: 0.125rem solid var(--mm-color-blue);
	outline-offset: 0.25rem;
}

.mm-display-math mjx-container[jax="CHTML"][display="true"] {
	min-width: max-content;
	margin: 0.75em 0 !important;
	text-align: left !important;
}

.mm-course-figure {
	margin: var(--mm-space-6) auto;
	text-align: center;
}

.mm-course-figure img {
	display: block;
	width: 13.75rem;
	max-width: min(100%, 32rem);
	height: auto;
	margin-inline: auto;
}

.mm-course-figure figcaption {
	max-width: 32rem;
	margin: var(--mm-space-3) auto 0;
	color: var(--mm-color-muted);
	font-size: 0.75rem;
	line-height: 1.5;
}

.mm-table-scroll {
	max-width: 100%;
	margin-block: var(--mm-space-6);
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scrollbar-color: var(--mm-color-rule-strong) transparent;
	scrollbar-width: thin;
}

.mm-table-scroll table {
	width: 100%;
	min-width: 30rem;
	border-collapse: collapse;
	background: var(--mm-color-surface);
}

.mm-table-scroll th,
.mm-table-scroll td {
	padding: var(--mm-space-3) var(--mm-space-4);
	border: 1px solid var(--mm-color-border);
	text-align: left;
}

.mm-table-scroll th {
	color: var(--mm-color-heading);
	font-weight: 700;
}

.mm-course-toc--desktop {
	position: sticky;
	top: var(--mm-space-8);
	align-self: start;
	min-width: 0;
	padding-top: 0.4rem;
}

.mm-course-toc__title {
	margin-bottom: var(--mm-space-4);
	color: var(--mm-color-secondary);
}

.mm-course-toc__list {
	margin: 0;
	padding: 0;
	border-left: 1px solid var(--mm-color-rule);
	list-style: none;
}

.mm-course-toc__list li {
	margin: 0;
}

.mm-course-toc__link {
	display: block;
	margin-left: -1px;
	padding: 0.45rem 0.75rem;
	border-left: 0.125rem solid transparent;
	color: var(--mm-color-secondary);
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.45;
	text-decoration: none;
}

.mm-course-toc__link:hover,
.mm-course-toc__link:focus-visible {
	color: var(--mm-color-blue);
}

.mm-course-toc__link:focus-visible {
	outline: 0.125rem solid var(--mm-color-blue);
	outline-offset: 0.125rem;
}

.mm-course-toc__link[aria-current="true"] {
	border-left-color: var(--mm-color-green);
	color: var(--mm-color-heading);
	font-weight: 700;
}

.mm-course-toc--mobile {
	display: none;
}

@media (max-width: 58rem) {
	.mm-course__layout {
		grid-template-columns: minmax(0, 1fr) 12.5rem;
		gap: var(--mm-space-8);
	}
}

@media (max-width: 46rem) {
	html {
		scroll-padding-top: 4rem;
	}

	body {
		font-size: 1rem;
	}

	.mm-site-header,
	.mm-site-header__inner {
		height: 3.125rem;
	}

	.mm-site-header__inner {
		width: calc(100% - 2.25rem);
	}

	.mm-site-header__logo {
		width: 7.125rem;
		height: 1.875rem;
	}

	.mm-site-header nav {
		display: none;
	}

	.mm-course-preview-shell {
		min-height: calc(100vh - 3.125rem);
	}

	.mm-preview-notice {
		right: var(--mm-space-2);
		top: 0.55rem;
		max-width: calc(100% - 2rem);
		padding: 0.35rem 0.5rem;
		font-size: 0.5625rem;
	}

	.mm-course__header-inner {
		width: 100%;
		padding: 1.25rem 1.125rem 1.1rem;
	}

	.mm-course__header h1 {
		margin-top: 0.35rem;
		font-size: clamp(1.875rem, 9vw, 2rem);
		letter-spacing: -0.04em;
	}

	.mm-course__meta {
		margin-top: 0.3rem;
		font-size: 0.8125rem;
	}

	.mm-course__meta span {
		margin-inline: 0.3rem;
	}

	.mm-course__resource-type {
		font-size: 0.6875rem;
	}

	.mm-course-toc--desktop {
		display: none;
	}

	.mm-course-toc--mobile {
		display: block;
		border-bottom: 1px solid var(--mm-color-border);
	}

	.mm-course-toc--mobile summary {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--mm-space-4);
		padding: 0.8125rem 1.125rem;
		color: var(--mm-color-ink);
		background: var(--mm-color-page);
		font-size: 0.8125rem;
		font-weight: 500;
		cursor: pointer;
		list-style-position: inside;
	}

	.mm-course-toc--mobile summary::-webkit-details-marker {
		display: none;
	}

	.mm-course-toc--mobile summary::after {
		content: '';
		width: 0.5rem;
		height: 0.8125rem;
		background: url('../images/chapter/chevron.png') center / contain no-repeat;
		transform: rotate(90deg);
	}

	.mm-course-toc--mobile summary:focus-visible {
		outline: 0.125rem solid var(--mm-color-blue);
		outline-offset: -0.125rem;
	}

	.mm-course-toc__count {
		margin-left: auto;
		color: var(--mm-color-muted);
		font-weight: 400;
	}

	.mm-course-toc--mobile .mm-course-toc__list {
		margin: 0 1.125rem var(--mm-space-4);
		background: var(--mm-color-surface);
	}

	.mm-course-toc--mobile .mm-course-toc__link {
		font-size: 0.8125rem;
	}

	.mm-course__layout {
		display: block;
		width: 100%;
		padding: 1.75rem 1.5rem 4rem 1.125rem;
	}

	.mm-course-section {
		max-width: none;
		margin-bottom: 3.5rem;
	}

	.mm-course-section__content {
		max-width: none;
		margin-left: 2.5rem;
	}

	.mm-course-section__header {
		grid-template-columns: 1.75rem minmax(0, 1fr);
		gap: var(--mm-space-3);
		margin-bottom: 1.0625rem;
	}

	.mm-course-section__marker {
		font-size: 0.6875rem;
	}

	.mm-course-section__title {
		font-size: clamp(1.5rem, 6.4vw, 1.625rem);
		line-height: 1.18;
	}

	.mm-semantic-block {
		margin-block: 1.5rem;
		padding: 0.625rem 0 0.625rem var(--mm-space-4);
	}

	.mm-semantic-block--definition {
		padding-right: var(--mm-space-3);
	}

	.mm-semantic-block--exemple,
	.mm-semantic-block--text {
		padding-right: 0;
		padding-left: 0;
	}

	.mm-semantic-block--exemple {
		padding-top: var(--mm-space-4);
	}

	.mm-semantic-block--s_entrainer {
		padding-right: var(--mm-space-4);
	}

	.mm-semantic-block p,
	.mm-semantic-block li {
		font-size: 1rem;
		line-height: 1.68;
	}

	.mm-semantic-block ol,
	.mm-semantic-block ul {
		padding-left: 1.3rem;
	}

	.mm-display-math {
		margin-inline: 0;
		padding-block: var(--mm-space-3);
	}

	.mm-course-figure {
		margin-block: var(--mm-space-5);
	}

	.mm-course-figure img {
		max-width: 100%;
	}

	.mm-course-figure figcaption {
		font-size: 0.6875rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
