/* =========================================================================
   Atopia.studio — feuille de style principale
   Identité reprise du site historique : fond clair, typographie Open Sans,
   jaune #ffcc00 en accent. Tout le reste est reconstruit sur une grille et un
   rythme vertical réguliers.
   ========================================================================= */

/* --- 1. Jetons de design ------------------------------------------------ */

:root {
	--jaune: #ffcc00;
	--jaune-sombre: #e0b400;
	--noir: #1a1a1a;
	--gris-fort: #4a4a4a;
	--gris: #6e6e6e;
	--gris-clair: #e6e6e6;
	--gris-fond: #f6f6f6;
	--blanc: #ffffff;

	--fond: var(--blanc);
	--texte: var(--noir);
	--texte-doux: var(--gris);
	--trait: var(--gris-clair);

	--police: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

	/* Rythme vertical : multiples de 4px */
	--e1: 0.25rem;
	--e2: 0.5rem;
	--e3: 0.75rem;
	--e4: 1rem;
	--e6: 1.5rem;
	--e8: 2rem;
	--e12: 3rem;
	--e16: 4rem;
	--e24: 6rem;

	--largeur: 1140px;
	--largeur-texte: 68ch;
	--rayon: 4px;
	--transition: 160ms ease;
}

/* --- 2. Remise à zéro ---------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	background: var(--fond);
	color: var(--texte);
	font-family: var(--police);
	font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: inherit;
	text-decoration-color: var(--jaune);
	text-underline-offset: 3px;
	text-decoration-thickness: 2px;
	transition: color var(--transition);
}

a:hover {
	color: var(--jaune-sombre);
}

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

h1,
h2,
h3,
h4 {
	line-height: 1.2;
	margin: 0 0 var(--e4);
	font-weight: 800;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

p {
	margin: 0 0 var(--e4);
}

/* --- 3. Structure -------------------------------------------------------- */

.contenant {
	width: min(100% - 2.5rem, var(--largeur));
	margin-inline: auto;
}

.contenu-principal {
	display: block;
	padding-bottom: var(--e24);
}

.lien-evitement {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: var(--e3) var(--e4);
	background: var(--jaune);
	color: var(--noir);
	font-weight: 700;
}

.lien-evitement:focus {
	left: var(--e4);
	top: var(--e4);
}

/* --- 4. Marque et en-tête ------------------------------------------------ */

.marque__initiale {
	color: var(--jaune);
}

.entete {
	border-bottom: 1px solid var(--trait);
	background: var(--fond);
	position: sticky;
	top: 0;
	z-index: 50;
}

.entete__interieur {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--e6);
	min-height: 72px;
}

.marque {
	font-size: 1.375rem;
	font-weight: 800;
	text-decoration: none;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.custom-logo-link img {
	max-height: 48px;
	width: auto;
}

.nav-principale__liste {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--e6);
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.9375rem;
	font-weight: 600;
}

.nav-principale__liste a {
	text-decoration: none;
	padding: var(--e2) 0;
	border-bottom: 2px solid transparent;
	display: inline-block;
}

.nav-principale__liste a:hover,
.nav-principale__liste .current-menu-item > a,
.nav-principale__liste .current_page_item > a {
	border-bottom-color: var(--jaune);
	color: var(--texte);
}

.burger {
	display: none;
	align-items: center;
	gap: var(--e2);
	background: none;
	border: 1px solid var(--trait);
	border-radius: var(--rayon);
	padding: var(--e2) var(--e3);
	font: inherit;
	font-weight: 600;
	font-size: 0.875rem;
	cursor: pointer;
	color: inherit;
}

.burger__barre,
.burger__barre::before,
.burger__barre::after {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	content: "";
}

.burger__barre {
	position: relative;
}

.burger__barre::before {
	position: absolute;
	top: -6px;
}

.burger__barre::after {
	position: absolute;
	top: 6px;
}

/* --- 5. Accroche d'accueil ----------------------------------------------- */

.accroche {
	padding: var(--e24) 0 var(--e16);
	text-align: center;
}

.accroche__logo,
.est-accueil .custom-logo-link img {
	margin: 0 auto var(--e6);
	width: clamp(96px, 12vw, 140px);
	height: auto;
}

.accroche__titre {
	font-size: clamp(2.25rem, 1.6rem + 3.2vw, 4rem);
	margin-bottom: var(--e3);
}

.accroche__baseline {
	max-width: 52ch;
	margin: 0 auto;
	color: var(--texte-doux);
	font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
}

/* --- 6. En-tête de page -------------------------------------------------- */

.page-entete {
	padding: var(--e16) 0 var(--e8);
}

.page-titre {
	font-size: clamp(1.875rem, 1.4rem + 2.2vw, 3rem);
	margin-bottom: var(--e3);
}

.page-chapeau {
	max-width: var(--largeur-texte);
	color: var(--texte-doux);
	font-size: 1.125rem;
	margin: 0;
}

.page-visuel {
	margin: 0 auto var(--e12);
}

.page-visuel img {
	width: 100%;
	border-radius: var(--rayon);
}

.section-titre {
	font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
	margin-bottom: var(--e8);
	padding-bottom: var(--e3);
	border-bottom: 3px solid var(--jaune);
	display: inline-block;
}

/* --- 7. Contenu éditorial ------------------------------------------------ */

.prose {
	max-width: var(--largeur-texte);
}

.prose > * + * {
	margin-top: var(--e4);
}

.prose h2 {
	font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
	margin-top: var(--e12);
	margin-bottom: var(--e3);
}

.prose h3 {
	font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
	margin-top: var(--e8);
	margin-bottom: var(--e2);
}

.prose h4 {
	font-size: 1.125rem;
	margin-top: var(--e6);
	margin-bottom: var(--e2);
}

