/**
 * SPD Promotions — Homepage "Packs Économiques & Offres Promotionnelles"
 * =====================================================================
 * Phase 3d component styles. Reproduces the React promotional banners
 * section (HomePage.tsx, section 4) using the centralized SPD design-system
 * tokens for typography/radius/shadow, with React-reference-exact brand
 * colors scoped to .spd-promos only (the global SPD tokens are untouched).
 *
 * The React site is the visual source of truth.
 *
 * Loaded after spd-products.css.
 */

.spd-promos {
	/* Section-scoped brand colors — React reference exact values.
	   Scoped to .spd-promos only; the global SPD tokens are unchanged. */
	--spd-promo-blue:       #0F5B94;
	--spd-promo-blue-dark:   #0A436D;
	--spd-promo-red:         #D93829;
	--spd-promo-sky-100:     #E0F2FE;
	--spd-promo-sky-50:      #F0F9FF;
	--spd-promo-gold-from:   #FDE8B5;
	--spd-promo-gold-to:     #FCE09E;
	--spd-promo-amber-200:   #FDE68A;

	/* Neutrals (Tailwind slate scale, raw values). */
	--spd-promo-slate-50:   #F8FAFC;
	--spd-promo-slate-100: #F1F5F9;
	--spd-promo-slate-700: #334155;
	--spd-promo-slate-900: #0F172A;

	--spd-promo-focus-ring: 0 0 0 3px rgba(15, 91, 148, 0.35);

	/* Transitions — match the React Tailwind durations. */
	--spd-promo-t-200: 200ms cubic-bezier(0.4, 0, 0.2, 1);
	--spd-promo-t-300: 300ms cubic-bezier(0.4, 0, 0.2, 1);

	/* py-8 sm:py-12 | bg-slate-50/70 | border-b border-slate-100 */
	padding-top: 32px;
	padding-bottom: 32px;
	background-color: rgba(248, 250, 252, 0.70); /* slate-50/70 */
	border-bottom: 1px solid var(--spd-promo-slate-100);
}

@media (min-width: 640px) {
	.spd-promos {
		padding-top: 48px;  /* sm:py-12 → 48px */
		padding-bottom: 48px;
	}
}

/* React uses `max-w-7xl mx-auto px-4 sm:px-6` (24px from sm up). */
@media (min-width: 1024px) {
	.spd-promos .spd-container {
		padding-left: 24px;
		padding-right: 24px;
	}
}

/* ============================================================
   1. Grid — grid-cols-1 lg:grid-cols-2 gap-5 sm:gap-6
   ============================================================ */
.spd-promos__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px; /* gap-5 */
}

@media (min-width: 640px) {
	.spd-promos__grid {
		gap: 24px; /* sm:gap-6 */
	}
}

@media (min-width: 1024px) {
	.spd-promos__grid {
		grid-template-columns: 1fr 1fr; /* lg:grid-cols-2 */
	}
}

/* ============================================================
   2. Banner base
   ============================================================ */
.spd-promo-banner {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;     /* flex-col (mobile) */
	align-items: center;        /* items-center */
	justify-content: space-between; /* justify-between */
	gap: 20px;                  /* gap-5 */
	padding: 20px;              /* p-5 */
	border-radius: var(--spd-radius-2xl); /* rounded-3xl → 24px */
	box-shadow: var(--spd-shadow-sm);
}

@media (min-width: 640px) {
	.spd-promo-banner {
		flex-direction: row;     /* sm:flex-row */
		gap: 24px;               /* sm:gap-6 */
		padding: 28px;           /* sm:p-7 */
	}
}

@media (min-width: 768px) {
	.spd-promo-banner {
		padding: 32px;           /* md:p-8 */
	}
}

/* Banner 1 — Packs (blue). */
.spd-promo-banner--pack {
	background-color: var(--spd-promo-blue);
	color: #fff;
}

/* Banner 2 — Terroir (gold gradient). */
.spd-promo-banner--terroir {
	background-image: linear-gradient(to right, var(--spd-promo-gold-from), var(--spd-promo-gold-to));
	color: var(--spd-promo-slate-900);
	border: 1px solid rgba(253, 230, 138, 0.80); /* border-amber-200/80 */
}

/* ============================================================
   3. Text column — w-full sm:flex-1 space-y-2.5 z-10 text-left
   ============================================================ */
.spd-promo-banner__body {
	width: 100%;       /* w-full (mobile) */
	z-index: 10;
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 10px;         /* space-y-2.5 */
}

@media (min-width: 640px) {
	.spd-promo-banner__body {
		flex: 1;        /* sm:flex-1 */
	}
}

/* ── Badge ── inline-block text-[10px] sm:text-xs font-black uppercase
   tracking-wider px-2.5 py-1 rounded-md ── */
