/* =====================================================================
   prenoms-cinema — feuille de style unique
   Sombre, mobile d'abord, une seule couleur d'accent.
   Aucun framework, aucune dépendance externe : les familles
   typographiques sont des piles système, pas des polices distantes.
   ===================================================================== */

:root {
  --bg:        #0a0a0b;
  --bg-2:      #101012;
  --surface:   #17171a;
  --surface-2: #1e1e22;
  --ink:       #f3f1ed;
  --muted:     #918e88;
  /* Texte courant secondaire : --muted (5,5:1) convient à une mention
     courte, pas à un paragraphe de synopsis. */
  --ink-2:     #c6c2b9;
  --dim:       #5a5854;
  --rule:      #26262b;
  --accent:    #ff4a32;
  --accent-dim:rgba(255, 74, 50, .13);

  /* Anton pour le lettrage d'affiche, Archivo pour le texte courant,
     Instrument Serif en italique pour les mentions de générique. */
  --credits: "Anton", "Haettenschweiler", "Arial Narrow", sans-serif;
  --body:    "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif:   "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gut: 1.25rem;
  --max: 68rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* Étiquette en petites capitales espacées — le lettrage de générique. */
.eyebrow {
  font-family: var(--body);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
}

/* ------------------------------------------------------------------ */
/* En-tête                                                             */
/* ------------------------------------------------------------------ */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  font-family: var(--body);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
}

.brand b { color: var(--accent); font-weight: 700; }

.topright {
  display: flex;
  align-items: center;
  gap: .9rem;
}

.lang {
  font-family: var(--body);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .3rem .7rem;
  white-space: nowrap;
}

.lang:hover { border-color: var(--accent); background: var(--accent-dim); }

.top .count {
  font-family: var(--mono);
  font-size: .75rem;
  display: none;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */
.hero { padding-block: 3rem 2.5rem; }

.hero h1 {
  font-family: var(--credits);
  font-weight: 400;
  font-size: clamp(2.75rem, 12.5vw, 6.5rem);
  line-height: .9;
  letter-spacing: -.01em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: .75rem 0 0;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  display: block;
}

.hero .lede {
  font-family: var(--serif);
  font-size: 1.3125rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 34ch;
  margin: 1.25rem 0 0;
}

/* ------------------------------------------------------------------ */
/* Champ de recherche + autocomplétion                                 */
/* ------------------------------------------------------------------ */
/* ------------------------------------------------------------------ */
/* Éventail d'affiches du hero                                         */
/* ------------------------------------------------------------------ */

/* Sous 60rem le hero est sur une colonne : l'éventail n'y comblerait
   rien, il repousserait seulement la recherche sous la ligne de
   flottaison. Il n'apparaît qu'avec la deuxième colonne. */
.fan { display: none; }

.heroside { min-width: 0; }

.search { position: relative; margin-top: 2rem; max-width: 30rem; }

.search form { display: flex; gap: .5rem; }

.search input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--body);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: .9rem 1rem;
}

.search input::placeholder { color: var(--dim); }

.search input:focus {
  border-color: var(--accent);
  outline: none;
  background: var(--surface-2);
}

.search button {
  flex: 0 0 auto;
  font-family: var(--body);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  border-radius: 3px;
  padding-inline: 1.15rem;
  cursor: pointer;
}

.search button:hover { filter: brightness(1.12); }

/* Champ logé dans l'en-tête : pleine largeur sur sa propre ligne en
   mobile, ramassé à côté de la marque dès qu'il y a la place. */
.topsearch {
  flex: 1 1 100%;
  order: 3;
  margin-top: 0;
  max-width: none;
}

.topsearch input {
  font-size: .9375rem;
  padding: .6rem .8rem;
}

.topsearch button {
  font-size: .75rem;
  padding-inline: .9rem;
}

@media (min-width: 48rem) {
  .topsearch {
    flex: 0 1 24rem;
    order: 0;
    margin-inline: auto;
  }
}

/* Liste de suggestions */
.ac {
  position: absolute;
  z-index: 20;
  inset-inline: 0;
  top: calc(100% + .4rem);
  margin: 0;
  padding: .25rem;
  list-style: none;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 3px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
  max-height: 19rem;
  overflow-y: auto;
}