.prose img,
.prose video {
	margin-block: var(--e8);
	border-radius: var(--rayon);
}

.prose figure {
	margin: var(--e8) 0;
}

.prose figcaption {
	margin-top: var(--e2);
	font-size: 0.875rem;
	color: var(--texte-doux);
	text-align: center;
}

.prose ul,
.prose ol {
	padding-left: 1.25rem;
	margin-block: var(--e4);
}

.prose li + li {
	margin-top: var(--e2);
}

.prose li::marker {
	color: var(--jaune-sombre);
}

.prose blockquote {
	margin: var(--e8) 0;
	padding: var(--e2) 0 var(--e2) var(--e6);
	border-left: 4px solid var(--jaune);
	font-style: italic;
	color: var(--gris-fort);
}

.prose hr {
	margin-block: var(--e12);
	border: 0;
	border-top: 1px solid var(--trait);
}

.prose code {
	background: var(--gris-fond);
	padding: 0.15em 0.4em;
	border-radius: 3px;
	font-size: 0.9em;
}

/* --- 8. Grille des créations --------------------------------------------- */

.creations {
	padding-top: var(--e16);
}

.grille-jeux {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: var(--e8);
	margin: 0;
	padding: 0;
	list-style: none;
}

.carte-jeu__lien {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	border: 1px solid var(--trait);
	border-radius: var(--rayon);
	overflow: hidden;
	background: var(--blanc);
	transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.carte-jeu__lien:hover {
	border-color: var(--jaune);
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgb(0 0 0 / 0.09);
	color: inherit;
}

.carte-jeu__visuel {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--gris-fond);
	overflow: hidden;
}

.carte-jeu__visuel img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.carte-jeu__visuel--vide {
	background: linear-gradient(135deg, var(--gris-fond) 0%, #ededed 100%);
}

.carte-jeu__corps {
	display: block;
	padding: var(--e6);
}

.carte-jeu__titre {
	display: block;
	font-weight: 800;
	font-size: 1.1875rem;
	margin-bottom: var(--e2);
	line-height: 1.25;
}

.carte-jeu__extrait {
	display: block;
	color: var(--texte-doux);
	font-size: 0.9375rem;
	line-height: 1.55;
}

/* --- 9. Listes de résultats ---------------------------------------------- */

.liste-resultats {
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: var(--largeur-texte);
}

.resultat {
	padding-block: var(--e6);
	border-bottom: 1px solid var(--trait);
}

.resultat__lien {
	text-decoration: none;
}

.resultat__titre {
	font-size: 1.375rem;
	margin-bottom: var(--e2);
}

.resultat__extrait {
	color: var(--texte-doux);
	margin: 0;
}

/* --- 10. Boutons --------------------------------------------------------- */

.bouton,
.wp-block-button__link {
	display: inline-block;
	padding: var(--e3) var(--e8);
	background: var(--jaune);
	color: var(--noir);
	font-weight: 700;
	text-decoration: none;
	border: 2px solid var(--jaune);
	border-radius: var(--rayon);
	transition: background var(--transition), color var(--transition);
}

.bouton:hover,
.wp-block-button__link:hover {
	background: transparent;
	color: var(--texte);
}

/* --- 11. Page 404 -------------------------------------------------------- */

.erreur-404 {
	padding-block: var(--e24);
	text-align: center;
}

.erreur-404__code {
	font-size: clamp(4rem, 3rem + 6vw, 7rem);
	font-weight: 800;
	color: var(--jaune);
	line-height: 1;
	margin: 0 0 var(--e4);
}

.erreur-404__texte {
	color: var(--texte-doux);
	margin-bottom: var(--e8);
}

/* --- 12. Pied de page ---------------------------------------------------- */

.pied {
	border-top: 1px solid var(--trait);
	padding-block: var(--e12);
	background: var(--gris-fond);
}

.pied__interieur {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--e6);
}

.pied__marque {
	font-weight: 800;
	font-size: 1.125rem;
	margin: 0;
}

.pied__liste {
	display: flex;
	flex-wrap: wrap;
	gap: var(--e6);
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.9375rem;
}

.pied__liste a {
	text-decoration: none;
}

.pied__mentions {
	margin: 0;
	color: var(--texte-doux);
	font-size: 0.875rem;
}

/* --- 13. Pagination ------------------------------------------------------ */

.pagination {
	margin-top: var(--e12);
}

.pagination .page-numbers {
	display: inline-block;
	padding: var(--e2) var(--e3);
	border: 1px solid var(--trait);
	border-radius: var(--rayon);
	text-decoration: none;
	margin-right: var(--e2);
	font-size: 0.9375rem;
}

.pagination .page-numbers.current {
	background: var(--jaune);
	border-color: var(--jaune);
	font-weight: 700;
}

/* --- 14. Mobile ---------------------------------------------------------- */

@media (max-width: 860px) {
	.entete__interieur {
		flex-wrap: wrap;
		padding-block: var(--e3);
	}

	.burger {
		display: inline-flex;
		order: 2;
	}

	.nav-principale {
		order: 3;
		flex-basis: 100%;
		display: none;
	}

	.nav-principale.est-ouverte {
		display: block;
	}

	.nav-principale__liste {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding-bottom: var(--e4);
	}

	.nav-principale__liste li {
		border-top: 1px solid var(--trait);
	}

	.nav-principale__liste a {
		padding: var(--e3) 0;
		display: block;
		border-bottom: 0;
	}

	.accroche {
		padding: var(--e16) 0 var(--e12);
	}

	.page-entete {
		padding: var(--e12) 0 var(--e6);
	}

	.pied__interieur {
		flex-direction: column;
		align-items: flex-start;
	}
}
