/* Back in Time 90’s · l’ouverture « cinéma » : le film en plein écran, puis on rembobine jusqu’en 1990
   et la télé rose apparaît. Aucune écriture en italique. */
.cine {
  --nuit: #0B0A14; --neon: #FF4F8B; --neon-pale: #FFD3E2; --or: #FFC94D; --lagon: #49E0D0;
  position: fixed; inset: 0; z-index: 1000; overflow: hidden; color: #fff; background: var(--nuit);
  font-family: var(--sans); isolation: isolate;
}
html.cine-vu .cine { display: none }
.cine[hidden] { display: none }

/* fond : l’affiche du film, floue et assombrie, avec un grain de pellicule */
.cine-fond { position: absolute; inset: -8%; z-index: -2; background: url("media/affiche.jpg") center / cover; filter: blur(46px) saturate(1.25) brightness(.5); transform: scale(1.1) }
.cine::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 70% 40%, rgba(11, 10, 20, 0) 0%, rgba(11, 10, 20, .55) 62%, rgba(11, 10, 20, .92) 100%) }
.cine::after { content: ""; position: absolute; inset: -50%; z-index: 5; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
  animation: cine-grain .6s steps(4) infinite }
@keyframes cine-grain { 0% { transform: translate(0, 0) } 25% { transform: translate(-3%, 2%) } 50% { transform: translate(2%, -3%) } 75% { transform: translate(-2%, -2%) } 100% { transform: translate(3%, 3%) } }

.cine-scene { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(28px, 5vw, 90px);
  padding: clamp(24px, 5vh, 64px) clamp(24px, 7vw, 120px); max-width: 1500px; margin: 0 auto; transition: opacity .5s ease, transform .9s cubic-bezier(.2, .7, .1, 1), filter .6s ease }

/* l’écran : le film vertical, bords arrondis, halo de néon, légère inclinaison qui suit la souris */
.cine-ecran { position: relative; justify-self: center; height: min(82vh, 860px); aspect-ratio: 9 / 16; border-radius: 34px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 0 0 10px rgba(255, 255, 255, .035), 0 40px 120px -20px rgba(255, 79, 139, .55), 0 0 160px -30px rgba(73, 224, 208, .35);
  transform: perspective(1400px) rotateY(var(--ry, -7deg)) rotateX(var(--rx, 2deg)); transition: transform .5s cubic-bezier(.2, .7, .1, 1); will-change: transform }