.spd-promo-banner__badge {
	display: inline-block;
	align-self: flex-start;
	font-size: 10px;            /* text-[10px] */
	font-weight: var(--spd-font-weight-black);
	text-transform: uppercase;
	letter-spacing: var(--spd-tracking-wider); /* 0.05em */
	line-height: 1;
	padding: 4px 10px;          /* py-1 px-2.5 */
	border-radius: var(--spd-radius-sm); /* rounded-md → 6px */
}

@media (min-width: 640px) {
	.spd-promo-banner__badge {
		font-size: var(--spd-font-size-xs); /* sm:text-xs → 12px */
	}
}

/* Banner 1 badge: bg-white/20 text-white */
.spd-promo-banner--pack .spd-promo-banner__badge {
	background-color: rgba(255, 255, 255, 0.20);
	color: #fff;
}

/* Banner 2 badge: bg-[#D93829] text-white (solid) */
.spd-promo-banner__badge--solid {
	background-color: var(--spd-promo-red);
	color: #fff;
}

/* ── Title — text-xl sm:text-2xl font-black leading-snug ──
   Color is set explicitly per-banner because Astra's global `h3` rule
   (element selector) would otherwise override the inherited banner color. */
.spd-promo-banner__title {
	margin: 0;
	font-size: var(--spd-font-size-xl); /* 20px text-xl */
	font-weight: var(--spd-font-weight-black);
	line-height: 1.375; /* leading-snug */
	letter-spacing: var(--spd-tracking-tight);
}

@media (min-width: 640px) {
	.spd-promo-banner__title {
		font-size: var(--spd-font-size-2xl); /* sm:text-2xl → 24px */
	}
}

/* Banner 1 title: inherits text-white from the blue banner. */
.spd-promo-banner--pack .spd-promo-banner__title {
	color: #fff;
}

/* Banner 2 title: text-slate-900 (explicit in the React). */
.spd-promo-banner--terroir .spd-promo-banner__title {
	color: var(--spd-promo-slate-900);
}

/* ── Description — text-xs sm:text-sm leading-relaxed max-w-md ── */
.spd-promo-banner__desc {
	margin: 0;
	max-width: 28rem; /* max-w-md → 448px */
	font-size: var(--spd-font-size-xs); /* 12px text-xs */
	line-height: var(--spd-line-height-relaxed); /* 1.625 */
}

@media (min-width: 640px) {
	.spd-promo-banner__desc {
		font-size: var(--spd-font-size-sm); /* sm:text-sm → 14px */
	}
}

.spd-promo-banner--pack .spd-promo-banner__desc {
	color: var(--spd-promo-sky-100); /* text-sky-100 */
}

.spd-promo-banner--terroir .spd-promo-banner__desc {
	color: var(--spd-promo-slate-700); /* text-slate-700 */
}

/* ── CTA action wrapper ── */
.spd-promo-banner__action {
	padding-top: 8px; /* pt-2 */
}

/* ── CTA button — px-5 py-2.5 rounded-xl font-black text-xs sm:text-sm
   inline-flex items-center gap-2 shadow-xs ── */
.spd-promo-banner__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px; /* gap-2 */
	padding: 10px 20px; /* py-2.5 px-5 */
	border-radius: var(--spd-radius-lg); /* rounded-xl → 12px */
	font-size: var(--spd-font-size-xs); /* text-xs → 12px */
	font-weight: var(--spd-font-weight-black);
	line-height: 1;
	box-shadow: var(--spd-shadow-xs);
	transition: background-color var(--spd-promo-t-200), color var(--spd-promo-t-200), transform var(--spd-promo-t-200);
	text-decoration: none;
}

@media (min-width: 640px) {
	.spd-promo-banner__btn {
		font-size: var(--spd-font-size-sm); /* sm:text-sm → 14px */
	}
}

.spd-promo-banner__btn .spd-icon {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
}

/* Banner 1 button: bg-white text-[#0F5B94] hover:bg-sky-50 */
.spd-promo-banner__btn--light {
	background-color: #fff;
	color: var(--spd-promo-blue);
}

.spd-promo-banner__btn--light:hover {
	background-color: var(--spd-promo-sky-50); /* hover:bg-sky-50 */
}

/* Banner 2 button: bg-[#0F5B94] hover:bg-[#0A436D] text-white */
.spd-promo-banner__btn--blue {
	background-color: var(--spd-promo-blue);
	color: #fff;
}

.spd-promo-banner__btn--blue:hover {
	background-color: var(--spd-promo-blue-dark); /* hover:bg-[#0A436D] */
}

.spd-promo-banner__btn:focus-visible {
	outline: none;
	box-shadow: var(--spd-shadow-xs), var(--spd-promo-focus-ring);
}

