/* =========================================================================
   APA Accueil V2 — WCDP donation form restyle (navy mockup)
   Palette sampled from the Lovable mockup JPEG (histogram + region sampling):
     deep navy  #16243D / #101F33   (buttons, selected, submit)
     secondary  #243447
     page bg    #F1F0ED
     idle field #E9ECEF  border #D7DCE2
     tax box    #E8EEF5  border #C9D9EC
     text       #5A6573  muted #8A929B
   Scope: everything is under .apa-donation-card (wrapper added around the
   [wcdp_donation_form] shortcode in Elementor) so it never leaks site-wide.
   ========================================================================= */

.apa-donation-card {
	--apa-navy: #16243D;
	--apa-navy-deep: #101F33;
	--apa-navy-hover: #243447;
	--apa-page: #F1F0ED;
	--apa-field: #E9ECEF;
	--apa-field-border: #D7DCE2;
	--apa-tax-bg: #E8EEF5;
	--apa-tax-border: #C9D9EC;
	--apa-text: #5A6573;
	--apa-muted: #8A929B;

	/* Override WCDP's own CSS variables so any unstyled bits follow the navy theme. */
	--wcdp-main: #16243D;
	--wcdp-main-2: #101F33;
	--wcdp-step-2: #16243D;
	--wcdp-step-3: #16243D;
	--label-inactive: #E9ECEF;
	--label-inactive-hover: #DDE2E8;
	--label-text: #16243D;
	--label-text-checked: #FFFFFF;
	--controls: #16243D;

	background: #FFFFFF;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(16, 31, 51, 0.18);
	padding: 28px 26px;
	max-width: 560px;
	margin: 0 auto;
	color: var(--apa-text);
	font-family: "Gotham", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.apa-donation-card .apa-card-inner { display: block; }
.apa-donation-card .wcdp-body { background: transparent; }

/* Card title "Faire un don" (rendered by the [apa_donation_form] shortcode). */
.apa-donation-card .apa-card-title {
	text-align: center;
	color: var(--apa-navy);
	font-weight: 700;
	font-size: 22px;
	margin: 0 0 16px;
}

/* ---- Ponctuel / Mensuel pills (native Fréquence variation box) ----------
   ONE variable-subscription product (51930) with attribute `frequence`
   (Ponctuel = one-time / Mensuel = monthly). WCDP renders the attribute as a
   box-layout radio fieldset; we style it into a segmented pill toggle that
   switches the variation client-side (no reload). apa-donation.js relocates
   the whole `.variations` block above the amount grid and injects the title. */
.apa-donation-card .variations.wcdp_variation { margin: 0 0 18px; }

/* Hide only the Fréquence label (the pills speak for themselves); keep the
   amount-section heading "Choisissez votre montant" (for="donation-amount"). */
.apa-donation-card .wcdp-variation-heading[for="frequence"] { display: none; }
/* The native <select> is WCDP-hidden inline; belt-and-braces. */
.apa-donation-card .variations.wcdp_variation select#frequence { display: none; }

.apa-donation-card ul.wcdp_options.wcdp_su[data-name="frequence"] {
	list-style: none;
	display: flex;
	gap: 6px;
	background: var(--apa-field);
	border-radius: 12px;
	padding: 5px;
	margin: 0;
}
.apa-donation-card ul.wcdp_options.wcdp_su[data-name="frequence"] li {
	flex: 1 1 0;
	margin: 0;
	list-style: none;
}
.apa-donation-card ul.wcdp_options.wcdp_su[data-name="frequence"] input[type="radio"] {
	position: absolute; opacity: 0; width: 0; height: 0;
}
.apa-donation-card ul.wcdp_options.wcdp_su[data-name="frequence"] label.wcdp-button-label {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 11px 8px;
	border-radius: 9px;
	font-weight: 600;
	font-size: 14px;
	color: var(--apa-text);
	cursor: pointer;
	transition: background .15s, color .15s;
}
.apa-donation-card ul.wcdp_options.wcdp_su[data-name="frequence"] label.wcdp-button-label:hover {
	color: var(--apa-navy);
}
.apa-donation-card ul.wcdp_options.wcdp_su[data-name="frequence"] input:checked + label.wcdp-button-label {
	background: var(--apa-navy);
	color: #fff;
	box-shadow: 0 4px 12px rgba(16, 31, 51, .25);
}

/* Section labels */
.apa-donation-card .wcdp-variation-heading,
.apa-donation-card .woocommerce-billing-fields h3 {
	color: var(--apa-navy);
	font-weight: 600;
	font-size: 13px;
	text-transform: none;
	margin: 14px 0 8px;
	display: block;
}
.apa-donation-card .wcdp-variation-heading .required,
.apa-donation-card abbr.required { color: var(--apa-navy); border: 0; text-decoration: none; }

/* ---- Amount grid (3 columns) -------------------------------------------- */
.apa-donation-card ul.wcdp_options.wcdp_amount {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin: 0 0 8px;
	padding: 0;
}
.apa-donation-card ul.wcdp_options.wcdp_amount li { margin: 0; list-style: none; }
.apa-donation-card ul.wcdp_options.wcdp_amount input[type="radio"] {
	position: absolute; opacity: 0; width: 0; height: 0;
}
.apa-donation-card ul.wcdp_options.wcdp_amount label.wcdp-button-label {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px;
	border: 1px solid var(--apa-field-border);
	border-radius: 10px;
	background: var(--apa-field);
	color: var(--apa-navy);
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.apa-donation-card ul.wcdp_options.wcdp_amount label.wcdp-button-label:hover {
	border-color: var(--apa-navy);
}
.apa-donation-card ul.wcdp_options.wcdp_amount input:checked + label.wcdp-button-label {
	background: var(--apa-navy);
	color: #fff;
	border-color: var(--apa-navy);
	box-shadow: 0 4px 12px rgba(16, 31, 51, .25);
}
/* Suppress WCDP's own checked-state white checkmark SVG (drawn via its
   .wcdp_options>li>input:checked+label:after). Our pills/amounts already show
   selection via the navy fill, so the extra icon is redundant. */
.apa-donation-card .wcdp_options > li > input:checked + label::after {
	content: none !important;
	display: none !important;
}
/* "Autre" custom-amount option spans like the others; reveal field when checked */
.apa-donation-card .wcdp_label_custom_amount { flex-direction: column; gap: 4px; }
.apa-donation-card .wcdp_cu_field { display: none; width: 100%; }
.apa-donation-card .wcdp_value_other:checked + .wcdp_label_custom_amount .wcdp_cu_field { display: block; }
/* When "Autre" is active the input alone IS the button: drop the label's own box
   and hide the "Autre" word so the cell keeps the exact 46px button height. */
.apa-donation-card .wcdp_value_other:checked + .wcdp_label_custom_amount {
	padding: 0;
	border: 0;
	min-height: 0;
	background: transparent;
	box-shadow: none;
}
.apa-donation-card .wcdp_value_other:checked + .wcdp_label_custom_amount .wcdp_other { display: none; }
/* Hide the dangling currency symbol (the buttons already imply euros). */
.apa-donation-card .wcdp_cu_field .woocommerce-Price-currencySymbol { display: none; }
/* Match the amount input to the suggestion buttons exactly (size + look). */
.apa-donation-card .wcdp_cu_field .wcdp-input-field,
.apa-donation-card #wcdp-donation-amount {
	width: 100%;
	box-sizing: border-box;
	min-height: 46px;
	margin: 0;
	padding: 10px;
	border: 1px solid var(--apa-field-border);
	border-radius: 10px;
	background: #fff;
	color: var(--apa-navy);
	font-weight: 600;
	font-size: 15px;
	text-align: center;
}
.apa-donation-card .wcdp_cu_field .wcdp-input-field:focus,
.apa-donation-card #wcdp-donation-amount:focus {
	outline: none;
	border-color: var(--apa-navy);
	box-shadow: 0 0 0 2px rgba(16, 31, 51, .15);
}

