/* yverdonenphotos.ch */

:root {
  --paper: #f6f3ec;
  --paper-2: #ebe7dc;
  --white: #fffefa;
  --ink: #1b1d1a;
  --muted: #5f6259;
  --rule: #cfcabd;
  --green: #1a7040;
  --green-dark: #12542f;
  --green-soft: rgba(26, 112, 64, 0.08);
  --green-light: #bfe3cb;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, "Bitstream Charter", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pad: 1.25rem;
  --strip-h: 240px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.55;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

h1, h2, h3 { font-weight: 400; line-height: 1.1; margin: 0; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

/* ------------------------------------------------ header and footer */

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem var(--pad);
  border-bottom: 1px solid var(--rule);
}

.mark, .foot-mark {
  font-family: var(--serif); font-size: 1.25rem; text-decoration: none; letter-spacing: 0.01em;
}
.mark b, .foot-mark b { font-weight: 400; font-style: italic; color: var(--green); }
.mark span:last-child, .foot-mark span:last-child { color: var(--muted); }

.top nav { display: flex; gap: 1.1rem; align-items: center; font-family: var(--sans); font-size: 1rem; }
.top nav a { text-decoration: none; }
.nav-cta {
  border: 1.5px solid var(--ink); border-radius: 999px; padding: 0.45rem 0.95rem; white-space: nowrap;
}
.nav-cta:hover { background: var(--ink); color: var(--paper); }

.foot { border-top: 1px solid var(--rule); background: var(--paper-2); }
.foot-in {
  max-width: 44rem; margin: 0 auto; padding: 2.5rem var(--pad) 3rem;
  font-family: var(--sans); font-size: 1rem; color: var(--muted);
}
.foot-in p { margin: 0 0 0.6rem; }
.foot-mark { color: var(--ink); margin-bottom: 1rem !important; }

/* ------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0.7rem 1.5rem;
  border-radius: 999px; border: 1.5px solid var(--green);
  background: var(--green); color: var(--paper);
  font-family: var(--sans); font-size: 1.0625rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.light { background: var(--white); color: var(--green-dark); border-color: var(--white); }
@media (hover: hover) {
  .btn:hover { background: var(--green-dark); border-color: var(--green-dark); }
  .btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .btn.light:hover { background: #fff; color: var(--green-dark); }
}

.kicker {
  font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--green); margin: 0 0 0.75rem;
}

.back { font-family: var(--sans); font-size: 1rem; margin: 0; padding: 1rem var(--pad); }
.back a { text-decoration: none; }
.back a:hover { text-decoration: underline; }

/* ------------------------------------------------ hero */

.hero-img { margin: 0; }
.hero-img img { width: 100%; }
.hero-img figcaption {
  font-family: var(--sans); font-size: 1rem; color: var(--muted);
  padding: 0.5rem var(--pad) 0;
}
.hero-text { padding: 1.5rem var(--pad) 2.5rem; }
.hero h1 { font-size: clamp(2.75rem, 12.5vw, 4.25rem); letter-spacing: -0.015em; line-height: 1; }
.hero h1 em { color: var(--green); }
.lede { font-size: 1.25rem; line-height: 1.45; margin: 1.1rem 0 1.5rem; max-width: 30rem; }
.lede strong { font-weight: 600; white-space: nowrap; }

.ask {
  background: var(--white); border: 1px solid var(--rule); border-radius: 10px;
  padding: 1.1rem 1.1rem 1rem; max-width: 30rem;
}
.ask h2 { font-size: 1.45rem; line-height: 1.2; }
.ask h2 label { cursor: pointer; }
.ask > p { font-family: var(--sans); font-size: 1rem; color: var(--muted); margin: 0.3rem 0 0.85rem; }
.ask-row { display: flex; gap: 0.6rem; }
.ask input {
  flex: 1; min-width: 0; height: 3.25rem; padding: 0 0.9rem;
  border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper);
  font-family: var(--serif); font-size: 1.5rem; font-variant-numeric: lining-nums; color: var(--ink);
}
.ask input:focus { outline: 3px solid var(--green-light); outline-offset: 0; border-color: var(--green); }
.ask .btn { padding: 0.7rem 1.4rem; }
.ask-msg { font-family: var(--sans); font-size: 1rem; color: var(--green); margin: 0.5rem 0 0; }
.ask-msg:empty { display: none; }
.gift { font-family: var(--sans); font-size: 1rem; color: var(--muted); margin: 1.25rem 0 0; max-width: 30rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }

/* ------------------------------------------------ the century grid */

.century {
  padding: 2.75rem var(--pad) 2.5rem;
  border-top: 1px solid var(--rule);
}
.c-intro { max-width: 34rem; }
.c-intro h2 { font-size: 2rem; line-height: 1.2; margin-bottom: 1rem; }
.c-intro .big { font-size: 1.25em; }
.c-intro .green { color: var(--green); }
.c-intro p:last-child { margin: 0 0 1.75rem; color: var(--muted); }

