/**
 * Pontiac Ouest — council meetings / procès-verbaux pages.
 *
 * Styles the My Municipality (Calumet Dashboard) public shortcodes inside a
 * .po-meetings wrapper. The plugin prints its own CSS in the footer (after this
 * file), so selectors here carry an extra class of specificity instead of
 * relying on load order. Plugin rules that use !important are matched with
 * !important (mostly custom properties).
 */

/* —— Tokens —— */

.po-meetings {
	--po-accent: #222233;
	--po-accent-soft: color-mix(in srgb, var(--po-accent) 10%, #fff);
	--po-accent-ink: color-mix(in srgb, var(--po-accent) 70%, #000);
	--po-ink: #222233;
	--po-muted: #5c5f6e;
	--po-line: #e3e5ea;
	--po-surface: #ffffff;
	--po-band: #f5f7f9;
	--po-radius: 10px;
	--po-shadow: 0 1px 2px rgba(34, 34, 51, 0.05), 0 4px 14px rgba(34, 34, 51, 0.06);
	--po-shadow-hover: 0 2px 4px rgba(34, 34, 51, 0.06), 0 10px 28px rgba(34, 34, 51, 0.1);
	--po-heading-font: "Fjalla One", var(--e-global-typography-primary-font-family, sans-serif);

	box-sizing: border-box;
	max-width: 1280px;
	margin: 0 auto;
	padding: 64px 20px 96px;
	color: var(--po-ink);
	font-size: 17px;
	line-height: 1.6;
}

.po-meetings *,
.po-meetings *::before,
.po-meetings *::after {
	box-sizing: border-box;
}

.po-meetings--allumettes { --po-accent: #16bdf3; --po-accent-ink: #0a6f91; }
.po-meetings--chichester { --po-accent: #ef2424; --po-accent-ink: #b01515; }
.po-meetings--sheenboro  { --po-accent: #63c93b; --po-accent-ink: #357a1a; }
.po-meetings--waltham    { --po-accent: #750d0c; --po-accent-ink: #750d0c; }

.po-meetings a {
	color: var(--po-accent-ink);
}

/* —— Section scaffolding —— */

.po-meetings__section + .po-meetings__section {
	margin-top: 80px;
}

.po-meetings .po-meetings__heading {
	position: relative;
	margin: 0 0 28px;
	padding-bottom: 14px;
	font-family: var(--po-heading-font);
	font-size: clamp(1.6rem, 2.6vw, 2.1rem);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: var(--po-ink);
}

.po-meetings .po-meetings__heading::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 56px;
	height: 4px;
	border-radius: 2px;
	background: var(--po-accent);
}

.po-meetings__eyebrow {
	display: block;
	margin: 0 0 10px;
	font-family: var(--po-heading-font);
	font-size: 0.85rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--po-accent-ink);
}

/* —— 1. Intro band —— */

.po-meetings__intro {
	display: grid;
	grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
	gap: 56px;
	align-items: center;
}

.po-meetings__lead {
	margin: 0;
	font-size: clamp(1.15rem, 1.8vw, 1.45rem);
	line-height: 1.65;
	color: var(--po-ink);
}

/* Next meeting card — plugin builds it for white text on a dark hero; recolour. */

.po-meetings .po-meetings__next .mmd-public-widget.mmd-next-meeting {
	--mmd-pw-text: var(--po-ink) !important;
	--mmd-pw-accent: var(--po-accent-ink) !important;
	--mmd-pw-card-bg: var(--po-surface) !important;
	--mmd-pw-card-border-color: var(--po-line) !important;
	--mmd-pw-card-border-width: 1px !important;
	--mmd-pw-divider: var(--po-line);

	position: relative;
	max-width: none;
	gap: 8px;
	padding: 28px 28px 26px;
	border-top: 6px solid var(--po-accent) !important;
	border-radius: var(--po-radius);
	box-shadow: var(--po-shadow);
}

.po-meetings .po-meetings__next .mmd-public-widget.mmd-next-meeting:hover {
	box-shadow: var(--po-shadow-hover);
}

.po-meetings .po-meetings__next .mmd-public-widget .mmd-next-meeting__date {
	font-family: var(--po-heading-font) !important;
	font-size: 1.35rem !important;
	font-weight: 400 !important;
	letter-spacing: 0.02em;
	text-transform: none;
	line-height: 1.25;
	color: var(--po-ink) !important;
}

.po-meetings .po-meetings__next .mmd-public-widget .mmd-next-meeting__title {
	font-family: inherit !important;
	font-size: 1rem !important;
	font-weight: 500 !important;
	letter-spacing: 0;
	line-height: 1.45;
}

.po-meetings .po-meetings__next .mmd-public-widget .mmd-next-meeting__title a {
	color: var(--po-muted) !important;
}

.po-meetings .po-meetings__next .mmd-public-widget .mmd-next-meeting__title a:hover,
.po-meetings .po-meetings__next .mmd-public-widget .mmd-next-meeting__title a:focus-visible {
	color: var(--po-accent-ink) !important;
}

.po-meetings .po-meetings__next .mmd-public-widget .mmd-next-meeting__agenda {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: auto;
	margin-top: 10px;
	padding: 10px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--po-accent);
	color: #fff !important;
	font-family: var(--po-heading-font) !important;
	font-size: 0.95rem !important;
	font-weight: 400 !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.po-meetings .po-meetings__next .mmd-public-widget .mmd-next-meeting__agenda:hover,
.po-meetings .po-meetings__next .mmd-public-widget .mmd-next-meeting__agenda:focus-visible {
	opacity: 1;
	background: var(--po-accent-ink);
	text-decoration: none !important;
}

.po-meetings .po-meetings__next .mmd-next-meeting__empty {
	color: var(--po-muted) !important;
}

/* —— 2. Upcoming meetings ([mmd_council_meetings]) —— */

.po-meetings .po-meetings__upcoming .mmd-council-meetings.custom-event-listing {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 20px;
}

.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-item {
	position: relative;
	align-items: center;
	gap: 16px;
	padding: 20px 22px;
	background: var(--po-surface);
	border: 1px solid var(--po-line);
	border-left: 4px solid var(--po-accent);
	border-radius: var(--po-radius);
	box-shadow: var(--po-shadow);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-item:hover {
	box-shadow: var(--po-shadow-hover);
	transform: translateY(-2px);
}

/* Featured image when the meeting has one; the generic calendar fallback is
   swapped for an accent calendar glyph. */
.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-image {
	flex: 0 0 56px;
	width: 56px;
}

.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-image img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 8px;
}

.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-image:has(img[src*="calendar-icon-events"]) {
	height: 56px;
	border-radius: 8px;
	background: var(--po-accent-soft);
	-webkit-mask: none;
}

.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-image:has(img[src*="calendar-icon-events"]) a {
	position: relative;
	width: 100%;
	height: 100%;
}

.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-image img[src*="calendar-icon-events"] {
	opacity: 0;
}

.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-image:has(img[src*="calendar-icon-events"]) a::before {
	content: "";
	position: absolute;
	inset: 14px;
	background: var(--po-accent-ink);
	-webkit-mask: 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%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: 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%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
}

.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-content {
	gap: 2px;
}

.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-date-text {
	order: -1;
	font-family: var(--po-heading-font);
	font-size: 1.1rem;
	line-height: 1.3;
	color: var(--po-ink);
}

.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-title-text {
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.4;
}

.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-title-text a {
	color: var(--po-muted);
}

/* Whole card is clickable through the title link; the "Read more" link is redundant. */
.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-title-text a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-item:hover .event-title-text a {
	color: var(--po-accent-ink);
}

.po-meetings .po-meetings__upcoming .mmd-council-meetings .event-read-more {
	display: none;
}

.po-meetings .po-meetings__upcoming .mmd-council-meetings__empty {
	padding: 20px 22px;
	background: var(--po-band);
	border-radius: var(--po-radius);
	color: var(--po-muted);
	opacity: 1;
}

/* —— 3. Past meetings + archives —— */

.po-meetings__columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 56px;
	align-items: start;
}

.po-meetings__note {
	margin: -8px 0 28px;
	max-width: 62ch;
	color: var(--po-muted);
}

.po-meetings__note a {
	font-weight: 600;
}

/* [mmd_past_council_meetings columns="2"] */

.po-meetings .mmd-past-council-meetings.mmd-past-council-meetings--grid .mmd-past-council-meetings__list {
	gap: 14px;
	border: 0;
}

.po-meetings .mmd-past-council-meetings .mmd-past-council-meetings__item {
	gap: 12px;
	padding: 18px 20px;
	background: var(--po-surface);
	border: 1px solid var(--po-line);
	border-radius: var(--po-radius);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.po-meetings .mmd-past-council-meetings .mmd-past-council-meetings__item:hover {
	border-color: color-mix(in srgb, var(--po-accent) 45%, var(--po-line));
	box-shadow: var(--po-shadow);
}

.po-meetings .mmd-past-council-meetings .mmd-past-council-meetings__date {
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--po-muted);
	opacity: 1;
}

.po-meetings .mmd-past-council-meetings .mmd-past-council-meetings__title {
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
}

.po-meetings .mmd-past-council-meetings .mmd-past-council-meetings__title a {
	color: var(--po-ink);
}

.po-meetings .mmd-past-council-meetings .mmd-past-council-meetings__title a:hover,
.po-meetings .mmd-past-council-meetings .mmd-past-council-meetings__title a:focus-visible {
	color: var(--po-accent-ink);
}

.po-meetings .mmd-past-council-meetings .mmd-past-council-meetings__docs {
	gap: 8px;
}

.po-meetings .mmd-past-council-meetings .mmd-past-council-meetings__doc {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px 6px 10px;
	border-radius: 999px;
	background: var(--po-accent-soft);
	color: var(--po-accent-ink);
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.po-meetings .mmd-past-council-meetings .mmd-past-council-meetings__doc::before {
	content: "";
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
	background: currentColor;
	-webkit-mask: 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%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M12 18v-6M9 15l3 3 3-3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: 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%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M12 18v-6M9 15l3 3 3-3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.po-meetings .mmd-past-council-meetings .mmd-past-council-meetings__doc:hover,
.po-meetings .mmd-past-council-meetings .mmd-past-council-meetings__doc:focus-visible {
	background: var(--po-accent);
	color: #fff;
}

/* Meetings whose minutes are not posted yet. */
.po-meetings .mmd-past-council-meetings .mmd-past-council-meetings__item:not(:has(.mmd-past-council-meetings__docs))::after {
	content: var(--po-pending-label, "Procès-verbal à venir");
	font-size: 0.82rem;
	font-style: italic;
	color: var(--po-muted);
}

.po-meetings[lang="en"],
.po-meetings:lang(en) {
	--po-pending-label: "Minutes coming soon";
}

/* Archives sidebar */

.po-meetings__aside {
	position: sticky;
	top: 24px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.po-meetings__card {
	padding: 26px 24px;
	background: var(--po-band);
	border-radius: var(--po-radius);
}

.po-meetings__card .po-meetings__heading {
	margin-bottom: 20px;
	font-size: 1.5rem;
}

.po-archives {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.po-archives li {
	margin: 0;
}

.po-meetings a.po-archive {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2px;
	height: 100%;
	padding: 14px 14px 12px;
	background: var(--po-surface);
	border: 1px solid var(--po-line);
	border-radius: 8px;
	color: var(--po-ink);
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.po-meetings a.po-archive:hover,
.po-meetings a.po-archive:focus-visible {
	border-color: var(--po-accent);
	box-shadow: var(--po-shadow);
	transform: translateY(-1px);
}

.po-archive__year {
	font-family: var(--po-heading-font);
	font-size: 1.6rem;
	line-height: 1.1;
}

.po-archive__type {
	padding-right: 4px;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.35;
	text-transform: uppercase;
	color: var(--po-muted);
}

.po-meetings a.po-archive::after {
	content: "";
	position: absolute;
	top: 14px;
	right: 12px;
	width: 16px;
	height: 16px;
	background: var(--po-accent-ink);
	-webkit-mask: 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%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: 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%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.po-meetings__contact {
	margin: 0;
	padding: 20px 24px;
	border: 1px dashed var(--po-line);
	border-radius: var(--po-radius);
	font-size: 0.95rem;
	color: var(--po-muted);
}

.po-meetings__contact strong {
	display: block;
	margin-bottom: 4px;
	color: var(--po-ink);
}

/* —— Responsive (kit breakpoints: 1025 / 768) —— */

@media (max-width: 1024px) {
	.po-meetings {
		padding-top: 48px;
	}

	.po-meetings__intro,
	.po-meetings__columns {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
	}

	.po-meetings__aside {
		position: static;
	}

	.po-archives {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	}
}

@media (max-width: 767px) {
	.po-meetings {
		padding: 36px 16px 64px;
		font-size: 16px;
	}

	.po-meetings__section + .po-meetings__section {
		margin-top: 56px;
	}

	.po-meetings .mmd-past-council-meetings.mmd-past-council-meetings--grid {
		--mmd-past-cols: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.po-meetings *,
	.po-meetings *::before,
	.po-meetings *::after {
		transition: none !important;
	}
}