.ac:empty, .ac[hidden] { display: none; }

.ac li a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .7rem;
  border-radius: 2px;
  text-decoration: none;
  font-family: var(--body);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .9375rem;
}

.ac li a span {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.ac li a:hover, .ac li a:focus, .ac li[aria-selected="true"] a {
  background: var(--accent-dim);
  color: var(--accent);
  outline: none;
}

/* ------------------------------------------------------------------ */
/* Mur de rôles — la matière visuelle vient des données, pas d'images  */
/* ------------------------------------------------------------------ */
.wall {
  padding-block: 2.5rem;
  border-block: 1px solid var(--rule);
  background:
    radial-gradient(80% 120% at 50% 0%, var(--bg-2) 0%, var(--bg) 70%);
  overflow: hidden;
}

.wall .eyebrow { padding-inline: var(--gut); margin-bottom: 1.5rem; }

.lane {
  display: flex;
  gap: .625rem;
  width: max-content;
  margin-bottom: .625rem;
  animation: drift linear infinite;
}

.lane:nth-child(2) { animation-duration: 96s; }
.lane:nth-child(3) { animation-duration: 128s; animation-direction: reverse; }
.lane:nth-child(4) { animation-duration: 112s; margin-bottom: 0; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

.role {
  flex: 0 0 auto;
  width: 9rem;
  display: block;
  text-decoration: none;
  color: inherit;
}

.role img,
.role .ghost {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid var(--rule);
}

/* Film sans affiche : initiale du titre, jamais de case vide. */
.role .ghost {
  display: grid;
  place-items: center;
  font-family: var(--credits);
  font-size: 2.5rem;
  color: var(--dim);
}

.role img { transition: transform .25s ease; }
.role:hover img { transform: scale(1.03); }

.role b {
  display: block;
  font-family: var(--body);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .01em;
  margin-top: .5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role i {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: .75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: .15rem;
}

.role i span { font-style: normal; color: var(--dim); }

/* ------------------------------------------------------------------ */
/* Chiffres                                                            */
/* ------------------------------------------------------------------ */
.figures {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  margin-block: 3rem;
}

.figures div { background: var(--bg); padding: 1.1rem 1rem; }

.figures dt {
  font-family: var(--body);
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}

.figures dd {
  margin: .3rem 0 0;
  font-family: var(--credits);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ */
/* Prénoms populaires                                                  */
/* ------------------------------------------------------------------ */
.popular { padding-bottom: 3.5rem; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
  padding: 0;
  list-style: none;
}

.chips a {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  padding: .45rem .75rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--body);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.chips a span {
  font-family: var(--mono);
  font-size: .6875rem;
  color: var(--dim);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.chips a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.chips a:hover span { color: var(--accent); }

/* ------------------------------------------------------------------ */
/* Pied de page                                                        */
/* ------------------------------------------------------------------ */
.foot {
  border-top: 1px solid var(--rule);
  padding-block: 2rem 3rem;
  color: var(--dim);
  font-size: .8125rem;
  line-height: 1.7;
}

.foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.foot a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ */
/* Écrans larges                                                       */
/* ------------------------------------------------------------------ */
@media (min-width: 40rem) {
  :root { --gut: 2rem; }

  .top .count { display: inline; }

  .hero { padding-block: 5rem 3.5rem; }
  .hero .lede { font-size: 1.25rem; }
  .figures { grid-template-columns: repeat(4, 1fr); }
  .figures dd { font-size: 2.5rem; }
  .role { width: 10.5rem; }
}

@media (min-width: 60rem) {
  .hero {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 3rem;
    align-items: end;
  }
  .hero .search { margin-top: 0; }

  /* Les quatre affiches sont posées au même point bas et pivotées
     autour de leur base : c'est le geste d'un paquet de photos qu'on
     étale sur une table, et il tient en un seul transform-origin. */
  .fan {
    display: block;
    position: relative;
    height: 18.5rem;
    margin-bottom: 2.25rem;
  }

  .fan img {
    position: absolute;
    bottom: 0;
    /* Relatif à la colonne, plafonné : en valeur fixe, l'affiche de
       droite débordait de 3 px au seuil des 60rem, là où la colonne est
       la plus étroite. */
    width: min(9.5rem, 32%);
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--rule);
    background: var(--surface);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .6);
    transform-origin: 50% 100%;
    transition: transform .3s ease;
  }

  /* Décalages et angles calculés pour que les deux affiches extrêmes,
     pivotées, restent dans la colonne : à 12° et partant de 0 %, le coin
     haut de la première mordait la gouttière de 3rem qui la sépare du
     texte. */
  .fan img:nth-child(1) { left:  2%;    z-index: 1; transform: rotate(-11deg) translateY(.5rem); }
  .fan img:nth-child(2) { left: 18.5%;  z-index: 2; transform: rotate(-4deg); }
  .fan img:nth-child(3) { left: 35%;    z-index: 3; transform: rotate(4deg); }
  .fan img:nth-child(4) { left: 51.5%;  z-index: 4; transform: rotate(11deg) translateY(.5rem); }

  /* L'éventail s'ouvre légèrement au survol du hero — un mouvement,
     pas une animation qui tourne en boucle. */
  .hero:hover .fan img:nth-child(1) { transform: rotate(-14deg) translateY(.25rem) translateX(-.4rem); }
  .hero:hover .fan img:nth-child(4) { transform: rotate(14deg)  translateY(.25rem) translateX(.4rem); }
}

@media (prefers-reduced-motion: reduce) {
  .fan img, .hero:hover .fan img { transition: none; }
}

/* ------------------------------------------------------------------ */
/* Accessibilité                                                       */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .lane { animation: none; }
  * { transition: none !important; }
}

/* =====================================================================
   Page d'un prénom
   ===================================================================== */

.back {
  font-family: var(--body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.back:hover { color: var(--accent); }

/* Bloc de tête — conçu pour tenir en une capture d'écran mobile. */
.phead { padding-block: 2.25rem 2.5rem; }

.bigname {
  font-family: var(--credits);
  font-weight: 400;
  font-size: clamp(3.5rem, 21vw, 9rem);
  line-height: .84;
  letter-spacing: -.015em;
  text-transform: uppercase;
  margin: .5rem 0 0;
  overflow-wrap: anywhere;
}

.ptotal {
  font-family: var(--body);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: .9rem 0 0;
}

/* Renvoi vers l'autre dictionnaire : une passerelle, pas une statistique.
   Discret sous le compte, mais souligné pour se lire comme un lien. */
.pxref {
  margin: .6rem 0 0;
  font-size: .8125rem;
}

.pxref a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
}

.pxref a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.pstats {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  margin: 1.75rem 0 0;
}

.pstats div { background: var(--bg); padding: .95rem 1rem; }

.pstats dt {
  font-family: var(--body);
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}

.pstats dd {
  margin: .3rem 0 0;
  font-family: var(--credits);
  font-size: 1.5rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.pstats dd.sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: .9375rem;
  color: var(--muted);
  margin-top: .15rem;
}

/* Partage et revendication forment un même geste : les grouper évite
   deux boutons isolés qui se disputent l'attention. */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1rem;
  margin-top: 1.75rem;
}

.claimbtn {
  font-family: var(--body);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: .8rem 1.25rem;
  cursor: pointer;
}

.claimbtn:hover { background: var(--accent-dim); }

.claimbtn.done,
.claimbtn[disabled] {
  color: var(--muted);
  border-color: var(--rule);
  background: var(--surface);
  cursor: default;
}

/* Le chiffre est déclaratif : le dire est une obligation, pas une
   précaution de style. */
.claimnote {
  margin: .7rem 0 0;
  font-size: .75rem;
  color: var(--dim);
}

.share {
  margin-top: 0;
  font-family: var(--body);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  border-radius: 3px;
  padding: .85rem 1.4rem;
  cursor: pointer;
}

.share:hover { filter: brightness(1.12); }
.share[disabled] { opacity: .55; cursor: progress; }

/* ------------------------------------------------------------------ */
/* Fenêtre de partage                                                  */
/* ------------------------------------------------------------------ */
.sharebox {
  width: min(24rem, calc(100vw - 2rem));
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
}

.sharebox::backdrop { background: rgba(0, 0, 0, .72); }

.sharehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--rule);
}

