/* Compte et vues MemberDash, dans les mêmes couleurs et cartes que Mon espace. */
.entry:has(.kognos-compte .kognos-auth-page) {
	background: transparent;
	box-shadow: none;
}

.entry-content-wrap:has(.kognos-compte .kognos-auth-page) {
	padding: 0;
}

.kognos-compte .ms-account-wrapper:not(.ms-account-details-page) {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
	align-items: start;
}

.entry-content .kognos-compte .ms-account-wrapper > div:not(.kognos-auth-page),
.kognos-compte .ms-account-details-page,
.kognos-compte .ms-membership-form-wrapper {
	min-width: 0;
	margin: 0;
	padding: clamp(1.25rem, 3vw, 1.75rem);
	border: 1px solid #dde5ec;
	border-radius: 16px;
	background: #fff;
}

.kognos-compte .ms-account-wrapper > .kognos-auth-page {
	grid-column: 1 / -1;
	width: 100%;
	max-width: none;
}

.kognos-compte #account-invoices,
.kognos-compte #account-activity {
	grid-column: 1 / -1;
}

.entry-content .kognos-compte .ms-account-header {
	align-items: center;
	flex-wrap: wrap;
	gap: .75rem;
	margin: 0 0 1.25rem;
}

.entry-content .kognos-compte :is(.ms-account-wrapper, .ms-membership-form-wrapper) h2 {
	margin: 0 0 1.25rem;
	font-size: 1.25rem;
	line-height: 1.35;
}

.entry-content .kognos-compte .ms-account-header h2 {
	margin: 0;
}

.entry-content .kognos-compte .ms-account-header a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: .45rem .7rem;
	border: 1px solid #dde5ec;
	border-radius: 6px;
	color: var(--global-palette3, #07294e);
	font-size: .8125rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	white-space: normal;
}

