/* ============================================================
   ELC Événements — Styles responsive
   ============================================================ */

.elc-events-wrapper {
	--elc-base-bubble: 190px; /* taille de base, ajustée par les media queries responsive */
	--elc-scale-calendar: 1;  /* multiplicateur défini par le réglage "Taille des logos - Planning" */
	--elc-scale-passes: 1;    /* multiplicateur défini par le réglage "Taille des logos - Événements passés" */
	--elc-bubble-calendar: calc(var(--elc-base-bubble) * var(--elc-scale-calendar));
	--elc-bubble-passes: calc(var(--elc-base-bubble) * var(--elc-scale-passes));
	--elc-gap: 32px;
	--elc-text-color: #ffffff;
	width: 100%;
	box-sizing: border-box;
	padding: 40px 20px;
}

.elc-events-wrapper * {
	box-sizing: border-box;
}

.elc-events-section {
	margin-bottom: 56px;
}

.elc-events-section:last-child {
	margin-bottom: 0;
}

.elc-events-section.has-bg {
	border-radius: 16px;
	padding: 28px 16px;
}

.elc-events-title {
	text-align: center;
	font-size: clamp(1.4rem, 3vw, 2.1rem);
	font-weight: 600;
	color: var(--elc-text-color);
	margin: 0 0 6px 0;
	letter-spacing: 0.5px;
}

.elc-events-subtitle {
	text-align: center;
	font-size: 0.8rem;
	letter-spacing: 1px;
	color: var(--elc-text-color);
	opacity: 0.9;
	margin: 0 0 32px 0;
	text-transform: uppercase;
}

.elc-events-passed .elc-events-title {
	margin-bottom: 32px;
}

/* ============================================================
   Mini calendrier du mois — vue d'ensemble compacte au-dessus
   du planning détaillé, sans images (points ou titre seulement).
   Activable dans Réglages.
   ============================================================ */
.elc-mini-cal {
	max-width: 1200px;
	margin: 0 auto 32px;
	padding: 0 44px;
	transition: opacity 0.2s ease;
}

.elc-mini-cal-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-bottom: 10px;
}

.elc-mini-cal-arrow {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.2);
	color: var(--elc-text-color);
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.elc-mini-cal-arrow:hover {
	background: rgba(255, 255, 255, 0.35);
}

.elc-mini-cal-header {
	text-align: center;
	color: var(--elc-text-color);
	font-weight: 600;
	text-transform: capitalize;
	font-size: 1rem;
	min-width: 140px;
}

/* ============================================================
   Zoom du mini calendrier : boutons loupe +/- (desktop) et
   pincement à deux doigts (mobile). Au lieu d'un zoom visuel continu,
   le zoom réduit par palier le NOMBRE DE JOURS affichés (31 → 21 → 14
   → 7 → 3, centré sur aujourd'hui), ce qui agrandit naturellement
   chaque case et chaque image puisqu'il y en a moins à la fois.
   ============================================================ */
.elc-mini-cal-zoom-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 10px;
	margin-bottom: 10px;
}

.elc-mini-cal-zoom-btn {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.25);
	color: var(--elc-text-color);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.elc-mini-cal-zoom-btn:hover {
	background: rgba(255, 255, 255, 0.4);
}

.elc-mini-cal-zoom-btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.elc-mini-cal-zoom-icon {
	font-size: 13px;
	opacity: 0.8;
}

.elc-mini-cal-zoom-label {
	font-size: 0.68rem;
	opacity: 0.75;
	color: var(--elc-text-color);
	margin-left: 4px;
}

/* Petit texte d'aide expliquant qu'on peut cliquer un jour pour affiner le zoom */
.elc-mini-cal-zoom-hint {
	font-size: 0.66rem;
	font-style: italic;
	opacity: 0.7;
	color: var(--elc-text-color);
	text-align: center;
}

.elc-mini-cal-zoom-wrap {
	overflow-x: auto;
	overflow-y: visible;
	max-width: 100%;
	/* Empêche le pincement natif du navigateur sur cette zone : c'est notre
	   propre script qui gère le geste, pour ne zoomer que le calendrier. */
	touch-action: pan-x pan-y;
}

.elc-mini-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 5px;
}

