/* ═══════════════════════════════════════════════════════════════
   Word Overlays — Landing page animated panels
   ═══════════════════════════════════════════════════════════════ */

.word-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #2a201a;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  cursor: pointer;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  will-change: opacity;
}
.word-overlay.phase-bg {
  animation: overlayFadeIn 0.4s linear forwards;
}
.word-overlay.phase-bg-out {
  animation: overlayFadeOut 0.4s linear forwards;
}
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes overlayFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.word-overlay::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.85 0 0 0 0 0.78 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.word-overlay.phase-text::before { opacity: 0.5; }

.word-overlay-inner {
  position: relative;
  z-index: 2;
  max-width: 580px;
  padding: 80px 32px 60px;
  margin: 0 auto;
  min-height: 0;
  opacity: 0;
  will-change: opacity;
}
.word-overlay.phase-text .word-overlay-inner {
  animation: textFadeIn 1.2s linear forwards;
}
.word-overlay.phase-text-out .word-overlay-inner {
  animation: textFadeOut 1.2s linear forwards;
}
@keyframes textFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes textFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.word-overlay-title {
  font-family: 'Avenir Next', 'Be Vietnam Pro', system-ui, sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: #f4ecdb;
  letter-spacing: -0.5px;
  margin-bottom: 28px;
}
.word-overlay-body {
  font-size: 17px;
  line-height: 1.75;
  color: #d8ccb8;
}
.word-overlay-body p { margin-bottom: 16px; }
.word-overlay-body strong { color: #f4ecdb; }

.word-overlay-anim-layer {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* ─── Hover sur les mots cliquables ─── */
.landing-word {
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}
.landing-word::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: #2a201a;
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: center;
}
.landing-word:hover::after {
  transform: scaleX(1);
}

@media (max-width: 480px) {
  .word-overlay-inner { padding: 60px 20px 40px; }
  .word-overlay-title { font-size: 26px; }
  .word-overlay-body { font-size: 15px; line-height: 1.7; }
}
