/**
 * Base : remise à zéro, texte courant, liens, focus clavier, emplacements photo.
 * Les composants (boutons, cartes, filtres…) arrivent dans components/ ; les pages dans pages/.
 */

/* Modèle de boîte par défaut (content-box), comme la maquette : une largeur n'inclut pas les marges
   intérieures. Les composants qui en ont besoin précisent box-sizing: border-box (comme la maquette). */

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

body {
	margin: 0;
	background: var(--fdlr-blanc);
	color: var(--fdlr-noir);
	font-family: var(--fdlr-sans);
	font-size: var(--fdlr-fs-16);
	font-weight: 400;
	/* Comme la maquette : interligne par défaut, chaque bloc de texte précise le sien (1,6 à 1,75). */
	line-height: normal;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl {
	margin: 0;
}

h1,
h2,
h3,
h4 {
	font-size: inherit;
	font-weight: inherit;
}

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

a {
	color: var(--fdlr-noir);
}

a:hover {
	color: var(--fdlr-noir);
}

/* 11 — Focus clavier : contour noir 2 px décalé de 2 px + halo blanc 5 px, sur tout élément cliquable */
:focus-visible {
	outline: 2px solid var(--fdlr-noir);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--fdlr-blanc);
}

:focus:not(:focus-visible) {
	outline: none;
}

/* Accessibilité */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.fdlr-lien-evitement:focus {
	position: fixed;
	top: var(--fdlr-s-8);
	left: var(--fdlr-s-8);
	z-index: 1000;
	width: auto;
	height: auto;
	padding: var(--fdlr-s-12) var(--fdlr-s-16);
	clip: auto;
	background: var(--fdlr-noir);
	color: var(--fdlr-blanc);
	font-size: var(--fdlr-fs-12);
	font-weight: 600;
	letter-spacing: var(--fdlr-ls-label);
	text-transform: uppercase;
}

/* 13 — Emplacements photo : ratio fixe, object-fit: cover, aplat écru si pas encore de photo */
.fdlr-photo {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.fdlr-photo--45 {
	aspect-ratio: 4 / 5;
}

.fdlr-photo--32 {
	aspect-ratio: 3 / 2;
}

.fdlr-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.fdlr-photo--libre {
	height: 100%;
}

.fdlr-photo--contain img {
	object-fit: contain;
}

/* Portraits en noir et blanc (Design System §13), quelle que soit la photo fournie. */
.fdlr-nb img {
	filter: grayscale(1);
}

.fdlr-photo--vide {
	background: var(--fdlr-ecru);
}

/* 07 — Réduction des animations demandée par l'internaute */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
