/* ==========================================================================
   Couche legacy (voir OVERRIDES.md) — styles des shortcodes repris de l'ancien thème :
   [tarifs] / [tarifs_soin], [promotions], [prestations], [trs_av_team_member], [thankyou].

   Chargé uniquement sur les pages qui utilisent un de ces shortcodes (inc/legacy/assets.php).

   1re partie : CSS de l'ancien site pour ces blocs, classes renommées (service-card → legacy-tarifs…),
   couleurs passées en tokens (généré par audit-refonte/import-css, projet newd1.trisdemo.ch).
   2e partie : ce que le nouveau balisage impose (photo d'équipe dans un <button>, présentation dans un
   <dialog> natif au lieu de la lightbox jQuery), au plus près de l'apparence d'origine.
   Exceptions aux tokens (tailles en px, #888, ombre #32325d) : voir OVERRIDES.md.
   ========================================================================== */

/* --- Source : thème enfant : dist/assets/css/main.min.css (SCSS compilé) */

.legacy-promotions {
	display:grid;
	grid-template-columns:repeat(2,minmax(0,1fr));
	gap:24px;
	align-items:stretch;
}

@media(max-width:767px) {
	.legacy-promotions {
		grid-template-columns:1fr;
	}
}

.legacy-promotions__card {
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:space-between;
	background-color:var(--component-color-bg);
	border-radius:30px;
	padding:22px 28px;
	border:1px solid var(--enfold-main-color-masonry);
	transition:transform .24s ease-out,box-shadow .24s ease-out;
	height:100%;
}

.legacy-promotions__header {
	display:flex;
	flex-direction:row;
	justify-content:space-between;
}

.legacy-promotions__header span {
	background:color-mix(in srgb,var(--component-color-primary) 15%,transparent);
	border-radius:20px;
	padding:17px 15px;
	font-size:1.39rem;
	color:var(--component-color-primary);
}

.legacy-promotions__header .legacy-promotions__icon {
	background:color-mix(in srgb,var(--component-color-primary) 15%,transparent);
	border-radius:20px;
}

.legacy-promotions__price-line {
	display:flex;
	flex-direction:column;
	width:100%;
}

.legacy-promotions__current-price {
	font-size:1.75rem;
	color:var(--component-color-primary);
}

.legacy-promotions__old-price {
	font-size:.88rem;
}

.legacy-promotions__card:hover {
	transform:translateY(-4px);
	background-color:var(--component-color-bg2);
	box-shadow:#32325d29 0 22px 30px -14px,color-mix(in srgb, var(--component-color-overlay) 16.1%, transparent) 0 12px 22px -16px;
}

.legacy-promotions__btn {
	border-radius:20px!important;
	transition:all .4s ease-in-out!important;
	padding:12px!important;
}

.legacy-promotions__btn:hover {
	background-color:var(--enfold-alternate-color-color)!important;
	color:var(--component-color-primary)!important;
	transition:all .4s ease-in-out!important;
}

.legacy-prestations {
	display:grid;
	grid-template-columns:repeat(3,minmax(0,1fr));
	gap:40px;
	width:100%;
	align-items:stretch;
}

.legacy-prestations .image-overlay {
	display:none!important;
}

.legacy-prestations--two {
	display:grid;
	grid-template-columns:repeat(2,calc((100% - 80px) / 3));
	justify-content:center;
	align-items:stretch;
	gap:20px 40px;
	width:100%;
}

.legacy-prestations--two>.legacy-prestations__item {
	height:100%;
	align-self:stretch;
}

.legacy-prestations__item {
	display:flex;
	flex-direction:column;
	height:100%;
	border-radius:30px;
	border:1px solid var(--enfold-main-color-masonry);
	overflow:hidden;
	background:var(--component-color-bg);
	transition:transform .35s ease,box-shadow .35s ease;
}

.legacy-prestations__item .legacy-prestations__thumb {
	width:100%;
	aspect-ratio:16/10;
	overflow:hidden;
	position:relative;
}

.legacy-prestations__item .legacy-prestations__thumb a {
	display:block;
	width:100%;
	height:100%;
	overflow:hidden;
}