.grid { display: grid; gap: 3px; max-width: 40rem; }
.row { display: grid; grid-template-columns: 2.6rem repeat(10, 1fr); gap: 3px; align-items: center; }
.dec { font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.cell {
  position: relative; display: block; aspect-ratio: 1; text-decoration: none;
  border-radius: 2px;
}
.cell .yr {
  position: absolute; left: 3px; bottom: 1px;
  font-family: var(--sans); font-size: 0.6875rem; line-height: 1.2; font-variant-numeric: tabular-nums;
}
.cell.empty { border: 1px dashed var(--rule); }
.cell.empty .yr { color: #9a9c90; }
.cell.empty:hover, .cell.empty.on, .cell.empty:target { border: 1.5px solid var(--green); background: var(--green-soft); }
.cell.empty:hover .yr, .cell.empty.on .yr { color: var(--green); }
.cell.full {
  background-color: var(--ink); background-size: cover; background-position: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.cell.full .yr { color: #fff; text-shadow: 0 0 3px rgba(0, 0, 0, 0.9); }
.cell.full:hover { transform: scale(1.12); z-index: 1; transition: transform 0.15s; }
.cell .n {
  position: absolute; right: 2px; top: 1px; font-style: normal;
  font-family: var(--sans); font-size: 0.6875rem; font-weight: 700; color: #fff;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.9);
}

.legend {
  font-family: var(--sans); font-size: 1rem; color: var(--muted);
  margin: 1rem 0 0; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
}
.lg { display: inline-block; width: 1rem; height: 1rem; border-radius: 2px; vertical-align: middle; }
.lg.full { background: var(--ink); }
.lg.empty { border: 1px dashed var(--muted); margin-left: 0.75rem; }

/* ------------------------------------------------ the ribbon, decade by decade */

.decade { border-top: 1px solid var(--rule); padding: 2rem 0 0.5rem; }
.d-head {
  padding: 0 var(--pad); font-size: 3rem; letter-spacing: -0.01em;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.6rem;
}
.d-small { font-size: 1.125rem; font-style: italic; color: var(--muted); width: 100%; }
.d-status { font-family: var(--sans); font-size: 1rem; color: var(--muted); }
.decade.bare .d-head { font-size: 2.25rem; color: var(--muted); }
.decade.bare .d-status { color: var(--green); }

.d-list { list-style: none; margin: 1rem 0 0; padding: 0; }

.year { padding: 0.75rem 0 1.75rem; }
.y-head { display: flex; align-items: baseline; gap: 0.75rem; padding: 0 var(--pad); margin-bottom: 0.75rem; }
.y-num { font-size: 2rem; font-variant-numeric: lining-nums; }
.y-count { font-family: var(--sans); font-size: 1rem; color: var(--muted); }

.strip {
  display: flex; gap: 0.75rem; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad);
  padding: 0 var(--pad) 0.5rem;
  scrollbar-width: thin;
}
.card { margin: 0; flex: 0 0 auto; width: calc(var(--strip-h) * var(--r)); max-width: 86%; scroll-snap-align: start; }
.card img {
  width: 100%; height: var(--strip-h); object-fit: cover;
  background: var(--paper-2); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.strip.solo .card { width: 100%; max-width: 100%; }
.strip.solo .card img { width: 100%; height: auto; max-height: 78vh; object-fit: contain; object-position: left center; background: none; box-shadow: none; }
.card a { display: block; }
.card a:hover img { filter: contrast(1.05) brightness(1.03); }
.card figcaption { font-family: var(--sans); font-size: 1rem; line-height: 1.35; padding-top: 0.5rem; }
.c-date { display: block; font-weight: 600; }
.c-place { display: block; color: var(--muted); }

.more {
  display: inline-block; margin: 0.5rem var(--pad) 0; font-family: var(--sans); font-size: 1rem; font-weight: 600;
}

.gap { padding: 0 var(--pad); margin: 0.25rem 0 1.25rem; }
.gap a {
  display: block; text-decoration: none; padding: 0.9rem 1rem;
  border: 1.5px dashed var(--rule); border-radius: 4px;
}
.gap a:hover { border-color: var(--green); background: var(--green-soft); }
.g-years { display: block; font-size: 1.5rem; color: var(--green); }
.g-text { display: block; font-family: var(--sans); font-size: 1rem; color: var(--muted); }
.g-text u { color: var(--ink); text-decoration-color: var(--green); text-underline-offset: 0.2em; }

/* ------------------------------------------------ taking part */

.join { background: var(--green); color: var(--white); margin-top: 2rem; }
.join-in { max-width: 44rem; margin: 0 auto; padding: 3.25rem var(--pad) 3.5rem; }
.join .kicker { color: var(--green-light); }
.join h2 { font-size: clamp(2.5rem, 11vw, 4rem); letter-spacing: -0.01em; }
.join-lede { font-size: 1.3rem; line-height: 1.45; margin: 1.25rem 0 2rem; }
.join-lede b { color: var(--green-light); font-weight: 400; font-style: italic; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 2rem; }
.steps li {
  counter-increment: s; position: relative; padding: 0 0 1.25rem 3.25rem; margin: 0;
}
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -0.2rem;
  width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 1.5px solid var(--green-light); color: var(--green-light);
  display: grid; place-items: center; font-size: 1.125rem;
}
.steps b { font-weight: 600; }
.join-actions { margin: 0 0 1.5rem; }
.join-actions .btn { width: 100%; max-width: 22rem; font-size: 1.15rem; min-height: 3.6rem; }
.join-note, .join-mail { font-family: var(--sans); font-size: 1rem; color: #d3e3d8; margin: 0 0 0.75rem; max-width: 36rem; }
.join-mail a { color: var(--white); }

.pass, .sources { max-width: 44rem; margin: 0 auto; padding: 3rem var(--pad) 0; }
.pass h2, .sources h2 { font-size: 2rem; margin-bottom: 0.75rem; }
.pass p { margin: 0 0 1.25rem; }
.sources { padding-bottom: 3rem; }
.sources p { color: var(--muted); font-size: 1.0625rem; }
.sources ul { padding-left: 1.1rem; font-family: var(--sans); font-size: 1rem; }
.sources li { margin-bottom: 0.35rem; }

/* ------------------------------------------------ photo page */

.ph-img { margin: 0; background: var(--paper-2); }
.ph-img img { width: 100%; max-height: 82vh; object-fit: contain; margin: 0 auto; }
.ph-text { padding: 1.5rem var(--pad) 1rem; max-width: 40rem; }
.ph-year { font-size: 4.5rem; line-height: 1; margin: 0 0 0.5rem; color: var(--green); letter-spacing: -0.02em; }
.ph-text h1 { font-size: 1.75rem; line-height: 1.2; margin-bottom: 1rem; }
.ph-date { font-family: var(--sans); font-size: 1rem; color: var(--muted); margin: -0.6rem 0 1rem; }
.ph-desc { font-size: 1.25rem; margin: 0 0 1.5rem; }
.ph-meta {
  font-family: var(--sans); font-size: 1rem; margin: 0 0 2rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.5rem 0.75rem;
}
.ph-meta dt { color: var(--muted); }
.ph-meta dd { margin: 0; overflow-wrap: anywhere; }
.ph-ask { background: var(--paper-2); border-radius: 6px; padding: 1.5rem 1.25rem; }
.ph-ask h2 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.ph-ask p { margin: 0 0 1rem; }
.ph-actions { display: flex; flex-direction: column; gap: 0.6rem; margin: 0 !important; }

.prevnext {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem;
  padding: 1.5rem var(--pad) 2.5rem; border-top: 1px solid var(--rule); margin-top: 2rem;
}
.pn { display: flex; gap: 0.6rem; align-items: flex-start; text-decoration: none; font-family: var(--sans); font-size: 1rem; line-height: 1.3; }
.pn img { width: 56px; height: 56px; object-fit: cover; flex: none; }
.pn small { display: block; font-size: 1rem; color: var(--green); font-weight: 600; }
.pn span { overflow-wrap: anywhere; }
.pn { flex-direction: column; }
.pn.next { align-items: flex-end; text-align: right; }
.pn:hover span { text-decoration: underline; }

/* ------------------------------------------------ year page (when a year has many photos) */

.year-page h1 { padding: 0 var(--pad); display: flex; align-items: baseline; gap: 0.75rem; }
.year-page .y-num { font-size: 3.5rem; }
.wall { display: flex; flex-wrap: wrap; gap: 1rem; padding: 1.5rem var(--pad); }
.wall .card { flex: none; width: 100%; max-width: 100%; }
.wall .card img { height: auto; }
.dense .strip.solo .card { width: calc(var(--strip-h) * var(--r)); max-width: 86%; }
.dense .strip.solo .card img { height: var(--strip-h); width: 100%; max-height: none; object-fit: cover; }
.year-more { padding: 0 var(--pad) 3rem; }

/* ------------------------------------------------ toast (share) */

.toast {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); font-family: var(--sans); font-size: 1rem;
  padding: 0.75rem 1.25rem; border-radius: 999px; z-index: 20;
}

/* ------------------------------------------------ larger screens */

@media (min-width: 600px) {
  :root { --pad: 2rem; --strip-h: 300px; }
  .ph-actions { flex-direction: row; flex-wrap: wrap; }
  .wall::after { content: ""; flex: 999 1 0; }
  .wall .card { flex: var(--r) 1 calc(var(--r) * 240px); width: auto; }
  .wall .card img { aspect-ratio: var(--r); }
  .pn { flex-direction: row; }
  .pn.next { flex-direction: row-reverse; }
}

@media (min-width: 900px) {
  :root { --pad: 3rem; }
  body { font-size: 1.1875rem; }

  .hero {
    display: grid; grid-template-columns: 58fr 42fr; align-items: end; gap: 3rem;
    padding: 2.5rem var(--pad) 3.5rem;
  }
  .hero-img figcaption { padding-left: 0; }
  .hero-text { padding: 0 0 2rem; }
  .hero h1 { font-size: clamp(3.4rem, 5vw, 4.75rem); }

  .century {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 3rem; align-items: start;
    padding-top: 4rem; padding-bottom: 4rem;
  }
  .c-intro { position: sticky; top: 2rem; }
  .c-intro h2 { font-size: 2.6rem; }
  .grid, .legend { grid-column: 2; }
  .legend { margin-top: 0; }
  .row { grid-template-columns: 3.2rem repeat(10, 1fr); gap: 4px; }
  .grid { gap: 4px; }
  .dec { font-size: 1rem; }
  .cell .yr, .cell .n { font-size: 0.8125rem; left: 4px; }

  .ribbon { max-width: 84rem; margin: 0 auto; }
  .decade { display: grid; grid-template-columns: 13rem 1fr; padding: 2.5rem var(--pad) 1rem; }
  .d-head { padding: 0; font-size: 3.5rem; flex-direction: column; align-items: flex-start; gap: 0.25rem; align-self: start; position: sticky; top: 1.5rem; }
  .d-small { width: auto; }
  .decade.bare .d-head { font-size: 2.5rem; }
  .d-list { margin: 0; }
  .year { padding-top: 0.25rem; }
  .y-head, .gap, .more { padding-left: 0; padding-right: 0; margin-left: 0; }
  .gap { max-width: 34rem; }

  /* justified rows: each photo takes width in proportion to its shape */
  .strip { flex-wrap: wrap; overflow: visible; padding: 0; gap: 1rem; scroll-snap-type: none; }
  .strip::after { content: ""; flex: 999 1 0; }
  .card { flex: var(--r) 1 calc(var(--r) * 250px); width: auto; max-width: none; }
  .card img { height: auto; aspect-ratio: var(--r); }
  .strip.solo .card { flex: 0 1 calc(var(--r) * 360px); }
  .strip.solo .card img { max-height: none; width: 100%; }
  .strip.solo::after { display: none; }
  .dense .card { flex-basis: calc(var(--r) * 170px); }
  .dense .strip.solo .card { flex: 0 1 calc(var(--r) * 220px); width: auto; max-width: none; }
  .dense .strip.solo .card img { height: auto; }

  .join-in { padding: 4.5rem var(--pad) 5rem; }

  .photo {
    display: grid; grid-template-columns: minmax(0, 62fr) minmax(0, 38fr);
    gap: 0 3rem; padding: 0 var(--pad); max-width: 96rem; margin: 0 auto;
  }
  .photo .back { grid-column: 1 / -1; padding-left: 0; }
  .ph-img { position: sticky; top: 1.5rem; align-self: start; background: none; }
  .ph-img img { max-height: calc(100vh - 3rem); }
  .ph-text { padding: 0 0 1rem; }
  .ph-year { font-size: 6rem; }
  .ph-text h1 { font-size: 2.1rem; }
  .ph-actions { flex-direction: column; }
  .ph-actions .btn { width: 100%; }
  .prevnext { grid-column: 1 / -1; padding-left: 0; padding-right: 0; }
  .pn img { width: 80px; height: 80px; }

}

/* ------------------------------------------------ "Envoyer une photo": always on screen */

body { padding-bottom: 5.5rem; }
.call {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  padding: 0.75rem var(--pad) calc(0.75rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--paper) 65%, rgba(246, 243, 236, 0));
}
.call .btn { width: 100%; font-size: 1.125rem; box-shadow: 0 6px 18px -8px rgba(18, 84, 47, 0.6); }
.cell.empty.on { box-shadow: 0 0 0 3px var(--green-light); }

/* ------------------------------------------------ dialogs */

.dlg {
  border: 0; padding: 0; width: 100%; max-width: 34rem; max-height: 100dvh;
  margin: auto auto 0; border-radius: 16px 16px 0 0;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, 0.35);
}
.dlg::backdrop { background: rgba(20, 24, 20, 0.6); }
.dlg-in { padding: 1.25rem var(--pad) calc(1.75rem + env(safe-area-inset-bottom)); }
.x {
  float: right; width: 3rem; height: 3rem; margin: -0.25rem -0.4rem 0.5rem 0.75rem;
  border-radius: 50%; border: 1.5px solid var(--rule); background: var(--white);
  font-size: 1.6rem; line-height: 1; color: var(--ink); cursor: pointer;
}
.dlg h2 { font-size: 1.85rem; line-height: 1.15; margin: 0 0 0.75rem; }
.dlg p { margin: 0 0 0.9rem; }
.dlg-year { font-size: 5.5rem; line-height: 0.9; letter-spacing: -0.03em; color: var(--green); font-variant-numeric: lining-nums; margin: 0 0 0.6rem !important; }
.dlg-count { font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); }
.dlg-stack { display: grid; gap: 0.6rem; margin-top: 1.4rem; }
.dlg-stack .btn { width: 100%; }
.st { border: 0; margin: 1.25rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--rule); min-width: 0; }
.st legend { float: left; width: 100%; padding: 0; font-size: 1.4rem; line-height: 1.2; margin-bottom: 0.75rem; }
.st legend + * { clear: both; }
.st label { display: block; font-family: var(--sans); font-size: 1rem; font-weight: 600; margin: 1rem 0 0.35rem; }
.st input[type=text], .st textarea {
  display: block; width: 100%; padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--ink); border-radius: 8px; background: var(--white);
  font-family: var(--serif); font-size: 1.15rem; color: var(--ink);
}
.st textarea { resize: vertical; min-height: 6.5rem; }
.st input[type=text]:focus, .st textarea:focus { outline: 3px solid var(--green-light); outline-offset: 0; border-color: var(--green); }
.st .hint, .dlg .hint { font-family: var(--sans); font-size: 1rem; color: var(--muted); margin: 0 0 0.4rem; }
.chk { display: flex; gap: 0.7rem; align-items: flex-start; margin: 0.85rem 0 0 !important; }
.chk input { width: 1.5rem; height: 1.5rem; flex: none; margin: 0.1rem 0 0; accent-color: var(--green); }
.chk label { font-weight: 400; margin: 0; }
.dlg-err { font-family: var(--sans); font-size: 1rem; color: #8a2b1d; margin: 0.75rem 0 0 !important; }
.dlg-err:empty { display: none; }
.st[data-step="4"] { border-top: 0; margin-top: 0; padding-top: 0; }
.dlg-done { font-size: 1.6rem; line-height: 1.2; color: var(--green); clear: both; padding-top: 0.5rem; }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .call { left: auto; right: 1.5rem; bottom: 1.5rem; padding: 0; background: none; }
  .call .btn { width: auto; padding: 0.8rem 1.75rem; }
  .dlg { margin: auto; border-radius: 16px; max-height: calc(100dvh - 3rem); }
  .dlg-in { padding: 1.75rem 2.25rem 2rem; }
}

