/* =============================================================================
   Antonin Sgambato — site portfolio
   Dans l'esprit de bettercall-ra.com : fond gris très sombre, typographie fine,
   projets en bandeaux vidéo plein écran, menu plein écran.
   Fira Sans tient lieu de Freight Sans (police Adobe du site R&A).
   ========================================================================== */

@font-face { font-family: "Fira Sans"; font-weight: 300; font-display: swap; src: url("../assets/fonts/fira-sans-300-latin.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 400; font-display: swap; src: url("../assets/fonts/fira-sans-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 500; font-display: swap; src: url("../assets/fonts/fira-sans-500-latin.woff2") format("woff2"); }

:root {
  --fond: #202020;
  --fond-haut: rgba(32, 32, 32, 0.9);
  --texte: #ffffff;
  --texte-doux: rgba(255, 255, 255, 0.62);
  --filet: rgba(255, 255, 255, 0.18);
  --police: "Fira Sans", "Freight Sans Pro", "Helvetica Neue", Arial, sans-serif;
  --entete: 88px;
  --marge: clamp(16px, 2.6vw, 32px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 400 16px/1.6 var(--police);
  -webkit-font-smoothing: antialiased;
}
body.is-bloque { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ol { margin: 0; padding: 0; list-style: none; }
h1, p { margin: 0; }
:focus-visible { outline: 1px solid var(--texte); outline-offset: 4px; }
.evitement { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 14px; background: var(--texte); color: var(--fond); }
.evitement:focus { left: 8px; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----------------------------------------------------------------- En-tête */
.entete {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: var(--entete);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--marge);
  background: var(--fond-haut);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.entete__signature {
  display: flex; flex-direction: column;
  font: 400 13px/1.38 var(--police);
  text-decoration: none;
}
.entete__signature strong { font-weight: 400; }
.entete__droite { display: flex; align-items: center; gap: 22px; }
.langues { display: flex; align-items: center; gap: 6px; font: 400 13px/1 var(--police); letter-spacing: 0.06em; }
.langues a { text-decoration: none; color: var(--texte-doux); padding: 4px 0; }
.langues a:hover, .langues a[aria-current] { color: var(--texte); }
.langues span { color: var(--texte-doux); }
.burger { position: relative; width: 28px; height: 28px; z-index: 41; }
.burger i {
  position: absolute; left: 7px; right: 7px; height: 1.5px; background: var(--texte);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.burger i:nth-child(1) { top: 8px; }
.burger i:nth-child(2) { top: 13.5px; }
.burger i:nth-child(3) { top: 19px; }
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Menu plein écran */
.menu {
  position: fixed; inset: 0; z-index: 25;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 56px;
  background: var(--fond);
  animation: apparait 0.35s var(--ease);
}
@keyframes apparait { from { opacity: 0; } to { opacity: 1; } }
.menu__liens { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.menu__liens a {
  font: 300 clamp(26px, 3vw, 34px)/1.2 var(--police);
  text-decoration: none; padding-bottom: 3px; border-bottom: 1px solid transparent;
}
.menu__liens a:hover, .menu__liens a[aria-current] { border-color: var(--texte); }
.menu__petits { display: flex; gap: 24px; font-size: 14px; }
.menu__petits a { text-decoration: none; color: var(--texte-doux); }
.menu__petits a:hover { color: var(--texte); }

main { padding-top: var(--entete); }

/* ---------------------------------------------------------------- Bandeaux */
.bandeau {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 3 / 1;                   /* très large, comme le site R&A : plusieurs films à l'écran */
  min-height: 180px;
  width: 100%; min-width: 0;             /* sinon la hauteur minimale élargit le bandeau (3 × 180 px) sur téléphone */
  overflow: hidden; background: #111;
  text-decoration: none;
}
/* hauteur souvent fractionnaire : chaque bandeau chevauche le précédent d'1 px, pas de liseré */
.bandeaux li + li { margin-top: -1px; }
.bandeau__media {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.6s var(--ease);
}
.bandeau::after {                      /* voile pour la lisibilité du titre */
  content: ""; position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.5s var(--ease);
}
.bandeau:hover::after, .bandeau:focus-visible::after { background: rgba(0, 0, 0, 0.12); }
.bandeau:focus-visible { outline-offset: -4px; }
.bandeau:hover .bandeau__media { transform: scale(1.025); }
.bandeau__titre {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 0.34em;
  padding: 0 var(--marge); text-align: center;
  font: 300 clamp(30px, 3.6vw, 54px)/1.15 var(--police);
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.5s var(--ease);
}
.bandeau:hover .bandeau__titre { transform: translateY(-3px); }
.fleche circle { transition: fill 0.4s var(--ease); }
.bandeau:hover .fleche circle { fill: rgba(255, 255, 255, 0.16); }
.fleche { width: 0.62em; height: 0.62em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform 0.4s var(--ease); }
.bandeau:hover .fleche { transform: translateX(4px); }

/* Voisins (précédent / suivant) et tuiles photo */
.voisins { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: clamp(80px, 9vw, 140px); }
.voisins__titre {
  grid-column: 1 / -1; margin: 0 0 22px; text-align: center;
  font: 400 13px/1 var(--police); letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-doux);
}
.bandeau--demi { height: clamp(220px, 42vh, 460px); aspect-ratio: auto; }
.bandeau--demi .bandeau__titre, .bandeau--tuile .bandeau__titre { flex-direction: column; gap: 6px; font-size: clamp(24px, 2.4vw, 36px); }
.bandeau__titre small { font-size: 13px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.tuiles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; }
/* hauteurs et largeurs souvent fractionnaires : chaque tuile déborde d'1 px sous sa voisine,
   pour qu'aucun filet sombre n'apparaisse à la jointure (comme les grilles du site R&A) */
.tuiles .bandeau__media { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); }
.bandeau--tuile { height: clamp(300px, 62vh, 760px); aspect-ratio: auto; }   /* hauteur fixe : pas de format 3:1 */

/* ------------------------------------------------------------- Fiche film */
.lecteur {
  --r: 1.7778;
  position: relative; aspect-ratio: var(--r);
  /* lecteur compact, comme le site R&A : de l'air autour, toujours entier à l'écran */
  width: min(calc(100% - 2 * var(--marge)), 1120px, calc((100vh - var(--entete) - 120px) * var(--r)));
  margin: 0 auto; background: #000;
}
.lecteurs { padding-top: clamp(32px, 5vw, 72px); }
.lecteurs figure { margin: 0; }
.lecteurs figure + figure { margin-top: clamp(32px, 4vw, 56px); }
.lecteurs figcaption { margin-top: 12px; text-align: center; color: var(--texte-doux); font-size: 15px; }
.lecteur iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lecteur--image .bandeau__media { position: absolute; }
.lecteur__jouer { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; text-decoration: none; }
.lecteur__jouer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.lecteur__jouer:hover img { transform: scale(1.03); }
.lecteur__jouer::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.18); transition: background 0.4s var(--ease); }
.lecteur__jouer:hover::after { background: rgba(0, 0, 0, 0.04); }
.lecteur__icone {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: clamp(44px, 4vw, 60px); aspect-ratio: 1;
  border: 1.5px solid var(--texte); border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}
.lecteur__icone svg { width: 30%; margin-left: 8%; fill: var(--texte); }
.lecteur__jouer:hover .lecteur__icone { transform: scale(1.06); background: rgba(0, 0, 0, 0.32); }

/* Grille d'extraits : deux colonnes bord à bord, comme les GIF de l'ancien site R&A.
   Les vignettes tombent souvent sur des demi-pixels : chaque vidéo déborde d'1 px sous sa
   voisine, pour qu'aucun liseré n'apparaisse à la jointure. */
.grille { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.grille__item { position: relative; aspect-ratio: 16 / 9; background: #111; }
.grille__item .bandeau__media { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); transition: none; }
.voisins__titre--stills { margin: clamp(56px, 7vw, 96px) 0 22px; }
.fiche__tete { max-width: 760px; margin: 0 auto; padding: clamp(44px, 6vw, 76px) var(--marge) clamp(32px, 4vw, 52px); text-align: center; }
.fiche__titre { font: 300 clamp(32px, 4vw, 56px)/1.12 var(--police); }
.fiche__infos { margin-top: 14px; color: var(--texte-doux); }
.fiche__credit { margin-top: 4px; color: var(--texte-doux); font-size: 14px; }
.fiche__texte { max-width: 620px; margin: 26px auto 0; font-size: 16px; line-height: 1.65; color: rgba(255, 255, 255, 0.82); text-wrap: pretty; }
.fiche--photos .fiche__tete { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(28px, 3.5vw, 44px); }
.fiche__tete + .galerie { margin-top: 0; }

/* Galerie : rangées justifiées, presque bord à bord comme les grilles R&A */
.galerie { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; }   /* bord à bord, sans filet */
.galerie:not(.is-justifiee)::after { content: ""; flex-grow: 999999; }   /* repli sans JS */
.galerie.is-justifiee .vignette { flex: none !important; aspect-ratio: auto !important; }
.vignette { position: relative; cursor: zoom-in; overflow: hidden; background: transparent; }
.vignette img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s; }
.vignette:hover img { opacity: 0.85; }

/* Affiches de film : entières, espacées, légèrement détachées du fond */
.affiches { max-width: 1240px; margin: clamp(48px, 6vw, 88px) auto clamp(64px, 8vw, 120px); padding: 0 var(--marge); }
.affiches__titre { margin-bottom: clamp(22px, 2.6vw, 34px); text-align: center; font: 400 12px/1 var(--police); letter-spacing: 0.22em; text-transform: uppercase; color: var(--texte-doux); }
.affiches__grille { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2.2vw, 32px); align-items: start; }
.affiche { width: 100%; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5); transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.affiche:hover { transform: translateY(-6px); box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6); }
.affiche:hover img { opacity: 1; }

