/* Galerie PC : salle Terre cuite soutenue (validée), sur la composition Cannelures Noires (9 octobre 2026).
   Audit n° 2, lot 7, phase 2 : les trois feuilles empilées (gallery.css, cannelures.css, terre-cuite.css) sont réunies ici
   avec leurs valeurs finales ; règles sans élément et déclarations toujours remplacées retirées. Même rendu prouvé par
   les styles calculés de chaque élément et la comparaison au pixel. Les classes grlg-cannelures et grlg-terre-cuite
   restent sur le composant : les scripts s'en servent. */

/* Composant et salle */
.grlg-component {
  --ink: #f6f1e8;
  --accent: #f6f1e8;
  --paper: #f0e2d5;
  display: block;
  isolation: isolate;
  color-scheme: dark;
  background: transparent;
  color: var(--ink);
  font-family: unified-home-dm, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: normal;
}
.grlg-component * {
  box-sizing: border-box;
}
.grlg-component p {
  text-wrap-style: auto;
}
.grlg-component [hidden] {
  display: none !important;
}
.grlg-component a {
  text-decoration: none;
}
.grlg-component a:not([href]) {
  cursor: default;
}
.grlg-component button {
  font-family: inherit;
  text-transform: none;
  letter-spacing: normal;
  min-height: 0;
}
html:has(.grlg-terre-cuite),
body:has(.grlg-terre-cuite) {
  background: #f0e2d5;
}
.grlg-component .grlg-exhibition {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0 auto;
}
.grlg-component .grlg-gallery {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}
.grlg-component .grlg-scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 2048px;
  height: 1152px;
  transform-origin: 0 0;
}
.grlg-component .grlg-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 2048px;
  height: 1152px;
  pointer-events: none;
  filter: var(--room-filter, none);
}

