@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500;1,600&family=Outfit:wght@300;400;500;600&display=swap");

:root {
  --cream: #f4efe4;
  --paper: #ebe3d2;
  --ink: #1b1712;
  --muted: #5e564c;
  --forest: #24382c;
  --moss: #3f5c45;
  --copper: #c45c26;
  --gold: #c9a36a;
  --mist: rgba(244, 239, 228, 0.12);
  --shadow: 0 24px 60px rgba(20, 16, 12, 0.18);
  --radius: 18px;
  --header-h: 72px;
  --font-serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --font-sans: "Outfit", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(63, 92, 69, 0.12), transparent 50%),
    radial-gradient(900px 400px at 100% 0%, rgba(196, 92, 38, 0.08), transparent 46%),
    var(--cream);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img,
iframe,
video {
  max-width: 100%;
  height: auto;
}

iframe {
  width: 100% !important;
  min-height: 280px;
  border: 0;
  border-radius: 12px;
}

table {
  max-width: 100%;
}

a {
  color: var(--copper);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--forest);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -40px;
  z-index: 400;
  padding: 0.5rem 0.8rem;
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

/* ---------- Header & menu (toutes les pages) ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  min-height: var(--header-h);
  padding: 0 1rem 0 4.4rem;
  background: rgba(27, 23, 18, 0.92);
  border-bottom: 1px solid rgba(201, 163, 106, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--cream);
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background:
    radial-gradient(circle at 35% 30%, #e8d7b0, transparent 40%),
    conic-gradient(from 210deg, #3f5c45, #c45c26, #24382c);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: rgba(244, 239, 228, 0.62);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

#menuToggle {
  position: absolute;
  top: 20px;
  left: 16px;
  z-index: 220;
  user-select: none;
}

#menuToggle a {
  color: var(--cream);
  text-decoration: none;
}

#menuToggle a:hover {
  color: var(--gold);
}

#menuToggle input {
  position: absolute;
  top: -8px;
  left: -6px;
  width: 42px;
  height: 36px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 230;
}

#menuToggle span {
  display: block;
  position: relative;
  width: 28px;
  height: 2px;
  margin-bottom: 6px;
  background: #f4efe4;
  border-radius: 2px;
  z-index: 221;
  transform-origin: 4px 0;
  transition: transform 0.4s ease, opacity 0.3s ease, background 0.3s ease;
}

#menuToggle span:first-child {
  transform-origin: 0% 0%;
}

#menuToggle span:nth-last-child(2) {
  transform-origin: 0% 100%;
}

#menuToggle input:checked ~ span {
  background: var(--gold);
  transform: rotate(45deg) translate(-1px, -1px);
}

#menuToggle input:checked ~ span:nth-last-child(3) {
  opacity: 0;
  transform: rotate(0) scale(0.2);
}

#menuToggle input:checked ~ span:nth-last-child(2) {
  transform: rotate(-45deg) translate(0, -1px);
}

#menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 210;
  display: flex;
  flex-direction: column;
  width: min(100vw, 360px);
  height: 100vh;
  margin: 0;
  padding: 88px 1.4rem 2rem;
  overflow: auto;
  list-style: none;
  background: linear-gradient(180deg, #16130f 0%, #24382c 100%);
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.28);
  transform: translateX(-105%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#menuToggle input:checked ~ ul {
  transform: none;
}

#menu li {
  padding: 0.35rem 0;
  font-size: 1rem;
  color: rgba(244, 239, 228, 0.88);
}

#menu a {
  display: block;
}

#menu a[href="#"],
#menu a[href="#"] li,
#menu .menu-heading,
#menu .menu-heading a {
  margin-top: 0.85rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  pointer-events: none;
}

#menu .menu-heading:first-child,
#menu .menu-heading:first-child a,
#menu a[href="index.html"] {
  pointer-events: auto;
  color: var(--cream);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* Pages internes : le menu historique enveloppe <a><li> */

#menu > a {
  display: block;
}

#menu > a li {
  padding: 0.28rem 0;
  font-size: 0.98rem;
}

/* ---------- Pages internes ---------- */

body:not(.home) {
  padding-bottom: 0;
}

.page-body {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3.5rem;
}

body:not(.home) h1,
body:not(.home) H1 {
  margin: 1.4rem 0 0.8rem;
  color: var(--forest);
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.2;
  text-align: center;
}

body:not(.home) h2,
body:not(.home) H2 {
  margin: 1.4rem 0 0.7rem;
  color: var(--forest);
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.25;
}