/* État "zoomé" (desktop) : la grille devient une seule ligne défilable de N
   jours (au lieu de la grille du mois complet), chaque jour prenant une part
   égale de la largeur disponible — donc plus grand qu'en vue complète. */
.elc-mini-cal-grid.is-zoomed-flex {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
}

.elc-mini-cal-grid.is-zoomed-flex .elc-mini-cal-cell {
	flex: 1 1 0;
	min-width: 58px;
}

/* État "zoomé" sur mobile : on remplit toute la largeur en plusieurs lignes
   de 7 colonnes maximum, plutôt que de défiler horizontalement.
   21 jours → 3 lignes de 7 · 14 jours → 2 lignes de 7 · 7 jours → 1 ligne de 7
   3 jours → 1 ligne de 3 (chaque case s'élargit pour occuper toute la largeur). */
.elc-mini-cal-grid.is-zoomed-flex.is-zoomed-mobile-wrap {
	flex-wrap: wrap;
	justify-content: center;
}

.elc-mini-cal-grid.is-zoomed-flex.is-zoomed-mobile-wrap .elc-mini-cal-cell {
	flex: 0 0 calc((100% - (var(--elc-zoom-cols, 7) - 1) * 8px) / var(--elc-zoom-cols, 7));
	min-width: 0;
}

.elc-mini-cal.is-zoomed .elc-mini-cal-headcell {
	display: none;
}

/* Plus on zoome (moins de jours affichés), plus les vignettes grandissent. */
.elc-mini-cal.is-zoomed .elc-mini-cal-thumb {
	width: 46px;
	height: 46px;
}

.elc-mini-cal.elc-mini-cal-zoom-3 .elc-mini-cal-thumb,
.elc-mini-cal.elc-mini-cal-zoom-4 .elc-mini-cal-thumb {
	width: 64px;
	height: 64px;
}

.elc-mini-cal.is-zoomed .elc-mini-cal-daynum {
	font-size: 0.85rem;
}

.elc-mini-cal.is-zoomed .elc-mini-cal-event-label {
	font-size: 0.68rem;
}

.elc-mini-cal-headcell {
	text-align: center;
	font-size: 0.65rem;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--elc-text-color);
	opacity: 0.7;
	padding-bottom: 4px;
}

.elc-mini-cal-cell {
	aspect-ratio: 1 / 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.09);
	color: var(--elc-text-color);
	font-size: 0.75rem;
	position: relative;
	padding: 4px 2px 2px;
	box-sizing: border-box;
}

.elc-mini-cal-cell.is-empty {
	background: transparent;
}

.elc-mini-cal-cell.is-today {
	box-shadow: inset 0 0 0 2px var(--elc-text-color);
}

/* Case choisie comme centre du prochain zoom (clic ou endroit du pincement) */
.elc-mini-cal-cell.is-zoom-focus {
	box-shadow: inset 0 0 0 2px var(--elc-mini-dot-color, #ff5252);
}

.elc-mini-cal-cell.has-event {
	background: rgba(255, 255, 255, 0.24);
	font-weight: 700;
}

.elc-mini-cal-cell.has-event {
	cursor: pointer;
}

.elc-mini-cal-dot {
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--elc-mini-dot-color, #ff5252);
	margin-top: 3px;
}

.elc-mini-cal-dot.is-pulse {
	animation: elc-mini-cal-dot-pulse 1.6s ease-in-out infinite;
}

@keyframes elc-mini-cal-dot-pulse {
	0%, 100% {
		transform: scale(1);
		opacity: 1;
	}
	50% {
		transform: scale(var(--elc-dot-pulse-scale, 1.8));
		opacity: 0.55;
	}
}

@media (prefers-reduced-motion: reduce) {
	.elc-mini-cal-dot.is-pulse {
		animation: none;
	}
}

/* La pastille reste désormais visible en permanence, y compris en style "titre",
   pour un effet qui attire l'œil en plus du texte. */

/* Lettre du jour affichée dans chaque case en disposition "deux lignes"
   (les colonnes n'y sont pas alignées par jour de semaine, donc pas d'en-tête commun).
   En grille classique, l'en-tête de colonne suffit donc on la masque — sauf en
   mode zoomé, où l'alignement des colonnes n'est plus fiable (voir plus bas). */
.elc-mini-cal-weekday-letter {
	display: block;
	font-size: 0.55rem;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--elc-text-color);
	opacity: 0.7;
	line-height: 1;
	margin-bottom: 2px;
}