/* desktop: the header stays on screen and carries the button */
@media (min-width: 900px) {
  html { scroll-padding-top: 5.5rem; }
  .top { position: sticky; top: 0; z-index: 14; background: var(--paper); min-height: 4.5rem; padding-right: calc(var(--pad) + 15rem); }
  .call { top: 0.6rem; bottom: auto; right: var(--pad); }
  .call .btn { min-height: 3.25rem; box-shadow: none; }
  .c-intro { top: 6.5rem; }
  .d-head { top: 6rem; }
  .ph-img { top: 6rem; }
  .ph-img img { max-height: calc(100vh - 7.5rem); }
}

/* ------------------------------------------------ finishing, 20 Nov 2026 */

/* paper grain: the feel of an old album page */
body {
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 0%, rgba(255, 253, 245, 0.7), rgba(235, 228, 210, 0) 70%);
}
.top { background-color: transparent; }
@media (min-width: 900px) {
  .top { background-color: rgba(246, 243, 236, 0.96); backdrop-filter: blur(6px); }
}

/* photos mounted like prints in an album: white border and a soft shadow */
.card img, .hero-img img, .ph-img img {
  background: var(--white);
  padding: 6px;
  box-shadow: 0 1px 2px rgba(40, 32, 20, 0.18), 0 8px 22px -12px rgba(40, 32, 20, 0.45);
}

