/* Screen reader only - accessible but visually hidden */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Header Search Block */
.wp-block-latelier-header-search-simple {
	position: relative;
	display: inline-block;
}

.header-search {
	position: relative;
	font-family: inherit;
}

.header-search__trigger {
	background: none;
	border: 1px solid black;
	color: inherit;
	cursor: pointer;
	font-size: inherit;
	font-family: inherit;
	padding: 8px 16px;
	border-radius: 20px;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 8px;
}

.header-search__trigger:hover {
	background-color: rgba(0, 0, 0, 0.05);
	border-color: #999;
}

.header-search__trigger:focus {
	outline: 2px solid #007cba;
	outline-offset: 2px;
}

.header-search__trigger svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.header-search__trigger span {
	white-space: nowrap;
}

/* Dropdown */
.header-search__dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	/* Aligné à droite du trigger */
	min-width: 400px;
	max-width: 500px;
	background: #eff1e3;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.2s ease;
	margin-top: 8px;
}

.header-search__dropdown.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Form */
.header-search__form {
	padding: 16px;
	border-bottom: 1px solid #eee;
	display: flex;
	align-items: center;
	gap: 8px;
}

.header-search__form svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: #666;
}

.header-search__input {
	background: #eff1e3;
	flex: 1;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
}

.header-search__input:focus {
	outline: none;
	border-color: #007cba;
	box-shadow: 0 0 0 1px #007cba;
}

/* Results */
.header-search__results-container {
	max-height: 400px;
	overflow-y: auto;
}

.header-search__results {
	min-height: 60px;
}

.header-search__post-type {
	padding: 16px;
	border-bottom: 1px solid #f0f0f0;
}

.header-search__post-type:last-child {
	border-bottom: none;
}

.header-search__post-type h4 {
	margin: 0 0 8px 0;
	font-size: 12px;
	font-weight: 600;
	color: #666;
}

.header-search__post-type ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.header-search__post-type li {
	margin: 0;
	padding: 0;
}

.header-search__post-type a {
	display: block;
	padding: 6px 0;
	color: #333;
	text-decoration: none;
	font-size: 14px;
	transition: all 0.2s ease;
}

.header-search__post-type a:hover {
	color: #000;
	background-color: #ffed00;
	padding-left: 8px;
	margin-left: -8px;
	padding-right: 8px;
	margin-right: -8px;
	border-radius: 4px;
}

/* View All Button */
.header-search__view-all {
	display: none;
	/* Caché par défaut, affiché par JS après recherche */
	width: 100%;
	padding: 14px 16px;
	background: #ffed00;
	border: none;
	border-top: 1px solid #ddd;
	border-radius: 0 0 8px 8px;
	color: #000;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: center;
}

.header-search__view-all:hover {
	background: #e6d600;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-search__view-all:focus {
	outline: 2px solid #ffed00;
	outline-offset: -2px;
}

/* Loading & No Results */
.header-search__loading,
.header-search__no-results {
	padding: 20px;
	text-align: center;
	color: #666;
	font-size: 14px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
	.header-search__dropdown {
		min-width: inherit !important;
		max-width: inherit !important;
		width: 300px !important;
		left: 50%;
		right: auto;
		transform: translateX(-50%) translateY(-10px);
	}

	.header-search__dropdown.is-open {
		transform: translateX(0px) translateY(0px);
		right: 0;
		left: auto;
	}

	.header-search__results-container {
		max-height: 250px;
	}
}

/* Editor specific styles */
.editor-styles-wrapper .wp-block-latelier-header-search-simple .header-search__dropdown {
	opacity: 0;
	visibility: hidden;
	position: absolute;
}

.editor-styles-wrapper .wp-block-latelier-header-search-simple .header-search__trigger {
	pointer-events: none;
}


/* Custom Echo positif */
.header-search__dropdown {
	background: none !important;
	box-shadow: none;
}

