/* The Ultimate Bitcoin — accueil : photos du coffret, encart « Le sens du détail », visionneuse.
   Chargé uniquement sur la page qui contient ces blocs. Tout est limité à ces blocs. */

/* ---------- Coffret fermé / ouvert ---------- */
body.ub-site .ub-hv-photo { margin: 0; width: 100%; min-width: 0; }
body.ub-site .ub-hv-trigger { display: block; width: 100%; aspect-ratio: 1672 / 941; padding: 0; border: 0; border-radius: 0; background: #000; cursor: zoom-in; }
body.ub-site .ub-hv-trigger:hover, body.ub-site .ub-hv-trigger:focus { background: #000; }
body.ub-site .ub-hv-trigger img { display: block; width: 100%; height: 100%; object-fit: contain; }
body.ub-site .ub-hv-photo figcaption { margin-top: 12px; padding-top: 11px; border-top: 1px solid rgba(195,161,122,.28); color: #E0CBAE; font: 300 19px/1.3 var(--ub-sans); letter-spacing: -.01em; }
body.ub-site .ub-experience-section .ub-case-grid .ub-hv-trigger:focus-visible { outline: 2px solid #C3A17A; outline-offset: 3px; }

@media (max-width: 700px) {
	/* Empilés pour rester lisibles : fermé puis ouvert. */
	body.ub-site .ub-experience-section .ub-case-grid { --e-con-grid-template-columns: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
	body.ub-site .ub-hv-photo figcaption { font-size: 18px; }
}

/* ---------- Encart « Le sens du détail » ---------- */
body.ub-site .ub-details-section { display: flex; flex-direction: column; padding: 100px max(64px, calc(50% - 640px)); --gap: 0px; --row-gap: 0px; --column-gap: 0px; background: #080808; }
body.ub-site .ub-details-section > .elementor-widget, body.ub-site .ub-details-section > .e-con { width: 100%; max-width: 100%; }
body.ub-site .ub-dt-intro { display: grid; grid-template-columns: minmax(0, .857fr) minmax(0, 1fr); column-gap: 40px; align-items: start; --gap: 0px; }
body.ub-site .ub-dt-intro > * { width: auto; min-width: 0; }
body.ub-site .ub-dt-heading { display: block; }
body.ub-site .ub-dt-eyebrow { color: #C3A17A; font: 400 11px/1.7 var(--ub-sans); letter-spacing: .21em; text-transform: uppercase; padding-bottom: 14px; }
body.ub-site .ub-dt-title { color: #C3A17A; font-size: clamp(43px, 3.74vw, 51px); font-weight: 300; line-height: 1.13; }
body.ub-site .ub-dt-title em { color: #E0CBAE; font-family: var(--ub-script); font-style: normal; font-weight: 400; font-size: 1.45em; letter-spacing: .005em; line-height: .95; }
body.ub-site .ub-dark .ub-dt-lead, body.ub-site .ub-dark .ub-dt-lead p { color: #C7C0B6; font: 300 17px/1.72 var(--ub-sans); }
body.ub-site .ub-dt { margin-top: 34px; }
/* 2/3 - 1/3, à moins d'un pixel près : la grande vue en 16:9 a ainsi exactement la hauteur des deux petites et de l'espace. */
body.ub-site .ub-dt-stages { display: grid; grid-template-columns: calc(66.667% - .89px) minmax(0, 1fr); grid-template-rows: auto auto; gap: 12px; }
body.ub-site .ub-dt-stage, body.ub-site .ub-dt-thumb { display: block; padding: 0; border: 0; border-radius: 0; background: #080808; }
body.ub-site .ub-dt-stage:hover, body.ub-site .ub-dt-stage:focus, body.ub-site .ub-dt-thumb:hover, body.ub-site .ub-dt-thumb:focus { background: #080808; }
body.ub-site .ub-dt-stage { width: 100%; min-width: 0; aspect-ratio: 16 / 9; cursor: zoom-in; }
body.ub-site .ub-dt-stage:first-child { grid-row: 1 / span 2; height: 100%; aspect-ratio: auto; }
body.ub-site .ub-dt-stage img, body.ub-site .ub-dt-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
body.ub-site .ub-dt-thumbs { display: flex; justify-content: center; gap: 10px; margin-top: 26px; padding: 0 4%; }
body.ub-site .ub-dt-thumb { flex: 1 1 0; min-width: 0; aspect-ratio: 16 / 9; position: relative; cursor: pointer; opacity: .78; transition: opacity .2s; }
body.ub-site .ub-dt-thumb:hover, body.ub-site .ub-dt-thumb[aria-pressed=true] { opacity: 1; }
body.ub-site .ub-dt-thumb::after { content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 1px; background: #E0CBAE; opacity: 0; }
body.ub-site .ub-dt-thumb[aria-pressed=true]::after { opacity: 1; }
body.ub-site .ub-dt-stage:focus-visible, body.ub-site .ub-dt-thumb:focus-visible { outline: 2px solid #C3A17A; outline-offset: 3px; }

/* Le bloc « Le temps de faire juste. » reste seul dans sa section. */
body.ub-site #anatomie .ub-quality-banner { margin-top: 0; }

@media (max-width: 1200px) {
	body.ub-site .ub-details-section { padding: 85px 42px; }
}
@media (max-width: 1000px) {
	body.ub-site .ub-dt-intro { column-gap: 30px; }
	body.ub-site .ub-dark .ub-dt-lead, body.ub-site .ub-dark .ub-dt-lead p { font-size: 16px; }
}
@media (max-width: 700px) {
	body.ub-site .ub-details-section { padding: 64px 20px; }
	body.ub-site .ub-dt-intro { grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
	body.ub-site .ub-dt-title { font-size: 38px; }
	body.ub-site .ub-dt { margin-top: 28px; }
	body.ub-site .ub-dt-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; gap: 8px; }
	body.ub-site .ub-dt-stage:first-child { grid-column: 1 / -1; grid-row: auto; height: auto; aspect-ratio: 16 / 9; }
	body.ub-site .ub-dt-thumbs { justify-content: flex-start; gap: 8px; margin-top: 16px; padding: 0 0 12px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #5a4c3a transparent; }
	body.ub-site .ub-dt-thumb { flex: 0 0 104px; } /* la vignette suivante dépasse : on voit que la bande défile */
	body.ub-site .ub-dt-thumb::after { bottom: -6px; }
}
@media (prefers-reduced-motion: reduce) {
	body.ub-site .ub-dt-thumb { transition: none; }
}

/* ---------- Visionneuse ---------- */
/* Le geste horizontal sert à changer de photo : le navigateur ne doit pas l'interpréter comme un retour à la page précédente. */
html.ub-hv-open, html.ub-hv-open body { overflow: hidden; overscroll-behavior: none; }
dialog.ub-hv { touch-action: pan-y pinch-zoom; overscroll-behavior: none; position: fixed; inset: 0; width: 100%; max-width: none !important; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #050505; color: #E0CBAE; font-family: 'Barlow', Arial, sans-serif; overflow: hidden; }
dialog.ub-hv[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
dialog.ub-hv::backdrop { background: #050505; }
.ub-hv-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 10px 24px; font-size: 10px; letter-spacing: .26em; color: #C3A17A; }
.ub-hv-figure { margin: 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; padding: 0 24px; }
.ub-hv-figure img { display: block; flex: 0 1 auto; min-height: 0; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.ub-hv-figure figcaption { flex: none; font-size: 18px; font-weight: 300; }
.ub-hv-figure figcaption:empty { display: none; }
.ub-hv-nav { display: flex; justify-content: center; align-items: center; gap: 28px; padding: 10px 14px 16px; }
.ub-hv-count { margin: 0; min-width: 64px; text-align: center; font-size: 12px; letter-spacing: .14em; color: #C7C0B6; }
dialog.ub-hv button { min-width: 44px; min-height: 44px; padding: 0; border: 1px solid rgba(195,161,122,.4); border-radius: 0; background: transparent; color: #E0CBAE; font: 300 20px/1 'Barlow', Arial, sans-serif; cursor: pointer; }
dialog.ub-hv button:hover, dialog.ub-hv button:focus { background: rgba(195,161,122,.14); color: #E0CBAE; }
dialog.ub-hv button:focus-visible { outline: 2px solid #C3A17A; outline-offset: 2px; }
dialog.ub-hv .ub-hv-close { border: 0; font-size: 30px; }
@media (max-width: 700px) {
	.ub-hv-top { padding-left: 16px; }
	.ub-hv-figure { padding: 0 10px; }
}

/* Encart composé « Le sens du détail » */
body.ub-site .ub-dt-composite { background: #080808; }
body.ub-site .ub-dt-composite img { display: block; width: 100%; height: auto; }
body.ub-site .ub-dt-has-composite .ub-dt-thumb { cursor: zoom-in; }

/* Film d'ouverture du coffret */
body.ub-site .ub-unboxing > .ub-unbox-media { position: absolute; inset: 0; z-index: -2; width: 100% !important; margin: 0; }
body.ub-site .ub-unboxing > .ub-unbox-media .elementor-widget-container { height: 100%; }
body.ub-site .ub-unbox-video { display: block; width: 100%; height: 100%; object-fit: cover; background: #050605; filter: brightness(.5); transition: filter .4s; }
body.ub-site .ub-unboxing.ub-has-video { cursor: pointer; }
body.ub-site .ub-unboxing.ub-has-video:hover .ub-unbox-video { filter: brightness(.62); }
body.ub-site .ub-unboxing.ub-has-video .ub-play:focus-visible { outline: 2px solid #C3A17A; outline-offset: 4px; }
body.ub-site .ub-unboxing.is-playing { aspect-ratio: 16 / 9; min-height: 0; cursor: default; }
body.ub-site .ub-unboxing.is-playing::before { display: none; }
body.ub-site .ub-unboxing.is-playing > .ub-unbox-media { z-index: 3; }
body.ub-site .ub-unboxing.is-playing .ub-unbox-video { object-fit: contain; filter: none; background: #000; }
body.ub-site .ub-unboxing.is-playing > :not(.ub-unbox-media) { visibility: hidden; }

/* Film d'ouverture en grand des le chargement (2026-11-29) */
body.ub-site .ub-unboxing.ub-has-video { aspect-ratio: 16 / 9; }
body.ub-site .ub-unboxing.ub-has-video .ub-unbox-video { filter: brightness(.78); }
body.ub-site .ub-unboxing.ub-has-video:hover .ub-unbox-video { filter: brightness(.9); }
body.ub-site .ub-unboxing.is-playing .ub-unbox-video { filter: none; }
body.ub-site .ub-unboxing.ub-has-video .ub-unbox-title, body.ub-site .ub-unboxing.ub-has-video .ub-unbox-caption { text-shadow: 0 1px 14px rgba(0,0,0,.75); }
