/* ═══════════════════════════════════════
   Painting Page — La Liberté guidant le peuple
   ═══════════════════════════════════════ */

body.painting-body {
  background: #060810;
}

#screen-painting.painting-body {
  background: rgba(6, 8, 16, 0.55); /* let WebGL bg breathe through subtly */
}

#painting-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#painting-svg {
  width: 100%;
  height: 100%;
  display: block;
}

#painting-svg image {
  /* Smooth zoom via SVG viewBox manipulation */
}

#painting-svg .spotlight-overlay {
  fill: rgba(4, 6, 12, 0.78);
  pointer-events: none;
  transition: fill 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#painting-svg .zone-outline {
  fill: none;
  stroke: rgba(232, 240, 248, 0.55);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#painting-svg .zone-outline.active {
  opacity: 1;
  animation: zone-stroke 6s linear infinite;
}

@keyframes zone-stroke {
  to { stroke-dashoffset: -200; }
}

/* ── Meta info top-left (carte minimaliste avec léger fond verre fumé) ── */
#painting-meta {
  position: fixed;
  top: 1.5rem;
  left: 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.7rem 1.1rem;
  background: rgba(4, 10, 18, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 240, 248, 0.08);
  border-radius: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232, 240, 248, 0.55);
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#painting-meta .meta-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(232, 240, 248, 0.92);
  line-height: 1.2;
}

#painting-meta .meta-sep {
  display: none; /* on passe en layout vertical → plus besoin de séparateur */
}

/* Mode painting : on cache le screen-label "Tableau" qui doublonne avec le meta */
#screen-painting .screen-label {
  display: none;
}

/* ── Zone card top-right ── */
#zone-card {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  text-align: right;
  z-index: 10;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

#zone-card.visible {
  opacity: 1;
  transform: translateX(0);
}

.zone-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.01em;
}

.zone-card-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(78, 205, 196, 0.7);
}

/* ── Subtitles ── */
#subtitles {
  position: fixed;
  left: 50%;
  bottom: 6rem;
  transform: translateX(-50%);
  width: min(70vw, 900px);
  text-align: center;
  z-index: 10;
  pointer-events: none;
}

#subtitle-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.45;
  color: rgba(232, 240, 248, 0.92);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.85), 0 0 8px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  margin: 0;
}

#subtitle-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════
   Mobile painting view
   ═══════════════════════════════════════ */

.painting-mobile-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 380px;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.mobile-title-small {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--cream);
  text-align: center;
}

.painting-author {
  font-size: 0.65rem;
  font-weight: 300;
  text-align: center;
  color: rgba(232, 240, 248, 0.5);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

#zones-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.zone-btn {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  background: rgba(78, 205, 196, 0.04);
  border: 1px solid rgba(78, 205, 196, 0.15);
  border-radius: 0.65rem;
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 0;
}

.zone-btn:active {
  background: rgba(78, 205, 196, 0.18);
  border-color: var(--accent);
  transform: scale(0.98);
}

.zone-btn.active {
  background: rgba(78, 205, 196, 0.14);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(78, 205, 196, 0.25);
}

.zone-btn-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.zone-btn-subtitle {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 240, 248, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.zone-btn.active .zone-btn-subtitle {
  color: rgba(78, 205, 196, 0.85);
}

/* Bouton "Intro" — variant accentué (premier de la liste) */
.zone-btn-intro {
  background: rgba(232, 240, 248, 0.06);
  border-color: rgba(232, 240, 248, 0.22);
}
.zone-btn-intro .zone-btn-title { color: var(--cream); }

/* Bouton "Vue d'ensemble" — séparé visuellement, plus discret */
.zone-btn-reset {
  margin-top: 0.35rem;
  background: transparent;
  border-style: dashed;
  border-color: rgba(232, 240, 248, 0.15);
  justify-content: center;
}
.zone-btn-reset .zone-btn-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.zone-btn-reset:active {
  background: rgba(232, 240, 248, 0.05);
  border-color: rgba(232, 240, 248, 0.35);
}

.painting-hint {
  text-align: center;
  font-size: 0.65rem !important;
  margin-top: 0.35rem;
  color: rgba(232, 240, 248, 0.35);
  line-height: 1.4;
}

/* ═══════════════════════════════════════
   Painting — responsive host (mobile)
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  #painting-meta {
    top: 0.6rem;
    left: 0.6rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.55rem;
    max-width: 60vw;
  }
  #painting-meta .meta-title { font-size: 0.8rem; line-height: 1.15; }

  #zone-card {
    top: 0.6rem;
    right: 0.6rem;
    max-width: 55vw;
  }
  .zone-card-title { font-size: 1.05rem; }
  .zone-card-subtitle { font-size: 0.55rem; letter-spacing: 0.15em; }

  #subtitles {
    width: min(92vw, 600px);
    bottom: 2rem;
  }
  #subtitle-text { font-size: 1rem; line-height: 1.4; }
}

@media (max-width: 480px) {
  #painting-meta { font-size: 0.5rem; padding: 0.35rem 0.6rem; }
  #painting-meta .meta-title { font-size: 0.72rem; }
  .zone-card-title { font-size: 0.95rem; }
  #subtitle-text { font-size: 0.9rem; }
}
