/**
 * Base — styles globaux appliqués aux éléments HTML natifs
 * ---------------------------------------------------------
 * S'appuie uniquement sur les variables de variables.css.
 * Reste générique et sans classe : les composants réutilisables
 * vivent dans components.css.
 */

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

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-body);
	font-size: var(--font-size-base);
	line-height: var(--line-height-body);
	font-weight: var(--font-weight-regular);
	color: var(--color-text);
	background-color: var(--color-background);
}

/* ==========================================================
   Titres
   ========================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-heading);
	font-weight: var(--font-weight-bold);
	margin: 0 0 var(--space-sm);
}

h1 {
	font-size: var(--font-size-h1);
	line-height: var(--line-height-h1);
	color: var(--color-secondary);
}

h2 {
	font-size: var(--font-size-h2);
	line-height: var(--line-height-h2);
	color: var(--color-secondary);
}

h3 {
	font-size: var(--font-size-h3);
	line-height: var(--line-height-h3);
	color: var(--color-primary);
}

h4 {
	font-size: var(--font-size-h4);
	line-height: var(--line-height-h4);
	color: var(--color-text);
}

h5 {
	font-size: var(--font-size-h5);
	line-height: var(--line-height-h5);
	color: var(--color-primary);
}

h6 {
	font-size: var(--font-size-h6);
	line-height: var(--line-height-h5);
	color: var(--color-primary);
}

/* Titre héro plein écran (page d'accueil) : à appliquer via la classe
   utilitaire .maef-title-hero sur le module de titre Divi, le H1 de
   la maquette n'ayant cette taille que sur la home (voir components.css). */

/* ==========================================================
   Texte courant
   ========================================================== */
p {
	margin: 0 0 var(--space-sm);
}

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

small {
	font-size: var(--font-size-xs);
	color: var(--color-text-muted);
}

strong,
b {
	font-weight: var(--font-weight-bold);
}

/* ==========================================================
   Liens
   ========================================================== */
a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color var(--transition-default);
}

a:hover {
	color: var(--color-secondary);
}

a:focus-visible {
	outline: 2px solid var(--color-secondary);
	outline-offset: 2px;
}

/* ==========================================================
   Listes
   ========================================================== */
ul,
ol {
	margin: 0 0 var(--space-sm);
	padding-left: var(--space-md);
}

li {
	margin-bottom: var(--space-xs);
}

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

/* ==========================================================
   Images et médias
   ========================================================== */
img,
svg,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ==========================================================
   Formulaires (styles de base — voir .maef-form pour l'habillage complet)
   ========================================================== */
input,
textarea,
select,
button {
	font-family: var(--font-body);
	font-size: var(--font-size-base);
	color: var(--color-text);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
	outline: 2px solid var(--color-secondary);
	outline-offset: 2px;
}

/* ==========================================================
   Accessibilité — respect de la préférence de réduction de mouvement
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
