:root {
  --bg-night: #20242D;
  --bg-slate: #30343D;
  --blue-electric: #4B5160;
  --blue-glow: #DADDE4;
  --silver-light: #E5E7EB;
  --silver-mid: #A9ABB2;
  --silver-dark: #626874;
  --gold-accent: #C1C6D0;
  --gold-soft: #E5E7EB;
  --warm-amber: rgba(169, 171, 178, 0.24);
  --text-main: #E5E7EB;
  --text-muted: #A9ABB2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html, body {
  min-height: 100%;
  background-color: var(--bg-night);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
}

/* Barre supérieure discrète commune aux 3 niveaux */
.gallery-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(24, 28, 36, 0.94) 0%, rgba(18, 22, 30, 0.92) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(169, 171, 178, 0.22);
  padding: 7px 16px;
}

.gallery-topbar-inner {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-crest {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--blue-electric), var(--bg-slate));
  border: 1px solid rgba(203, 213, 225, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.88rem;
  color: #fff;
  box-shadow: 0 4px 14px rgba(39, 100, 173, 0.36);
}

.brand-name {
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.brand-name span {
  color: var(--blue-glow);
}

.mockup-badge {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(217, 164, 65, 0.14);
  border: 1px solid rgba(217, 164, 65, 0.45);
  color: var(--gold-soft);
}

.level-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.level-tab {
  background: rgba(17, 29, 45, 0.72);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.level-tab:hover {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.55);
}

.level-tab.active {
  background: linear-gradient(135deg, var(--blue-electric), #1E4F8A);
  color: #fff;
  border-color: rgba(203, 213, 225, 0.55);
  box-shadow: 0 4px 14px rgba(39, 100, 173, 0.42);
}

/* Scène principale */
.gallery-main {
  position: relative;
  min-height: calc(100dvh - 48px);
}

.gallery-view {
  position: relative;
  min-height: calc(100dvh - 48px);
  animation: sceneFadeIn 0.36s ease;
}

@keyframes sceneFadeIn {
  from { opacity: 0; transform: scale(1.015); }
  to { opacity: 1; transform: scale(1); }
}

/* ===========================
   NIVEAU 1 — GRANDE GALERIE (PLEINE PAGE IMMERSIVE)
   =========================== */
.view-galerie {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(100dvh - 48px);
  min-height: calc(100dvh - 48px);
  padding: 0;
  gap: 0;
  overflow: hidden;
  background: #050911;
}

.galerie-intro-strip {
  position: absolute;
  top: 10px;
  left: 16px;
  right: 16px;
  z-index: 6;
  width: auto;
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  pointer-events: none;
  padding: 6px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(5, 9, 17, 0.72) 0%, rgba(5, 9, 17, 0.36) 100%);
  backdrop-filter: blur(4px);
}

.galerie-intro-strip h1 {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

.galerie-intro-strip p {
  font-size: 0.76rem;
  color: #CBD5E1;
  margin-top: 1px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

.galerie-room-frame {
  position: relative;
  width: min(100vw, calc((100dvh - 48px) * 16 / 9));
  max-width: none;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  overflow: hidden;
  border: none;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.85);
  background: #050911;
}

.galerie-room-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  user-select: none;
}

.vitrine-hotspot {
  position: absolute;
  z-index: 2;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 4px;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.vitrine-hotspot.is-island {
  z-index: 3;
}

.vitrine-hotspot.is-group-hovered {
  background: rgba(253, 230, 138, 0.06);
  border-color: rgba(217, 164, 65, 0.45);
  box-shadow: inset 0 0 12px rgba(253, 230, 138, 0.14);
}

.vitrine-hotspot:hover,
.vitrine-hotspot:focus-visible {
  background: rgba(39, 100, 173, 0.14);
  border-color: rgba(253, 230, 138, 0.85);
  box-shadow: 0 0 22px rgba(246, 208, 138, 0.28), inset 0 0 14px rgba(56, 189, 248, 0.20);
  outline: none;
}

.galerie-hover-caption {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%) translateY(6px);
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(9, 14, 23, 0.90);
  border: 1px solid rgba(253, 230, 138, 0.65);
  color: #F8FAFC;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  max-width: calc(100% - 28px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.68);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.galerie-hover-caption.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Accès rapide tactile en bas de la grande salle */
.galerie-vitrine-strip {
  position: absolute;
  bottom: 12px;
  left: 16px;
  right: 170px;
  z-index: 6;
  width: auto;
  max-width: none;
  display: flex;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
}

.vitrine-chip-btn {
  background: rgba(17, 29, 45, 0.82);
  color: var(--text-muted);
  border: 1px solid rgba(203, 213, 225, 0.24);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.vitrine-chip-btn.is-pantheon {
  border-color: rgba(217, 164, 65, 0.52);
  background: linear-gradient(135deg, rgba(29, 20, 5, 0.72), rgba(17, 29, 45, 0.90));
  color: var(--gold-soft);
}

.vitrine-chip-btn:hover {
  color: #fff;
  border-color: rgba(217, 164, 65, 0.65);
  background: rgba(39, 100, 173, 0.28);
}

/* ===================================================
   CONTINUITÉ ARCHITECTURALE PARTAGÉE (NIVEAU 2 & 3)
   =================================================== */
.room-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.room-backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) brightness(0.42) saturate(1.06);
  transform: scale(1.16);
}

.room-backdrop-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 68% 58% at 50% 42%, transparent 25%, rgba(9, 14, 23, 0.76) 100%),
    linear-gradient(180deg, rgba(9, 14, 23, 0.56) 0%, rgba(9, 14, 23, 0.16) 45%, rgba(9, 14, 23, 0.88) 100%);
}