/* ============================================================
   4. Visual column — w-full sm:w-auto shrink-0 justify-center sm:justify-end
   ============================================================ */
.spd-promo-banner__visual {
	width: 100%;
	flex-shrink: 0;
	display: flex;
	justify-content: center; /* mobile: justify-center */
	z-index: 10;
}

@media (min-width: 640px) {
	.spd-promo-banner__visual {
		width: auto;
		justify-content: flex-end; /* sm:justify-end */
	}
}

/* ============================================================
   5. Banner 1 — SPD EXPRESS delivery card (pure CSS decorative)
   ============================================================ */
.spd-promo-card {
	width: 100%;
	max-width: 240px;            /* max-w-[240px] */
	background-color: rgba(255, 255, 255, 0.95); /* bg-white/95 */
	border-radius: var(--spd-radius-xl); /* rounded-2xl → 16px */
	padding: 8px;                /* p-2 */
	border: 1px solid rgba(255, 255, 255, 0.30); /* border-white/30 */
	box-shadow: var(--spd-shadow-xl);
	display: flex;
	flex-direction: column;
	align-items: center;
}

@media (min-width: 640px) {
	.spd-promo-card {
		width: 176px;  /* sm:w-44 */
		max-width: none;
		padding: 10px; /* sm:p-2.5 */
	}
}

@media (min-width: 768px) {
	.spd-promo-card {
		width: 208px;  /* md:w-52 */
	}
}

/* Header row — w-full flex items-center justify-between px-2 py-0.5
   border-b border-slate-100 */
.spd-promo-card__head {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 2px 8px; /* py-0.5 px-2 */
	border-bottom: 1px solid var(--spd-promo-slate-100);
}

.spd-promo-card__brand {
	color: var(--spd-promo-red); /* text-[#D93829] */
	font-weight: var(--spd-font-weight-black);
	font-style: italic;
	font-size: 11px; /* text-[11px] */
	line-height: 1.2;
}

.spd-promo-card__meta {
	color: var(--spd-promo-blue); /* text-[#0F5B94] */
	font-weight: var(--spd-font-weight-bold);
	font-size: 9px; /* text-[9px] */
	line-height: 1.2;
}

/* Art area — w-full h-24 sm:h-24 md:h-28 overflow-hidden rounded-lg mt-1
   relative. Contains the real React delivery-truck photo (object-cover). */
.spd-promo-card__art {
	width: 100%;
	height: 96px;              /* h-24 */
	margin-top: 4px;            /* mt-1 */
	border-radius: var(--spd-radius-md); /* rounded-lg → 8px */
	overflow: hidden;
	position: relative;
}

.spd-promo-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover; /* object-cover */
	display: block;
}

@media (min-width: 768px) {
	.spd-promo-card__art {
		height: 112px; /* md:h-28 */
	}
}

/* ============================================================
   6. Banner 2 — Terroir media (real category image + discount badge)
   ============================================================ */
.spd-promo-banner__media {
	position: relative;
	width: 176px;               /* w-44 */
	height: 104px;              /* h-26 (Tailwind v4 → 6.5rem) */
	flex-shrink: 0;
}

@media (min-width: 640px) {
	.spd-promo-banner__media {
		width: 160px;  /* sm:w-40 */
		height: 112px; /* sm:h-28 */
	}
}

@media (min-width: 768px) {
	.spd-promo-banner__media {
		width: 192px;  /* md:w-48 */
		height: 128px; /* md:h-32 */
	}
}

/* Real campaign image — object-cover rounded-2xl shadow-md border-2
   border-white (exact React classes). */
.spd-promo-banner__img {
	width: 100%;
	height: 100%;
	object-fit: cover; /* object-cover */
	display: block;
	border-radius: var(--spd-radius-xl); /* rounded-2xl → 16px */
	border: 2px solid #fff;              /* border-2 border-white */
	box-shadow: var(--spd-shadow-md);
}

/* Discount badge — absolute -bottom-2 -right-2 bg-[#D93829] text-white
   font-black text-xs px-2.5 py-1 rounded-xl shadow-lg border-2 border-white */
.spd-promo-banner__discount {
	position: absolute;
	right: -8px;  /* -right-2 */
	bottom: -8px;  /* -bottom-2 */
	background-color: var(--spd-promo-red);
	color: #fff;
	font-weight: var(--spd-font-weight-black);
	font-size: var(--spd-font-size-xs); /* text-xs → 12px */
	line-height: 1;
	padding: 4px 10px; /* py-1 px-2.5 */
	border-radius: var(--spd-radius-lg); /* rounded-xl → 12px */
	border: 2px solid #fff; /* border-2 border-white */
	box-shadow: var(--spd-shadow-lg);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ============================================================
   7. Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	.spd-promo-banner__btn {
		transition: none;
	}
}
