/* --- FOND --- */
body {
  background: black;
  color: white;
  font-family: "MidnightTerror", sans-serif;
  margin: 0;
  padding: 0;
}

/* --- HEADER --- */
header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: black;
}

header nav a {
  text-decoration: none;
  color: white;
  font-size: 1.2em;
  transition: color 0.3s ease;
}

header nav a:hover {
  color: crimson;
}

.nav-center .tom { color: crimson; transition: color 0.3s ease; }
.nav-center .colas { color: white; transition: color 0.3s ease; }
.nav-center:hover .tom { color: white; }
.nav-center:hover .colas { color: crimson; }

/* --- SHOWREEL --- */
.showreel {
  display: flex;
  justify-content: center;
  margin: 60px 0;
}

.showreel-card {
  position: relative;
  width: 60%;
  max-width: 900px;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

/* Contour rouge uniquement au hover */
.showreel-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 4px solid crimson;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.showreel-card:hover::after {
  opacity: 1;
}

.showreel-card iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- FILTRE & TITRE WORKS --- */
.works-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 50px;
  position: relative;
}

.page-title {
  font-size: 3em;
  margin: 0;
  text-align: center;
  grid-column: 2;
}

.filter-dropdown {
  justify-self: start;
  position: relative;
}

#filter-toggle {
  background: transparent;
  border: 2px solid white;
  color: white;
  font-size: 0.85em; /* ✅ réduit de 15% */
  padding: 6px 12px;
  cursor: pointer;
  font-family: "MidnightTerror", sans-serif;
  transition: background 0.3s ease, color 0.3s ease;
}
#filter-toggle:hover {
  background: crimson;
  color: black;
}

.filter-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: black;
  border: 1px solid #444;
  flex-direction: column;
  min-width: 180px;
  z-index: 200;
}
.filter-options.open {
  display: flex;
}
.filter-options button {
  background: transparent;
  border: none;
  color: white;
  font-size: 1em;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  font-family: "MidnightTerror", sans-serif;
}
.filter-options button:hover {
  background: crimson;
  color: black;
}
.filter-options .active {
  background: crimson;
  color: black;
}

/* --- GRILLE DES PROJETS --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 0 40px 80px;
}

.project-card {
  position: relative;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease;
  display: flex;              /* ✅ s'assure que le bas s'aligne */
  flex-direction: column;     /* image + infos en colonne */
  height: 100%;
  width: 100%;
}

/* ✅ Effet lévitation */
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

/* Animation disparition/affichage */
.project-card.hiding {
  opacity: 0;
  transform: translateY(20px);
}
.project-card.hidden {
  display: none;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 4px solid transparent;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.4s ease, border-color 0.4s ease;
  pointer-events: none;
}

.youtube:hover::after { opacity: 1; border-color: #FF0000; }
.live:hover::after { opacity: 1; border-color: #9146FF; }
.fiction:hover::after { opacity: 1; border-color: #1E90FF; }
.pub:hover::after { opacity: 1; border-color: #FFD700; }
.clip:hover::after { opacity: 1; border-color: #32CD32; }

.project-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

/* ✅ Correction pour remplir toute la largeur */
.project-info {
  width: 100%;
  box-sizing: border-box;
  padding: 15px 20px;
  background: #111;
  transition: background 0.4s ease;
  display: flex;
  flex-direction: column;
}

.project-info h3 {
  margin: 0 0 8px;
  font-size: 1.2em;
  color: white;
  transition: color 0.4s ease;
}

.project-meta {
  display: flex;
  justify-content: space-between; /* type à gauche, rôle à droite */
  align-items: center;
}

.project-type,
.project-role {
  opacity: 0;
  font-size: 0.9em;
  font-weight: bold;
  color: white;
  transition: opacity 0.4s ease, color 0.4s ease, transform 0.4s ease;
  transform: translateY(10px);
}

.youtube:hover .project-info { background: #FF0000; }
.live:hover .project-info { background: #9146FF; }
.fiction:hover .project-info { background: #1E90FF; }
.pub:hover .project-info { background: #FFD700; }
.clip:hover .project-info { background: #32CD32; }

.project-card:hover h3 { color: #111; }
.project-card:hover .project-type,
.project-card:hover .project-role {
  opacity: 1;
  color: #111;
  transform: translateY(0);
}

/* --- OVERLAY --- */
.project-overlay {
  display: none;
  position: fixed;
  top: 80px; /* ✅ descend sous le header */
  left: 0;
  width: 100%;
  height: calc(100% - 80px);
  background: rgba(0,0,0,0.95);
  color: white;
  overflow-y: auto;
  z-index: 99; /* juste sous le header */
}

header {
  z-index: 100; /* ✅ header reste toujours visible */
  position: relative;
}

.overlay-content {
  width: 100%;
  margin: 0 auto;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.video-wrapper {
  width: 80%;
  max-width: 1000px;
  aspect-ratio: 16/9;
  margin: 0 auto 30px;
}
.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.overlay-content h2 {
  font-size: 2.5em;
  margin: 20px 0 10px;
  text-align: center;
}

.overlay-content .meta {
  color: #888;
  font-size: 1em;
  text-align: center;
  margin-bottom: 30px;
}

.overlay-content .summary {
  margin: 20px auto;
  max-width: 800px;
  text-align: center;
  line-height: 1.6;
}

.overlay-content .team {
  max-width: 800px;
  margin: 30px auto;
  text-align: left;
}

.team-section {
  margin-bottom: 20px;
}

.team-section h4 {
  font-size: 1.2em;
  margin-bottom: 10px;
  color: crimson;
}

.team-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.team-section li {
  margin: 5px 0;
  color: white;
}

/* Bouton fermer */
.close-overlay {
  background: transparent;
  border: none;
  color: white;
  font-size: 2em;
  position: absolute;
  top: 20px;
  right: 30px;
  cursor: pointer;
}

/* --- FOOTER --- */
footer {
  background: black;
  padding: 80px 40px;
}

.footer-inner {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 30px;
}

footer h2 {
  font-size: 2em;
  font-weight: bold;
  color: #666;
  margin: 0;
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-links a {
  text-decoration: none;
  font-size: 1em;
  color: #555;
  transition: color 0.4s ease;
}

.social-links a[href*="instagram.com"]:hover { color: #E4405F; }
.social-links a[href*="youtube.com"]:hover { color: #FF0000; }