/* Panneaux latéraux bleu nuit moulurés rappelant la Grande Galerie */
.room-backdrop::before,
.room-backdrop::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44px;
  z-index: 1;
  background: linear-gradient(90deg, rgba(9, 14, 23, 0.92), rgba(17, 29, 45, 0.45));
  border-right: 1px solid rgba(148, 163, 184, 0.12);
}

.room-backdrop::after {
  right: 0;
  left: auto;
  background: linear-gradient(270deg, rgba(9, 14, 23, 0.92), rgba(17, 29, 45, 0.45));
  border-right: none;
  border-left: 1px solid rgba(148, 163, 184, 0.12);
}

.scene-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(1680px, 100%);
  margin: 0 auto;
  padding: 14px 20px 24px;
}

.scene-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.btn-gallery-back {
  background: rgba(9, 14, 23, 0.78);
  color: var(--silver-light);
  border: 1px solid rgba(203, 213, 225, 0.34);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-gallery-back:hover {
  border-color: var(--gold-accent);
  background: rgba(17, 29, 45, 0.92);
}

.scene-title-block {
  text-align: right;
}

.scene-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--gold-accent);
}

.scene-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: #F8FAFC;
}

/* ===========================
   NIVEAU 2 — VUE VITRINE
   =========================== */
.view-vitrine .room-backdrop-img {
  transform: scale(1.18);
  filter: blur(5px) brightness(0.46) saturate(1.05);
}

.vitrine-monument {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
}

/* Barre de contexte, compteur et filtres sous-collections / générations (Niveau 2) */
.vitrine-controls-strip {
  max-width: 1180px;
  margin: 0 auto 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(9, 14, 23, 0.72);
  border: 1px solid rgba(203, 213, 225, 0.22);
  backdrop-filter: blur(8px);
}

.vitrine-summary-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.vitrine-subtitle {
  font-size: 0.80rem;
  color: var(--text-muted);
}

.vitrine-count-pill {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(39, 100, 173, 0.26);
  border: 1px solid rgba(56, 189, 248, 0.44);
  color: #BAE6FD;
  white-space: nowrap;
}

.vitrine-filter-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.vitrine-filter-btn {
  background: rgba(17, 29, 45, 0.78);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.vitrine-filter-btn:hover,
.vitrine-filter-btn:focus-visible {
  color: #FFFFFF;
  border-color: rgba(253, 230, 138, 0.65);
  outline: none;
}

.vitrine-filter-btn.is-active {
  background: linear-gradient(135deg, rgba(217, 164, 65, 0.26), rgba(39, 100, 173, 0.45));
  color: #FEF3C7;
  border-color: rgba(253, 230, 138, 0.78);
  box-shadow: 0 3px 12px rgba(217, 164, 65, 0.22);
}

/* Caisson vitré supérieur : cadre argent brossé + filet doré + fond ambré chaleureux */
.vitrine-case {
  position: relative;
  border-radius: 14px 14px 4px 4px;
  padding: 3px;
  background: linear-gradient(
    145deg,
    #CBD5E1 0%,
    #64748B 28%,
    #E2E8F0 52%,
    #475569 78%,
    #94A3B8 100%
  );
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.78),
    inset 0 0 0 1px rgba(217, 164, 65, 0.42);
}

