:root {
  --bg-main: #0b0d13;
  --bg-surface: #121620;
  --bg-card: #161b27;
  --bg-card-hover: #1c2333;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-card-hover: rgba(230, 190, 100, 0.45);
  --text-main: #f3f5f8;
  --text-muted: #949eb2;
  --text-dim: #647087;
  --accent: #e6be64;
  --accent-light: #f5d688;
  --accent-glow: rgba(230, 190, 100, 0.18);
  --tag-art: #8b5cf6;
  --tag-text: #0ea5e9;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.65);
  --shadow-hover: 0 20px 40px -12px rgba(0, 0, 0, 0.8), 0 0 30px -5px var(--accent-glow);
  --radius-card: 14px;
  --radius-btn: 999px;
  --transition: 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none;
  user-select: none;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Ambiance d'arrière-plan */
.ambient-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.glow-top {
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(230, 190, 100, 0.25) 0%, rgba(139, 92, 246, 0.15) 60%, transparent 80%);
}

.glow-bottom {
  bottom: -200px;
  right: -100px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
}

/* Halo qui suit l'œuvre actuellement visible pendant le défilement */
.scroll-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 32%,
    rgba(var(--scroll-glow-color, 230, 190, 100), 0.22) 0%,
    transparent 55%
  );
  transition: background 1.1s ease;
}

/* En-tête */
.site-header {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 56px 24px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.header-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-btn);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.site-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(3rem, 7vw, 4.8rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  background: linear-gradient(135deg, #ffffff 30%, #e2e8f0 70%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.notice-card {
  max-width: 740px;
  margin: 0 auto 36px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(22, 27, 39, 0.75);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  text-align: left;
}

.notice-icon {
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.notice-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.notice-text strong {
  color: var(--text-main);
  font-weight: 600;
}

.notice-text a {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
  -webkit-user-select: text;
  user-select: text;
}

/* Galerie */
.main-container {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 48px) 80px;
}

/* Flux vertical "story" : chaque pièce = un bloc texte + illustration(s) */
.story {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 880px;
  margin: 0 auto;
}

.work {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 64px 0;
}

.work:first-child {
  padding-top: 0;
}

.work + .work {
  border-top: 1px solid var(--border-subtle);
}

.work-index {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-index::before,
.work-index::after {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

/* Légende sous l'image : texte centré, police unique */
.caption-block {
  width: 100%;
  max-width: 640px;
  text-align: center;
  margin: -4px auto 0;
}

.caption-kicker,
.caption-body p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-muted);
}

.caption-block .caption-tagline {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-main);
  margin: 10px 0;
}

.caption-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

/* Cartons de texte : rendus comme un feuillet clair, plus petit, au-dessus */
.work-texts {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 440px;
}

.text-card {
  background: #fdfdfb;
  border-radius: 10px;
  padding: 6px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.text-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.text-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  -webkit-user-drag: none;
  user-drag: none;
}

/* Illustrations : grand format, mises en avant */
.work-artworks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.artwork-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  background: #06070a;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  max-width: 720px;
  width: 100%;
}

.artwork-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-card-hover);
}

.artwork-card img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  -webkit-user-drag: none;
  user-drag: none;
}

.artwork-number {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
  z-index: 2;
}

.artwork-card:hover img {
  transform: scale(1.03);
}

.work-caption {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  max-width: 480px;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Lightbox Visionneuse Plein Écran */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.lightbox[hidden] {
  display: none;
  opacity: 0;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%,
      rgba(var(--glow-color, 5, 7, 11), 0.9) 0%,
      rgba(var(--glow-color, 5, 7, 11), 0.45) 40%,
      rgba(5, 7, 11, 0.97) 78%);
  backdrop-filter: blur(14px);
  transition: background 0.6s ease;
}

.lightbox-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  background: linear-gradient(180deg, rgba(5, 7, 11, 0.8) 0%, transparent 100%);
}

.lightbox-counter {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-subtle);
}

.lightbox-content {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1200px;
  height: 100%;
  padding: 72px 80px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: calc(85vh - 120px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, opacity 0.2s ease;
  background: #000;
}

.lightbox-info {
  margin-top: 16px;
  text-align: center;
  max-width: 800px;
}

.lightbox-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.lightbox-hints {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.lightbox-hints kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.72rem;
}

/* Boutons de navigation et fermeture de Lightbox */
.lightbox-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--accent);
}

.lightbox-close {
  width: 42px;
  height: 42px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Pied de page */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border-subtle);
  background: rgba(11, 13, 19, 0.8);
  backdrop-filter: blur(12px);
  padding: 40px 24px;
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.footer-legal {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .site-header {
    padding: 36px 16px 20px;
  }

  .site-title {
    font-size: 2.5rem;
  }

  .notice-card {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 12px 16px;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }

  .work {
    gap: 18px;
    padding: 44px 0;
  }

  .work-texts {
    max-width: 100%;
  }

  .lightbox-content {
    padding: 64px 16px 20px;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .lightbox-hints {
    display: none;
  }
}

