/* ==========================================================================
   Special offer v2 — bannière produit + bannière horizontale
   Adapté au CSS principal (Bootstrap 4 + règles section.product-section / .btn-primary).
   Le préfixe "" sert uniquement à gagner en spécificité sur les règles existantes.

   Modificateurs :
   .special-offer--product      bannière plot produit
   .special-offer--horizontal   bannière horizontale
   .special-offer--in-carousel  en plus, si elle est dans un carrousel produit
   ========================================================================== */

/* ---------- Base ---------- */
.special-offer {
	--offer-yellow: #FFC72C !important;
	--offer-ink: #0E1C24 !important;
	--offer-white: #fff !important;
	position: relative;
	border: none;
	margin: 20px 0 !important;
	width: 100%;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

/* ---------- Titre (écrase section.product-section ... .card-body h3 et section.result-page ... h3) ---------- */
 .special-offer.special-offer--product .card-body h3,
 .special-offer.special-offer--horizontal .right-side h3 {
	position: static;
	transform: none;
	float: none;
	height: auto;
	min-height: 0;
	margin: 0 !important;
	padding: 0 !important;
	background: none;
	text-shadow: none;
	text-transform: none !important;
	color: var(--offer-ink) !important;
	font-family: metabold;
	font-weight: 700;
	letter-spacing: .01em;
	line-height: 1.3;
	text-align: inherit;
	z-index: 1;
}

 .special-offer.special-offer--product .card-body h3 { font-size: 22px; }
 .special-offer.special-offer--horizontal .right-side h3 { font-size: 24px; margin-bottom: 20px; }

 .special-offer.special-offer--product h3 .fix-number,
 .special-offer.special-offer--horizontal h3 .fix-number {
	display: block;
	margin-top: 8px;
	color: var(--offer-ink);
	font-family: arial;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	text-transform: none;
}

/* ---------- CTA : fond noir, texte blanc (écrase .btn-primary global + hover !important) ---------- */
 .special-offer.special-offer--product .card-footer .btn-primary,
 .special-offer.special-offer--horizontal .right-side .btn-primary {
	background-color: var(--offer-ink);
	border: 2px solid var(--offer-ink);
	border-radius: 4px;
	color: var(--offer-white) !important;
	font-weight: 700;
	text-transform: uppercase;
	margin: 0;
	float: none;
	position: relative;
	z-index: 1;
}

 .special-offer.special-offer--product .card-footer .btn-primary:hover,
 .special-offer.special-offer--product .card-footer .btn-primary:focus,
 .special-offer.special-offer--product .card-footer .btn-primary:not(:disabled):not(.disabled):active,
 .special-offer.special-offer--horizontal .right-side .btn-primary:hover,
 .special-offer.special-offer--horizontal .right-side .btn-primary:focus,
 .special-offer.special-offer--horizontal .right-side .btn-primary:not(:disabled):not(.disabled):active {
	background-color: #000;
	border-color: #000;
	color: var(--offer-white) !important;
}

 .special-offer.special-offer--product .card-footer .btn-primary:focus-visible,
 .special-offer.special-offer--horizontal .right-side .btn-primary:focus-visible {
	outline: 3px solid var(--offer-white);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--offer-ink) !important;
}

/* ---------- Logo optionnel ---------- */
 .special-offer .offer-logo {
	display: block;
	width: auto;
	height: auto;
	max-width: 140px;
	max-height: 56px;
	object-fit: contain;
}

/* ---------- Encart promo optionnel : -X% / -X€ ---------- */
/* Quart de cercle jaune collé au coin haut-gauche de l'image.
   --badge-bg / --badge-text : couleurs modifiables (texte noir = #0E1C24 pour plus de contraste) */
 .special-offer .offer-badge {
	--badge-bg: var(--offer-yellow);
	/*--badge-text: #fff;*/

	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	box-sizing: border-box;
	width: 60px;
	height: 60px;
	padding: 12px 0 0 4px;
	background: var(--badge-bg);
	border-radius: 0 0 100% 0;   /* arrondi uniquement sur le coin bas-droit */
	color: var(--badge-text);
	font-family: metabold;
	font-size: 17px;
	line-height: 1;
	letter-spacing: 0;
	text-align: left;
	white-space: nowrap;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
	pointer-events: none;
}
.special-offer.special-offer--horizontal .right-side {
	align-items: center;
	text-align: center;
}

.special-offer.special-offer--horizontal .right-side .offer-logo {
	margin-left: auto;
	margin-right: auto;
}

.special-offer.special-offer--horizontal .right-side .btn-primary {
	align-self: center;
}

/* Espace description → CTA (remplace le line-height: 3 qui servait d'espacement) */
.special-offer .offer-legal {
	margin-bottom: 20px;
}