/* ---- Fiscal-reduction box (injected by apa-donation.js) ------------------ */
.apa-donation-card .apa-tax-box {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: var(--apa-tax-bg);
	border: 1px solid var(--apa-tax-border);
	border-radius: 12px;
	padding: 14px 16px;
	margin: 14px 0 18px;
}
.apa-donation-card .apa-tax-box .apa-tax-ico {
	flex: 0 0 auto;
	width: 30px; height: 30px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: var(--apa-navy);
	color: #fff;
}
.apa-donation-card .apa-tax-box .apa-tax-title { color: var(--apa-navy); font-weight: 700; font-size: 14px; margin: 0 0 3px; }
.apa-donation-card .apa-tax-box .apa-tax-detail { font-size: 13px; line-height: 1.4; margin: 0; }
.apa-donation-card .apa-tax-box .apa-tax-detail strong { color: var(--apa-navy); }
.apa-donation-card .apa-tax-box .apa-tax-note { font-size: 11.5px; color: var(--apa-muted); margin: 4px 0 0; font-style: italic; }

/* ---- Donor (billing) fields → 2-column grid ----------------------------- */
.apa-donation-card .woocommerce-billing-fields__field-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 14px;
}
.apa-donation-card .woocommerce-billing-fields .form-row { margin: 0; padding: 0; float: none; width: auto; }
.apa-donation-card .woocommerce-billing-fields .form-row-wide,
.apa-donation-card .woocommerce-billing-fields .form-row-first.apa-only { grid-column: 1 / -1; }
.apa-donation-card .woocommerce-billing-fields .form-row label {
	color: var(--apa-navy);
	font-size: 12.5px;
	font-weight: 600;
	margin-bottom: 4px;
	display: block;
}
.apa-donation-card .woocommerce-billing-fields .form-row .input-text,
.apa-donation-card .woocommerce-billing-fields .form-row select {
	width: 100%;
	border: 1px solid var(--apa-field-border);
	border-radius: 8px;
	padding: 10px 12px;
	background: var(--apa-field);
	color: var(--apa-navy);
	font-size: 14px;
}
.apa-donation-card .woocommerce-billing-fields .form-row .input-text:focus {
	background: #fff;
	border-color: var(--apa-navy);
	outline: none;
}
.apa-donation-card .apa-hidden-field { display: none !important; }

