/*
 * Agenda Plugin — Frontend CSS
 * Conçu pour s'intégrer avec les variables CSS du thème Volte.
 * Fonctionne aussi en autonomie via le shortcode (variables locales en fallback).
 */

.agenda-list {
	--agenda-accent:     var(--volte-accent, #d4af37);
	--agenda-border:     var(--volte-border, rgba(255, 255, 255, 0.08));
	--agenda-text:       var(--volte-text, #e1e1e6);
	--agenda-muted:      var(--volte-muted, #a1a1aa);
	--agenda-bg-hover:   rgba(255, 255, 255, 0.03);
	--agenda-radius:     var(--volte-radius, 12px);
	--agenda-concert:    var(--volte-accent, #d4af37);
	--agenda-residence:  #6b8cba;

	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* ─── Item ─────────────────────────────────────────── */

.agenda-item {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding: 1.25rem 1rem;
	border-bottom: 1px solid var(--agenda-border);
	transition: background 0.2s ease;
	border-radius: 0;
}

.agenda-item:first-child {
	border-top: 1px solid var(--agenda-border);
}

.agenda-item:hover {
	background: var(--agenda-bg-hover);
}

/* ─── Bloc date ─────────────────────────────────────── */

.agenda-item__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 52px;
	text-align: center;
	flex-shrink: 0;
}

.agenda-item__day {
	font-size: 1.8rem;
	font-weight: 800;
	line-height: 1;
	color: var(--agenda-accent);
}

.agenda-item__month {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--agenda-muted);
	margin-top: 2px;
}

.agenda-item__year {
	font-size: 0.65rem;
	color: var(--agenda-muted);
	opacity: 0.6;
}

/* ─── Contenu ───────────────────────────────────────── */

.agenda-item__content {
	flex: 1;
	min-width: 0;
}

.agenda-item__title-row {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-wrap: wrap;
	margin-bottom: 0.3rem;
}

.agenda-item__name {
	font-size: 1rem;
	font-weight: 600;
	color: var(--agenda-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.agenda-item__meta {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	flex-wrap: wrap;
}

.agenda-item__location {
	font-size: 0.875rem;
	color: var(--agenda-muted);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	transition: color 0.2s;
}

a.agenda-item__location:hover {
	color: var(--agenda-accent);
}

.agenda-item__city {
	opacity: 0.65;
	font-size: 0.8em;
}

.agenda-icon-maps {
	width: 13px;
	height: 13px;
	flex-shrink: 0;
	opacity: 0.6;
}

.agenda-item__time {
	font-size: 0.8rem;
	color: var(--agenda-muted);
	background: rgba(255, 255, 255, 0.05);
	padding: 2px 8px;
	border-radius: 20px;
	font-variant-numeric: tabular-nums;
}

/* ─── Badges ────────────────────────────────────────── */

.agenda-badge {
	display: inline-block;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 3px 9px;
	border-radius: 20px;
	flex-shrink: 0;
}

.agenda-badge--concert {
	background: rgba(212, 175, 55, 0.15);
	color: var(--agenda-concert);
	border: 1px solid rgba(212, 175, 55, 0.3);
}

.agenda-badge--residence {
	background: rgba(107, 140, 186, 0.15);
	color: var(--agenda-residence);
	border: 1px solid rgba(107, 140, 186, 0.3);
}

/* ─── CTA lien ──────────────────────────────────────── */

.agenda-item__cta {
	flex-shrink: 0;
	font-size: 0.8rem;
	font-weight: 700;
	text-decoration: none;
	color: var(--agenda-accent);
	border: 1px solid rgba(212, 175, 55, 0.4);
	padding: 6px 14px;
	border-radius: 20px;
	transition: background 0.2s, color 0.2s;
	white-space: nowrap;
}

.agenda-item__cta:hover {
	background: var(--agenda-accent);
	color: #000;
}

/* ─── État vide ─────────────────────────────────────── */

.agenda-empty {
	color: var(--agenda-muted, #a1a1aa);
	font-style: italic;
	padding: 1rem 0;
}

/* ─── Responsive ────────────────────────────────────── */

@media (max-width: 600px) {
	.agenda-item {
		/* Réorganisation en deux zones : [date | contenu] puis [cta pleine largeur] */
		display: grid;
		grid-template-columns: 52px 1fr;
		grid-template-areas:
			"date content"
			"cta  cta";
		gap: 0.75rem 1rem;
		padding: 1rem 0.5rem;
		align-items: start;
	}

	.agenda-item__date {
		grid-area: date;
		padding-top: 2px;
	}

	.agenda-item__content {
		grid-area: content;
	}

	.agenda-item__name {
		white-space: normal;
		word-break: break-word;
	}

	.agenda-item__cta {
		grid-area: cta;
		width: 100%;
		text-align: center;
		box-sizing: border-box;
		padding: 8px 14px;
		font-size: 0.85rem;
	}

	.agenda-item__meta {
		gap: 0.5rem;
	}

	.agenda-badge {
		font-size: 0.6rem;
	}
}