.vitrine-interior {
  position: relative;
  overflow: hidden;
  border-radius: 11px 11px 2px 2px;
  padding: 42px 24px 28px;
  background:
    radial-gradient(ellipse 84% 48% at 50% 8%, rgba(253, 230, 138, 0.30), transparent 64%),
    radial-gradient(circle at 12% 35%, rgba(246, 208, 138, 0.16), transparent 46%),
    radial-gradient(circle at 88% 35%, rgba(246, 208, 138, 0.16), transparent 46%),
    linear-gradient(180deg, #101A2C 0%, #09101E 62%, #070C16 100%);
  border: 1px solid rgba(253, 230, 138, 0.24);
  box-shadow: inset 0 18px 46px rgba(246, 208, 138, 0.12), inset 0 -18px 32px rgba(0, 0, 0, 0.65);
}

/* Liseré LED intérieur de vitrine */
.vitrine-interior::before {
  content: "";
  position: absolute;
  inset: 8px 10px auto 10px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(253, 230, 138, 0.8), rgba(226, 232, 240, 0.9), rgba(253, 230, 138, 0.8), transparent);
  box-shadow: 0 0 14px rgba(253, 230, 138, 0.55);
  pointer-events: none;
}

/* Reflet de vitre en verre subtil (n'obscurcit jamais les cartes) */
.vitrine-glass-glint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.09) 0%, transparent 18%, transparent 82%, rgba(255, 255, 255, 0.06) 100%);
}

/* Spots zénithaux du plafond de vitrine */
.vitrine-spotlights {
  position: absolute;
  top: 10px;
  left: 6%;
  right: 6%;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  z-index: 1;
}

.vitrine-spot-bulb {
  width: 34px;
  height: 9px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, #FFFBEB 0%, #FDE68A 45%, rgba(217, 164, 65, 0.2) 85%, transparent 100%);
  box-shadow: 0 10px 34px 12px rgba(253, 230, 138, 0.22);
}

/* Disposition des cartes exposées dans la vitrine (1 à 5 colonnes centrées selon la page) */
.vitrine-cards-row {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(var(--page-cols, 5), auto);
  justify-content: center;
  align-items: end;
  gap: 18px;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.vitrine-cards-row.is-switching {
  opacity: 0;
  transform: translateY(4px);
}

.vitrine-card-pedestal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: transparent;
  border: none;
  color: inherit;
  text-align: center;
  padding: 4px;
  border-radius: 12px;
  transition: transform 0.24s ease;
}

.vitrine-card-pedestal:hover,
.vitrine-card-pedestal:focus-visible {
  transform: translateY(-6px);
  outline: none;
}

.vitrine-card-pedestal:focus-visible .card-scale-slot {
  box-shadow: 0 0 0 2px var(--blue-glow), 0 22px 44px rgba(0, 0, 0, 0.78);
}

/* Conteneur d'échelle uniforme (garantit strictement 5:7 sans aucune déformation) */
.card-scale-slot {
  --s: 0.50;
  position: relative;
  width: calc(320px * var(--s));
  height: calc(448px * var(--s));
  flex-shrink: 0;
  border-radius: 10px;
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.72),
    0 0 22px rgba(246, 208, 138, 0.14);
  transition: box-shadow 0.24s ease;
}

.vitrine-card-pedestal.is-center .card-scale-slot {
  --s: 0.60;
  box-shadow:
    0 22px 46px rgba(0, 0, 0, 0.8),
    0 0 28px rgba(253, 230, 138, 0.24);
}

.vitrine-card-pedestal:hover .card-scale-slot {
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.82),
    0 0 26px rgba(56, 189, 248, 0.30);
}

.card-scale-inner {
  width: 320px;
  height: 448px;
  transform: scale(var(--s));
  transform-origin: top left;
}

/* Chevalet argent brossé + socle bleu ardoise sous chaque carte */
.card-easel-stand {
  width: 68%;
  height: 16px;
  background: linear-gradient(180deg, #E2E8F0 0%, #64748B 38%, #1E293B 42%, #0F172A 100%);
  border-radius: 3px 3px 2px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid rgba(217, 164, 65, 0.42);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.65);
}

.vitrine-card-pedestal.is-center .card-easel-stand {
  height: 28px;
  width: 76%;
  background: linear-gradient(180deg, #F8FAFC 0%, #94A3B8 24%, #111D2D 28%, #090E17 100%);
}

.pedestal-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: 170px;
}

