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

:root {
  --bm-bg: #121820;
  --bm-bg-2: #1a2430;
  --bm-ink: #f3eee4;
  --bm-muted: rgba(243, 238, 228, 0.68);
  --bm-line: rgba(243, 238, 228, 0.12);
  --bm-accent: #d4a85a;
  --bm-accent-ink: #1a1410;
  --bm-stone: #8b7355;
  --bm-warn: #e8b86d;
  --bm-ok: #8fbf8a;
  --bm-max: 1100px;
  --bm-font: "Outfit", sans-serif;
  --bm-display: "Cormorant Garamond", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body.bm-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--bm-font);
  color: var(--bm-ink);
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(212, 168, 90, 0.14), transparent 55%),
    radial-gradient(900px 600px at 90% 10%, rgba(90, 120, 140, 0.18), transparent 50%),
    linear-gradient(180deg, #0e141c 0%, var(--bm-bg) 40%, #0c1218 100%);
  line-height: 1.45;
}

a {
  color: inherit;
}

.bm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--bm-max);
  margin: 0 auto;
  padding: 1.1rem 1.25rem 0.4rem;
}

.bm-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--bm-ink);
}

.bm-brand-logo {
  display: block;
  height: clamp(36px, 5vw, 48px);
  width: auto;
  max-width: min(180px, 42vw);
  object-fit: contain;
}

.bm-brand-text {
  font-family: var(--bm-display);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bm-ink);
}

.bm-top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 400;
}

.bm-top-nav a {
  text-decoration: none;
  color: var(--bm-muted);
  transition: color 0.2s ease;
}

.bm-top-nav a:hover {
  color: var(--bm-ink);
}

.bm-share-fb {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(24, 119, 242, 0.45);
  border-radius: 2px;
  background: rgba(24, 119, 242, 0.14);
  color: #8ab4f8 !important;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.bm-share-fb:hover {
  background: rgba(24, 119, 242, 0.28);
  border-color: rgba(24, 119, 242, 0.7);
  color: #d6e6ff !important;
}

.bm-hero {
  position: relative;
  max-width: var(--bm-max);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 3.2rem;
  overflow: hidden;
}

.bm-hero-media {
  position: absolute;
  inset: 0.5rem 1.25rem auto;
  height: min(52vh, 420px);
  z-index: 0;
  overflow: hidden;
  animation: bm-hero-in 1.1s ease both;
}

.bm-hero-video,
.bm-hero-poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.bm-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(18, 24, 32, 0.62) 8%,
    rgba(18, 24, 32, 0.28) 48%,
    rgba(18, 24, 32, 0.68) 100%
  );
  pointer-events: none;
}

.bm-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  padding: 2.4rem 0 1rem;
  animation: bm-rise 0.9s ease 0.15s both;
}

.bm-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bm-accent);
  font-weight: 500;
}

.bm-hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--bm-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.bm-hero-lead {
  margin: 0 0 1.5rem;
  color: var(--bm-muted);
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 28rem;
}

.bm-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1.25rem;
  border: 0;
  border-radius: 2px;
  background: var(--bm-accent);
  color: var(--bm-accent-ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.bm-cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.bm-cta--ghost {
  background: transparent;
  color: var(--bm-ink);
  border: 1px solid var(--bm-line);
}

.bm-cta--ghost:hover {
  border-color: rgba(243, 238, 228, 0.35);
  filter: none;
}

.bm-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.bm-wrap {
  max-width: var(--bm-max);
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.bm-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin: 0 0 1.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--bm-line);
}

.bm-section-head h2 {
  margin: 0;
  font-family: var(--bm-display);
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  font-weight: 600;
}