body:not(.home) h3,
body:not(.home) h4,
body:not(.home) h5,
body:not(.home) h6,
body:not(.home) H3 {
  margin: 0.4rem 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(0.98rem, 2.2vw, 1.08rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1.75;
}

body:not(.home) img {
  display: block;
  margin: 1rem auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

body:not(.home) .box80 {
  width: min(920px, 100%);
  margin-inline: auto;
}

body:not(.home) table {
  width: 100%;
  margin: 1rem 0 1.4rem;
  border-collapse: separate;
  border-spacing: 0;
  background: #fffdf8;
  border: 1px solid rgba(36, 56, 44, 0.1);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(20, 16, 12, 0.06);
}

body:not(.home) table table {
  margin: 0.2rem 0 0.6rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body:not(.home) table img {
  box-shadow: none;
}

body:not(.home) td,
body:not(.home) th {
  padding: 0.55rem 0.8rem;
  vertical-align: top;
  border-bottom: 1px solid rgba(36, 56, 44, 0.08);
}

body:not(.home) tr:last-child > td,
body:not(.home) tr:last-child > th {
  border-bottom: 0;
}

body:not(.home) table table tr:nth-child(even) > td {
  background: rgba(36, 56, 44, 0.035);
}

body:not(.home) td[colspan],
body:not(.home) td[COLSPAN] {
  color: var(--forest);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  background: rgba(36, 56, 44, 0.05);
}

body:not(.home) .page-body,
body:not(.home) div[style*="text-align:left"] {
  overflow-x: auto;
}

.inner-footer {
  padding: 1.4rem 1rem 1.8rem;
  background: #14110e;
  color: rgba(244, 239, 228, 0.7);
  font-size: 0.88rem;
}

.inner-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.2rem;
}

.inner-footer a {
  color: var(--gold);
  text-decoration: none;
}

/* ---------- Visionneuse photos / cartes postales ---------- */

.viewer,
.album,
.preamble {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.6rem 0 3.2rem;
}

.viewer-kicker,
.album .kicker,
.preamble .kicker {
  margin: 0 0 0.4rem;
  color: var(--copper);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}

.viewer h1,
.album h1,
.preamble h1 {
  margin-top: 0.2rem;
}

.viewer-meta {
  margin: -0.3rem 0 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.viewer-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
}

.viewer-frames {
  display: grid;
  gap: 0.9rem;
}

.viewer-frames.recto-verso {
  grid-template-columns: 1fr 1fr;
}

.viewer-frames figure {
  margin: 0;
  overflow: hidden;
  background: #1b1712;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.viewer-frames img,
.album-grid img {
  width: 100%;
  height: auto;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.viewer-frames figcaption {
  padding: 0.55rem 0.8rem 0.75rem;
  color: rgba(244, 239, 228, 0.78);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--cream);
  font-size: 1.6rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: var(--shadow);
}

nav-btn_sv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--cream);
  font-size: 1.6rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.nav-btn:hover {
  background: var(--copper);
  color: #fff;
}

.nav-btn.is-disabled {
  visibility: hidden;
  pointer-events: none;
}

.viewer-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem 1.1rem;
  margin-top: 1.3rem;
}

.viewer-toolbar a {
  color: var(--forest);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.viewer-toolbar a:hover {
  color: var(--copper);
}

.filmstrip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin: 1.2rem 0 0.4rem;
}

.filmstrip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.4rem;
  border: 1px solid rgba(36, 56, 44, 0.14);
  border-radius: 999px;
  color: var(--forest);
  font-size: 0.8rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.5);
}

.filmstrip a:hover,
.filmstrip a.is-current {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1.4rem 0 1.6rem;
}

.album-grid a {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #1b1712;
  box-shadow: var(--shadow);
}

.album-grid img {
  min-height: 160px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.album-grid a:hover img {
  transform: scale(1.04);
}

.album-actions,
.preamble-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.preamble .lede {
  max-width: 42rem;
  margin: 0 auto 1.6rem;
  color: var(--muted);
  text-align: left;
}

.preamble .lede p {
  margin: 0 0 0.9rem;
}

.btn-on-light {
  background: var(--forest);
  color: var(--cream);
}

.btn-on-light:hover {
  background: var(--moss);
  color: #fff;
}

.btn-outline {
  border: 1px solid rgba(36, 56, 44, 0.2);
  color: var(--forest);
  background: transparent;
}

.btn-outline:hover {
  background: var(--forest);
  color: var(--cream);
}

/* ---------- Accueil ---------- */

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(92vh, 860px);
  place-items: end start;
  overflow: hidden;
  color: var(--cream);
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(20, 16, 12, 0.18) 0%, rgba(20, 16, 12, 0.28) 40%, rgba(20, 16, 12, 0.78) 100%),
    linear-gradient(90deg, rgba(36, 56, 44, 0.45), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(780px, calc(100% - 2.4rem));
  margin: 0 0 5.5rem 6vw;
}

.eyebrow,
.kicker {
  margin: 0 0 0.7rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(3rem, 9vw, 6.4rem);
  font-weight: 600;
  font-style: italic;
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 36rem;
  margin: 1.2rem 0 1.8rem;
  color: rgba(244, 239, 228, 0.86);
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  font-weight: 300;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--copper);
  color: #fff8f2;
}

.btn-primary:hover {
  background: #a64b1e;
  color: #fff;
}