.legacy-prestations__item .legacy-prestations__thumb img {
	width:100%;
	height:100%;
	-o-object-fit:cover;
	object-fit:cover;
	display:block;
	transform:scale(1);
	transform-origin:center center;
	transition:transform .5s ease;
	backface-visibility:hidden;
	will-change:transform;
}

.legacy-prestations__item .legacy-prestations__body {
	display:flex;
	flex-direction:column;
	flex:1;
	padding:15px 40px;
}

.legacy-prestations__item .legacy-prestations__title {
	margin:0 0 15px;
}

.legacy-prestations__item .legacy-prestations__excerpt {
	flex:1;
}

.legacy-prestations__item .legacy-prestations__link {
	margin-top:20px;
	align-self:flex-start;
	position:relative;
	display:inline-flex;
	align-items:center;
	gap:0;
	width:-moz-fit-content;
	width:fit-content;
	text-decoration:none;
	font-weight:500;
}

.legacy-prestations__item .legacy-prestations__link:after {
	content:"→";
	display:inline-block;
	opacity:0;
	transform:translate(-6px);
	transition:opacity .3s ease,transform .3s ease;
	margin-left:0;
}

.legacy-prestations__item .legacy-prestations__link:hover:before {
	transform:scaleX(1);
}

.legacy-prestations__item .legacy-prestations__link:hover:after {
	opacity:1;
	transform:translate(0);
	margin-left:8px;
}

.legacy-prestations__item:hover {
	transform:translateY(-8px);
	box-shadow:0 18px 40px color-mix(in srgb, var(--component-color-overlay) 12.2%, transparent);
}

.legacy-prestations__item:hover .legacy-prestations__thumb img {
	transform:scale(1.04);
}

.legacy-prestations__item:hover .legacy-prestations__link:before {
	transform:scaleX(1);
}

.legacy-prestations__item:hover .legacy-prestations__link:after {
	opacity:1;
	transform:translate(0);
	margin-left:8px;
}

@media(max-width:991px) {
	.legacy-prestations {
		grid-template-columns:repeat(2,minmax(0,1fr));
	}
	.legacy-prestations--two>.legacy-prestations__item {
		flex-basis:calc((100% - 40px)/2);
		max-width:calc((100% - 40px)/2);
	}
}

@media(max-width:767px) {
	.legacy-prestations {
		grid-template-columns:1fr;
	}
	.legacy-prestations--two>.legacy-prestations__item {
		flex-basis:100%;
		max-width:100%;
	}
}

.legacy-team-member h3 {
	padding:15px 15px 0;
	color:var(--component-color-primary)!important;
	margin-bottom:15px;
}

.legacy-team-member .legacy-team-member__job {
	padding:0 15px 30px;
}

.legacy-tarifs {
	display:flex;
	flex-direction:column;
	gap:10px;
	margin:0 auto;
	padding:24px 0;
}

.legacy-tarifs__card {
	display:flex;
	align-items:center;
	justify-content:space-between;
	background-color:var(--component-color-bg);
	border-radius:30px;
	padding:22px 28px;
	border:1px solid var(--enfold-main-color-masonry);
	gap:40px;
}

.legacy-tarifs__info {
	display:flex;
	flex-direction:column;
	gap:4px;
	flex:1;
	width:100%;
}

.legacy-tarifs__title {
	font-weight:700;
	font-size:15px;
	color:var(--component-color-dark);
	display:flex;
	justify-content:space-between;
	align-items:center;
}

.legacy-tarifs__title .legacy-tarifs__price--mobile {
	font-size:17px;
	font-weight:600;
	color:var(--component-color-primary);
	white-space:nowrap;
	flex-shrink:0;
	display:none;
}

.legacy-tarifs__subtitle {
	font-size:13px;
	color:#888;
}

.legacy-tarifs__price {
	font-size:20px;
	font-weight:600;
	color:var(--component-color-primary);
	white-space:nowrap;
	flex-shrink:0;
}

.legacy-tarifs__price p {
	margin:0;
}

.legacy-tarifs__btn {
	display:inline-block;
	padding:5px 18px;
	background-color:var(--component-color-bg);
	border-radius:50px;
	color:var(--component-color-primary)!important;
	border:1.5px solid var(--component-color-primary)!important;
	font-size:13px;
	text-decoration:none;
	white-space:nowrap;
	flex-shrink:0;
	transition:background-color .2s,color .2s;
}