.sharehead h2 {
  margin: 0;
  font-family: var(--body);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.sharehead button {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  padding: .25rem .4rem;
}

.sharehead button:hover { color: var(--accent); }

.sharepreview { padding: 1.15rem 1.15rem 0; }

.sharepreview img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  border: 1px solid var(--rule);
  background: var(--bg);
}

.sharelinks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem;
  padding: 1.15rem;
}

.sharelink {
  display: block;
  text-align: center;
  font-family: var(--body);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: .7rem .5rem;
  text-decoration: none;
  cursor: pointer;
}

.sharelink:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Le partage natif ouvre les applications réellement installées :
   c'est le chemin le plus court sur mobile, donc il passe devant. */
.sharelink.primary {
  grid-column: 1 / -1;
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.sharelink.primary:hover { filter: brightness(1.12); color: var(--bg); }

/* ------------------------------------------------------------------ */
/* Fiche film                                                          */
/* ------------------------------------------------------------------ */
.filmbox { width: min(34rem, calc(100vw - 2rem)); }

.filmbox .sharehead h2 {
  font-family: var(--credits);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.15;
}

.fbody {
  display: flex;
  gap: 1.1rem;
  padding: 1.15rem;
}

.fposter {
  flex: 0 0 auto;
  width: 6.5rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--rule);
  background: var(--bg);
}

