/* ----------------------------------------------------------- *
 * Container + backdrop
 * ----------------------------------------------------------- */
.dw-popup {
	position: fixed;
	inset: 0;
	z-index: 999999999999;
	display: none;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 24px;
	color: #fff;
	font-family: inherit;
}

.dw-popup.is-open {
	display: flex;
}

.dw-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 6, 18, 0.78);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	cursor: pointer;
}

/* ----------------------------------------------------------- *
 * Dialog
 * ----------------------------------------------------------- */
.dw-popup__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(1120px, 100%);
	max-height: calc(100vh - 48px);
	overflow-x: hidden;
	overflow-y: auto;
	background: #0f1122;
	border-radius: 18px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
	animation: dw-popup-in 0.35s ease-out;
}

/* ----------------------------------------------------------- *
 * Open / close animations
 * ----------------------------------------------------------- */
@keyframes dw-popup-in {
	from { opacity: 0; transform: translateY(12px) scale(0.985); }
	to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@keyframes dw-popup-fade-out {
	from { opacity: 1; }
	to   { opacity: 0; }
}

@keyframes dw-popup-out {
	from { opacity: 1; transform: translateY(0)   scale(1); }
	to   { opacity: 0; transform: translateY(8px) scale(0.985); }
}

.dw-popup.is-closing {
	animation: dw-popup-fade-out 0.25s ease-in forwards;
}

.dw-popup.is-closing .dw-popup__dialog {
	animation: dw-popup-out 0.25s ease-in forwards;
}

/* ----------------------------------------------------------- *
 * Close button
 * ----------------------------------------------------------- */
.dw-popup__close {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background 0.15s ease;
}

.dw-popup__close:hover,
.dw-popup__close:focus-visible {
	background: transparent;
	outline: none;
}

/* ----------------------------------------------------------- *
 * Content column
 * ----------------------------------------------------------- */
.dw-popup__content {
	z-index: 10;
	flex-shrink: 0;
	align-self: center;
	width: 100%;
	min-width: 0;
	max-width: 600px;
	padding: 56px 52px;
}

.dw-popup__date {
	margin: 0 0 12px;
	color: #fff;
	font-family: 'Special Gothic', sans-serif;
	font-size: clamp(14px, 1.43vw, 16px);
}

.dw-popup__title {
	margin: 0 0 8px;
	color: #fff;
	font-weight: 700;
	line-height: 1.05;
}

.dw-popup__title-prefix {
	display: block;
	font-family: 'Special Gothic', sans-serif;
	font-size: clamp(20px, 2.86vw, 32px);
	font-weight: 400;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

.dw-popup__title-main {
	display: block;
	margin-top: 6px;
	font-family: 'Special Gothic Expanded One', sans-serif;
	font-size: clamp(20px, 2.86vw, 32px);
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.dw-popup__description {
	margin: 0 0 24px;
	color: #fff;
	font-family: 'Special Gothic', sans-serif;
	font-size: clamp(14px, 2.14vw, 24px);
	line-height: 1.45;
}

.dw-popup__description p {
	margin: 0 0 8px;
}

.dw-popup__description p:last-child {
	margin-bottom: 0;
}

.dw-popup__programme-label {
	margin: 0 0 12px;
	font-family: 'Special Gothic', sans-serif;
	font-size: clamp(14px, 2.14vw, 24px);
	font-weight: 400;
	line-height: normal;
}

/* ----------------------------------------------------------- *
 * Programme list
 * ----------------------------------------------------------- */
.dw-popup__items {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

.dw-popup__item {
	display: flex;
	gap: 14px;
	color: #fff;
	font-size: clamp(14px, 1.43vw, 16px);
	line-height: 1.45;
}

.dw-popup__bullet {
	flex-shrink: 0;
	width: 10px;
	height: 10px;
	margin-top: 5px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 0 12px #fff;
}

.dw-popup__item-text {
	flex: 1 1 auto;
	min-width: 0;
	font-family: 'Special Gothic', sans-serif;
}

.dw-popup__item-lead {
	font-family: 'Special Gothic Expanded One', sans-serif;
	font-weight: 700;
}

/* ----------------------------------------------------------- *
 * CTA
 * ----------------------------------------------------------- */
.dw-popup__cta {
	display: flex;
	align-items: center;
	gap: 12px;
	width: fit-content;
	padding: 11px 32px;
	background: #0f1122;
	border: 2px solid #f4f4fb;
	border-radius: 13px;
	box-shadow: 0 0 12px #ffffff70;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.dw-popup__cta:hover,
.dw-popup__cta:focus-visible {
	outline: none;
}

.dw-popup__cta span {
	color: #fff;
	font-family: 'Special Gothic Expanded One', sans-serif;
	font-size: clamp(14px, 1.43vw, 16px);
}

.dw-popup__cta svg {
	flex: 0 0 18px;
	color: #fff;
}

/* ----------------------------------------------------------- *
 * Media (image at the bottom of the dialog)
 * ----------------------------------------------------------- */
.dw-popup__media {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 0;
	height: 300px;
	-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 120px);
	mask-image: linear-gradient(to bottom, transparent 0, #000 120px);
}

.dw-popup__media-img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 30% center;
	transform: scaleX(-1);
}

/* ----------------------------------------------------------- *
 * Mobile / narrow viewports
 * ----------------------------------------------------------- */
@media (max-width: 600px) {
	.dw-popup {
		padding: 12px;
	}

	.dw-popup__dialog {
		width: 100%;
		height: calc(100vh - 24px);
		height: calc(100dvh - 24px);
		max-height: 85dvh;
	}

	.dw-popup__close {
		top: 10px;
		right: 10px;
		background: rgba(0, 0, 0, 0.35);
	}

	.dw-popup__content {
		padding: 32px 24px 24px;
	}

	.dw-popup__date,
	.dw-popup__title-prefix,
	.dw-popup__title-main,
	.dw-popup__description {
		text-align: center;
	}

	.dw-popup__cta {
		margin: auto;
	}

	.dw-popup__cta svg {
		flex: 0 0 13px;
	}
}

@media (max-width: 480px) {
	.dw-popup__content {
		padding: 28px 20px 24px;
	}
}

@media (max-width: 768px) {
	.dw-popup__media {
		display: none;
	}
}

/* ----------------------------------------------------------- *
 * Desktop : image à droite, fondu horizontal vers le contenu
 * ----------------------------------------------------------- */
@media (min-width: 768px) {
	.dw-popup__media {
		top: 0;
		height: auto;
		-webkit-mask-image: linear-gradient(to right, transparent 25%, #000 75%);
		mask-image: linear-gradient(to right, transparent 25%, #000 75%);
	}

	.dw-popup__content {
		align-self: flex-start;
	}
}

/* ----------------------------------------------------------- *
 * Reduced motion
 * ----------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.dw-popup,
	.dw-popup__dialog {
		animation: none;
	}

	.dw-popup__cta {
		transition: none;
	}
}