.legacy-tarifs__btn:hover {
	background-color:var(--component-color-dark)!important;
	color:var(--component-color-primary)!important;
}

.legacy-tarifs__side {
	display:flex;
	flex-direction:column;
	align-items:end;
	gap:10px;
}

@media(max-width:640px) {
	.legacy-tarifs__card {
		flex-direction:column;
		align-items:flex-start;
		gap:0px;
	}
	.legacy-tarifs__price {
		display:none;
		font-size:17px;
	}
	.legacy-tarifs__title .legacy-tarifs__price--mobile {
		display:initial;
	}
	.legacy-tarifs__side {
		width:100%;
	}
	.legacy-tarifs__side a {
		width:100%;
		text-align:center;
	}
	.legacy-tarifs__btn {
		padding:5px 0;
		background-color:unset;
		border-radius:0;
		color:var(--component-color-primary);
		border:none!important;
		font-size:13px;
		transition:none;
		border-top:1px solid var(--component-color-primary)!important;
	}
	.legacy-tarifs__btn:after {
		content:"→";
		margin-left:5px;
	}
}

.legacy-prestations .legacy-prestations__item {
	display:flex;
	flex-direction:column;
	height:100%;
}

.legacy-prestations .legacy-prestations__body {
	display:flex;
	flex-direction:column;
	flex:1;
}

.legacy-prestations .legacy-prestations__buttons {
	display:grid;
	grid-template-columns:repeat(2,minmax(0,1fr));
	gap:10px;
	justify-items:center;
	margin-top:auto;
}

.legacy-prestations .legacy-prestations__link {
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-height:46px;
	padding:11px 16px;
	border:1px solid var(--component-color-primary);
	border-radius:30px;
	background-color:var(--component-color-primary);
	color:var(--component-color-text-invert)!important;
	font-size:13px;
	font-weight:600;
	line-height:1.25;
	letter-spacing:.02em;
	text-align:center;
	text-decoration:none!important;
	box-shadow:none;
	transition:background-color .25s ease,color .25s ease,border-color .25s ease;
}

.legacy-prestations .legacy-prestations__link:hover {
	background-color:var(--component-color-bg);
	color:var(--component-color-primary)!important;
	border-color:var(--component-color-primary);
}

.legacy-prestations .legacy-prestations__link--inverse {
	background-color:transparent;
	color:var(--component-color-dark)!important;
	border-color:var(--component-color-dark);
}

.legacy-prestations .legacy-prestations__link--inverse:hover {
	background-color:var(--component-color-primary);
	color:var(--component-color-text-invert)!important;
}

.legacy-prestations .legacy-prestations__body>.legacy-prestations__link {
	align-self:flex-start;
	margin-top:auto;
}

@media only screen and (max-width:989px) {
	.legacy-prestations .legacy-prestations__buttons {
		grid-template-columns:1fr;
	}
	.legacy-prestations .legacy-prestations__link {
		width:100%;
	}
}

#top #our-team .legacy-team-member {
	border:1px solid color-mix(in srgb, var(--enfold-main-color-masonry) 91%, transparent);
	border-radius:30px;
}

#top #our-team .legacy-team-member .legacy-team-member__media {
	padding:0;
	border-top-left-radius:30px;
	border-top-right-radius:30px;
}

#top #our-team .legacy-team-member .legacy-team-member__job {
	font-size:.889rem;
	line-height:1.5;
}

#our-team .legacy-team-member {
	display:flex;
	flex-direction:column;
	width:100%!important;
	height:100%;
	box-sizing:border-box;
	border:1px solid var(--component-color-border);
	border-radius:28px;
	padding:15px;
	overflow:hidden;
}

#our-team .legacy-team-member .legacy-team-member__media {
	flex:0 0 auto;
}

#our-team .legacy-team-member .legacy-team-member__media img {
	width:100%!important;
	height:auto;
	-o-object-fit:cover;
	object-fit:cover;
	display:block;
}

#our-team .legacy-team-member .legacy-team-member__name {
	flex:0 0 auto;
	margin-top:10px;
}

