/* ==========================================================================
   Reset et styles élémentaires
   ========================================================================== */

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

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

/* Lenis pilote le défilement : laisser le natif actif provoque des conflits. */
html.lenis,
html.lenis body {
	height: auto;
}

.lenis.lenis-smooth {
	scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
	overflow: hidden;
}

body {
	margin: 0;
	background-color: var(--bg);
	color: var(--fg);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	font-weight: 400;
	line-height: 1.65;
	letter-spacing: 0.02em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

body.is-locked {
	overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
	margin: 0;
}

ul,
ol {
	margin: 0;
	padding: 0;
}

ul[class],
ol[class] {
	list-style: none;
}

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

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

button {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

a {
	color: inherit;
	text-decoration: none;
}

:focus-visible {
	outline: 2px solid var(--ina-terracotta);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Sur une photographie, le bleu d'accent seul peut se perdre dans un ciel :
   un halo clair le double pour que le focus reste repérable partout. */
.is-dark :focus-visible,
.hero :focus-visible,
.interstitial :focus-visible {
	box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.28);
}

::selection {
	background: var(--ina-terracotta-light);
	color: var(--ina-anthracite);
}

hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: 0;
}

/* --- Échelle typographique ------------------------------------------------
   Classes utilitaires reprises telles quelles de Montfort (.fs-h1 … .fs-label)
   pour que les gabarits décrivent un rôle typographique, pas une balise. */

.fs-h1 {
	font-family: var(--font-display);
	font-size: var(--fs-h1);
	font-weight: 300;
	line-height: 1.2;
	letter-spacing: var(--ls-h1);
}

.fs-h2 {
	font-family: var(--font-display);
	font-size: var(--fs-h2);
	font-weight: 300;
	line-height: 1.35;
	letter-spacing: var(--ls-h2);
}

.fs-h3 {
	font-family: var(--font-display);
	font-size: var(--fs-h3);
	font-weight: 300;
	line-height: 1.4;
	letter-spacing: var(--ls-h3);
}

.fs-h4 {
	font-family: var(--font-body);
	font-size: var(--fs-h4);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.05rem;
}

.fs-h5 {
	font-size: var(--fs-h5);
	font-weight: 500;
	line-height: 1.6;
}

.fs-s1 {
	font-size: var(--fs-s1);
	font-weight: 400;
	line-height: 1.62;
	letter-spacing: 0.015em;
}

.fs-s2 {
	font-size: var(--fs-s2);
	line-height: 1.6;
	letter-spacing: 0.05rem;
}

.fs-body {
	font-size: var(--fs-body);
	line-height: 1.65;
	letter-spacing: 0.02em;
}

.fs-body-s {
	font-size: var(--fs-body-s);
	line-height: 1.6;
	letter-spacing: 0.022em;
}

.fs-cta {
	font-size: var(--fs-cta);
	line-height: 1.2;
	letter-spacing: 0.025rem;
}

.fs-label {
	font-size: var(--fs-label);
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.0375rem;
}

.fs-numerals {
	font-family: var(--font-display);
	font-size: var(--fs-numerals);
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: 0.025rem;
}

.uppercase {
	text-transform: uppercase;
}

.muted {
	color: var(--fg-muted);
}

.measure {
	max-width: 62ch;
}

.measure-narrow {
	max-width: 46ch;
}

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

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

.skip-link {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translate(-50%, -120%);
	z-index: 999;
	padding: 0.75rem 1.5rem;
	background: var(--ina-anthracite);
	color: var(--ina-ivoire);
	font-size: var(--fs-cta);
	text-transform: uppercase;
	letter-spacing: 0.1rem;
	transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
	transform: translate(-50%, 0);
}

/* Respect de la préférence système : on coupe tout le mouvement décoratif. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