.bm-section-head p {
  margin: 0;
  color: var(--bm-muted);
  font-size: 0.95rem;
  max-width: 28rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bm-search {
  display: block;
  margin: 1.1rem 0 0;
  max-width: 28rem;
}

.bm-search input[type="search"] {
  box-sizing: border-box;
  width: 100%;
  padding: 0.72rem 0.95rem;
  border: 1px solid var(--bm-line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--bm-ink);
  font: inherit;
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.bm-search input[type="search"]::placeholder {
  color: rgba(243, 238, 228, 0.42);
}

.bm-search input[type="search"]:focus {
  border-color: rgba(212, 168, 90, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

.bm-search input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

.bm-search-meta {
  margin: 0.55rem 0 0 !important;
  font-size: 0.88rem !important;
  color: var(--bm-accent) !important;
}

.bm-flash {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--bm-line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.95rem;
  animation: bm-rise 0.45s ease both;
}

.bm-flash--ok {
  border-color: rgba(143, 191, 138, 0.45);
  color: var(--bm-ok);
}

.bm-flash--warn {
  border-color: rgba(232, 184, 109, 0.45);
  color: var(--bm-warn);
}

.bm-prices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 2.25rem;
}

.bm-price-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--bm-line);
  background: rgba(255, 255, 255, 0.03);
}

.bm-price-card-label {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bm-muted);
}

.bm-price-card-value {
  font-family: var(--bm-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--bm-accent);
  line-height: 1.1;
}

.bm-monuments {
  display: grid;
  gap: 0;
}

@media (max-width: 720px) {
  .bm-prices {
    grid-template-columns: 1fr;
  }
}

.bm-monument {
  scroll-margin-top: 1.25rem;
  padding: 1.65rem 0;
  border: 0;
  border-top: 1px solid rgba(243, 238, 228, 0.16);
  background: transparent;
  animation: bm-rise 0.7s ease both;
}

.bm-monument:first-child {
  border-top: 0;
  padding-top: 0.35rem;
}

.bm-monument + .bm-monument {
  margin-top: 0.35rem;
}

.bm-monument:nth-child(2) {
  animation-delay: 0.08s;
}

.bm-monument:nth-child(3) {
  animation-delay: 0.16s;
}

.bm-monument-row {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 1rem 1.35rem;
  align-items: start;
}

.bm-monument-left {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.bm-monument-cover {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--bm-bg-2);
}

.bm-monument-meta h3 {
  margin: 0 0 0.25rem;
  font-family: var(--bm-display);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 600;
}

.bm-monument-meta .bm-sub {
  margin: 0 0 0.45rem;
  color: var(--bm-accent);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.bm-monument-meta .bm-blurb {
  margin: 0 0 0.55rem;
  color: var(--bm-muted);
  font-size: 0.95rem;
}

.bm-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  color: var(--bm-muted);
}

.bm-counts li {
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--bm-line);
}

.bm-monument-thumbs {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 0.35rem;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 168, 90, 0.45) transparent;
}

.bm-monument-thumbs::-webkit-scrollbar {
  width: 6px;
}

.bm-monument-thumbs::-webkit-scrollbar-thumb {
  background: rgba(212, 168, 90, 0.4);
  border-radius: 3px;
}

.bm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.65rem;
  align-content: start;
}

/* SSR SEO (avant hydratation JS) */
.bm-seo-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.65rem;
}

.bm-seo-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--bm-muted, rgba(243, 238, 228, 0.75));
}

.bm-seo-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: #0e141c;
}

.bm-thumb {
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.bm-thumb:hover,
.bm-thumb:focus-visible {
  border-color: rgba(212, 168, 90, 0.45);
  outline: none;
  transform: translateY(-2px);
}

.bm-thumb-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bm-bg-2);
}

.bm-thumb-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(0.98) saturate(0.92);
}

.bm-thumb-type {
  position: absolute;
  left: 0.4rem;
  top: 0.4rem;
  padding: 0.15rem 0.4rem;
  background: rgba(12, 16, 22, 0.72);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bm-thumb-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
}

.bm-thumb-tech {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--bm-muted);
  letter-spacing: 0.01em;
}

.bm-thumb-price {
  margin: 0;
  font-size: 0.82rem;
  color: var(--bm-accent);
}

.bm-license {
  margin-top: 2.5rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--bm-line);
  color: var(--bm-muted);
  font-size: 0.9rem;
}

.bm-license h2 {
  margin: 0 0 0.45rem;
  font-family: var(--bm-display);
  font-size: 1.35rem;
  color: var(--bm-ink);
  font-weight: 600;
}

