/* Calendrier d'ouverture — styles de base (tout est surchargeable depuis Elementor) */

.cdo-calendar {
	--cdo-open-bg: #3a7d44;
	--cdo-open-color: #ffffff;
	--cdo-closed-bg: #ece8e2;
	--cdo-closed-color: #9a948c;
	--cdo-today-color: #c0392b;
	--cdo-today-width: 2px;
	--cdo-past-opacity: .35;
	--cdo-cell-h: 34px;
	--cdo-cell-gap: 4px;
	--cdo-cell-radius: 50%;
	box-sizing: border-box;
}
.cdo-calendar *,
.cdo-calendar *::before,
.cdo-calendar *::after { box-sizing: border-box; }

.cdo-months {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	align-items: start;
}
/* Shortcode : colonnes responsive */
.cdo-cols-1 .cdo-months { grid-template-columns: minmax(0, 1fr); }
.cdo-cols-2 .cdo-months { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cdo-cols-4 .cdo-months { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) {
	.cdo-cols-3 .cdo-months,
	.cdo-cols-4 .cdo-months { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.cdo-cols-2 .cdo-months,
	.cdo-cols-3 .cdo-months,
	.cdo-cols-4 .cdo-months { grid-template-columns: minmax(0, 1fr); }
}

.cdo-year {
	grid-column: 1 / -1;
	font-size: 1.75em;
	font-weight: 700;
	line-height: 1.2;
	margin: .4em 0 0;
}

.cdo-month {
	background: #fff;
	padding: 16px;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.cdo-month-title {
	text-align: center;
	font-weight: 700;
	font-size: 1.15em;
	margin: 0 0 10px;
}

.cdo-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: var(--cdo-cell-gap);
}
.cdo-wd {
	text-align: center;
	font-size: .8em;
	font-weight: 600;
	opacity: .65;
	padding: 2px 0 4px;
}
.cdo-day {
	display: flex;
	align-items: center;
	justify-content: center;
	height: var(--cdo-cell-h);
	border-radius: var(--cdo-cell-radius);
	font-size: .9em;
	line-height: 1;
	cursor: default;
	transition: transform .15s ease, opacity .15s ease;
	font-variant-numeric: tabular-nums;
}
.cdo-day:hover { transform: scale(1.12); }
.elementor-widget-cdo-calendar:not(.cdo-hover-yes) .cdo-day:hover,
.elementor-widget-cdo-month:not(.cdo-hover-yes) .cdo-day:hover { transform: none; }

.cdo-open { background: var(--cdo-open-bg); color: var(--cdo-open-color); }
.cdo-closed { background: var(--cdo-closed-bg); color: var(--cdo-closed-color); }
.cdo-custom { background: var(--cdo-pc); color: var(--cdo-pt, #fff); }

.cdo-today {
	outline: var(--cdo-today-width) solid var(--cdo-today-color);
	outline-offset: 1px;
	font-weight: 700;
}

.cdo-past-dim .cdo-day.cdo-past { opacity: var(--cdo-past-opacity); }
.cdo-past-neutral .cdo-day.cdo-past {
	background: transparent;
	color: inherit;
	opacity: var(--cdo-past-opacity);
}

.cdo-note { margin-top: 12px; font-size: .9em; }
.cdo-note p { margin: 0 0 .4em; }
.cdo-note p:last-child { margin-bottom: 0; }
.cdo-notes { margin-top: 16px; }
.cdo-pending,
.cdo-footer { margin-top: 20px; text-align: center; }
.cdo-pending p:last-child,
.cdo-footer p:last-child { margin-bottom: 0; }

.cdo-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 20px;
	margin: 20px 0;
	font-size: .95em;
}
.cdo-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.cdo-swatch.cdo-closed:not(.cdo-custom) { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.cdo-swatch {
	display: inline-block;
	width: 16px;
	height: 16px;
	border-radius: var(--cdo-cell-radius);
	flex: none;
}

/* ---------------- Statut du jour ---------------- */

.cdo-status {
	--cdo-dot: #3a7d44;
	display: flex;
	align-items: center;
	gap: .6em;
	box-sizing: border-box;
}
.cdo-status.cdo-is-closed { --cdo-dot: #c0392b; }
.cdo-status-text { margin: 0; }
.cdo-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--cdo-dot);
	flex: none;
	position: relative;
}
.cdo-status--open .cdo-dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--cdo-dot);
	animation: cdo-pulse 2s ease-out infinite;
}
.elementor-widget-cdo-status:not(.cdo-pulse-yes) .cdo-dot::after { display: none; }
@keyframes cdo-pulse {
	0% { transform: scale(1); opacity: .6; }
	100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.cdo-status--open .cdo-dot::after { animation: none; display: none; }
	.cdo-day { transition: none; }
}

/* ---------------- Mois en cours ---------------- */
.cdo-single { max-width: 380px; }
.cdo-single .cdo-legend { margin: 14px 0 0; }
.cdo-single .cdo-legend:first-child { margin: 0 0 14px; }
