/* ==========================================================================
   STUDIO 64 · Réalisations (src/pages/realisations.html)
   Chaque site dans un écran : la capture pleine page défile au survol (toute
   seule sur un écran tactile), la vidéo du hero joue à sa vraie place
   (portfolio.js). À côté : ce qui le rend unique, un chiffre, sa palette ;
   dessous, sa fiche « Côté design / Côté technique ».
   ========================================================================== */

/* ── En-tête ─────────────────────────────────────────────────────────── */
.pf-hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 112px) 0 clamp(48px, 6vw, 80px); }
.pf-hero__grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.pf-hero .lead { margin-top: 26px; }

.pf-collage { position: relative; aspect-ratio: 1 / .86; }
.pf-collage__cercle { position: absolute; right: -4%; top: -2%; width: 74%; aspect-ratio: 1; border-radius: 50%; border: clamp(30px, 4.4vw, 54px) solid var(--brick); opacity: .13; }
.pf-collage__barre { position: absolute; left: 4%; bottom: 2%; width: 13%; height: 58%; background: var(--ochre); opacity: .32; transform: skewX(-20deg); }
.pf-mini { position: absolute; margin: 0; width: 60%; overflow: hidden; border-radius: 10px; background: var(--cream-hi); box-shadow: 0 44px 70px -42px rgba(38, 37, 46, .6), 0 0 0 1px rgba(52, 52, 64, .1); animation: pfFlotte 9s ease-in-out infinite; }
.pf-mini__barre { display: flex; align-items: center; gap: 5px; padding: 7px 10px; background: var(--ink); }
.pf-mini__barre i { width: 7px; height: 7px; border-radius: 50%; background: rgba(247, 235, 212, .35); }
.pf-mini__barre span { margin-left: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 600 .66rem var(--f-body); color: rgba(247, 235, 212, .7); }
.pf-mini img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 0; }
.pf-mini--1 { left: 0; top: 4%; rotate: -5deg; animation-delay: -2s; }
.pf-mini--2 { right: 0; top: 13%; rotate: 4deg; animation-delay: -5s; }
.pf-mini--3 { left: 19%; bottom: 3%; width: 64%; rotate: -1deg; z-index: 2; }
@keyframes pfFlotte { 50% { translate: 0 -10px; } }

.pf-chiffres { display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(48px, 6vw, 72px) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.pf-chiffres li { padding: 22px 20px 0 0; }
.pf-chiffres li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.pf-chiffres b { display: block; font: 800 clamp(2.2rem, 4vw, 3.2rem)/1 var(--f-display); letter-spacing: -.04em; color: var(--ink); }
.pf-chiffres li:first-child b { color: var(--brick); }
.pf-chiffres span { display: block; margin-top: 8px; font: 600 .78rem var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }

.pf-sommaire { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; }
.pf-sommaire > span { flex-basis: 100%; margin: 0 0 4px; font: 700 .72rem var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.pf-sommaire a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px 0 6px; border: 1px solid var(--line-strong); border-radius: 99px; text-decoration: none; font: 600 .86rem var(--f-display); color: var(--ink); transition: background .2s, color .2s, border-color .2s; }
.pf-sommaire a b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--cream); font-size: .7rem; }
.pf-sommaire a:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.pf-sommaire a:hover b { background: var(--ochre); color: var(--ink-deep); }

/* ── Les projets ─────────────────────────────────────────────────────── */
.pf-projets { padding-top: clamp(40px, 6vw, 80px); }
.pf-liste { display: flex; flex-direction: column; gap: clamp(88px, 11vw, 160px); }
.pf-cas { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 76px); align-items: center; scroll-margin-top: 110px; }
.pf-cas--inverse .pf-ecran { order: 2; }