/* logo: a print with album corners, then the name */
.mark { display: inline-flex; align-items: baseline; color: var(--ink); text-decoration: none; }
.logo-ic { width: 2.4rem; height: auto; flex: none; color: var(--ink); }
.logo-t { font-size: 1.45rem; letter-spacing: 0; white-space: nowrap; }
.logo-t span { color: var(--ink) !important; }
.foot-mark span { color: var(--ink) !important; }

.nav-link { font-size: 1rem; text-decoration: underline; text-underline-offset: 0.25em; white-space: nowrap; }
@media (max-width: 520px) {
  .nav-link { display: none; }
  .logo-t { font-size: 1.25rem; }
  .logo-ic { width: 2rem; }
}

/* header and its button: room around, never against the edge */
@media (min-width: 900px) {
  .top { min-height: 5rem; padding-top: 1rem; padding-bottom: 1rem; }
  .call { top: 0.875rem; }
  html { scroll-padding-top: 6rem; }
}

/* the sender's name under a photo */
.c-by { display: block; font-family: var(--sans); font-size: 0.95rem; color: var(--green); margin-top: 0.15rem; }

/* choosing the photo */
.pick {
  display: block; position: relative; margin: 1rem 0 0 !important;
  border: 2px dashed var(--green); border-radius: 12px; background: var(--white);
  padding: 1.25rem 1rem !important; text-align: center; cursor: pointer;
}
.pick input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.pick-t { font-family: var(--sans); font-size: 1.15rem; font-weight: 600; color: var(--green-dark); }
.pick.need { border-color: #8a2b1d; background: #fbf1ee; }
.pick-prev { margin: 1rem auto 0; max-height: 40vh; width: auto; background: var(--white); padding: 6px; box-shadow: 0 6px 18px -10px rgba(0,0,0,.5); }
.st input[type=email] { display: block; width: 100%; }
#donSend:disabled { opacity: 0.7; cursor: wait; }

/* About and data pages */
.text-page { max-width: 40rem; margin: 0 auto; padding: 2.5rem var(--pad) 4rem; }
.text-page h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 0.4rem 0 1.25rem; }
.text-page h2 { font-size: 1.6rem; margin: 2.25rem 0 0.6rem; color: var(--green-dark); }
.text-page p, .text-page li { font-size: 1.2rem; }
.text-page ul { padding-left: 1.2rem; }
.text-page li { margin-bottom: 0.6rem; }
.text-page .lede { font-size: 1.35rem; }
.pick-prev[hidden] { display: none; }

