/*
 * Greativa formation calendar widget.
 * Override --gfc-accent (e.g. from Elementor custom CSS) to match the brand.
 */
.gfc-calendar {
	--gfc-accent: #f55516;
	--gfc-accent-soft: rgba(245, 85, 22, 0.12);
	--gfc-event: #2563eb;
	--gfc-event-soft: rgba(37, 99, 235, 0.12);
	--gfc-text: #212327;
	--gfc-muted: #757c8e;
	--gfc-border: #e3e5eb;
	--gfc-bg: #ffffff;
	--gfc-radius: 12px;

	display: grid;
	gap: 24px;
	color: var(--gfc-text);
	font-size: 15px;
	line-height: 1.4;
}

/* Column header row: legend (over the calendar) and the list title sit on the
   same line, so the calendar and the cards below them start at the same level. */
.gfc-col-head,
.gfc-legend,
.gfc-list-title {
	min-height: 30px;
	margin: 0 0 14px;
	display: flex;
	align-items: center;
}

.gfc-legend {
	flex-wrap: wrap;
	gap: 18px;
}

.gfc-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	font-weight: 600;
	color: var(--gfc-muted);
}

.gfc-legend-item .gfc-dot {
	margin-top: 0;
}

@media (max-width: 767px) {
	/* No need to reserve the empty header when columns stack. */
	.gfc-col-head {
		display: none;
	}
}

.gfc-calendar.gfc-view-both {
	grid-template-columns: minmax(280px, 420px) 1fr;
	align-items: start;
}

@media (max-width: 767px) {
	.gfc-calendar.gfc-view-both {
		grid-template-columns: 1fr;
	}
}

/* ---- Month grid ---- */

.gfc-grid-wrap {
	background: var(--gfc-bg);
	border: 1px solid var(--gfc-border);
	border-radius: var(--gfc-radius);
	padding: 16px;
}

.gfc-grid-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.gfc-month-label {
	font-weight: 600;
	font-size: 16px;
}

.gfc-nav {
	appearance: none;
	background: transparent;
	border: 1px solid var(--gfc-border);
	border-radius: 8px;
	width: 32px;
	height: 32px;
	font-size: 18px;
	line-height: 1;
	color: var(--gfc-text);
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.gfc-nav:hover {
	background: var(--gfc-accent-soft);
	border-color: var(--gfc-accent);
}

.gfc-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.gfc-weekday {
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--gfc-muted);
	padding: 4px 0;
}

.gfc-day {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
}

.gfc-day-num {
	font-size: 13px;
}

.gfc-today .gfc-day-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 1.5px solid var(--gfc-accent);
	font-weight: 600;
}

/* Type-neutral highlight so both orange and blue dots stay readable. */
a.gfc-day.gfc-has-event {
	background: rgba(0, 0, 0, 0.045);
	font-weight: 600;
	transition: background 0.15s ease;
}

a.gfc-day.gfc-has-event:hover {
	background: rgba(0, 0, 0, 0.09);
}

.gfc-dots {
	display: flex;
	gap: 3px;
	margin-top: 2px;
	min-height: 5px;
}

.gfc-dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--gfc-accent);
}

.gfc-dot-event {
	background: var(--gfc-event);
}

/* ---- Upcoming list ---- */

.gfc-list-title {
	font-size: 20px;
	font-weight: 700;
}

.gfc-no-events {
	color: var(--gfc-muted);
	margin: 0;
}

.gfc-item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
	margin-bottom: 10px;
	background: var(--gfc-bg);
	border: 1px solid var(--gfc-border);
	border-radius: var(--gfc-radius);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gfc-item:hover {
	border-color: var(--gfc-accent);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.gfc-item-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 54px;
	padding: 8px 6px;
	border-radius: 10px;
	background: var(--gfc-accent-soft);
	color: var(--gfc-accent);
}

/* Events Calendar items in blue. */
.gfc-item.gfc-type-event .gfc-item-date {
	background: var(--gfc-event-soft);
	color: var(--gfc-event);
}

.gfc-item.gfc-type-event:hover {
	border-color: var(--gfc-event);
}

.gfc-item.gfc-type-event:hover .gfc-item-arrow {
	color: var(--gfc-event);
}

.gfc-item-day {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.1;
}

.gfc-item-month {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Multi-day formation: little "+" on the date badge. */
.gfc-item-plus {
	font-size: 10px;
	vertical-align: super;
	margin-left: 1px;
}

.gfc-item-date-range {
	position: relative;
}

.gfc-item-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	min-width: 0;
}

/* Type badge (Formation / Événement) — shown when both types are present. */
.gfc-badge {
	display: inline-block;
	margin-bottom: 3px;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	background: var(--gfc-accent-soft);
	color: var(--gfc-accent);
}

.gfc-badge-event {
	background: var(--gfc-event-soft);
	color: var(--gfc-event);
}

.gfc-item-title {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gfc-item-full-date {
	font-size: 13px;
	color: var(--gfc-muted);
}

.gfc-item-arrow {
	margin-left: auto;
	color: var(--gfc-muted);
	transition: transform 0.15s ease, color 0.15s ease;
}

.gfc-item:hover .gfc-item-arrow {
	color: var(--gfc-accent);
	transform: translateX(3px);
}
