/* 2026-11-11, Maher: "so so… specially the font and how big the price is": medium weights instead of black, the
   price at half its size. */
/* Template « Moderne »: Swiss and contemporary. Scoped under .tpl-moderne (the leaflet reads only the --b-* tokens).
   Grid: 12 columns between 14 mm margins, 4 mm gutters (11.5 mm columns), on every page. Satoshi only.
   Colour: ink #14171C on white (18.1:1), muted #5B616B (6.3:1), deep blue #1E2F4D blocks with white text (13.3:1),
   gold #C9A46A only for the small labels on the blue (5.8:1). Type: 7 pt labels, 10 pt text, 22 or 36 pt titles,
   and the numerals (price 88 pt, facts 34 pt, gallery index 48 pt). */
.tpl-moderne { --b-ground: #FFFFFF; --b-ink: #14171C; --b-muted: #5B616B; --b-accent: #1E2F4D; --b-rule: #E3E5E8; --b-display: "Satoshi", system-ui, sans-serif; --b-text: "Satoshi", system-ui, sans-serif; --b-display-weight: 500; --b-display-case: none; --b-display-track: -.03em;
  --m: 14mm; --g: 4mm; --m-blue: #1E2F4D; --m-gold: #C9A46A; --m-hair: #CDD1D7; }

/* ---------- the grid, cells and their bleed ---------- */
.tpl-moderne .m-frame { position: absolute; top: 0; bottom: 0; left: var(--m); right: var(--m); display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); }
.tpl-moderne .m-flow { display: flex; flex-direction: column; }
.tpl-moderne .m-cell { position: relative; isolation: isolate; min-height: 0; --et: 0mm; --el: 0mm; --er: 0mm; --eb: 0mm; }
.tpl-moderne .x-t { --et: calc(-1 * var(--bleed)); }
.tpl-moderne .x-b { --eb: calc(-1 * var(--bleed)); }
.tpl-moderne .x-l { --el: calc(-1 * (var(--m) + var(--bleed))); }
.tpl-moderne .x-r { --er: calc(-1 * (var(--m) + var(--bleed))); }
.tpl-moderne .m-cell > .m-ph, .tpl-moderne .m-blue::before { position: absolute; top: var(--et); left: var(--el); right: var(--er); bottom: var(--eb); }
.tpl-moderne .m-ph { overflow: hidden; background: #E9EBEE; }
.tpl-moderne .m-blue { color: #fff; }
.tpl-moderne .m-blue::before { content: ""; z-index: -1; background: var(--m-blue); }

/* the photo number: a white tag on the photo's inner edge, on the grid */
.tpl-moderne .m-tag { position: absolute; left: 0; top: 0; z-index: 1; padding: 1.7mm 2.3mm 1.5mm; background: #fff; color: var(--b-ink);
  font-size: 7pt; font-weight: 800; line-height: 1; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.tpl-moderne .x-t > .m-tag { top: auto; bottom: 0; }
.tpl-moderne .x-t.x-b > .m-tag { top: var(--m); bottom: auto; }

.tpl-moderne .m-label { margin: 0 0 3mm; font-size: 7pt; font-weight: 700; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase; color: var(--b-muted); }
.tpl-moderne .m-label.on-blue { color: var(--m-gold); }
.tpl-moderne .m-logo { display: block; width: 100%; height: 100%; min-width: 0; object-fit: contain; }
.tpl-moderne h1, .tpl-moderne h2 { max-width: none; font-family: var(--b-display); font-variation-settings: normal; text-wrap: balance; }
.tpl-moderne [data-fit] { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; }
/* tight titles (line-height near 1): room for the descenders inside the box, so the editor's « text cut » check stays quiet */
.tpl-moderne .m-title, .tpl-moderne .m-headline, .tpl-moderne .m-name, .tpl-moderne .m-phone { padding-bottom: .14em; margin-bottom: -.14em; }

/* ---------- 1. cover ---------- */
.tpl-moderne .m-cover .m-frame { grid-template-rows: 186mm minmax(0, 1fr); }
.tpl-moderne .m-cover__ph { grid-area: 1 / 1 / 2 / 13; }
.tpl-moderne .m-cover.no-band .m-cover__ph { grid-row: 1 / 3; }
/* the logo top left on the photo, alone, in its own colours (Maher 2026-11-21: no white square) */
.tpl-moderne .m-tab { grid-area: 1 / 1 / 2 / 6; align-self: start; z-index: 2; margin-top: 13mm; }
.tpl-moderne :is(.m-tab, .m-contact__logo) .m-logo { width: auto; height: auto; max-width: 100%; max-height: 20mm; }
.tpl-moderne .m-tab .m-logo { object-position: 0 0; }
.tpl-moderne .m-cover__band { grid-area: 2 / 1 / 3 / 13; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g);
  grid-template-rows: auto auto minmax(0, 1fr) auto auto; padding: 11mm 0 13mm; }
.tpl-moderne .m-cover.no-photo .m-cover__band { grid-row: 1 / 3; padding-top: 16mm; }
.tpl-moderne .m-cover__band > .m-label { grid-area: 1 / 1 / 2 / 10; }
.tpl-moderne .m-title { grid-area: 2 / 1 / 3 / 10; -webkit-line-clamp: 2; margin-top: 1mm; font-size: 22pt; font-weight: 500; line-height: 1.08; letter-spacing: -.022em; }
.tpl-moderne .m-chips { grid-area: 4 / 1 / 5 / 13; display: flex; flex-wrap: wrap; gap: 2mm; margin: 0 0 6mm; padding: 0; list-style: none; }
.tpl-moderne .m-chips li { padding: 1.6mm 2.4mm 1.3mm; border: .25mm solid rgba(255,255,255,.6); font-size: 7pt; font-weight: 700; line-height: 1; letter-spacing: .14em; text-transform: uppercase; }
.tpl-moderne .m-price { grid-area: 5 / 1 / 6 / 13; margin: 0 0 -2.6mm -1mm; font-size: 44pt; font-weight: 500; line-height: .9; letter-spacing: -.025em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tpl-moderne .m-price.is-long { font-size: 38pt; }
.tpl-moderne .m-price__unit { margin-left: .14em; font-size: .5em; font-weight: 500; letter-spacing: 0; vertical-align: 1.05em; }
.tpl-moderne .m-cover.no-photo .m-price { font-size: 56pt; }

/* ---------- 2. the story ---------- */
.tpl-moderne .m-story .m-flow { padding-top: 13mm; }
.tpl-moderne .m-run { flex: none; display: flex; justify-content: space-between; gap: 10mm; padding-bottom: 2.6mm; border-bottom: .7mm solid var(--b-ink);
  font-size: 7pt; font-weight: 700; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase; }
.tpl-moderne .m-run span:first-child { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tpl-moderne .m-folio { font-variant-numeric: tabular-nums; }
.tpl-moderne .m-text { flex: 0 1 auto; min-height: 0; overflow: hidden; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g);
  align-content: start; row-gap: 11mm; padding-top: 12mm; }
.tpl-moderne .m-headline { grid-column: 1 / 12; -webkit-line-clamp: 3; font-size: 30pt; font-weight: 500; line-height: 1.06; letter-spacing: -.02em; }
.tpl-moderne .m-intro { grid-column: 1 / 7; }
.tpl-moderne .m-text:not(.has-high) .m-intro { grid-column: 1 / 9; }
.tpl-moderne .m-intro__p { -webkit-line-clamp: 18; padding-top: 2.6mm; border-top: .7mm solid var(--b-ink); font-size: 10pt; line-height: 1.55; hyphens: manual; text-wrap: pretty; }
.tpl-moderne .m-high { grid-column: 8 / 13; }
.tpl-moderne .m-text:not(.has-intro) .m-high { grid-column: 1 / 8; }
.tpl-moderne .m-high ol { margin: 0; padding: 0; list-style: none; }
.tpl-moderne .m-high li { display: grid; grid-template-columns: 8mm minmax(0, 1fr); padding: 2.3mm 0 2.5mm; border-top: .2mm solid var(--m-hair); font-size: 10pt; line-height: 1.4; }
.tpl-moderne .m-high li:first-child { border-top: .7mm solid var(--b-ink); }
.tpl-moderne .m-high__n { font-weight: 600; font-variant-numeric: tabular-nums; }
.tpl-moderne .m-high__t { -webkit-line-clamp: 3; }
/* no photo left for the story: the headline at the top, the text at the foot, white between (a Swiss poster) */
.tpl-moderne .m-story:not(:has(.m-story__ph)) .m-text { flex: 1 1 auto; grid-template-rows: auto minmax(0, 1fr); padding-bottom: 14mm; }
.tpl-moderne .m-story:not(:has(.m-story__ph)) :is(.m-intro, .m-high) { align-self: end; }
.tpl-moderne .m-story__ph { flex: 1 0 96mm; margin-top: 12mm; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); }
.tpl-moderne .m-story__ph > .a { grid-column: 1 / 13; }
.tpl-moderne .m-story__ph.n-2 > .a { grid-column: 1 / 9; }
.tpl-moderne .m-story__ph.n-2 > .b { grid-column: 9 / 13; }

/* ---------- 3. the gallery: a hero, then the blue index cell and the mosaic ---------- */
.tpl-moderne .m-gallery .m-frame { row-gap: var(--g); }
.tpl-moderne .m-gallery.n-4 .m-frame, .tpl-moderne .m-gallery.n-3 .m-frame { grid-template-rows: 132mm 78mm minmax(0, 1fr); }
.tpl-moderne .m-gallery.n-2 .m-frame { grid-template-rows: 124mm 40mm minmax(0, 1fr); }
.tpl-moderne .m-gallery.n-1 .m-frame { grid-template-rows: minmax(0, 1fr) 78mm; }
/* five: the hero, two rows of two, the blue index as a band at the foot */
.tpl-moderne .m-gallery.n-5 .m-frame { grid-template-rows: 112mm 74mm 74mm minmax(0, 1fr); }
.tpl-moderne .m-gallery.n-5 .b { grid-area: 2 / 1 / 3 / 7; }
.tpl-moderne .m-gallery.n-5 .c { grid-area: 2 / 7 / 3 / 13; }
.tpl-moderne .m-gallery.n-5 .d { grid-area: 3 / 1 / 4 / 7; }
.tpl-moderne .m-gallery.n-5 .e { grid-area: 3 / 7 / 4 / 13; }
.tpl-moderne .m-gallery.n-5 .x { grid-area: 4 / 1 / 5 / 13; flex-direction: row; align-items: center; padding: 0; }
.tpl-moderne .m-gallery.n-5 .x .m-label { margin: 0; }
.tpl-moderne .m-gallery .a { grid-area: 1 / 1 / 2 / 13; }
.tpl-moderne .m-gallery .x { grid-area: 2 / 1 / 3 / 6; }
.tpl-moderne .m-gallery .b { grid-area: 2 / 6 / 3 / 13; }
.tpl-moderne .m-gallery .c { grid-area: 3 / 1 / 4 / 7; }
.tpl-moderne .m-gallery .d { grid-area: 3 / 7 / 4 / 13; }
.tpl-moderne .m-gallery.n-3 .c, .tpl-moderne .m-gallery.n-2 .b { grid-area: 3 / 1 / 4 / 13; }
.tpl-moderne .m-gallery.n-2 .x { grid-column: 1 / 13; }
/* one photo: it fills the page, the blue index cell stamped on its lower-left corner */
.tpl-moderne .m-gallery.n-1 .a { grid-row: 1 / 3; }
.tpl-moderne .m-gallery .x { display: flex; flex-direction: column; justify-content: space-between; padding: 6mm 6mm 6mm 0; }
.tpl-moderne .m-range { font-size: 36pt; font-weight: 500; line-height: .8; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }

/* ---------- 4. back cover ---------- */
.tpl-moderne .m-back.no-photo .m-flow { padding-top: 14mm; }
.tpl-moderne .m-back__ph { flex: 1 1 100mm; min-height: 84mm; }
.tpl-moderne .m-facts { flex: none; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); margin: 10mm 0 0; }
.tpl-moderne .m-back.no-photo .m-facts { margin-top: 0; }
.tpl-moderne .m-fact { grid-column: span 3; padding-top: 3.2mm; border-top: .7mm solid var(--b-ink); }
.tpl-moderne .m-fact__n { margin: 0; font-size: 28pt; font-weight: 500; line-height: .9; letter-spacing: -.04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tpl-moderne .m-fact__n.is-long { font-size: 24pt; }
.tpl-moderne .m-fact__n span { margin-left: .12em; font-size: .36em; font-weight: 700; letter-spacing: 0; vertical-align: 1.25em; }
.tpl-moderne .m-fact dt { margin-top: 2.6mm; font-size: 7pt; font-weight: 700; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase; color: var(--b-muted); }
.tpl-moderne .m-rows { flex: none; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); margin: 9mm 0 0; }
.tpl-moderne .m-rows > div { grid-column: span 6; display: flex; justify-content: space-between; align-items: baseline; gap: 6mm; padding: 2.2mm 0 2.4mm; border-top: .2mm solid var(--m-hair); border-bottom: .2mm solid var(--m-hair); font-size: 10pt; line-height: 1.4; }
.tpl-moderne .m-rows dt { flex: none; color: var(--b-muted); }
.tpl-moderne .m-rows dd { min-width: 0; margin: 0; -webkit-line-clamp: 2; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.tpl-moderne .m-contact { flex: none; margin-top: 12mm; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); align-content: start; padding: 11mm 0 13mm; }
.tpl-moderne .m-contact:first-child { margin-top: 0; }
.tpl-moderne .m-back.no-photo .m-contact { flex: 1; align-content: end; }
.tpl-moderne .m-who { grid-column: 1 / 9; }
.tpl-moderne .m-contact__logo { grid-column: 9 / 13; align-self: start; display: flex; justify-content: flex-end; }
.tpl-moderne .m-contact__logo .m-logo { object-position: 100% 0; }
.tpl-moderne .m-name { -webkit-line-clamp: 2; margin-top: 1mm; font-size: 22pt; font-weight: 500; line-height: 1.05; letter-spacing: -.025em; }
.tpl-moderne .m-co { -webkit-line-clamp: 1; margin-top: 1.6mm; font-size: 10pt; color: rgba(255,255,255,.78); }
.tpl-moderne .m-phone { -webkit-line-clamp: 1; margin-top: 8mm; font-size: 18pt; font-weight: 500; line-height: 1.05; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tpl-moderne .m-mail { -webkit-line-clamp: 1; margin-top: 1.6mm; font-size: 10pt; overflow-wrap: anywhere; }
.tpl-moderne .m-legal { grid-column: 1 / 13; margin-top: 9mm; padding-top: 2.6mm; border-top: .2mm solid rgba(255,255,255,.3); font-size: 7pt; line-height: 1.4; letter-spacing: .02em; color: rgba(255,255,255,.8); }
.tpl-moderne .m-contact > .m-legal:first-child { margin-top: 0; }

/* back cover with no photo left: the whole sheet turns blue, the facts set large in white, two to a row */
.tpl-moderne .bleedbox:has(> .m-back.no-photo) { --b-ground: var(--m-blue); }
.tpl-moderne .m-back.no-photo { color: #fff; }
.tpl-moderne .m-back.no-photo .m-fact { grid-column: span 6; margin-bottom: 9mm; border-top-color: #fff; }
.tpl-moderne .m-back.no-photo .m-fact__n { font-size: 64pt; }
.tpl-moderne .m-back.no-photo .m-fact__n.is-long { font-size: 48pt; }
.tpl-moderne .m-back.no-photo .m-fact dt { color: var(--m-gold); }
.tpl-moderne .m-back.no-photo .m-rows { margin-top: 0; }
.tpl-moderne .m-back.no-photo .m-rows > div { border-color: rgba(255,255,255,.3); }
.tpl-moderne .m-back.no-photo .m-rows dt { color: rgba(255,255,255,.72); }
