/*
 * Compléments à theme.json : ce que theme.json ne sait pas exprimer.
 * Les couleurs, tailles et espacements viennent toujours des variables --wp--.
 */

/* Titres : le mot en italique prend la couleur d'accent, en graisse plus légère.
   Les sections claires (beige, caramel) redéfinissent --wonderland-titre-em. */
:where(h1, h2, h3, h4, h5, h6) em {
	font-style: italic;
	font-weight: 500;
	color: var(--wonderland-titre-em, var(--wp--preset--color--caramel));
}

:where(h1, h2, h3) {
	text-wrap: balance;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

:where(.wp-site-blocks) a:where(:not(.wp-element-button)) {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

/* Lien souligné façon maquette (« Voir toute la boutique », « Infos pratiques ») */
.lien-souligne a,
a.lien-souligne {
	font-weight: 700;
	text-decoration: none;
	border-bottom: 2px solid var(--wonderland-soulignement, var(--wp--preset--color--caramel));
	padding-bottom: 2px;
}

/* En-tête, contenu et pied de page s'enchaînent sans marge */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Sections pleine largeur collées les unes aux autres, comme dans la maquette */
.wp-block-post-content > .alignfull + .alignfull {
	margin-block-start: 0;
}

main:has(> .wp-block-post-content > .alignfull:last-child) {
	padding-bottom: 0 !important;
}

main > .wp-block-post-content:has(> .alignfull:last-child) {
	margin-block-end: 0;
}

/* --- En-tête -------------------------------------------------------------- */

.wonderland-entete {
	border-bottom: 1px solid var(--wp--custom--couleur--filet);
}

.wonderland-entete .wp-block-site-logo img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: var(--wp--custom--rayon--logo);
}

.wonderland-entete .wp-block-button__link {
	padding: 12px 22px;
	font-size: 15px;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.wonderland-entete .wp-block-site-title {
		font-size: 17px;
	}

	.wonderland-entete .wp-block-site-logo img {
		width: 44px;
		height: 44px;
	}
}

/* Le menu passe en icône dès qu'il ne tient plus sur une ligne (WordPress ne le fait
   qu'en dessous de 600 px). */
@media (min-width: 600px) and (max-width: 1099px) {
	.wonderland-entete .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.wonderland-entete .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* Menu mobile plein écran aux couleurs du site */
.wonderland-entete .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--aubergine);
	color: var(--wp--preset--color--creme);
	padding: 24px;
}

.wonderland-entete .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 20px;
	font-size: var(--wp--preset--font-size--x-large);
}

/* --- Pied de page --------------------------------------------------------- */

.wonderland-pied {
	border-top: 1px solid var(--wp--custom--couleur--filet);
}

.wonderland-pied .wp-block-site-logo img {
	width: 120px;
	height: 120px;
	object-fit: cover;
	border-radius: var(--wp--custom--rayon--logo);
}

.wonderland-pied a {
	color: var(--wp--preset--color--beige-rose);
	text-decoration: none;
}

.wonderland-pied a:hover {
	color: var(--wp--preset--color--creme);
}

.wonderland-pied__mentions {
	border-top: 1px solid var(--wp--custom--couleur--filet);
}

/* --- Accueil : hero -------------------------------------------------------- */

.wonderland-chapo {
	max-width: 520px;
}

.wonderland-hero__titre {
	max-width: 680px;
	line-height: 0.98;
}

/* La photo est limitée à la colonne : à droite, elle se fond dans l'aubergine
   (à gauche, le dégradé à 95 % fait déjà disparaître son bord). */