.bm-footer {
  max-width: var(--bm-max);
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  color: var(--bm-muted);
  font-size: 0.82rem;
}

.bm-footer a {
  color: var(--bm-ink);
}

/* Modal preview */
.bm-modal[hidden] {
  display: none !important;
}

.bm-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.bm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 14, 0.78);
  backdrop-filter: blur(4px);
  border: 0;
  cursor: pointer;
}

.bm-modal-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: #161e28;
  border: 1px solid var(--bm-line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: bm-rise 0.35s ease both;
}

.bm-modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--bm-line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--bm-ink);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.bm-preview-frame {
  position: relative;
  background: #0b1016;
  min-height: 220px;
}

.bm-preview-frame img,
.bm-preview-frame video,
.bm-preview-video {
  display: block;
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  margin: 0 auto;
}

.bm-preview-frame img {
  filter: contrast(0.95) brightness(0.92);
  -webkit-user-drag: none;
  user-select: none;
}

.bm-preview-video-shell {
  position: relative;
  width: 100%;
}

.bm-preview-loading {
  display: grid;
  place-items: center;
  min-height: 12rem;
  color: var(--bm-muted);
  font-size: 0.95rem;
}

.bm-preview-video {
  -webkit-user-drag: none;
  user-select: none;
}

/* Masque le bouton « Télécharger » natif (Chrome / Edge) */
.bm-preview-video::-webkit-media-controls-download-button {
  display: none !important;
}

.bm-preview-video::-webkit-media-controls-enclosure {
  overflow: hidden;
}

.bm-watermark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      -28deg,
      transparent 0 52px,
      rgba(243, 238, 228, 0.02) 52px 53px
    );
}

.bm-watermark--video {
  /* Laisse les contrôles vidéo cliquables en bas */
  bottom: 3.2rem;
}

.bm-watermark span {
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(243, 238, 228, 0.14);
  background: rgba(10, 14, 20, 0.22);
  font-family: var(--bm-display);
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 238, 228, 0.38);
  transform: rotate(-18deg);
}

.bm-preview-badge {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  padding: 0.4rem 0.65rem;
  background: rgba(10, 14, 20, 0.78);
  border: 1px solid rgba(212, 168, 90, 0.45);
  color: var(--bm-accent);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.bm-modal-body {
  padding: 1.15rem 1.25rem 1.4rem;
}

.bm-modal-body h3 {
  margin: 0 0 0.2rem;
  font-family: var(--bm-display);
  font-size: 1.55rem;
  font-weight: 600;
}

.bm-modal-meta {
  margin: 0 0 0.85rem;
  color: var(--bm-muted);
  font-size: 0.9rem;
}

.bm-modal-price {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  color: var(--bm-accent);
  font-weight: 600;
}

.bm-buy-form {
  display: grid;
  gap: 0.75rem;
  max-width: 28rem;
}

.bm-buy-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.88rem;
  color: var(--bm-muted);
}

.bm-buy-form input[type="email"] {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--bm-line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--bm-ink);
  font: inherit;
}

.bm-cgv {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.84rem;
  color: var(--bm-muted);
}

.bm-cgv input {
  margin-top: 0.2rem;
}

.bm-cgv a {
  color: var(--bm-accent);
}

.bm-buy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.bm-status {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--bm-muted);
  min-height: 1.2em;
}

.bm-status.is-err {
  color: #e8a090;
}

.bm-status.is-ok {
  color: var(--bm-ok);
}

.bm-empty {
  padding: 2rem 0;
  color: var(--bm-muted);
}

@keyframes bm-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bm-hero-in {
  from {
    opacity: 0;
    transform: scale(1.03);
  }
  to {
    opacity: 0.95;
    transform: scale(1);
  }
}

@media (max-width: 720px) {
  .bm-monument-row {
    grid-template-columns: 1fr;
  }

  .bm-monument-thumbs {
    max-height: min(42vh, 360px) !important;
  }

  .bm-hero-media {
    inset: 0 0 auto;
    height: 46vh;
  }

  .bm-hero-inner {
    padding-top: 8rem;
  }

  .bm-top {
    flex-direction: column;
    align-items: flex-start;
  }
}
