/**
 * ST-MAXIMIN — MODULE MARCHÉS PUBLICS (/economie/)
 * Styles du shortcode [stmax_marches]
 * Version : 1.0.0
 * Normes : Mobile-first / Flexbox, Variables CSS, WCAG AAA, zéro surcharge forcée, sans glassmorphism
 */

/* ==========================================================================
   1. TOKENS CHARTE SAINT-MAXIMIN
   ========================================================================== */
:where(.stmax-marches-list, .stmax-marches-empty) {
	--stmax-marches-prune: #38164B;
	--stmax-marches-jaune: #FFF563;
	--stmax-marches-lavande: #EFCBFF;
	--stmax-marches-creme: #FCF9F2;
	--stmax-marches-text: #1E1626;
	--stmax-marches-muted: #5F4B6E;
	--stmax-marches-surface: #FFFFFF;
	--stmax-marches-border: #E6DCEF;
	--stmax-marches-border-dashed: #D8C9E5;
	--stmax-marches-font: 'JUST Sans', 'Just Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--stmax-marches-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--stmax-marches-transition: 180ms var(--stmax-marches-ease);
}

/* ==========================================================================
   2. CONTENEUR LISTE & NORMALISATION SCOPÉE
   ========================================================================== */
.stmax-marches-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	font-family: var(--stmax-marches-font);
	color: var(--stmax-marches-text);
	-webkit-tap-highlight-color: transparent;
}

.stmax-marches-list *,
.stmax-marches-list *::before,
.stmax-marches-list *::after,
.stmax-marches-empty,
.stmax-marches-empty *,
.stmax-marches-empty *::before,
.stmax-marches-empty *::after {
	box-sizing: border-box;
}

/* ==========================================================================
   3. CARTE LIGNE MARCHÉ PUBLIC (.stmax-marche-row)
   ========================================================================== */
.stmax-marches-list .stmax-marche-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	min-width: 0;
	padding: 14px 18px;
	background-color: var(--stmax-marches-surface);
	border: 1px solid var(--stmax-marches-border);
	border-radius: 14px;
	transition: border-color var(--stmax-marches-transition),
	            box-shadow var(--stmax-marches-transition);
}

@media (hover: hover) and (pointer: fine) {
	.stmax-marches-list .stmax-marche-row:hover {
		border-color: var(--stmax-marches-prune);
		box-shadow: 0 4px 14px rgba(56, 22, 75, 0.06);
	}
}

/* ==========================================================================
   4. PASTILLE DATE (.stmax-marche-date)
   ========================================================================== */
.stmax-marches-list .stmax-marche-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: 52px;
	min-width: 52px;
	height: 52px;
	padding: 4px;
	flex-shrink: 0;
	background-color: var(--stmax-marches-jaune);
	color: var(--stmax-marches-prune);
	border-radius: 10px;
	text-align: center;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.stmax-marches-list .stmax-marche-date-day {
	display: block;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.05;
	color: var(--stmax-marches-prune);
}

.stmax-marches-list .stmax-marche-date-month {
	display: block;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.05;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--stmax-marches-prune);
}

/* ==========================================================================
   5. CORPS & MÉTADONNÉES (.stmax-marche-body / title / meta)
   ========================================================================== */
.stmax-marches-list .stmax-marche-body {
	flex: 1 1 auto;
	min-width: 0;
}

.stmax-marches-list h3.stmax-marche-title,
.stmax-marches-list .stmax-marche-title {
	margin: 0;
	font-family: var(--stmax-marches-font);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--stmax-marches-prune);
	overflow-wrap: break-word;
	text-wrap: balance;
}

.stmax-marches-list .stmax-marche-meta {
	margin: 4px 0 0;
	font-family: var(--stmax-marches-font);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--stmax-marches-muted);
	font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   6. BOUTON CTA PDF (.stmax-marche-cta)
   ========================================================================== */
.stmax-marches-list a.stmax-marche-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	flex-shrink: 0;
	border: 0;
	border-radius: 9999px;
	background-color: var(--stmax-marches-prune);
	color: var(--stmax-marches-surface);
	font-family: var(--stmax-marches-font);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	touch-action: manipulation;
	user-select: none;
	-webkit-user-select: none;
	transition: background-color var(--stmax-marches-transition),
	            color var(--stmax-marches-transition),
	            transform var(--stmax-marches-transition);
}

.stmax-marches-list a.stmax-marche-cta:is(:visited, :focus) {
	background-color: var(--stmax-marches-prune);
	color: var(--stmax-marches-surface);
	text-decoration: none;
}

.stmax-marches-list a.stmax-marche-cta:focus:not(:focus-visible) {
	outline: none;
}

.stmax-marches-list a.stmax-marche-cta:focus-visible {
	outline: 2px solid var(--stmax-marches-prune);
	outline-offset: 2px;
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.stmax-marches-list a.stmax-marche-cta:is(:hover, :visited:hover, :focus:hover, :focus-visible:hover) {
		background-color: var(--stmax-marches-jaune);
		color: var(--stmax-marches-prune);
		text-decoration: none;
	}
}

.stmax-marches-list a.stmax-marche-cta:is(:active, :visited:active, :focus:active, :focus-visible:active, :hover:active) {
	background-color: var(--stmax-marches-jaune);
	color: var(--stmax-marches-prune);
	transform: scale(0.98);
	text-decoration: none;
}

/* ==========================================================================
   7. ÉTAT VIDE (.stmax-marches-empty)
   ========================================================================== */
.stmax-marches-empty {
	width: 100%;
	max-width: 100%;
	padding: 18px;
	background-color: var(--stmax-marches-creme);
	border: 1px dashed var(--stmax-marches-border-dashed);
	border-radius: 12px;
	font-family: var(--stmax-marches-font);
	font-size: 14px;
	line-height: 1.5;
	color: var(--stmax-marches-muted);
	-webkit-tap-highlight-color: transparent;
}

.stmax-marches-empty a {
	color: var(--stmax-marches-prune);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1.5px;
	touch-action: manipulation;
}

.stmax-marches-empty a:visited {
	color: var(--stmax-marches-prune);
}

@media (hover: hover) and (pointer: fine) {
	.stmax-marches-empty a:hover {
		text-decoration-thickness: 2px;
	}
}

.stmax-marches-empty a:focus-visible {
	outline: 2px solid var(--stmax-marches-prune);
	outline-offset: 2px;
	border-radius: 3px;
}

/* ==========================================================================
   8. RESPONSIVE MOBILE (<= 640px)
   ========================================================================== */
@media (max-width: 640px) {
	.stmax-marches-list .stmax-marche-row {
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 12px 14px;
		padding: 14px;
	}

	.stmax-marches-list .stmax-marche-body {
		flex: 1 1 0%;
		min-width: 0;
	}

	.stmax-marches-list a.stmax-marche-cta {
		width: 100%;
		text-align: center;
	}
}

/* ==========================================================================
   9. ACCESSIBILITÉ & PRÉFÉRENCES SYSTÈME
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	.stmax-marches-list .stmax-marche-row,
	.stmax-marches-list a.stmax-marche-cta {
		transition: none;
	}

	.stmax-marches-list a.stmax-marche-cta:active {
		transform: none;
	}
}

@media (forced-colors: active) {
	.stmax-marches-list .stmax-marche-row,
	.stmax-marches-list .stmax-marche-date,
	.stmax-marches-list a.stmax-marche-cta,
	.stmax-marches-empty {
		border: 1px solid CanvasText;
	}

	.stmax-marches-list a.stmax-marche-cta {
		forced-color-adjust: auto;
	}
}