/* ------------------------------------------------ the years grid, 20 Nov 2026: one run of years, full year in each box */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(3.5rem, 1fr));
  gap: 6px; max-width: 44rem;
}
.cell {
  position: relative; display: flex; flex-direction: column; aspect-ratio: 4 / 5;
  border-radius: 3px; overflow: hidden; text-decoration: none; background: none;
}
.cell .yr {
  position: static; margin-top: auto; display: block; width: 100%;
  padding: 0.2rem 0 0.25rem; text-align: center;
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600; line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
}
.cell.full {
  background: var(--white); padding: 3px 3px 0;
  box-shadow: 0 1px 2px rgba(40, 32, 20, 0.2), 0 4px 10px -6px rgba(40, 32, 20, 0.5);
}
.cell.full img { width: 100%; aspect-ratio: 1; object-fit: cover; padding: 0; box-shadow: none; background: none; }
.cell.full .yr { color: var(--ink); text-shadow: none; }
.cell.full:hover { transform: translateY(-2px); transition: transform 0.15s; }
.cell.empty { border: 1px dashed #bdb7a6; justify-content: flex-end; }
.cell.empty .yr { color: #8f9186; font-weight: 400; }
.cell.empty:hover, .cell.empty.on, .cell.empty:target { border: 1.5px solid var(--green); background: var(--green-soft); }
.cell.empty:hover .yr, .cell.empty.on .yr { color: var(--green); }
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr)); gap: 8px; }
  .cell .yr { font-size: 0.875rem; left: auto; }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(3.6rem, 1fr)); gap: 7px; }
  .cell .yr { font-size: 0.8125rem; }
}
.lg.full { background: var(--white); border: 3px solid var(--white); box-shadow: 0 1px 3px rgba(40, 32, 20, 0.45); background-image: linear-gradient(#5d5f58, #5d5f58); background-clip: content-box; }
.lg.empty { border: 1px dashed #bdb7a6; background: none; }
@media (max-width: 899px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(2.9rem, 1fr)); gap: 5px; }
  .cell { aspect-ratio: 5 / 6; }
  .cell .yr { font-size: 0.75rem; padding: 0.15rem 0 0.2rem; }
  .cell.full { padding: 2px 2px 0; }
}
.cell.full img { aspect-ratio: auto; flex: 1 1 auto; min-height: 0; height: 0; }
.cell .yr { flex: none; }

/* ------------------------------------------------ About page: same parts as the home hero (print, kicker, serif title, green italic) */
.about-img { margin: 0; }
.about-img img { width: 100%; }
.about-img figcaption { font-family: var(--sans); font-size: 1rem; color: var(--muted); padding: 0.5rem var(--pad) 0; }
.about-text { padding: 1.75rem var(--pad) 3.5rem; max-width: 40rem; }
.about h1 { font-size: clamp(2.5rem, 10.5vw, 4rem); letter-spacing: -0.015em; line-height: 1.02; }
.about h1 em { color: var(--green); }
.about .lede { max-width: none; }
.about section { border-top: 1px solid var(--rule); padding-top: 1.4rem; margin-top: 1.6rem; }
.about h2 { font-size: 1.75rem; line-height: 1.15; margin-bottom: 0.55rem; }
.about section p { margin: 0; }
.about-box { background: var(--green-soft); border-top: 0 !important; border-radius: 12px; padding: 1.4rem 1.4rem 1.5rem !important; }
.about-box h2 { color: var(--green-dark); font-style: italic; }
.about-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2.25rem 0 0; }
@media (max-width: 520px) { .about-actions .btn { width: 100%; } }
@media (min-width: 900px) {
  .about { display: grid; grid-template-columns: 44fr 56fr; gap: 4rem; align-items: start; padding: 3rem var(--pad) 4rem; }
  .about-img { position: sticky; top: 7rem; }
  .about-img figcaption { padding-left: 0; }
  .about-text { padding: 0; }
  .about h1 { font-size: clamp(3rem, 4.4vw, 4.25rem); }
}

/* the About link stays visible on phones */
@media (max-width: 520px) {
  .nav-link { display: inline; font-size: 0.95rem; }
  .top nav { gap: 0.7rem; }
  .nav-cta { padding: 0.4rem 0.75rem; }
  .logo-t { font-size: 1.2rem; }
}

/* logo: the Vaud flag (white over green), then the name */
.mark { align-items: center; gap: 0.55rem; }
.vd { width: 1.35rem; height: 1.35rem; flex: none; display: inline-block; vertical-align: -0.2em; }
.foot-mark .vd { margin-right: 0.45rem; }

/* long name: on phones the name sits on two lines, "Yverdon" above "au fil du temps" */
@media (max-width: 520px) {
  .mark .logo-t { display: inline-flex; flex-direction: column; line-height: 1.02; white-space: nowrap; }
  .mark .logo-t span { font-size: 1.2rem; }
  .mark .logo-t b { font-size: 1.02rem; }
  .mark .vd { width: 1.6rem; height: 1.6rem; }
}

/* logo: the Pestalozzi print (ChatGPT drawing, 20 Nov 2026), then the name */
.logo-img { width: 2.6rem; height: 2.6rem; flex: none; display: block; }
.foot-mark { display: flex; align-items: center; gap: 0.55rem; }
.foot-mark .logo-img { width: 2.2rem; height: 2.2rem; }
@media (min-width: 900px) { .logo-img { width: 2.9rem; height: 2.9rem; } }
/* the open-album logo is wide: fixed height, natural width */
.logo-img { width: auto !important; height: 2.4rem !important; }
.foot-mark .logo-img { height: 2rem !important; }
@media (min-width: 900px) { .logo-img { height: 2.75rem !important; } }
@media (max-width: 400px) {
  .logo-img { height: 1.9rem !important; }
  .mark { gap: 0.45rem; }
  .mark .logo-t span { font-size: 1.1rem; }
  .mark .logo-t b { font-size: 0.95rem; }
  .top { gap: 0.6rem; }
  .top nav { gap: 0.55rem; }
}

/* logo lockup (ChatGPT v005, top left): icon, a thin rule, the name on two lines, upright, in ink */
.mark { gap: 0.7rem; }
.mark .logo-img { padding-right: 0.7rem; border-right: 1.5px solid rgba(26, 112, 64, 0.55); box-sizing: content-box; }
.mark .logo-t { display: inline-flex !important; flex-direction: column !important; line-height: 1 !important; white-space: nowrap; }
.mark .logo-t span, .mark .logo-t b { font-family: var(--serif); font-style: normal; font-weight: 400; color: var(--ink) !important; letter-spacing: -0.005em; }
.mark .logo-t span { font-size: 1.32rem !important; }
.mark .logo-t b { font-size: 1.32rem !important; }
.logo-img { height: 2.6rem !important; }
@media (min-width: 900px) {
  .logo-img { height: 3rem !important; }
  .mark .logo-t span, .mark .logo-t b { font-size: 1.5rem !important; }
}
@media (max-width: 400px) {
  .logo-img { height: 2.2rem !important; }
  .mark { gap: 0.55rem; }
  .mark .logo-img { padding-right: 0.55rem; }
  .mark .logo-t span, .mark .logo-t b { font-size: 1.15rem !important; }
}
.foot-mark b { font-style: normal; color: var(--ink); }
/* footer: the same lockup as the header */
.foot-mark { display: block; margin-bottom: 1.25rem !important; }
.foot-mark .mark { text-decoration: none; }
.foot-mark .logo-img { height: 2.6rem !important; }

