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


/* Dimensionnement prévisible pour les blocs, formulaires et pseudo-éléments. */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/**
 * Socle transversal du thème.
 *
 * Les couleurs, tailles typographiques, espacements et styles de base des
 * blocs sont définis dans theme.json. Ce fichier ne contient que les règles
 * structurelles qui ne peuvent pas être exprimées proprement dans theme.json.
 */

:root {
	--ans-blue: var(--wp--preset--color--ans-blue, #1d71b8);
	--ans-blue-dark: var(--wp--preset--color--ans-blue-dark, #155891);
	--ans-navy: var(--wp--preset--color--ans-navy, #343852);
	--ans-text: var(--wp--preset--color--ans-text, #697097);
	--ans-light: var(--wp--preset--color--ans-light, #f6f8fb);
	--ans-border: var(--wp--preset--color--ans-border, #dee0ea);
	--ans-pink: var(--wp--preset--color--ans-pink, #d4005a);
	--ans-white: var(--wp--preset--color--white, #fff);
	--ans-radius-sm: 0.5rem;
	--ans-radius-md: 1rem;
	--ans-radius-lg: 1.5rem;
	--ans-radius-xl: 2.2rem;
	--ans-radius-pill: 999px;
	--ans-shadow-card: var(--wp--preset--shadow--ans-card, 0 0.75rem 2rem rgba(52, 56, 82, 0.1));
	--ans-shadow-elevated: var(--wp--preset--shadow--ans-elevated, 0 1.8rem 4rem rgba(52, 56, 82, 0.12));
	--ans-transition-fast: 180ms ease;
}

html {
	scroll-behavior: smooth;
}

body {
	max-width: 100%;
	min-width: 320px;
	overflow-x: clip;
	background: var(--ans-white);
	color: var(--ans-text);
}


/* Les conteneurs flex/grid peuvent rétrécir sans imposer un débordement. */
:where(
	.wp-site-blocks,
	.wp-block-post-content,
	.entry-content,
	.wp-block-group,
	.wp-block-columns,
	.wp-block-column,
	.wp-block-navigation,
	.wp-block-navigation__container
) {
	min-width: 0;
}

body .wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
}

body .wp-site-blocks > main {
	flex: 1 0 auto;
	min-height: 45vh;
}

body .wp-site-blocks > footer {
	flex: 0 0 auto;
}

img,
svg,
video,
canvas,
iframe {
	max-width: 100%;
}

img,
video {
	height: auto;
}

iframe {
	border: 0;
}

p,
li,
dd,
td,
th,
a,
button,
input,
select,
textarea {
	overflow-wrap: anywhere;
}

pre,
code {
	overflow-x: auto;
}

.wp-block-embed__wrapper,
.ans-responsive-media {
	max-width: 100%;
}

.wp-block-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.wp-block-table table {
	min-width: 38rem;
}

/* Conserve une largeur de lecture confortable pour les contenus longs. */
.ans-content-shell {
	padding-block: clamp(2rem, 4vw, 4rem) clamp(4rem, 7vw, 7rem);
}

.wp-block-navigation a,
.wp-block-navigation-item__content {
	text-decoration: none !important;
}

/* États d'authentification : visibilité uniquement, pas contrôle de sécurité. */
body:not(.logged-in) .compte-utilisateur-connecte,
body:not(.logged-in) .ans-user-only {
	display: none !important;
}

body.logged-in .bouton-se-connecter,
body.logged-in .ans-guest-only {
	display: none !important;
}

.bonjour-utilisateur {
	text-transform: none !important;
}

.comment-form .logged-in-as {
	display: none !important;
}



.ans-front-page {
	margin: 0;
	padding: 0;
}

/* Impression : éviter les éléments purement interactifs ou flottants. */
@media print {
	.ans-topbar,
	.ans-header-actions,
	.ans-orienteur,
	.wp-block-navigation__responsive-container-open,
	.wp-block-navigation__responsive-container-close {
		display: none !important;
	}

	body .wp-site-blocks {
		display: block;
	}
}

/* Respect du réglage système limitant les animations. */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

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