/* ============================================
   PORTFOLIO — index.html
   Intro cinématique + Hero cinématique
   ============================================ */

/* ============================================
   CINEMATIC INTRO
   ============================================
   Ajuste les variables --tv-* pour positionner
   l'écran de la vidéo sur ta propre image de salon.
   Les valeurs sont en % de l'image.
   ============================================ */
:root {
  /* ▼ POSITION DE L'ÉCRAN TV SUR L'IMAGE ▼ */
  --tv-left: 30%;
  --tv-top: 23%;
  --tv-width: 38%;
  --tv-height: 44%;
}

/* --- Intro Container --- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  overflow: hidden;
}

.intro.done {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* --- Room Scene (zoom target) --- */
.intro__scene {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.intro__room {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.6) saturate(0.8);
}

/* Lueur bleutée émise par la TV sur les murs */
.intro__tv-glow {
  position: absolute;
  left: calc(var(--tv-left) + var(--tv-width) / 2 - 25%);
  top: calc(var(--tv-top) + var(--tv-height) / 2 - 25%);
  width: 50%;
  height: 50%;
  background: radial-gradient(ellipse at center,
      rgba(100, 180, 255, 0.12) 0%,
      rgba(100, 180, 255, 0.04) 40%,
      transparent 70%);
  pointer-events: none;
  animation: tvGlowPulse 3s ease-in-out infinite alternate;
}

@keyframes tvGlowPulse {
  0%   { opacity: 0.6; }
  100% { opacity: 1; }
}

/* --- TV Screen Overlay --- */
.intro__tv-screen {
  position: absolute;
  left: var(--tv-left);
  top: var(--tv-top);
  width: var(--tv-width);
  height: var(--tv-height);
  border-radius: 6% / 8%;
  overflow: hidden;
  background: #000;
  z-index: 2;
}

.intro__tv-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(1.05) contrast(1.1) saturate(0.9);
}

/* Scanlines CRT */
.intro__tv-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom,
      transparent 0px,
      transparent 3px,
      rgba(0, 0, 0, 0.06) 3px,
      rgba(0, 0, 0, 0.06) 6px);
  pointer-events: none;
  z-index: 3;
}

/* Reflet de lumière sur l'écran */
.intro__tv-reflection {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 35% 30%,
      rgba(255, 255, 255, 0.06) 0%,
      transparent 60%);
  pointer-events: none;
  z-index: 4;
}

/* Vignette intérieure de l'écran */
.intro__tv-vignette {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 5;
}

/* --- Flash de transition --- */
.intro__flash {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  z-index: 10;
  pointer-events: none;
}

/* --- Bouton Skip --- */
.intro__skip {
  position: absolute;
  bottom: 30px;
  right: 30px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  letter-spacing: 0.05em;
}

.intro__skip:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
}

/* --- Main Content (caché pendant l'intro) --- */
.main-content {
  opacity: 0;
  visibility: hidden;
}

.main-content.visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 1.2s ease 0.2s;
}

/* ============================================
   HERO CINEMATIC
   ============================================ */
.hero-cinematic {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 40px 40px;
  background: var(--bg-primary);
}

.hero-cinematic__container {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}

.hero-cinematic__video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8% / 10%;
  overflow: hidden;
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.4),
    0 0 80px rgba(0, 0, 0, 0.6);
}

/* CRT vignette — rounded fade into the black background */
.hero-cinematic__video-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 90% 90% at center,
      transparent 50%,
      rgba(10, 10, 15, 0.5) 75%,
      rgba(10, 10, 15, 0.95) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Subtle CRT scanlines */
.hero-cinematic__video-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(to bottom,
      transparent 0px,
      transparent 2px,
      rgba(0, 0, 0, 0.03) 2px,
      rgba(0, 0, 0, 0.03) 4px);
  pointer-events: none;
  z-index: 2;
}

.hero-cinematic__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.9) brightness(0.92);
}

/* Dark overlay for text readability */
.hero-cinematic__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.05) 0%,
      rgba(0, 0, 0, 0.08) 50%,
      rgba(0, 0, 0, 0.15) 100%);
  pointer-events: none;
}

/* Additional inner glow for CRT depth */
.hero-cinematic__vignette {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

/* Text overlay */
.hero-cinematic__text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 3;
  padding: var(--space-xl);
}

.hero-cinematic__subtitle {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  font-style: italic;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  animation: fadeInUp 1s ease 0.3s both;
}

.hero-cinematic__title {
  font-family: var(--font);
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 900;
  color: var(--gold);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease 0.6s both;
}