/* ------------------------------------------------ header menu, 20 Nov 2026: one row, centred together */
.top nav { display: flex; align-items: center; gap: 0.6rem; }
.nav-cta, .nav-link {
  display: inline-flex; align-items: center; justify-content: center;
  height: 2.6rem; padding: 0 1.05rem; border-radius: 999px;
  border: 1.5px solid var(--green); color: var(--green-dark); background: transparent;
  font-family: var(--sans); font-size: 1rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.nav-cta:hover, .nav-link:hover { background: var(--green-soft); color: var(--green-dark); }
.nav-give { display: none; }
@media (min-width: 900px) {
  .top { padding-right: var(--pad) !important; }
  .call { display: none; }
  .nav-give {
    display: inline-flex; align-items: center; justify-content: center;
    height: 3.1rem; min-height: 0; padding: 0 1.6rem; margin-left: 0.3rem;
    font-size: 1.1rem; box-shadow: none;
  }
}
@media (max-width: 520px) {
  .nav-cta, .nav-link { height: 2.4rem; padding: 0 0.8rem; font-size: 0.95rem; }
  .top nav { gap: 0.45rem; }
}
@media (max-width: 400px) {
  .nav-cta, .nav-link { padding: 0 0.65rem; font-size: 0.9rem; }
}
@media (max-width: 400px) {
  .top { padding-left: 1rem; padding-right: 1rem; }
  .logo-img { height: 1.95rem !important; }
  .mark { gap: 0.45rem; }
  .mark .logo-img { padding-right: 0.45rem; }
  .mark .logo-t span, .mark .logo-t b { font-size: 1.05rem !important; }
  .nav-cta, .nav-link { padding: 0 0.6rem; height: 2.3rem; }
  .top nav { gap: 0.35rem; }
}

/* ------------------------------------------------ "Vos photos" page: steps and good-to-know with icons */
.ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.ic svg { width: 1.6rem; height: 1.6rem; }
.simple h1 em { color: var(--green); }
.flow, .good { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.1rem; }
.flow li, .good li { display: flex; gap: 1rem; align-items: flex-start; }
.flow h3, .good h3 { font-size: 1.3rem; line-height: 1.2; margin: 0.35rem 0 0.15rem; }
.flow p, .good p { margin: 0; color: var(--muted); font-size: 1.1rem !important; }
.flow { counter-reset: s; position: relative; }
.flow li { position: relative; }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 1.5rem; top: 3.2rem; bottom: -1rem; border-left: 1.5px dashed var(--green-light); }
.good { gap: 1.2rem; }
.good li { background: var(--white); border: 1px solid var(--rule); border-radius: 12px; padding: 1rem; }
.small-print { font-family: var(--sans); font-size: 0.95rem !important; color: var(--muted); margin-top: 2.5rem; border-top: 1px solid var(--rule); padding-top: 1.2rem; }
@media (min-width: 900px) { .good { grid-template-columns: 1fr 1fr; } }
.text-page ul.good { padding-left: 0; }
.good li { margin-bottom: 0 !important; }
@media (min-width: 900px) { .good { grid-template-columns: 1fr; } }
.simple h1 { font-size: clamp(2.2rem, 5vw, 3.1rem); }

/* ------------------------------------------------ footer, 20 Nov 2026: three columns on desktop, a thin bottom bar */
.foot-in { display: grid; gap: 1.75rem; max-width: 84rem; margin: 0 auto; padding: 2.5rem var(--pad) 2rem; }
.foot-in p { margin: 0 0 0.4rem; }
.foot-brand p:last-child { font-family: var(--sans); font-size: 1rem; color: var(--muted); margin-top: 0.5rem; }
.foot-mark { margin: 0 !important; }
.foot-nav { display: flex; flex-direction: column; gap: 0.55rem; font-family: var(--sans); font-size: 1rem; }
.foot-nav a { text-decoration: none; color: var(--ink); }
.foot-nav a:hover { color: var(--green); text-decoration: underline; }
.foot-contact { font-family: var(--sans); font-size: 1rem; color: var(--muted); }
.foot-contact a { color: var(--green-dark); }
.foot-bar {
  max-width: 84rem; margin: 0 auto; padding: 1rem var(--pad) 1.5rem;
  border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; justify-content: space-between;
  font-family: var(--sans); font-size: 0.9rem; color: var(--muted);
}
.foot-bar p { margin: 0; }
.foot-bar a { color: var(--muted); }
@media (min-width: 900px) {
  .foot-in { grid-template-columns: 2fr 1fr 1.3fr; align-items: start; padding-top: 3rem; padding-bottom: 2.5rem; }
}
.legal h1 { font-size: clamp(2.2rem, 5vw, 3rem); }
.small-date { font-family: var(--sans); font-size: 0.95rem !important; color: var(--muted); }
.st input[type=email] { padding: 0.75rem 0.9rem; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--white); font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.st input[type=email]:focus { outline: 3px solid var(--green-light); outline-offset: 0; border-color: var(--green); }
/* outlined buttons in green everywhere, like the menu */
.btn.ghost { border-color: var(--green); color: var(--green-dark); }
@media (hover: hover) { .btn.ghost:hover { background: var(--green-soft); color: var(--green-dark); border-color: var(--green); } }

/* ------------------------------------------------ history page, 24 Nov 2026: built from the album's parts (decade heads, year numbers, prints, dashed box) */
.hist { padding-bottom: 1rem; }
.h-hero { padding: 2.5rem var(--pad) 2.5rem; max-width: 52rem; }
.h-hero h1 { font-size: clamp(2.6rem, 11vw, 4.25rem); letter-spacing: -0.015em; line-height: 1.02; }
.h-hero h1 em { color: var(--green); }
.h-hero .lede { max-width: 34rem; }

/* all the history on one line */
.h-scale { margin: 2rem 0 0; max-width: 44rem; }
.hs-bar { position: relative; display: flex; gap: 2px; height: 0.9rem; }
.hs-seg { display: block; height: 100%; background: var(--paper-2); border-radius: 2px; }
.hs-seg:nth-child(even) { background: var(--rule); opacity: 0.6; }
.hs-album {
  position: absolute; top: -0.35rem; bottom: -0.35rem; min-width: 4px;
  background: var(--green); border-radius: 2px; box-shadow: 0 0 0 2px var(--paper);
}
.hs-ends { display: flex; justify-content: space-between; font-family: var(--sans); font-size: 1rem; color: var(--muted); margin-top: 0.5rem; }
.h-scale figcaption { font-family: var(--sans); font-size: 1rem; color: var(--muted); margin-top: 0.35rem; }