#our-team .legacy-team-member .legacy-team-member__job {
	flex:1 0 auto;
	min-height:66px;
}

/* --- Source : thème enfant : shortcodes/team/team.css */

.legacy-team-member {
	margin: 30px 0;
	clear: both;
}

.legacy-team-member:only-child {
	margin: 0;
}

.legacy-team-member__name {
	margin-top: 7px;
	font-size: 1.55em;
}

.legacy-team-member__job {
	margin-top: -7px;
	font-size: 1em;
}

#top .legacy-team-member__media {
	position: relative;
	overflow: hidden;
	border-radius: 0;
	text-align: center;
	margin-bottom: 10px;
}

.legacy-team-member__media img {
	display: block;
	margin: 0 auto;
	width: 100%;
}

@media only screen and (max-width: 989px) {
	.responsive.av-no-preview #top .legacy-team-member .legacy-team-member__media img {
		position: relative;
		z-index: 3;
	}
}

.legacy-team-member__name {
	font-size: 18px !important;
	text-align: left;
}

.legacy-team-member__media {
	padding: 0px 5px;
}

.legacy-team-member__job {
	text-align: left;
	font-size: 1em;
	line-height: 1;
	cursor: pointer;
}

.legacy-team-member__media img {
	cursor: pointer;
}

/* --- Ajouts propres au nouveau balisage -------------------------------------------------------- */

/* Coins de la photo : sur l'ancien site, .avia_image (Enfold, 3px) écrasait le 50 % de team.css. */
.legacy-team-member__photo {
	border-radius: 3px;
}

/* Photo cliquable : <button> sans apparence propre (l'ancienne image était cliquable directement). */
.legacy-team-member__open {
	display: block;
	width: 100%;
	padding: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	background: none;
	border: 0;
}

.legacy-team-member__open:focus-visible {
	outline: 3px solid var(--component-color-primary);
	outline-offset: 4px;
}

/* Présentation d'un membre : reprend l'aspect de l'ancienne lightbox (team.css, .mfp-content / .trs-header). */
.legacy-team-member__dialog {
	width: 50%;
	max-width: 600px;
	max-height: 90vh;
	padding: 20px 40px;
	overflow: auto;
	color: var(--component-color-text);
	background: var(--component-color-bg);
	border: 0;
	border-radius: 5px;
	box-shadow: 0 10px 25px 4px color-mix(in srgb, var(--component-color-overlay) 50%, transparent);
}

.legacy-team-member__dialog::backdrop {
	background: color-mix(in srgb, var(--component-color-overlay) 80%, transparent);
}

.legacy-team-member__dialog-header {
	display: flex;
	padding: 10px;
}

.legacy-team-member__dialog-header .legacy-team-member__photo {
	width: auto;
	min-width: 140px;
	max-height: 200px;
	margin: 0;
	border: 1px solid var(--component-color-primary);
	border-radius: 10px;
}

.legacy-team-member__dialog-header > div {
	width: 60%;
	padding: 60px 30px 30px 20%;
}

.legacy-team-member__dialog-name {
	margin: 0 0 10px;
	font-size: 20px;
	line-height: 1;
}

.legacy-team-member__dialog-job {
	margin: 0;
}

.legacy-team-member__close {
	position: absolute;
	top: 0;
	right: 0;
	width: 44px;
	height: 44px;
	margin: 10px;
	font-size: 28px;
	line-height: 40px;
	cursor: pointer;
	color: var(--component-color-primary);
	background: none;
	border: 0;
	border-radius: 30px;
	box-shadow: 1px 0 16px 0 color-mix(in srgb, var(--component-color-overlay) 25%, transparent);
}

@media (max-width: 980px) {
	.legacy-team-member__dialog {
		width: 98%;
	}

	.legacy-team-member__dialog-header {
		display: block;
	}

	.legacy-team-member__dialog-header .legacy-team-member__photo {
		margin-left: auto;
		margin-right: auto;
	}

	.legacy-team-member__dialog-header > div {
		width: 100%;
		padding: 10px;
		text-align: center;
	}
}

/* Confirmation de rendez-vous (l'ancien thème l'affichait dans un bloc de texte Enfold, sans style propre). */
.legacy-thankyou th {
	padding-right: var(--component-gutter);
	text-align: left;
}
