/* =========================================================
   AGENDA RESPONSIVE
   ========================================================= */

.tableau_date {
	width: 100%;
	border-collapse: separate;
	border-spacing: 4px;
	table-layout: auto;
	cursor: default;
	background: transparent;
}

/* ---------------------------------------------------------
   TITRE DU MOIS
   --------------------------------------------------------- */

th.tableau_date_annee {
	border: 0;
	background: transparent;
	color: var(--orange-cfer);
	font-size: 1.7rem;
	font-weight: 700;
	padding: 12px 10px;
}

.mois_en_cours_affiche {
	display: inline-block;
}

/* ---------------------------------------------------------
   NAVIGATION MOIS
   --------------------------------------------------------- */

.tableau_date .liens_mois_avant,
.tableau_date .liens_mois_apres {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	width: auto;
	color: color-mix(in srgb, var(--vert-cfer), #FFFFFF 40%);
	background: color-mix(in srgb, var(--vert-cfer), #FFFFFF 90%);
	font-size: 1.2rem;
	font-weight: 500;
	text-decoration: none;
	transition: all .2s ease;
	border: 1px solid color-mix(in srgb, var(--vert-cfer), #FFFFFF 60%);
	padding: 5px 8px;
	border-radius: 10px
}

.tableau_date .liens_mois_avant:hover,
.tableau_date .liens_mois_apres:hover {
	color: var(--vert-cfer);
	background: color-mix(in srgb, var(--vert-cfer), #FFFFFF 85%);
	border: 1px solid;
}

.tableau_date .liens_mois_avant {
	float: left;
}

.tableau_date .liens_mois_apres {
	float: right;
}

/* ---------------------------------------------------------
   JOURS DE LA SEMAINE
   --------------------------------------------------------- */

.tableau_date th:not(.tableau_date_annee) {
	border: 0;
	border-radius: 8px;
	background: color-mix(in srgb, var(--bleu-cfer), #FFFFFF 94%);
	color: color-mix(in srgb, var(--bleu-cfer), #FFFFFF 50%);
	border: 1px solid color-mix(in srgb, var(--bleu-cfer), #FFFFFF 70%);
	height: 38px;
	padding: 5px;
	font-size: 1rem;
	font-weight: 600;
	width: 20%;
}

/* MASQUAGE DES CELLULES SAMEDI (6) ET DIMANCHE (7) */
.tableau_date tr th:nth-child(6),
.tableau_date tr th:nth-child(7),
.tableau_date tr td:nth-child(6),
.tableau_date tr td:nth-child(7) {
	display: none;
}

.jour_court {
	display: none;
}

.jour_long {
	display: inline;
}

/* ---------------------------------------------------------
   CELLULES DES JOURS
   --------------------------------------------------------- */

.tableau_date td {
	position: relative;
	vertical-align: top;
	width: 20%;
	height: 125px;
	padding: 9px;
	border: 1px solid color-mix(in srgb, var(--bleu-cfer), #FFFFFF 80%);
	border-radius: 10px;
	background: color-mix(in srgb, var(--bleu-cfer), #FFFFFF 99%);
	font-size: 1rem;
	cursor: pointer;
	transition:
		transform .15s ease,
		box-shadow .15s ease,
		border-color .15s ease;
}

.tableau_date td:hover {
	border-color: color-mix(in srgb, var(--bleu-cfer), #FFFFFF 30%);
	box-shadow: 0 3px 10px rgba(0,0,0,.08);
	transform: translateY(-1px);
}

/* ---------------------------------------------------------
   NUMERO DU JOUR
   --------------------------------------------------------- */

.contenu_case_jour_date {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 6px;
	border-radius: 50%;
	font-weight: 700;
	color: #444;
}

/* ---------------------------------------------------------
   JOUR ACTUEL
   --------------------------------------------------------- */

.tableau_date .date_du_jour {
	border: 2px solid var(--vert-cfer);
	background: color-mix(in srgb, var(--vert-cfer), #FFFFFF 93%);
}

.date_du_jour .contenu_case_jour_date {
	background: color-mix(in srgb, var(--vert-cfer), #FFFFFF 75%);
	color: var(--vert-cfer);
	padding: 0;
}

/* ---------------------------------------------------------
   JOURS DESACTIVES
   --------------------------------------------------------- */

.tableau_date .date_desactivee {
	background: color-mix(in srgb, var(--bleu-cfer), #FFFFFF 98%);
	border-color: color-mix(in srgb, var(--bleu-cfer), #FFFFFF 85%);
	opacity: .5;
}

/* ---------------------------------------------------------
   WEEK-END / JOUR FERIE
   --------------------------------------------------------- */

td.date_weekend,
td.date_jour_ferie {
	background: color-mix(in srgb, var(--rouge-cfer), #FFFFFF 93%);
	border-color: color-mix(in srgb, var(--rouge-cfer), #FFFFFF 85%);
}

/* ---------------------------------------------------------
   AJOUT D'UNE SESSION
   --------------------------------------------------------- */

.contenu_case_jour_ajout {
	position: absolute;
	top: 8px;
	right: 8px;
	margin: 0;
}

.lien_case_ajout {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	color: color-mix(in srgb, var(--bleu-cfer), #FFFFFF 50%);
	background: color-mix(in srgb, var(--bleu-cfer), #FFFFFF 85%);
	transition: all .2s ease;
}

.lien_case_ajout:hover {
	color: color-mix(in srgb, var(--orange-cfer), #FFFFFF 30%);
	background: color-mix(in srgb, var(--orange-cfer), #FFFFFF 85%);
}

/* ---------------------------------------------------------
   LISTE DES EVENEMENTS
   --------------------------------------------------------- */

.tableau_date td ul {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
}

.tableau_date td ul li {
	margin: 5px 0;
	padding: 6px 7px;
	border: 1px solid #E3E6E8;
	border-radius: 7px;
	background: #FAFBFC;
	line-height: 1.25;
	overflow: hidden;
}

.tableau_date td ul li:hover {
	background: #F1F3F5;
}

.tableau_date td ul li a {
	display: block;
	color: #2179B4;
	text-decoration: none;
}

/* Lieu */

.agenda_lieu {
	display: flex;
	color: var(--orange-cfer);
	line-height: 1.2;
}

/* ---------------------------------------------------------
   ETAT / REFERENCES
   --------------------------------------------------------- */

.ref_non_renseigne {
	display: inline-flex;
	color: #E74C3C;
	font-size: .65rem;
}

.agenda_jour_nombre_moins,
.agenda_jour_nombre_milieu,
.agenda_jour_nombre_plus {
	float: right;
}

.agenda_jour_nombre_moins {
	color: var(--rouge-cfer);
}

.agenda_jour_nombre_milieu {
	color: var(--orange-cfer);
}

.agenda_jour_nombre_plus,
.agenda_jour_x {
	color: var(--vert-cfer);
}

.agenda_jour_x {
	font-style: italic;
}

/* =========================================================
   SMARTPHONE (Max 768px)
   ========================================================= */

@media (max-width: 768px) {
	.tableau_date {
		border-spacing: 2px;
	}

	th.tableau_date_annee {
		padding: 8px 4px;
	}

	.tableau_date .liens_mois_avant,
	.tableau_date .liens_mois_apres {
		white-space: nowrap;
	}

	.tableau_date .liens_mois_avant {
		justify-content: flex-start;
	}

	.tableau_date .liens_mois_apres {
		justify-content: flex-end;
	}

	.tableau_date th:not(.tableau_date_annee) {
		height: 32px;
		padding: 3px 1px;
		border-radius: 6px;
		font-size: .7rem;
		width: 20%;
	}

	.jour_long {
		display: none;
	}

	.jour_court {
		display: block;
	}

	.tableau_date td {
		height: 105px;
		padding: 5px;
		border-radius: 7px;
		font-size: .72rem;
		width: 20%;
	}

	.contenu_case_jour_date {
		min-width: 24px;
		height: 24px;
	}

	.contenu_case_jour_ajout {
		top: 5px;
		right: 4px;
	}

	.lien_case_ajout {
		width: 23px;
		height: 23px;
	}

	.tableau_date td ul {
		margin-top: 5px;
	}

	.tableau_date td ul li {
		margin: 3px 0;
		padding: 4px;
		border-radius: 5px;
		line-height: 1.15;
	}

	.tableau_date td:has(ul:empty) {
		min-height: 70px;
	}
}


/* =========================================================
   TRÈS PETITS SMARTPHONES (Max 480px) - EMPILÉ EN PLEINE LARGEUR
   ========================================================= */
@media (max-width: 480px) {
	.mois_en_cours_affiche {
		display: inline-block;
		width: 100%;
	}

	.tableau_date, 
	.tableau_date tbody, 
	.tableau_date tr {
		display: block;
		width: 100%;
	}

	.tableau_date {
		border-spacing: 0 10px; /* Espace vertical propre entre chaque carte de jour */
	}

	th.tableau_date_annee {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		align-items: center;
		gap: 5px;
		padding: 8px 4px;
	}

	.tableau_date .liens_mois_avant,
	.tableau_date .liens_mois_apres {
		float: none;
		max-width: 45%;
		padding: 4px 6px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	/* Chaque cellule devient une ligne indépendante sur toute la largeur */
	.tableau_date td {
		display: block;
		width: auto !important;
		height: auto !important; /* Hauteur dynamique selon le contenu */
		min-height: 70px;
		padding: 10px;
		margin-bottom: 8px;
		border-radius: 8px;
	}

	/* S'assurer que les cellules masquées le restent bien */
	.tableau_date tr td:nth-child(6),
	.tableau_date tr td:nth-child(7) {
		display: none !important;
	}

	.contenu_case_jour_date {
		min-width: 26px;
		height: 26px;
		font-size: .75rem;
	}

	.tableau_date td ul {
		margin-top: 8px;
	}

	.tableau_date td ul li {
		padding: 6px;
		margin: 4px 0;
		height: auto;
	}

	.lien_case_ajout {
		width: 24px;
		height: 24px;
	}

	.tableau_date .date_desactivee,
	.tableau_date th:not(.tableau_date_annee) {
		display: none;
	}
}

/*********
Page liste des formations sur le site CFER
*********/
	.liste_agenda {
		width: 100%;
	}

	.liste_agenda_jour {
		width: 99%;
		border: 1px solid #D4D4D4;
		background-color: #F0F0F0;
		padding: 15px 0;
		text-align: center;
		font-weight: bold;
	}

	.liste_agenda_formation {
		/* display: flex; */
		/* border-bottom: 1px solid #EBEBEB; */
		border: 1px solid #EBEBEB;
		margin: 10px 0;
		padding: 15px;
		background-color: #FFFFFF;
		border-radius: 20px;
	}

	.liste_agenda_formation a {
		text-decoration: none;
	}

	.liste_agenda_formation:nth-of-type(even) {
		background-color: #F9F9F9;
	}

	.liste_agenda_la_formation {
		display: table;
		width: 100%;
	}

	.liste_agenda_la_formation .liste_agenda_formation_icone, .liste_agenda_la_formation .liste_agenda_formation_texte {
		display: table-cell;
		vertical-align: middle;
		padding: 5px 10px;
	}

	.liste_agenda_formation_texte_lieu .liste_agenda_formation_icone {
		float: right;
		margin-right: 50px;
		margin-top: -25px;
	}

	.liste_agenda_formation_texte_lieu .liste_agenda_formation_texte {
		float: left;
		margin-left: -90px;
		text-align: right;
	}

	.liste_agenda_la_formation .liste_agenda_formation_icone {
		width: 1%;
		font-size: 250%;
	}

	.liste_agenda_la_formation .liste_agenda_formation_texte {
		width: 99%;
	}

	.liste_agenda_compteur_jour,
	.liste_agenda_date_limit_inscription,
	.liste_agenda_compteur_stagiaires {
		font-style: italic;
		font-size: 70%;
	}

	.liste_agenda_compteur_jour {
		color: #909090;
	}

	.liste_agenda_date_limit_inscription {
		color: #91AFFD;
	}

	.liste_agenda_compteur_stagiaires {
		color: #95DB00;
	}

	.liste_agenda_compteur_stagiaires_full {
		color: #FF0000;
	}

	.liste_agenda_formation_texte_lieu {
		/* width: 50%; */
		color: #18691C;
	}

	.liste_agenda_formation_inscription {
		display: flex;
	}

	.liste_agenda_formation_inscription a {
		border: 1px solid #017E1A;
		background-color: #017E1A17;
		float: left;
		margin: 0 auto;
		padding: 10px;
		text-decoration: none;
		border-radius: 15px;
		color: #418F00;
	}

	.liste_agenda_formation_inscription a:hover {
		background-color: #EFFFE7B5;
	}

	.liste_agenda_formation_inscription_fermee a {
		border: 1px solid;
		background-color: #FABABA17;
		color: #FABABA;
		/* opacity: 0.8; */
	}

	.liste_agenda_formation_inscription_fermee a:hover {
		background-color: #FABABAB5;
		color: #FD8888;
	}
/*********
*************************************
*********/