/* Le h3 a déjà margin-bottom: 20px en horizontal : on le réduit pour que
   le rythme logo / titre / description reste équilibré */
.special-offer.special-offer--horizontal .right-side h3 {
	margin-bottom: 10px;
}
.special-offer.special-offer--horizontal a.left-side {
	display: block;
	position: relative;
}
.special-offer.special-offer--horizontal a.left-side img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: inherit;
	object-fit: cover;
}
@media (max-width: 768px) {
	 .special-offer .offer-badge {
		width: 100px;
		height: 100px;
		padding: 16px 0 0 10px;
		font-size: 22px;
	}
}

 .special-offer .offer-legal {
	display: block;
	color: var(--offer-ink);
	font-family: arial;
	font-size: 14px;
	line-height: 3;
}

/* ==========================================================================
   1. Bannière produit
   ========================================================================== */

 .special-offer.special-offer--product.card {
	display: flex;
	flex-direction: column;
	border: none;
	border-radius: 0;
	background: var(--offer-yellow);
}

 .special-offer.special-offer--product .card-img-top {
	flex: 0 0 auto;
	display: block;
	width: 100%;
	height: 180px;
	object-fit: cover;
	border-radius: 0;
}

/* body + footer forment un groupe centré verticalement dans la hauteur restante
   (margin auto en haut du body et en bas du footer) */
 .special-offer.special-offer--product .card-body {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 0 !important;
	margin-top: auto;
	background: var(--offer-yellow);
	text-align: center;
}

 .special-offer.special-offer--product .card-footer {
	flex: 0 0 auto;
	position: static;      /* annule position:absolute; bottom:0 de section.product-section */
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	margin-bottom: auto;
	padding: 10px 25px 25px;
	background: var(--offer-yellow);
	border: 0;
	text-align: center;
}

 .special-offer.special-offer--product .card-footer a {
	display: inline-block;
	float: none !important;
	margin: 0 auto;
}

/* ==========================================================================
   2. Bannière horizontale
   ========================================================================== */

 .special-offer.special-offer--horizontal {
	display: flex;
}

 .special-offer.special-offer--horizontal > div {
	padding: 0;
}

 .special-offer.special-offer--horizontal .left-side {
	min-height: 220px;
	height: 100%;
	padding: 0;
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center;
}

 .special-offer.special-offer--horizontal .right-side {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 220px !important;
	background: var(--offer-yellow) !important;
	overflow: hidden;
}

/* image d'origine déplacée en JS vers .left-side */
 .special-offer.special-offer--horizontal .right-side .offer-bg {
	display: none;
}

 .special-offer.special-offer--horizontal .right-side .btn-primary {
	align-self: flex-start;
}

/* ==========================================================================
   Carrousel produit
   ========================================================================== */

 .special-offer.special-offer--in-carousel {
	margin: 0;
	height: 100%;
}

/* ==========================================================================
   Mobile (le site utilise des tailles agrandies <= 768px)
   ========================================================================== */

@media (max-width: 768px) {
	 .special-offer.special-offer--product .card-body h3,
	 .special-offer.special-offer--horizontal .right-side h3 { font-size: 30px; }

	 .special-offer.special-offer--product h3 .fix-number,
	 .special-offer.special-offer--horizontal h3 .fix-number { font-size: 22px; }

	 .special-offer.special-offer--product .card-body { padding: 24px 20px 10px; }

	 .special-offer.special-offer--horizontal { flex-wrap: wrap; }

	 .special-offer.special-offer--horizontal > div {
		flex: 0 0 100%;
		max-width: 100%;
	}

	 .special-offer.special-offer--horizontal .left-side { min-height: 180px; }

	 .special-offer.special-offer--horizontal .right-side {
		min-height: 0;
		padding: 24px 20px;
		text-align: center;
	}

	 .special-offer.special-offer--horizontal .right-side .offer-logo { margin-left: auto; margin-right: auto; }
	 .special-offer.special-offer--horizontal .right-side .btn-primary { align-self: center; }
	 .special-offer .offer-legal { font-size: 15px; }
	 section.result-page .special-offer .right-side .btn-primary {margin-bottom: 17px !important;}
}

@media (max-width: 460px) {
	 .special-offer.special-offer--product .card-body h3,
	 .special-offer.special-offer--horizontal .right-side h3 { font-size: 20px; }

	 .special-offer.special-offer--product h3 .fix-number,
	 .special-offer.special-offer--horizontal h3 .fix-number { font-size: 15px; }

	 .special-offer.special-offer--horizontal .left-side { min-height: 120px; }
	 .special-offer .offer-legal { font-size: 11px; }
	 .special-offer.special-offer--product .card-footer a {margin: -14px auto;}
	 .special-offer.special-offer--product .card-body {padding: 0 15px 50px !important;}
}