/**
 * Atlas Offer Banner — styles front (desktop + mobile).
 * Toutes les couleurs viennent des variables CSS posées par le shortcode.
 */

.aob-wrap {
	--aob-bg1: #241638;
	--aob-bg2: #6d3fa3;
	--aob-accent: #f6c453;
	--aob-accent-rgb: 246, 196, 83;
	--aob-text: #ffffff;
	--aob-max: 900px;

	display: flow-root;
	width: 100%;
	margin: 0 0 24px;
	box-sizing: border-box;
}

.aob-wrap * {
	box-sizing: border-box;
}

.aob-align-center .aob-banner {
	margin-left: auto;
	margin-right: auto;
}

.aob-align-right .aob-banner {
	margin-left: auto;
	margin-right: 0;
}

.aob-align-left .aob-banner {
	margin-left: 0;
	margin-right: auto;
}

/* ------------------------------------------------------------------ */
/* Carte                                                               */
/* ------------------------------------------------------------------ */

.aob-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 22px;
	max-width: var(--aob-max);
	padding: 18px 20px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 24px;
	background: linear-gradient(112deg, var(--aob-bg1) 0%, var(--aob-bg1) 28%, var(--aob-bg2) 100%);
	box-shadow: 0 22px 45px -22px rgba(0, 0, 0, 0.65);
	color: var(--aob-text);
	line-height: 1.35;
	text-decoration: none;
	overflow: hidden;
	position: relative;
}

.aob-banner::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(120% 160% at 88% 50%, rgba(255, 255, 255, 0.10), transparent 60%);
}

.aob-banner--link {
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.aob-banner--link:hover,
.aob-banner--link:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 26px 50px -20px rgba(0, 0, 0, 0.7);
	color: var(--aob-text);
	text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Bloc gauche : badge + titre + prix                                  */
/* ------------------------------------------------------------------ */

.aob-main {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	position: relative;
	z-index: 1;
}

.aob-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	align-self: flex-start;
	padding: 5px 13px;
	border: 1px solid rgba(var(--aob-accent-rgb), 0.45);
	border-radius: 999px;
	background: rgba(var(--aob-accent-rgb), 0.14);
	color: var(--aob-accent);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	white-space: nowrap;
}

.aob-badge__icon {
	font-size: 12px;
	line-height: 1;
}

.aob-line {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 12px;
	min-width: 0;
}

.aob-title {
	margin: 0;
	font-size: 19px;
	font-weight: 800;
	color: var(--aob-text);
	letter-spacing: -0.01em;
}

.aob-price {
	display: inline-block;
	padding: 5px 14px;
	border-radius: 999px;
	background: var(--aob-accent);
	color: #2b1b45;
	font-size: 17px;
	font-weight: 800;
	white-space: nowrap;
	box-shadow: 0 6px 16px -8px rgba(var(--aob-accent-rgb), 0.9);
}

.aob-old {
	font-size: 15px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.5);
	text-decoration: line-through;
	white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Bloc droit : compte à rebours                                       */
/* ------------------------------------------------------------------ */

.aob-timer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	min-width: 168px;
	padding: 12px 20px;
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 16px;
	background: rgba(12, 6, 24, 0.42);
	position: relative;
	z-index: 1;
}

.aob-timer__label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.62);
	white-space: nowrap;
}

.aob-timer__value {
	font-size: 20px;
	font-weight: 800;
	color: var(--aob-accent);
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum";
	letter-spacing: 0.02em;
	white-space: nowrap;
}

/* Dernière ligne droite : pulsation discrète. */
.aob-banner.is-urgent .aob-timer__value {
	animation: aob-pulse 1.2s ease-in-out infinite;
}

@keyframes aob-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.45; }
}

.aob-banner.is-expired .aob-timer__value {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.75);
	animation: none;
}

/* ------------------------------------------------------------------ */
/* Bouton optionnel                                                     */
/* ------------------------------------------------------------------ */

.aob-btn {
	flex: 0 0 auto;
	padding: 12px 22px;
	border-radius: 999px;
	background: var(--aob-accent);
	color: #2b1b45;
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
	position: relative;
	z-index: 1;
	transition: filter 0.2s ease, transform 0.2s ease;
}

.aob-btn:hover,
.aob-btn:focus-visible {
	filter: brightness(1.08);
	transform: translateY(-1px);
	color: #2b1b45;
	text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Visibilité par appareil                                             */
/* ------------------------------------------------------------------ */

@media (max-width: 767px) {
	.aob-hide-mobile { display: none !important; }
}

@media (min-width: 768px) {
	.aob-hide-desktop { display: none !important; }
}

/* ------------------------------------------------------------------ */
/* Tablette / mobile                                                    */
/* ------------------------------------------------------------------ */

@media (max-width: 900px) {
	.aob-banner {
		gap: 16px;
		padding: 16px 18px;
	}

	.aob-title { font-size: 17px; }
	.aob-timer { min-width: 150px; padding: 10px 16px; }
	.aob-timer__value { font-size: 18px; }
}

@media (max-width: 767px) {
	.aob-banner {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		padding: 18px 16px;
		border-radius: 20px;
		text-align: center;
	}

	.aob-main {
		align-items: center;
		gap: 12px;
	}

	.aob-badge { align-self: center; }

	.aob-line {
		justify-content: center;
		gap: 8px 10px;
	}

	.aob-title {
		width: 100%;
		font-size: 17px;
	}

	.aob-timer {
		width: 100%;
		min-width: 0;
	}

	.aob-btn {
		display: block;
		text-align: center;
	}
}

@media (max-width: 380px) {
	.aob-title { font-size: 16px; }
	.aob-price { font-size: 16px; }
	.aob-timer__value { font-size: 19px; }
}

/* ------------------------------------------------------------------ */
/* Accessibilité                                                        */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.aob-banner,
	.aob-banner--link,
	.aob-btn,
	.aob-banner.is-urgent .aob-timer__value {
		animation: none !important;
		transition: none !important;
	}
}