.elc-mini-cal-layout-semaine .elc-mini-cal-weekday-letter {
	display: none;
}

.elc-mini-cal.is-zoomed .elc-mini-cal-weekday-letter {
	display: block;
}

/* Ligne regroupant le numéro du jour et le point vert côte à côte, toujours
   visible en haut de la case même quand une image est ajoutée en dessous. */
.elc-mini-cal-daynum-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
}

.elc-mini-cal-daynum-row .elc-mini-cal-dot {
	margin-top: 0;
}

/* Séparateur visuel entre les semaines, disposition "deux lignes" du mini calendrier
   (une bordure après chaque dimanche, pour repérer facilement où commence une semaine). */
.elc-mini-cal-layout-deux_lignes .elc-mini-cal-cell.elc-mini-cal-week-end {
	border-right: 2px dashed rgba(255, 255, 255, 0.55);
	padding-right: 4px;
}

/* Style "petite image" : une vignette de l'événement directement dans la case,
   plus facile à reconnaître d'un coup d'œil qu'un simple point. S'il y a deux
   événements le même jour, les deux vignettes s'empilent verticalement (l'une
   au-dessus de l'autre) en gardant la même taille — c'est la case du jour qui
   s'agrandit pour les contenir, ce qui augmente aussi la hauteur de toute la
   ligne du mini calendrier (comportement normal d'une grille).             */
.elc-mini-cal-thumb-row {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	margin-top: 2px;
}

.elc-mini-cal-thumb {
	display: block;
	width: 36px;
	height: 36px;
	object-fit: contain;
	flex-shrink: 0;
}

.elc-mini-cal-thumb-more {
	display: block;
	font-size: 0.55rem;
	font-weight: 700;
	color: var(--elc-text-color);
	opacity: 0.85;
	margin-top: 1px;
}

.elc-mini-cal-style-image .elc-mini-cal-cell {
	aspect-ratio: auto;
	min-height: 68px;
}

/* Style "titre" : cases un peu plus hautes pour laisser la place au texte */
.elc-mini-cal-style-titre .elc-mini-cal-cell {
	aspect-ratio: auto;
	min-height: 54px;
}

/* Disposition "deux lignes" : cases un peu plus hautes pour la lettre du jour ajoutée */
.elc-mini-cal-layout-deux_lignes .elc-mini-cal-cell {
	aspect-ratio: auto;
	min-height: 48px;
}

.elc-mini-cal-event-label {
	font-size: 0.55rem;
	font-weight: 600;
	line-height: 1.1;
	text-align: center;
	margin-top: 3px;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding: 0 2px;
}

/* Légende explicative sous le mini calendrier, sur toutes les tailles d'écran */
.elc-mini-cal-legend {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 14px;
}

.elc-mini-cal-legend-dot {
	margin-top: 0;
	flex-shrink: 0;
}

.elc-mini-cal-legend-text {
	font-size: 0.75rem;
	color: var(--elc-text-color);
	opacity: 0.85;
	text-align: center;
}

/* ============================================================
   Popup affichée au clic sur un jour du mini calendrier :
   montre l'image (et le nom) du ou des événements de ce jour.
   ============================================================ */
.elc-mini-cal-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.elc-mini-cal-popup {
	background: #fff;
	border-radius: 12px;
	max-width: 420px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	padding: 24px;
	position: relative;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.elc-mini-cal-popup-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #666;
}

.elc-mini-cal-popup-day {
	font-weight: 700;
	font-size: 1.1rem;
	text-align: center;
	margin: 0 0 16px;
	text-transform: capitalize;
	color: inherit;
}

.elc-mini-cal-popup-event {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-bottom: 18px;
}

.elc-mini-cal-popup-event:last-child {
	margin-bottom: 0;
}

.elc-mini-cal-popup-event img {
	width: 140px;
	height: 140px;
	object-fit: contain;
	display: block;
	margin: 0 auto 8px;
}

.elc-mini-cal-popup-event-title {
	font-weight: 600;
	font-size: 0.95rem;
	color: inherit;
}