/* ---- Divider arrows (WCDP svg) — tone down --------------------------- */
.apa-donation-card .wcdp-divider-arrow { opacity: .25; margin: 6px auto; }

/* ---- Submit button ("Faire un don") ------------------------------------ */
.apa-donation-card #place_order,
.apa-donation-card .wcdp-button {
	width: 100%;
	background: var(--apa-navy) !important;
	color: #fff !important;
	border: 0;
	border-radius: 10px;
	padding: 14px 18px;
	font-weight: 700;
	font-size: 16px;
	cursor: pointer;
	transition: background .15s;
	box-shadow: 0 8px 20px rgba(16, 31, 51, .25);
}
.apa-donation-card #place_order:hover,
.apa-donation-card .wcdp-button:hover { background: var(--apa-navy-hover) !important; }

/* ---- Secure-payment + receipt reassurance (injected/styled) ------------- */
.apa-donation-card .apa-secure-note {
	text-align: center;
	font-size: 12px;
	color: var(--apa-muted);
	margin: 12px 0 0;
}
.apa-donation-card .apa-receipt-note {
	text-align: center;
	font-size: 11.5px;
	color: var(--apa-muted);
	margin: 6px 0 0;
	line-height: 1.4;
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 600px) {
	.apa-donation-card { padding: 22px 18px; border-radius: 14px; }
	.apa-donation-card ul.wcdp_options.wcdp_amount { grid-template-columns: repeat(2, 1fr); }
	.apa-donation-card .woocommerce-billing-fields__field-wrapper { grid-template-columns: 1fr; }
}

/* =========================================================================
   APA Accueil V2 — section polish (carousel + "Autres façons de nous aider")
   Matches the Lovable reference JPEGs. Navy #16243D, page bg #F1F0ED.
   Scoped to the Elementor _css_classes added on page 51914:
     .apa-rescued-carousel  (image-carousel widget)
     .apa-other-ways        (icon section)
   Widget controls handle the data; CSS reaches what controls can't.
   ========================================================================= */

/* ---- "Ils ont été sauvés…" carousel ------------------------------------- */
/* Big equal-height slides, uniform crop, generous radius, ~20px gap (gap is
   the widget's image_spacing_custom). Arrows live in the side padding so they
   sit OUTSIDE the images without being clipped by swiper overflow. */
.apa-rescued-carousel .elementor-image-carousel-wrapper {
	position: relative;
	padding: 0 64px;
}
.apa-rescued-carousel .swiper-slide img,
.apa-rescued-carousel .elementor-carousel-image {
	display: block;
	width: 100%;
	height: 300px;
	object-fit: cover;
	border-radius: 18px;
}
.apa-rescued-carousel figure.swiper-slide-inner { margin: 0; }

