/* =====================================================================
   STUDIOS : cards + popups gérées directement dans Divi
   (même fonctionnement que hotel-castelet.com)
   (remplace le plugin Divi Overlays, octobre 2026)

   - Une card = module « Appel à l'action » avec la classe CSS wilson-card,
     placé dans la ligne qui a la classe wilson-cards.
     Le lien de son bouton = #ID de la popup (ex. #studio-s).
   - Une popup = section avec la classe CSS wilson-popup
     et l'ID CSS correspondant (ex. studio-s).
   - Section désactivée sur les 3 appareils = popup hors ligne,
     la card correspondante n'est plus cliquable.

   Ce fichier n'est pas chargé dans le Visual Builder : les popups y
   apparaissent comme des sections normales, pour pouvoir les éditer.
   ===================================================================== */

/* ---------- Grille de cards ---------- */

.wilson-cards .et_pb_column {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 30px;
}

.wilson-cards .et_pb_column > .et_pb_module {
	margin: 0 !important;
}

@media (max-width: 767px) {
	.wilson-cards .et_pb_column {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}
}

/* ---------- Card ---------- */

#page-container .wilson-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 350px;
	padding: 0 !important;
	overflow: hidden;
	background-color: #3a3a3a;
	background-size: cover;
	background-position: center;
	text-align: left;
}

#page-container .wilson-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0);
	transition: background-color .25s ease;
	pointer-events: none;
}

#page-container .wilson-card.has-popup {
	cursor: pointer;
}

#page-container .wilson-card.has-popup:hover::after {
	background: rgba(0, 0, 0, .12);
}

#page-container .wilson-card .et_pb_promo_description,
#page-container .wilson-card .et_pb_button_wrapper {
	position: relative;
	z-index: 1;
	margin: 0;
	background: rgba(103, 137, 142, .85);
}

#page-container .wilson-card .et_pb_promo_description {
	padding: 16px 22px 10px !important;
}

#page-container .wilson-card .et_pb_module_header {
	padding: 0 0 4px;
	color: #fff !important;
	font-size: 21px;
	line-height: 1.3;
}

#page-container .wilson-card .et_pb_promo_description div,
#page-container .wilson-card .et_pb_promo_description p {
	color: #fff !important;
	font-size: 15px;
	line-height: 1.5;
}

#page-container .wilson-card .et_pb_promo_description p {
	padding-bottom: 0;
}

/* « En savoir plus » : masqué tant que la popup n'existe pas */
#page-container .wilson-card .et_pb_button_wrapper {
	display: none;
	padding: 0 22px 16px;
	text-align: left;
}

#page-container .wilson-card.has-popup .et_pb_button_wrapper {
	display: block;
}

#page-container .wilson-card .et_pb_button,
#page-container .wilson-card .et_pb_button:hover {
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 700;
	letter-spacing: .5px;
	text-decoration: underline;
	text-underline-offset: 4px;
}

#page-container .wilson-card .et_pb_button::after,
#page-container .wilson-card .et_pb_button::before {
	display: none !important;
}

@media (max-width: 767px) {
	#page-container .wilson-card {
		min-height: 260px;
	}
}

/* ---------- Popup ---------- */

.wilson-popup:not(.is-open) {
	display: none !important;
}

html.wilson-popup-open,
html.wilson-popup-open body {
	overflow: hidden !important;
}

/* Divi met le contenu dans un contexte z-index:1, sous le header fixe :
   on le neutralise le temps que la popup est ouverte. */
html.wilson-popup-open .et_builder_inner_content {
	z-index: auto !important;
}

.wilson-popup.is-open {
	position: fixed !important;
	inset: 0;
	z-index: 2147483000;
	display: block;
	margin: 0 !important;
	padding: 48px 16px !important;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	background: rgba(20, 14, 10, .78) !important;
	animation: wilson-fade .2s ease;
}

.wilson-popup.is-open .wilson-popup-box {
	position: relative;
	isolation: isolate;
	width: 100% !important;
	max-width: 900px !important;
	margin: 0 auto !important;
	padding: 0 0 40px !important;
	overflow: hidden;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
	animation: wilson-rise .25s ease;
}

