/* Evolys: base page CSS (client-site-rebuild) on top of the taste-skill kit (copy to assets/site.css).
   Generic: logo/wordmark, card rows, picture walls, reference list, definition lists, form card,
   legal pages, lightbox, and the growth rules that stop sections overlapping on phones, tablets
   and short laptop screens (body.sub for sub pages; the min-width:640 + max-height:860 block for all).

/* the client's logo (a framed PNG, its own colours) */
.nav__logo img.site-logo { height: 44px; width: auto; display: block; }
@media (max-width: 639px) { .nav__logo img.site-logo { height: 36px; } }
.footer .footer__name { font-size: 48px; line-height: 1; }
@media (max-width: 639px) { .footer .footer__name { font-size: 30px; } }

/* hero photograph: the client's photos are 900px to 1600px wide, kept sharp by cover */
.hero__media img { object-position: var(--ly-pos, 50% 50%); }

/* card rows: one panel height a row */
.cards-4 .panel { --p-h: 240px; }
.cards-3 .panel { --p-h: 260px; }
.cards-4 .panel img, .cards-3 .panel img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) { .cards-4 > .card { grid-column: auto / span 6; } .cards-3 > .card { grid-column: auto / span 6; } }
@media (max-width: 639px) { .cards-4 .panel, .cards-3 .panel { --p-h: 200px; } .cards-4 > .card, .cards-3 > .card { grid-column: 1 / -1; } }

/* picture wall: its own grid, 2px gap, square tiles, line to line */
.wall { display: grid; gap: 2px; grid-template-columns: repeat(var(--wall-cols, 4), minmax(0, 1fr)); }
.wall--4 { --wall-cols: 4; }
.wall--3 { --wall-cols: 3; }
.wall--2 { --wall-cols: 2; align-self: start; }
.wall__item { display: block; position: relative; overflow: clip; aspect-ratio: 4 / 3; background: var(--surface); }
.wall__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 600ms var(--ease, ease); }
@media (hover: hover) and (pointer: fine) { .wall__item:hover .wall__img { transform: scale(1.03); } }
.wall__item:focus-visible { outline-offset: -4px; }
.wall--plans .wall__item { aspect-ratio: 1 / 1; background: #fff; }
.wall--plans .wall__img { object-fit: contain; padding: var(--s-4); }
@media (max-width: 1023px) { .wall--4 { --wall-cols: 3; } }
@media (max-width: 639px) { .wall--4, .wall--3 { --wall-cols: 2; } }

/* a map or plan shown whole */
.frame--contain .frame__img { object-fit: contain; background: #fff; }

/* reference list: names in columns */
.ref-list { columns: 4 240px; column-gap: var(--s-5); list-style: none; padding: 0; margin: 0; }
.ref-list li { break-inside: avoid; padding-block: 5px; font-size: var(--t-small); line-height: 1.45; border-bottom: 1px solid var(--line); }
@media (max-width: 639px) { .ref-list { columns: 2 150px; } }

/* small definition lists: contact lines, facts */
.contact-list, .fact-list { display: grid; gap: var(--s-4); margin-bottom: 0; }
.contact-list > div, .fact-list > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s-4); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.contact-list dt, .fact-list dt { font-size: var(--t-label); font-weight: 500; color: var(--muted); padding-top: 2px; }
.contact-list dd, .fact-list dd { margin: 0; }

/* history rows: the year in the name column */
.rows--years > li { grid-template-columns: 72px minmax(0, 1fr); }
.rows--years .rows__name { font-family: var(--font-display); font-size: 20px; }
.rows--years > li > p { grid-column: 2; grid-row: 1; }

/* the enquiry form on its card */
.form-card { background: var(--g-main, var(--bg)); border-radius: var(--r-lg); padding: var(--s-7); }
.form textarea { width: 100%; min-height: 120px; font: inherit; font-size: 16px; padding: var(--s-3) var(--s-4); border: 1px solid var(--line-strong, var(--line)); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); resize: vertical; }
@media (max-width: 639px) { .form-card { padding: var(--s-5); } }

