/*
Theme Name: Balafre
Theme URI:
Author: Gary Ka
Author URI:
Description: Thème sur mesure pour Balafre.
Version: 1.0.2
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: balafre
*/



/* ==================================================
   BALAFRE BUTTONS
================================================== */

.balafre-button .wp-block-button__link {
	position: relative;

	display: inline-flex;
	align-items: center;

	padding: 18px 52px 18px 18px;

	border-radius: 999px;

	font-family: var(--wp--preset--font-family--geist);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1;

	text-decoration: none;

	transition:
		transform 180ms ease,
		opacity 180ms ease;
}


/* ==================================================
   COLORS
================================================== */

.balafre-button--primary .wp-block-button__link {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--dark-violet);

	--button-icon-color: var(--wp--preset--color--primary);
}

.balafre-button--yellow .wp-block-button__link {
	background: var(--wp--preset--color--yellow);
	color: var(--wp--preset--color--dark-violet);

	--button-icon-color: var(--wp--preset--color--yellow);
}


/* ==================================================
   ICON CIRCLE
================================================== */

.balafre-button .wp-block-button__link::after {
	content: "";

	position: absolute;
	top: 50%;
	right: 10px;

	width: 28px;
	height: 28px;

	border-radius: 50%;

	background: var(--wp--preset--color--dark-violet);

	transform: translateY(-50%);
}


/* ==================================================
   ICON
================================================== */

.balafre-button .wp-block-button__link::before {
	content: "";

	position: absolute;
	top: 50%;
	right: 17px;

	width: 14px;
	height: 14px;

	z-index: 1;

	background: var(--button-icon-color);

	transform: translateY(-50%);

	-webkit-mask-position: center;
	mask-position: center;

	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;

	-webkit-mask-size: contain;
	mask-size: contain;
}


/* ==================================================
   ICON TYPES
================================================== */

.balafre-button--arrow-ne .wp-block-button__link::before {
	-webkit-mask-image: url("assets/icons/arrow-up-right.svg");
	mask-image: url("assets/icons/arrow-up-right.svg");
}

.balafre-button--arrow-nw .wp-block-button__link::before {
	-webkit-mask-image: url("assets/icons/arrow-up-left.svg");
	mask-image: url("assets/icons/arrow-up-left.svg");
}

.balafre-button--mail .wp-block-button__link::before {
	-webkit-mask-image: url("assets/icons/mail.svg");
	mask-image: url("assets/icons/mail.svg");
}


/* ==================================================
   HOVER
================================================== */

.balafre-button .wp-block-button__link:hover {
	transform: translateY(-2px);
}


/* ==================================================
   EVENT CARD
================================================== */

.event-card {
	width: 100%;
	min-width: 0;
	color: inherit;
}


/* ==================================================
   LINK
================================================== */

.event-card__link {
	display: flex;
	flex-direction: column;
	gap: 16px;
	color: inherit;
	text-decoration: none;
}


/* ==================================================
   CARD MEDIA
================================================== */

.event-card__media {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 30px;
}


.event-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition:
		transform 350ms ease,
		filter 300ms ease;
}


/* ==================================================
   CARD BODY
================================================== */

.event-card__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
}


/* ==================================================
   TITLE
================================================== */

.event-card__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--geist);
	font-size: var(--wp--preset--font-size--card-title);
	font-weight: 900;
	line-height: 1;
	text-transform: uppercase;
}


/* ==================================================
   SEPARATORS
================================================== */

.event-card__separator {
	width: 100%;
	height: 2px;
	background: currentColor;
}


/* ==================================================
   GUEST
================================================== */

.event-card__guest {
	margin: 0;
	line-height: 1.25;
	font-weight:500;
}


/* ==================================================
   META
================================================== */

.event-card__meta {
	display: flex;
	flex-direction:row;
	align-items: flex-end;
	gap: 16px;
}


.event-card__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	line-height: 1.2;
}


.event-card__meta-icon {
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
}


/* ==================================================
   HOVER
================================================== */

.event-card__link:hover .event-card__image {
	transform: scale(1.03);
}


/* ==================================================

   EVENT CARD - PAST

================================================== */

.event-card--past .event-card__image {

	filter: grayscale(1);

}

/* Badge */

.event-card__status {

	position: absolute;
	right: 16px;
	bottom: 16px;
	padding: 8px 14px;
	background: var(--wp--preset--color--yellow);
	color: var(--wp--preset--color--dark-violet);
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--geist);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;

}

/* ==================================================

   EVENT CARD - FEATURED

================================================== */

.event-card--featured .event-card__link {

	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 32px;
	align-items: stretch;

}

.event-card--featured .event-card__media {

	aspect-ratio: auto;
	height: 100%;
	min-height: 420px;

}

.event-card--featured .event-card__body {

	justify-content: flex-start;

}

.event-card--featured .event-card__excerpt {

	margin: 0;
	line-height: 1.4;

}

@media (max-width: 782px) {

	.event-card--featured .event-card__link {
		grid-template-columns: 1fr;
	}
	.event-card--featured .event-card__media {
		min-height: 0;
		aspect-ratio: 4 / 3;
	}

}