/* ============================================================
   VNEW.0.130.3.8.4.8.3.7.6.2 — ORANGERIE BOOK INTEGRATION
   Canonical BookComponent probe inside Orangerie only.
   ============================================================ */
.orangery-book-layer .orangery-canonical-component-shell {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: min(76vw, 76rem) !important;
  height: auto !important;
  aspect-ratio: 3 / 2;
  transform: translate(-50%, -47%) !important;
  z-index: 9;
  color: #342718;
}

.orangery-book-layer .orangery-canonical-component-shell[hidden] {
  display: none !important;
}

.orangery-book-layer .orangery-canonical-component__mount,
.orangery-book-layer .orangery-canonical-component__mount .book {
  position: relative;
  width: 100% !important;
  max-width: none !important;
  height: auto;
  aspect-ratio: 3 / 2;
}

.orangery-book-layer .orangery-canonical-component__mount .book {
  --paper-ink: #3b2b18;
  touch-action: manipulation;
}

.orangery-book-layer .orangery-canonical-component__mount .book__master {
  filter: drop-shadow(0 26px 48px rgba(0,0,0,.30));
}

.orangery-book-layer .orangery-canonical-component__mount .book__safe {
  align-content: start;
  justify-items: stretch;
  padding: clamp(.66rem, 1.08vw, 1.14rem) clamp(.72rem, 1.15vw, 1.22rem);
  overflow: hidden;
  pointer-events: auto;
  text-align: left;
  line-height: 1.35;
}

.orangery-book-layer .orangery-canonical-component__mount .book__safe--left {
  padding-right: clamp(.82rem, 1.25vw, 1.30rem);
}

.orangery-book-layer .orangery-canonical-component__mount .book__safe--right {
  padding-left: clamp(.82rem, 1.25vw, 1.30rem);
}

.orangery-book-layer .orangery-canonical-component__mount .turn-segment-canvas__safe,
.orangery-book-layer .orangery-canonical-component__mount .turn-face__safe {
  align-content: start;
  justify-items: stretch;
  padding: clamp(.66rem, 1.08vw, 1.14rem) clamp(.72rem, 1.15vw, 1.22rem);
  overflow: hidden;
  text-align: left;
  line-height: 1.35;
}

.orangery-book-layer .orangery-canonical-component-shell .living-book__intro {
  margin: 0 0 .56rem;
  color: rgba(92,71,42,.80);
  font-size: clamp(.55rem, .65vw, .70rem);
  line-height: 1.40;
}

.orangery-book-layer .orangery-canonical-component-shell .book-priority {
  padding-top: .54rem;
  border-top: 1px solid rgba(135,98,42,.20);
}