/* legal pages: text pages, not screens */
main > section.legal { height: auto; min-height: 100svh; padding-top: calc(var(--nav) + var(--s-8)); }
.legal h1 { font-size: var(--t-h2); }
.legal h2 { font-size: var(--t-card); margin-top: var(--s-5); }

/* lightbox (site.js) */
.lb { position: fixed; inset: 0; z-index: 50; background: rgb(20 17 15 / .94); display: grid; place-items: center; padding: 56px 72px; }
.lb[hidden] { display: none; }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; }
.lb button { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgb(246 242 236 / .12); color: #f6f2ec; font-size: 24px; line-height: 1; cursor: pointer; }
.lb button:hover { background: rgb(246 242 236 / .24); }
.lb button:focus-visible { outline: 2px solid #f6f2ec; outline-offset: 2px; }
.lb__close { top: 12px; right: 12px; }
.lb__prev { left: 12px; top: calc(50% - 24px); }
.lb__next { right: 12px; top: calc(50% - 24px); }
.lb__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #d8d2ca; font-size: 14px; }
@media (max-width: 639px) { .lb { padding: 64px 8px; } .lb__prev, .lb__next { top: auto; bottom: 8px; } }

/* the moment photograph fills its column down to the section's foot */
.develop--fill { align-self: stretch; margin: 0; border-radius: var(--r-lg); overflow: clip; min-height: 420px; }
.develop--fill img { width: 100%; height: 100%; object-fit: cover; display: block; }
.footer__addr { margin: 0 0 var(--s-3); color: var(--muted); font-size: var(--t-small); line-height: 1.6; }

/* the float card covers too much of the photo on a phone */
@media (max-width: 639px) { .hero__media .ly-float { display: none; } }

/* one heading size per level: portrait tiles take the card title size */
.tile > h3 { font-family: var(--font-text); font-weight: 500; font-size: var(--t-card); line-height: 1.3; letter-spacing: -0.01em; }

/* references beside a photograph: three columns in eight */
.ref-list--3 { columns: 3 200px; }
@media (max-width: 639px) { .ref-list--3 { columns: 2 140px; } .ref-list li { font-size: 13px; padding-block: 3px; } }

/* contact section: the workshop photo under the words */

/* footer legal row: plain links side by side */
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); align-items: center; }
.footer a { overflow-wrap: anywhere; }

/* phone: frames that stack under their words keep a real height */
@media (max-width: 639px) {
  .develop--fill { min-height: 280px; }
}

/* sub pages (not the one-screen home page): on phones and tablets a section grows with what it holds,
   so stacked splits and walls never run into the next section */
@media (max-width: 1023px) {
  body.sub main > section:not(.hero) { height: auto; min-height: 0; }
  body.sub main > section:not(.hero) > .wrap { height: auto; }
  body.sub footer.closing { height: auto; }
}

/* phone: lower card pictures so three cards stack within two screens */
@media (max-width: 639px) { .cards-3 .panel { --p-h: 160px; } }
/* phone: the three team portraits stay two-up (the third half width too), so the row fits one screen */
@media (max-width: 639px) {
}
@media (max-width: 639px) {
}
/* the kit lays a phone section out as a fixed-row grid; a growing section is a plain block instead */
@media (max-width: 1023px) { body.sub main > section:not(.hero), body.sub footer.closing { display: block; } }
/* in a growing section the .fill block takes its own height instead of "what is left" */
@media (max-width: 1023px) {
  body.sub main > section:not(.hero) > .wrap > .fill { flex: none; }
  body.sub main > section:not(.hero) .frame--fill { min-height: 280px; height: auto; flex: none; }
}
/* tablet (640-1023): lower pictures so the home page's card rows end inside their screen */
@media (min-width: 640px) and (max-width: 1023px) {
}
/* 1024 and up: the home page's photo splits stay side by side; short screens get lower card pictures */
@media (min-width: 1024px) {
}
@media (min-width: 1024px) and (max-height: 820px) { .cards-3 .panel { --p-h: 170px; } }
/* short or mid-size desktop screens (1280x800, 1024x768): a section grows with what it holds instead of
   cutting it off; it still fills at least one screen, and a photo frame keeps a real height */
