/* =========================================================
   COSSEF — Page Galerie Vidéo
   ========================================================= */

/* --- Filtres ------------------------------------------- */

.video-filter-section {
  padding: 2.5rem 1rem 1rem;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
  max-width: 960px;
  margin: 0 auto;
}

.filter-tab {
  padding: .55rem 1.2rem;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  background: #fff;
  color: #555;
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.filter-tab:hover {
  border-color: #1a237e;
  color: #1a237e;
  background: #f0f4ff;
}

.filter-tab.active {
  background: #1a237e;
  border-color: #1a237e;
  color: #fff;
}

/* --- Grille vidéos -------------------------------------- */

.video-grid-section {
  padding: 3rem 1rem 5rem;
  background: #f8f9fb;
  min-height: 400px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* --- Carte vidéo --------------------------------------- */

.video-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(0,0,0,.08);
  transition: transform .25s, box-shadow .25s;
}

.video-card:not(.video-card--soon) {
  cursor: pointer;
}

.video-card:not(.video-card--soon):hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
}

.video-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16/9 */
  background-size: cover;
  background-position: center;
  background-color: #e8e8e8;
}

/* Bouton play */
.video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}

.video-card:hover .video-play-btn {
  opacity: 1;
}

.video-play-btn svg {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
}

/* Overlay "Bientôt disponible" */
.video-soon-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(2px);
}

.video-soon-icon {
  font-size: 2.8rem;
}

.video-soon-text {
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: #555;
  background: rgba(255,255,255,.85);
  padding: .3rem .8rem;
  border-radius: 20px;
  letter-spacing: .03em;
}

/* Badge catégorie */
.video-cat-badge {
  position: absolute;
  top: .7rem;
  left: .7rem;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  padding: .25rem .75rem;
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: .02em;
  pointer-events: none;
}

/* Meta sous la vignette */
.video-meta {
  padding: .9rem 1rem 1rem;
}

.video-title {
  font-family: 'DM Sans', sans-serif;
  font-size: .92rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
  line-height: 1.4;
}

/* --- Modal --------------------------------------------- */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.video-modal.open {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.82);
  cursor: pointer;
}

.modal-content {
  position: relative;
  z-index: 1;
  background: #0d0d1a;
  border-radius: 16px;
  overflow: hidden;
  width: min(860px, 96vw);
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}

.modal-close {
  position: absolute;
  top: .7rem;
  right: .7rem;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.modal-close:hover {
  background: rgba(255,255,255,.3);
}

.modal-player {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}

.modal-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.modal-info {
  padding: .9rem 1.2rem 1rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
}

#modalTitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.modal-badge {
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  padding: .25rem .8rem;
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}

/* --- Stat line ----------------------------------------- */
.video-stat-line {
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  color: #888;
  padding: 1rem;
}

/* --- Responsive ---------------------------------------- */

@media (max-width: 860px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
}

@media (max-width: 520px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .filter-tab {
    font-size: .8rem;
    padding: .45rem .9rem;
  }

  .video-filter-section {
    padding: 1.5rem .75rem .75rem;
  }
}
