/*
 * Kalenbook — my booking page (2.9), the « link in bio ».
 *
 * A page of its own, outside the theme: nothing of the site's styles is
 * loaded, so nothing here has to fight it. The colours are the practice's
 * (JDW_Theme::css_variables(), on .jdw), the shape its radii (--kb-radius*).
 * One column, made for the phone; on a computer the same column, centred.
 *
 * The buttons sit inside .jdw, where the module's base (html body .jdw
 * button, 0,3,3) resets every button: their rules carry
 * :not(.jdw-z.jdw-z.jdw-z), as the module's own do.
 *
 * Nothing moves while the page loads: every image has its size, and the
 * folded descriptions take no room until they are opened.
 */

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body.kbp-body {
	margin: 0;
	background: var(--jdwt-cloud, #F1F3F6);
}

.kbp {
	--kbp-radius: var(--kb-radius-lg, 16px);
	--kbp-radius-sm: var(--kb-radius, 12px);
	max-width: 560px;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	/* 2.10 (G) : la couleur du fond choisie dans Ma page ; les cartes restent claires dessus. */
	background: var(--jdw-paper, #F1F3F6);
	color: var(--jdw-ink, #15202B);
	font-family: var(--kbp-body, var(--jdwt-font));
	font-size: 16px;
	line-height: 1.45;
}

.kbp-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* L'en-tête : la photo, le nom, le métier, deux lignes, les contacts. */
.kbp-hero {
	padding: 28px 20px 18px;
	text-align: center;
	background: transparent;
}

.kbp-hero__photo {
	display: block;
	width: 88px;
	height: 88px;
	margin: 0 auto 12px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--jdw-second-t, #FFDFBF);
}

.kbp-hero__initials {
	display: grid;
	place-items: center;
	color: var(--jdw-second-ink, #8A4A0A);
	font-family: var(--kbp-display, var(--jdwt-font));
	font-weight: 800;
	font-size: 30px;
	letter-spacing: -0.01em;
}

.kbp-hero__name {
	margin: 0;
	font-family: var(--kbp-display, var(--jdwt-font));
	font-size: 24px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.015em;
	overflow-wrap: anywhere;
}

.kbp-hero__job {
	margin: 4px 0 0;
	color: var(--jdw-muted, #4A5563);
	font-size: 14px;
}

.kbp-hero__intro {
	max-width: 30em;
	margin: 10px auto 0;
	color: var(--jdw-muted, #4A5563);
	font-size: 14.5px;
	line-height: 1.45;
}

.kbp-contacts {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 16px;
}

.kbp-contact {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--jdw-card, #fff);
	border: 1px solid var(--jdw-line-field, #C5CAD3);
	color: var(--jdw-ink, #15202B);
	text-decoration: none;
}

.kbp-contact:hover {
	border-color: var(--jdw-accent, #2D4BE0);
	color: var(--jdw-accent-ink, #2D4BE0);
}

.kbp-save {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin-top: 12px;
	padding: 0 16px;
	border-radius: var(--kb-radius-pill, 999px);
	color: var(--jdw-accent-ink, #2D4BE0);
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
}

.kbp-save:hover {
	background: var(--jdw-tint, #E6EAFB);
}

.kbp-icon {
	flex: none;
	fill: none;
}

/* Les sections : un titre court, puis les cartes. */
.kbp-main {
	flex: 1;
	padding: 4px 14px 24px;
}

.kbp-sec + .kbp-sec {
	margin-top: 8px;
}

.kbp-sec__title {
	margin: 14px 4px 8px;
	color: var(--jdw-muted, #4A5563);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.kbp-list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.kbp-item {
	border: 1px solid var(--jdw-rule, #E1E5EB);
	border-radius: var(--kbp-radius);
	background: var(--jdw-card, #fff);
}

/* Le nom et sa ligne, la flèche ; dessous, le prix et le bouton. La
   vignette, quand il y en a une, tient les deux lignes à gauche. */
.kbp-item__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"text more"
		"act act";
	align-items: center;
	gap: 6px 8px;
	padding: 12px 12px 12px 14px;
}

.kbp-item.has-thumb .kbp-item__row {
	grid-template-columns: 64px minmax(0, 1fr) auto;
	grid-template-areas:
		"thumb text more"
		"thumb act act";
	padding-left: 12px;
	column-gap: 12px;
}

.kbp-item__thumb {
	grid-area: thumb;
	align-self: start;
	width: 64px;
	height: 64px;
	border-radius: var(--kbp-radius-sm);
	object-fit: cover;
	background: var(--jdw-paper, #F1F3F6);
}

.kbp-item__text {
	grid-area: text;
	min-width: 0;
}

.kbp-item__name {
	margin: 0;
	font-family: var(--kbp-display, var(--jdwt-font));
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.kbp-item__meta {
	margin: 2px 0 0;
	color: var(--jdw-muted, #4A5563);
	font-size: 13px;
}

.kbp-item__act {
	grid-area: act;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.kbp-item__price {
	font-weight: 800;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* 2.10 (F2) : le prix barré d'une carte, et « Offrir cette carte ». */
.kbp-item__was {
	margin-left: 4px;
	font-weight: 400;
	color: var(--jdw-muted, #4A5563);
}

.kbp-item__give {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin-top: 8px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--jdw-accent-ink, #2D4BE0);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.kbp-item__price.is-free {
	color: var(--jdwt-mint-ink, #166A43);
}

/* 2.10 (G6) : « Offrir », une carte dans la couleur des boutons ; son
   bouton s'inverse, au même contraste (--jdw-on-accent, 4,5:1 au moins). */
.kbp-item--gift {
	border-color: var(--jdw-accent, #2D4BE0);
	background: var(--jdw-accent, #2D4BE0);
	color: var(--jdw-on-accent, #fff);
}

.kbp-item--gift .kbp-item__meta,
.kbp-item--gift .kbp-item__price {
	color: var(--jdw-on-accent, #fff);
}

.kbp-item__gift {
	display: grid;
	place-items: center;
	background: transparent;
	color: var(--jdw-on-accent, #fff);
}

.kbp-item--gift .kbp-btn:not(.jdw-z.jdw-z.jdw-z) {
	background: var(--jdw-on-accent, #fff);
	color: var(--jdw-accent, #2D4BE0);
}

.kbp-item--gift .kbp-btn:focus-visible:not(.jdw-z.jdw-z.jdw-z) {
	outline-color: var(--jdw-on-accent, #fff);
}

.kbp-btn,
.kbp-btn:not(.jdw-z.jdw-z.jdw-z) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 20px;
	border: 0;
	border-radius: var(--kb-radius-pill, 999px);
	background: var(--jdw-accent, #2D4BE0);
	color: var(--jdw-on-accent, #fff);
	font: inherit;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

.kbp-btn:hover:not(.jdw-z.jdw-z.jdw-z) {
	filter: brightness(0.94);
}

.kbp-item__more:not(.jdw-z.jdw-z.jdw-z) {
	grid-area: more;
	align-self: start;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: -8px -6px 0 0;
	border-radius: 50%;
	color: var(--jdw-muted, #4A5563);
	cursor: pointer;
}

.kbp-item__more:hover:not(.jdw-z.jdw-z.jdw-z) {
	background: var(--jdw-paper, #F1F3F6);
	color: var(--jdw-ink, #15202B);
}

.kbp-item__more .kbp-icon {
	transition: transform 0.28s ease;
}

.kbp-item.is-open .kbp-item__more .kbp-icon {
	transform: rotate(180deg);
}

.kbp-item__more:focus-visible:not(.jdw-z.jdw-z.jdw-z),
.kbp-btn:focus-visible:not(.jdw-z.jdw-z.jdw-z),
.kbp-contact:focus-visible,
.kbp-save:focus-visible {
	outline: 2px solid var(--jdw-accent-ink, #2D4BE0);
	outline-offset: 2px;
}

/* La description, repliée : elle ne prend aucune place tant qu'elle est
   fermée, et s'ouvre en douceur. Sans le script, elle reste ouverte. */
.kbp-item__fold {
	display: grid;
	grid-template-rows: 1fr;
}

.kbp-js .kbp-item__fold {
	grid-template-rows: 0fr;
	visibility: hidden;
	transition: grid-template-rows 0.3s ease, visibility 0s linear 0.3s;
}

.kbp-js .kbp-item.is-open .kbp-item__fold {
	grid-template-rows: 1fr;
	visibility: visible;
	transition: grid-template-rows 0.3s ease, visibility 0s;
}

.kbp-item__inner {
	min-height: 0;
	overflow: hidden;
}

.kbp-item__wide {
	display: block;
	width: calc(100% - 24px);
	height: auto;
	aspect-ratio: 16 / 10;
	margin: 0 12px 10px;
	border-radius: var(--kbp-radius-sm);
	object-fit: cover;
	background: var(--jdw-paper, #F1F3F6);
}

.kbp-item__desc {
	padding: 0 14px 14px;
	color: var(--jdw-ink, #15202B);
	font-size: 14.5px;
	line-height: 1.55;
}

.kbp-item__desc > :first-child {
	margin-top: 0;
}

.kbp-item__desc > :last-child {
	margin-bottom: 0;
}

.kbp-item__desc a {
	color: var(--jdw-accent-ink, #2D4BE0);
}

.kbp-empty {
	margin: 24px 6px;
	color: var(--jdw-muted, #4A5563);
	text-align: center;
}

.kbp-foot {
	padding: 14px 16px 22px;
	color: var(--jdw-muted, #4A5563);
	font-size: 12px;
	text-align: center;
}

@media (min-width: 600px) {
	.kbp {
		min-height: 0;
		margin: 32px auto;
		border: 1px solid var(--jdw-rule, #E1E5EB);
		border-radius: var(--kbp-radius);
		overflow: hidden;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kbp-js .kbp-item__fold,
	.kbp-js .kbp-item.is-open .kbp-item__fold,
	.kbp-item__more .kbp-icon {
		transition: none;
	}
}