.header-search__form {
	background: white;
	border: solid 1px var(--wp--preset--color--tertiary) !important;
	border-radius: 100px;
	color: var(--wp--preset--color--tertiary) !important;
	font-size: 18px;
	font-style: normal;
	font-weight: 700;
	line-height: normal;
	font-family: var(--wp--preset--font-family--lato) !important;
	padding: 10px 20px !important;
	margin-bottom: 10px;
}

.header-search__trigger {
	padding-top: 10px !important;
	padding-right: 20px !important;
	padding-bottom: 10px !important;
	padding-left: 20px !important;
	box-shadow: none !important;
	display: flex !important;
	flex-grow: inherit !important;
	height: 42px !important;
	border-color: var(--wp--preset--color--tertiary) !important;
	background-color: white;
	transition: all 0.3s;
}

.header-search__trigger:hover {
	background-color: var(--wp--preset--color--tertiary) !important;
	transition: all 0.3s;
}

.header-search__trigger span {
	display: none;
}

.header-search__trigger svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.header-search__trigger svg path {
	fill: var(--wp--preset--color--tertiary) !important;
	transition: all 0.3s;
}

.header-search__trigger:hover svg path {
	fill: white !important;
	transition: all 0.3s;
}

.header-search__dropdown {
	border: none;
	background: white;
	border-radius: 20px;
	margin-top: 11px;
}

.header-search__input {
	/*
	background: white;
	border: solid 1px var(--wp--preset--color--tertiary) !important;
	border-radius: 100px;
	padding: 10px 20px;
	*/
	color: var(--wp--preset--color--tertiary) !important;
	font-size: 18px;
	font-style: normal;
	font-weight: 700;
	line-height: normal;
	font-family: var(--wp--preset--font-family--lato) !important;
	border: none;
	background: none;
	padding: 0px;
	height: 22px;
}

.header-search__input::placeholder {
	color: var(--wp--preset--color--tertiary) !important;
	font-size: 18px;
	font-style: normal;
	font-weight: 700;
	line-height: normal;
	font-family: var(--wp--preset--font-family--lato) !important;
}

.header-search__form {
	border: none;
	padding: 20px;
}

.header-search__results .header-search__results-wrapper {
	min-height: 0px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 20px;
	background: white;
	border-radius: 20px;
}

.header-search__post-type {
	border: none;
	padding: 0px;
}

.header-search__post-type h4 {
	color: #00234F;
	font-size: 16px;
	font-style: normal;
	font-weight: 700;
	line-height: normal;
	font-family: var(--wp--preset--font-family--lato) !important;
	margin: 0 0 4px 0;
}

.header-search__post-type a {
	color: #00234F;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: normal;
	font-family: var(--wp--preset--font-family--lato) !important;
	padding: 0px;
}

.header-search__loading {
	color: #00234F;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: normal;
	font-family: var(--wp--preset--font-family--lato) !important;
}

.header-search__post-type ul {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.header-search__post-type a:hover {
	background: none !important;
	margin: 0px !important;
	padding: 0px !important;
}

.header-search__view-all {
	margin-top: 13px;
	color: #00234F;
	font-family: var(--wp--preset--font-family--lato) !important;
	font-size: 18px;
	font-style: normal;
	font-weight: 700;
	line-height: normal;
	display: flex;
	padding: 10px 20px;
	align-items: center;
	gap: 10px;
	border-radius: var(--L, 20px);
	border: 1px solid #202164;
	background: none;
	width: fit-content;
}

.header-search__view-all:hover {
	background: #202164;
	color: white;
	transform: none;
	box-shadow: none;
}

.header-search__view-all:focus {
	outline: 1px solid #202164;
	outline-offset: -1px;
}

@media (max-width: 768px) {
	.header-search__dropdown {
		min-width: 90vw;
		max-width: 90vw;
		right: auto;
	}

	.header-search__dropdown {
		transform: translateX(0px) translateY(0px);
		right: 0;
		left: auto;
	}

	.header-search__results-container {
		max-height: fit-content;
	}
}

@media (max-width: 390px) {
	.header-search__dropdown {
		right: -44px !important;
	}
}