/* Bouton "Informations / Réservation" sous l'image, dans la popup — toute la
   zone (image + titre + bouton) est cliquable et mène au lien du produit. */
.elc-mini-cal-popup-cta {
	display: inline-block;
	margin-top: 10px;
	padding: 7px 16px;
	background: #ff5252;
	color: #fff;
	border-radius: 20px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.3px;
	transition: filter 0.2s ease, transform 0.2s ease;
}

.elc-mini-cal-popup-event a:hover .elc-mini-cal-popup-cta {
	filter: brightness(0.9);
	transform: translateY(-1px);
}

/* Le conteneur interne (image + titre) est toujours centré de la même façon,
   qu'un lien produit soit renseigné ou non — évite tout décalage à gauche. */
.elc-mini-cal-popup-event-inner,
.elc-mini-cal-popup-event a {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	text-decoration: none;
	color: inherit;
}

.elc-mini-cal-popup-event a:hover .elc-mini-cal-popup-event-title {
	color: #2271b1;
	text-decoration: underline;
}

/* ============================================================
   Bulle logo — taille indépendante pour le calendrier et pour "passés"
   (réglable séparément dans Réglages : très petite à très grande).
   Les images sont affichées EN ENTIER, sans recadrage (object-fit: contain) :
   beaucoup de badges ont volontairement des éléments qui dépassent d'un
   cercle parfait (texte, effets), on ne les coupe donc plus.
   ============================================================ */
.elc-event-bubble {
	display: block;
	width: var(--elc-bubble-passes);
	height: var(--elc-bubble-passes);
	background: transparent;
	transition: transform 0.25s ease, filter 0.25s ease;
}

/* Dans le calendrier, la bulle utilise le réglage de taille "Planning" */
.elc-cal-event .elc-event-bubble {
	width: var(--elc-bubble-calendar);
	height: var(--elc-bubble-calendar);
}

.elc-event-bubble img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: filter 0.3s ease;
}

/* Option "noir et blanc" pour la zone Événements passés (activable dans Réglages) */
.elc-passes-nb .elc-event-bubble img {
	filter: grayscale(100%);
}

.elc-passes-nb .elc-event-link:hover .elc-event-bubble img,
.elc-passes-nb .elc-event-item:has(.elc-event-link:hover) .elc-event-bubble img {
	filter: grayscale(0%);
}

.elc-event-link {
	display: block;
	text-decoration: none;
	cursor: pointer;
}

.elc-event-link:hover .elc-event-bubble,
.elc-event-item:has(.elc-event-link:hover) .elc-event-bubble,
.elc-cal-event:has(.elc-event-link:hover) .elc-event-bubble {
	transform: translateY(-6px) scale(1.05);
	filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

.elc-event-recurrence-note {
	margin-top: 2px;
	font-size: 0.72rem;
	font-style: italic;
	color: var(--elc-text-color);
	opacity: 0.85;
	text-align: center;
}

.elc-events-empty {
	color: var(--elc-text-color);
	opacity: 0.85;
	font-style: italic;
	text-align: center;
	width: 100%;
}

/* ============================================================
   Grille classique "Événements passés" (mode par défaut)
   Tous les logos utilisent la même taille de boîte (--elc-bubble-passes),
   et object-fit: contain garantit que l'image complète reste visible
   sans recadrage, quel que soit son format d'origine.
   ============================================================ */
.elc-events-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	gap: var(--elc-gap);
	max-width: 1200px;
	margin: 0 auto;
}

.elc-event-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: var(--elc-bubble-passes);
}

/* ============================================================
   Mode alternatif "Événements passés" : bandeau défilant automatique
   Activer avec [elc_evenements mode_passes="marquee" lignes_marquee="2"]
   ============================================================ */
.elc-marquee-wrap {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
	max-width: 1300px;
	margin: 0 auto;
}

.elc-marquee-row {
	overflow: hidden;
	width: 100%;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.elc-marquee-track {
	display: flex;
	align-items: center;
	gap: var(--elc-gap);
	width: max-content;
	animation: elc-marquee-scroll var(--elc-marquee-duration, 30s) linear infinite;
}

.elc-marquee-row.dir-right .elc-marquee-track {
	animation-direction: reverse;
}

.elc-marquee-row:hover .elc-marquee-track {
	animation-play-state: paused;
}

.elc-marquee-item {
	flex: 0 0 auto;
}

@keyframes elc-marquee-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.elc-marquee-track {
		animation: none;
	}
}

