/* Onglet Portfolio : le film dans un téléphone, les images clés, les univers, le mur d'images. */

/* ---------- haut de page ---------- */
.pf-hero { position: relative; overflow: hidden; isolation: isolate; background: #0d0705; color: var(--creme); padding: clamp(34px, 5.5vw, 70px) 0 clamp(34px, 4.5vw, 54px); }
/* Les rangées glissent toujours de droite à gauche, même quand la page s'écrit de droite à gauche. */
.pf-fond { position: absolute; inset: -14% -12%; z-index: -2; display: grid; align-content: center; gap: 14px; transform: rotate(-7deg); opacity: 0.5; direction: ltr; }
.pf-piste { display: flex; gap: 14px; width: max-content; padding-right: 14px; animation: pf-glisse 96s linear infinite; will-change: transform; }
.pf-piste:nth-child(even) { animation-direction: reverse; animation-duration: 120s; }
.pf-piste img { flex: none; width: clamp(130px, 17vw, 210px); aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; }
@keyframes pf-glisse { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.pf-voile { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(13, 7, 5, 0.97) 0%, rgba(13, 7, 5, 0.9) 40%, rgba(13, 7, 5, 0.62) 72%, rgba(13, 7, 5, 0.74) 100%),
  linear-gradient(0deg, #0d0705 0%, rgba(13, 7, 5, 0.86) 26%, transparent 52%, rgba(13, 7, 5, 0.7) 100%); }

.pf-hero-grille { width: min(1120px, 100% - 36px); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(250px, 330px); align-items: center; gap: clamp(28px, 6vw, 84px); }
.pf-hero h1 { font-size: clamp(38px, 5.4vw, 74px); line-height: 1.03; letter-spacing: -0.03em; text-shadow: 0 2px 34px rgba(13, 7, 5, 0.9); }
.pf-hero h1 em { display: block; font-style: normal; text-shadow: none; background: linear-gradient(90deg, var(--jaune), var(--orange) 30%, var(--rose) 58%, var(--violet) 80%, var(--jaune)); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: pf-brille 9s ease-in-out infinite alternate; }
@keyframes pf-brille { to { background-position: 100% 0; } }
.pf-hero .hero-phrase { max-width: 54ch; }
.pf-chiffres li span { display: block; max-width: 16ch; line-height: 1.3; }

/* ---------- le téléphone ---------- */
@property --pf-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.pf-telephone { position: relative; isolation: isolate; justify-self: center; width: 100%; max-width: 330px; animation: pf-flotte 7s ease-in-out infinite; }
.pf-telephone::before, .pf-telephone::after { content: ""; position: absolute; z-index: -1; border-radius: 46px; background: conic-gradient(from var(--pf-angle), var(--jaune), var(--orange), var(--rose), var(--violet), var(--jaune)); animation: pf-tourne 7s linear infinite; }
.pf-telephone::before { inset: -3px; }
.pf-telephone::after { inset: -7%; filter: blur(48px); opacity: 0.6; }
@keyframes pf-tourne { to { --pf-angle: 360deg; } }
@keyframes pf-flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.pf-ecran { position: relative; aspect-ratio: 9 / 16; padding: 9px; border-radius: 44px; background: #050302; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7); }
.pf-ecran video { width: 100%; height: 100%; object-fit: cover; border-radius: 35px; background: #000; cursor: pointer; }
.pf-son { position: absolute; right: 22px; bottom: 22px; width: 50px; height: 50px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(13, 7, 5, 0.72); backdrop-filter: blur(8px); color: var(--creme); transition: background 0.15s, color 0.15s, transform 0.15s; }
.pf-son:hover { background: var(--jaune); color: var(--encre); transform: scale(1.08); }
.pf-son[aria-pressed="true"] { background: var(--jaune); color: var(--encre); }
/* Tant que le film est muet, un anneau pulse autour du bouton : il invite à toucher pour entendre. */
.pf-son[aria-pressed="false"]::after { content: ""; position: absolute; inset: -5px; border: 2px solid var(--jaune); border-radius: 50%; pointer-events: none; animation: pf-appel 1.9s ease-out infinite; }
@keyframes pf-appel { from { opacity: 0.9; transform: scale(0.88); } to { opacity: 0; transform: scale(1.55); } }
.pf-son .pf-son-actif, .pf-son[aria-pressed="true"] .pf-son-coupe { display: none; }
.pf-son[aria-pressed="true"] .pf-son-actif { display: block; }

/* ---------- les images clés du film ---------- */
.pf-chaine-bloc { width: min(1120px, 100% - 36px); margin: clamp(38px, 5vw, 62px) auto 0; }
.pf-chaine-titre { font: 700 13px var(--texte); letter-spacing: 0.14em; text-transform: uppercase; color: var(--jaune); }
.pf-chaine { position: relative; list-style: none; padding: 4px; margin: 12px -4px 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.pf-plan { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: start; }
.pf-plan-image { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--encre-2); transition: box-shadow 0.25s, transform 0.25s; }
.pf-plan-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.6) brightness(0.66); transition: filter 0.35s, transform 0.5s; }
.pf-plan-image::after { content: ""; position: absolute; inset: auto auto 0 0; height: 5px; width: calc(var(--avance, 0) * 100%); background: var(--anneau); }
.pf-plan:hover .pf-plan-image img, .pf-plan:focus-visible .pf-plan-image img, .pf-plan[aria-current="true"] .pf-plan-image img { filter: none; transform: scale(1.05); }
.pf-plan[aria-current="true"] .pf-plan-image { box-shadow: 0 0 0 3px var(--jaune), 0 16px 34px rgba(0, 0, 0, 0.5); transform: translateY(-4px); }
.pf-plan-nom { display: block; margin-top: 9px; font: 700 14px/1.25 var(--titre); color: rgba(255, 248, 238, 0.86); }
.pf-plan-nom small { display: block; margin-bottom: 2px; font: 700 11px var(--texte); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 248, 238, 0.5); }
.pf-plan[aria-current="true"] .pf-plan-nom, .pf-plan[aria-current="true"] .pf-plan-nom small { color: var(--jaune); }
.pf-chaine-note { margin-top: 16px; max-width: 78ch; font-size: 15px; color: rgba(255, 248, 238, 0.72); }

/* ---------- bandes ---------- */
.pf-bande { overflow: hidden; }
.pf-bande h2 em { font-style: normal; background: linear-gradient(90deg, var(--orange), var(--rose) 55%, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pf-clair { color: rgba(255, 248, 238, 0.8); }
.pf-attend { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.pf-attend.pf-vu { opacity: 1; transform: none; }

/* ---------- les univers ---------- */
.pf-univers-rail { --marge-rail: max(18px, calc((100% - 1120px) / 2)); display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--marge-rail); margin-top: 30px; padding: 10px var(--marge-rail) 20px; scrollbar-width: none; }
.pf-univers-rail::-webkit-scrollbar { display: none; }
/* Écran large : toutes les cartes se voient d'un coup, sur deux rangées, sans défilement. */
@media (min-width: 1000px) {
  .pf-univers-rail { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: visible; width: min(1120px, 100% - 36px); margin-inline: auto; padding-inline: 0; }
  .pf-univers { aspect-ratio: 6 / 7; }
}
.pf-univers { position: relative; isolation: isolate; flex: 0 0 136px; aspect-ratio: 3 / 4; padding: 0; border: 0; border-radius: 20px; overflow: hidden; background: var(--encre-2); color: #fff; text-align: start; scroll-snap-align: start; transition: transform 0.2s, box-shadow 0.2s; }
.pf-univers img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.pf-univers::after { content: ""; position: absolute; inset: 35% 0 0 0; z-index: -1; background: linear-gradient(180deg, transparent, rgba(12, 7, 4, 0.9)); }
.pf-univers:hover { transform: translateY(-4px); }
.pf-univers:hover img { transform: scale(1.08); }
.pf-univers[aria-pressed="true"] { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--creme), 0 0 0 6px var(--orange), 0 18px 30px rgba(43, 26, 18, 0.3); }
.pf-univers-nom { position: absolute; inset: auto 11px 10px 11px; font: 700 14.5px/1.2 var(--titre); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.pf-univers-nom small { display: block; margin-top: 2px; font: 600 12px var(--texte); opacity: 0.82; }

/* ---------- le mur d'images ---------- */
.pf-compte { width: min(1120px, 100% - 36px); margin: 4px auto 14px; }
.pf-mur { width: min(1420px, 100% - 24px); margin-inline: auto; columns: 5 210px; column-gap: 12px; }
.pf-tuile { position: relative; display: block; width: 100%; margin: 0 0 12px; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: var(--sable); color: #fff; text-align: start; break-inside: avoid; animation: pf-arrive 0.55s both; animation-delay: calc(var(--rang, 0) * 28ms); }
@keyframes pf-arrive { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
.pf-tuile img { width: 100%; height: auto; transition: transform 0.6s ease; }
.pf-tuile:hover img, .pf-tuile:focus-visible img { transform: scale(1.06); }
.pf-tuile-nom { position: absolute; inset: auto 0 0 0; padding: 40px 13px 11px; font: 700 14px/1.25 var(--titre); background: linear-gradient(180deg, transparent, rgba(12, 7, 4, 0.88)); opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s; }
.pf-tuile-nom small { display: block; margin-top: 2px; font: 600 11.5px var(--texte); letter-spacing: 0.06em; text-transform: uppercase; color: var(--jaune); }
.pf-tuile:hover .pf-tuile-nom, .pf-tuile:focus-visible .pf-tuile-nom { opacity: 1; transform: none; }

/* ---------- Adrénaline : un deuxième téléphone, à côté de son texte ---------- */
.pf-adre { background: radial-gradient(900px 520px at 22% 50%, rgba(255, 90, 31, 0.28), transparent 70%), radial-gradient(700px 420px at 90% 10%, rgba(139, 60, 255, 0.22), transparent 70%), #0d0705; }
.pf-adre-grille { width: min(1120px, 100% - 36px); margin-inline: auto; display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); align-items: center; gap: clamp(28px, 7vw, 96px); }
.pf-adre h2 { color: var(--creme); }
.pf-adre-points { list-style: none; margin: 22px 0 26px; padding: 0; display: grid; gap: 10px; color: rgba(255, 248, 238, 0.86); font-size: 16px; }
.pf-adre-points li { padding-inline-start: 16px; border-inline-start: 3px solid var(--orange); }
.pf-adre-points b { color: var(--jaune); font: 800 20px var(--titre); margin-inline-end: 4px; }
@media (max-width: 860px) {
  .pf-adre-grille { grid-template-columns: 1fr; gap: 26px; }
  .pf-adre .pf-telephone { order: 0; max-width: min(78vw, calc((100svh - 160px) * 9 / 16), 340px); margin-bottom: 0; }
  .pf-adre-texte .hero-actions { display: grid; gap: 10px; }
  .pf-adre-texte .hero-actions .bouton { width: 100%; justify-content: center; }
}

/* ---------- le vrai saut : un écran de cinéma sur toute la largeur ---------- */
.pf-saut { background: radial-gradient(1000px 520px at 50% 66%, rgba(255, 194, 51, 0.17), transparent 70%), #0d0705; text-align: center; }
.pf-saut h2 { max-width: none; margin-inline: auto; color: var(--creme); font-size: clamp(34px, 5vw, 62px); }
.pf-saut .chapeau { margin-inline: auto; }
.pf-cinema { position: relative; isolation: isolate; width: min(1180px, 100% - 28px); margin: 36px auto 0; }
.pf-cinema::before, .pf-cinema::after { content: ""; position: absolute; z-index: -1; border-radius: 30px; background: conic-gradient(from var(--pf-angle), var(--jaune), var(--orange), var(--rose), var(--violet), var(--jaune)); animation: pf-tourne 7s linear infinite; }
/* --pf-sous-cadre : la hauteur prise sous le cadre par le gros bouton, sur téléphone. Le contour lumineux s'arrête au cadre. */
.pf-cinema::before { inset: -3px -3px calc(var(--pf-sous-cadre, 0px) - 3px); }
.pf-cinema::after { inset: -3% -3% calc(var(--pf-sous-cadre, 0px) - 3%); filter: blur(56px); opacity: 0.5; }
/* Le film porte des bandes noires en haut et en bas : le cadre en 2,35 les laisse hors de l'écran. */
.pf-cinema-cadre { position: relative; aspect-ratio: 2.35 / 1; border-radius: 28px; overflow: hidden; background: #000; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7); }
.pf-cinema-cadre video { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
/* Le gros bouton est dans un coin : les textes du film sont au milieu, en bas de l'image. */
.pf-cinema-jouer { position: absolute; inset-inline-start: 22px; bottom: 22px; display: inline-flex; align-items: center; gap: 10px; padding: 13px 26px; border: 0; border-radius: 999px; background: var(--jaune); color: var(--encre); font: 800 16px var(--titre); white-space: nowrap; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); transition: transform 0.15s, opacity 0.25s, visibility 0.25s; }
.pf-cinema-jouer:hover { transform: scale(1.06); }
/* Le son est en route : le gros bouton s'efface, le petit bouton rond reste pour couper. */
.pf-avec-son .pf-cinema-jouer { opacity: 0; visibility: hidden; }
.pf-saut-faits { list-style: none; width: min(1180px, 100% - 28px); margin: 34px auto 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pf-saut-faits li { padding: 18px 12px; border-radius: 18px; background: rgba(255, 248, 238, 0.06); border: 1px solid rgba(255, 248, 238, 0.14); color: rgba(255, 248, 238, 0.78); font-size: 14.5px; line-height: 1.35; }
.pf-saut-faits b { display: block; margin-bottom: 4px; font: 800 clamp(24px, 3vw, 36px)/1.1 var(--titre); background: linear-gradient(90deg, var(--jaune), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 860px) {
  .pf-cinema .pf-son { top: 14px; right: 14px; width: 46px; height: 46px; }
  .pf-saut-faits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 560px) {
  /* Écran étroit : un cadre plus haut, pour que le saut prenne de la place. L'image est agrandie de 1080 / 816
     pour que ses bandes noires sortent du cadre ; ses côtés sortent aussi. */
  .pf-cinema { width: calc(100% - 20px); }
  .pf-cinema-cadre { aspect-ratio: 16 / 9; border-radius: 22px; }
  .pf-cinema-cadre video { transform: scale(1.33); }
  .pf-cinema::before, .pf-cinema::after { border-radius: 24px; }
  /* Le gros bouton passe sous le cadre, sur toute la largeur. */
  .pf-cinema { --pf-sous-cadre: 66px; }
  .pf-cinema-jouer { position: static; width: 100%; height: 50px; justify-content: center; margin-top: 16px; padding-block: 0; }
  .pf-saut-faits { margin-top: 22px; }
}

/* ---------- les autres films ---------- */
.pf-films { margin-top: 34px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 250px)); gap: 14px; }
.pf-films .tuile { border-radius: 18px; }

/* ---------- comment c'est fait ---------- */
.pf-vrai { margin-top: 26px; background: var(--carte); border: 1.5px solid var(--trait); border-radius: 22px; padding: 26px 28px; }
.pf-vrai h3 { font-size: 22px; margin-bottom: 12px; }
.pf-vrai ul { padding-inline-start: 20px; display: grid; gap: 8px; color: var(--brun); font-size: 15.5px; }
.pf-suite { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

@media (max-width: 860px) {
  .pf-hero-grille { grid-template-columns: 1fr; }
  .pf-chaine { display: flex; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin: 14px -18px 0; padding: 10px 18px 6px; scroll-padding-inline: 18px; }
  .pf-chaine::-webkit-scrollbar { display: none; }
  .pf-chaine li { flex: 0 0 136px; scroll-snap-align: center; }

  /* Sur téléphone, le film passe juste sous le titre et remplit l'écran ; le texte vient après. */
  .pf-hero { padding-top: 22px; }
  .pf-hero-texte { display: contents; }
  .pf-hero-grille { gap: 0; justify-items: stretch; }
  .pf-hero .pastille { order: 1; justify-self: start; margin-bottom: 14px; padding: 6px 12px; font-size: 11px; letter-spacing: 0.06em; }
  .pf-hero h1 { order: 2; margin-bottom: 22px; font-size: clamp(33px, 9.6vw, 54px); }
  .pf-telephone { order: 3; justify-self: center; max-width: min(80vw, calc((100svh - 200px) * 9 / 16), 360px); margin-bottom: 34px; }
  .pf-hero .hero-phrase { order: 4; }
  .pf-hero .hero-actions { order: 5; flex-direction: column; margin-top: 22px; }
  .pf-hero .hero-actions .bouton { width: 100%; justify-content: center; text-align: center; }
  .pf-chiffres { order: 6; }
  .pf-son { top: 24px; bottom: auto; width: 54px; height: 54px; }
  /* Les images du fond se voient : elles s'éclaircissent entre le titre et le bas de page. */
  .pf-fond { opacity: 0.85; }
  .pf-piste img { width: 150px; }
  .pf-voile { background: linear-gradient(180deg, rgba(13, 7, 5, 0.78) 0%, rgba(13, 7, 5, 0.42) 30%, rgba(13, 7, 5, 0.84) 50%, rgba(13, 7, 5, 0.93) 72%, #0d0705 100%); }
}
@media (max-width: 560px) {
  .pf-mur { columns: 2; column-gap: 8px; width: calc(100% - 16px); }
  .pf-tuile { margin-bottom: 8px; border-radius: 12px; }
  /* Les univers : cartes plus grandes, la place du contour de la carte choisie est réservée en haut. */
  .pf-univers-rail { padding-top: 20px; margin-top: 14px; }
  .pf-univers { flex-basis: 144px; }
  .pf-compte { font-size: 15px; }
  /* Les quatre chiffres tiennent sur une ligne, sous un filet. */
  .pf-chiffres { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255, 248, 238, 0.16); }
  .pf-chiffres b { font-size: 31px; }
  .pf-chiffres li span { max-width: none; font-size: 11.5px; line-height: 1.25; }
  /* Les autres films et les quatre étapes se feuillettent du pouce, au lieu de s'empiler sur des écrans entiers. */
  .pf-films, .pf-bande .forces { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -18px; padding: 6px 18px 16px; scroll-padding-inline: 18px; }
  .pf-films::-webkit-scrollbar, .pf-bande .forces::-webkit-scrollbar { display: none; }
  .pf-films .tuile { flex: 0 0 68vw; scroll-snap-align: center; border-radius: 22px; }
  .pf-bande .forces article { flex: 0 0 82%; scroll-snap-align: center; }
  .pf-vrai { padding: 22px 18px; }
}
/* Écran tactile : pas de survol, le titre se lit dans la fiche de l'image. */
@media (hover: none) {
  .pf-tuile-nom { display: none; }
}
