/* ==========================================================================
   KIDS CARE — BASE : polices, typographie, accessibilité
   ========================================================================== */

/* ---------- Polices auto-hébergées (OFL) ----------
   Fichiers variables : une seule ressource couvre toute la plage de graisses.
   font-display: swap → le texte reste lisible pendant le chargement.
------------------------------------------------------------------------- */
@font-face {
	font-family: "Manrope";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/manrope-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
		U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
		U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Manrope";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/manrope-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
		U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
		U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
		U+A720-A7FF;
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
		U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
		U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
		U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
		U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
		U+A720-A7FF;
}

/* ---------- Réglages globaux ---------- */
html {
	scroll-behavior: smooth;
}

@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;
	}
}

body {
	font-family: var(--kc-font-body);
	font-size: var(--kc-text-md);
	line-height: var(--kc-leading-body);
	color: var(--kc-ink);
	background-color: var(--kc-white);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

@media (max-width: 768px) {
	body {
		font-size: var(--kc-text-base); /* jamais sous 16px */
	}
}

/* ---------- Titres ---------- */
h1,
h2,
h3,
h4,
h5,
h6,
.kc-h1,
.kc-h2,
.kc-h3,
.kc-h4 {
	font-family: var(--kc-font-title);
	line-height: var(--kc-leading-title);
	color: var(--kc-ink);
	letter-spacing: -0.015em;
	text-wrap: balance;
	margin: 0 0 var(--kc-space-4);
}

h1,
.kc-h1 {
	font-size: var(--kc-h1);
	font-weight: 750;
}

h2,
.kc-h2 {
	font-size: var(--kc-h2);
	font-weight: 700;
}

h3,
.kc-h3 {
	font-size: var(--kc-h3);
	font-weight: 700;
}

h4,
.kc-h4 {
	font-size: var(--kc-h4);
	font-weight: 600;
}

p {
	margin: 0 0 var(--kc-space-4);
	max-width: var(--kc-measure);
	text-wrap: pretty;
}

/* Le texte centré ou en carte n'est pas contraint par la mesure */
.kc-card p,
.kc-text-center p,
.kc-hero p {
	max-width: none;
}

/* ---------- Liens ---------- */
a {
	color: var(--kc-link);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: color var(--kc-transition);
}

a:hover {
	color: var(--kc-link-hover);
}

/* ---------- Listes ---------- */
ul,
ol {
	margin: 0 0 var(--kc-space-4);
	padding-left: 1.35em;
	max-width: var(--kc-measure);
}

li + li {
	margin-top: var(--kc-space-2);
}

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

/* NE PAS ajouter ici de règle du type `img[width][height] { height: auto }` :
   sa spécificité (0,2,1) dépasse celle de `.kc-logo img` (0,1,1) et écrase la
   hauteur imposée au logo, qui reprend alors sa taille naturelle et force la
   largeur de toute la page. La règle `img { height: auto }` ci-dessus suffit à
   préserver le ratio. */

/* ==========================================================================
   ACCESSIBILITÉ
   ========================================================================== */

/* ---------- Lien d'évitement ---------- */
.kc-skip-link {
	position: absolute;
	top: 0;
	left: var(--kc-space-4);
	z-index: 9999;
	padding: var(--kc-space-3) var(--kc-space-5);
	background: var(--kc-ink);
	color: var(--kc-white);
	font-weight: 600;
	border-radius: 0 0 var(--kc-radius-sm) var(--kc-radius-sm);
	transform: translateY(-120%);
	transition: transform var(--kc-transition);
}

.kc-skip-link:focus {
	transform: translateY(0);
	color: var(--kc-white);
}

/* ---------- Focus visible (clavier uniquement) ---------- */
:focus-visible {
	outline: 3px solid var(--kc-focus);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Sur fond coloré, l'anneau passe en blanc pour rester contrasté */
.kc-on-dark :focus-visible,
.kc-footer :focus-visible {
	outline-color: var(--kc-white);
}

/* ---------- Masqué visuellement, lu par les lecteurs d'écran ---------- */
.kc-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.kc-sr-only:focus-within {
	position: static;
	width: auto;
	height: auto;
	clip: auto;
	clip-path: none;
}

/* ---------- Zones tactiles ---------- */
a,
button,
input,
select,
textarea,
[role="button"] {
	min-height: auto;
}

.kc-nav a,
.kc-btn,
.kc-mobile-bar a {
	min-height: var(--kc-tap);
	display: inline-flex;
	align-items: center;
}

/* Liens de navigation présentés en liste (pied de page, informations
   pratiques, mentions légales). Ce ne sont pas des liens « dans une phrase » :
   l'exemption de la règle 2.5.8 ne s'applique pas, ils doivent donc atteindre
   au moins 24 × 24 px partout. */
.kc-footer li a,
.kc-footer__legal a,
.kc-infos__list a,
.kc-topbar a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
}

/* Sur écran tactile, on passe à la cible confortable de 44 px. */
@media (pointer: coarse) {
	.kc-footer li a,
	.kc-footer__legal a,
	.kc-infos__list a,
	.kc-topbar a {
		min-height: var(--kc-tap);
	}
}

/* Aucun contenu large ne doit provoquer de défilement horizontal de la page :
   il défile dans son propre conteneur. */
.kc-main table,
.kc-main pre {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

/* Filet de sécurité contre les débordements latéraux sur mobile. */
html,
body {
	overflow-x: clip;
}

/* Les mots très longs (termes médicaux, e-mails) ne débordent pas. */
h1,
h2,
h3,
h4,
p,
li,
address,
td {
	overflow-wrap: break-word;
}

/* ---------- Mode contraste forcé (Windows) ---------- */
@media (forced-colors: active) {
	.kc-btn {
		border: 2px solid currentcolor;
	}
}