.pedestal-caption strong {
  font-size: 0.78rem;
  font-weight: 800;
  color: #F8FAFC;
  line-height: 1.2;
}

.pedestal-caption span {
  font-size: 0.68rem;
  color: var(--silver-mid);
}

/* Plateau épais argent brossé + soubassement bleu nuit mouluré + sous-éclairage chaud */
.vitrine-silver-ledge {
  height: 18px;
  background: linear-gradient(180deg, #F1F5F9 0%, #CBD5E1 26%, #64748B 76%, #334155 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(217, 164, 65, 0.55);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
}

.vitrine-midnight-plinth {
  background: linear-gradient(180deg, #0D1729 0%, #070C16 100%);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-top: none;
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
}

.vitrine-plaque-info strong {
  display: block;
  font-size: 0.86rem;
  color: var(--gold-soft);
}

.vitrine-plaque-info span {
  font-size: 0.76rem;
  color: var(--silver-mid);
}

/* Contrôles de pagination de la vitrine (intégrés dans le socle) */
.vitrine-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vitrine-page-btn,
.vitrine-page-num {
  background: rgba(17, 29, 45, 0.85);
  color: var(--text-muted);
  border: 1px solid rgba(203, 213, 225, 0.28);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.vitrine-page-num {
  min-width: 30px;
  text-align: center;
  padding: 5px 8px;
}

.vitrine-page-btn:hover:not(:disabled),
.vitrine-page-num:hover:not(.is-active) {
  color: #fff;
  border-color: rgba(253, 230, 138, 0.68);
  background: rgba(39, 100, 173, 0.34);
}

.vitrine-page-num.is-active {
  background: linear-gradient(135deg, var(--blue-electric), #1E4F8A);
  color: #FEF3C7;
  border-color: rgba(253, 230, 138, 0.72);
  box-shadow: 0 3px 12px rgba(39, 100, 173, 0.42);
}

.vitrine-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.vitrine-page-all-btn {
  border-color: rgba(253, 230, 138, 0.56);
  background: rgba(217, 164, 65, 0.16);
  color: var(--gold-soft);
}

.vitrine-page-all-btn:hover {
  border-color: rgba(253, 230, 138, 0.85);
  background: rgba(217, 164, 65, 0.28);
  color: #FFFFFF;
}

.vitrine-under-glow {
  width: 84%;
  height: 14px;
  margin: 0 auto;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(253, 230, 138, 0.44) 0%, rgba(217, 164, 65, 0.16) 55%, transparent 82%);
  filter: blur(4px);
}

/* ===================================================
   NIVEAU 3 — INSPECTION PRESTIGIEUSE EN 3D
   =================================================== */
.view-inspect .room-backdrop-img {
  transform: scale(1.26);
  filter: blur(9px) brightness(0.42) saturate(1.08);
}

.inspect-gallery-stage {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 8px;
}

/* Faisceau zénithal cinématographique + montants verre ouverts sur les côtés */
.inspect-spotlight-cone {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(270px, 340px);
  gap: 38px;
  align-items: center;
  padding: 22px 36px 26px;
  background:
    radial-gradient(ellipse 42% 62% at 36% 12%, rgba(255, 255, 255, 0.11), transparent 72%),
    radial-gradient(ellipse 36% 52% at 36% 48%, rgba(253, 230, 138, 0.10), transparent 74%),
    linear-gradient(180deg, rgba(16, 28, 48, 0.34) 0%, rgba(7, 12, 22, 0.56) 100%);
  border-left: 2px solid rgba(203, 213, 225, 0.22);
  border-right: 2px solid rgba(203, 213, 225, 0.22);
  border-top: 1px solid rgba(203, 213, 225, 0.16);
  border-radius: 14px 14px 0 0;
  box-shadow: inset 0 24px 60px rgba(0, 0, 0, 0.42);
}

/* Conteneur 3D libre (aucune vitre devant la carte pour qu'elle tourne librement) */
.inspect-hero-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.inspect-3d-scene {
  --s: 1.04;
  perspective: 1600px;
  width: calc(320px * var(--s));
  height: calc(448px * var(--s));
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.inspect-3d-scene .card-scale-slot {
  --s: 1.04;
  box-shadow: none;
}

.inspect-3d-tilt {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.18s ease-out;
  will-change: transform;
}

.inspect-3d-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.inspect-3d-card.is-flipped {
  transform: rotateY(180deg);
}

.inspect-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 28px 66px rgba(0, 0, 0, 0.78),
    0 0 36px rgba(56, 189, 248, 0.16);
}

.inspect-face-verso {
  transform: rotateY(180deg);
}

.inspect-holo-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  opacity: var(--sheen-opacity, 0.24);
  background:
    radial-gradient(
      circle at var(--mx, 50%) var(--my, 35%),
      rgba(255, 255, 255, 0.34) 0%,
      rgba(56, 189, 248, 0.16) 24%,
      rgba(217, 164, 65, 0.12) 44%,
      transparent 70%
    ),
    linear-gradient(
      125deg,
      rgba(255, 255, 255, 0.06) 0%,
      rgba(56, 189, 248, 0.08) 40%,
      rgba(217, 164, 65, 0.08) 65%,
      transparent 100%
    );
  mix-blend-mode: screen;
}

.inspect-levitation-shadow {
  width: 220px;
  height: 16px;
  margin-top: 14px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(253, 230, 138, 0.36) 0%, rgba(56, 189, 248, 0.18) 48%, transparent 78%);
  filter: blur(4px);
}

/* Cartel biseauté bleu ardoise / argent / or mesuré (façon photo 3) */
.inspect-cartel {
  background: linear-gradient(165deg, rgba(17, 29, 45, 0.90), rgba(9, 14, 23, 0.95));
  border: 1px solid rgba(203, 213, 225, 0.35);
  box-shadow:
    inset 0 0 0 1px rgba(217, 164, 65, 0.30),
    0 20px 50px rgba(0, 0, 0, 0.65);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.cartel-eyebrow {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-accent);
}

.inspect-cartel h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.42rem;
  font-weight: 700;
  color: #F8FAFC;
  line-height: 1.2;
}

