/* UNIKI Event — design tokens (surchargeables depuis le thème : .uev-wrap { --uev-accent: … }) */
.uev-wrap {
	--uev-accent: #0d1c9e;
	--uev-accent-hover: #0a1580;
	--uev-accent-soft: #eef2ff;
	--uev-navy: #070f4a;
	--uev-gold: #ffe600;
	--uev-gold-hover: #ffee55;
	--uev-ink: #0a1030;
	--uev-muted: #4a5470;
	--uev-border: #7d87ab;
	--uev-border-soft: #dde6ff;
	--uev-line: #e1e5f0;
	--uev-surface: #fff;
	--uev-error: #b42318;
	--uev-error-soft: #fdecea;
	--uev-success: #1b6e2f;
	--uev-success-soft: #e8f5ea;
	--uev-warn: #8a5300;
	--uev-warn-soft: #fff4e0;
	--uev-radius: 8px;
	--uev-ease: .2s ease;
	--uev-font-heading: 'Bricolage Grotesque', system-ui, sans-serif;

	box-sizing: border-box;
	color: var(--uev-ink);
	line-height: 1.55;
}
.uev-wrap *, .uev-wrap *::before, .uev-wrap *::after { box-sizing: border-box; }
/* Les thèmes soulignent souvent les liens du contenu : on neutralise, puis on souligne ce qui doit l'être. */
.uev-wrap a, .uev-wrap a:hover, .uev-wrap a:focus { text-decoration: none !important; box-shadow: none; }
.uev-wrap abbr[title] { text-decoration: none !important; border: 0; cursor: default; }

/* ---------------------------------------------------------------- Listes */
.uev-items { display: grid; gap: 14px; }

.uev-item {
	position: relative; display: flex; gap: 18px; align-items: center;
	background: var(--uev-surface); border: 1px solid var(--uev-line); border-left: 4px solid var(--uev-accent);
	border-radius: 6px; padding: 16px 20px;
	transition: box-shadow var(--uev-ease), transform var(--uev-ease);
}
.uev-item:hover { box-shadow: 0 6px 20px rgba(10, 16, 48, .1); }
.uev-item.uev-is-featured { border-left-color: var(--uev-gold); box-shadow: inset 4px 0 0 var(--uev-gold); }
.uev-item.uev-is-past { opacity: .78; }
.uev-item.uev-status-cancelled { border-left-color: var(--uev-error); }
.uev-item.uev-status-cancelled .uev-title a { text-decoration: line-through !important; }
.uev-item.uev-status-postponed { border-left-color: var(--uev-warn); }

.uev-date {
	flex: none; min-width: 68px; text-align: center; background: var(--uev-accent); color: #fff !important;
	border-radius: 6px; padding: 8px 6px; font: 800 26px/1 var(--uev-font-heading);
}
.uev-date .uev-day { display: block; }
.uev-date .uev-month { display: block; margin-top: 4px; font: 700 12px/1 system-ui, sans-serif; color: var(--uev-gold); letter-spacing: .08em; }

