/**
 * MARRS Scroll Video Widget - Styles
 */

:root {
  --marrs-gold: #D0AD50;
  --marrs-navy: #1a2a4a;
  --marrs-dark: #0f1620;
}

.marrs-scroll-video-widget {
  --scroll-height: 600vh;
  --hero-start: 0;
  --hero-end: 0.15;
  --cta-start: 0.75;
  --cta-end: 0.97;
  
  position: relative;
  width: 100%;
  background-color: #000;
  overflow: hidden;
}

/* Canvas vidéo */
.scroll-video-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  display: block;
}

/* Vignette overlay */
.scroll-video-vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 10;
  pointer-events: none;
}

.vignette-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), transparent);
}

.vignette-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}

.vignette-sides {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.2), transparent, rgba(0, 0, 0, 0.2));
}

/* HUD Elements */
.scroll-video-hud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 15;
  pointer-events: none;
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--marrs-gold);
  opacity: 0.6;
}

.hud-top-left,
.hud-top-right,
.hud-bottom-left,
.hud-bottom-right {
  position: absolute;
  line-height: 1.5;
}

.hud-top-left {
  top: 1rem;
  left: 1rem;
}

.hud-top-right {
  top: 1rem;
  right: 1rem;
  text-align: right;
}

.hud-bottom-left {
  bottom: 1rem;
  left: 1rem;
}

.hud-bottom-right {
  bottom: 1rem;
  right: 1rem;
  text-align: right;
}

/* Scroll container */
.scroll-video-container {
  position: relative;
  width: 100%;
  background-color: transparent;
}

/* Overlays texte */
.scroll-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 20;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-overlay-text {
  text-align: center;
  color: white;
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 90%;
  opacity: 0;
  transition: opacity 0.3s ease-out;
  font-family: 'Roboto', sans-serif;
}

.scroll-overlay-text.active {
  opacity: 1;
}

.scroll-overlay-accent {
  color: var(--marrs-gold);
  display: block;
  font-size: 1.2em;
  margin-top: 0.5em;
  text-shadow: 0 0 20px rgba(208, 173, 80, 0.5);
}

/* CTA Button */
.scroll-cta-button {
  position: fixed;
  bottom: 5vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  padding: 1rem 2.5rem;
  background-color: var(--marrs-gold);
  color: var(--marrs-navy);
  border: none;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
  letter-spacing: 0.1em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out, transform 0.2s ease-out;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
}

.scroll-cta-button:hover {
  transform: translateX(-50%) scale(1.05);
  text-decoration: none;
}

.scroll-cta-button.active {
  opacity: 1;
  pointer-events: auto;
}

/* Progress indicator */
.scroll-progress-indicator {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 30;
  width: 60px;
  height: 60px;
  border: 2px solid var(--marrs-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--marrs-gold);
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
}

/* Scroll hint */
.scroll-hint {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  text-align: center;
  color: var(--marrs-gold);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  opacity: 0;
  animation: fadeInOut 3s ease-in-out infinite;
  font-family: 'Roboto', sans-serif;
}

@keyframes fadeInOut {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

/* Film grain effect */
.marrs-scroll-video-widget::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  background-image: 
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" result="noise" /></filter><rect width="100" height="100" fill="rgba(255,255,255,0.02)" filter="url(%23noise)" /></svg>');
  opacity: 0.15;
}

/* Responsive */
@media (max-width: 768px) {
  .scroll-overlay-text {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }

  .scroll-cta-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }

  .scroll-progress-indicator {
    width: 50px;
    height: 50px;
    font-size: 0.65rem;
  }

  .scroll-video-hud {
    font-size: 0.65rem;
  }
}

@media (max-width: 480px) {
  .scroll-overlay-text {
    font-size: clamp(1.25rem, 5vw, 2rem);
  }

  .scroll-cta-button {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    bottom: 3vh;
  }

  .scroll-progress-indicator {
    display: none;
  }

  .scroll-video-hud {
    display: none;
  }
}