.hero-cinematic__video-wrapper {
  animation: scaleIn 1.2s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(25px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* ============================================
   PROJECT SHOWCASE SLIDER
   ============================================ */
.showcase {
  padding: var(--space-3xl) 0 var(--space-4xl);
  background: var(--bg-primary);
  overflow: hidden;
}

.showcase .section-subtitle {
  color: var(--text-secondary);
  font-size: var(--fs-base);
  margin-top: var(--space-sm);
}

/* Stage — contient flèches + viewport */
.showcase__stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

/* Viewport — fenêtre de visibilité */
.showcase__viewport {
  flex: 1;
  overflow: visible;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  min-height: 480px;
  display: flex;
  align-items: center;
}

/* Track — conteneur de toutes les cartes */
.showcase__track {
  position: relative;
  width: 100%;
  height: 460px;
  transform-style: preserve-3d;
}

/* ── Card ── */
.showcase__card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 340px;
  transform: translateX(-50%) translateY(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    opacity   0.55s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.55s ease;
  will-change: transform, opacity;
  user-select: none;
}

/* Position states — appliqués par JS via data-pos */
.showcase__card[data-pos="-2"] {
  transform: translateX(calc(-50% - 440px)) translateY(-50%) rotateY(42deg) scale(0.62);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
.showcase__card[data-pos="-1"] {
  transform: translateX(calc(-50% - 260px)) translateY(-50%) rotateY(28deg) scale(0.78);
  opacity: 0.55;
  z-index: 1;
}
.showcase__card[data-pos="0"] {
  transform: translateX(-50%) translateY(-50%) rotateY(0deg) scale(1);
  opacity: 1;
  z-index: 3;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 40px rgba(212,160,23,0.12);
  border-color: rgba(212, 160, 23, 0.3);
}
.showcase__card[data-pos="1"] {
  transform: translateX(calc(-50% + 260px)) translateY(-50%) rotateY(-28deg) scale(0.78);
  opacity: 0.55;
  z-index: 1;
}
.showcase__card[data-pos="2"] {
  transform: translateX(calc(-50% + 440px)) translateY(-50%) rotateY(-42deg) scale(0.62);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

/* Image placeholder */
.showcase__card-img {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.showcase__card-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase__card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.4) 100%);
}

.showcase__card-icon {
  font-size: 3.5rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  position: relative;
  z-index: 1;
}

/* Card body */
.showcase__card-body {
  padding: var(--space-xl);
}

.showcase__card-cat {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  display: block;
  margin-bottom: var(--space-sm);
}

.showcase__card-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.showcase__card-desc {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}

.showcase__card-link {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--gold-light);
  transition: color var(--transition-fast);
  display: inline-block;
}

.showcase__card-link:hover {
  color: var(--gold);
}

/* ── Arrows ── */
.showcase__arrow {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
}

.showcase__arrow svg {
  width: 20px;
  height: 20px;
}

.showcase__arrow:hover {
  background: rgba(212, 160, 23, 0.15);
  border-color: rgba(212, 160, 23, 0.35);
  color: var(--gold-light);
  transform: scale(1.08);
}

.showcase__arrow:active {
  transform: scale(0.95);
}

/* ── Dots ── */
.showcase__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: var(--space-2xl);
}

.showcase__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-glass);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}

.showcase__dot.active {
  background: var(--gold);
  width: 24px;
  border-radius: var(--radius-full);
}

/* ── CTA ── */
.showcase__cta {
  display: flex;
  justify-content: center;
  margin-top: var(--space-2xl);
}

/* ============================================
   RESPONSIVE — index.html
   ============================================ */
@media (max-width: 1024px) {
  .showcase__card[data-pos="-1"] {
    transform: translateX(calc(-50% - 210px)) translateY(-50%) rotateY(22deg) scale(0.75);
    opacity: 0.45;
  }
  .showcase__card[data-pos="1"] {
    transform: translateX(calc(-50% + 210px)) translateY(-50%) rotateY(-22deg) scale(0.75);
    opacity: 0.45;
  }
  .showcase__card[data-pos="-2"],
  .showcase__card[data-pos="2"] {
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .intro__skip {
    bottom: 20px;
    right: 20px;
    padding: 8px 18px;
    font-size: var(--fs-xs);
  }

  .hero-cinematic {
    padding: 80px 16px 24px;
  }

  .hero-cinematic__video-wrapper {
    border-radius: 18px;
    aspect-ratio: 3 / 4;
  }

  .hero-cinematic__title {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  .hero-cinematic__subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
  }

  .showcase__stage {
    gap: var(--space-sm);
  }

  .showcase__card {
    width: 290px;
  }

  .showcase__card[data-pos="-1"],
  .showcase__card[data-pos="1"] {
    opacity: 0;
    pointer-events: none;
  }

  .showcase__viewport {
    min-height: 420px;
  }

  .showcase__track {
    height: 400px;
  }

  .showcase__arrow {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 480px) {
  .hero-cinematic__title {
    font-size: clamp(1.8rem, 12vw, 2.8rem);
  }

  .showcase__card {
    width: 260px;
  }

  .showcase__card-img {
    height: 160px;
  }
}
