/**
 * Affichage départs type Trekking MB — Watse
 * Couleur marque : #0B7A75
 */

/*
 * Pleine largeur dans Divi : le shortcode est souvent en colonne 2/3
 * avec une 1/3 vide (« Réservez dès maintenant » + tableau).
 */
.et_pb_row:has(.whp-departures) > .et_pb_column:has(.whp-departures) {
	width: 100% !important;
	max-width: 100% !important;
	flex-basis: 100% !important;
}

.et_pb_row:has(.whp-departures) > .et_pb_column:not(:has(.whp-departures)):not(:has(.et_pb_module)) {
	display: none !important;
}

/*
 * Sticky Divi Réserver/Book : Divi pose z-index ~10000 en inline (au-dessus du header 9999).
 * On le redescend sous le header ; le bloc dates reste juste au-dessus.
 * FR : #prochains-departs — EN : #next-departures
 */
body .et_pb_module.et_pb_sticky_module:has(.book-trip-btn),
body .et_pb_module.et_pb_sticky:has(.book-trip-btn),
body .et_pb_module.et_pb_sticky--top:has(.book-trip-btn),
body .et_pb_sticky_module:has(a.book-trip-btn),
body .et_pb_sticky--top:has(a.book-trip-btn) {
	z-index: 40 !important;
}

.whp-departures {
	position: relative;
	z-index: 45;
	width: 100%;
	max-width: 100%;
	margin: 24px 0;
	font-family: "Red Hat Display", "Nunito Sans", Helvetica, Arial, sans-serif;
	box-sizing: border-box;
	overflow-x: hidden;
}

#prochains-departs,
#next-departures {
	position: relative;
	z-index: 45;
}

.whp-departures .whp-departures-empty {
	padding: 16px 20px;
	border-radius: 12px;
	background: #f3f8f8;
	color: #2f3734;
}

