/**
 * @package univ-droit consultech
 * @author consultech http://www.e-consultech.fr
 * @copyright Copyright (c) 2023-2025 Consultech
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
 *
 * CSS MODERNE POUR LES RECRUTEMENTS
 * Utilise UIkit 3 + classes jl- personnalisées
 */

/* ========================================
 * CONTENEUR DE RÉSULTATS
 * ======================================== */

#container-results {
	width: 100%;
}

/* Grille UIkit pour les cartes */
#container-results .jl-grid {
	margin-left: -12px;
}

#container-results .jl-grid > * {
	padding-left: 12px;
}

/* ========================================
 * CARTES DE RECRUTEMENT MODERNES
 * ======================================== */

.jl-recrutement-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 160px;
	background: #fff;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	transition: all 0.3s ease;
}

.jl-recrutement-card:hover {
	box-shadow: 0 8px 24px rgba(0,0,0,0.15);
	transform: translateY(-4px);
}

/* Image de fond */
.jl-recrutement-card__bg {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0.2;
	z-index: 1;
}

/* Overlay gradient - réduit pour mieux voir l'image */
.jl-recrutement-card__overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(15,113,115,0.75) 0%, rgba(0,75,80,0.82) 100%);
	z-index: 2;
	transition: opacity 0.3s;
}

.jl-recrutement-card:hover .jl-recrutement-card__overlay {
	opacity: 0.88;
}

/* Contenu */
.jl-recrutement-card__content {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 12px;
	color: #fff;
}

/* Logo établissement */
.jl-recrutement-card__logo {
	position: absolute;
	top: 12px;
	left: 12px;
	width: 70px;
	height: 70px;
	background: #fff;
	border-radius: 50%;
	padding: 6px;
	z-index: 4;
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
	overflow: hidden;
}

.jl-recrutement-card__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 50%;
}

/* Titre du poste */
.jl-recrutement-card__title {
	margin: 0 0 auto 0;
	padding-left: 85px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	color: #fff;
	text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

/* Informations de dates */
.jl-recrutement-card__dates {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
	padding-left: 85px;
}

.jl-recrutement-card__date-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 11px;
}

.jl-recrutement-card__date-label {
	font-weight: 500;
	color: rgba(255,255,255,0.9);
	text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
	letter-spacing: 0.02em;
}

.jl-recrutement-card__date-value {
	padding: 4px 10px;
	border-radius: 3px;
	font-weight: 600;
	font-size: 12px;
}

/* Badge statut pourvu */
.jl-recrutement-card__badge {
	position: absolute;
	bottom: 12px;
	right: 12px;
	padding: 6px 14px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	line-height: 1.3;
	box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Badge nom recruté */
.jl-recrutement-card__badge.jl-recrutement-card__badge--recrute {
	padding: 10px 12px;
	background-color: #007c1f;
	color: #fff;
}

.jl-recrutement-card__badge.jl-recrutement-card__badge--recrute .recrute {
	font-weight: 600;
	display: block;
}

/* ========================================
 * CLASSES DE COULEUR POUR LES DATES
 * ======================================== */

/* Couleurs selon urgence */
.jl-date-green {
	background-color: #00af2b;
	color: #fff;
}

.jl-date-yellow {
	background-color: #d3e100;
	color: #333;
}

.jl-date-orange {
	background-color: #e7a000;
	color: #fff;
}

.jl-date-red {
	background-color: #ff6464;
	color: #fff;
}

.jl-date-purple {
	background-color: #760c3d;
	color: #fff;
}

.jl-date-expired {
	background-color: #050505;
	color: #fff;
}

/* ========================================
 * ÉTATS SPÉCIAUX DES CARTES
 * ======================================== */

/* Carte close / pourvue - grayscale */
.jl-recrutement-card--closed {
	filter: grayscale(60%);
	opacity: 0.75;
}

.jl-recrutement-card--closed .jl-recrutement-card__overlay {
	background: linear-gradient(135deg, rgba(0,0,0,0.75) 0%, rgba(30,30,30,0.85) 100%);
}

/* Carte ATER - overlay différent */
.jl-recrutement-card--ater .jl-recrutement-card__overlay {
	background: linear-gradient(135deg, rgba(0,75,80,0.92) 0%, rgba(0,50,55,0.95) 100%);
}

/* Carte contractuel - overlay différent */
.jl-recrutement-card--contractuel .jl-recrutement-card__overlay {
	background: linear-gradient(135deg, rgba(0,18,18,0.85) 0%, rgba(0,30,30,0.92) 100%);
}

/* Badge pourvu - rouge */
.jl-badge-pourvu {
	background-color: #fe0000;
	color: #fff;
}

/* Badge pourvu OK - vert */
.jl-badge-pourvu-ok {
	background-color: #007c1f;
	color: #fff;
}

/* ========================================
 * CARTE ACCÈS RAPIDE ARCHIVES / ANNONCES
 * ======================================== */

.jl-card-hover {
	transition: all 0.3s ease;
}

.jl-card-hover:hover {
	box-shadow: 0 5px 15px rgba(0,0,0,0.08);
	transform: translateY(-2px);
}

/* Responsive pour mobile */
@media (max-width: 639px) {
	.jl-card-body.jl-flex-between {
		flex-direction: column;
		align-items: flex-start !important;
		gap: 16px;
	}

	.jl-card-body .jl-button {
		width: 100%;
		justify-content: center;
	}
}

/* ========================================
 * HEADER RÉSULTATS
 * ======================================== */

#header-results {
	margin-bottom: 20px;
}

