/**
 * Matière à Vivre — Base
 * Reset léger, éléments HTML, typographie fondamentale.
 */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--mav-cream);
	color: var(--mav-brown);
	font-family: var(--mav-font-body);
	font-size: var(--mav-body-size);
	font-weight: var(--mav-weight-light);
	line-height: var(--mav-body-line);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

body.mav-menu-open {
	overflow: hidden;
}

::selection {
	background: var(--mav-brown);
	color: var(--mav-cream);
}

a {
	color: var(--mav-brown);
	text-decoration: none;
	transition: color var(--mav-duration) ease;
}

a:hover,
a:focus-visible {
	color: var(--mav-accent);
}

:focus-visible {
	outline: 1px solid var(--mav-accent);
	outline-offset: 4px;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
	display: block;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-family: var(--mav-font-display);
	font-weight: var(--mav-weight-light);
	line-height: var(--mav-lh-title);
	letter-spacing: 0;
	text-wrap: balance;
}

p {
	margin: 0 0 1em;
	text-wrap: pretty;
}

p:last-child {
	margin-bottom: 0;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

em {
	font-style: italic;
}

button {
	font-family: inherit;
	font-size: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

input,
textarea,
select {
	font-family: var(--mav-font-body);
	font-size: inherit;
	color: inherit;
}

input::placeholder,
textarea::placeholder {
	color: var(--mav-accent-light);
	opacity: 1;
}

/* Aucun arrondi, aucune ombre : règle globale du design. */
img,
button,
input,
textarea,
select,
.mav-card,
.mav-figure {
	border-radius: 0;
}

/* Accessibilité --------------------------------------------------------- */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

.mav-skip-link:focus {
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 999;
	padding: 12px 20px;
	background: var(--mav-brown);
	color: var(--mav-cream);
	font-size: 12px;
	letter-spacing: var(--mav-track-nav);
	text-transform: uppercase;
}

/* Structure principale -------------------------------------------------- */

.mav-main {
	display: block;
}

/* Le header est fixe : les pages sans hero plein écran doivent le compenser. */
body:not(.mav-has-transparent-header) .mav-main {
	padding-top: var(--mav-header-height);
}

.mav-container {
	width: 100%;
	max-width: var(--mav-container);
	margin-inline: auto;
	padding-inline: var(--mav-gutter);
}

.mav-container--wide {
	max-width: var(--mav-container-wide);
}

.mav-container--form {
	max-width: var(--mav-container-form);
}

.mav-container--narrow {
	max-width: var(--mav-measure-narrow);
}

@media (max-width: 1439px) {
	:root {
		--mav-gutter: 32px;
	}
}

@media (max-width: 1023px) {
	:root {
		--mav-section-y: 100px;
		--mav-section-y-lg: 100px;
		--mav-section-y-sm: 100px;
	}
}

@media (max-width: 767px) {
	:root {
		--mav-gutter: 24px;
		--mav-gutter-narrow: 20px;
		--mav-header-height: 78px;
		--mav-section-y: 80px;
		--mav-section-y-lg: 88px;
		--mav-section-y-sm: 80px;
	}
}
