/**
 * Kienso Offres d'emploi - styles de base.
 *
 * Volontairement sobres : les couleurs, polices et espacements viennent des
 * reglages globaux du theme (theme.json). Un theme affine le rendu en ciblant
 * les classes kemp-*.
 */

/* Cartes */

.kemp-carte {
	height: 100%;
	padding: var(--wp--preset--spacing--40, 1.5rem);
	border: 1px solid color-mix(in srgb, currentColor 15%, transparent);
	border-radius: 12px;
}

.kemp-carte__employeur {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.75;
}

.kemp-carte__titre {
	margin: 0;
}

.kemp-carte__resume {
	margin: 0;
	opacity: 0.8;
}

.kemp-carte__lien {
	margin-top: auto;
}

/* Logo de l'employeur */

.kemp-logo {
	margin: 0;
	line-height: 0;
}

.kemp-logo img {
	width: auto;
	max-width: 100%;
	height: var(--kemp-logo-hauteur, 56px);
	object-fit: contain;
}

/* Details de l'offre */

.kemp-details {
	margin: 0;
	padding: var(--wp--preset--spacing--40, 1.5rem);
	border-radius: 12px;
	background: color-mix(in srgb, currentColor 4%, transparent);
}

.kemp-details__ligne + .kemp-details__ligne {
	margin-top: 0.875rem;
	padding-top: 0.875rem;
	border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.kemp-details dt {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.7;
}

.kemp-details dd {
	margin: 0.25rem 0 0;
}

/* Filtres */

.kemp-filtres {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: flex-end;
	margin-bottom: var(--wp--preset--spacing--50, 2rem);
}

.kemp-filtres__champ {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	margin: 0;
	min-width: min(100%, 15rem);
}

.kemp-filtres__actions {
	display: flex;
	gap: 1rem;
	align-items: center;
	margin: 0;
}

.kemp-filtres--auto .kemp-filtres__appliquer {
	display: none;
}

/* Formulaire */

.kemp-formulaire {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.kemp-formulaire__grille {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 1.25rem;
}

.kemp-formulaire__champ {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	margin: 0;
}

.kemp-filtres label,
.kemp-formulaire__champ > label {
	font-weight: 600;
}

/* border-box : sans lui, le retrait s'ajoute a la largeur et le champ deborde de sa colonne. */
.kemp-filtres select,
.kemp-formulaire input[type="text"],
.kemp-formulaire input[type="email"],
.kemp-formulaire input[type="tel"],
.kemp-formulaire input[type="file"],
.kemp-formulaire select,
.kemp-formulaire textarea {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	padding: 0.75rem 0.875rem;
	border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
	border-radius: 8px;
	background: transparent;
	color: inherit;
	font: inherit;
}

.kemp-formulaire input[type="file"] {
	font: inherit;
}

.kemp-formulaire__aide {
	font-size: 0.875rem;
	opacity: 0.7;
}

.kemp-formulaire__champ--case {
	flex-direction: row;
	align-items: flex-start;
	gap: 0.625rem;
}

.kemp-formulaire__champ--case input {
	flex: none;
	margin-top: 0.3em;
}

.kemp-formulaire__champ--case label {
	font-size: 0.9375rem;
	font-weight: 400;
}

/* Champ piege : hors de l'ecran plutot que masque, certains robots ignorent les champs caches. */
.kemp-formulaire__piege {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.kemp-formulaire__message {
	margin: 0;
	padding: 1rem 1.25rem;
	border-radius: 8px;
	border-left: 4px solid;
}

.kemp-formulaire__message p {
	margin: 0;
}

.kemp-formulaire__message--succes {
	border-color: #2e7d32;
	background: color-mix(in srgb, #2e7d32 10%, transparent);
}

.kemp-formulaire__message--erreur {
	border-color: #c62828;
	background: color-mix(in srgb, #c62828 10%, transparent);
}

.kemp-formulaire__envoyer:disabled {
	opacity: 0.6;
	cursor: wait;
}