.orangery-book-layer .orangery-canonical-component-shell .book-priority__eyebrow,
.orangery-book-layer .orangery-canonical-component-shell .living-book__section-title {
  margin: 0 0 .42rem;
  color: rgba(135,93,36,.90);
  font-size: clamp(.48rem, .56vw, .60rem);
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.orangery-book-layer .orangery-canonical-component-shell .book-priority h3 {
  margin: 0 0 .40rem;
  color: rgba(57,40,20,.97);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(.98rem, 1.42vw, 1.46rem);
  font-weight: 500;
  line-height: 1.06;
}

.orangery-book-layer .orangery-canonical-component-shell .book-priority > p:not(.book-priority__eyebrow) {
  margin: 0 0 .55rem;
  color: rgba(90,67,37,.88);
  font-size: clamp(.58rem, .68vw, .73rem);
}

.orangery-book-layer .orangery-canonical-component-shell .book-text-action {
  padding: .28rem 0 .15rem;
  border: 0;
  border-bottom: 1px solid rgba(128,89,33,.30);
  background: transparent;
  color: rgba(88,60,24,.92);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(.59rem, .69vw, .74rem);
  cursor: pointer;
}

.orangery-book-layer .orangery-canonical-component-shell .book-text-action:disabled {
  opacity: .42;
  cursor: default;
}

.orangery-book-layer .orangery-canonical-component-shell .book-chapters,
.orangery-book-layer .orangery-canonical-component-shell .book-library {
  display: grid;
  gap: .18rem;
}

.orangery-book-layer .orangery-canonical-component-shell .book-chapter,
.orangery-book-layer .orangery-canonical-component-shell .book-library__item {
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid rgba(129,91,37,.15);
  background: transparent;
  color: rgba(58,42,22,.94);
  text-align: left;
  cursor: pointer;
}

.orangery-book-layer .orangery-canonical-component-shell .book-chapter {
  display: grid;
  grid-template-columns: 1.2rem minmax(0,1fr) auto;
  align-items: center;
  gap: .38rem;
  padding: .36rem .04rem;
}

.orangery-book-layer .orangery-canonical-component-shell .book-chapter:disabled,
.orangery-book-layer .orangery-canonical-component-shell .book-library__item:disabled {
  opacity: .48;
  cursor: default;
}

.orangery-book-layer .orangery-canonical-component-shell .book-chapter__numeral {
  color: rgba(151,103,37,.88);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .72rem;
}

.orangery-book-layer .orangery-canonical-component-shell .book-chapter__copy,
.orangery-book-layer .orangery-canonical-component-shell .book-library__item > span:first-child {
  min-width: 0;
}

.orangery-book-layer .orangery-canonical-component-shell .book-chapter__copy strong,
.orangery-book-layer .orangery-canonical-component-shell .book-library__item strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(.62rem, .74vw, .78rem);
  font-weight: 600;
  line-height: 1.15;
}

.orangery-book-layer .orangery-canonical-component-shell .book-chapter__copy small,
.orangery-book-layer .orangery-canonical-component-shell .book-library__item small {
  display: block;
  margin-top: .12rem;
  color: rgba(104,80,47,.77);
  font-size: clamp(.48rem, .56vw, .60rem);
  line-height: 1.20;
}

.orangery-book-layer .orangery-canonical-component-shell .book-chapter__status,
.orangery-book-layer .orangery-canonical-component-shell .book-library__action {
  color: rgba(126,88,32,.76);
  font-size: clamp(.46rem, .52vw, .56rem);
  white-space: nowrap;
}

.orangery-book-layer .orangery-canonical-component-shell .book-library__item {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: .45rem;
  align-items: center;
  padding: .38rem .04rem;
}

.orangery-book-layer .orangery-canonical-component-shell .living-book__quiet-page {
  margin-top: 1.05rem;
  max-width: 90%;
  color: rgba(78,58,32,.82);
  font-size: clamp(.64rem, .78vw, .82rem);
  line-height: 1.48;
}

.orangery-book-layer .orangery-canonical-component-shell .living-book__quiet-page strong {
  display: block;
  margin-bottom: .45rem;
  color: rgba(54,39,22,.96);
  font-weight: 500;
}

.orangery-book-layer .orangery-canonical-component-shell .living-book__manifest {
  display: grid;
  gap: .54rem;
  margin-top: .70rem;
  color: rgba(73,53,28,.87);
  font-size: clamp(.58rem, .69vw, .74rem);
  line-height: 1.38;
}

.orangery-book-layer .orangery-canonical-component-shell .living-book__manifest p {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0 .30rem;
  margin: 0;
}

.orangery-book-layer .orangery-canonical-component-shell .living-book__manifest p span {
  grid-row: 1 / 3;
  color: rgba(143,101,42,.90);
}

.orangery-book-layer .orangery-canonical-component-shell .living-book__manifest p strong {
  color: rgba(53,38,20,.96);
  font-weight: 500;
}

.orangery-book-layer .orangery-canonical-component-shell .living-book__manifest blockquote {
  margin: .36rem .2rem 0;
  padding-top: .50rem;
  border-top: 1px solid rgba(139,98,39,.20);
  color: rgba(86,62,31,.78);
  font-style: italic;
}