/* an era: a decade of the album */
.era { border-top: 1px solid var(--rule); padding: 2rem 0 0.5rem; }
.e-head {
  padding: 0 var(--pad); font-size: 2.75rem; letter-spacing: -0.01em; line-height: 1.05;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.e-head .d-small { width: auto; line-height: 1.3; }

/* the dates: a thin line, a small green dot, the year as in the album */
.e-list { list-style: none; margin: 1.5rem var(--pad) 0; padding: 0 0 0 2rem; border-left: 1px solid var(--rule); }
.ev { position: relative; padding: 0 0 2.5rem; max-width: 36rem; }
.ev::before {
  content: ""; position: absolute; left: calc(-2rem - 0.35rem - 0.5px); top: 0.8rem;
  width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--paper);
}
.ev-date { font-size: 2rem; line-height: 1.15; color: var(--ink); margin: 0; font-variant-numeric: lining-nums; }
.ev h3 { font-size: 1.3rem; line-height: 1.25; margin: 0.3rem 0 0.6rem; color: var(--green-dark); }
.ev-text { margin: 0; }

/* a photo of today: the same print and size as an album photo */
.ev-img { margin: 1.25rem 0 0; }
.ev-img img {
  width: 100%; background: var(--white); padding: 6px;
  box-shadow: 0 1px 2px rgba(40, 32, 20, 0.18), 0 8px 22px -12px rgba(40, 32, 20, 0.45);
}
.ev-img figcaption { font-family: var(--sans); font-size: 1rem; line-height: 1.35; padding-top: 0.5rem; }
.ev-cap { display: block; font-weight: 600; }
.ev-credit { display: block; color: var(--muted); }
.ev-credit a { color: var(--muted); }

/* the album's own prints, small, like the boxes of the years grid */
.ev-album { margin-top: 1.25rem; }
.ev-album p { font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); margin: 0 0 0.5rem; }
.ev-cells { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-cells .cell { width: 4.6rem; aspect-ratio: 4 / 5; }
.ev-cells .cell .yr { font-size: 0.875rem; }

/* the end of the line: the album's dashed box */
.e-list .ev-gap { padding: 0; margin: 0 0 1.5rem; max-width: 36rem; }

/* inhabitants */
.h-pop { max-width: 44rem; margin: 0 auto; padding: 3rem var(--pad) 0; }
.h-pop h2 { font-size: 2rem; margin-bottom: 0.75rem; }
.h-pop > p { margin: 0 0 1.5rem; }
.pop { padding: 2rem 0 0 0; }
.pop-plot { position: relative; height: 14rem; border-bottom: 1.5px solid var(--ink); }
.pop-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pop-plot polyline { fill: none; stroke: var(--green); stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pop-grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--rule); }
.pop-grid i { position: absolute; left: 0; bottom: 0.2rem; font-style: normal; font-family: var(--sans); font-size: 1rem; color: var(--muted); }
.pop-dot {
  position: absolute; width: 0.75rem; height: 0.75rem; margin: 0 0 -0.375rem -0.375rem;
  border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px var(--paper); cursor: default; z-index: 1;
}
.pop-dot::before { content: ""; position: absolute; inset: -0.6rem; }
.pop-dot:hover::after, .pop-dot:focus::after {
  content: attr(data-tip); position: absolute; bottom: 1.3rem; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); font-family: var(--sans); font-size: 1rem; white-space: nowrap;
  padding: 0.35rem 0.7rem; border-radius: 6px; z-index: 3;
}
.pop-dot:focus { outline: 3px solid var(--green-light); outline-offset: 2px; }
.pop-lab {
  position: absolute; transform: translate(-50%, -0.6rem); margin-bottom: 0.4rem;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--ink); white-space: nowrap; pointer-events: none;
}
.pop-lab.end { transform: translate(-100%, -0.6rem); }
.pop-x { position: relative; height: 1.8rem; }
.pop-tick { position: absolute; top: 0.35rem; transform: translateX(-50%); font-family: var(--sans); font-size: 1rem; color: var(--muted); }
.pop-table { margin-top: 1.25rem; font-family: var(--sans); font-size: 1rem; }
.pop-table summary { cursor: pointer; color: var(--green-dark); font-weight: 600; }
.pop-table table { border-collapse: collapse; margin-top: 0.75rem; }
.pop-table th, .pop-table td { text-align: left; padding: 0.3rem 1.5rem 0.3rem 0; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.pop-table th { color: var(--muted); font-weight: 600; }

.h-end { max-width: 44rem; margin: 0 auto; padding: 3rem var(--pad) 0; }
.h-end .about-box h2 { font-size: 1.75rem; line-height: 1.15; margin-bottom: 0.55rem; }
.h-end .about-box p:not(.about-actions) { margin: 0; }
.h-end .about-actions { margin-top: 1.4rem; }
.h-sources { padding-top: 3rem; }

/* home: the line to the history page */
.c-intro p.c-hist { margin: -1rem 0 1.75rem; color: var(--ink); font-size: 1.0625rem; }
.c-hist a { color: var(--green-dark); }

@media (min-width: 900px) {
  .h-hero { padding: 3.5rem var(--pad) 3rem; }
  .h-hero h1 { font-size: clamp(3.2rem, 4.8vw, 4.5rem); }
  .era { display: grid; grid-template-columns: 15rem 1fr; column-gap: 3rem; padding: 2.5rem var(--pad) 1rem; max-width: 84rem; margin: 0 auto; }
  .e-head { padding: 0; font-size: 3rem; position: sticky; top: 6rem; align-self: start; overflow-wrap: break-word; }
  .e-list { margin: 0.5rem 0 0; padding-left: 2.5rem; }
  .ev::before { left: calc(-2.5rem - 0.35rem - 0.5px); }
  .ev { max-width: 38rem; }
  /* a photo of today: the height of a single album photo */
  .ev-img { width: calc(var(--r) * 360px); max-width: 100%; }
  .pop-plot { height: 16rem; }
}

/* phones: three menu buttons do not fit beside the logo; À propos stays in the footer */
@media (max-width: 520px) { .top nav .nav-link { display: none; } }
.pop-lab.left { transform: translate(calc(-100% - 0.7rem), 50%); margin-bottom: 0; }
.h-sources { padding-bottom: 0; }
.h-photos { padding-top: 2.5rem; }
.pop-src { font-family: var(--sans); font-size: 1rem; color: var(--muted); margin: 1.5rem 0 0; }
.pop-src a { color: var(--muted); }
.pop-lab, .pop-grid i, .pop-tick, .pop-table td { font-variant-numeric: lining-nums tabular-nums; }
/* the tip of a dot: above every other dot, inside the chart, only for a real hover or keyboard focus */
.pop-dot:hover, .pop-dot:focus-visible { z-index: 4; }
.pop-dot:focus { outline: none; }
.pop-dot:focus-visible { outline: 3px solid var(--green-light); outline-offset: 2px; }
.pop-dot:focus:not(:focus-visible):not(:hover)::after { content: none; }
.pop-dot.tip-l:hover::after, .pop-dot.tip-l:focus-visible::after { left: -0.4rem; transform: none; }
.pop-dot.tip-r:hover::after, .pop-dot.tip-r:focus-visible::after { left: auto; right: -0.4rem; transform: none; }
.pop-dot::after { box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.5); }
.pop-dot::after { pointer-events: none; }
/* phones: dots are close together, so the touch area of one never covers its neighbour */
@media (max-width: 899px) { .pop-dot::before { inset: -0.25rem; } }
.pop-lab.start { transform: translate(-0.375rem, -0.6rem); }