.resultsHeader {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	border-bottom: 2px solid #e5e5e5;
}

.totalresult {
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

.actualpage {
	font-size: 14px;
	color: #666;
}

/* ========================================
 * FILTRES HORIZONTAUX
 * ======================================== */

.filter-results {
	margin-bottom: 30px;
}

/* Alignement vertical des éléments de filtres */
.filter-results [jl-grid] > div {
	display: flex;
	flex-direction: column;
}

.filter-results .jl-form-label {
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #333;
}

.filter-results .jl-select {
	width: 100%;
	height: 36px;
	padding: 6px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	background-color: #fff;
	transition: border-color 0.2s;
}

.filter-results .jl-select:focus {
	outline: none;
	border-color: #0f7173;
	box-shadow: 0 0 0 3px rgba(15,113,115,0.1);
}

/* Chosen - intégration filtres recrutements */
.filter-results .chosen-container {
	width: 100% !important;
	font-size: 14px;
}

.filter-results .chosen-container .chosen-single {
	height: 36px;
	line-height: 34px;
	padding: 0 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	box-shadow: none;
	transition: border-color 0.2s;
}

.filter-results .chosen-container-active .chosen-single {
	border-color: #0f7173;
	box-shadow: 0 0 0 3px rgba(15,113,115,0.1);
}

.filter-results .chosen-container .chosen-drop {
	border: 1px solid #ddd;
	border-radius: 0 0 4px 4px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.filter-results .chosen-container .chosen-results li.highlighted {
	background: #0f7173;
	color: #fff;
}

.filter-results .chosen-container .chosen-search input[type="text"] {
	border: 1px solid #ddd;
	border-radius: 3px;
	padding: 4px 8px;
}

/* Bouton Reset - aligné avec les selects */
#reset-filters {
	height: 36px;
	padding: 6px 16px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	background-color: #f5f5f5;
	color: #333;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: auto;
}

#reset-filters:hover {
	background-color: #0f7173;
	color: #fff;
	border-color: #0f7173;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(15,113,115,0.2);
}

#reset-filters:active {
	transform: translateY(0);
}

/* ========================================
 * RESPONSIVE
 * ======================================== */

@media (max-width: 959px) {
	.jl-recrutement-card__title {
		font-size: 14px;
		padding-left: 80px;
	}

	.jl-recrutement-card__dates {
		padding-left: 80px;
	}

	.jl-recrutement-card__logo {
		width: 60px;
		height: 60px;
	}
}

@media (max-width: 639px) {
	.jl-recrutement-card {
		min-height: 140px;
	}

	.jl-recrutement-card__title {
		font-size: 13px;
		padding-left: 70px;
	}

	.jl-recrutement-card__dates {
		padding-left: 70px;
		gap: 4px;
	}

	.jl-recrutement-card__logo {
		width: 50px;
		height: 50px;
		top: 8px;
		left: 8px;
	}

	.jl-recrutement-card__date-item {
		font-size: 10px;
	}

	.jl-recrutement-card__date-value {
		font-size: 11px;
		padding: 3px 8px;
	}
}

/* ========================================
 * ANIMATION LOADING
 * ======================================== */

body.loading .ajax-indicator-wrapper {
	display: flex !important;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255,255,255,0.9);
	z-index: 9999;
}

.ajax-indicator-wrapper {
	display: none;
}

/* ========================================
 * CALENDRIER DES AUDITIONS
 * ======================================== */

/* Widget calendrier (bouton + image) */
.jl-calendar-widget {
	padding: 20px 15px;
	max-width: 180px;
	margin: 0 auto;
}

.jl-calendar-image {
	max-width: 150px;
	width: 100%;
	margin: 0 auto 15px;
	display: block;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	transition: transform 0.2s ease;
}

.jl-calendar-image:hover {
	transform: scale(1.05);
}

/* Conteneur du calendrier */
#calencom {
	margin-bottom: 30px;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 4px;
	border: 1px solid #e5e5e5;
}

#calencom:empty {
	display: none;
}

/* Grille du calendrier */
.calgrid {
	display: grid;
	gap: 1px;
	background: #ddd;
}

/* Items du calendrier */
.item-cal {
	background: white;
	padding: 10px;
	min-height: 50px;
	border-bottom: solid 1px #aeaeae;
	transition: background-color 0.2s ease;
	display: flex;
	align-items: center;
	gap: 10px;
}

.item-cal:hover {
	background-color: #eaeaea;
	cursor: pointer;
}

.item-cal img.calcom {
	max-height: 46px;
	height: 100%;
	width: auto;
	object-fit: contain;
}

/* Responsive calendrier */
@media (max-width: 959px) {
	.jl-calendar-widget {
		padding: 15px 10px;
	}

	.jl-calendar-image {
		max-width: 120px;
	}

	#calencom {
		padding: 15px;
	}
}

@media (max-width: 639px) {
	.jl-calendar-widget {
		max-width: 150px;
		padding: 10px;
	}

	.jl-calendar-image {
		max-width: 100px;
	}

	.item-cal {
		min-height: 40px;
		padding: 8px;
	}

	.item-cal img.calcom {
		max-height: 36px;
	}
}