/* L'écran : la page entière défile dans la fenêtre */
.pf-ecran { position: relative; padding: 10px 10px 0; border-radius: 16px 16px 10px 10px; background: var(--ink); box-shadow: 0 60px 90px -60px rgba(38, 37, 46, .75), 0 0 0 1px rgba(38, 37, 46, .2); outline-offset: 6px; }
.pf-cas:nth-child(3n+1) .pf-ecran { border-top-left-radius: var(--corner); }
.pf-ecran__barre { display: flex; align-items: center; gap: 6px; padding: 4px 8px 11px; }
.pf-ecran__barre i { width: 9px; height: 9px; border-radius: 50%; background: rgba(247, 235, 212, .3); }
.pf-ecran__barre i:first-child { background: var(--brick); } .pf-ecran__barre i:nth-child(2) { background: var(--ochre); }
.pf-ecran__barre span { display: inline-flex; align-items: center; gap: 7px; margin: 0 auto; padding: 5px 14px; border-radius: 99px; background: rgba(247, 235, 212, .09); font: 600 .74rem var(--f-body); letter-spacing: .01em; color: rgba(247, 235, 212, .78); }
.pf-ecran__barre svg { width: 11px; height: 11px; color: var(--ochre); }
.pf-vue { position: relative; aspect-ratio: 16 / 10.4; overflow: hidden; border-radius: 6px 6px 2px 2px; background: var(--cream-hi); container-type: size; }
.pf-page { position: absolute; inset: 0 0 auto; transition: transform 1.3s var(--ease); will-change: transform; }
.pf-page img { display: block; width: 100%; height: auto; }
.pf-video { position: absolute; left: var(--x); top: var(--y); width: var(--l); height: var(--h); object-fit: cover; border-radius: var(--r, 0); background: transparent; }
.pf-ecran:hover .pf-page, .pf-ecran:focus-visible .pf-page { transform: translateY(calc(-100% + 100cqh)); transition: transform var(--duree, 10s) cubic-bezier(.32, .12, .4, 1); }

.pf-astuce { position: absolute; right: 14px; bottom: 14px; margin: 0; padding: 8px 14px 8px 12px; border-radius: 99px; background: rgba(38, 37, 46, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font: 600 .74rem var(--f-display); color: var(--cream); pointer-events: none; transition: opacity .4s, translate .4s var(--ease); }
.pf-astuce::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--ochre); box-shadow: 0 0 0 3px rgba(213, 163, 89, .3); vertical-align: 1px; animation: pfPouls 2.2s ease-in-out infinite; }
.pf-astuce__doigt { display: none; }
.pf-ecran:hover .pf-astuce, .pf-ecran:focus-visible .pf-astuce { opacity: 0; translate: 0 8px; }
@keyframes pfPouls { 50% { box-shadow: 0 0 0 7px rgba(213, 163, 89, 0); } }

/* Écran tactile : la page défile toute seule, en aller-retour */
@media (hover: none) {
  .pf-page { animation: pfDefile calc(var(--duree, 10s) * 2.6) cubic-bezier(.45, .05, .55, .95) infinite alternate; }
  .pf-astuce__souris { display: none; } .pf-astuce__doigt { display: inline; }
}
@keyframes pfDefile { 0%, 10% { transform: translateY(0); } 90%, 100% { transform: translateY(calc(-100% + 100cqh)); } }

/* Le texte */
.pf-num { display: flex; align-items: center; gap: 16px; margin: 0; }
.pf-num b { font: 800 clamp(3.2rem, 6vw, 4.8rem)/.9 var(--f-display); letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.pf-num span { font: 700 .74rem/1.4 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--brick); }
.pf-txt h2 { margin-top: 18px; font: 800 clamp(1.9rem, 3.3vw, 2.75rem)/1.06 var(--f-display); letter-spacing: -.035em; color: var(--ink); }
.pf-resume { margin: 14px 0 0; font-size: 1.06rem; line-height: 1.62; color: var(--ink-soft); max-width: 36em; }
.pf-unique { margin-top: 28px; }
.pf-label { display: flex; align-items: center; gap: 12px; margin: 0; font: 700 .72rem var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.pf-label::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.pf-atouts { display: grid; gap: 16px; margin: 16px 0 0; padding: 0; list-style: none; }
.pf-atouts li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; align-items: start; }
.pf-atouts i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--cream-hi); border: 1px solid var(--line); color: var(--brick); transition: background .25s, color .25s, rotate .35s var(--ease); }
.pf-atouts li:hover i { background: var(--brick); color: var(--cream); rotate: -6deg; }
.pf-atouts svg { width: 20px; height: 20px; }
.pf-atouts b { display: block; font: 700 1rem/1.3 var(--f-display); color: var(--ink); }
.pf-atouts span { display: block; margin-top: 4px; font-size: .94rem; line-height: 1.55; color: var(--ink-soft); }

