/* Calendrier des séances IMAG — classes préfixées pour éviter les conflits avec le thème */

.calimag-calendar {
	box-sizing: border-box;
	max-width: 350px;
	border: 1px solid #ddd;
	border-radius: 10px;
	padding: 15px;
	background: #fff;
}

.calimag-calendar *,
.calimag-calendar *::before,
.calimag-calendar *::after {
	box-sizing: border-box;
}

.calimag-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

.calimag-header a {
	text-decoration: none;
	color: #777;
	font-size: 28px;
	font-weight: bold;
	line-height: 1;
	box-shadow: none;
}

.calimag-header a:hover,
.calimag-header a:focus {
	color: #00008B;
}

.calimag-month-title {
	font-size: 18px;
	font-weight: bold;
	color: #00008B;
}

.calimag-days-header,
.calimag-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
}

.calimag-days-header div {
	color: #8d99ae;
	text-align: center;
	font-weight: bold;
	padding: 10px 0;
}

.calimag-day {
	min-height: 55px;
	text-align: center;
	position: relative;
	padding-top: 5px;
}

.calimag-day-number-empty,
.calimag-day-number {
	width: 35px;
	height: 35px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
	font-size: inherit;
	line-height: 1;
}

.calimag-day-number-empty {
	color: #8d99ae;
}

/* Bouton (accessible au clavier et au toucher) — on neutralise les styles du thème */
.calimag-day-number {
	appearance: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: #00008B;
	background: #DCDCDC;
	font-family: inherit;
	font-weight: bold;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
}

.calimag-day-number:hover,
.calimag-day-number[aria-expanded="true"] {
	background: #c8c8d8;
	color: #00008B;
}

.calimag-day-number:focus-visible {
	outline: 2px solid #00008B;
	outline-offset: 2px;
}

.calimag-empty {
	visibility: hidden;
}

.calimag-tooltip {
	display: none;
	position: absolute;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 5px;
	padding: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
	z-index: 9999;
	min-width: 150px;
	max-width: 300px;
	font-size: 14px;
	text-align: left;
}

.calimag-tooltip ul {
	margin: 0;
	padding-left: 1.2em;
}

.calimag-tooltip li {
	margin: 0 0 4px;
}

.calimag-tooltip li:last-child {
	margin-bottom: 0;
}

.calimag-error {
	padding: 8px 12px;
	border-left: 4px solid #d63638;
	background: #fcf0f1;
}