@media (min-width: 640px) and (max-height: 860px), (min-width: 1024px) and (max-width: 1279px) {
  main > section:not(.hero):not([data-moment]) { height: auto !important; min-height: calc(var(--h, 1) * 100svh); display: flex; flex-direction: column; }
  main > section:not(.hero):not([data-moment]) > .wrap { flex: 1 0 auto; height: auto; }
  main > section:not(.hero):not([data-moment]) > .wrap > .fill { flex: 1 0 auto; min-height: auto; }
  main > section:not(.hero):not([data-moment]) .frame--fill { min-height: 360px; }
  main > section:not(.hero):not([data-moment]) .develop--fill { min-height: 360px; }
  footer.closing { height: auto; min-height: 100svh; }
}

/* the hero card: its label and name each on one line */
.hero__media .ly-float { width: auto; min-width: 300px; max-width: calc(100% - 48px); }
.hero__media .ly-float__row > span { white-space: nowrap; }


/* ================================================================ Evolys */
/* the client's logo (grey text and pink butterfly; a dark-text copy for light grounds) */
.nav__logo img.site-logo { height: 34px; width: auto; display: block; }
.nav__logo--footer img.site-logo { height: 48px; }
@media (max-width: 639px) { .nav__logo img.site-logo { height: 28px; } }

/* sub pages are reading pages: every section grows with its text at every width */
body.sub main > section:not(.hero) { height: auto !important; min-height: 0 !important; display: block !important; padding-block: var(--s-9); }
body.sub main > section:not(.hero) > .wrap { height: auto; }
body.sub main > section:not(.hero) > .wrap > .fill { flex: none; }
@media (max-width: 639px) { body.sub main > section:not(.hero) { padding-block: var(--s-8); } }
body.sub footer.closing { height: auto; min-height: 0; }

/* section title on the left, text on the right */
.sec-title h2 { margin: 0; }
.sec-title p { margin-top: var(--s-4); color: var(--muted); }
@media (max-width: 1023px) { .sec-title { margin-bottom: var(--s-6); } }
.sec-lead { max-width: 64ch; margin-bottom: var(--s-7); }
.prose > * + * { margin-top: var(--s-4); }
.prose h3 { font: 500 var(--t-card)/1.35 var(--font-text); margin-top: var(--s-6); }
.prose p, .prose li { max-width: 66ch; }
.bullets { padding-left: 1.2em; margin: 0; display: grid; gap: var(--s-2); }
.bullets li::marker { color: var(--accent); }
.aside { align-self: start; }
@media (max-width: 1023px) { .aside { margin-top: var(--s-7); } }
.facts-card { background: var(--surface); border-radius: var(--r-lg); padding: var(--s-6); }
.ground-surface .facts-card { background: var(--bg); }
.facts-card .t-label { margin-bottom: var(--s-4); color: var(--muted); }
.fact-list dd a { overflow-wrap: anywhere; }