/* ============================================================
   Calendrier "Prochains événements" (14 jours glissants)
   Une ou deux lignes défilables (réglage "Disposition"), avec
   flèches de navigation et barre de défilement invisible (le
   glissement tactile / souris reste actif).
   ============================================================ */
.elc-cal-scroll-wrap {
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
}

.elc-cal-scroll-wrap + .elc-cal-scroll-wrap {
	margin-top: 16px;
}

.elc-events-calendar {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	overflow-x: auto;
	padding: 4px 44px 16px;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;     /* Firefox : masque la barre de défilement */
	-ms-overflow-style: none;  /* Edge/IE legacy */
}

.elc-events-calendar::-webkit-scrollbar {
	display: none; /* Chrome / Safari : masque la barre de défilement */
	height: 0;
}

.elc-cal-day {
	flex: 0 0 calc((100% - (var(--elc-days-visible, 7) - 1) * 14px) / var(--elc-days-visible, 7));
	scroll-snap-align: start;
	background: rgba(255, 255, 255, 0.16);
	border-radius: 14px;
	padding: 12px 8px 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: calc(var(--elc-bubble-calendar) + 90px);
	box-sizing: border-box;
}

.elc-cal-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: background 0.2s ease;
}

.elc-cal-arrow:hover {
	background: rgba(0, 0, 0, 0.55);
}

.elc-cal-arrow--prev {
	left: 0;
}

.elc-cal-arrow--next {
	right: 0;
}

.elc-cal-day.is-empty {
	opacity: 0.5;
}

.elc-cal-day-head {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 6px;
	text-align: center;
	margin-bottom: 12px;
}

/* Cases sans événement : pas besoin de gagner de la place pour une image,
   donc on laisse le nom du jour passer sur deux lignes plutôt que le couper. */
.elc-cal-day.is-empty .elc-cal-day-head {
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.elc-cal-weekday {
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--elc-text-color);
	opacity: 0.85;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.elc-cal-day.is-empty .elc-cal-weekday {
	white-space: normal;
	overflow: visible;
	text-overflow: unset;
	line-height: 1.2;
}

.elc-cal-daynum {
	font-size: 1rem;
	font-weight: 700;
	color: var(--elc-text-color);
	text-transform: capitalize;
}

.elc-cal-day-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center;
	flex: 1;
	justify-content: center;
	width: 100%;
}

.elc-cal-event {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.elc-cal-event-title {
	margin-top: 8px;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--elc-text-color);
	text-align: center;
	line-height: 1.15;
	max-width: calc(var(--elc-bubble-calendar) + 20px);
}

.elc-cal-day .elc-event-recurrence-note {
	font-size: 0.65rem;
	margin-top: 2px;
}

/* ============================================================
   Réduction automatique des logos quand plusieurs événements
   tombent le même jour dans le calendrier (2 événements = plus
   petit, 3 événements ou plus = encore plus petit) — aucun
   réglage requis, ça s'ajuste tout seul.
   ============================================================ */
.elc-cal-day-body:has(.elc-cal-event:nth-child(2)) {
	gap: 4px;
}

.elc-cal-day-body:has(.elc-cal-event:nth-child(2)) .elc-event-bubble {
	width: calc(var(--elc-bubble-calendar) * 0.65);
	height: calc(var(--elc-bubble-calendar) * 0.65);
}

.elc-cal-day-body:has(.elc-cal-event:nth-child(2)) .elc-cal-event-title {
	margin-top: 4px;
	font-size: 0.66rem;
}

.elc-cal-day-body:has(.elc-cal-event:nth-child(2)) .elc-event-recurrence-note {
	font-size: 0.58rem;
}

.elc-cal-day-body:has(.elc-cal-event:nth-child(3)) .elc-event-bubble {
	width: calc(var(--elc-bubble-calendar) * 0.45);
	height: calc(var(--elc-bubble-calendar) * 0.45);
}

.elc-cal-day-body:has(.elc-cal-event:nth-child(3)) .elc-cal-event-title {
	font-size: 0.58rem;
}