.cartel-rule {
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-accent), transparent);
}

.cartel-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
}

.cartel-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.16);
  padding-bottom: 5px;
}

.cartel-row span {
  color: var(--silver-mid);
}

.cartel-row strong {
  color: #F8FAFC;
  font-weight: 600;
  text-align: right;
}

.cartel-status-box {
  font-size: 0.71rem;
  color: var(--gold-soft);
  background: rgba(217, 164, 65, 0.10);
  border: 1px solid rgba(217, 164, 65, 0.32);
  border-radius: 8px;
  padding: 6px 9px;
}

.inspect-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.face-pill {
  font-size: 0.70rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(39, 100, 173, 0.24);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #7DD3FC;
}

.btn-inspect-action {
  background: rgba(255, 255, 255, 0.06);
  color: #F1F5F9;
  border: 1px solid rgba(203, 213, 225, 0.32);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-inspect-action:hover {
  border-color: var(--gold-accent);
  background: rgba(217, 164, 65, 0.14);
}

.inspect-keyboard-hint {
  font-size: 0.68rem;
  color: var(--silver-mid);
  line-height: 1.4;
}

.inspect-pedestal-base {
  height: 22px;
  background: linear-gradient(180deg, #F1F5F9 0%, #CBD5E1 26%, #64748B 76%, #334155 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(217, 164, 65, 0.52);
}

.inspect-pedestal-lower {
  height: 36px;
  background: linear-gradient(180deg, #0E1729 0%, #070C16 100%);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-top: none;
  border-radius: 0 0 8px 8px;
}

/* ===================================================
   RESPONSIVE TABLETTE & MOBILE
   =================================================== */
@media (max-width: 1120px) {
  .vitrine-cards-row {
    grid-template-columns: repeat(2, auto);
    gap: 16px 20px;
  }
  .vitrine-card-pedestal.is-center {
    grid-column: 1 / -1;
    order: -1;
  }
  .card-scale-slot {
    --s: 0.52;
  }
  .vitrine-card-pedestal.is-center .card-scale-slot {
    --s: 0.66;
  }
}

@media (max-width: 880px) {
  .inspect-spotlight-cone {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 18px 14px 20px;
  }
  .inspect-3d-scene,
  .inspect-3d-scene .card-scale-slot {
    --s: 0.88;
  }
  .scene-title-block {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .gallery-topbar {
    padding: 8px 12px;
  }
  .view-galerie {
    padding: 12px 10px 22px;
    justify-content: flex-start;
  }
  .galerie-room-frame {
    width: 100%;
    border-radius: 12px;
  }
  .galerie-hover-caption {
    bottom: 6px;
    padding: 4px 10px;
    font-size: 0.68rem;
    max-width: calc(100% - 16px);
    white-space: normal;
    text-align: center;
  }
  .room-backdrop::before,
  .room-backdrop::after {
    display: none;
  }
  .scene-content {
    padding: 12px 10px 22px;
  }
  .vitrine-controls-strip {
    padding: 10px 11px;
  }
  .vitrine-filter-btn {
    font-size: 0.69rem;
    padding: 4px 9px;
  }
  .vitrine-midnight-plinth {
    padding: 12px 13px;
  }
  .vitrine-interior {
    padding: 34px 10px 20px;
  }
  .vitrine-cards-row {
    gap: 14px 10px;
  }
  .card-scale-slot {
    --s: 0.42;
  }
  .vitrine-card-pedestal.is-center .card-scale-slot {
    --s: 0.62;
  }
  .pedestal-caption {
    max-width: 134px;
  }
  .inspect-3d-scene,
  .inspect-3d-scene .card-scale-slot {
    --s: 0.80;
  }
  .inspect-cartel {
    padding: 15px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-view,
  .inspect-3d-tilt,
  .inspect-3d-card,
  .vitrine-card-pedestal,
  .vitrine-cards-row,
  .vitrine-hotspot,
  .galerie-hover-caption {
    animation: none !important;
    transition: none !important;
  }
  .inspect-3d-tilt,
  .inspect-3d-card {
    transform: none !important;
  }
  .inspect-face-verso {
    transform: none !important;
    display: none;
  }
  .inspect-3d-card.is-flipped .inspect-face-recto {
    display: none;
  }
  .inspect-3d-card.is-flipped .inspect-face-verso {
    display: block;
  }
}


/* === Finition Graphite & Argent (Refonte globale — Grande Salle interactive préservée) === */
.brand-badge,
.brand-logo-mark {
  background: linear-gradient(155deg, #3E4350 0%, #2B2F39 100%) !important;
  border: 1px solid rgba(169, 171, 178, 0.42) !important;
  box-shadow: none !important;
  color: #F1F2F6 !important;
}
.level-tab.is-active,
.nav-tab.active {
  background: linear-gradient(180deg, #DADDE4 0%, #C1C6D0 100%) !important;
  border-color: #E4E7ED !important;
  color: #1B1F27 !important;
  box-shadow: none !important;
}
.gallery-badge,
.meta-pill,
.env-tag,
.quick-nav-btn,
.quick-vitrine-btn {
  background: #30343D !important;
  border-color: rgba(169, 171, 178, 0.34) !important;
  color: #E5E7EB !important;
  box-shadow: none !important;
}
.quick-nav-btn:hover,
.quick-vitrine-btn:hover {
  background: #3A3F4B !important;
  border-color: rgba(218, 221, 228, 0.52) !important;
}

/* === Pleine page immersive & mode Plein écran (25/11/2026) === */
.galerie-hover-caption {
  bottom: 58px;
}

body.is-fullscreen .gallery-topbar {
  background: rgba(12, 16, 24, 0.86);
  padding: 5px 14px;
}

@media (min-width: 961px) and (orientation: landscape) {
  body.is-fullscreen {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  body.is-fullscreen .gallery-topbar {
    flex: 0 0 auto;
  }
  body.is-fullscreen .gallery-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
  body.is-fullscreen .view-galerie {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  body.is-fullscreen .galerie-room-frame {
    max-height: 100%;
    width: min(100vw, calc((100dvh - 48px) * 16 / 9));
  }
}

#btn-galerie-fullscreen[aria-pressed="true"] {
  color: #FDE68A;
  border-color: rgba(217, 164, 65, 0.65);
  background: rgba(217, 164, 65, 0.16);
}

@media (max-width: 960px), (orientation: portrait) {
  .view-galerie {
    height: auto;
    min-height: calc(100dvh - 48px);
    overflow: visible;
    justify-content: flex-start;
    padding: 0 0 78px;
    gap: 10px;
  }
  .galerie-intro-strip {
    position: static;
    width: 100%;
    border-radius: 0;
    padding: 10px 14px 6px;
    background: linear-gradient(180deg, rgba(16, 20, 29, 0.92), rgba(5, 9, 17, 0.6));
    pointer-events: auto;
  }
  .galerie-room-frame {
    width: 100%;
    border-radius: 0;
  }
  .galerie-hover-caption {
    bottom: 8px;
  }
  .galerie-vitrine-strip {
    position: static;
    width: 100%;
    padding: 6px 12px 0;
    right: auto;
    left: auto;
    bottom: auto;
  }
}