.whp-departures-by-month {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.whp-month-title {
	margin: 0 0 16px;
	padding: 0;
	font-size: 22px;
	font-weight: 700;
	color: #0b7a75;
}

.whp-departures-table-wrap {
	overflow-x: auto;
	border-radius: 16px;
	box-shadow: 0 3px 20px rgba(47, 55, 52, 0.08);
	background: #fff;
}

.whp-departures-table,
.entry-content .whp-departures-table:not(.variations) {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	border-spacing: 0;
	/* Annule .entry-content table (Divi/thème) */
	margin: 0;
	border: none;
	text-align: center;
}

.whp-departures-table th:nth-child(1),
.whp-departures-table td:nth-child(1),
.whp-departures-table th:nth-child(2),
.whp-departures-table td:nth-child(2) {
	width: 16%;
}

.whp-departures-table th:nth-child(3),
.whp-departures-table td:nth-child(3) {
	width: 24%;
}

.whp-departures-table th:nth-child(4),
.whp-departures-table td:nth-child(4) {
	width: 16%;
}

.whp-departures-table th:nth-child(5),
.whp-departures-table td:nth-child(5) {
	width: 28%;
}

.whp-departures-table thead th {
	padding: 18px 16px;
	text-align: center;
	background: #0b7a75;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
	border: none;
}

.whp-departures-table thead th:first-child {
	border-radius: 16px 0 0 0;
}

.whp-departures-table thead th:last-child {
	border-radius: 0 16px 0 0;
}

.whp-departures-table tbody td {
	padding: 20px 16px;
	text-align: center;
	color: #2f3734;
	font-size: 16px;
	border-bottom: 1px solid #e8efee;
	vertical-align: middle;
}

.whp-departures-table tbody tr:last-child td {
	border-bottom: none;
}

.whp-departures-table tbody tr:nth-child(even) {
	background: #f9fcfb;
}

.whp-departures-table tbody tr:hover {
	background: #f3f8f8;
}

.whp-departures-table .whp-price {
	font-weight: 700;
	color: #0b7a75;
	font-size: 17px;
}

.whp-departures-table .whp-status {
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.whp-departures-table .whp-status.status-confirmed {
	color: #0b7a75;
	font-weight: 600;
}

.whp-departures-table .whp-status.status-open {
	color: #c47a1a;
	font-weight: 600;
}

.whp-departures-table .whp-status.status-full {
	color: #8a1f1f;
	font-weight: 600;
}

.whp-departures-table .whp-cartcol {
	white-space: nowrap;
}

.whp-reserve-btn {
	display: inline-block;
	background: #0b7a75;
	font-size: 15px;
	color: #fff;
	font-weight: 700;
	padding: 11px 22px;
	border-radius: 30px;
	box-shadow: 0 3px 12px rgba(11, 122, 117, 0.25);
	border: none;
	cursor: pointer;
	line-height: 1.2;
	white-space: nowrap;
	text-align: center;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.whp-reserve-btn:hover,
.whp-reserve-btn:focus {
	transform: translateY(-1px);
	box-shadow: 0 5px 16px rgba(11, 122, 117, 0.3);
	color: #fff;
	opacity: 1;
}

.whp-reserve-btn:disabled,
.whp-reserve-btn.is-disabled {
	background: #9bb8b6;
	box-shadow: none;
	cursor: not-allowed;
	transform: none;
}

.whp-reservation-panel {
	margin-top: 32px;
	padding: 20px;
	border-radius: 16px;
	background: #f3f8f8;
	border: 2px solid #0b7a75;
	max-width: 100%;
	box-sizing: border-box;
	overflow-x: hidden;
}

.whp-reservation-panel[hidden] {
	display: none !important;
}

.whp-reservation-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
	gap: 12px;
}

.whp-reservation-title {
	margin: 0;
	font-size: 22px;
	color: #2f3734;
	font-weight: 700;
}

.whp-reservation-close {
	background: transparent;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #2f3734;
	padding: 4px 8px;
}

.whp-reservation-frame-wrap {
	width: 100%;
	max-width: 100%;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
}

.whp-reservation-iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 600px;
	border: 0;
	border-radius: 12px;
	background: #fff;
}

@media all and (max-width: 980px) {
	.whp-departures-table thead th,
	.whp-departures-table tbody td {
		padding: 14px 10px;
		font-size: 14px;
	}
}

@media all and (max-width: 767px) {
	.whp-departures-table-wrap {
		box-shadow: none;
		background: transparent;
	}

	.whp-departures-table thead {
		display: none;
	}

	.whp-departures-table,
	.whp-departures-table tbody,
	.whp-departures-table tr,
	.whp-departures-table td {
		display: block;
		width: 100%;
	}

	.whp-departures-table {
		table-layout: auto;
	}

	.whp-departures-table th:nth-child(1),
	.whp-departures-table td:nth-child(1),
	.whp-departures-table th:nth-child(2),
	.whp-departures-table td:nth-child(2),
	.whp-departures-table th:nth-child(3),
	.whp-departures-table td:nth-child(3),
	.whp-departures-table th:nth-child(4),
	.whp-departures-table td:nth-child(4),
	.whp-departures-table th:nth-child(5),
	.whp-departures-table td:nth-child(5) {
		width: 100%;
	}

	.whp-departures-table tbody tr {
		padding: 0;
		margin-bottom: 16px;
		background: #fff;
		border-radius: 16px;
		box-shadow: 0 3px 16px rgba(47, 55, 52, 0.08);
		border: 1px solid #e8efee;
		overflow: hidden;
	}

	.whp-departures-table tbody tr:nth-child(even) {
		background: #fff;
	}

	.whp-departures-table tbody td,
	.entry-content .whp-departures-table tbody td {
		display: flex !important;
		flex-direction: row !important;
		justify-content: space-between;
		align-items: center;
		gap: 12px;
		padding: 12px 16px;
		text-align: right;
		box-sizing: border-box;
		/* Reset Divi/thème, puis séparateurs internes uniquement */
		border: none !important;
		border-bottom: 1px solid #eef3f2 !important;
	}

	.whp-departures-table tbody td::before {
		content: attr(data-label);
		font-weight: 700;
		color: #0b7a75;
		text-align: left;
		flex: 0 0 auto;
	}

	.whp-departures-table tbody td:last-child,
	.entry-content .whp-departures-table tbody td:last-child {
		border-bottom: none !important;
		padding-top: 16px;
		justify-content: center;
	}

	.whp-departures-table tbody td:last-child::before {
		display: none;
	}

	.whp-reserve-btn {
		width: 100%;
		max-width: 280px;
	}

	.whp-reservation-panel {
		margin-top: 20px;
		padding: 10px 0 12px;
		border-radius: 12px;
		overflow-x: hidden;
	}

	.whp-reservation-header {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 8px;
		position: relative;
		text-align: center;
		padding: 0 8px;
	}

	.whp-reservation-title {
		margin: 8px 28px 4px;
		font-size: 18px;
		line-height: 1.3;
	}

	.whp-reservation-close {
		position: absolute;
		top: 0;
		right: 4px;
	}

	.whp-reservation-iframe {
		min-height: 520px;
		border-radius: 8px;
	}
}