.wilson-popup.is-open .wilson-popup-box .et_pb_column {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	width: 100% !important;
	margin: 0 !important;
}

.wilson-popup.is-open .wilson-popup-box .et_pb_column > .et_pb_module {
	width: 100%;
	margin: 0 !important;
}

@keyframes wilson-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes wilson-rise {
	from { transform: translateY(16px); }
	to   { transform: none; }
}

/* Bouton fermer (ajouté par le script) */
.wilson-popup-close {
	position: fixed;
	top: 14px;
	right: 14px;
	z-index: 10;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #333;
	font-size: 30px;
	line-height: 44px;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}

.wilson-popup-close:hover,
.wilson-popup-close:focus-visible {
	background: #67898e;
	color: #fff;
}

/* Photos (module Galerie en mode curseur) */
.wilson-popup .et_pb_gallery .et_pb_gallery_image img {
	display: block;
	width: 100%;
	height: 440px;
	object-fit: cover;
}

.wilson-popup .et_pb_gallery .et-pb-arrow-prev,
.wilson-popup .et_pb_gallery .et-pb-arrow-next {
	opacity: 1;
	color: #fff;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}

.wilson-popup .et_pb_gallery .et-pb-arrow-prev { left: 16px; }
.wilson-popup .et_pb_gallery .et-pb-arrow-next { right: 16px; }

/* Texte */
.wilson-popup .et_pb_text {
	padding: 36px 56px 8px;
	color: #333;
	font-size: 15px;
	line-height: 1.7;
	text-align: left;
}

.wilson-popup .et_pb_text h2 {
	padding-bottom: 4px;
	color: #ca5d5a;
	font-size: 32px;
	line-height: 1.25;
}

.wilson-popup .et_pb_text h4 {
	margin-bottom: 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid #d5e0e1;
	color: #777;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
}

.wilson-popup .et_pb_text ul {
	margin: 0 0 16px;
	padding: 0 0 0 1.2em;
	list-style: none;
}

.wilson-popup .et_pb_text li {
	position: relative;
	padding: 2px 0;
}

.wilson-popup .et_pb_text li::before {
	content: "";
	position: absolute;
	top: .75em;
	left: -1.1em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #67898e;
}

.wilson-popup .et_pb_text em {
	color: #666;
}

/* Équipements (modules Présentation avec image) */
.wilson-popup .et_pb_blurb .et_pb_main_blurb_image {
	max-width: 40px;
	margin-right: auto;
	margin-left: auto;
}

.wilson-popup.is-open .wilson-popup-box .et_pb_column > .et_pb_blurb {
	flex: 0 0 116px;
	width: 116px;
	padding: 16px 6px 0;
}

.wilson-popup .et_pb_blurb .et_pb_main_blurb_image {
	margin-bottom: 8px;
}

.wilson-popup .et_pb_blurb .et-pb-icon {
	color: #67898e;
	font-size: 30px;
}

.wilson-popup .et_pb_blurb .et_pb_module_header {
	padding: 0;
	color: #333;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.35;
}

/* Bouton Réserver */
.wilson-popup .et_pb_button_module_wrapper {
	padding-top: 28px;
}

@media (max-width: 767px) {
	.wilson-popup.is-open {
		padding: 0 !important;
		background: #fff !important;
	}

	.wilson-popup.is-open .wilson-popup-box {
		min-height: 100%;
		border-radius: 0;
		box-shadow: none;
	}

	.wilson-popup-close {
		top: 10px;
		right: 10px;
	}

	.wilson-popup .et_pb_gallery .et_pb_gallery_image img {
		height: 260px;
	}

	.wilson-popup .et_pb_text {
		padding: 24px 20px 4px;
		font-size: 14px;
	}

	.wilson-popup .et_pb_text h2 {
		font-size: 26px;
	}

	.wilson-popup.is-open .wilson-popup-box .et_pb_column > .et_pb_blurb {
		flex-basis: 33.333%;
		width: 33.333%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wilson-popup.is-open,
	.wilson-popup.is-open .wilson-popup-box {
		animation: none;
	}
}
