/* ==========================================================================
   Ski Montcalm — Calendrier des horaires (The Events Calendar, vue Mois)
   A. Couleur de chaque jour selon l'horaire (mobile)
   B. Légende, carte du jour sélectionné et liste des périodes (mobile)
   C. Barre de navigation « ‹ Février 2026 › » (mobile et bureau)
   Gabarits : tribe/events/v2/month/*.php — Script : assets/js/calendrier.js
   ========================================================================== */

/* --- Couleurs par état / variante d'horaire ------------------------------ */
#calendrier .skm-variante--1 { --skm-c: #1E9E63; --skm-bg: #DCF2E7; }
#calendrier .skm-variante--2 { --skm-c: #1F7FD1; --skm-bg: #DCEBF8; }
#calendrier .skm-variante--3 { --skm-c: #E07B12; --skm-bg: #FBEBD9; }
#calendrier .skm-variante--4 { --skm-c: #7C4DCC; --skm-bg: #EBE3F7; }
#calendrier .skm-etat--ferme { --skm-c: #9DA4A7; --skm-bg: #F1F2F3; }
#calendrier .skm-etat--aucun { --skm-c: #D5D9DB; --skm-bg: #FFFFFF; }

#calendrier .skm-pastille {
	display: inline-block;
	flex: none;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--skm-c, #D5D9DB);
}

/* --- C. Barre du haut ---------------------------------------------------- */
#calendrier .tribe-events .skm-topbar {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 100%;
	margin: 0 0 24px;
	padding: 0;
}
#calendrier .skm-topbar__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	max-width: 440px;
}
#calendrier .skm-topbar__mois {
	flex: 1;
	margin: 0;
	text-align: center;
	font-size: 24px;
	line-height: 1.2;
	font-weight: 700;
	color: #0F2229;
}
#calendrier .skm-topbar__fleche {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #F4F4F4;
	color: #0F2229;
	transition: background-color .2s ease, color .2s ease;
}
#calendrier .skm-topbar__fleche svg {
	width: 10px;
	height: 16px;
	fill: currentColor;
}
#calendrier .skm-topbar__fleche--next svg { transform: rotate(180deg); }
#calendrier a.skm-topbar__fleche:hover,
#calendrier a.skm-topbar__fleche:focus-visible {
	background: #0F2229;
	color: #FFFFFF;
}
#calendrier .skm-topbar__fleche.is-disabled { opacity: .3; }
#calendrier .skm-topbar__aujourdhui {
	font-size: 14px;
	font-weight: 600;
	color: #F61B38;
	text-decoration: underline;
}

/* --- A. Grille mobile : une couleur par jour ----------------------------- */
#calendrier .tribe-events-view--month:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-month__day {
	padding: 3px !important; /* écrase le padding de common.css */
	vertical-align: top;
}
#calendrier .tribe-events-view--month:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-month__week {
	border-bottom: none !important;
}
#calendrier .tribe-events-view--month:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-month__day-cell--mobile {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	aspect-ratio: 1 / 1;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background-color: var(--skm-bg, #FFFFFF);
	color: #0F2229;
	cursor: pointer;
	transition: box-shadow .15s ease, transform .15s ease;
}
/* Barre de couleur au bas de la case */
#calendrier .tribe-events-view--month:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-month__day-cell--mobile::after {
	content: "";
	position: absolute;
	left: 22%;
	right: 22%;
	bottom: 6px;
	height: 4px;
	border-radius: 2px;
	background: var(--skm-c, transparent);
}
#calendrier .tribe-events-view--month:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-month__day-cell--mobile.skm-etat--aucun::after { display: none; }
/* Fermé : chiffre gris et hachures légères */
#calendrier .tribe-events-view--month:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-month__day-cell--mobile.skm-etat--ferme {
	color: #9DA4A7;
	background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(15, 34, 41, .05) 6px 8px);
}
#calendrier .tribe-events-view--month:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-month__day-cell--mobile .tribe-events-calendar-month__day-date {
	margin: 0 0 4px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1;
	color: inherit !important; /* écrase le gris de common.css */
}
#calendrier .tribe-events-view--month:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-month__day-cell--mobile .tribe-events-calendar-month__day-date * {
	color: inherit !important;
}
/* Les points de The Events Calendar ne sont plus nécessaires */
#calendrier .tribe-events-view--month:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-month__mobile-events-icon {
	display: none !important;
}
/* Jours passés et jours des mois voisins atténués */
#calendrier .tribe-events-view--month:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-month__day--past .tribe-events-calendar-month__day-cell--mobile {
	opacity: .55;
}
#calendrier .tribe-events-view--month:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-month__day--other-month .tribe-events-calendar-month__day-cell--mobile {
	opacity: .3;
}
/* Aujourd'hui : contour rouge */
#calendrier .tribe-events-view--month:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-month__day--current .tribe-events-calendar-month__day-cell--mobile {
	box-shadow: inset 0 0 0 2px #F61B38;
}
/* Jour sélectionné : contour foncé */
#calendrier .tribe-events-view--month:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-month__day-cell--mobile.skm-selection {
	opacity: 1;
	box-shadow: 0 0 0 3px #0F2229;
	transform: scale(1.04);
	z-index: 1;
}
#calendrier .tribe-events-view--month:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-month__day-cell--mobile:focus-visible {
	outline: 3px solid #F61B38;
	outline-offset: 2px;
}

/* --- B. Sous la grille (mobile) ------------------------------------------ */
#calendrier .skm-horaires {
	margin-top: 20px;
	padding: 0;
	background: none;
	border: 0;
}
#calendrier .skm-legende {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
	font-size: 14px;
	color: #4D6770;
}
#calendrier .skm-legende__item {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0;
}
#calendrier .skm-legende__item::before { display: none; }

#calendrier .skm-carte {
	display: none;
	margin: 0 0 8px;
	padding: 16px 18px;
	border-radius: 16px;
	border-left: 6px solid var(--skm-c, #D5D9DB);
	background: var(--skm-bg, #F4F4F4);
}
#calendrier .skm-carte.is-visible { display: block; }
#calendrier .skm-carte.skm-etat--aucun { background: #F4F4F4; }
#calendrier .skm-carte__date {
	margin: 0 0 4px;
	font-size: 18px;
	font-weight: 700;
	color: #0F2229;
}
#calendrier .skm-carte__statut {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #0F2229;
}
#calendrier .skm-aide {
	margin: 0 0 26px;
	font-size: 13px;
	color: #9DA4A7;
}

#calendrier .skm-liste__titre {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 700;
	color: #0F2229;
}
#calendrier .skm-liste {
	margin: 0;
	padding: 0;
	list-style: none;
}
#calendrier .skm-periode {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #EDEDED;
}
#calendrier .skm-periode::before { display: none; }
#calendrier .skm-periode__bouton {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 12px 10px;
	border: 0;
	border-radius: 10px;
	background: none;
	font: inherit;
	font-size: 16px;
	text-align: left;
	color: #0F2229;
	cursor: pointer;
	transition: background-color .2s ease;
}
#calendrier .skm-periode__dates { flex: 1; }
#calendrier .skm-periode__heures {
	font-weight: 700;
	white-space: nowrap;
}
#calendrier .skm-periode.skm-etat--ferme .skm-periode__bouton { color: #9DA4A7; }
#calendrier .skm-periode.is-active .skm-periode__bouton { background: var(--skm-bg, #F4F4F4); }
#calendrier .skm-periode.is-active.skm-etat--ferme .skm-periode__bouton { color: #4D6770; }
