/* Only the new portfolio chapter owns this full-screen surface. */
#portfolio-embedded{position:fixed;inset:0;z-index:8;background:#d9c4a3 url('/assets/portfolio/01-fond-racks-vides-g1.webp') center/cover no-repeat}
#portfolio-embedded[hidden]{display:none!important}
#portfolio-frame{display:block;width:100%;height:100%;border:0;background:transparent}
#portfolio-loading{position:absolute;inset:0;display:flex;gap:16px;align-items:center;justify-content:center;background:#decbb7b8;color:#132c37;font:500 14px/1.5 sans-serif;backdrop-filter:blur(3px);z-index:2}
#portfolio-loading[hidden]{display:none!important}
/* Shown only after 400 ms so a short wait never flashes the badge. */
#portfolio-loading:not([hidden]){animation:portfolio-loading-appear .2s ease .4s both}
@keyframes portfolio-loading-appear{from{opacity:0}to{opacity:1}}
#portfolio-loading button{padding:9px 14px;border:1px solid currentColor;border-radius:5px;background:#ffffffb5;color:inherit;font:inherit}
body.portfolio-v10-visible #portfolio-hit-area{display:none!important}
/* 2026-10-13 : le titre « Portfolio. » reste affiché avec les planches (demande de Vincent). #story ne garde que le h2 du
   chapitre, calé en haut à gauche dans le ciel une fois le portfolio ouvert ; les autres blocs du chapitre historique sont
   retirés pour ne pas capter clics ni molette au-dessus de l'iframe. Pendant le relevé (.title-preview) le titre garde la
   place validée le 2026-10-12 (environ 15 % de l'écran sous le haut de #story, 19 % sur téléphone) puis glisse vers sa
   place de chapitre en 0,7 s. En stable il prend la couleur du header sur ce fond clair ; il reste affiché quand une
   fiche s'ouvre (choix de Vincent du 2026-10-13) et ne s'efface que sous le menu des chapitres. */
body.portfolio-v10-visible #story{pointer-events:none;overflow:visible}
body.portfolio-v10-visible .portfolio-chapter>:not(#portfolio-title){display:none!important}
body[data-chapter=portfolio] #story .portfolio-chapter{justify-content:flex-start;padding-top:0;transition:opacity .24s ease,padding-top .7s ease}
body[data-chapter=portfolio] #story .portfolio-chapter.title-preview{padding-top:15svh;transition:none}
@media(max-width:700px){body[data-chapter=portfolio] #story .portfolio-chapter.title-preview{padding-top:19svh}}
body[data-chapter=portfolio] #portfolio-title{transition:opacity .2s ease,color .4s ease,text-shadow .4s ease}
body.portfolio-v10-visible #portfolio-title{color:#173f50;text-shadow:0 1px 12px #ffffff99}
body.portfolio-v10-visible:has(.chapters.open) #story{opacity:0;transition:opacity .25s ease}
body.portfolio-v10-visible .header,body.portfolio-v10-visible .film-controls{color:#173f50;text-shadow:0 1px 12px #ffffff99}
body.portfolio-v10-visible .header-links a:hover{color:#184e60}
body.portfolio-v10-visible .chapters a{color:#173f50;text-shadow:0 1px 9px #ffffffb0}
body.portfolio-v10-visible .chapters a[aria-current]{color:#092d40}
body.portfolio-v10-visible .film-legal-link{color:inherit}
body.portfolio-v10-visible #transition-progress{display:none!important}
body.portfolio-team-handoff .stage>#team-background{transition:none!important}
/* The iframe's end veil already equals the Team shade: swap without re-fading it from the journey's 24 %. */
body.portfolio-team-handoff .shade{transition:none!important}
/* Paint the team photograph under the iframe while the clip plays, so its first raster is not paid at the swap. */
body.team-photo-prewarm .stage>#team-background{opacity:1;transition:none}
/* The iframe owns its company dialog; parent navigation must stay out of it. */
body.portfolio-profile-open .chapters,body.portfolio-profile-open .header,body.portfolio-profile-open .film-controls{visibility:hidden!important;opacity:0!important;pointer-events:none!important}
@media(max-width:700px){body.portfolio-v10-visible .chapters.open a{color:#e4edf0;text-shadow:none}body.portfolio-v10-visible .chapters.open a[aria-current]{color:var(--gold)}#portfolio-loading{padding:80px 25px;text-align:center;flex-direction:column}}

/* Preload at the real viewport dimensions while the map remains visible. */
#portfolio-embedded[data-prewarm]{display:block!important;visibility:hidden;pointer-events:none}
#france-portfolio-zoom{position:fixed;inset:0;width:100%;height:100%;z-index:9;pointer-events:none}
#france-portfolio-zoom[hidden]{display:none!important}
body.france-zoom-active #story,body.france-zoom-active .territory-labels,body.france-zoom-active .territory-credit{visibility:hidden}
body.france-zoom-active #transition-progress{display:block!important}
