/**
 * Boostage Online — Remise à zéro moderne et accessibilité de base.
 */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	overflow-x: clip;
	scroll-padding-top: calc(var(--bo-header-height) + 1rem);
}

/* Le <dialog> natif gère son propre verrou ; on bloque seulement le défilement de fond. */
html.bo-dialog-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	min-height: 100vh;
	background: var(--bo-bg);
	color: var(--bo-text);
	font-family: var(--bo-font);
	font-size: var(--bo-text-base);
	line-height: var(--bo-leading);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* Verrou de défilement (menu mobile) : position fixe pour iOS, décalage géré par navigation.js */
body.bo-no-scroll {
	left: 0;
	overflow: hidden;
	position: fixed;
	right: 0;
	width: 100%;
}

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

img {
	height: auto;
}

svg.bo-icon {
	flex-shrink: 0;
}

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

button {
	cursor: pointer;
}

button:disabled {
	cursor: not-allowed;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
	overflow-wrap: break-word;
}

table {
	border-collapse: collapse;
	width: 100%;
}

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

[hidden] {
	display: none !important;
}

/* Focus visible et cohérent sur tous les éléments interactifs */
:focus {
	outline: none;
}

:focus-visible {
	outline: 2px solid var(--bo-focus);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Texte réservé aux lecteurs d'écran (classe WordPress standard) */
.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--bo-white);
	border-radius: var(--bo-radius-sm);
	box-shadow: var(--bo-shadow-lg);
	clip-path: none;
	color: var(--bo-navy);
	display: block;
	font-size: var(--bo-text-sm);
	font-weight: var(--bo-weight-semibold);
	height: auto;
	left: 1rem;
	padding: 0.875rem 1.25rem;
	text-decoration: none;
	top: 1rem;
	width: auto;
	z-index: 100000;
}

.skip-link:focus {
	outline: 2px solid var(--bo-focus);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
