.site-search-trigger {
    cursor: pointer;
}
/* Modale de recherche — masquée au chargement */
.site-search-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.site-search-modal.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

/* Logo + bouton fermer — superposés en haut, hors flux */
.site-search-modal > .wp-block-group:first-child {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1;
	width: 100%;
	margin: 0;
}

/* Contenu recherche — centré sur toute la hauteur de la modale */
.site-search-modal > .wp-block-group:nth-child(2) {
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100%;
	width: 100%;
}

body.site-search-open {
	overflow: hidden;
}

.site-search-modal .wp-block-search__label {
    display: inline-block;
    font-size: var(--wp--preset--font-size--xx-large);
    font-weight: 700;
    margin-bottom: 30px;
}
:where(.site-search-modal .wp-block-search__button-inside .wp-block-search__inside-wrapper) {
    position: relative;
    background-color: transparent;
    border: 0;
    border-bottom: 2px solid var(--wp--preset--color--accent-1);
    padding-bottom: 15px;
}

/* Icône loupe à gauche de l'input */
.site-search-modal .wp-block-search__inside-wrapper::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY( -50% );
	width: 1.5rem;
	height: 1.5rem;
	background-color: var( --wp--preset--color--accent-1 );
	-webkit-mask: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='7' stroke='black' stroke-width='2'/%3E%3Cpath d='M16.5 16.5L21 21' stroke='black' stroke-width='2' stroke-linecap='round'/%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'%3E%3Ccircle cx='11' cy='11' r='7' stroke='black' stroke-width='2'/%3E%3Cpath d='M16.5 16.5L21 21' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E" ) center / contain no-repeat;
	pointer-events: none;
}

.site-search-modal .wp-block-search__input {
    background-color: transparent;
    color: var(--wp--preset--color--accent-1);
    padding-left: 2.5rem;
}

/* Croix native du champ search (Chrome / Safari / Edge) */
.site-search-modal .wp-block-search__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
	height: 2rem;
	width: 2rem;
	border-radius: 50%;
	cursor: pointer;
	background-color: rgba(255, 255, 255, .12);
	background-image:
		linear-gradient(
			45deg,
			transparent 0%,
			transparent 42%,
			#fff 44%,
			#fff 56%,
			transparent 58%,
			transparent 100%
		),
		linear-gradient(
			135deg,
			transparent 0%,
			transparent 42%,
			#fff 44%,
			#fff 56%,
			transparent 58%,
			transparent 100%
		);
	background-repeat: no-repeat;
	background-position: center;
	/* Taille de la croix blanche (plus petite que le rond) */
	background-size: 25% 25%;
}

/* Mobile (< 600px) */
@media (max-width: 599px) {
    .site-search-modal .wp-block-search__inside-wrapper {
		flex-direction: column;
		border-bottom: none;
	}
	.site-search-modal .wp-block-search__input {
		border-bottom: 2px solid var(--wp--preset--color--accent-1);
		padding-bottom: 15px;
        margin-bottom: 15px;
	}
	.site-search-modal .wp-block-search__inside-wrapper::before {
		top:8px;
		transform: translateY(0);
	}
	/* modif du bouton loupe et du menu burger */
	header .header-menu-wrapper {
		flex-grow: 0;
	}
	header .site-menu, header .site-search-trigger {
		padding-top: var(--wp--preset--spacing--20)!important;
		padding-right: var(--wp--preset--spacing--20)!important;
		padding-bottom: var(--wp--preset--spacing--20)!important;
		padding-left: var(--wp--preset--spacing--20)!important;
	}
	header .site-search-trigger {
		order: 1;
	}
	header .site-menu {
		order: 2;
	}
}