/* breadcrumbs and kicker above the h1 */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; margin: 0 0 var(--s-4); font-size: var(--t-small); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); color: var(--line-strong, var(--muted)); }
.crumbs a { color: inherit; text-decoration: none; display: inline-block; padding-block: 12px; margin-block: -12px; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.hero__kicker { font-size: var(--t-small); font-weight: 500; color: var(--accent); margin-bottom: var(--s-3); }

/* price tables from the old site */
.price-table__wrap { overflow-x: auto; margin-top: var(--s-4); }
.price-table { width: 100%; border-collapse: collapse; font-size: var(--t-small); font-variant-numeric: tabular-nums; }
.price-table th, .price-table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table td { text-align: right; white-space: nowrap; }
.price-table thead th { color: var(--muted); font-weight: 500; }
.price-table thead th:not(:first-child) { text-align: right; }
.price-table tbody th { font-weight: 400; }
.price-table__group th { font-weight: 600 !important; padding-top: var(--s-5); color: var(--ink); }

/* before and after pictures: whole, in their own proportions */
.ba { display: grid; gap: var(--s-3); grid-template-columns: repeat(var(--ba-cols, 2), minmax(0, 1fr)); margin-top: var(--s-5); }
.ba--1 { --ba-cols: 1; } .ba--3 { --ba-cols: 3; }
.ba__item { display: block; border-radius: var(--r-md, 8px); overflow: clip; background: #fff; }
.ba__img { width: 100%; height: auto; display: block; transition: transform 600ms var(--ease, ease); }
@media (hover: hover) and (pointer: fine) { .ba__item:hover .ba__img { transform: scale(1.02); } }
@media (max-width: 639px) { .ba { --ba-cols: 1; } .ba--3 { --ba-cols: 2; } }

/* FAQ inside a section */
.faq__item > p + p, .faq__item > .bullets, .faq__item > p + .bullets { margin-top: var(--s-2); }
.faq__item h3 + h3 { margin-top: var(--s-3); }

/* the centres */
.centres { row-gap: var(--s-7); }
.centre h3 { font: 500 var(--t-h3)/1.2 var(--font-display); margin-bottom: var(--s-3); }
.centre__addr { color: var(--muted); margin-bottom: var(--s-4); }
.centre__links { list-style: none; padding: 0; margin: 0 0 var(--s-4); display: grid; gap: 2px; }
.centre__links a { display: inline-block; padding-block: 10px; }
.centre .btn { margin-top: var(--s-2); }
.centre > p { max-width: 42ch; }
@media (max-width: 1023px) { .centre { grid-column: 1 / -1; } }

/* team rows */
.team-group h3 { font: 500 var(--t-card)/1.3 var(--font-text); margin-bottom: var(--s-3); }
.team-group > p { margin-bottom: var(--s-4); max-width: 60ch; }
.people > li { grid-template-columns: minmax(0, 1fr); }
.people > li > p { color: var(--muted); }
.person__more { grid-column: 1; list-style: none; padding: 0; margin: 0; font-size: var(--t-small); color: var(--muted); }
.team-jump a { display: inline-block; padding-block: 10px; }

/* forms */
.form select { width: 100%; font: inherit; font-size: 16px; padding: var(--s-3) var(--s-4); border: 1px solid var(--line-strong, var(--line)); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); min-height: 48px; }
.form .field + .field { margin-top: var(--s-4); }
.form .btn-row { margin-top: var(--s-5); }

/* footer: three centres in two-column cells */
.footer__addr { margin: 0 0 var(--s-3); color: var(--p-inv-muted); }
.footer__social { display: inline-flex; gap: var(--s-5); margin-left: auto; }
@media (max-width: 639px) { .footer__legal a { display: inline-block; padding-block: 10px; margin-block: -10px; } }
.footer__legal { justify-content: flex-start; }
@media (max-width: 639px) { .footer__social { margin-left: 0; } }
@media (max-width: 1023px) { .footer__gap { display: none; } }

/* home: the four most requested treatments beside their photograph */
#traitements .frame--fill img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) { #traitements .grid.fill:has(> .frame--fill) { display: grid; } #traitements .grid.fill > .frame--fill { height: 100%; min-height: 0; } }
@media (max-width: 1023px) { #traitements .frame--fill { min-height: 280px; } }
/* links inside the old text and the facts: underlined, no arrow */
.tlink { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--accent) 55%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color 160ms; }
.tlink:hover { color: var(--accent); text-decoration-color: currentColor; }
.bullets { list-style: disc; }
/* sub pages, tablet and phone: the hero grows with a long heading; the photograph keeps 4:3 under the words */
@media (max-width: 1023px) {
  body.sub .hero--split { height: auto !important; min-height: 0 !important; padding-bottom: var(--s-8); }
  body.sub .hero--split > .wrap, body.sub .hero--split .hero-text { height: auto; }
  body.sub .hero--split .hero__media { flex: none; height: auto; aspect-ratio: 4 / 3; min-height: 0; max-height: 70svh; }
}
/* sub pages on short desktop screens: a long heading may make the hero taller than the screen */
@media (min-width: 1024px) and (max-height: 860px) {
  body.sub .hero--split { height: auto !important; min-height: 100svh; }
  body.sub .hero--split > .wrap, body.sub .hero--split .hero-text { height: auto; }
  body.sub .hero--split .hero__media { min-height: 520px; }
}
/* home on tablets: the specialties and the centres grow with their cards (phones: two screens, .g2m) */
@media (min-width: 640px) and (max-width: 1023px) {
  main > section:is(#specialites, #centres, #traitements, #themes) { height: auto !important; min-height: 100svh; display: block; }
  main > section:is(#specialites, #centres, #traitements, #themes) > .wrap { height: auto; }
  main > section:is(#specialites, #centres, #traitements, #themes) > .wrap > .fill { flex: none; }
}
/* home: photographs under the words of the themes and the centres */
:is(.themes__photo, .centres__photo) { aspect-ratio: 16 / 9; }
:is(.themes__photo, .centres__photo) img { width: 100%; height: 100%; object-fit: cover; display: block; }
.centre-rows__links { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); grid-column: 1 / -1; }
.centre-rows__links a { padding-block: 10px; }
.centres__photo { max-width: 400px; }
/* phones: the home sections grow with what they hold; the centres photo waits for larger screens */
@media (max-width: 639px) {
  main > section:is(#specialites, #centres, #traitements, #themes, #medical) { height: auto !important; min-height: 100svh; display: block; }
  main > section:is(#specialites, #centres, #traitements, #themes, #medical) > .wrap { height: auto; }
  main > section:is(#specialites, #centres, #traitements, #themes, #medical) > .wrap > .fill { flex: none; }
  .centres__photo { display: none; }
  .themes__photo { height: 220px; flex: none !important; }
  .rows__name > a, .centre-rows__links a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 400px) { .nav__logo img.site-logo { height: 22px; } .nav__bar { gap: 8px; } }
/* home themes: the photograph fills the words' column down to the section's foot */
@media (min-width: 640px) { #themes .themes__text { align-self: stretch; display: flex; flex-direction: column; } #themes .themes__photo { flex: 1 1 0; aspect-ratio: auto; min-height: 200px; } }
.themes__photo { width: 100%; overflow: hidden; }
.themes__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* home on phones: the three specialty cards stay within one screen (title and picture; the line waits for larger screens) */
@media (max-width: 639px) {
  #specialites .cards-3 .panel { --p-h: 112px; }
  #specialites .card > p { display: none; }
  #specialites .section-head > p { display: none; }
  #specialites .grid { row-gap: var(--s-4); }
}
/* team: people two-up from tablet width */
@media (min-width: 640px) { .people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-6); } .people > li:first-child { padding-top: var(--s-4); } }
.person__more li { display: block; }
.docs > li { grid-template-columns: minmax(0, 1fr); }
.docs > li > p { color: var(--muted); font-size: var(--t-small); }
/* home hero on short landscape tablets (about 1000 x 768): the words may need more than the screen */
@media (min-width: 640px) and (max-width: 1023px) and (max-height: 860px) {
  .hero--photo { height: auto !important; min-height: 100svh; }
  .hero--photo > .wrap { height: auto; }
}
