/* Haut de fiche : affiche par-dessus l'image 16:9 (body.fnmb-couverture-affiche, voir couverture.php).
   Même logique que la page de location : l'image reste claire, ombre seulement derrière le texte. */

.fnmb-couverture-affiche article > .wp-block-cover {
  height: min(calc(56.25vw - 30px), calc(100svh - 60px)) !important; min-height: 520px !important;
  padding: 0 max(16px, 4.7vw) clamp(40px, 5vw, 80px) !important;
  align-items: flex-end !important; justify-content: flex-start !important;
}
/* Fin du voile noir à 30 % sur toute l'image : seulement un léger fondu en bas */
.fnmb-couverture-affiche article > .wp-block-cover > .wp-block-cover__gradient-background {
  opacity: 1 !important; background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.38) 32%, rgba(0,0,0,0) 62%), linear-gradient(to right, rgba(0,0,0,.42) 0%, rgba(0,0,0,0) 55%) !important; /* voile droit (2026-11-18), plus d'ombre ovale */
}
.fnmb-couverture-affiche article > .wp-block-cover > .wp-block-cover__inner-container {
  position: relative; isolation: isolate; width: 100% !important; max-width: none !important; margin: 0 !important;
  display: grid; grid-template-columns: clamp(200px, 19vw, 300px) minmax(0, 1fr); grid-template-rows: 1fr repeat(5, auto);
  column-gap: clamp(28px, 4vw, 64px); align-items: end; text-align: left !important;
}
/* Ombre douce derrière la colonne de texte seulement */
.fnmb-couverture-affiche article > .wp-block-cover > .wp-block-cover__inner-container::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: calc(clamp(200px, 19vw, 300px) - 2vw); width: min(900px, 62%); top: 18%; bottom: -12%;
  background: none; /* ombre ovale retirée (2026-11-18) */
}
.fnmb-couv__affiche {
  grid-column: 1; grid-row: 1 / -1; align-self: end; width: 100%; aspect-ratio: 2 / 3; object-fit: cover;
  border-radius: 6px; box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.fnmb-couverture-affiche .wp-block-cover__inner-container > :not(.fnmb-couv__affiche):not(style) { grid-column: 2; max-width: 720px; text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.fnmb-couverture-affiche .wp-block-cover .film-title {
  grid-row: 2; text-align: left !important; margin: 0 !important; padding: 0 !important;
  font-size: clamp(32px, 4.4vw, 58px) !important; line-height: 1.02 !important; text-wrap: balance;
}
.fnmb-couv__cineaste { grid-row: 3; margin: 14px 0 0 !important; font-size: 17px !important; font-weight: 600; color: #fff; }
.fnmb-couv__meta { grid-row: 4; margin: 4px 0 0 !important; font-size: 15px !important; color: rgba(255,255,255,.82); }
.fnmb-couverture-affiche .wp-block-cover .entry-summary { grid-row: 5; margin: 14px 0 0 !important; text-align: left !important; }
.fnmb-couverture-affiche .wp-block-cover .entry-summary p { margin: 0 !important; font-size: 16px !important; line-height: 1.55 !important; max-width: 58ch; text-align: left !important; }
/* Boutons ronds : dans la colonne de texte (avant : débordaient de 50 px sous l'image) */
.fnmb-couverture-affiche .wp-block-cover .film-buttons {
  grid-row: 6; position: static !important; left: auto !important; bottom: auto !important; width: auto !important;
  margin: 22px 0 0 !important; justify-content: flex-start !important; text-shadow: none !important;
}
.fnmb-couverture-affiche .fnmb-action__circle { width: 76px !important; height: 76px !important; border-width: 4px !important; }
.fnmb-couverture-affiche .fnmb-action__circle svg { width: 38px !important; height: 38px !important; }
.single-fiche.fnmb-couverture-affiche .fnmb-action--louer .fnmb-action__label { color: #fff !important; text-shadow: 0 1px 3px rgba(0,0,0,.55) !important; }
/* Le bloc suivant n'a plus à laisser la place aux boutons qui débordaient */
.fnmb-couverture-affiche .vsd-surfiche > .vsd-bande:first-child > .vsd-bande__int { padding-top: clamp(36px, 4vw, 56px); }

/* Téléphone et tablette étroite, façon Mubi : une grande image recadrée en hauteur (4:5, jamais plus de 70 % de
   l'écran), le titre, le cinéaste et l'année · pays · durée posés en bas de l'image, puis les boutons.
   Pas d'affiche sur téléphone : à cette taille elle faisait doublon avec l'image et tassait le titre. */
@media (max-width: 879px) {
  .fnmb-couverture-affiche article > .wp-block-cover {
    --couv-h: min(125vw, 70svh);
    display: block !important; height: auto !important; min-height: 0 !important;
    padding: 0 16px 26px !important; background: #141414 !important;
  }
  .fnmb-couverture-affiche article > .wp-block-cover > .wp-block-cover__image-background {
    height: var(--couv-h) !important; bottom: auto !important; object-fit: cover; object-position: center;
  }
  .fnmb-couverture-affiche article > .wp-block-cover > .wp-block-cover__gradient-background {
    height: var(--couv-h) !important; bottom: auto !important;
    background: linear-gradient(180deg, rgba(20,20,20,0) 0, rgba(20,20,20,0) calc(var(--couv-h) - 300px), rgba(20,20,20,.82) calc(var(--couv-h) - 90px), #141414 var(--couv-h)) !important;
  }
  .fnmb-couverture-affiche article > .wp-block-cover > .wp-block-cover__inner-container {
    display: block; padding-top: calc(var(--couv-h) - 150px);
  }
  .fnmb-couverture-affiche article > .wp-block-cover > .wp-block-cover__inner-container::before { display: none; }
  .fnmb-couverture-affiche .fnmb-couv__affiche { display: none !important; }
  .fnmb-couverture-affiche .wp-block-cover .film-title { font-size: 30px !important; }
  .fnmb-couv__cineaste { margin-top: 10px !important; font-size: 15px !important; }
  .fnmb-couv__meta { font-size: 14px !important; }
  .fnmb-couverture-affiche .wp-block-cover .film-buttons { margin-top: 22px !important; }
  .fnmb-couverture-affiche .fnmb-action__circle { width: 60px !important; height: 60px !important; border-width: 3px !important; }
  .fnmb-couverture-affiche .fnmb-action__circle svg { width: 30px !important; height: 30px !important; }
}

/* Boutons ronds alignés sur le titre : le thème met 54 px de marge à gauche, et chaque libellé plus large
   que son cercle (« Bande-annonce ») décalait encore le cercle de ~20 px. On cale la largeur de chaque bouton
   sur son cercle ; le libellé reste centré dessous et déborde également des deux côtés. */
.fnmb-couverture-affiche .wp-block-cover .film-buttons { padding: 0 !important; gap: 0 3rem !important; }
.fnmb-couverture-affiche .wp-block-cover .fnmb-action { width: 76px; }
.fnmb-couverture-affiche .wp-block-cover .fnmb-action__label { white-space: nowrap; }
@media (max-width: 879px) {
  .fnmb-couverture-affiche .wp-block-cover .film-buttons { gap: 0 2.4rem !important; padding-left: 14px !important; }
  .fnmb-couverture-affiche .wp-block-cover .fnmb-action { width: 60px; }
}


/* --- Bouton de location bien visible (2026-11-14) ---
   Nicolas : « le bouton Louer à 6,99 $ a disparu en cours de route, il faudrait le remettre ».
   Le rond blanc « Louer » devient un vrai bouton plein « Louer · 6,99 $ », placé en premier ;
   pendant une location, le même bouton dit « Regarder maintenant » (il mène au lecteur). */
.fnmb-couverture-affiche .wp-block-cover .film-buttons { align-items: flex-start !important; }
.fnmb-couverture-affiche .wp-block-cover .fnmb-action--louer {
  order: -1; width: auto !important; flex-direction: row !important; align-items: center !important; gap: 8px !important;
  min-height: 48px; margin-top: 14px; padding: 0 24px 0 14px;
  border-radius: var(--fnmb-rayon-bouton, 6px); background: #D56766; box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
  transition: background-color .15s ease, transform .15s ease;
}
.fnmb-couverture-affiche .wp-block-cover .fnmb-action--louer:hover { background: #dd8585; }
.fnmb-couverture-affiche .wp-block-cover .fnmb-action--louer .fnmb-action__circle {
  width: 30px !important; height: 30px !important; border: 0 !important; background: transparent !important; transform: none !important;
}
.fnmb-couverture-affiche .wp-block-cover .fnmb-action--louer .fnmb-action__circle svg { width: 24px !important; height: 24px !important; }
.single-fiche.fnmb-couverture-affiche .wp-block-cover .fnmb-action--louer .fnmb-action__label {
  color: #fff !important; text-shadow: none !important; font-size: 16px !important; font-weight: 700 !important; line-height: 1 !important; white-space: nowrap;
}
.fnmb-couverture-affiche.fnmb-vsd-loue .wp-block-cover .fnmb-action--louer { background: #1C3654; }
.fnmb-couverture-affiche.fnmb-vsd-loue .wp-block-cover .fnmb-action--louer:hover { background: #495e76; }
@media (max-width: 879px) {
  .fnmb-couverture-affiche .wp-block-cover .film-buttons { padding-left: 0 !important; gap: 0 2rem !important; }
  .fnmb-couverture-affiche .wp-block-cover .fnmb-action--louer { min-height: 46px; margin-top: 7px; padding: 0 20px 0 12px; }
}

/* Téléphone : les trois boutons sur une seule ligne (2026-11-18 ; « Séances » passait sur une 2e ligne) */
@media (max-width: 879px) {
  .fnmb-couverture-affiche .wp-block-cover .film-buttons { flex-wrap: nowrap !important; gap: 0 1.5rem !important; }
  .fnmb-couverture-affiche .wp-block-cover .fnmb-action--louer { padding: 0 16px 0 10px; }
}
@media (max-width: 380px) { .fnmb-couverture-affiche .wp-block-cover .film-buttons { gap: 0 1.1rem !important; } }
