/* ==========================================================================
   ABC Justificatifs — front
   Reprend les variables du thème Drôme Chasse & Tir (--dct-*) quand il est actif.
   ========================================================================== */

.abcj,
.abcj-alert,
.abcj-product-notice {
	--abcj-green: var(--dct-green, #8CB33F);
	--abcj-green-hi: var(--dct-green-hi, #9DC64C);
	--abcj-link: var(--dct-link, #5E7A22);
	--abcj-text: var(--dct-text, #1B1E19);
	--abcj-muted: var(--dct-muted, #7B8177);
	--abcj-border: var(--dct-border, #E2E2DA);
	--abcj-radius: var(--dct-radius, 4px);
	--abcj-soft: #F5F6F1;
	--abcj-warn: #B4651D;
	--abcj-warn-bg: #FBF3E6;
	--abcj-danger: #A5432F;
	--abcj-info-bg: #EEF3F8;
	--abcj-info: #3D6182;
	box-sizing: border-box;
}

.abcj *,
.abcj *::before,
.abcj *::after { box-sizing: inherit; }

.abcj-ico { width: 20px; height: 20px; flex: 0 0 auto; }

.abcj-muted { color: var(--abcj-muted); font-weight: 400; }

.abcj-intro { margin: 0 0 20px; color: var(--abcj-muted); }

.abcj .abcj-h { margin: 28px 0 14px; }

.abcj .abcj-h:first-child { margin-top: 0; }

/* Alertes ----------------------------------------------------------------- */

.abcj-alert {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin: 0 0 14px;
	padding: 16px 18px;
	border: 1px solid var(--abcj-border);
	border-left: 4px solid var(--abcj-green);
	border-radius: var(--abcj-radius);
	background: #fff;
	color: var(--abcj-text);
	line-height: 1.5;
}

.abcj-alert > .abcj-ico,
.abcj-alert > svg { margin-top: 2px; color: var(--abcj-green); }

.abcj-alert > div { flex: 1 1 auto; min-width: 0; }

.abcj-alert strong { display: block; font-weight: 800; }

.abcj-alert span { display: block; font-size: 13.5px; color: #4b5147; }

.abcj-alert--warn { border-left-color: var(--abcj-warn); background: var(--abcj-warn-bg); }

.abcj-alert--warn > svg { color: var(--abcj-warn); }

.abcj-alert--info { border-left-color: var(--abcj-info); background: var(--abcj-info-bg); }

.abcj-alert--info > svg { color: var(--abcj-info); }

.abcj-alert--ok { background: #F1F6E7; }

.abcj-alert .abcj-reqs { margin-top: 10px; }

/* Boutons et liens --------------------------------------------------------- */

.abcj-btn,
.woocommerce .abcj-btn.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 22px;
	border: 1px solid transparent;
	border-radius: var(--abcj-radius);
	background: var(--abcj-green);
	color: #10140E !important;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s, opacity .2s;
}

.abcj-btn:hover,
.woocommerce .abcj-btn.button:hover { background: var(--abcj-green-hi); }

.abcj-btn[disabled] { opacity: .6; cursor: progress; }

.abcj-btn--sm { padding: 10px 14px; font-size: 11px; }

.abcj-btn--ghost,
.woocommerce .abcj-btn--ghost.button { background: #fff; border-color: var(--abcj-border); }

.abcj-btn--ghost:hover,
.woocommerce .abcj-btn--ghost.button:hover { background: var(--abcj-soft); border-color: var(--abcj-green); }

.abcj-link {
	display: inline-block;
	padding: 0;
	border: 0;
	background: none;
	color: var(--abcj-link);
	font: inherit;
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	white-space: nowrap;
}

.abcj-link--danger { color: var(--abcj-danger) !important; }

/* Badges ------------------------------------------------------------------ */

.abcj-badge {
	display: inline-block;
	padding: 4px 9px;
	border-radius: 999px;
	background: #ECEDE7;
	color: #4b5147;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	line-height: 1.3;
	text-transform: uppercase;
	white-space: nowrap;
}

.abcj-badge--valid { background: rgba(140,179,63,.18); color: #3F5418; }
.abcj-badge--pending { background: var(--abcj-info-bg, #EEF3F8); color: var(--abcj-info, #3D6182); }
.abcj-badge--rejected,
.abcj-badge--expired { background: var(--abcj-warn-bg, #FBF3E6); color: var(--abcj-warn, #B4651D); }
.abcj-badge--missing { background: #F3F3EF; color: var(--abcj-muted, #7B8177); }

/* Cartes ------------------------------------------------------------------ */

.abcj-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.abcj-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 18px;
	border: 1px solid var(--abcj-border);
	border-radius: var(--abcj-radius);
	background: #fff;
}

.abcj-card--valid { border-color: rgba(140,179,63,.55); }
.abcj-card--rejected,
.abcj-card--expired { border-color: #EBCB9C; }

.abcj-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }

.abcj-card__head strong { font-size: 14.5px; line-height: 1.35; color: var(--abcj-text); }

.abcj-card__text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--abcj-muted); }

.abcj-card .abcj-link { align-self: flex-start; margin-top: auto; }

/* Exigences ---------------------------------------------------------------- */

.abcj-reqs { margin: 0 0 4px; padding: 0; list-style: none; }

.abcj-reqs__item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 9px 0;
	border-top: 1px dashed var(--abcj-border);
	font-size: 14px;
	line-height: 1.45;
}

.abcj-reqs__item:first-child { border-top: 0; }

.abcj-reqs__item > svg { width: 18px; height: 18px; margin-top: 1px; color: var(--abcj-muted); }

.abcj-reqs__item span { flex: 1 1 auto; color: var(--abcj-text); }

.abcj-reqs__item em { flex: 0 0 auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--abcj-muted); }

.abcj-reqs__item--ok > svg,
.abcj-reqs__item--ok em { color: #5E7A22; }

.abcj-reqs__item--pending > svg,
.abcj-reqs__item--pending em { color: var(--abcj-info); }

.abcj-reqs__item--missing > svg,
.abcj-reqs__item--missing em { color: var(--abcj-warn); }

/* Formulaire --------------------------------------------------------------- */

.abcj-form {
	margin: 24px 0 0;
	padding: 22px;
	border: 1px solid var(--abcj-border);
	border-radius: var(--abcj-radius);
	background: var(--abcj-soft);
}

.abcj .abcj-form__title { margin: 0 0 14px; }

.abcj-field { margin: 0 0 14px; }

.abcj-field label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--abcj-text); }

.abcj-field select,
.abcj-field input[type="text"],
.abcj-field textarea {
	width: 100%;
	max-width: 100%;
	padding: 11px 12px;
	border: 1px solid #CFD2C6;
	border-radius: var(--abcj-radius);
	background: #fff;
	color: var(--abcj-text);
	font: inherit;
	font-size: 14px;
}

.abcj-field select:focus,
.abcj-field input:focus,
.abcj-field textarea:focus { border-color: var(--abcj-green); outline: 2px solid rgba(140,179,63,.25); outline-offset: 0; }

.abcj-help { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--abcj-muted); }

.abcj-field--inline { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: end; }

.abcj-field--inline label { grid-column: 1 / -1; margin: 0; }

.abcj-drops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }

.abcj-drops:has(.abcj-drop--second[hidden]) { grid-template-columns: 1fr; }

.abcj-drop { position: relative; display: block; margin: 0; cursor: pointer; }

.abcj-drop[hidden] { display: none; }

.abcj-drop input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.abcj-drop__in {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 128px;
	padding: 18px 14px;
	border: 2px dashed #C9CDBE;
	border-radius: var(--abcj-radius);
	background: #fff;
	text-align: center;
	transition: border-color .2s, background .2s;
}

.abcj-drop__in svg { width: 26px; height: 26px; color: var(--abcj-green); }

.abcj-drop__in strong { font-size: 14px; color: var(--abcj-text); }

.abcj-drop__name { max-width: 100%; overflow: hidden; font-size: 12.5px; font-style: normal; color: var(--abcj-muted); text-overflow: ellipsis; white-space: nowrap; }

.abcj-drop:hover .abcj-drop__in,
.abcj-drop input:focus-visible + .abcj-drop__in,
.abcj-drop.is-over .abcj-drop__in { border-color: var(--abcj-green); background: #FAFCF5; }

.abcj-drop.is-filled .abcj-drop__in { border-style: solid; border-color: var(--abcj-green); background: #F4F8EA; }

.abcj-drop.is-filled .abcj-drop__name { color: #3F5418; font-weight: 600; }

.abcj-drop.is-error .abcj-drop__in { border-color: var(--abcj-danger); background: #FCF1EE; }

.abcj-drop.is-error .abcj-drop__name { color: var(--abcj-danger); white-space: normal; }

.abcj-secure { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 16px; font-size: 12.5px; line-height: 1.5; color: var(--abcj-muted); }

.abcj-secure svg { width: 18px; height: 18px; color: var(--abcj-green); }

.abcj-form__actions { margin: 0; }

/* Tableau d'historique ------------------------------------------------------ */

.abcj-table { width: 100%; margin: 0; border-collapse: collapse; font-size: 14px; }

.abcj-table th,
.abcj-table td { padding: 10px 12px; border-bottom: 1px solid var(--abcj-border); text-align: left; vertical-align: middle; }

.abcj-table th { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--abcj-muted); }

.abcj-del { margin: 0; }

/* Confidentialité ------------------------------------------------------------ */

.abcj-privacy { display: flex; gap: 12px; margin-top: 26px; padding: 16px 18px; border-radius: var(--abcj-radius); background: var(--abcj-soft); }

.abcj-privacy svg { width: 22px; height: 22px; color: var(--abcj-green); }

.abcj-privacy p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--abcj-muted); }

/* Bloc commande ------------------------------------------------------------- */

.abcj-order {
	margin: 0 0 28px;
	padding: 22px;
	border: 1px solid var(--abcj-border);
	border-left: 4px solid var(--abcj-warn);
	border-radius: var(--abcj-radius);
	background: #fff;
}

.abcj-order--pending { border-left-color: var(--abcj-info); }

.abcj-order--ok { border-left-color: var(--abcj-green); }

.abcj-order__head { display: flex; gap: 14px; margin-bottom: 8px; }

.abcj-order__head > svg { width: 26px; height: 26px; color: var(--abcj-warn); }

.abcj-order--pending .abcj-order__head > svg { color: var(--abcj-info); }

.abcj-order--ok .abcj-order__head > svg { color: var(--abcj-green); }

.abcj-order .abcj-h { margin: 0 0 4px; }

.abcj-order__head p { margin: 0; color: #4b5147; }

.abcj-order .abcj-form { margin-top: 16px; }

/* Fiche produit ------------------------------------------------------------- */

.abcj-product-notice {
	display: flex;
	gap: 12px;
	margin: 16px 0 6px;
	padding: 14px 16px;
	border: 1px solid #E7D9BE;
	border-radius: 6px;
	background: #FBF7EE;
	font-size: 13px;
	line-height: 1.5;
	color: #4b5147;
}

.abcj-product-notice > svg { width: 20px; height: 20px; margin-top: 1px; color: var(--abcj-warn); }

.abcj-product-notice strong { display: block; margin-bottom: 2px; color: var(--abcj-text); font-size: 13.5px; }

.abcj-product-notice span { display: block; }

.abcj-product-notice ul { margin: 6px 0 6px 18px; padding: 0; list-style: disc; }

.abcj-product-notice li { margin: 0 0 2px; }

/* Paiement ------------------------------------------------------------------- */

.abcj-checkout { margin: 0 0 18px; padding: 16px 18px; border: 1px solid #E7D9BE; border-radius: var(--abcj-radius); background: #FBF7EE; font-size: 13.5px; }

.abcj-checkout p { margin: 0 0 8px; }

.abcj-checkout__title { display: flex; align-items: center; gap: 8px; }

.abcj-checkout__title svg { color: var(--abcj-warn); }

.abcj-checkout .abcj-reqs__item { padding: 6px 0; font-size: 13px; }

.woocommerce .abcj-checkout__ack.form-row { margin: 10px 0 0; padding: 0; }

.abcj-checkout__ack label { display: flex !important; align-items: flex-start; gap: 8px; font-weight: 600; line-height: 1.45; }

.abcj-checkout__ack input { margin-top: 3px !important; }

.abcj .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Responsive ------------------------------------------------------------------ */

@media (max-width: 782px) {
	.abcj-cards,
	.abcj-drops { grid-template-columns: 1fr; }
	.abcj-alert { flex-wrap: wrap; }
	.abcj-alert > .abcj-btn,
	.abcj-alert > .abcj-link { margin-left: 34px; }
	.abcj-form,
	.abcj-order { padding: 16px; }
	.abcj-reqs__item { flex-wrap: wrap; }
	.abcj-reqs__item em { flex-basis: 100%; padding-left: 28px; }
	.abcj-field--inline { grid-template-columns: 1fr; }
	.abcj-btn { width: 100%; white-space: normal; }
	.abcj-alert > .abcj-btn { width: auto; }
	.abcj-card__head { flex-wrap: wrap; }
	/* Historique : une carte par ligne. */
	.abcj-table thead { display: none; }
	.abcj-table,
	.abcj-table tbody,
	.abcj-table tr,
	.abcj-table td { display: block; width: 100%; }
	.abcj-table tr { padding: 10px 0; border-bottom: 1px solid var(--abcj-border); }
	.abcj-table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
	.abcj-table td[data-title]::before { content: attr(data-title); font-size: 12px; font-weight: 700; color: var(--abcj-muted); text-align: left; }
	.abcj-table td:empty { display: none; }
}

/* Envoi par e-mail (v1.3.1) ------------------------------------------------
   Étapes, adresse et objet à copier, bouton vers la messagerie. */

.abcj-mailbox {
	margin: 0 0 28px;
	padding: 22px 24px;
	border: 1px solid var(--abcj-border);
	border-top: 3px solid var(--abcj-green);
	border-radius: var(--abcj-radius);
	background: #fff;
	color: var(--abcj-text);
}

.abcj-mailbox__head { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }

.abcj-mailbox__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(140,179,63,.16);
	color: #4E681C;
}

.abcj-mailbox__icon svg { width: 22px; height: 22px; }

.abcj-mailbox__title { display: block; font-size: 17px; font-weight: 800; line-height: 1.3; color: var(--abcj-text); }

.abcj .abcj-mailbox__lead,
.abcj-mailbox__lead { margin: 2px 0 0; padding: 0; font-size: 13.5px; line-height: 1.5; color: var(--abcj-muted); }

.abcj-mailbox ol.abcj-steps {
	counter-reset: abcj-step;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}

.abcj-mailbox ol.abcj-steps > li {
	counter-increment: abcj-step;
	position: relative;
	margin: 0;
	padding: 14px 14px 14px 52px;
	border-radius: var(--abcj-radius);
	background: var(--abcj-soft);
	font-size: 13px;
	line-height: 1.5;
	list-style: none;
}

.abcj-mailbox ol.abcj-steps > li::before {
	content: counter(abcj-step);
	position: absolute;
	left: 14px;
	top: 13px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--abcj-green);
	color: #10140E;
	font-size: 13px;
	font-weight: 800;
	line-height: 26px;
	text-align: center;
}

.abcj-steps strong { display: block; margin: 0 0 2px; font-size: 13.5px; line-height: 1.35; color: var(--abcj-text); }

.abcj-steps span { display: block; color: var(--abcj-muted); }

.abcj-mailbox dl.abcj-mailbox__fields { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; }

.abcj-mailbox__field {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	padding: 9px 10px 9px 14px;
	border: 1px solid var(--abcj-border);
	border-radius: var(--abcj-radius);
	background: #fff;
}

.abcj-mailbox__field dt {
	margin: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--abcj-muted);
}

.abcj-mailbox__field dd { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; margin: 0; padding: 0; }

.abcj-mailbox__value { min-width: 0; font-size: 14.5px; font-weight: 700; line-height: 1.4; color: var(--abcj-text); overflow-wrap: anywhere; }

.abcj-mailbox a.abcj-mailbox__value { color: var(--abcj-link); text-decoration: none; }

.abcj-mailbox a.abcj-mailbox__value:hover { text-decoration: underline; text-underline-offset: 3px; }

.abcj-copy {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	margin: 0;
	padding: 7px 11px;
	border: 1px solid var(--abcj-border);
	border-radius: var(--abcj-radius);
	background: #fff;
	color: var(--abcj-text);
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	cursor: pointer;
	transition: border-color .2s, background .2s, color .2s;
}

.abcj-copy:hover { border-color: var(--abcj-green); background: var(--abcj-soft); color: var(--abcj-text); }

.abcj-copy.is-done { border-color: var(--abcj-green); background: rgba(140,179,63,.16); color: #3F5418; }

.abcj-copy.is-manual { border-color: var(--abcj-warn); background: var(--abcj-warn-bg); color: var(--abcj-warn); }

.abcj-copy:focus-visible,
.abcj-mailbox .abcj-btn:focus-visible,
.abcj-link--mail:focus-visible { outline: 2px solid var(--abcj-green); outline-offset: 2px; }

.abcj .abcj-mailbox__note,
.abcj-mailbox__note {
	margin: 0 0 16px;
	padding: 10px 12px;
	border-left: 3px solid var(--abcj-green);
	background: var(--abcj-soft);
	font-size: 13px;
	line-height: 1.55;
	color: #4b5147;
}

.abcj-mailbox__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }

.abcj-mailbox__actions .abcj-btn svg { width: 16px; height: 16px; }

.abcj-mailbox__hint { flex: 1 1 260px; font-size: 12.5px; line-height: 1.5; color: var(--abcj-muted); }

/* Variante courte (mode « au choix », sous le formulaire de dépôt). */
.abcj-mailbox--alt { margin-top: 18px; padding: 18px 20px; border-top: 1px solid var(--abcj-border); background: var(--abcj-soft); }

.abcj-mailbox--alt .abcj-mailbox__head { margin-bottom: 12px; }

.abcj-mailbox--alt .abcj-mailbox__icon { flex-basis: 36px; width: 36px; height: 36px; background: #fff; }

.abcj-mailbox--alt .abcj-mailbox__icon svg { width: 18px; height: 18px; }

.abcj-mailbox--alt .abcj-mailbox__title { font-size: 15px; }

/* Bloc commande : l'encadré suit la liste des pièces manquantes. */
.abcj-order .abcj-mailbox { margin: 16px 0 0; }

/* Commande en attente (Mes justificatifs). */
.abcj-alert .abcj-alert__mail { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 12px 0 0; }

.abcj-alert .abcj-alert__mail span { font-size: 12.5px; color: #4b5147; }

.abcj-alert .abcj-alert__next { margin-top: 10px; font-weight: 600; color: var(--abcj-text); }

.abcj-alert .abcj-btn svg { width: 15px; height: 15px; }

/* Cartes en mode e-mail. */
.abcj .abcj-subintro { margin: -6px 0 14px; font-size: 13.5px; line-height: 1.55; color: var(--abcj-muted); }

.abcj-link--mail { display: inline-flex; align-items: center; gap: 6px; }

.abcj-link--mail svg { width: 15px; height: 15px; flex: 0 0 auto; }

.abcj-alert > div > .abcj-link { display: inline-block; margin-top: 8px; }

@media (max-width: 782px) {
	.abcj-mailbox { padding: 18px 16px; }
	.abcj-mailbox ol.abcj-steps { grid-template-columns: 1fr; gap: 8px; }
	.abcj-mailbox ol.abcj-steps > li { padding: 12px 12px 12px 48px; }
	.abcj-mailbox ol.abcj-steps > li::before { left: 12px; top: 11px; }
	.abcj-mailbox__field { grid-template-columns: 1fr; gap: 4px; padding: 10px 12px; }
	/* L'adresse reste entière : le bouton Copier passe dessous si la place manque. */
	.abcj-mailbox__field dd { flex-wrap: wrap; }
	.abcj-mailbox__value { overflow-wrap: break-word; }
	.abcj-mailbox__actions .abcj-btn { width: 100%; }
	.abcj-mailbox__hint { flex-basis: 100%; }
	.abcj-alert .abcj-alert__mail .abcj-btn { width: auto; }
}
