/* Event-Stats — Encadré latéral : carte claire, recherche arrondie, liens en tuiles. */

#sidebar {
	box-sizing: border-box;
	max-width: 1080px;
	margin: 40px auto 56px;
	padding: 0 20px;
	font-family: 'Work Sans', system-ui, sans-serif;
	color: #201433;
}
#sidebar *,
#sidebar *::before,
#sidebar *::after { box-sizing: border-box; }

/* Avant que le script ne range l'encadré, on masque déjà les rubriques de blog. */
#sidebar ul[role="navigation"] > li:not(.pagenav),
#sidebar > ul:last-child:not(:first-child):not([role="navigation"]) { display: none; }

#sidebar ul { list-style: none; margin: 0; padding: 0; }

#sidebar.ess-ready {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: 20px;
	align-items: stretch;
}
#sidebar.ess-ready > ul { display: contents; }

#sidebar li.ess-search,
#sidebar li.ess-links {
	position: relative;
	background: #FFFFFF;
	border: 1px solid #EAE3F5;
	border-radius: 20px;
	padding: 26px 26px 24px;
	min-width: 0;
	box-shadow: 0 2px 0 #F1ECFA, 0 24px 48px -30px rgba(32, 20, 51, .28);
}

#sidebar h2 {
	font-family: 'Unbounded', 'Work Sans', sans-serif;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 16px;
	color: #201433;
}

/* ---------- Recherche ---------- */
#sidebar li.ess-search {
	background:
		radial-gradient(420px 180px at 100% 0%, rgba(255, 107, 74, .10), rgba(255, 107, 74, 0) 70%),
		#FFFFFF;
}
#sidebar li.ess-search h2::after {
	content: "Trouvez un concert, un festival ou une formation près de chez vous.";
	display: block;
	margin-top: 6px;
	font-family: 'Work Sans', system-ui, sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: #5B4D74;
}
#sidebar form[role="search"],
#sidebar #searchform {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #F7F4FB;
	border: 1px solid #EAE3F5;
	border-radius: 999px;
	padding: 6px 6px 6px 18px;
	transition: border-color .15s, box-shadow .15s, background .15s;
}
#sidebar form[role="search"]:focus-within,
#sidebar #searchform:focus-within {
	background: #FFFFFF;
	border-color: #FF6B4A;
	box-shadow: 0 0 0 4px rgba(255, 107, 74, .15);
}
#sidebar form[role="search"] > div,
#sidebar #searchform > div { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
#sidebar form[role="search"] > label { display: flex; flex: 1; min-width: 0; margin: 0; }
#sidebar input[type="search"] { width: 100%; -webkit-appearance: none; appearance: none; }
#sidebar #searchform label[for="s"],
#sidebar .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
#sidebar input[type="search"],
#sidebar input[name="s"] {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 15px;
	color: #201433;
	padding: 10px 0;
	outline: none;
	box-shadow: none;
}
#sidebar input[type="search"]::placeholder,
#sidebar input[name="s"]::placeholder { color: #8A7FA8; }
#sidebar input[type="submit"],
#sidebar button[type="submit"],
#sidebar #searchsubmit {
	flex: none;
	border: 0;
	border-radius: 999px;
	background: #FF6B4A;
	color: #FFFFFF;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	padding: 11px 20px;
	cursor: pointer;
	box-shadow: 0 3px 0 #E0552F, 0 10px 18px -10px rgba(224, 85, 47, .7);
	transition: transform .12s ease, box-shadow .12s ease, background .15s;
}
#sidebar input[type="submit"]:hover,
#sidebar #searchsubmit:hover { background: #F25A3A; }
#sidebar input[type="submit"]:active,
#sidebar #searchsubmit:active {
	transform: translateY(2px);
	box-shadow: 0 1px 0 #E0552F, 0 4px 10px -8px rgba(224, 85, 47, .7);
}

/* ---------- Liens en tuiles ---------- */
#sidebar li.ess-links > ul {
	display: grid;
	gap: 10px;
}
#sidebar a.ess-link {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid #F1ECFA;
	background: #FBF9FE;
	color: #201433;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	transition: transform .15s ease, background .15s, border-color .15s, box-shadow .15s;
}
#sidebar a.ess-link:hover,
#sidebar a.ess-link:focus-visible {
	background: #FFFFFF;
	border-color: #FFD9CC;
	transform: translateY(-2px);
	box-shadow: 0 10px 20px -14px rgba(224, 85, 47, .6);
	outline: none;
}
#sidebar .ess-icon {
	flex: none;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	background: #FFF1EC;
	box-shadow: inset 0 -2px 0 rgba(224, 85, 47, .12);
}
#sidebar .ess-icon::before {
	content: "";
	width: 20px;
	height: 20px;
	background: #E0552F;
	-webkit-mask: var(--ess-icon) center / contain no-repeat;
	        mask: var(--ess-icon) center / contain no-repeat;
}
#sidebar .ess-link--events {
	--ess-icon: 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-linejoin='round'%3E%3Cpath d='M3 6h18v4a2 2 0 0 0 0 4v4H3v-4a2 2 0 0 0 0-4z'/%3E%3Cpath d='M15 7v2M15 11v2M15 15v2' stroke-linecap='round'/%3E%3C/svg%3E");
}
#sidebar .ess-link--account .ess-icon { background: #F1ECFA; box-shadow: inset 0 -2px 0 rgba(122, 63, 160, .14); }
#sidebar .ess-link--account .ess-icon::before { background: #7A3FA0; }
#sidebar .ess-link--account {
	--ess-icon: 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='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
}
#sidebar .ess-link--cart .ess-icon { background: #E8F5EF; box-shadow: inset 0 -2px 0 rgba(31, 122, 84, .14); }
#sidebar .ess-link--cart .ess-icon::before { background: #1F7A54; }
#sidebar .ess-link--cart {
	--ess-icon: 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='9' cy='20' r='1.5'/%3E%3Ccircle cx='18' cy='20' r='1.5'/%3E%3Cpath d='M2 3h3l2.6 12.4a2 2 0 0 0 2 1.6h8.6a2 2 0 0 0 2-1.6L22 7H6'/%3E%3C/svg%3E");
}
#sidebar .ess-link--other {
	--ess-icon: 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'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
}
#sidebar .ess-label { flex: 1; min-width: 0; }
#sidebar .ess-arrow {
	color: #B9AED3;
	font-size: 18px;
	transition: transform .15s ease, color .15s;
}
#sidebar a.ess-link:hover .ess-arrow { color: #E0552F; transform: translateX(3px); }

/* ---------- Téléphone ---------- */
@media (max-width: 760px) {
	#sidebar { margin: 28px auto 40px; padding: 0 16px; }
	#sidebar.ess-ready { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	#sidebar li.ess-search,
	#sidebar li.ess-links { padding: 20px 18px; border-radius: 18px; }
	#sidebar input[type="submit"],
	#sidebar #searchsubmit { padding: 11px 16px; }
}

@media (prefers-reduced-motion: reduce) {
	#sidebar a.ess-link,
	#sidebar .ess-arrow,
	#sidebar input[type="submit"] { transition: none; }
}
