/* Offres Sync — styles front-end (sobres, personnalisables via le CSS des réglages) */

/* Grille d'offres */
.offres-sync-grille {
	display: grid;
	grid-template-columns: repeat(var(--offres-sync-colonnes, 3), 1fr);
	gap: 24px;
}
@media (max-width: 900px) {
	.offres-sync-grille { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.offres-sync-grille { grid-template-columns: 1fr; }
}

/* Carte d'offre */
.offres-sync-carte-offre {
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 24px;
	transition: box-shadow 0.2s, transform 0.2s;
}
.offres-sync-carte-offre:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}
.offres-sync-carte-offre__contrat {
	display: inline-block;
	width: fit-content;
	background: #eef4fb;
	color: #1d4ed8;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 12px;
	border-radius: 999px;
	margin-bottom: 8px;
}
.offres-sync-carte-offre__titre {
	margin: 0 0 4px;
	font-size: 1.15em;
	line-height: 1.3;
}
.offres-sync-carte-offre__titre a {
	text-decoration: none;
	color: inherit;
}
.offres-sync-carte-offre__titre a:hover { text-decoration: underline; }
.offres-sync-carte-offre__ville {
	margin: 0;
	font-size: 0.9em;
	color: #6b7280;
	display: flex;
	align-items: center;
	gap: 4px;
}
.offres-sync-carte-offre__ville a { color: inherit; text-decoration: none; }
.offres-sync-carte-offre__ville .dashicons { font-size: 16px; width: 16px; height: 16px; }
.offres-sync-carte-offre__extrait {
	color: #4b5563;
	font-size: 0.95em;
	flex-grow: 1;
}
.offres-sync-carte-offre__pied {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: auto;
}
.offres-sync-carte-offre__salaire {
	font-weight: 700;
	color: #111827;
}

/* Bouton */
.offres-sync-bouton {
	display: inline-block;
	background: #1d4ed8;
	color: #fff !important;
	text-decoration: none !important;
	font-weight: 600;
	padding: 10px 22px;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s;
}
.offres-sync-bouton:hover { background: #1e40af; }

/* Message vide */
.offres-sync-vide {
	padding: 24px;
	background: #f9fafb;
	border: 1px dashed #d1d5db;
	border-radius: 10px;
	text-align: center;
	color: #6b7280;
}

/* Recherche dynamique */
.offres-sync-recherche {
	position: relative;
	max-width: 640px;
}
.offres-sync-recherche__form {
	display: flex;
	gap: 8px;
}
.offres-sync-recherche__input {
	flex: 1;
	padding: 12px 16px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 1em;
}
.offres-sync-recherche__input:focus {
	outline: 2px solid #1d4ed8;
	outline-offset: 1px;
}
.offres-sync-recherche.est-chargement .offres-sync-recherche__input {
	background-image: linear-gradient(90deg, transparent, rgba(29, 78, 216, 0.08), transparent);
	background-size: 200% 100%;
	animation: offres-sync-brillance 1.2s infinite;
}
@keyframes offres-sync-brillance {
	from { background-position: 200% 0; }
	to { background-position: -200% 0; }
}
.offres-sync-recherche__etat {
	margin: 8px 0 0;
	font-size: 0.85em;
	color: #6b7280;
}
.offres-sync-recherche__resultats {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 50;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
	max-height: 360px;
	overflow-y: auto;
}
.offres-sync-recherche__resultats li { margin: 0; }
.offres-sync-recherche__resultats a {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 14px;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
}
.offres-sync-recherche__resultats li.est-actif a,
.offres-sync-recherche__resultats a:hover {
	background: #eef4fb;
}
.offres-sync-recherche__titre { font-weight: 600; }
.offres-sync-recherche__meta { font-size: 0.85em; color: #6b7280; }

/* Barre de filtres */
.offres-sync-filtres__form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: center;
	margin-bottom: 28px;
}
.offres-sync-filtres__select {
	appearance: none;
	-webkit-appearance: none;
	padding: 12px 44px 12px 18px;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 18px center;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	font-size: 0.95em;
	font-weight: 500;
	color: #374151;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.offres-sync-filtres__select:hover {
	border-color: #9ca3af;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.offres-sync-filtres__select:focus {
	outline: none;
	border-color: #1d4ed8;
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

/* Filtres en pastilles (type filtre de boutique) */
.offres-sync-filtres__groupe {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	border: none;
	margin: 0;
	padding: 0;
}
.offres-sync-filtres__pastille input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.offres-sync-filtres__pastille span {
	display: inline-block;
	padding: 10px 22px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
	background: #fff;
	font-size: 0.9em;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #374151;
	cursor: pointer;
	transition: all 0.2s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.offres-sync-filtres__pastille span:hover {
	border-color: #111827;
	transform: translateY(-1px);
}
.offres-sync-filtres__pastille input:checked + span {
	background: #111827;
	border-color: #111827;
	color: #fff;
}
.offres-sync-filtres__pastille input:focus-visible + span {
	outline: 2px solid #1d4ed8;
	outline-offset: 2px;
}

/* Voile de chargement sur une Loop Grid Elementor ciblée */
.offres-sync-boucle-chargement {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.25s;
}
.offres-sync-filtres__reset {
	background: none;
	border: none;
	color: #6b7280;
	text-decoration: underline;
	cursor: pointer;
	font-size: 0.9em;
	padding: 8px;
}
.offres-sync-filtres__reset:hover { color: #1d4ed8; }
.offres-sync-filtres.est-chargement .offres-sync-filtres__resultats {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.2s;
}
@media (max-width: 600px) {
	.offres-sync-filtres__form { flex-direction: column; align-items: stretch; }
}