/* Circular outline arrows, navy, vertically centered, far left / right. */
.apa-rescued-carousel .elementor-swiper-button {
	width: 46px;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid #16243D;
	border-radius: 50%;
	background: transparent;
	color: #16243D;
	top: 50%;
	transform: translateY(-50%);
	transition: background .15s, color .15s;
}
.apa-rescued-carousel .elementor-swiper-button:hover { background: #16243D; color: #fff; }
.apa-rescued-carousel .elementor-swiper-button i,
.apa-rescued-carousel .elementor-swiper-button svg { font-size: 16px; width: 16px; height: 16px; }
.apa-rescued-carousel .elementor-swiper-button-prev { left: 6px; right: auto; }
.apa-rescued-carousel .elementor-swiper-button-next { right: 6px; left: auto; }
/* No dot pagination (navigation=arrows already; belt-and-braces). */
.apa-rescued-carousel .swiper-pagination { display: none; }

/* ---- "Autres façons de nous aider" -------------------------------------- */
/* The left title column (28%, vertically centered) and the 3 card columns
   (24% each) are set on the Elementor columns themselves, so the title sits to
   the LEFT of the cards in one row. These classes live on the WIDGETS (section-
   level custom classes don't render reliably here), so styling is scoped to:
     .apa-otherways-title  (the heading widget)
     .apa-otherways-card   (each icon-box widget). */
.apa-otherways-title .elementor-heading-title {
	font-weight: 700;
	font-size: 30px;
	line-height: 1.2;
	color: #16243D;
	text-align: left;
}
/* Bold NAVY icons, NO grey circle, a touch larger than default. */
.apa-otherways-card .elementor-icon {
	background: transparent !important;
	border: 0 !important;
	font-size: 44px;
	color: #16243D;
}
.apa-otherways-card .elementor-icon svg { fill: #16243D; width: 44px; height: 44px; }
.apa-otherways-card .elementor-icon-box-title,
.apa-otherways-card .elementor-icon-box-title a {
	color: #16243D;
	font-weight: 700;
	font-size: 18px;
}
.apa-otherways-card .elementor-icon-box-description {
	color: #6E7682;
	font-size: 14px;
	line-height: 1.5;
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
	.apa-otherways-title .elementor-heading-title { text-align: center; }
}
@media (max-width: 767px) {
	.apa-otherways-title .elementor-heading-title { text-align: center; }
	.apa-rescued-carousel .elementor-image-carousel-wrapper { padding: 0 46px; }
	.apa-rescued-carousel .swiper-slide img,
	.apa-rescued-carousel .elementor-carousel-image { height: 240px; }
	.apa-rescued-carousel .elementor-swiper-button { width: 40px; height: 40px; }
}

/* ---- Checkout review trims (Accueil V2 donation card only) -------------- */
/* Hide the "Sous-total" line in the order table (keep the column header + Total). */
.apa-donation-card .cart-subtotal { display: none; }
/* Hide the whole "Informations complémentaires" block (heading + notes textarea). */
.apa-donation-card .woocommerce-additional-fields { display: none; }
/* Hide the privacy-policy paragraph above the submit button. */
.apa-donation-card .woocommerce-privacy-policy-text { display: none; }
/* Italic, non-clickable note INSIDE the JE SOUTIENS button (snippet #25). */
.apa-donation-card .apa-submit-note {
	display: block;            /* own line, under "JE SOUTIENS" inside the button */
	margin: 4px 0 0;
	text-align: center;
	font-style: italic;
	font-weight: 400;          /* not bold — button text is 700 */
	font-size: 13px;
	text-transform: none;
	line-height: 1.3;
	color: rgba(255, 255, 255, .85);
}

/* "Déjà membre donateur ?" login-toggle box. WooCommerce's default
   .woocommerce-info pads 1em 2em 1em 3.5em with the info icon (::before) at
   left:1.5em — too much room, so the link wraps onto 2 lines. Tighten the
   padding and pull the icon near the left edge; keep enough left padding that
   the text never overlaps the icon, and keep the link on a single line. */
.apa-donation-card .woocommerce-form-login-toggle .woocommerce-info {
	padding: 0.7em 0.9em 0.7em 2.3em;
	margin-bottom: 1em;
}
.apa-donation-card .woocommerce-form-login-toggle .woocommerce-info::before {
	left: 0.7em;
	top: 0.8em;
}
.apa-donation-card .woocommerce-form-login-toggle .showlogin {
	white-space: nowrap; /* keep "Cliquez ici pour vous connecter" on one line */
}