.finfo { min-width: 0; }

.fmeta {
  margin: 0;
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.frole {
  margin: .5rem 0 0;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
}

/* L'accent désigne le personnage ; l'acteur qui l'incarne est une
   précision, pas une deuxième vedette. */
.frole .factor { color: var(--muted); font-weight: 400; }

/* Instrument Serif est une police d'affiche : superbe sur un titre,
   illisible sur les quatre lignes d'un synopsis. Le texte courant de la
   fiche passe donc à la police de labeur, plus grand et plus clair. */
.ftext {
  margin: .7rem 0 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-height: 13rem;
  overflow-y: auto;
}

/* Un film sans résumé traduit doit se voir comme une absence, pas
   comme un texte. */
.ftext.empty { font-style: italic; color: var(--muted); }

.factions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem .9rem;
  padding: 0 1.15rem 1rem;
  border-bottom: 1px solid var(--rule);
}

.fcount {
  font-family: var(--mono);
  font-size: .6875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.fimdb {
  margin-left: auto;
  font-family: var(--body);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--muted);
  text-decoration: none;
}

.fimdb:hover { color: var(--accent); }

@media (max-width: 26rem) {
  .fbody { flex-direction: column; }
  .fposter { width: 5rem; }
  .fimdb { margin-left: 0; }
}

/* ------------------------------------------------------------------ */
/* Les douze rôles                                                     */
/* ------------------------------------------------------------------ */
.roles {
  list-style: none;
  margin: 1.25rem 0 3rem;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}

/* display:grid pour que le lien s'étire sur toute la hauteur de la
   cellule : sinon, sur une carte plus courte que sa voisine, le survol
   laisserait une bande morte en bas. */
.roles li {
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Le lien occupe la carte, le bouton vit en dessous : un <button> à
   l'intérieur d'un <a> est du HTML invalide, et le clic serait
   ambigu. */
.roles li .rlink { flex: 1 1 auto; }

.claimrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 0 0 .9rem;
  min-height: 2rem;
}

.claimn {
  font-family: var(--mono);
  font-size: .6875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.claimbtn.mini {
  font-size: .625rem;
  letter-spacing: .1em;
  padding: .35rem .7rem;
}

/* Toute la carte est un lien : elle porte donc la mise en page, le
   rembourrage et l'état de survol, pas le <li>. */
.rlink {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  text-decoration: none;
  color: inherit;
  transition: background-color .18s ease;
}

.rlink:hover,
.rlink:focus-visible { background: var(--surface); }

.rlink:hover .ch,
.rlink:focus-visible .ch { color: var(--accent); }

.rlink:hover .imdb,
.rlink:focus-visible .imdb { opacity: 1; }

.rlink .poster { transition: transform .18s ease; }
.rlink:hover .poster { transform: scale(1.04); }

/* Repère de destination : discret au repos, franc au survol. */
.imdb {
  font-family: var(--body);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent);
  margin-top: .45rem;
  opacity: .55;
  transition: opacity .18s ease;
}