.btn-ghost {
  border: 1px solid rgba(244, 239, 228, 0.45);
  color: var(--cream);
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(244, 239, 228, 0.1);
  color: #fff;
}

.scroll-hint {
  position: absolute;
  right: 6vw;
  bottom: 1.6rem;
  z-index: 2;
  color: rgba(244, 239, 228, 0.75);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.intro,
.explore,
.gallery {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.intro h2,
.explore h2,
.gallery h2,
.commune-body h2 {
  margin: 0 0 0.9rem;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.1;
}

.lede {
  max-width: 42rem;
  margin: 0 0 2.4rem;
  color: var(--muted);
  font-size: 1.12rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.stats li {
  padding: 1.2rem 1.1rem;
  border: 1px solid rgba(36, 56, 44, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.38);
}

.stats strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.45rem;
}

.stats span {
  color: var(--muted);
  font-size: 0.92rem;
}

.communes {
  display: grid;
  gap: 1.25rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 1rem;
}

.commune-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
  background: #fffdf8;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.commune-card.reverse {
  grid-template-columns: 0.95fr 1.05fr;
}

.commune-card.reverse .commune-visual {
  order: 2;
}

.commune-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.commune-body {
  padding: clamp(1.4rem, 4vw, 2.6rem);
}

.commune-body p {
  color: var(--muted);
}

.meta {
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.chip-row a {
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(36, 56, 44, 0.16);
  border-radius: 999px;
  color: var(--forest);
  font-size: 0.82rem;
  text-decoration: none;
}

.chip-row a:hover {
  background: var(--forest);
  color: var(--cream);
}

.explore {
  background:
    linear-gradient(180deg, rgba(36, 56, 44, 0.94), #1b1712);
  color: var(--cream);
}

.explore .kicker,
.gallery .kicker {
  color: var(--gold);
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.explore-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 1.3rem 1.2rem;
  border: 1px solid rgba(244, 239, 228, 0.12);
  border-radius: 22px;
  color: inherit;
  text-decoration: none;
  background: rgba(244, 239, 228, 0.04);
  transition: transform 0.2s ease, background 0.2s ease;
}

.explore-card:hover {
  transform: translateY(-4px);
  background: rgba(244, 239, 228, 0.09);
  color: inherit;
}

.explore-index {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 1.4rem;
}

.explore-card h3 {
  margin: 1.4rem 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 600;
}

.explore-card p {
  margin: 0;
  color: rgba(244, 239, 228, 0.72);
  font-size: 0.95rem;
}

.gallery-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.text-link {
  color: var(--forest);
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.9rem;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #1b1712;
}

.gallery-grid figure:first-child {
  grid-row: 1 / span 2;
}

.gallery-grid img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-grid figure:hover img {
  transform: scale(1.04);
}

.gallery-grid figcaption {
  padding: 0.7rem 0.9rem 0.9rem;
  color: rgba(244, 239, 228, 0.8);
  font-size: 0.85rem;
}

.site-footer {
  padding: 2.4rem 0 2.8rem;
  background: #14110e;
  color: rgba(244, 239, 228, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 1.5rem;
  align-items: start;
}

.brand-footer {
  margin: 0 0 0.35rem;
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 1.6rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--cream);
}

.credit {
  margin: 0;
  font-size: 0.88rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .stats,
  .explore-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .commune-card,
  .commune-card.reverse {
    grid-template-columns: 1fr;
  }

  .commune-card.reverse .commune-visual {
    order: 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-grid figure:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

@media (max-width: 680px) {
  header {
    padding-left: 4.1rem;
  }

  .hero-content {
    margin: 0 0 4.6rem 1.1rem;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 14vw, 3.6rem);
  }

  .stats,
  .explore-grid,
  .footer-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-head {
    flex-direction: column;
    align-items: start;
  }

  .commune-visual img {
    min-height: 220px;
    max-height: 280px;
  }

  .page-body {
    width: calc(100% - 1.25rem);
  }

  body:not(.home) img[width] {
    width: 100% !important;
  }

  .viewer-stage {
    display: block;
  }

  .viewer-frames.recto-verso,
  .album-grid {
    grid-template-columns: 1fr;
  }

  .viewer-frames figure {
    width: 100%;
    margin: 0 auto;
  }

  .viewer-frames figure.paysage img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: cover;
  }

  .viewer-frames figure.portrait img {
    max-height: 70vh !important;
    width: auto !important;
    margin: 0 auto !important;
    display: block;
  }

  .nav-btn {
    order: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .explore-card,
  .btn,
  .gallery-grid img,
  #menu {
    transition: none;
  }
}

/* Empêche les photos en portrait de déborder de l'écran sur ordinateur */
.viewer-frames figure.portrait img {
  max-height: 75vh !important;
  width: auto !important;
  margin: 0 auto !important;
  display: block;
}

@media (max-width: 680px) {
  .viewer-stage {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .viewer-frames figure.portrait img {
    max-height: 60vh !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    margin: 0 auto !important;
  }
}