/* history text v003: longer texts in short paragraphs, more air between the dates (expert view, 24 Nov 2026) */
.ev { padding-bottom: 3.5rem; }
.ev h3 { margin-bottom: 0.8rem; }
.ev-text { line-height: 1.6; }
.ev-text + .ev-text { margin-top: 0.9em; }
.h-sources ul { margin-top: 1rem; }
.h-sources li a { color: var(--ink); }
@media (min-width: 900px) {
  .ev { padding-bottom: 4rem; max-width: 34rem; }
}
.hs-album-t { color: var(--green); font-weight: 600; }
/* photo page: the credit on one line (author and holder, licence, original) */
.ph-credit { font-family: var(--sans); font-size: 1rem; line-height: 1.5; color: var(--muted); margin: 0 0 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.ph-credit a { color: var(--muted); }

/* memories under a photo, and the memory form (24 Nov 2026): the album's parts (green rule, serif text, sender's name in green) */
.ph-souv { margin: 0 0 2rem; }
.ph-souv h2 { font-size: 1.6rem; margin-bottom: 0.75rem; }
.ph-souv ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.ph-souv blockquote { margin: 0; padding-left: 1rem; border-left: 2px solid var(--green-light); font-size: 1.15rem; line-height: 1.55; }
.souv-by { font-family: var(--sans); font-size: 0.95rem; color: var(--green); margin: 0.35rem 0 0 1rem; }
.dlg-photo { font-family: var(--sans); font-size: 1rem; color: var(--muted); margin: -0.4rem 0 0 !important; }
.st input[type=text]#sNom { margin-bottom: 0; }
.souv-end { border-top: 0; margin-top: 0; padding-top: 0.5rem; }
.join-alt { font-family: var(--sans); font-size: 1rem; color: var(--white); margin: -0.5rem 0 1.25rem; max-width: 36rem; }
/* a licence name stays on one line, even at its hyphen */
a[rel=license] { white-space: nowrap; }

/* ------------------------------------------------ photo page, 24 Nov 2026 */
/* 1. the photo stays on screen while the text scrolls, and stops with it, before Avant / Après */
@media (min-width: 900px) {
  .photo { display: block; }
  .ph-main { display: grid; grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); gap: 0 3rem; align-items: start; }
}
/* 2. the white mount follows the photo's own shape, tall or wide, like a print in an album */
.ph-img img { width: auto; height: auto; max-width: 100%; }
@media (min-width: 900px) { .ph-img img { margin: 0 auto; max-height: calc(100vh - 10rem); } }

/* 3. Avant / Après: two cards built from the album's parts (a print in its white mount, the year in the serif, the place in grey) */
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 2.5rem; padding: 1.5rem var(--pad) 3rem; border-top: 1px solid var(--rule); }
.prevnext .pn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem;
  padding: 0.75rem; margin: -0.75rem; border-radius: 10px;
  text-decoration: none; color: var(--ink); font-family: var(--serif); line-height: 1.2;
  transition: background 0.15s;
}
.prevnext .pn.next { align-items: flex-end; text-align: right; justify-self: end; }
.prevnext .pn img {
  width: 4.5rem; height: 4.5rem; object-fit: cover; flex: none;
  background: var(--white); padding: 3px;
  box-shadow: 0 1px 2px rgba(40, 32, 20, 0.2), 0 4px 10px -6px rgba(40, 32, 20, 0.5);
  transition: transform 0.15s;
}
.prevnext .pn-t { display: block; overflow-wrap: anywhere; }
.prevnext .pn-year { display: block; font-size: 1.6rem; font-variant-numeric: lining-nums; }
.prevnext .pn-arrow { color: var(--green); font-family: var(--sans); font-size: 0.9em; }
.prevnext .pn-place { display: block; font-family: var(--sans); font-size: 1rem; color: var(--muted); margin-top: 0.2rem; }
.prevnext .pn:hover { background: var(--green-soft); }
.prevnext .pn:hover img { transform: translateY(-2px); }
.prevnext .pn:hover span { text-decoration: none; }
@media (min-width: 600px) {
  .prevnext .pn { flex-direction: row; align-items: center; gap: 1rem; }
  .prevnext .pn.next { flex-direction: row-reverse; align-items: center; }
  .prevnext .pn img { width: 5.5rem; height: 5.5rem; }
}
@media (min-width: 900px) {
  .prevnext { padding: 2rem 0 3.5rem; }
  .prevnext .pn-year { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) { .prevnext .pn img { transition: none; } }

/* final review, 25 Nov: no visible text under 16 px; the photo picker shows keyboard focus like every other control */
.foot-bar, .small-print, .small-date, .c-by, .souv-by { font-size: 1rem !important; }
.pick:focus-within { outline: 3px solid var(--green); outline-offset: 3px; }
.flow h2 { font-size: 1.3rem; line-height: 1.2; margin: 0.35rem 0 0.15rem; color: inherit; }
/* phone menu at 16 px; only the very small 320 px screens keep 14.4 px, where 16 px would touch the logo */
@media (min-width: 340px) and (max-width: 520px) { .top nav .nav-cta { font-size: 1rem; } }