.entry-content .kognos-compte .ms-account-header a:hover {
	border-color: var(--global-palette1, #038274);
	background: #f3f6f8;
}

.entry-content .kognos-compte .ms-account-wrapper a.ms-pay-button {
	background: var(--global-palette1, #007566);
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
}

.entry-content .kognos-compte .ms-account-wrapper a.ms-pay-button:is(:hover, :focus-visible) {
	background: #006456;
	color: #fff;
}

.kognos-compte #account-profile tr th.ms-label-title {
	flex-basis: 7rem;
	width: 7rem;
}

.kognos-compte #account-invoices table:not(:has(tbody tr)),
.kognos-compte #account-activity table:not(:has(tbody tr)),
.kognos-compte > .wp-block-separator {
	display: none;
}

.kognos-compte .kognos-compte-vide {
	margin: 0;
	padding: 1rem;
	border-radius: 6px;
	background: #f3f6f8;
	color: #5a6675;
	font-size: .875rem;
}

.entry-content .kognos-compte form.form-membership {
	max-width: none;
	margin: 0;
}

.kognos-compte .ms-membership-form-wrapper {
	max-width: 46rem;
}

.kognos-compte .ms-membership-form-wrapper > .ms-form-element {
	margin: 1rem 0 0;
	font-size: .875rem;
}

.kognos-compte .ms-alert-box {
	margin-bottom: 1.25rem;
	padding: 1rem;
	border-radius: 6px;
}

.kognos-compte a:focus-visible,
.kognos-compte button:focus-visible,
.kognos-compte input:focus-visible {
	outline: 2px solid var(--global-palette2, #136586);
	outline-offset: 3px;
}

@media (max-width: 780px) {
	.kognos-compte .ms-account-wrapper:not(.ms-account-details-page) {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Paiement bien séparé des renseignements personnels. */
.entry-content .kognos-compte #account-stripe-payment-details {
 margin-top: 1.5rem;
 padding: 1.25rem;
 border: 1px solid #dce5eb;
 border-radius: 10px;
 background: #f2f6f8;
}
.entry-content .kognos-compte #account-stripe-payment-details h2 { margin-bottom: .75rem; font-size: 1.125rem; }
.kognos-compte #account-stripe-payment-details p { margin: 0; font-size: 1rem; line-height: 1.7; }
.kognos-compte #account-profile table { overflow-wrap: anywhere; }
.entry-content .kognos-compte #account-profile th { width: 35%; background: #fff; }
.entry-content .kognos-compte .ms-account-wrapper table { border: 1px solid #dce5eb; border-radius: 10px; overflow: hidden; }
.kognos-compte .form-membership .ms-form-element { margin: 0 0 1.5rem; }
.kognos-compte .form-membership .memberdash-wrapper { display: block; }
.kognos-compte .form-membership label { display: block; margin: 0 0 .5rem; }
.kognos-compte .form-membership input:not([type="submit"]):not([type="hidden"]) { width: 100%; }
.kognos-compte .form-membership .ms-form-element-submit { margin-bottom: 0; }
.kognos-compte .form-membership .memberdash-submit { width: auto; }
/* Le gabarit MemberDash utilise ses propres conteneurs. */
.single-ms_invoice #main-content { width: 100%; max-width: var(--global-content-width, 1290px); margin: 0 auto; padding: 2.5rem var(--global-content-edge-padding, 1.5rem); }
.single-ms_invoice #primary { margin: 0; }
.single-ms_invoice #secondary { display: none; }
.kognos-compte-facture { width: 100%; }
.kognos-compte-retour { margin: 0 0 1.25rem; font-size: .875rem; }
.kognos-compte #invoice { margin-top: 0; }
.kognos-compte #invoice .ms-purchase-table { width: 100%; max-width: 850px; margin: 0 auto; border: 1px solid #dce5eb; border-radius: 16px; border-collapse: separate; border-spacing: 0; overflow: hidden; background: #fff; box-shadow: 0 6px 24px rgb(7 41 78 / 3%); }
.kognos-compte #invoice :is(th, td) { padding: 16px 24px; border: 0; border-bottom: 1px solid #e7edf1; color: var(--global-palette3); font-size: 15px; line-height: 1.6; text-align: left; overflow-wrap: anywhere; }
.kognos-compte #invoice th { width: 34%; font-weight: 600; }
.kognos-compte #invoice :is(.ms-inv-title, .ms-inv-total) :is(th, td) { background: #f2f6f8; }
.kognos-compte #invoice .ms-inv-title td { padding: 28px 24px; }
.kognos-compte #invoice h2 { margin: 0; padding: 0; text-align: left; font-size: clamp(24px, 3vw, 32px); }
.kognos-compte #invoice h2 a { color: var(--global-palette3); text-decoration: none; }
.kognos-compte #invoice .ms-inv-total :is(th, td) { border: 0; font-size: 20px; font-weight: 700; color: var(--global-palette1); }
.kognos-compte #invoice .ms-inv-price { font-variant-numeric: tabular-nums; }
.kognos-compte #invoice .ms-inv-sep td { padding: 0; height: 1px; }
.kognos-compte #invoice .ms-inv-status td { font-weight: 700; color: var(--global-palette1); }
@media (max-width: 600px) {
 .entry-content .kognos-compte .ms-account-wrapper .ms-responsive-table td { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 16px; text-align: right; }
 .entry-content .kognos-compte .ms-account-wrapper .ms-responsive-table td::before { flex: 0 0 38%; max-width: 45%; float: none; text-align: left; font-size: 12px; font-weight: 700; }
 .entry-content .kognos-compte .ms-account-wrapper .ms-responsive-table tr { margin: 0; padding: 6px 0; border-bottom: 1px solid #dce5eb; }
 .entry-content .kognos-compte .ms-account-wrapper .ms-responsive-table tr:last-child { border: 0; }
 .entry-content .kognos-compte #account-profile :is(th, td) { padding: 12px; font-size: 13px; }
 .kognos-compte #invoice :is(th, td) { padding: 12px; font-size: 14px; }
 .kognos-compte #invoice th { width: 38%; }
 .single-ms_invoice #main-content { padding-top: 1.5rem; }
}
@media print {
 .single-ms_invoice :is(header, footer, #wpadminbar, .kognos-compte-entete, .kognos-espace-onglets, .kognos-compte-navigation, .kognos-compte-retour) { display: none !important; }
 .kognos-compte #invoice .ms-purchase-table { box-shadow: none; }
}

/* Les formulaires MemberDash réutilisent les cartes et boutons du tableau des offres. */
.entry-content .kognos-forfaits .ms-membership-form-wrapper { max-width: none; padding: 0; border: 0; background: transparent; }
.entry-content .kognos-forfaits .kognos-offres__grille { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.entry-content .kognos-forfaits form.ms-membership-form { display: flex; float: none; width: 100%; min-width: 0; margin: 0; padding: 0; }
.entry-content .kognos-forfaits .kognos-offres__carte { width: 100%; min-width: 0; margin: 0; padding: 0; }
.entry-content .kognos-forfaits .ms-top-bar { padding: 1.5rem 1.25rem 1.25rem; text-transform: none; }
.entry-content .kognos-forfaits .ms-price-details { padding: 1.5rem 1.25rem; }
.entry-content .kognos-forfaits .ms-title { color: var(--global-palette3); font-size: 1.25rem; font-weight: 700; line-height: 1.35; }
.entry-content .kognos-forfaits .ms-price { order: -1; margin-bottom: 1rem; }
.entry-content .kognos-forfaits .ms-description { font-size: .9375rem; line-height: 1.65; }
.entry-content .kognos-forfaits .ms-description:empty { display: none; }
.entry-content .kognos-forfaits .ms-description p { margin: 0; }
.entry-content .kognos-forfaits .ms-description p + p { margin-top: .75rem; }
.entry-content .kognos-forfaits .kognos-forfaits-trousses__liens { display: flex; flex-direction: column; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.entry-content .kognos-forfaits .kognos-forfaits-trousses__liens li { margin: 0; padding: 0; }
.entry-content .kognos-forfaits .kognos-forfaits-trousses__liens a { display: flex; }
.entry-content .kognos-forfaits .ms-bottom-msg { font-size: .875rem; line-height: 1.6; }
.entry-content .kognos-forfaits .ms-bottom-bar { display: flex; flex-direction: column; align-items: stretch; gap: .75rem; padding: 0 1.25rem 1.25rem; }
.entry-content .kognos-forfaits .kognos-offres__bouton { justify-content: center; float: none; margin: 0; white-space: normal; text-align: center; }
.entry-content .kognos-forfaits .membership_cancel { border: 1px solid #d6e0e8; background: #fff; color: var(--global-palette3); }
.entry-content .kognos-forfaits .membership_cancel:is(:hover, :focus) { border-color: var(--global-palette3); background: var(--global-palette8); color: var(--global-palette3); }
.entry-content .kognos-forfaits .ms-move-from { margin: 2rem 0 1.25rem; font-size: 1.4rem; }
.entry-content .kognos-forfaits .ms-membership-form-wrapper > form { margin-bottom: 1.25rem; }
@media (min-width: 781px) {
 .entry-content .kognos-forfaits .ms-membership-form-wrapper > form .kognos-offres__carte { display: grid; grid-template-columns: 1fr 1.5fr 180px; align-items: center; }
 .entry-content .kognos-forfaits .ms-membership-form-wrapper > form .ms-top-bar { border-bottom: 0; }
 .entry-content .kognos-forfaits .ms-membership-form-wrapper > form .ms-bottom-bar { padding: 1.25rem; }
}
.kognos-compte #stripe-customer-portal[aria-busy="true"] { cursor: progress; }
.kognos-compte #account-stripe-payment-details :is(#error-message:not(:empty), .ms-loading-message) { margin: .75rem 0; font-size: .875rem; }
.kognos-compte #account-stripe-payment-details #error-message { color: #a12622; }

/* Le récapitulatif conserve les formulaires et passerelles de MemberDash. */
.entry-content .ms-membership-form-wrapper.kognos-paiement {
	max-width: 800px;
	margin: 0 auto;
	padding: clamp(1rem, 3vw, 1.75rem);
	border: 1px solid #dde5ec;
	border-radius: 16px;
	background: #fff;
}
.entry-content .ms-membership-form-wrapper.kognos-paiement h2 { margin: 0 0 1rem; font-size: 1.5rem; }
.entry-content .kognos-paiement .ms-alert-box { margin: 0 0 1.25rem; font-size: .9375rem; line-height: 1.6; }
.entry-content .kognos-paiement .kognos-tableau { margin-bottom: 0; }
.entry-content .kognos-paiement .kognos-tableau th { width: 48%; }
.entry-content .kognos-paiement .kognos-tableau td:not([colspan]) { text-align: right; font-variant-numeric: tabular-nums; }
.entry-content .kognos-paiement .kognos-tableau .ms-price-column { white-space: nowrap; }
.entry-content .kognos-paiement .kognos-tableau tr:first-child > * { background: #f2f6f8; font-weight: 700; }
.entry-content .kognos-paiement .kognos-tableau .kognos-tableau__total > * { background: #edf7f4; color: var(--global-palette1); }
.entry-content .kognos-paiement .kognos-tableau td[colspan] { padding: 1.25rem 1rem; }
.kognos-paiement .kognos-paiement-code { margin: 0 0 .5rem; font-weight: 600; }
.kognos-paiement .coupon-entry { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.kognos-paiement .coupon-entry .memberdash-input-wrapper { flex: 1 1 180px; min-width: 0; }
.kognos-paiement .coupon-entry input[type="text"] { width: 100%; }
.kognos-paiement .coupon-entry :is(button, input) { margin: 0; }
.kognos-paiement .coupon-question { display: none; }
.kognos-paiement .ms-membership-description { font-size: .9375rem; line-height: 1.6; }
.entry-content .kognos-paiement .sandbox-mode { background: #f2f6f8; }
.entry-content .kognos-paiement .sandbox-mode .ms-buy-now-column::after { color: #5a6675; font-size: .75rem; }
.entry-content .kognos-paiement .sandbox-mode .ms-buy-now-column { padding-right: 90px; }
@media (max-width: 540px) {
	.entry-content .kognos-paiement .kognos-tableau th { width: 52%; }
	.kognos-paiement .coupon-entry :is(.memberdash-input-wrapper, button) { flex-basis: 100%; width: 100%; }
	.entry-content .kognos-paiement .sandbox-mode .ms-buy-now-column { padding: 1rem; }
	.entry-content .kognos-paiement .sandbox-mode .ms-buy-now-column::after { position: static; display: block; margin: .5rem 0 0; }
}