.poster {
  flex: 0 0 auto;
  width: 4.5rem;
  height: 6.75rem;
  object-fit: cover;
  border-radius: 2px;
  background: var(--surface);
}

/* Repli quand TMDB n'a pas d'affiche : initiale du titre. */
.poster.ghost {
  display: grid;
  place-items: center;
  font-family: var(--credits);
  font-size: 2.25rem;
  color: var(--dim);
  border: 1px solid var(--rule);
}

.roles .meta { min-width: 0; display: flex; flex-direction: column; }

.roles .num {
  font-family: var(--mono);
  font-size: .6875rem;
  color: var(--accent);
  letter-spacing: .1em;
}

.roles .ch {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.25;
  margin-top: .2rem;
  overflow-wrap: anywhere;
}

.roles .ti {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  margin-top: .15rem;
  overflow-wrap: anywhere;
}

.roles .ti span { font-style: normal; color: var(--dim); }

/* Nom de l'acteur. Classe `by` et non `ac` : `.ac` désigne la liste
   d'autocomplétion, qui est en position absolue sur toute la largeur
   avec une ombre portée — la réutiliser ici sortait chaque nom d'acteur
   du flux et le faisait flotter en bande au-dessus de la grille.
   L'étiquette, elle, dit ce qu'est ce nom : sans elle il sortait nu,
   dans la même couleur que celui du personnage. */
.roles .by {
  font-family: var(--body);
  font-size: .8125rem;
  color: var(--muted);
  margin-top: .4rem;
}

.roles .by em {
  font-style: normal;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-right: .25rem;
}

.roles .vt {
  font-family: var(--mono);
  font-size: .6875rem;
  color: var(--dim);
  margin-top: .2rem;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ */
/* Frise en barre fixe                                                 */
/* ------------------------------------------------------------------ */
/* Dégage la hauteur de la barre fixe, sinon elle masque le pied de
   page. Porté par une classe sur <body> plutôt que par :has(), pour ne
   dépendre d'aucun support de sélecteur récent — et les pages sans
   frise ne gagnent pas un blanc inutile. */
.hasbar { padding-bottom: 7.25rem; }

.friezebar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-top: 1px solid var(--rule);
  padding-block: .5rem .45rem;
}

/* Le flou est un agrément, pas une dépendance : sans lui le fond reste
   opaque à 92 %, la barre demeure lisible. */
@supports (backdrop-filter: blur(8px)) {
  .friezebar { backdrop-filter: blur(10px); }
}

.frieze.mini {
  min-height: 0;
  margin: 0;
  padding: 0;
  gap: .25rem;
}

.frieze.mini li { flex: 1 1 1.5rem; gap: .2rem; }
.frieze.mini .bar { height: 4.5rem; }
.frieze.mini .cnt { display: none; }

.frieze.mini .dec {
  font-size: .5625rem;
  letter-spacing: .04em;
}

/* Sur écran étroit, une décennie sur deux suffit à situer la période. */
@media (max-width: 30rem) {
  .frieze.mini li:nth-child(even) .dec { visibility: hidden; }
}

/* ------------------------------------------------------------------ */
/* Défilement infini                                                   */
/* ------------------------------------------------------------------ */
.sentinel { height: 1px; }

.loadmore {
  margin: 1.5rem 0 0;
  text-align: center;
  font-family: var(--body);
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
}

.loadmore.end { color: var(--muted); }

/*
 * Le paginateur cesse d'être visible dès que le défilement prend le
 * relais, mais il n'est PAS mis en display:none : c'est le seul chemin
 * d'exploration vers les pages suivantes, et un lien retiré du rendu
 * pèse moins pour un moteur. Masquage visuel uniquement — le lien
 * reste dans l'arbre d'accessibilité et reste un lien ordinaire.
 */