/* ============================================================
   Responsive
   Seule la taille de BASE change par palier d'écran ; les
   multiplicateurs de taille (réglages) restent proportionnellement
   les mêmes, donc "grande" reste toujours plus grande que "petite"
   à n'importe quelle largeur d'écran.
   ============================================================ */

/* Tablette */
@media (max-width: 900px) {
	.elc-events-wrapper {
		--elc-base-bubble: 150px;
		--elc-gap: 24px;
		padding: 32px 16px;
	}

	/* Sécurité responsive : quel que soit le nombre de "jours visibles" choisi dans
	   les Réglages (jusqu'à 14), on plafonne l'affichage simultané pour garantir
	   des cases lisibles sur tablette — le reste des jours reste accessible via
	   les flèches ou en glissant. */
	.elc-cal-scroll-wrap {
		--elc-days-visible: min(var(--elc-days-visible-setting), 5) !important;
	}
}

/* Mobile large */
@media (max-width: 600px) {
	.elc-events-wrapper {
		--elc-base-bubble: 110px;
		--elc-gap: 18px;
		padding: 28px 12px;
	}

	/* Plafond plus strict sur mobile : 3 jours visibles maximum à la fois, pour
	   garantir des cases toujours lisibles et cliquables, quel que soit le réglage
	   choisi côté admin. */
	.elc-cal-scroll-wrap {
		--elc-days-visible: min(var(--elc-days-visible-setting), 3) !important;
	}

	.elc-events-title {
		font-size: 1.3rem;
	}

	.elc-events-subtitle {
		font-size: 0.7rem;
		padding: 0 10px;
	}

	.elc-cal-day {
		min-height: calc(var(--elc-bubble-calendar) + 80px);
		padding: 10px 6px 12px;
	}

	.elc-events-calendar {
		padding: 4px 36px 16px;
	}

	.elc-cal-arrow {
		width: 30px;
		height: 30px;
		font-size: 1.2rem;
	}

	.elc-cal-event-title {
		font-size: 0.7rem;
	}

	.elc-mini-cal {
		max-width: 100%;
		padding: 0 36px;
	}

	.elc-mini-cal-grid {
		gap: 3px;
	}

	.elc-mini-cal-cell {
		font-size: 0.65rem;
		min-height: 34px; /* garantit une zone tactile minimale, même en grille classique */
	}

	/* Mode "deux lignes" : beaucoup plus de colonnes, donc zone tactile minimale
	   garantie même si ça veut dire davantage de lignes affichées sur les petits écrans. */
	.elc-mini-cal-layout-deux_lignes .elc-mini-cal-grid {
		grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)) !important;
	}

	.elc-mini-cal-layout-deux_lignes .elc-mini-cal-cell {
		aspect-ratio: auto;
		min-height: 38px;
	}

	.elc-mini-cal-event-label {
		font-size: 0.48rem;
	}

	.elc-mini-cal-dot {
		width: 5px;
		height: 5px;
	}

	.elc-mini-cal-dot.is-pulse {
		--elc-dot-pulse-scale: 1.3;
	}

	.elc-mini-cal-thumb {
		width: 26px;
		height: 26px;
	}

	.elc-mini-cal-thumb-more {
		font-size: 0.48rem;
	}

	.elc-mini-cal-zoom-hint {
		flex-basis: 100%;
	}

	.elc-mini-cal-legend-text {
		font-size: 0.68rem;
	}

	/* Le texte de la légende passe souvent sur deux lignes sur mobile :
	   on aligne la pastille avec le haut de la première ligne, plutôt que
	   de la centrer sur la hauteur totale des deux lignes. */
	.elc-mini-cal-legend {
		align-items: flex-start;
	}

	.elc-mini-cal-legend-dot {
		margin-top: 4px;
	}

	.elc-mini-cal-style-titre .elc-mini-cal-cell {
		min-height: 42px;
	}

	/* Sur mobile, on masque le titre (même en style "titre") pour éviter tout débordement — la pastille reste toujours visible */
	.elc-mini-cal-style-titre .elc-mini-cal-event-label {
		display: none;
	}
}

/* Mobile étroit */
@media (max-width: 400px) {
	.elc-events-wrapper {
		--elc-base-bubble: 32vw;
		--elc-gap: 14px;
	}
}