/* ------------------------------------------------------- Pages de texte */
.texte {
  max-width: 680px; margin: 0 auto;
  padding: clamp(56px, 9vw, 120px) var(--marge) clamp(72px, 10vw, 140px);
}
.texte__image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 48px; }
.texte h1 { font: 300 clamp(26px, 2.8vw, 36px)/1.3 var(--police); margin-bottom: 28px; }
.texte p { margin-bottom: 1.1em; color: var(--texte-doux); font-size: 17px; }
.texte a { color: var(--texte); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.texte__petit { font-size: 14px !important; }
.texte__grand { font: 300 clamp(22px, 2.6vw, 32px)/1.3 var(--police) !important; color: var(--texte) !important; }
.texte__grand a { text-decoration: none; border-bottom: 1px solid var(--filet); }
.texte__grand a:hover { border-color: var(--texte); }
.texte .contact { margin-top: clamp(64px, 8vw, 104px); padding-top: clamp(40px, 5vw, 56px); border-top: 1px solid var(--filet); }
.texte h2 { font: 300 clamp(22px, 2.4vw, 30px)/1.3 var(--police); margin: 0 0 20px; }
.texte--centre { text-align: center; min-height: calc(100vh - var(--entete) - 80px); display: flex; flex-direction: column; justify-content: center; }

/* ------------------------------------------------------------------- Pied */
.pied {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 22px var(--marge);
  font-size: 13px; color: var(--texte-doux);
}
.pied__liens { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.pied a, .pied button { text-decoration: none; color: inherit; }
.pied a:hover, .pied button:hover { color: var(--texte); }
.pied button { font-size: 13px; padding: 4px 0; }
/* liens du pied : trait qui se dessine de gauche à droite */
.pied__liens a, .pied__liens button { position: relative; }
.pied__liens a::after, .pied__liens button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right center; transition: transform 0.4s var(--ease);
}
.pied__liens a:hover::after, .pied__liens button:hover::after { transform: scaleX(1); transform-origin: left center; }

/* ------------------------------------------------------------ Visionneuse */
.visionneuse {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: rgba(16, 16, 16, 0.97);
}
.visionneuse img { max-width: calc(100vw - 2 * var(--marge) - 96px); max-height: calc(100vh - 120px); object-fit: contain; }
.visionneuse__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; font-size: 24px; font-weight: 300; }
.visionneuse__nav--prec { left: var(--marge); }
.visionneuse__nav--suiv { right: var(--marge); }
.visionneuse__fermer { position: absolute; top: 18px; right: var(--marge); width: 44px; height: 44px; font-size: 34px; font-weight: 300; line-height: 1; }
.visionneuse__compteur { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-size: 13px; color: var(--texte-doux); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Réactif */
@media (max-width: 760px) {
  .affiches__grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root { --entete: 80px; }
  .entete__signature { font-size: 12px; }
  .voisins, .tuiles, .grille { grid-template-columns: 1fr; }
  .bandeau--tuile { height: 52vh; }
  .visionneuse img { max-width: 100vw; }
  .visionneuse__nav { top: auto; bottom: 8px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .affiche, .affiche:hover { transition: none; transform: none; }
  .bandeau__media, .fleche, .fleche circle, .bandeau__titre, .lecteur__icone, .lecteur__jouer img,
  .pied__liens a::after, .pied__liens button::after { transition: none; }
  .bandeau:hover .bandeau__titre, .lecteur__jouer:hover img { transform: none; }
  .menu { animation: none; }
}
