:root {
    --overlay: rgba(0,0,0,.55);
    --accent: #39e;
  }
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    margin: 0;
    color: #fff;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #0b0b0b;
    text-align: center;
  }

  /* Contexte */
.hero { position: fixed; inset: 0; z-index: -2; overflow: hidden; }

/* 1) Donne un z-index différent aux deux médias */
.hero video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;            /* AU-DESSUS de l'image */
}

.hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;            /* DERRIÈRE la vidéo */
}


  /* Réduit les animations pour accessibilité */
  @media (prefers-reduced-motion: reduce) {
    .hero video { display: none; }
  }

  /* ---------- CONTENU ---------- */
  header {
    padding: clamp(1.2rem, 2vw, 2rem) 1rem 0.5rem;
  }
  h1 {
    margin: 0 0 .25rem;
    font-weight: 700;
    letter-spacing: .5px;
  }
  .sub {
    margin: 0 auto 1rem;
    max-width: 900px;
    opacity: .9;
    font-size: .95rem;
  }

  main {
    padding: 1rem clamp(0.75rem, 2vw, 2rem) 3rem;
  }

  /* ---------- GRILLE ---------- */
  .grid {
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);  /* ✅ 5 colonnes fixes */
    gap: clamp(.8rem, 2vw, 1.2rem);
    max-width: 1200px;
  }
.film{
  position: relative;
  display: flex;                 /* ⬅️ empile image puis texte */
  flex-direction: column;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  overflow: visible;             /* popover OK */
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  z-index: 0;
}
.film img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px 12px 0 0;  /* arrondi haut */
}

  .film:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(255,255,255,.18);
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
  }


/* AVANT: position:absolute; bottom:0;  ❌  */
/* APRÈS: bloc normal, sous l'image     ✅  */
.film .meta{
  position: static;
  padding: .6rem .9rem .8rem;
  background: rgba(0,0,0,.55);   /* garde le bandeau sombre si tu veux */
  backdrop-filter: blur(3px);
  border-top: 1px solid rgba(255,255,255,.10);
  border-radius: 0 0 12px 12px;  /* arrondi bas */
}
.film .title{
  margin: 0 0 .15rem;
  font-size: .95rem;
  font-weight: 650;
  line-height: 1.25;
  text-wrap: balance;
}
.film .info{
  margin: 0;
  font-size: .8rem;
  opacity: .85;
}

  /* ---------- MODALE ---------- */
  .modal {
    position: fixed;
    inset: 0;
    display: none; /* cachée par défaut */
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.8);
    z-index: 999;
    padding: 1rem;
  }
  .modal.open { display: flex; }
  .modal-content {
    position: relative;
    width: min(90vw, 1000px);
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
  }
  .modal iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }
  .close-btn {
    position: absolute;
    top: -44px;
    right: 0;
    background: #ff3b3b;
    border: 0;
    color: #fff;
    padding: .55rem .9rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
  }
  .close-btn:hover { background: #d92e2e; }

  /* Flou léger du fond quand la modale est ouverte */
  body.modal-open main,
  body.modal-open header { filter: blur(1px); }

.film .desc{
  position: absolute;
  left: 50%;
  top: 0;                                   /* ancrage haut */
  transform: translate(-50%, calc(-100% - 12px));  /* juste au-dessus */
  min-width: 240px;
  max-width: min(360px, calc(100vw - 2rem));
  background: rgba(10,10,10,.96);
  color: #fff;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.12);
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  will-change: transform, opacity;
}


/* Petite flèche */
.film .desc::after{
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: rgba(10,10,10,.96) transparent transparent transparent;
}

.film .desc h4{
  margin: 0 0 .35rem;
  font-size: .95rem;
  font-weight: 800;
}
.film .desc p{
  margin: 0;
  font-size: .9rem;
  line-height: 1.35;
  opacity: .95;
  overflow: visible;         /* ✅ permet le texte complet */
  display: block;            /* désactive le clamp multi-lignes */
}


/* Affichage */
.film:hover .desc,
.film:focus-within .desc,
.film.show-desc .desc{
  opacity: 1;
  transform: translate(-50%, calc(-100% - 12px));  /* stable à l’affichage */
  pointer-events: auto;
}

/* Variante en DESSOUS si besoin (JS ajoute .desc-below) */
.film.desc-below .desc{
  top: 100%;
  transform: translate(-50%, 12px);
}
.film.desc-below .desc::after{
  top: auto; bottom: 100%;
  border-color: transparent transparent rgba(10,10,10,.96) transparent;
}

.film:hover,
.film:focus-within,
.film.show-desc { z-index: 100; }