/* Cinq partitions, sur les seuls nouveaux calques ou les propriétés explicitement reprises. */
/* Réserver dès le premier rendu la géométrie qu'edition-sensorielle ajoute au démarrage.
   La classe es-edition reste au moteur d'origine : son initialisation n'est pas court-circuitée. */
body.sc-partition:not(.es-edition) .tc-scene > :is(.pe-copy,.te-hero-copy,.te-breadcrumb,.pe-opening,.ip-opening) { position:relative; z-index:3; }
body.sc-partition:not(.es-edition) :is(.pe-discover,.ed-link,.te-link) > span[aria-hidden] { display:inline-flex; justify-content:center; align-items:center; width:44px; height:44px; border:1px solid #c9ddd54d; border-radius:50%; }
.sc-parcours .iv-wash { display:none !important; }
.sc-parcours .sc-calque { position:absolute; pointer-events:none; }
.sc-parcours .iv-gallery,.sc-parcours .te-chapter,.sc-parcours .ed-responsibility,.sc-parcours .ed-principle { position:relative; }
.sc-parcours .sc-date-archive { position:absolute; bottom:1.7rem; right:5vw; pointer-events:none; font:400 clamp(64px,11vw,170px)/1 var(--tc-serif); color:transparent; -webkit-text-stroke:1px #988b7655; letter-spacing:-.05em; }
.sc-parcours .va-cabinet { position:relative; }
.sc-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Prologues : deux côtés, une diagonale ou une fente de lumière. Seulement des masques. */
html[data-sc-mode="plein"] .tc-scene[data-sc-seuil="joue"] [data-sc-seuil] { animation:sc-seuil-plan 1600ms cubic-bezier(.16,.84,.24,1) calc(280ms + var(--sc-ordre,0)*230ms) both; }
html[data-sc-mode="plein"] .tc-scene[data-sc-seuil="joue"] [data-sc-seuil="gauche"] { animation-name:sc-seuil-gauche; }
html[data-sc-mode="plein"] .tc-scene[data-sc-seuil="joue"] [data-sc-seuil="droite"] { animation-name:sc-seuil-droite; }
html[data-sc-mode="plein"] .tc-scene[data-sc-seuil="joue"] [data-sc-seuil="fente"] { animation-name:sc-seuil-fente; animation-duration:2400ms; }
@keyframes sc-seuil-plan { from {clip-path:inset(0 0 100% 0);} to {clip-path:inset(0);} }
@keyframes sc-seuil-gauche { from {clip-path:inset(0 100% 0 0);} to {clip-path:inset(0);} }
@keyframes sc-seuil-droite { from {clip-path:inset(0 0 0 100%);} to {clip-path:inset(0);} }
@keyframes sc-seuil-fente { from {clip-path:inset(0 49.9% 0 49.9%);} to {clip-path:inset(0);} }

/* Les terres : les volets partent de leur couture ; ni échelle ni déformation d'image. */
.sc-parcours .iv-picture { --sc-ouverture:1; }
html[data-sc-mode="plein"] .page-les-terres .sc-volet { clip-path:inset(0 0 0 calc((1 - var(--sc-ouverture,1))*100%)); }
html[data-sc-mode="plein"] .page-les-terres .sc-volet.lx-volet-champagne { clip-path:inset(0 calc((1 - var(--sc-ouverture,1))*100%) 0 0); }
.sc-couture-terres { z-index:3; left:calc(50% - 1px); top:0; bottom:0; width:2px; background:linear-gradient(transparent,#f4f0e8 35% 65%,transparent); opacity:calc(1 - var(--sc-c,1)); box-shadow:0 0 18px #f4f0e877; }
.page-les-terres .sc-porte-terres .tv-shade { background:linear-gradient(90deg,#06100c77,transparent 65%); }

/* Italia : une lumière d'après-midi sur le bord du cadre, jamais sur une gravure. */
.sc-lumiere-italia { inset:0 0 auto; height:180px; background:linear-gradient(135deg,transparent 12%,#d3ad7333 38%,#e8c68b55 43%,transparent 57%); clip-path:polygon(0 0,100% 0,100% 85%,0 15%); transform:translateX(calc((var(--sc-c,1) - .5)*8%)); opacity:calc(1 - var(--sc-c,1)*.7); }
.page-italia.sc-parcours .te-chapter-ink { background:#2d2820 !important; }
.sc-route-filet { top:4rem; bottom:4rem; left:calc(5vw - 8px); width:1px; background:linear-gradient(transparent,#af895d88,transparent); transform:scaleY(var(--sc-c,1)); transform-origin:top; }

/* Champagne : lumière zénithale et strates de craie, avec la gravure toujours en couleur. */
.page-champagne.sc-parcours .tc-ink.te-exchange { background:#1e2020 !important; }
.page-champagne.sc-parcours .te-chapter-offset { background:#282929 !important; color:#f4f0e8; }
.page-champagne.sc-parcours .te-chapter-offset .te-copy { color:#e3dfd7; }
.page-champagne.sc-parcours .te-chapter-offset .te-folio { color:#d7d0c4; }
.sc-lumiere-champagne { inset:0 0 auto; height:135px; background:radial-gradient(ellipse at 50% 0,#fff9eb99,transparent 70%); opacity:calc(1 - var(--sc-c,1)*.65); }
.sc-strate { inset:auto 0 0; height:2px; background:linear-gradient(90deg,transparent,#b6b1a7,transparent); transform:scaleX(var(--sc-c,1)); }
.page-italia .sc-porte-champagne .tv-drift img { filter:grayscale(1); }

/* Notre métier : la mesure garde ses mots, et les films gardent leur régie. */
.sc-mesure { gap:1rem 2.5rem !important; }
.sc-mesure>span { border-bottom:1px solid currentColor; padding-bottom:.55em; }
.sc-lisiere { inset:auto 0 0; height:100px; background:linear-gradient(transparent,#19352e12); }
.sc-salle { background:#050706; padding:clamp(24px,5vw,80px) 0; }
.sc-salle .tf-film { margin-top:0; margin-bottom:0; }
.sc-raccord-fixe { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:7; pointer-events:none; transition:opacity 800ms cubic-bezier(.22,.72,.18,1); }
.sc-raccord-fixe.sc-raccord-fini { opacity:0; }
.sc-salle .sc-ecran-commande { z-index:20; }

/* Relations : le document n'est jamais voilé. La lettre reprend le papier réel de la Conciergerie. */
.page-relations.sc-parcours .iv-picture .iv-wash { display:none !important; }
.page-relations .sc-lettre { position:relative; background:#ebe2d2 url('conciergerie/papier-verge.webp') center/800px !important; color:#17352b; }
.page-relations .sc-lettre :is(.ed-copy,.ed-caption,.ed-eyebrow,.ed-link) { color:#17352b; }
.sc-cadre-lettre { inset:24px; border:1px solid #986d3a77; }
.sc-clause-filet { left:0; right:0; bottom:0; height:1px; background:currentColor; opacity:.3; }
.sc-sceau-stage { position:fixed; inset:0; z-index:150; pointer-events:none; display:grid; place-items:center; background:#e9dfceaa; backdrop-filter:blur(3px); }
.sc-sceau-stage canvas { width:min(300px,68vw); height:auto; }
.page-relations.sc-parcours #paysage .tv-shade { background:#030807; opacity:calc(.28 + var(--sc-fin,0)*.5); }
.page-relations.sc-parcours .tc-signature { color:#a79d89; }

/* Sans transition entre documents : le même organza réel ferme le seuil une seule fois. */
html.sc-porte body.sc-parcours::after { content:""; position:fixed; inset:0; z-index:90; pointer-events:none; background:#0a1a15 url('conciergerie/voile-nuit-1280.webp') center/cover; animation:sc-fermer-seuil 1150ms cubic-bezier(.7,0,.2,1) both; }
@keyframes sc-fermer-seuil { from {clip-path:inset(100% 0 0);opacity:.6;} to {clip-path:inset(0);opacity:1;} }

/* Les calques décoratifs suivent la même horloge native ; caméra JS si view() n'existe pas. */
@supports (animation-timeline:view()) {
 html[data-sc-mode="plein"][data-sc-defilement="natif"] .sc-parcours :is(.sc-lumiere-italia,.sc-lumiere-champagne,.sc-route-filet,.sc-strate,.sc-couture-terres) { animation:sc-plan-c linear both; animation-timeline:view(); animation-range:entry 0% cover 50%; }
}
@keyframes sc-plan-c { from {--sc-c:0;} to {--sc-c:1;} }
@media(max-width:899px) {
 .sc-parcours .sc-date-archive { bottom:1rem; right:1rem; font-size:64px; }
 .sc-route-filet { left:12px; }
 .sc-mesure { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); }
 .sc-cadre-lettre { inset:12px; }
 .sc-couture-terres { left:0; right:0; top:calc(50% - 1px); bottom:auto; height:2px; width:auto; }
 html[data-sc-mode="plein"] .page-les-terres .sc-volet { clip-path:inset(calc((1 - var(--sc-ouverture,1))*100%) 0 0 0); }
 html[data-sc-mode="plein"] .page-les-terres .sc-volet.lx-volet-champagne { clip-path:inset(0 0 calc((1 - var(--sc-ouverture,1))*100%) 0); }
}
html[data-sc-mode="calme"] .sc-parcours .sc-calque { display:none; }
html[data-sc-mode="calme"] .sc-parcours [data-sc-seuil],html[data-sc-garde="pause"] .sc-parcours [data-sc-seuil] { animation:none !important; clip-path:none !important; }
html[data-sc-mode="calme"] .sc-parcours .sc-volet,html[data-sc-garde="pause"] .sc-parcours .sc-volet { clip-path:none !important; }
html[data-sc-garde="pause"] .sc-parcours .sc-calque { animation-play-state:paused !important; }
@media(prefers-reduced-motion:reduce),(prefers-contrast:more),(forced-colors:active) {
 .sc-parcours :is(.sc-calque,.sc-sceau-stage) { display:none; }
 .sc-parcours :is([data-sc-seuil],.sc-volet) { animation:none !important; clip-path:none !important; }
 .sc-raccord-fixe { display:none; }
}
