/* ============================================================
   PAGE VIDÉOS — Styles Spécifiques (`videos.css`)
   
   SECTIONS :
   - FEATURED VIDEO : Lecteur principal grand format (16:9).
   - VIDEO GRID : Grille de miniatures avec filtres par catégorie.
   - VIDEO MODAL : Modale pop-up d'affichage du lecteur iFrame YouTube.
   ============================================================ */

/* ========== LECTEUR À LA UNE (FEATURED) ========== */
.featured-video {
  max-width: 900px;
  margin: 0 auto;
}
.video-embed-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
}
.video-placeholder, .video-embed-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.video-placeholder {
  background: var(--gray-mid);
  border: 1px solid var(--gray-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
.vp-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, #000 0%, #001820 60%, #000 100%);
}
.vp-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
.vp-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45) saturate(0.85);
  transition: transform 0.6s ease, filter 0.6s ease;
}
.video-placeholder:hover .vp-thumb {
  transform: scale(1.04);
  filter: brightness(0.6) saturate(1);
}
.vp-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
}
.vp-play-btn {
  width: 80px;
  height: 80px;
  transition: transform var(--transition), filter var(--transition);
}
.video-placeholder:hover .vp-play-btn {
  transform: scale(1.1);
  filter: drop-shadow(0 0 20px rgba(0,229,255,0.6));
}
.vp-play-btn svg { width: 100%; height: 100%; }
.vp-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white);
}
.vp-meta {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.35);
}
.vp-note {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--cyan-dim);
  border: 1px dashed var(--cyan-dim);
  padding: 0.4rem 0.8rem;
  opacity: 0.7;
}

/* ========== VIDEO GRID ========== */
.video-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.video-filter {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  background: transparent;
  border: 1px solid var(--gray-border);
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.video-filter:hover, .video-filter.active {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}
.video-card[hidden] { display: none; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.video-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
}
.vc-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}
.vc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: brightness(0.5);
}
.video-card:hover .vc-thumb img {
  transform: scale(1.05);
  filter: brightness(0.65);
}
.vc-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 50px; height: 50px;
  z-index: 1;
  transition: transform var(--transition), filter var(--transition);
}
.video-card:hover .vc-play {
  transform: translate(-50%, -50%) scale(1.15);
  filter: drop-shadow(0 0 12px rgba(0,229,255,0.7));
}
.vc-play svg { width: 100%; height: 100%; }
.vc-duration {
  position: absolute;
  bottom: 0.5rem; right: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(0,0,0,0.8);
  color: var(--white);
  padding: 0.15rem 0.4rem;
}
.vc-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.vc-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--white);
  line-height: 1.3;
}
.vc-meta {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}
.vc-tags { display: flex; gap: 0.4rem; margin-top: 0.3rem; }

/* ========== CHANNEL CTA ========== */
.yt-channel-cta {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

/* ========== MODAL PLAYER ========== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.video-modal.open { display: flex; }
.vm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(6px);
}
.vm-inner {
  position: relative;
  width: min(1000px, 100%);
  animation: vmIn 0.3s ease;
}
@keyframes vmIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.vm-stage {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border: 1px solid var(--cyan-dim);
  box-shadow: 0 0 60px rgba(0,229,255,0.15);
  background: #000;
}
.vm-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.vm-close {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.8rem;
  line-height: 1;
  background: none;
  border: 1px solid var(--gray-border);
  color: var(--white);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}
.vm-close:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  transform: rotate(90deg);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .video-grid { grid-template-columns: 1fr; }
  .vp-content { padding: 1rem; }
  .vp-play-btn { width: 64px; height: 64px; }
}