/* Cadres photographiques d'origine, teintés ; coins du plafond réparés. */
.grlg-component .native-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 2048px;
  height: 1152px;
  max-width: none;
  pointer-events: none;
  filter: url(#original-frame-tone);
}
.grlg-component .corner-repair {
  position: absolute;
  top: 0;
  z-index: 0;
  width: 282px;
  height: 270px;
  overflow: hidden;
  pointer-events: none;
  mask-composite: intersect;
}
.grlg-component .corner-repair.left {
  left: 0;
  mask-image:
    linear-gradient(to right, #000 0 246px, transparent 282px),
    linear-gradient(to bottom, #000 0 240px, transparent 270px);
}
.grlg-component .corner-repair.right {
  right: 0;
  mask-image:
    linear-gradient(to left, #000 0 246px, transparent 282px),
    linear-gradient(to bottom, #000 0 240px, transparent 270px);
}
.grlg-component .corner-repair img {
  position: absolute;
  top: 0;
  width: 2048px;
  height: 1152px;
  max-width: none;
  filter: var(--room-filter, none);
}
.corner-repair img:not(.full) {
  width: calc(248px * 2048 / 1672);
  height: calc(236px * 2048 / 1672);
}
.grlg-component .corner-repair.left img {
  left: 0;
}
.grlg-component .corner-repair.right img {
  right: 0;
}

/* Titre et sous-titre */
.grlg-component .grlg-headline {
  position: absolute;
  z-index: 4;
  top: 149px;
  left: 474px;
  width: 1100px;
  margin: 0;
  color: var(--ink);
  text-align: center;
  font:
    400 52px/1.055 Georgia,
    serif;
  letter-spacing: -0.025em;
  pointer-events: none;
  text-shadow: 0 1px 4px #492c2459;
}
.grlg-component .grlg-headline span {
  display: block;
  white-space: nowrap;
}
.grlg-component .grlg-headline span:last-child {
  font-style: italic;
}
.grlg-component .grlg-subtitle {
  position: absolute;
  z-index: 4;
  top: 270px;
  left: 500px;
  width: 1048px;
  margin: 0;
  text-align: center;
  color: var(--ink);
  font:
    21px/1.3 Arial,
    sans-serif;
  opacity: 1;
  text-shadow: 0 1px 4px #492c2459;
}

/* Écrans et reflets */
.grlg-component [data-grlg='surfaces'] {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.grlg-component .grlg-surface,
.grlg-component .grlg-reflection-plane {
  position: absolute;
  top: 0;
  left: 0;
  width: 1000px;
  height: 640px;
  transform-origin: 0 0;
  overflow: hidden;
  contain: paint;
  isolation: isolate;
}
.grlg-component .grlg-surface {
  background: #111317;
}
.grlg-component .grlg-surface.grlg-has-focus {
  box-shadow: inset 0 0 0 3px #eadbc2;
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.grlg-component .grlg-surface:nth-child(2) {
  box-shadow: none;
}
.grlg-component .grlg-slide {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  max-width: none;
  pointer-events: none;
  backface-visibility: hidden;
}
.grlg-component [data-grlg='reflections'] {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.035;
  filter: grayscale(1);
}
.grlg-component .grlg-reflection-plane {
  background: transparent;
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #0009 52%, transparent 100%);
}
.grlg-component .grlg-reflection-track {
  position: absolute;
  inset: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.grlg-component .grlg-reflection-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.grlg-component .grlg-reflection-texture {
  width: 100%;
  height: 100%;
  object-fit: fill;
  transform: scaleY(-1) scale(1.13);
  filter: blur(38px) saturate(0.5);
}
.grlg-component [data-grlg='screen-actions'] {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
.grlg-component .grlg-screen-button {
  position: absolute;
  z-index: 6;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  touch-action: pan-y;
}
.grlg-component .grlg-screen-button:focus-visible {
  outline: none;
}
.grlg-component .grlg-screen-button[aria-disabled='true'] {
  cursor: progress;
}

/* Navigation : indication du geste et repères */
.grlg-component .grlg-navigation {
  position: absolute;
  bottom: 4.3%;
  left: 50%;
  z-index: 20;
  width: 1504.8px;
  text-align: center;
  pointer-events: none;
  transform: translateX(-50%) scale(var(--gallery-ui-scale, 1));
  transform-origin: 50% 100%;
}
.grlg-component .grlg-gesture-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 19px;
  margin: 0 0 7px;
  color: var(--ink);
  font:
    400 20.9px/1.45 unified-home-dm,
    Arial,
    sans-serif;
  letter-spacing: 0.045em;
  text-shadow: none;
}
.grlg-component .grlg-gesture-hint span {
  margin: 0;
}
.grlg-component .grlg-action {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.grlg-component .grlg-gesture-arrow {
  display: inline-block;
  flex: none;
  width: 37px;
  height: 13px;
  overflow: visible;
  animation: grlg-museum-arrow 2.8s ease-in-out infinite;
}
.grlg-component .grlg-gesture-arrow path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes grlg-museum-arrow {
  0%,
  100% {
    transform: translateX(-3px);
  }
  50% {
    transform: translateX(3px);
  }
}
.grlg-component .grlg-mouse {
  width: 20px;
  height: 25px;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.grlg-mouse-click {
  animation: grlg-mouse-click 2.8s ease-in-out infinite;
  transform-origin: 8.5px 9.5px;
}
.grlg-mouse-pulse {
  animation: grlg-mouse-pulse 2.8s ease-out infinite;
}
@keyframes grlg-mouse-click {
  0%,
  28%,
  52%,
  100% {
    opacity: 0.6;
    transform: translateY(0);
  }
  38%,
  43% {
    opacity: 1;
    transform: translateY(1.5px);
  }
}
@keyframes grlg-mouse-pulse {
  0%,
  30%,
  64%,
  100% {
    opacity: 0;
  }
  40%,
  46% {
    opacity: 0.85;
  }
}
.grlg-component .grlg-markers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}
.grlg-component .grlg-marker,
.grlg-component .grlg-marker:hover {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  translate: none;
  transform: none;
  pointer-events: auto;
}
.grlg-component .grlg-marker:disabled {
  cursor: wait;
}
.grlg-component .grlg-marker::after {
  content: '';
  width: 21px;
  height: 4px;
  border: 1px solid var(--accent);
  border-radius: 1px;
  background: transparent;
  box-shadow: none;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.grlg-component .grlg-marker[aria-current='true']::after,
.grlg-component .grlg-marker[aria-current='true']:hover::after {
  width: 31px;
  height: 4px;
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: none;
}
.grlg-component .grlg-marker:hover::after {
  width: 21px;
  border-color: var(--accent);
  background: var(--accent);
}
.grlg-component button:focus-visible,
.grlg-component a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.grlg-component .grlg-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Fenêtre du projet (démonstration) */
.grlg-component dialog {
  width: 1240px;
  max-width: 94vw;
  max-height: min(890px, 90vh);
  padding: 26px 30px;
  border: 1px solid #b99c8a;
  border-radius: 2px;
  background: #563e35;
  color: #f6f1e8;
  box-shadow: 0 40px 130px #0008;
  overflow: auto;
  will-change: opacity, transform;
}
.grlg-component dialog::backdrop {
  background: #080808c4;
  backdrop-filter: blur(9px);
}
.grlg-component .grlg-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.grlg-component .grlg-eyebrow {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.17em;
  opacity: 1;
}
.grlg-component dialog h2 {
  margin: 0;
  font:
    36px/1.1 Georgia,
    serif;
  letter-spacing: -0.03em;
}
.grlg-component [data-grlg='close-dialog'],
.grlg-component [data-grlg='close-dialog']:hover {
  width: 47px;
  height: 47px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 30px;
  cursor: pointer;
  transform: none;
  transition: none;
}
.grlg-component [data-grlg='close-dialog']:hover {
  background: #79594a;
  color: #f6f1e8;
}
.grlg-component [data-grlg='dialog-media'] {
  background: #101418;
  perspective: 1800px;
  overflow: hidden;
}
.grlg-component [data-grlg='dialog-media'] img,
.grlg-component [data-grlg='dialog-media'] video {
  display: block;
  width: 100%;
  height: auto;
}
.grlg-component [data-grlg='dialog-media'] img {
  max-height: 688px;
  object-fit: contain;
  transform: none !important;
  transition: none !important;
}
.grlg-component [data-grlg='dialog-description'] {
  font-size: 14px;
  line-height: 1.6;
}
.grlg-component [data-grlg='project-url'] {
  display: inline-block;
  margin: 12px 0 2px;
  color: var(--ink);
  text-underline-offset: 4px;
}
.grlg-component [data-grlg='project-url'][hidden],
.grlg-component [data-grlg='dialog-description'][hidden] {
  display: none;
}
.grlg-component .grlg-dialog-note {
  margin: 18px 0 0;
  color: var(--ink);
  font-size: 12px;
  opacity: 1;
}

/* Pied de page partagé aux couleurs de la salle */
.grlab-page:has(.grlg-terre-cuite) .grlab-page-footer,
body:has(.grlg-terre-cuite) .grlab-page-footer {
  background: #563e35;
  color: #f6f1e8;
}

/* Lettres ivoire de l'interface ; les images gardent leur contenu. */
.grlg-component
  :is(
    h1,
    h2,
    h3,
    p,
    a,
    button,
    label,
    .grlg-headline,
    .grlg-subtitle,
    .grlg-gesture-hint,
    .grlg-eyebrow,
    .grlg-dialog-note,
    .screen-caption,
    [data-grlg='dialog-description']
  ) {
  color: #f6f1e8 !important;
}

/* Fenêtres étroites et écrans tactiles */
@media (hover: none), (max-width: 700px) {
  .grlg-component .grlg-navigation {
    margin-top: 21px;
  }
  .grlg-component .grlg-gesture-arrow {
    width: 30px;
  }
}
@media (max-width: 700px) {
  .grlg-component .grlg-navigation {
    margin: 21px 20px 14px;
  }
  .grlg-component .grlg-action {
    white-space: normal;
  }
  .grlg-component .grlg-action:last-child {
    flex-basis: 100%;
    justify-content: center;
  }
}

/* Mouvements réduits */
@media (prefers-reduced-motion: reduce) {
  .grlg-component *,
  .grlg-component *::before,
  .grlg-component *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .grlg-mouse-pulse {
    opacity: 0;
  }
}
