.cfemf-cert {
	--cfemf-color: #1f2a5c;
	--cfemf-accent: #c8102e;
	--cfemf-border: #e3e5ea;
	--cfemf-muted: #5c6270;
	--cfemf-bg: #fff;
	color: #2b2f38;
	font-size: 15px;
	line-height: 1.5;
	max-width: 100%;
}
.cfemf-cert *, .cfemf-cert *::before, .cfemf-cert *::after { box-sizing: border-box; }

/* Recherche ------------------------------------------------------------ */
.cfemf-cert__intro { margin-bottom: 1.25em; }
.cfemf-cert__intro p { margin: 0 0 .5em; }
.cfemf-cert__form { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin-bottom: 14px; }
.cfemf-cert__input {
	flex: 1 1 320px; min-width: 0; max-width: 640px;
	padding: 10px 14px !important; font-size: 15px !important;
	border: 1px solid var(--cfemf-border) !important; border-radius: 4px !important; background: #fff !important;
}
.cfemf-cert__input:focus { outline: 2px solid var(--cfemf-color); outline-offset: 1px; }
.cfemf-cert__buttons { display: flex; gap: 6px; }
.cfemf-cert__btn {
	padding: 10px 20px !important; border: 0 !important; border-radius: 4px !important;
	background: #e9eaee !important; color: #2b2f38 !important;
	font-size: 15px !important; font-weight: 600 !important; cursor: pointer; line-height: 1.2 !important;
}
.cfemf-cert__btn--primary { background: var(--cfemf-accent) !important; color: #fff !important; }
.cfemf-cert__btn:hover { filter: brightness(.94); }
.cfemf-cert__btn:disabled { opacity: .6; cursor: wait; }

.cfemf-cert__list { width: 100%; border-collapse: collapse; background: var(--cfemf-bg); border-radius: 4px; overflow: hidden; margin: 0; }
.cfemf-cert__list th {
	text-align: center; font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
	padding: 14px; border: 0; border-bottom: 1px solid var(--cfemf-border); background: #fff; color: var(--cfemf-color);
}
.cfemf-cert__list td { padding: 12px 14px; border: 0; border-bottom: 1px solid var(--cfemf-border); text-align: center; }
.cfemf-cert__list tr:last-child td { border-bottom: 0; }
.cfemf-cert__list a { color: var(--cfemf-color); font-weight: 600; text-decoration: none; }
.cfemf-cert__list a:hover { color: var(--cfemf-accent); text-decoration: underline; }
.cfemf-cert__empty td { color: var(--cfemf-muted); font-size: 14px; background: #f7f7f9; }
.cfemf-cert__empty.is-warning td { color: #8a4b00; background: #fff6e5; }
.cfemf-cert__rgpd { margin-top: 1.25em; font-size: 12.5px; color: var(--cfemf-muted); }
.cfemf-cert__rgpd p { margin: 0; }

/* Fiche ---------------------------------------------------------------- */
.cfemf-cert__card {
	display: flex; gap: 32px; align-items: flex-start;
	background: var(--cfemf-bg); border: 1px solid var(--cfemf-border); border-radius: 6px; padding: 28px;
}
.cfemf-cert__id { flex: 0 0 200px; text-align: center; }
.cfemf-cert__photo { display: block; width: 160px; height: auto; max-height: 210px; object-fit: cover; margin: 0 auto 10px; border-radius: 3px; }
.cfemf-cert__photo--empty { height: 190px; background: #eceef2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23b8bcc6' d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-4.4 0-9 2.2-9 5v3h18v-3c0-2.8-4.6-5-9-5z'/%3E%3C/svg%3E") center/60% no-repeat; }
.cfemf-cert__name { font-weight: 600; margin: 0 0 10px; color: #2b2f38; }
.cfemf-cert__pdf { display: inline-flex; align-items: center; gap: 6px; color: var(--cfemf-accent); font-weight: 600; text-decoration: none; }
.cfemf-cert__pdf:hover { text-decoration: underline; }
.cfemf-cert__detail { flex: 1 1 auto; min-width: 0; }
.cfemf-cert__table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.cfemf-cert__table th {
	font-size: 12px; text-transform: uppercase; letter-spacing: .03em; font-weight: 700;
	padding: 10px 8px; text-align: center; vertical-align: bottom; border: 0; border-bottom: 2px solid var(--cfemf-color);
	color: var(--cfemf-color); background: transparent;
}
.cfemf-cert__table td { padding: 12px 8px; text-align: center; border: 0; border-bottom: 1px solid var(--cfemf-border); background: #f7f7f9; }
.cfemf-cert__table tr.is-expired td { color: var(--cfemf-muted); background: #fafafa; }
.cfemf-cert__badge { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 3px; background: #fde8e8; color: #9b1c1c; font-size: 11px; font-weight: 600; }
.cfemf-cert__notes { font-size: 12.5px; color: var(--cfemf-muted); }
.cfemf-cert__notes p { margin: 0 0 .4em; }
.cfemf-cert__notice { padding: 14px; background: #f7f7f9; border-radius: 4px; }
.cfemf-cert__back { display: inline-block; margin-top: 18px; color: var(--cfemf-color); font-weight: 600; text-decoration: none; }
.cfemf-cert__back:hover { text-decoration: underline; }

/* Adaptation à la largeur disponible (colonne Elementor, mobile…) ----- */
.cfemf-cert--fiche { container-type: inline-size; }
.cfemf-cert__detail { overflow-x: auto; }
@container (max-width: 1100px) {
	.cfemf-cert__card { flex-direction: column; padding: 18px; gap: 18px; }
	.cfemf-cert__detail { width: 100%; }
	.cfemf-cert__id { flex: none; width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; align-items: center; text-align: left; }
	.cfemf-cert__id .cfemf-cert__photo { grid-row: span 2; width: 110px; margin: 0; }
	.cfemf-cert__id .cfemf-cert__name { margin: 0; align-self: end; }
	.cfemf-cert__id .cfemf-cert__pdf { align-self: start; }
}
@container (max-width: 780px) {
	.cfemf-cert__table thead { display: none; }
	.cfemf-cert__table, .cfemf-cert__table tbody, .cfemf-cert__table tr, .cfemf-cert__table td { display: block; width: 100%; }
	.cfemf-cert__table tr { margin-bottom: 12px; border: 1px solid var(--cfemf-border); border-radius: 4px; overflow: hidden; }
	.cfemf-cert__table td { display: flex; justify-content: space-between; gap: 12px; text-align: right; padding: 8px 12px; }
	.cfemf-cert__table td::before { content: attr(data-label); font-weight: 600; text-align: left; color: var(--cfemf-color); }
}
