/* Échelle de lecture commune, chargée après les styles des composants.
   Les titres et les documents numérisés gardent leur présentation. */
:root {
  --muted: #515e52;
  --type-reading: 1.125rem;
  --type-text: 1rem;
  --type-note: .9375rem;
  --type-caption: .875rem;
  --type-label: .8125rem;
}

/* Les textes secondaires restent clairs dans les surfaces vert foncé. */
.history-section, .site-footer, .photo-dialog { --muted: #d8e2d0; }

body { font-size: 1.0625rem; line-height: 1.75; }

.site-header nav a { font-size: var(--type-text); line-height: 1.5; }
.wordmark span { font-size: .625rem; }
.icon-button { width: 44px; height: 44px; flex-shrink: 0; }
.button, .hero-actions .button, .journey-heading-actions > .button {
  font-size: var(--type-text);
  line-height: 1.5;
  min-height: 52px;
}
.text-link, .hero-actions .text-link, .section-heading > .text-link,
.discovery-section .section-heading > .text-link, .journal-card .text-link,
.resume-visit > .text-link, .album-recovery .text-link {
  font-size: var(--type-text);
  line-height: 1.65;
}
.eyebrow,
:is(.hero-copy, .section-heading, .timeline-copy, .featured-caption,
    .collection-callout, .place-copy, .journey-card-copy, .result-card,
    .related-card, .dialog-top, .archive-provenance) .eyebrow {
  font-size: var(--type-label);
  line-height: 1.7;
  letter-spacing: .1em;
}
.hero-intro, .introduction > div > p, .timeline-copy > p:not(.eyebrow),
.place-copy > p:not(.eyebrow), .page-heading > p:not(.eyebrow, .breadcrumb, .gallery-note),
.about-body p, .about-body ul {
  font-size: var(--type-reading);
  line-height: 1.85;
  color: var(--muted);
}
.hero-intro { max-width: 470px; }
.featured-caption p:not(.eyebrow), .journal-card p,
.section-heading > p, .empty-state p {
  font-size: var(--type-text);
  line-height: 1.8;
  color: var(--muted);
}
.art-topline, .hero-baseline, .map-label { font-size: var(--type-label); }
.hero-art figcaption { font-size: var(--type-caption); gap: 16px; }
.hero-art figcaption i { font-size: 1.125rem; }
.hero-art .figure-number {
  font-size: var(--type-label);
  max-width: 44%;
  flex: 0 1 44%;
}
.timeline-story figure figcaption, .timeline-source,
.human-layout figcaption, .quote-credit, .map-note,
.journal-card time { font-size: var(--type-caption); line-height: 1.75; }

/* Lieux et portraits : légendes lisibles et commandes faciles à toucher. */
.place-tabs { gap: 8px; margin-bottom: 22px; }
.map-city { font-size: 17px; }
.map-city-small { font-size: 15px; }
.place-tabs button {
  font-size: var(--type-text);
  font-weight: 500;
  line-height: 1.5;
  padding: 10px 14px;
  min-height: 46px;
}
.person-card h3 { line-height: 1.2; }
.person-dates { font-size: var(--type-text); letter-spacing: .025em; margin-top: 8px; }
.person-role { font-size: var(--type-text); line-height: 1.75; margin-top: 10px; }
.family-entry { font-size: var(--type-text); line-height: 1.75; padding: 22px 0; }
.family-entry a { padding: 8px 0; }

/* Parcours, listes et collections. */
.journey-card-copy > p:not(.eyebrow), .journey-outline li p,
.journey-continuation > p:not(.eyebrow), .result-card p {
  font-size: var(--type-text);
  line-height: 1.8;
  color: var(--muted);
}
.journey-card-foot, .journey-heading-actions > span, .step-visited,
.journey-note, .related-card > div > span, .result-card time,
.gallery-item .gallery-type, .gallery-versions { font-size: var(--type-caption); line-height: 1.7; }
.free-exploration, .free-exploration a, .free-exploration button,
.resume-visit p:not(.eyebrow), .gallery-item figcaption { font-size: var(--type-text); }
.gallery-item figcaption { line-height: 1.7; overflow-wrap: anywhere; }
.gallery-item .gallery-type { letter-spacing: .065em; }
.gallery-note, body[data-page=gallery] .gallery-note { font-size: var(--type-note); }
.filter-chip, .small-button, .archive-tools .small-button,
.reader-sections button, .reader-toolbar .small-button {
  font-size: var(--type-text);
  line-height: 1.5;
  padding: 10px 14px;
  min-height: 44px;
}
.list-controls { font-size: var(--type-note); flex-wrap: wrap; gap: 16px; }
.list-controls select { font-size: var(--type-text); min-height: 44px; max-width: 100%; }
.gallery-search input { font-size: var(--type-text); }
.gallery-navigation { font-size: var(--type-note); white-space: normal; }
.breadcrumb { font-size: var(--type-text); line-height: 1.7; }

/* Notices et sources : ne pas réduire la police sur téléphone. */
.legacy-content, .legacy-content table,
.legacy-content .archive-data-table {
  font-size: var(--type-reading);
  line-height: 1.9;
}
.archive-heading .archive-lead, .article-intro,
.source-aside, .source-aside p, .source-aside .source-note,
.archive-provenance > p:not(.eyebrow), .legacy-content .family-card-body > p,
.legacy-content .family-card-links a, .legacy-content .family-unavailable,
.legacy-content .family-portal-note, .legacy-content .portrait-archive-biography,
.legacy-content .portrait-archive-biography p,
.legacy-content .archive-document figcaption, .album-recovery p,
.source-comment p, .comment-summary, .legacy-content .missing-media {
  font-size: var(--type-text);
  line-height: 1.85;
}
.archive-provenance > .text-link { font-size: var(--type-text); }
.source-details, .source-details summary, .source-details > a,
.source-details .source-note, .family-unavailable > span,
.archive-status { font-size: var(--type-note); line-height: 1.8; }
.source-details dt { font-size: var(--type-caption); line-height: 1.7; }
.source-details dd { font-size: var(--type-note); }
.archive-document-open::after { font-size: var(--type-caption); }
.archive-toc h2 { font-size: var(--type-text) !important; }
.archive-toc a, .mobile-archive-toc summary, .mobile-archive-toc a {
  font-size: var(--type-text); line-height: 1.65;
}
.journey-trail > a, .journey-trail .trail-next, .trail-title strong { font-size: var(--type-text); }
.trail-title small { font-size: var(--type-label); }

/* Lecteur, formulaires et fenêtres de recherche. */
.reader-heading > p:not(.eyebrow), .reader-caption,
.reader-page-form, .reader-page-form input, .reader-downloads .text-link,
.contact-intro, .contact-status, #contact-form label, #contact-result,
.contact-aside p:not(.eyebrow) { font-size: var(--type-text); line-height: 1.8; }
.reader-page-image > span, .reader-origin, .reader-loading,
.field-help, .contact-privacy { font-size: var(--type-note); line-height: 1.8; }
#contact-form input, #contact-form select, #contact-form textarea {
  font-size: 1.0625rem;
  min-height: 48px;
}
.search-hint, .quick-result p, #quick-results > .muted, .toast { font-size: var(--type-note); }
.search-hint button { font-size: var(--type-text); line-height: 1.8; }
.photo-toolbar, .photo-toolbar > span, .photo-context > p,
.photo-bottom, .photo-bottom p, .photo-bottom .text-link,
.photo-provenance, .photo-provenance h3, .photo-provenance a,
.zoom-reset, .photo-sequence-controls > span { font-size: var(--type-note); line-height: 1.65; }
.photo-provenance a small { font-size: var(--type-caption); }
.zoom-reset { white-space: nowrap; flex: 0 0 60px; min-height: 44px; }
.photo-toolbar .icon-button, .photo-toolbar .photo-sequence-controls .icon-button {
  width: 44px; height: 44px;
}
.photo-toolbar > div { flex-wrap: wrap; row-gap: 8px; }
.photo-context { max-height: min(260px, 32dvh); }
.footer-top > p { font-size: var(--type-text); line-height: 1.8; }
.footer-bottom { font-size: var(--type-caption); line-height: 1.8; row-gap: 18px; }
.heritage-type small { font-size: var(--type-label); }
.heritage-type b { font-size: var(--type-caption); }

