/* Sélecteur de langue Kokende */

.kokende-lang-switcher__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 9999px;
	border: 1px solid rgba(229, 231, 235, 0.9);
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kokende-lang-switcher__toggle:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.kokende-lang-switcher__flag {
	font-size: 1.25rem;
	line-height: 1;
}

.kokende-lang-switcher__panel {
	position: fixed;
	inset: 0;
	z-index: 10040;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(15, 23, 42, 0.4);
	backdrop-filter: blur(6px);
}

.kokende-lang-switcher__panel[hidden] {
	display: none !important;
}

.kokende-lang-switcher__panel-inner {
	position: relative;
	width: min(520px, 100%);
	max-height: 85vh;
	overflow: auto;
	background: #fff;
	border-radius: 1.25rem;
	padding: 1.5rem;
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.kokende-lang-switcher__close {
	position: absolute;
	top: 0.75rem;
	right: 0.85rem;
	border: none;
	background: transparent;
	font-size: 1.5rem;
	cursor: pointer;
	color: #6b7280;
}

.kokende-lang-switcher__head h2 {
	margin: 0 0 0.35rem;
	font-size: 1.25rem;
	font-weight: 700;
	color: #0f172a;
}

.kokende-lang-switcher__head p {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	color: #6b7280;
}

.kokende-lang-switcher__search {
	width: 100%;
	margin: 0 0 1rem;
	padding: 0.55rem 0.75rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.75rem;
	font-size: 0.875rem;
	background: #f9fafb;
}

.kokende-lang-switcher__search:focus {
	outline: 2px solid #00bf63;
	outline-offset: 1px;
	background: #fff;
}

.kokende-lang-switcher__regions {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.kokende-lang-switcher__item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.7rem 0.85rem;
	border-radius: 0.85rem;
	text-decoration: none !important;
	color: #111827 !important;
	border: 1px solid transparent;
	transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.kokende-lang-switcher__item.is-featured {
	background: #f0fdf4;
	border-color: #86efac;
}

.kokende-lang-switcher__item:hover {
	background: #ecfdf5;
	border-color: #4ade80;
}

.kokende-lang-switcher__item.is-active {
	background: #ecfdf5;
	border-color: #00bf63;
	box-shadow: 0 0 0 1px rgba(0, 191, 99, 0.25);
}

.kokende-lang-switcher__item[hidden] {
	display: none !important;
}

.kokende-lang-switcher__item-flag {
	font-size: 1.45rem;
	line-height: 1;
	width: 1.75rem;
	text-align: center;
}

.kokende-lang-switcher__item-text {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}

.kokende-lang-switcher__item-text strong {
	font-size: 0.9rem;
	font-weight: 700;
}

.kokende-lang-switcher__item-text span {
	font-size: 0.78rem;
	color: #6b7280;
}

.kokende-lang-switcher__arrow {
	color: #9ca3af;
	font-size: 1.35rem;
	line-height: 1;
}

body.kokende-lang-modal-open {
	overflow: hidden;
}

/* Bannière détection */
.kokende-i18n-detect {
	position: sticky;
	top: 0;
	z-index: 10030;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	background: linear-gradient(90deg, #ecfdf5, #eff6ff);
	border-bottom: 1px solid #bbf7d0;
}

.kokende-i18n-detect__text {
	margin: 0;
	font-size: 0.875rem;
	color: #064e3b;
}

.kokende-i18n-detect__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.kokende-i18n-detect__keep {
	color: #047857;
	text-decoration: underline;
}

.kokende-i18n-detect__dismiss {
	border: none;
	background: transparent;
	font-size: 1.25rem;
	cursor: pointer;
	color: #6b7280;
	line-height: 1;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
	.kokende-lang-switcher__panel-inner {
		background: #0f172a;
		color: #e2e8f0;
	}
	.kokende-lang-switcher__head h2 {
		color: #f8fafc;
	}
	.kokende-lang-switcher__item {
		color: #e2e8f0 !important;
	}
	.kokende-lang-switcher__item.is-featured,
	.kokende-lang-switcher__item.is-active,
	.kokende-lang-switcher__item:hover {
		background: rgba(0, 191, 99, 0.15);
		border-color: #00bf63;
	}
	.kokende-lang-switcher__search {
		background: #1e293b;
		border-color: #334155;
		color: #e2e8f0;
	}
}

html.dark .kokende-lang-switcher__panel-inner,
body.dark .kokende-lang-switcher__panel-inner,
[data-theme='dark'] .kokende-lang-switcher__panel-inner {
	background: #0f172a;
}