.uev-body { min-width: 0; flex: 1 1 auto; }
.uev-title { margin: 0; font: 800 19px/1.25 var(--uev-font-heading); letter-spacing: -.01em; }
.uev-title a { color: var(--uev-ink); }
.uev-title a:hover, .uev-title a:focus-visible { color: var(--uev-accent); text-decoration: underline !important; text-decoration-color: var(--uev-gold); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.uev-title a::after { content: ""; position: absolute; inset: 0; } /* toute la carte est cliquable */
.uev-meta { margin: 4px 0 0; color: var(--uev-muted); font-size: 14px; }
.uev-excerpt { margin: 8px 0 0; color: var(--uev-muted); font-size: 15px; }
.uev-tags, .uev-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.uev-chips { margin: 0; }

.uev-chip {
	position: relative; z-index: 2; display: inline-block; background: #e9ecf4; color: var(--uev-ink) !important;
	font-weight: 700; font-size: 12px; line-height: 1; padding: 7px 10px; border-radius: 3px;
}
a.uev-chip:hover { background: var(--uev-gold); }
.uev-chip-open { background: var(--uev-success-soft); color: var(--uev-success) !important; }
.uev-chip-full, .uev-chip-cancelled { background: var(--uev-error-soft); color: var(--uev-error) !important; }
.uev-chip-postponed { background: var(--uev-warn-soft); color: var(--uev-warn) !important; }

.uev-empty { margin: 0; padding: 1.2em 1.4em; background: var(--uev-accent-soft); border-left: 4px solid var(--uev-gold); border-radius: var(--uev-radius); color: var(--uev-muted); }

/* Plusieurs colonnes en vue « liste » (option columns="2|3|4") */
@media (min-width: 721px) {
	.uev-view-list.uev-cols-2 .uev-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.uev-view-list.uev-cols-3 .uev-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.uev-view-list.uev-cols-4 .uev-items { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Cartes */
.uev-view-cards .uev-items { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.uev-view-cards .uev-item { flex-direction: column; align-items: stretch; gap: 0; padding: 0; border-left-width: 1px; border-top: 4px solid var(--uev-accent); }
.uev-view-cards .uev-item.uev-is-featured { border-top-color: var(--uev-gold); box-shadow: none; }
.uev-view-cards .uev-thumb { display: block; overflow: hidden; }
.uev-view-cards .uev-thumb img { display: block; width: 100%; height: 190px; object-fit: cover; transition: transform .5s ease; }
.uev-view-cards .uev-item:hover .uev-thumb img { transform: scale(1.04); }
.uev-view-cards .uev-date { position: absolute; top: 12px; left: 12px; z-index: 3; min-width: 58px; font-size: 22px; box-shadow: 0 4px 12px rgba(10, 16, 48, .3); }
.uev-view-cards .uev-body { padding: 16px 18px 18px; }

/* Vignette en vue « liste » (option image="yes") */
.uev-item .uev-thumb { flex: none; order: 3; display: block; width: 112px; }
.uev-item .uev-thumb img { display: block; width: 112px; height: 80px; object-fit: cover; border-radius: 4px; }
.uev-view-cards .uev-item .uev-thumb { order: 0; width: auto; }
.uev-view-cards .uev-item .uev-thumb img { width: 100%; height: 190px; border-radius: 0; }

.uev-pagination { margin-top: 24px; text-align: center; }
.uev-pagination .page-numbers { display: inline-block; min-width: 40px; padding: 8px 12px; color: var(--uev-accent); font-weight: 700; }
.uev-pagination .page-numbers.current { color: var(--uev-navy); box-shadow: inset 0 -4px var(--uev-gold); }
.uev-pagination a.page-numbers:hover { text-decoration: underline !important; }

/* ---------------------------------------------------------------- Fiche */
.uev-single { margin: 0 0 1.6em; }
.uev-panel { background: var(--uev-accent-soft); border-left: 4px solid var(--uev-gold); border-radius: var(--uev-radius); padding: 1.2em 1.4em; }
.uev-facts { display: grid; gap: .9em 1.6em; margin: 0; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.uev-fact { min-width: 0; }
.uev-facts dt { margin: 0 0 .15em; font-size: .78em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--uev-muted); }
.uev-facts dd { margin: 0; font-weight: 600; }
.uev-facts dd a { color: var(--uev-accent); text-decoration: underline !important; text-underline-offset: 3px; }
.uev-actions { display: flex; flex-wrap: wrap; gap: .6em; margin-top: 1.1em; }

.uev-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 44px; padding: .65em 1.3em;
	font: inherit; font-weight: 700; color: var(--uev-ink) !important; background: var(--uev-gold); border: 2px solid var(--uev-gold);
	border-radius: var(--uev-radius); cursor: pointer; text-decoration: none;
	transition: background-color var(--uev-ease), border-color var(--uev-ease);
}
.uev-btn:hover { background: var(--uev-gold-hover); border-color: var(--uev-gold-hover); }
.uev-btn-ghost { background: transparent; border-color: var(--uev-accent); color: var(--uev-accent) !important; }
.uev-btn-ghost:hover { background: var(--uev-accent); border-color: var(--uev-accent); color: #fff !important; }
.uev-btn:focus-visible, .uev-wrap a:focus-visible { outline: 3px solid var(--uev-accent); outline-offset: 2px; }

.uev-alert { margin: 0 0 1em; padding: 1em 1.2em; border-left: 4px solid var(--uev-accent); border-radius: var(--uev-radius); background: var(--uev-accent-soft); font-weight: 600; }
.uev-alert-warn { background: var(--uev-warn-soft); border-color: var(--uev-warn); }
.uev-alert-bad { background: var(--uev-error-soft); border-color: var(--uev-error); color: var(--uev-error); }

/* ----------------------------------------------------------- Inscription */
.uev-register {
	max-width: 760px; margin: 2em auto; padding: clamp(1rem, 4vw, 2rem); background: var(--uev-surface);
	border: 1px solid var(--uev-border-soft); border-radius: 12px; box-shadow: 0 1px 2px rgba(10, 16, 48, .07), 0 8px 24px rgba(10, 16, 48, .07);
}
.uev-reg-title { margin: 0 0 .5em; padding-bottom: .4em; border-bottom: 3px solid var(--uev-gold); font: 800 1.35em/1.2 var(--uev-font-heading); color: var(--uev-accent); }
.uev-seats { margin: 0 0 .6em; color: var(--uev-muted); font-weight: 600; }

.uev-form { display: grid; gap: 1.1em; }
.uev-field { min-width: 0; }
.uev-field > label, .uev-field legend { display: block; margin-bottom: .4em; font-weight: 600; }
.uev-field input[type="text"], .uev-field input[type="email"], .uev-field input[type="tel"], .uev-field input[type="url"],
.uev-field input[type="date"], .uev-field input[type="time"], .uev-field select, .uev-field textarea {
	display: block; width: 100%; min-height: 44px; padding: .65em .8em; font: inherit; font-size: 1rem; color: var(--uev-ink);
	background: #fff; border: 1px solid var(--uev-border); border-radius: var(--uev-radius);
	transition: border-color var(--uev-ease), box-shadow var(--uev-ease);
}
.uev-field textarea { resize: vertical; min-height: 6em; }
.uev-field input:hover, .uev-field select:hover, .uev-field textarea:hover { border-color: var(--uev-accent); }
.uev-field input:focus-visible, .uev-field select:focus-visible, .uev-field textarea:focus-visible {
	outline: 3px solid var(--uev-accent); outline-offset: 2px; border-color: var(--uev-accent); box-shadow: 0 0 0 3px var(--uev-accent-soft);
}
.uev-choice {
	display: flex; align-items: flex-start; gap: .65em; min-height: 44px; padding: .6em .8em; font-weight: 400; cursor: pointer;
	border: 1px solid var(--uev-border-soft); border-radius: var(--uev-radius); background: #fff;
}
.uev-choice input { flex: none; width: 1.2em; height: 1.2em; margin: .2em 0 0; accent-color: var(--uev-accent); cursor: pointer; }
.uev-choice:has(input:checked) { border-color: var(--uev-accent); background: var(--uev-accent-soft); }
.uev-choice:has(input:focus-visible) { outline: 3px solid var(--uev-accent); outline-offset: 2px; }

.uev-req { color: var(--uev-error); }
.uev-error { margin: .4em 0 0; font-size: .9em; font-weight: 600; color: var(--uev-error); }
.uev-error:empty { display: none; }
.uev-error:not(:empty)::before { content: "\26A0\FE0E\00a0"; }
.uev-invalid input:not([type="checkbox"]), .uev-invalid select, .uev-invalid textarea { border-color: var(--uev-error); border-width: 2px; background: var(--uev-error-soft); }
.uev-invalid .uev-choice { border-color: var(--uev-error); }
.uev-invalid > label { color: var(--uev-error); }

.uev-summary { padding: 1em 1.2em; border: 2px solid var(--uev-error); border-radius: var(--uev-radius); background: var(--uev-error-soft); }
.uev-summary[hidden] { display: none; }
.uev-summary-title { margin: 0 0 .4em; font-weight: 700; color: var(--uev-error); }
.uev-summary ul { margin: 0; padding-left: 1.2em; }
.uev-summary a { color: var(--uev-error); font-weight: 600; text-decoration: underline !important; }

.uev-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8em 1.4em; }
.uev-note { margin: 0; font-size: .875em; color: var(--uev-muted); }
.uev-submit { min-height: 48px; padding: .8em 2em; font-size: 1rem; }
.uev-submit:disabled { opacity: .75; cursor: progress; }
.uev-spinner { display: none; width: 1.1em; height: 1.1em; border: 2.5px solid rgba(10, 16, 48, .3); border-top-color: var(--uev-ink); border-radius: 50%; animation: uev-spin .8s linear infinite; }
.uev-busy .uev-spinner { display: inline-block; }
@keyframes uev-spin { to { transform: rotate(360deg); } }
.uev-status { margin: 0; min-height: 1.4em; color: var(--uev-muted); }
.uev-status-error { color: var(--uev-error); font-weight: 600; }

.uev-success {
	display: flex; gap: .8em; align-items: flex-start; margin: 0; padding: 1.2em 1.4em; font-weight: 600;
	border: 1px solid var(--uev-success); border-left-width: 6px; border-radius: var(--uev-radius); background: var(--uev-success-soft);
}
.uev-success::before { content: "\2713"; flex: none; display: grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 50%; background: var(--uev-success); color: #fff; font-weight: 700; }
.uev-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.uev-help { margin: .4em 0 0; font-size: .875em; color: var(--uev-muted); }
.uev-form-heading { margin: .6em 0 0; padding-bottom: .4em; border-bottom: 3px solid var(--uev-gold); font: 800 1.1em/1.3 var(--uev-font-heading); color: var(--uev-accent); }
.uev-form-heading:first-of-type { margin-top: 0; }
.uev-field[hidden] { display: none !important; }

/* Bouton qui déplie le formulaire « Proposer un événement » */
.uev-propose-details { display: block; margin: 1em 0; }
.uev-propose-details > summary { list-style: none; cursor: pointer; width: fit-content; }
.uev-propose-details > summary::-webkit-details-marker { display: none; }
.uev-propose-details > summary::after { content: "\25BE"; margin-left: .3em; transition: transform var(--uev-ease); }
.uev-propose-details[open] > summary::after { transform: rotate(180deg); }
.uev-propose-details[open] > summary { margin-bottom: 1.2em; }
.uev-propose-details .uev-register { margin-top: 0; }

@media (min-width: 640px) {
	.uev-form { grid-template-columns: 1fr 1fr; column-gap: 1.4em; }
	.uev-form > .uev-summary, .uev-form > .uev-form-actions, .uev-form > .uev-status, .uev-form > .uev-field-wide, .uev-form > .uev-form-heading, .uev-form > noscript { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------ Calendrier */
.uev-calendar { max-width: 1100px; margin: 0 auto; }
.uev-cal-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6em 1em; margin-bottom: 1em; }
.uev-cal-title { margin: 0; font: 800 1.5em/1.2 var(--uev-font-heading); color: var(--uev-navy); }
.uev-cal-prev, .uev-cal-next { padding: .5em .9em; font-weight: 700; color: var(--uev-accent); border: 1px solid var(--uev-border-soft); border-radius: var(--uev-radius); background: #fff; }
.uev-cal-prev:hover, .uev-cal-next:hover { background: var(--uev-accent); border-color: var(--uev-accent); color: #fff; }

.uev-cal { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; }
.uev-cal th { padding: .6em .3em; background: var(--uev-accent); color: #fff; font-size: .85em; text-align: center; }
.uev-cal th abbr { text-decoration: none; cursor: default; }
.uev-cal td { height: 104px; padding: 6px 7px; vertical-align: top; border: 1px solid var(--uev-line); }
.uev-cal .uev-cal-empty { background: #f7f8fc; }
.uev-cal-num { display: inline-block; min-width: 1.6em; padding: 0 .3em; font-weight: 700; font-size: .9em; color: var(--uev-muted); text-align: center; border-radius: 999px; }
.uev-today .uev-cal-num { background: var(--uev-gold); color: var(--uev-ink); }
.uev-has-events { background: var(--uev-accent-soft); }
.uev-cal-events { list-style: none; margin: 4px 0 0; padding: 0; }
.uev-cal-events li { margin: 0 0 3px; padding: 0; font-size: .78em; line-height: 1.3; }
.uev-cal-events li a { display: block; padding: 2px 5px; color: #fff; background: var(--uev-accent); border-radius: 3px; overflow-wrap: anywhere; }
.uev-cal-events li a:hover { background: var(--uev-navy); }
.uev-cal-events .uev-status-cancelled a { background: var(--uev-error); text-decoration: line-through !important; }
.uev-cal-events .uev-status-postponed a { background: var(--uev-warn); }
.uev-cal-more { color: var(--uev-muted); font-weight: 600; }
.uev-cal-list { display: none; }

@media (max-width: 720px) {
	.uev-cal { display: none; }
	.uev-cal-list { display: block; }
	.uev-item { flex-wrap: wrap; padding: 14px 16px; gap: 14px; }
	.uev-date { min-width: 60px; font-size: 22px; }
}
@media (max-width: 639px) {
	.uev-register { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
	.uev-submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.uev-wrap *, .uev-wrap *::before, .uev-wrap *::after { transition: none !important; }
	.uev-spinner { animation-duration: 2s; }
}
@media (forced-colors: active) {
	.uev-choice:has(input:checked) { outline: 2px solid Highlight; }
	.uev-item { border: 1px solid CanvasText; }
}
@media print {
	.uev-actions, .uev-register, .uev-cal-nav a { display: none !important; }
}