@media (max-width: 1200px) {
  .site-header nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    padding: 22px 28px;
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 1px solid var(--rule);
    gap: 12px;
    max-height: 75vh;
    overflow: auto;
  }
  .site-header nav.open { display: flex; }
  .site-header nav a {
    font-size: 1.125rem; padding: 6px 0;
    display: flex; align-items: center; min-height: 44px;
  }
  .menu-toggle { display: inline-grid; }
}

@media (max-width: 800px) {
  .section-heading { flex-wrap: wrap; }
  .section-heading > .text-link,
  .discovery-section .section-heading > .text-link { max-width: none; }
  .featured-grid { gap: 32px; }
  .featured-card { align-items: start; }
  .featured-caption .eyebrow { padding-right: 18px; }
  .map-city { font-size: 22px; }
  .map-city-small { font-size: 20px; }
  .hero-baseline { flex-wrap: wrap; }
  .hero-baseline > span { flex-wrap: wrap; }
  .reader-downloads { gap: 18px; }
  .archive-tools { flex-wrap: wrap; }
  .photo-context { max-height: min(220px, 28dvh); }
}

@media (max-width: 600px) {
  .hero-actions { gap: 20px; flex-wrap: wrap; }
  .hero-art .figure-number { font-size: var(--type-label); }
  .place-tabs { gap: 8px; }
  .map-city { font-size: 24px; }
  .map-city-small { font-size: 22px; }
  .people-grid { gap: 32px 20px; }
  .person-card h3 { font-size: 29px; overflow-wrap: anywhere; }
  .family-entry { flex-direction: column; align-items: flex-start; gap: 10px; }
  .collection-callout { gap: 16px; }
  .photo-toolbar { position: relative; }
  .photo-toolbar > span { padding-right: 48px; min-height: 44px; line-height: 44px; }
  .photo-toolbar > div > [data-close-dialog] { position: absolute; right: 10px; top: 10px; }
  .journey-trail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: 16px; row-gap: 8px;
  }
  .journey-trail .trail-title { grid-column: 1/3; grid-row: 1; }
  .trail-title strong { max-width: none; white-space: normal; overflow: visible; }
  .journey-trail .trail-leave { grid-column: 3; grid-row: 1; }
  .journey-trail .trail-previous { grid-column: 1; grid-row: 2; }
  .journey-trail .trail-next { grid-column: 2/4; grid-row: 2; justify-self: end; }
  .legacy-content [id] { scroll-margin-top: calc(var(--header-height) + 145px); }
  .hero-baseline > span:first-child { max-width: 100%; }
}

@media print {
  body { font-size: 11pt; }
  .legacy-content, .legacy-content table { font-size: 11pt; line-height: 1.6; }
}
