/**
 * Calendanse MEC View Switcher — front (menu déroulant des vues).
 * Aligné Calendanse : clair, doux, slate / bleu nuit.
 */

.cd-mvs {
	box-sizing: border-box;
	margin: 1.25rem 0 1.75rem;
	max-width: 100%;
}

.cd-mvs__premium-notice {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	font-size: 0.9rem;
	line-height: 1.45;
	color: var(--cd-navy, #0f172a);
	background: var(--cd-surface-muted, #f1f5f9);
	border: 1px solid var(--cd-border, #e2e8f0);
	border-left: 3px solid var(--cd-blue, #1e3a5f);
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.cd-mvs__premium-link {
	margin-left: 0.35em;
	font-weight: 600;
	color: var(--cd-blue, #1e3a5f);
	text-underline-offset: 2px;
}

.cd-mvs__premium-link:focus-visible {
	outline: 2px solid var(--cd-blue, #1e3a5f);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Sélecteur de période (à venir / passés / tous) */
.cd-mvs__period {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0 0 0.75rem;
	padding: 0;
	max-width: 100%;
}

.cd-mvs__period-label {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--cd-text-muted, #64748b);
}

.cd-mvs__period-options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.cd-mvs__period-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.45rem 0.75rem;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--cd-navy, #0f172a);
	text-decoration: none;
	background: #fff;
	border: 1px solid #dbe4ee;
	border-radius: 999px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cd-mvs__period-btn:hover {
	border-color: #c5d4e3;
	background: #f8fafc;
}

.cd-mvs__period-btn.is-active {
	color: #fff;
	background: var(--cd-blue, #1e3a5f);
	border-color: var(--cd-blue, #1e3a5f);
}

.cd-mvs__period-btn:focus-visible {
	outline: 2px solid var(--cd-blue, #1e3a5f);
	outline-offset: 2px;
}

/* Bloc sélecteur : carte douce, pas de débordement horizontal */
.cd-mvs__selector {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.5rem;
	margin: 1rem 0;
	padding: 14px 16px;
	max-width: 100%;
	min-width: 0;
	background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
	border: 1px solid rgba(226, 232, 240, 0.95);
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.cd-mvs__selector-label {
	order: 0;
	margin: 0;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: none;
	color: var(--cd-text-muted, #64748b);
	line-height: 1.3;
}

.cd-mvs__select {
	order: 1;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0.65rem 0.85rem;
	font-size: 1.05rem;
	line-height: 1.4;
	color: var(--cd-navy, #0f172a);
	background: #fff;
	border: 1px solid #dbe4ee;
	border-radius: 10px;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, #64748b 50%),
		linear-gradient(135deg, #64748b 50%, transparent 50%);
	background-position: calc(100% - 1.15rem) calc(50% + 0.15rem), calc(100% - 0.75rem) calc(50% + 0.15rem);
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 2.5rem;
	min-height: 2.75rem;
}

.cd-mvs__select:hover {
	border-color: #c5d4e3;
}

.cd-mvs__select:focus {
	outline: none;
}

.cd-mvs__select:focus-visible {
	border-color: var(--cd-blue, #1e3a5f);
	box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.18), 0 1px 2px rgba(15, 23, 42, 0.06);
}

/* Ligne d’aide sous le select */
.cd-mvs__selector-hint {
	order: 2;
	margin: 0.15rem 0 0;
	padding: 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--cd-text-muted, #64748b);
	max-width: 100%;
}

/* Statut prefs (carte membre) : sous le select */
.cd-mvs__selector--prefs .cd-mvs__prefs-status--inline {
	order: 3;
}

@media (min-width: 600px) {
	.cd-mvs__select {
		width: 100%;
		max-width: min(340px, 100%);
		align-self: flex-start;
	}
}

.cd-mvs__prefs-status--inline {
	margin: 0.35rem 0 0;
	font-size: 0.85rem;
	line-height: 1.4;
	color: var(--cd-blue, #1e3a5f);
}

.cd-mvs__calendar + .cd-mvs__selector {
	margin-top: 1.25rem;
}

.cd-mvs__calendar {
	clear: both;
}

.cd-mvs--error {
	padding: 0.85rem 1.1rem;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 12px;
	color: var(--cd-navy, #0f172a);
	box-shadow: 0 1px 2px rgba(185, 28, 28, 0.06);
}