.cine-ecran video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block }
.cine-trame { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .045) 0 1px, transparent 1px 3px); mix-blend-mode: soft-light }
.cine-osd { position: absolute; inset: 18px 20px auto; display: flex; justify-content: space-between; font: 400 clamp(20px, 2.4vh, 28px)/1 var(--vhs); letter-spacing: .06em; color: #fff; text-shadow: 2px 0 0 rgba(255, 60, 120, .6), -2px 0 0 rgba(60, 220, 255, .55), 0 0 12px rgba(0, 0, 0, .5) }
.cine-osd .osd-play::after { content: ""; display: inline-block; width: .5em; height: .5em; margin-left: .45em; border-radius: 50%; background: #ff3b4e; box-shadow: 0 0 10px #ff3b4e; animation: cine-clignote 1.2s steps(2) infinite }
@keyframes cine-clignote { 50% { opacity: .15 } }

/* le texte */
.cine-texte { position: relative; max-width: 600px }
.cine-lieu { font: 300 clamp(12px, 1.05vw, 15px)/1 var(--sans); letter-spacing: .5em; color: rgba(255, 255, 255, .78); margin-bottom: clamp(18px, 3vh, 34px) }
.cine-lieu::before { content: ""; display: inline-block; width: 46px; height: 1px; margin-right: 18px; vertical-align: middle; background: rgba(255, 255, 255, .6) }
.cine-logo { margin: 0 0 clamp(10px, 2vh, 22px); line-height: 1; white-space: nowrap }
.cine-logo b { font: 400 clamp(54px, 6.4vw, 104px)/1 var(--script); color: var(--neon-pale); text-shadow: 0 0 6px #fff, 0 0 18px var(--neon), 0 0 42px var(--neon), 0 0 90px rgba(255, 79, 139, .8); animation: cine-neon 5.5s linear infinite }
.cine-logo span { font: 600 clamp(22px, 2.2vw, 36px)/1 var(--serif); color: #FFE9A8; margin-left: .35em; text-shadow: 0 0 14px var(--or), 0 0 34px rgba(255, 201, 77, .8) }
@keyframes cine-neon { 0%, 61%, 63%, 66%, 100% { opacity: 1 } 62% { opacity: .55 } 64.5% { opacity: .75 } }
.cine-titre { font: 600 clamp(34px, 4.1vw, 66px)/1.04 var(--serif); letter-spacing: -.015em; text-wrap: balance; margin: 0 0 clamp(14px, 2.2vh, 24px) }
.cine-titre span { color: var(--neon); text-shadow: 0 0 26px rgba(255, 79, 139, .55) }
.cine-chapo { font: 400 clamp(16px, 1.35vw, 20px)/1.5 var(--sans); color: rgba(255, 255, 255, .82); max-width: 30em; margin: 0 0 clamp(22px, 3.4vh, 38px) }
.cine-actions { display: flex; flex-wrap: wrap; gap: 14px }
.cine-bouton { display: inline-flex; align-items: center; gap: .6em; padding: 17px 30px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; font: 500 clamp(16px, 1.15vw, 18px)/1 var(--sans); letter-spacing: .01em; transition: transform .25s cubic-bezier(.2, .7, .1, 1), box-shadow .25s ease, background .25s ease }
.cine-bouton.plein { color: #fff; background: linear-gradient(180deg, #FF5F93, #E23B6F); box-shadow: 0 14px 40px -10px rgba(255, 79, 139, .9), inset 0 1px 0 rgba(255, 255, 255, .35) }
.cine-bouton.ligne { color: #fff; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px) }
.cine-bouton:hover { transform: translateY(-2px) scale(1.02) }
.cine-bouton.plein:hover { box-shadow: 0 20px 54px -10px rgba(255, 79, 139, 1), inset 0 1px 0 rgba(255, 255, 255, .35) }
.cine-bouton.ligne:hover { background: rgba(255, 255, 255, .14) }
.cine-bouton .rw { font: 400 1.25em/1 var(--vhs); letter-spacing: .02em; color: var(--lagon) }
.cine :focus-visible { outline: 3px solid var(--or); outline-offset: 4px; border-radius: 999px }
.cine-bas { display: flex; align-items: center; gap: 22px; margin-top: clamp(22px, 3.6vh, 40px); color: rgba(255, 255, 255, .7); font: 400 14px/1 var(--sans) }
.cine-son { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 999px; border: 0; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); font: 500 14px/1 var(--sans) }
.cine-son .barres { display: inline-flex; align-items: flex-end; gap: 3px; height: 14px }
.cine-son .barres i { width: 3px; height: 30%; border-radius: 2px; background: var(--lagon) }
.cine-son[aria-pressed="true"] .barres i { animation: cine-egal .7s ease-in-out infinite alternate }
.cine-son[aria-pressed="true"] .barres i:nth-child(2) { animation-delay: -.25s } .cine-son[aria-pressed="true"] .barres i:nth-child(3) { animation-delay: -.5s } .cine-son[aria-pressed="true"] .barres i:nth-child(4) { animation-delay: -.1s }
@keyframes cine-egal { from { height: 20% } to { height: 100% } }
.cine-puces { display: flex; flex-wrap: wrap; gap: 8px 18px; letter-spacing: .02em }
.cine-puces li::before { content: "✦"; margin-right: 8px; color: var(--or) }
.cine-indice { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; font: 400 20px/1 var(--vhs); letter-spacing: .14em; color: rgba(255, 255, 255, .62); animation: cine-indice 1.8s ease-in-out infinite }
@keyframes cine-indice { 50% { transform: translate(-50%, 6px); opacity: .5 } }

/* ---------- le rembobinage : barres de suivi VHS, image qui saute, compteur d’années, cassette qui tourne */
.cine-rembobine { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; align-content: center; gap: 2vh; pointer-events: none; opacity: 0; background: rgba(8, 7, 16, .55) }
.cine-rembobine::before, .cine-rembobine::after { content: ""; position: absolute; left: 0; right: 0; height: 11vh; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .5) 0 2px, rgba(255, 255, 255, 0) 2px 5px), linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .22), rgba(255, 255, 255, 0)); mix-blend-mode: screen; filter: blur(.4px) }
.cine-rembobine::before { top: 18% } .cine-rembobine::after { top: 66%; height: 7vh }
.rw-mode { font: 400 clamp(34px, 5vw, 60px)/1 var(--vhs); letter-spacing: .08em; text-shadow: 3px 0 0 rgba(255, 60, 120, .7), -3px 0 0 rgba(60, 220, 255, .65) }
.rw-annee { font: 400 clamp(150px, 26vw, 360px)/.86 var(--vhs); letter-spacing: .02em; text-shadow: 7px 0 0 rgba(255, 60, 120, .6), -7px 0 0 rgba(60, 220, 255, .55), 0 0 60px rgba(255, 140, 180, .6); font-variant-numeric: tabular-nums }
.rw-cassette { width: min(48vw, 300px); height: auto; filter: drop-shadow(0 12px 40px rgba(255, 79, 139, .5)) }
.rw-cassette .bobine { transform-box: fill-box; transform-origin: center }
.cine.rembobine .cine-rembobine { opacity: 1; transition: opacity .12s linear }
.cine.rembobine .cine-rembobine::before { animation: cine-bande 0.5s linear infinite } .cine.rembobine .cine-rembobine::after { animation: cine-bande 0.36s linear infinite reverse }
.cine.rembobine .rw-cassette .bobine { animation: cine-tourne .28s linear infinite reverse }
.cine.rembobine .cine-scene { animation: cine-saute .16s steps(2) infinite; filter: saturate(.55) contrast(1.15) blur(1px) }
.cine.rembobine .cine-indice { opacity: 0 }
@keyframes cine-bande { from { transform: translateY(-40vh) } to { transform: translateY(60vh) } }
@keyframes cine-tourne { to { transform: rotate(360deg) } }
@keyframes cine-saute { 0% { transform: translate(0, 0) skewX(0) } 50% { transform: translate(-7px, 2px) skewX(-.6deg) } 100% { transform: translate(6px, -2px) skewX(.5deg) } }
/* lecture : l’écran devient blanc rosé un instant, puis s’ouvre sur la télé */
.cine.lecture .rw-mode { color: var(--lagon) }
.cine.lecture .cine-rembobine::before, .cine.lecture .cine-rembobine::after { animation: none; opacity: 0 }
.cine.lecture .cine-scene { animation: none; opacity: 0 }
.cine.lecture .rw-cassette .bobine { animation-duration: 1.6s; animation-direction: normal }
.cine.sortie { transition: clip-path .75s cubic-bezier(.7, 0, .2, 1), opacity .75s ease; clip-path: circle(0% at 50% 46%); opacity: .0 }
.cine { clip-path: circle(150% at 50% 46%) }

/* bouton « Le film » dans le bandeau de la télé */
.revoir-film { margin-left: auto; margin-right: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--cerise); background: transparent; color: var(--cerise-fonce); font: 500 13px/1 var(--sans); letter-spacing: .04em; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s }
.revoir-film:hover { background: var(--cerise); color: #fff }
.bandeau { gap: 0 }

/* ---------- téléphone et écrans étroits : le film occupe tout l’écran, le texte se pose en bas */
@media (max-width: 899px), (max-aspect-ratio: 1 / 1) {
  .cine-scene { display: block; padding: 0; max-width: none }
  .cine-ecran { position: absolute; inset: 0; height: auto; aspect-ratio: auto; border-radius: 0; box-shadow: none; transform: none }
  .cine-ecran::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(11, 10, 20, .28) 0%, rgba(11, 10, 20, 0) 22%, rgba(11, 10, 20, 0) 40%, rgba(11, 10, 20, .7) 66%, rgba(11, 10, 20, .94) 100%) }
  .cine-osd { inset: max(16px, env(safe-area-inset-top)) 18px auto; z-index: 2; font-size: 22px }
  .cine-texte { position: absolute; left: 0; right: 0; bottom: 0; max-width: none; padding: 0 22px calc(58px + env(safe-area-inset-bottom)); text-align: center }
  .cine-lieu { margin-bottom: 12px; letter-spacing: .42em; font-size: 11px } .cine-lieu::before { display: none }
  .cine-logo b { font-size: clamp(42px, 12.4vw, 70px) } .cine-logo span { font-size: clamp(17px, 4.6vw, 26px) }
  .cine-titre { font-size: clamp(30px, 8.6vw, 44px); margin-bottom: 10px }
  .cine-chapo { font-size: 15.5px; margin: 0 auto 18px }
  .cine-actions { flex-direction: column; gap: 10px } .cine-bouton { justify-content: center; padding: 17px 22px; font-size: 17px }
  .cine-bas { justify-content: center; margin-top: 16px } .cine-puces { display: none }
  .cine-indice { font-size: 17px; bottom: max(14px, env(safe-area-inset-bottom)) }
  .revoir-film { padding: 6px 11px; font-size: 12px; margin-right: 8px }
}
@media (max-height: 700px) and (max-width: 899px) { .cine-chapo { display: none } .cine-titre { font-size: 28px } }
@media (prefers-reduced-motion: reduce) {
  .cine::after, .cine-logo b, .cine-indice, .cine-osd .osd-play::after { animation: none }
  .cine.rembobine .cine-scene, .cine.rembobine .cine-rembobine::before, .cine.rembobine .cine-rembobine::after, .cine.rembobine .rw-cassette .bobine { animation: none }
  .cine-ecran { transform: none } .cine.sortie { transition: opacity .3s ease; clip-path: none }
}