.pf-pied { display: flex; align-items: stretch; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.pf-chiffre { display: flex; align-items: center; gap: 14px; margin: 0; padding: 14px 18px; border-radius: 4px 18px 18px 18px; background: var(--ink); color: var(--cream); flex: 1 1 260px; }
.pf-chiffre b { font: 800 1.9rem/1 var(--f-display); letter-spacing: -.03em; color: var(--ochre); white-space: nowrap; }
.pf-chiffre span { font-size: .86rem; line-height: 1.4; color: rgba(247, 235, 212, .82); }
.pf-palette { display: flex; align-items: center; gap: 0; padding: 10px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--cream-hi); }
.pf-palette span { margin-right: 12px; font: 700 .66rem/1.2 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); max-width: 6em; }
.pf-palette i { width: 30px; height: 30px; margin-left: -8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--cream-hi), inset 0 0 0 1px rgba(0, 0, 0, .08); transition: translate .3s var(--ease); }
.pf-palette i:first-of-type { margin-left: 0; }
.pf-palette:hover i { translate: calc(var(--n, 0) * 1px) 0; }
.pf-palette:hover i:nth-of-type(2) { --n: 6; } .pf-palette:hover i:nth-of-type(3) { --n: 12; } .pf-palette:hover i:nth-of-type(4) { --n: 18; }
.pf-palette:hover { padding-right: 32px; transition: padding .3s var(--ease); }

.pf-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; }
.pf-tags span { padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line-strong); font: 600 .74rem var(--f-display); color: var(--ink-soft); }
.pf-lien { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding-bottom: 3px; border-bottom: 2px solid var(--brick); color: var(--ink); font: 700 .95rem var(--f-display); text-decoration: none; }
.pf-lien svg { width: 16px; height: 16px; color: var(--brick); transition: translate .25s var(--ease); }
.pf-lien:hover { color: var(--brick); }
.pf-lien:hover svg { translate: 2px -2px; }