.pager.auto {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Au clavier, le lien redevient visible quand il reçoit le focus. */
.pager.auto a:focus-visible {
  position: static;
  clip-path: none;
  width: auto;
  height: auto;
}

/* ------------------------------------------------------------------ */
/* Pagination                                                          */
/* ------------------------------------------------------------------ */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.75rem 0 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.pager a {
  font-family: var(--body);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .5rem 1rem;
  white-space: nowrap;
}

.pager a:hover { border-color: var(--accent); background: var(--accent-dim); }

.pager .pgof {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* Page 2 et suivantes : en-tête allégé, sans statistiques ni frise. */
.phead.slim { padding-block: 2rem 1.5rem; }
.phead.slim .bigname { font-size: clamp(2.5rem, 13vw, 5rem); }

/* ------------------------------------------------------------------ */
/* Blocs secondaires d'un nom complet                                  */
/* ------------------------------------------------------------------ */
.also { padding-bottom: 1rem; }

/* Volontairement plus discret que la liste principale : le match exact
   doit rester la tête d'affiche de la page. */
.roles.compact .poster { width: 3.25rem; height: 4.875rem; }
.roles.compact .ch { font-size: .9375rem; }
.roles.compact .ti { font-size: .875rem; }
.roles.compact .by { font-size: .75rem; }
.roles.compact .rlink { padding-block: .75rem; }

.seeall {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--body);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.seeall:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ */
/* Frise chronologique                                                 */
/* ------------------------------------------------------------------ */
.frieze-wrap { padding-bottom: 3rem; }

.frieze {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0 0 .25rem;
  display: flex;
  align-items: flex-end;
  gap: .375rem;
  overflow-x: auto;
  min-height: 9rem;
}

.frieze li {
  flex: 1 0 2.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
}

.frieze .bar {
  width: 100%;
  height: 6.5rem;
  display: flex;
  align-items: flex-end;
  background: var(--surface);
  border-radius: 2px;
}

.frieze .bar > span {
  display: block;
  width: 100%;
  height: var(--h);
  background: var(--accent);
  border-radius: 2px;
}

.frieze .dec {
  font-family: var(--mono);
  font-size: .625rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.frieze .cnt {
  font-family: var(--body);
  font-size: .6875rem;
  font-weight: 600;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ */
/* Page « données et crédits »                                         */
/* ------------------------------------------------------------------ */

/* Colonne étroite : ce sont trois paragraphes de texte juridique, pas
   une grille de rôles. Au-delà de ~34rem la ligne devient pénible. */
.legal {
  max-width: 34rem;
  padding-block: 2rem 4rem;
}

.legal h1 {
  font-family: var(--credits);
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  font-weight: 400;
  line-height: 1.05;
  margin: .35rem 0 2rem;
}

.legal h2 {
  font-family: var(--body);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2rem 0 .5rem;
}

.legal p {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--ink-2);
}

.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--accent); }

.legalback {
  margin-top: 3rem !important;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.legalback a { color: var(--muted); text-decoration: none; }

.ends {
  display: grid;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.ends p { margin: 0; display: flex; flex-direction: column; gap: .2rem; }
.ends b { font-family: var(--body); font-weight: 700; font-size: 1rem; }
.ends i { font-family: var(--serif); font-style: italic; color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Prénom inconnu                                                      */
/* ------------------------------------------------------------------ */
.miss { padding-block: 2.5rem 4rem; }

.miss .lede {
  font-family: var(--serif);
  font-size: 1.1875rem;
  color: var(--muted);
  max-width: 46ch;
  margin: 1.25rem 0 0;
}

/* ------------------------------------------------------------------ */
/* Écrans larges                                                       */
/* ------------------------------------------------------------------ */
@media (min-width: 40rem) {
  .pstats { grid-template-columns: repeat(3, 1fr); }
  .roles  { grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .rlink { padding: 1.1rem 1.25rem; }
  .claimrow { padding: 0 1.25rem .9rem; }
  .poster { width: 5.25rem; height: 7.875rem; }
  .ends { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .frieze li { flex: 1 0 3.25rem; }
}

@media (min-width: 60rem) {
  .roles { grid-template-columns: repeat(3, 1fr); }
  .roles.compact { grid-template-columns: repeat(2, 1fr); }
  .bigname { font-size: clamp(5rem, 13vw, 11rem); }
}