.wonderland-hero .wp-block-cover__image-background {
	-webkit-mask-image: linear-gradient(90deg, #000 72%, transparent 100%);
	mask-image: linear-gradient(90deg, #000 72%, transparent 100%);
}

/* Icône horloge devant « Vendredi à la Brasserie » (bandeau) */
.wonderland-icone-horloge {
	display: inline-flex;
	align-items: center;
	gap: 14px;
}

.wonderland-icone-horloge::before {
	content: "";
	flex: none;
	width: 26px;
	height: 26px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l2.5 2'/%3E%3Cpath d='M10 2h4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l2.5 2'/%3E%3Cpath d='M10 2h4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* --- Bloc « Nos bières » --------------------------------------------------- */

.wonderland-bieres {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
	gap: 28px;
}

.wonderland-biere {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	padding: 36px 32px;
	text-align: center;
	background: var(--wp--preset--color--aubergine-clair);
	border-radius: var(--wp--custom--rayon--carte);
}

.wonderland-biere > * {
	margin: 0;
}

.wonderland-biere__image {
	width: 220px;
	height: 220px;
	object-fit: contain;
}

.wonderland-biere__type {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--wonderland-biere-couleur);
}

.wonderland-biere:nth-child(3n + 1) { --wonderland-biere-couleur: var(--wp--preset--color--turquoise); }
.wonderland-biere:nth-child(3n + 2) { --wonderland-biere-couleur: var(--wp--custom--couleur--magenta-doux); }
.wonderland-biere:nth-child(3n + 3) { --wonderland-biere-couleur: var(--wp--custom--couleur--dore); }

.wonderland-biere__nom {
	font-size: var(--wp--preset--font-size--xx-large);
}

.wonderland-biere__description {
	font-size: 17px;
	line-height: 1.5;
	color: var(--wp--preset--color--beige-rose);
}

.wonderland-biere__bouton.wp-element-button {
	margin-top: auto;
	padding: 13px 26px;
	font-size: 15px;
	color: var(--wp--preset--color--aubergine);
	background: var(--wp--preset--color--creme);
}

.wonderland-biere__bouton.wp-element-button:hover {
	background: var(--wp--preset--color--caramel);
}

/* --- Accueil : la brasserie, tireuse, vendredis ----------------------------- */

.wonderland-mosaique img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.wonderland-mosaique .wonderland-mosaique__large img {
	height: 340px;
}

.wonderland-liste-coches {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 0;
	list-style: none;
}

.wonderland-liste-coches li {
	display: flex;
	align-items: center;
	gap: 12px;
}

.wonderland-liste-coches li::before {
	content: "";
	flex: none;
	width: 22px;
	height: 22px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wonderland-photo-tireuse img {
	width: 100%;
	height: 460px;
	object-fit: cover;
	border-radius: var(--wp--custom--rayon--carte);
}

.wp-block-cover:not(.is-light) {
	color: var(--wp--preset--color--creme);
}

.wonderland-lapin img {
	width: 100%;
	height: auto;
	border-radius: 50%;
}

@media (max-width: 781px) {
	.wonderland-photo-tireuse img {
		height: 320px;
	}

	.wonderland-mosaique .wonderland-mosaique__large img {
		height: 240px;
	}

	.wonderland-mosaique img {
		height: 150px;
	}
}

/* --- Pages de texte (mentions légales, CGV…) -------------------------------- */

/* Intertitres posés directement dans le contenu : taille de lecture.
   Les titres des sections (groupes) gardent leur grande taille. */
.wp-block-post-content > h2.wp-block-heading:not([style*="font-size"]):not([class*="-font-size"]) {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 700;
	letter-spacing: 0;
	margin-block-start: 1.6em;
}

.wp-block-post-content > h3.wp-block-heading:not([style*="font-size"]):not([class*="-font-size"]) {
	font-size: var(--wp--preset--font-size--x-large);
	margin-block-start: 1.4em;
}

/* --- Boutique : introduction ------------------------------------------------ */

.wonderland-chapo-large {
	max-width: 620px;
}

/* Les trois étapes de commande, numérotées dans des pastilles turquoise */
.wonderland-etapes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
	gap: 16px;
	padding: 0;
	list-style: none;
	counter-reset: etape;
}

.wonderland-etapes li {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 22px 24px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	background: var(--wp--preset--color--aubergine-clair);
	border-radius: var(--wp--custom--rayon--etape);
	counter-increment: etape;
}

.wonderland-etapes li::before {
	content: counter(etape);
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 22px;
	font-weight: 900;
	color: var(--wp--preset--color--aubergine);
	background: var(--wp--preset--color--turquoise);
	border-radius: 50%;
}

/* Icône « lieu » devant la mention de retrait */
.wonderland-icone-lieu {
	display: flex;
	align-items: center;
	gap: 10px;
}

.wonderland-icone-lieu::before {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11a7 7 0 0 1 14 0c0 4.8-7 11-7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11a7 7 0 0 1 14 0c0 4.8-7 11-7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wonderland-pied .wonderland-pied__logo-petit img {
	width: 64px;
	height: 64px;
	border-radius: 12px;
}

/* Page en cours dans le menu (ex. « Agenda ») */
.wonderland-entete .wp-block-navigation-item a[aria-current="page"] {
	padding-bottom: 2px;
	border-bottom: 2px solid var(--wp--preset--color--caramel);
}

/* --- Agenda ----------------------------------------------------------------- */

.wonderland-encadre-vendredi {
	border: 2px solid var(--wp--preset--color--caramel);
	border-radius: 22px;
}

.wonderland-encadre-vendredi strong {
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 20px;
	font-weight: 700;
	color: var(--wp--custom--couleur--dore);
}