/* La fiche : le design et la technique, côte à côte sous l'écran et le texte */
.pf-fiche { grid-column: 1 / -1; order: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pf-fiche__bloc { position: relative; overflow: hidden; padding: clamp(24px, 2.6vw, 34px); border-radius: 4px 22px 22px 22px; }
.pf-fiche__bloc--design { background: var(--cream-hi); border: 1px solid var(--line); }
.pf-fiche__bloc--tech { background-color: var(--ink); background-image: linear-gradient(rgba(247, 235, 212, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(247, 235, 212, .045) 1px, transparent 1px); background-size: 26px 26px; }
.pf-fiche__bloc::after { position: absolute; right: 14px; bottom: -.16em; font: 800 clamp(5rem, 8vw, 7.5rem)/1 var(--f-serif); letter-spacing: -.04em; pointer-events: none; }
.pf-fiche__bloc--design::after { content: "Aa"; content: "Aa" / ""; font-style: italic; color: var(--brick); opacity: .08; }
.pf-fiche__bloc--tech::after { content: "</>"; content: "</>" / ""; font-family: var(--f-display); color: var(--ochre); opacity: .1; }
.pf-fiche h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font: 700 .72rem var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.pf-fiche h3 i { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--brick); color: var(--cream); transition: rotate .4s var(--ease); }
.pf-fiche h3 svg { width: 16px; height: 16px; }
.pf-fiche__bloc:hover h3 i { rotate: -12deg; }
.pf-fiche__bloc--tech h3 { color: var(--cream); }
.pf-fiche__bloc--tech h3 i { background: var(--ochre); color: var(--ink-deep); }
.pf-fiche dl { position: relative; z-index: 1; margin: 0; }
.pf-fiche dl > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.pf-fiche dt { font: 700 .86rem/1.5 var(--f-display); color: var(--brick); }
.pf-fiche dd { margin: 0; font-size: .93rem; line-height: 1.55; color: var(--ink-soft); }
.pf-fiche__bloc--tech dl > div { border-top-color: var(--line-dark); }
.pf-fiche__bloc--tech dt { color: var(--ochre); }
.pf-fiche__bloc--tech dd { color: rgba(247, 235, 212, .8); }

/* ── Ce qui nous différencie ─────────────────────────────────────────── */
.pf-raisons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line-dark); border-radius: var(--corner) var(--radius) var(--radius) var(--radius); overflow: hidden; background: var(--ink); }
.pf-raisons li { position: relative; display: flex; flex-direction: column; gap: 18px; padding: clamp(26px, 3vw, 38px); background: var(--ink); outline: 1px solid var(--line-dark); transition: background .3s; }
.pf-raisons li:hover { background: #3B3A46; }
.pf-raisons i { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ochre); color: var(--ochre); }
.pf-raisons svg { width: 22px; height: 22px; }
.pf-raisons p { margin: 0; }
.pf-raisons b { display: block; font: 700 1.15rem/1.3 var(--f-display); color: var(--cream); }
.pf-raisons span { display: block; margin-top: 10px; font-size: .96rem; line-height: 1.6; color: rgba(247, 235, 212, .74); }
.pf-raisons .link { align-self: flex-start; margin-top: auto; }
.pf-raisons__coeur { background: var(--brick) !important; }
.pf-raisons__coeur i { border-color: var(--cream); color: var(--cream); }
.pf-raisons__coeur span { color: rgba(247, 235, 212, .88); }
.pf-raisons__coeur .link { color: var(--cream); }

/* ── Écrans plus étroits ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .pf-cas, .pf-cas--inverse { grid-template-columns: minmax(0, 1fr); }
  .pf-cas--inverse .pf-ecran { order: 0; }
  .pf-txt { max-width: 720px; }
  .pf-raisons { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .pf-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .pf-collage { max-width: 560px; width: 100%; margin: 8px auto 0; }
  .pf-fiche { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .pf-chiffres { grid-template-columns: repeat(2, 1fr); }
  .pf-chiffres li:nth-child(3) { padding-left: 0; border-left: 0; }
  .pf-chiffres li:nth-child(n+3) { margin-top: 18px; }
  .pf-raisons { grid-template-columns: minmax(0, 1fr); border-radius: 30px var(--radius) var(--radius) var(--radius); }
  .pf-ecran { padding: 7px 7px 0; border-radius: 12px 12px 8px 8px; }
  .pf-cas:nth-child(3n+1) .pf-ecran { border-top-left-radius: 30px; }
  .pf-ecran__barre { padding: 3px 4px 8px; }
  .pf-ecran__barre span { padding: 4px 10px; font-size: .68rem; }
  .pf-vue { aspect-ratio: 4 / 3.4; }
  .pf-astuce { right: 10px; bottom: 10px; font-size: .68rem; }
  .pf-sommaire { display: grid; grid-template-columns: 1fr 1fr; }
  .pf-sommaire > span { grid-column: 1 / -1; }
  .pf-sommaire a { min-height: 46px; padding: 6px 10px 6px 6px; border-radius: 14px; font-size: .8rem; line-height: 1.2; }
  .pf-sommaire a b { flex: none; }
  .pf-fiche dl > div { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 12px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-mini, .pf-page, .pf-astuce::before { animation: none !important; }
  .pf-page, .pf-ecran:hover .pf-page, .pf-ecran:focus-visible .pf-page { transition: none; }
  .pf-ecran:hover .pf-page, .pf-ecran:focus-visible .pf-page { transform: none; }
  /* Sans animation, la page se parcourt à la molette ou au doigt. */
  .pf-vue { overflow-y: auto; overscroll-behavior: contain; }
  .pf-page { position: relative; }
  .pf-astuce { display: none; }
  .pf-video { display: none; }
}
