/**
 * Ligne d'agenda – Collectif Io
 *
 * Ces classes sont à poser sur les widgets du Loop Item Elementor (onglet
 * Avancé > CSS Classes), un widget par élément de la carte :
 *
 *   - conteneur du Loop Item (Container)        -> io-agenda-row
 *   - widget affichant [io_date]                -> io-agenda-date
 *   - widget affichant [io_titre]                -> io-agenda-titre
 *   - widget affichant [io_lieu]                 -> io-agenda-lieu
 *   - widget Shortcode [io_lien_savoir_plus]     -> (classe déjà posée par le shortcode)
 *   - widget Shortcode [io_lien_reserver]        -> (classe déjà posée par le shortcode)
 *
 * Couleurs : variables globales du kit Elementor (--e-global-color-*),
 * avec la même valeur que le kit en repli si le kit n'est pas chargé.
 * Police : Elementor n'expose pas de variable CSS pour les polices globales
 * (le CSS personnalisé du kit lui-même les code en dur) – Barlow Condensed
 * est donc écrit explicitement, comme le fait le reste du site.
 */

.io-agenda-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem 2rem;
	padding-block: 1.5rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.15);
	font-family: 'Barlow Condensed', sans-serif;
}

.io-agenda-row:first-child {
	border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.io-agenda-date {
	flex: 0 0 auto;
	font-weight: 600;
	color: #fff;
	background-color:  var(--e-global-color-accent );
	padding:5px; 
	margin: 0;
}

.io-agenda-titre {
	flex: 1 1 260px;
	font-weight: 700;
	color: var(--e-global-color-accent );
	margin: 0;
	font-size:1.875rem;
	text-transform: uppercase;
}

.io-agenda-lieu {
	flex: 0 0 auto;
	color: var(--e-global-color-primary);
	margin: 0;
	font-weight:600;
}

a.io-agenda-lien {
	flex: 0 0 auto;
	display: inline-block;
	white-space: nowrap;
	font-size:1.2rem;
	font-weight:400;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}




/*
 * Bouton « Ajouter à mon agenda » : <details>/<summary> natifs, aucun JS.
 * Le clic sur le bouton déplie un petit menu (Google Agenda / .ics) sous
 * forme de carte, dans les couleurs du site plutôt qu'avec les logos
 * Google/Outlook/Apple.
 */
.io-agenda-calendrier {
	position: relative;
	flex: 0 0 auto;
}

a.io-agenda-lien-reserver {
	background-color: var(--e-global-color-accent);
	color:#fff !important;
	padding:5px 8px;
	border:1px solid var(--e-global-color-accent);
}

.io-agenda-calendrier__bouton {
	display: inline-block;
	font-size:1.2rem;
	list-style: none;
	cursor: pointer;
	padding: 4px;
	white-space: nowrap;
	color: var(--e-global-color-primary, #000000);
	transition: color 0.2s ease, background-color 0.2s ease;
	border:1px solid #000000;
	padding:5px 8px;
}

.io-agenda-calendrier__bouton::-webkit-details-marker {
	display: none;
}

.io-agenda-calendrier[open] > .io-agenda-calendrier__bouton,
.io-agenda-calendrier__bouton:hover,
.io-agenda-calendrier__bouton:focus {
	background-color: var(--e-global-color-primary, #000000);
	color: #fff;
}

.io-agenda-calendrier__menu {
	position: absolute;
	top: calc(100% + 0.5rem);
	left: 0;
	z-index: 10;
	display: flex;
	flex-direction: column;
	min-width: 220px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	overflow: hidden;
}

.io-agenda-calendrier__lien {
	padding: 12px 20px;
	color: var(--e-global-color-primary, #000000);
	text-decoration: none;
	font-weight: 600;
	white-space: nowrap;
	transition: background-color 0.2s ease;
}

.io-agenda-calendrier__lien:hover,
.io-agenda-calendrier__lien:focus {
	background-color: rgba(0, 0, 0, 0.05);
	color: var(--e-global-color-accent, #58137A);
}

@media (max-width: 767px) {
	.io-agenda-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
		padding-block: 1.25rem;
	}

	.io-agenda-titre,
	.io-agenda-lieu,
	a.io-agenda-lien,
	.io-agenda-calendrier {
		width: 100%;
		white-space: normal;
	}

	.io-agenda-lieu {
		font-weight:600;
	}


	.io-agenda-calendrier__bouton {
		display: block;
		text-align: center;
	}

	.io-agenda-calendrier__menu {
		left: 0;
		right: 0;
		min-width: 0;
	}
}

