/* ==========================================================================
   Base : remise à zéro légère et typographie
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--entete-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	overflow-x: clip;
	background: var(--c-creme);
	color: var(--c-encre);
	font-family: var(--f-texte);
	font-size: var(--fs-corps);
	font-weight: 300;
	line-height: var(--lh-corps);
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	color: var(--c-teal-titre);
	font-family: var(--f-titre);
	font-weight: var(--fw-titre);
	font-synthesis: none; /* évite un faux gras sur CoFo */
	line-height: var(--lh-titre);
	text-wrap: balance;
}

p,
ul,
ol,
figure,
blockquote {
	margin: 0;
}

strong,
b {
	font-weight: 500;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-underline-offset: 0.2em;
	transition:
		color var(--duree) var(--ease),
		background-color var(--duree) var(--ease),
		border-color var(--duree) var(--ease),
		text-decoration-color var(--duree) var(--ease);
}

/* Tous les boutons changent d'état en douceur (burger, croix de fermeture, flèches…) */
button {
	transition:
		color var(--duree) var(--ease),
		background-color var(--duree) var(--ease),
		border-color var(--duree) var(--ease),
		box-shadow var(--duree) var(--ease),
		opacity var(--duree) var(--ease);
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--c-vert-jungle);
	outline-offset: 3px;
}

/* Lien d'évitement pour le clavier */
.lien-evitement {
	position: absolute;
	top: -10rem;
	left: 1rem;
	z-index: 1000;
	padding: 0.75rem 1rem;
	background: var(--c-teal-titre);
	color: var(--c-blanc);
}

.lien-evitement:focus {
	top: 1rem;
}

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

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