.orangery-book-layer .orangery-canonical-component__close {
  position: absolute !important;
  z-index: 14 !important;
  top: 10.1% !important;
  right: 6.7% !important;
  width: clamp(1.76rem, 2.15vw, 2.18rem) !important;
  height: clamp(1.76rem, 2.15vw, 2.18rem) !important;
  display: grid !important;
  place-items: center;
  padding: 0 !important;
  border: 1px solid rgba(116,80,28,.56) !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 34% 28%, rgba(255,249,219,.96), rgba(219,178,88,.76) 46%, rgba(106,68,20,.76) 100%) !important;
  color: #4c3518 !important;
  box-shadow: 0 3px 8px rgba(56,34,10,.20), inset 0 0 0 2px rgba(255,241,184,.26) !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.16rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}

.orangery-book-layer .orangery-canonical-component__pager {
  display: block !important;
  position: absolute;
  z-index: 13;
  inset: 0;
  pointer-events: none;
}

.orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn {
  position: absolute;
  top: 49%;
  width: clamp(2.05rem, 2.7vw, 2.75rem);
  height: clamp(2.05rem, 2.7vw, 2.75rem);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(180,132,53,.30);
  border-radius: 50%;
  background: rgba(29,44,57,.42);
  color: rgba(244,211,133,.92);
  box-shadow: 0 4px 14px rgba(0,0,0,.16), inset 0 0 0 1px rgba(255,231,168,.09);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.28rem, 1.75vw, 1.75rem);
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transform: translateY(-50%);
}

.orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn--prev { left: 3.75%; }
.orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn--next { right: 3.75%; }
.orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn:disabled { opacity: .14; cursor: default; }

.orangery-book-layer .orangery-canonical-component__pager .living-book__page-index {
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  color: rgba(104,73,30,.66);
  font-size: clamp(.50rem, .58vw, .62rem);
  letter-spacing: .12em;
  pointer-events: none;
}

.orangery-book-layer .orangery-canonical-component-shell .book[data-turn-state="turning"] .book__safe {
  pointer-events: none;
}

@media (max-width: 760px) {
  .orangery-book-layer .orangery-canonical-component-shell {
    width: min(99vw, 46rem) !important;
    transform: translate(-50%, -44%) !important;
  }
  .orangery-book-layer .orangery-canonical-component__mount .book__safe,
  .orangery-book-layer .orangery-canonical-component__mount .turn-segment-canvas__safe,
  .orangery-book-layer .orangery-canonical-component__mount .turn-face__safe {
    padding: .28rem .34rem;
    overflow: auto;
    scrollbar-width: none;
  }
  .orangery-book-layer .orangery-canonical-component-shell .book-chapter__copy small,
  .orangery-book-layer .orangery-canonical-component-shell .book-library__item small {
    display: none;
  }
  .orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn {
    top: 52%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn {
    transition: none !important;
  }
}


/* ============================================================
   VNEW.0.130.3.8.4.8.3.7.6 — ORANGERIE PROBE POLISH
   Integration-only entry/close + chrome. Canonical PageTurnEngine C8 is frozen.
   ============================================================ */

.orangery-book-layer .orangery-canonical-component-shell {
  opacity: 0;
  transform: translate(-50%, -47%) scale(.985) !important;
  transition:
    opacity 180ms ease,
    transform 190ms cubic-bezier(.22,.72,.22,1);
  will-change: opacity, transform;
}

.orangery-book-layer .orangery-canonical-component-shell.is-visible {
  opacity: 1;
  transform: translate(-50%, -47%) scale(1) !important;
}

.orangery-book-layer .orangery-canonical-component-shell.is-closing {
  pointer-events: none;
}

.orangery-heading {
  transition: opacity 180ms ease;
}

.orangery-scene.is-book-reading:not(.is-book-closing) .orangery-heading {
  opacity: 0 !important;
  pointer-events: none;
}

.orangery-scene.is-book-reading.is-book-closing .orangery-heading {
  opacity: 1 !important;
}

/* Warm paper/brass tabs inherited from the validated Jardin I polish. */
.orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn {
  top: 49.2%;
  width: auto;
  min-width: clamp(3.00rem, 3.65vw, 3.85rem);
  height: clamp(1.82rem, 2.18vw, 2.16rem);
  padding: 0 clamp(.48rem, .62vw, .66rem);
  gap: clamp(.18rem, .26vw, .28rem);
  border: 1px solid rgba(137, 91, 31, .48);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(249, 232, 190, .94), rgba(210, 169, 94, .88));
  color: rgba(73, 48, 20, .96);
  box-shadow:
    0 4px 11px rgba(49, 30, 10, .17),
    inset 0 1px 0 rgba(255, 249, 222, .72),
    inset 0 -1px 0 rgba(116, 74, 24, .13);
  text-shadow: none;
  opacity: .96;
  backdrop-filter: none;
}

.orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn--prev { left: 8.15%; }
.orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn--next { right: 8.15%; }

.orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn-label {
  color: inherit;
  font-family: system-ui, sans-serif;
  font-size: clamp(.48rem, .55vw, .59rem);
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn-chevron {
  margin-top: -.05em;
  color: rgba(92, 59, 20, .88);
  font-size: clamp(.98rem, 1.20vw, 1.22rem);
  line-height: .8;
}

.orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn:hover:not(:disabled),
.orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn:focus-visible:not(:disabled) {
  background: linear-gradient(180deg, rgba(255, 241, 205, .99), rgba(221, 181, 102, .95));
  border-color: rgba(145, 93, 29, .68);
  color: rgba(61, 39, 15, .99);
  transform: translateY(-50%) scale(1.025);
  box-shadow:
    0 5px 14px rgba(49, 30, 10, .20),
    0 0 0 3px rgba(223, 180, 93, .10),
    inset 0 1px 0 rgba(255, 251, 232, .82);
}

.orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn:disabled {
  opacity: 0 !important;
  pointer-events: none;
}

@media (max-width: 760px) {
  .orangery-book-layer .orangery-canonical-component-shell {
    transform: translate(-50%, -44%) scale(.985) !important;
  }
  .orangery-book-layer .orangery-canonical-component-shell.is-visible {
    transform: translate(-50%, -44%) scale(1) !important;
  }
  .orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn {
    min-width: 2.70rem;
    height: 1.72rem;
    padding-inline: .38rem;
  }
  .orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn--prev { left: 6.0%; }
  .orangery-book-layer .orangery-canonical-component__pager .living-book__page-turn--next { right: 6.0%; }
}

@media (prefers-reduced-motion: reduce) {
  .orangery-book-layer .orangery-canonical-component-shell,
  .orangery-heading {
    transition: none !important;
  }
}

/* ============================================================
   VNEW.0.130.3.8.4.8.3.7.6.1 — ORANGERIE · PASS VISUEL PARTIEL
   Integration-only. BookComponent V7.4.9 + PageTurnEngine C8 remain frozen.
   Goal: calm the baked-in lectern book during reading, keep room controls out
   of competition, and preserve a clean exercise -> book return message.
   ============================================================ */

/* The Orangerie master already contains a real open book on the lectern.
   We cannot remove that baked-in object without changing the master asset.
   During reading, a broad low-contrast falloff quietly de-emphasises that
   corner instead of blurring the whole room or painting an obvious patch. */
.orangery-scene.is-book-reading .orangery-book-layer {
  background:
    radial-gradient(
      ellipse at 16% 76%,
      rgba(8, 10, 7, .36) 0%,
      rgba(8, 10, 7, .24) 12%,
      rgba(8, 10, 7, .10) 25%,
      rgba(8, 10, 7, 0) 39%
    ),
    radial-gradient(
      ellipse at 50% 58%,
      rgba(8, 9, 6, .01) 0 38%,
      rgba(8, 9, 6, .11) 72%,
      rgba(8, 9, 6, .20) 100%
    ) !important;
  backdrop-filter: none !important;
}

/* The optical scale bridge originates from the same lower-left area as the
   physical lectern. It is intentionally subtle: no fake flight animation and
   no modification to C8. */
.orangery-book-layer .orangery-canonical-component-shell {
  transform-origin: 16% 76%;
}

/* While the canonical book is the active reading surface, room navigation
   should not compete with it. Restore these controls during the 180 ms close
   cross-fade so the scene never feels empty. */
.orangery-back,
.orangery-maxim,
.orangery-exit-hotspot {
  transition: opacity 180ms ease;
}

.orangery-scene.is-book-reading:not(.is-book-closing) .orangery-back,
.orangery-scene.is-book-reading:not(.is-book-closing) .orangery-maxim,
.orangery-scene.is-book-reading:not(.is-book-closing) .orangery-exit-hotspot {
  opacity: 0 !important;
  pointer-events: none !important;
}

.orangery-scene.is-book-reading.is-book-closing .orangery-back,
.orangery-scene.is-book-reading.is-book-closing .orangery-maxim,
.orangery-scene.is-book-reading.is-book-closing .orangery-exit-hotspot {
  opacity: 1 !important;
}

/* Return messages from RESSENTIR / RETROUVER / TRANSFÉRER used to sit on the
   lower edge of the large book because .orangery-message has z-index 14.
   Keep the feedback, but move it into a quiet scene-level toast below the
   canonical object. Empty messages render nothing. */
.orangery-scene.is-book-reading .orangery-message {
  z-index: 15;
  bottom: .72rem;
  width: min(44rem, calc(100% - 2rem));
  padding: .34rem .68rem;
  border: 1px solid rgba(245, 228, 184, .13);
  border-radius: 999px;
  background: rgba(12, 14, 10, .46);
  color: rgba(249, 241, 217, .88);
  backdrop-filter: blur(6px);
  font-size: clamp(.62rem, .72vw, .72rem);
  line-height: 1.35;
}

.orangery-scene.is-book-reading .orangery-message:empty {
  display: none;
}

@media (max-width: 760px) {
  .orangery-scene.is-book-reading .orangery-book-layer {
    background:
      radial-gradient(
        ellipse at 18% 73%,
        rgba(8, 10, 7, .28) 0%,
        rgba(8, 10, 7, .12) 24%,
        rgba(8, 10, 7, 0) 42%
      ),
      radial-gradient(
        ellipse at 50% 55%,
        rgba(8, 9, 6, .01) 0 42%,
        rgba(8, 9, 6, .12) 78%,
        rgba(8, 9, 6, .19) 100%
      ) !important;
  }

  .orangery-scene.is-book-reading .orangery-message {
    bottom: .5rem;
    width: calc(100% - 1rem);
    padding: .30rem .54rem;
    border-radius: .72rem;
    font-size: .61rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orangery-back,
  .orangery-maxim,
  .orangery-exit-hotspot {
    transition: none !important;
  }
}


/* ============================================================
   VNEW.0.130.3.8.4.8.3.7.6.2 — FIRST-OPEN PRELOAD + VISUAL SYNC
   The page ink must never paint before the physical book master.
   ============================================================ */
.orangery-book-layer .orangery-canonical-component-shell:not(.is-visual-ready)
  .orangery-canonical-component__mount,
.orangery-book-layer .orangery-canonical-component-shell:not(.is-visual-ready)
  .orangery-canonical-component__close,
.orangery-book-layer .orangery-canonical-component-shell:not(.is-visual-ready)
  .orangery-canonical-component__pager {
  visibility: hidden !important;
}

.orangery-book-layer .orangery-canonical-component-shell.is-visual-ready
  .orangery-canonical-component__mount,
.orangery-book-layer .orangery-canonical-component-shell.is-visual-ready
  .orangery-canonical-component__close,
.orangery-book-layer .orangery-canonical-component-shell.is-visual-ready
  .orangery-canonical-component__pager {
  visibility: visible;
}
