/* ==========================================================================
   Dutilleul Promo Popup — Frontend Styles
   Design system aligned with https://www.depannage-chauffage-dutilleul.fr/
   ========================================================================== */

:root {
	--dpp-primary: #222C5B;
	--dpp-primary-rgb: 34, 44, 91;
	--dpp-secondary: #95B4D7;
	--dpp-cta-green: #38984A;
	--dpp-cta-green-hover: #2d7a3c;
	--dpp-text-dark: #333333;
	--dpp-white: #ffffff;
	--dpp-overlay-bg: rgba(34, 44, 91, 0.75);
	--dpp-radius-popup: 16px;
	--dpp-radius-button: 50px;
	--dpp-font-primary: 'Roboto', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--dpp-shadow: 0 25px 60px rgba(34, 44, 91, 0.3);
	--dpp-z-overlay: 9999998;
	--dpp-z-popup: 9999999;
}

/* --------------------------------------------------------------------------
   Overlay
   -------------------------------------------------------------------------- */
.dpp-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--dpp-overlay-bg);
	z-index: var(--dpp-z-overlay);
	opacity: 0;
	transition: opacity 0.3s ease;
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.dpp-overlay.dpp-active {
	display: block !important;
	opacity: 1;
}

/* --------------------------------------------------------------------------
   Popup Container
   -------------------------------------------------------------------------- */
.dpp-popup {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.9);
	z-index: var(--dpp-z-popup);
	background: var(--dpp-white);
	border-radius: var(--dpp-radius-popup);
	box-shadow: var(--dpp-shadow);
	max-width: 680px;
	width: 92%;
	opacity: 0;
	transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
	overflow: hidden;
}

.dpp-popup.dpp-active {
	display: block !important;
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

/* Isolate from Divi */
.dpp-popup,
.dpp-popup * {
	font-family: var(--dpp-font-primary);
	box-sizing: border-box;
	line-height: normal;
}

.dpp-popup a {
	text-decoration: none;
}

.dpp-popup a:hover {
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   Close Button
   -------------------------------------------------------------------------- */
.dpp-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: none;
	background: rgba(var(--dpp-primary-rgb), 0.08);
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--dpp-primary);
	transition: background 0.2s ease, color 0.2s ease;
	z-index: 1;
	padding: 0;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
}

.dpp-close:hover,
.dpp-close:focus-visible {
	background: var(--dpp-primary);
	color: var(--dpp-white);
}

.dpp-close:focus-visible {
	outline: 3px solid var(--dpp-secondary);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Inner Layout (two columns)
   -------------------------------------------------------------------------- */
.dpp-inner {
	display: flex;
	flex-direction: row;
	min-height: 300px;
}

.dpp-image-col {
	flex: 0 0 45%;
	max-width: 45%;
	overflow: hidden;
}

.dpp-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dpp-content-col {
	flex: 1;
	padding: 40px 32px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* --------------------------------------------------------------------------
   Price Badge
   -------------------------------------------------------------------------- */
.dpp-price-badge {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	background: var(--dpp-primary);
	color: var(--dpp-white);
	padding: 8px 20px;
	border-radius: var(--dpp-radius-button);
	margin-bottom: 16px;
	align-self: flex-start;
}

.dpp-price-value {
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
}

.dpp-price-suffix {
	font-size: 14px;
	font-weight: 400;
	opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Title & Description
   -------------------------------------------------------------------------- */
.dpp-title {
	font-size: 24px;
	font-weight: 700;
	color: var(--dpp-primary);
	margin: 0 0 12px 0;
	line-height: 1.3;
	padding: 0;
	letter-spacing: normal;
	text-transform: none;
}

.dpp-description {
	font-size: 15px;
	color: var(--dpp-text-dark);
	line-height: 1.6;
	margin: 0 0 24px 0;
}

.dpp-description p {
	margin: 0 0 8px 0;
}

.dpp-description p:last-child {
	margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   CTA Buttons
   -------------------------------------------------------------------------- */
.dpp-cta-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.dpp-cta-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--dpp-cta-green);
	color: var(--dpp-white) !important;
	font-family: var(--dpp-font-primary);
	font-size: 16px;
	font-weight: 700;
	padding: 13px 32px;
	border-radius: var(--dpp-radius-button);
	text-decoration: none;
	transition: background 0.25s ease, transform 0.15s ease;
	text-align: center;
	border: none;
	cursor: pointer;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
}

.dpp-cta-primary:hover {
	background: var(--dpp-cta-green-hover);
	transform: translateY(-1px);
	color: var(--dpp-white) !important;
}

.dpp-cta-primary:focus-visible {
	outline: 3px solid var(--dpp-secondary);
	outline-offset: 2px;
}

.dpp-cta-phone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: transparent;
	color: var(--dpp-primary) !important;
	font-family: var(--dpp-font-primary);
	font-size: 16px;
	font-weight: 700;
	padding: 13px 32px;
	border: 2px solid var(--dpp-primary);
	border-radius: var(--dpp-radius-button);
	text-decoration: none;
	transition: background 0.25s ease, color 0.25s ease;
	text-align: center;
	cursor: pointer;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
}

.dpp-cta-phone:hover {
	background: var(--dpp-primary);
	color: var(--dpp-white) !important;
}

.dpp-cta-phone:focus-visible {
	outline: 3px solid var(--dpp-secondary);
	outline-offset: 2px;
}

.dpp-cta-phone svg {
	flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Divi Compatibility Overrides
   -------------------------------------------------------------------------- */
.dpp-popup .dpp-cta-primary,
.dpp-popup .dpp-cta-phone,
.dpp-popup .dpp-close {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.dpp-popup h2.dpp-title {
	font-size: 24px;
	font-weight: 700;
	color: var(--dpp-primary);
	padding-bottom: 0;
	text-transform: none;
	letter-spacing: normal;
}

/* --------------------------------------------------------------------------
   Responsive — Tablet (≤ 980px)
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
	.dpp-popup {
		max-width: 520px;
		width: 94%;
	}

	.dpp-inner {
		flex-direction: column;
	}

	.dpp-image-col {
		flex: none;
		max-width: 100%;
		max-height: 200px;
	}

	.dpp-content-col {
		padding: 28px 24px;
	}

	.dpp-title {
		font-size: 22px;
	}
}

/* --------------------------------------------------------------------------
   Responsive — Mobile (≤ 767px) — Bottom Sheet
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
	.dpp-popup {
		position: fixed;
		top: auto;
		bottom: 0;
		left: 0;
		right: 0;
		transform: translateY(100%);
		width: 100%;
		max-width: 100%;
		border-radius: 20px 20px 0 0;
		max-height: 90vh;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		opacity: 1;
		transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	}

	.dpp-popup.dpp-active {
		transform: translateY(0);
	}

	.dpp-image-col {
		max-height: 160px;
	}

	.dpp-content-col {
		padding: 24px 20px 32px;
	}

	.dpp-price-badge {
		padding: 6px 16px;
	}

	.dpp-price-value {
		font-size: 24px;
	}

	.dpp-title {
		font-size: 20px;
	}

	.dpp-description {
		font-size: 14px;
	}

	.dpp-cta-primary,
	.dpp-cta-phone {
		width: 100%;
		padding: 14px 24px;
		font-size: 15px;
	}
}

/* --------------------------------------------------------------------------
   Responsive — Small Mobile (≤ 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
	.dpp-image-col {
		max-height: 120px;
	}

	.dpp-content-col {
		padding: 20px 16px 28px;
	}

	.dpp-price-value {
		font-size: 22px;
	}

	.dpp-title {
		font-size: 18px;
	}
}
