/* Faire-P Digital — ouvertures plein écran. Une matière tactile couvre tout l'écran ; au toucher, la séquence se joue
   sur une seule ligne de temps (animations CSS déclenchées par .is-playing), la couverture apparaissant dessous.
   Types : flaps (pochette à quatre rabats), doors (portes d'un écrin), curtain (rideau de velours), vellum (calque),
   iris (cercle qui s'ouvre), split (carte qui se fend). --fpd-reveal = instant où la couverture commence à s'animer. */
.fpd-open-flaps { --fpd-reveal: .85s; --ex: max(6.5%, calc(50% - 300px)); --et: 6%; --eb: 11%; }
.fpd-open-doors { --fpd-reveal: .7s; }
.fpd-open-curtain { --fpd-reveal: 1.25s; }
.fpd-open-vellum { --fpd-reveal: 1.5s; }
.fpd-open-iris { --fpd-reveal: .6s; }
.fpd-open-split { --fpd-reveal: .5s; }
body.is-preopen { --fpd-reveal: 0s; }

.fpd-open { position: fixed; inset: 0; z-index: 50; overflow: hidden; cursor: pointer; -webkit-tap-highlight-color: transparent; perspective: 1300px; perspective-origin: 50% 50%; --mat: var(--fpd-envelope); --open-ink: var(--fpd-ink); }
.fpd-open[hidden] { display: none; }
/* Un glissement du doigt sur l'ouverture ne fait pas défiler la page qui attend dessous. Dans un cadre (démo iPhone d'une page
   du site), on ne retient rien : le doigt doit pouvoir faire défiler la page qui contient le cadre. */
body:not(.is-embedded) .fpd-open, body:not(.is-embedded) .fpd-under { touch-action: none; }
/* Invite à toucher : lisible (12 px gras, pleine encre), jamais une simple teinte du fond.
   --ou vaut 1 px sur tout écran réel. Dans un cadre de moins de 240 px de large (démo dans un téléphone dessiné, tout petit sur
   mobile), il se réduit avec la largeur : l'invite reste sur une ligne et ne remonte plus sur les prénoms. */
.fpd-open__hint, .fpd-open__names { --ou: min(1px, .4167vw); position: absolute; left: 0; right: 0; z-index: 9; margin: 0; text-align: center; text-transform: uppercase; color: var(--open-ink); pointer-events: none; transition: opacity .35s ease; }
.fpd-open__hint { bottom: max(5.5%, calc(var(--ou) * 30)); font-size: calc(var(--ou) * 12); font-weight: 600; letter-spacing: .3em; text-indent: .3em; white-space: nowrap; animation: fpd-pulse 2.6s ease-in-out infinite; }
.fpd-open__names { bottom: calc(max(5.5%, var(--ou) * 30) + var(--ou) * 34); font-family: var(--fpd-display); font-size: calc(var(--ou) * 16); letter-spacing: .22em; text-indent: .22em; }
.fpd-open.is-playing .fpd-open__hint, .fpd-open.is-playing .fpd-open__names { opacity: 0; animation: none; }

/* Sceau de cire : il respire sous un halo qui invite à toucher, puis se fend en deux moitiés qui tombent */
.fpd-open__seal { position: absolute; left: 50%; top: 50%; z-index: 8; width: min(34vw, 142px); aspect-ratio: 1; transform: translate(-50%, -50%); filter: drop-shadow(0 6px 9px rgba(0, 0, 0, .4)); will-change: transform; }
.fpd-open__seal svg, .fpd-open__plaque svg, .fpd-open__ring svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fpd-seal__half { position: absolute; inset: 0; will-change: transform; }
.fpd-seal__half--a { clip-path: polygon(-30% -30%, 56% -30%, 47% 22%, 58% 41%, 44% 58%, 55% 78%, 46% 130%, -30% 130%); }
.fpd-seal__half--b { clip-path: polygon(56% -30%, 130% -30%, 130% 130%, 46% 130%, 55% 78%, 44% 58%, 58% 41%, 47% 22%); }
.fpd-open__seal::before, .fpd-open__plaque::before, .fpd-open__ring::before { content: ''; position: absolute; inset: -9%; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--fpd-gold) 60%, #fff); opacity: 0; animation: fpd-halo 2.8s cubic-bezier(.2, .8, .2, 1) infinite; pointer-events: none; }
.fpd-open__plaque::before { inset: -6% -10%; border-radius: 18%; }
.fpd-open.is-playing .fpd-open__seal::before, .fpd-open.is-playing .fpd-open__plaque::before, .fpd-open.is-playing .fpd-open__ring::before { animation: none; opacity: 0; }
@keyframes fpd-halo { 0% { transform: scale(.86); opacity: 0; } 18% { opacity: .7; } 100% { transform: scale(1.42); opacity: 0; } }
.fpd-open:not(.is-playing) .fpd-open__seal { animation: fpd-seal-idle 3.8s ease-in-out infinite; }
.fpd-open.is-playing .fpd-open__seal { animation: fpd-seal-press .5s cubic-bezier(.2, .8, .2, 1) both; }
.fpd-open.is-playing .fpd-seal__half--a { animation: fpd-crack-a 1s cubic-bezier(.5, 0, .75, .45) .14s both; }
.fpd-open.is-playing .fpd-seal__half--b { animation: fpd-crack-b 1.05s cubic-bezier(.5, 0, .75, .45) .14s both; }
@keyframes fpd-seal-idle { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.035); } }
@keyframes fpd-seal-press { 0% { transform: translate(-50%, -50%) scale(1); } 28% { transform: translate(-50%, -50%) scale(.93); } 100% { transform: translate(-50%, -50%) scale(1); } }
@keyframes fpd-crack-a { 0% { transform: none; opacity: 1; } 20% { transform: translate(-5%, 1%) rotate(-5deg); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-58%, 210%) rotate(-42deg); opacity: 0; } }
@keyframes fpd-crack-b { 0% { transform: none; opacity: 1; } 20% { transform: translate(5%, 0) rotate(4deg); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(46%, 235%) rotate(34deg); opacity: 0; } }

/* ---------- Pochette posée sur une table ----------
   Deux calques encadrent la page : dessous (.fpd-under : table, dos doublé, face intérieure du rabat) et dessus (.fpd-open : poche à
   trois rabats, face extérieure du rabat, sceau). Entre les deux, la page elle-même, réduite à la taille d'une carte (body.is-carding) :
   c'est la vraie couverture qui sort de la poche et grandit, en s'écrivant déjà. Géométrie de l'enveloppe : --ex, --et, --eb (sur le body). */
.fpd-open--flaps { --open-ink: var(--fpd-deep-ink); }
.fpd-under { position: fixed; inset: 0; z-index: 40; overflow: hidden; perspective: 1300px; perspective-origin: 50% 50%; --mat: var(--fpd-envelope); }
.fpd-under[hidden] { display: none; }
.fpd-open__table { position: absolute; inset: 0; --mat: var(--fpd-deep); --mat-tile: var(--deep-tile); --tile-blend: var(--deep-blend, hard-light); }
.fpd-open__table::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 44%, rgba(255, 255, 255, .07) 0%, transparent 42%, rgba(0, 0, 0, .34) 100%); }
.fpd-open__env { position: absolute; left: var(--ex); right: var(--ex); top: var(--et); bottom: var(--eb); will-change: translate; }
.fpd-open__back { z-index: 1; filter: drop-shadow(0 22px 24px rgba(0, 0, 0, .4)); }
.fpd-open__back .fpd-mat, .fpd-open__lid--in .fpd-mat { --mat: color-mix(in srgb, var(--fpd-envelope) 60%, var(--fpd-accent)); }
.fpd-open__back .fpd-mat::after, .fpd-open__lid--in .fpd-mat::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .36) 0 1px, transparent 1px 11px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, .36) 0 1px, transparent 1px 11px); }
/* Rabats de la poche : un liseré clair sous chaque bord donne l'épaisseur du papier */
.fpd-open__flap { z-index: 3; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .5)) drop-shadow(0 3px 8px rgba(40, 25, 15, .3)); }
.fpd-open__flap .fpd-mat::after { content: ''; position: absolute; inset: 0; background: var(--shade, transparent); }
.fpd-open__flap--left { --shade: linear-gradient(90deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .03)); }
.fpd-open__flap--left .fpd-mat { clip-path: polygon(0 0, 53% 52%, 0 100%); }
.fpd-open__flap--right { --shade: linear-gradient(270deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .02)); }
.fpd-open__flap--right .fpd-mat { clip-path: polygon(100% 0, 47% 52%, 100% 100%); }
.fpd-open__flap--bottom { --shade: linear-gradient(0deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 70%); }
.fpd-open__flap--bottom .fpd-mat { clip-path: polygon(0 100%, 50% 45%, 100% 100%); }
/* Rabat du haut en deux exemplaires : la face extérieure (dessus) ne se voit que fermée, la face doublée (dessous, derrière la carte) qu'une fois levée */
.fpd-open__lid { z-index: 4; transform-origin: 50% 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .5)) drop-shadow(0 5px 9px rgba(40, 25, 15, .36)); will-change: transform, translate; }
.fpd-open__lid .fpd-mat { clip-path: var(--lid-shape, polygon(0 0, 100% 0, 55% 52.5%, 52.5% 55.6%, 50% 57%, 47.5% 55.6%, 45% 52.5%)); }
.fpd-open__lid--out .fpd-mat::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 62%); }
.fpd-open__lid--out .fpd-mat::before { content: ''; position: absolute; inset: 0; z-index: 1; background: #000; opacity: 0; }
.fpd-open__lid--in { z-index: 2; transform: rotateY(180deg); }
/* Silhouette du rabat selon le thème : pointe arrondie (défaut), rabat rond, pointe profonde, festons */
.fpd-motif-floral, .fpd-motif-arch { --lid-shape: polygon(0 0, 100% 0, 100% 6%, 88% 27%, 74% 41%, 62% 48.5%, 50% 51%, 38% 48.5%, 26% 41%, 12% 27%, 0 6%); --seal-y: .5; }
.fpd-motif-wax { --lid-shape: polygon(0 0, 100% 0, 54.5% 58.5%, 52.3% 61.3%, 50% 62.5%, 47.7% 61.3%, 45.5% 58.5%); --seal-y: .585; }
.fpd-motif-lace { --lid-shape: polygon(0 0, 100% 0, 100.00% 0.00%, 99.30% 2.72%, 98.24% 5.11%, 96.57% 6.98%, 94.30% 8.32%, 91.67% 9.33%, 90.97% 12.05%, 89.90% 14.45%, 88.24% 16.31%, 85.97% 17.65%, 83.33% 18.67%, 82.64% 21.39%, 81.57% 23.78%, 79.90% 25.65%, 77.64% 26.99%, 75.00% 28.00%, 74.30% 30.72%, 73.24% 33.11%, 71.57% 34.98%, 69.30% 36.32%, 66.67% 37.33%, 65.97% 40.05%, 64.90% 42.45%, 63.24% 44.31%, 60.97% 45.65%, 58.33% 46.67%, 57.64% 49.39%, 56.57% 51.78%, 54.90% 53.65%, 52.64% 54.99%, 50.00% 56.00%, 50.00% 56.00%, 47.36% 54.99%, 45.10% 53.65%, 43.43% 51.78%, 42.36% 49.39%, 41.67% 46.67%, 39.03% 45.65%, 36.76% 44.31%, 35.10% 42.45%, 34.03% 40.05%, 33.33% 37.33%, 30.70% 36.32%, 28.43% 34.98%, 26.76% 33.11%, 25.70% 30.72%, 25.00% 28.00%, 22.36% 26.99%, 20.10% 25.65%, 18.43% 23.78%, 17.36% 21.39%, 16.67% 18.67%, 14.03% 17.65%, 11.76% 16.31%, 10.10% 14.45%, 9.03% 12.05%, 8.33% 9.33%, 5.70% 8.32%, 3.43% 6.98%, 1.76% 5.11%, 0.70% 2.72%, 0.00% 0.00%); --seal-y: .53; }
.fpd-open--flaps .fpd-open__seal { top: calc(var(--et) + (100% - var(--et) - var(--eb)) * var(--seal-y, .535)); }
.fpd-open--flaps .fpd-open__names { bottom: calc(var(--eb) + 6.5%); color: var(--fpd-ink); font-weight: 600; }
.fpd-open--flaps .fpd-open__hint { bottom: calc(var(--eb) / 2 - 7px); }
/* Séquence : le rabat se lève pendant que l'enveloppe descend un peu (sa doublure se découvre), puis la carte sort, l'enveloppe tombe, la carte devient la page */
.fpd-open--flaps.is-playing .fpd-open__lid--out { animation: fpd-lid-out 1.05s cubic-bezier(.6, 0, .2, 1) .5s both, fpd-env-drop 2.1s cubic-bezier(.45, 0, .55, 1) .45s both; }
.fpd-under.is-playing .fpd-open__lid--in { animation: fpd-lid-in 1.05s cubic-bezier(.6, 0, .2, 1) .5s both, fpd-env-drop 2.1s cubic-bezier(.45, 0, .55, 1) .45s both; }
.fpd-open--flaps.is-playing .fpd-open__lid--out .fpd-mat::before { animation: fpd-shade .5s ease-in .5s both; }
.fpd-open--flaps.is-playing .fpd-open__flap, .fpd-under.is-playing .fpd-open__back { animation: fpd-env-drop 2.1s cubic-bezier(.45, 0, .55, 1) .45s both; }
.fpd-under.is-playing { animation: fpd-open-out .5s ease 2.15s both; }
body.is-carding .fpd-page { z-index: 45; transform-origin: 50% 0; clip-path: inset(0 0 calc(100% - 100vh) 0); clip-path: inset(0 0 calc(100% - 100svh) 0); animation: fpd-card-out 2.1s cubic-bezier(.45, 0, .55, 1) .45s both; will-change: transform; }
/* Le rabat ne se couche pas à plat : il reste dressé, penché vers l'arrière, et sa doublure se voit en entier */
@keyframes fpd-lid-out { to { transform: rotateX(118deg); } }
@keyframes fpd-lid-in { from { transform: rotateX(0deg) rotateY(180deg); } to { transform: rotateX(118deg) rotateY(180deg); } }
@keyframes fpd-shade { to { opacity: .3; } }
@keyframes fpd-env-drop { 0% { translate: 0 0; } 42% { translate: 0 11vh; } 100% { translate: 0 120vh; rotate: 2.5deg; } }
@keyframes fpd-card-out { 0% { transform: translateY(12.6vh) scale(.73); } 42% { transform: translateY(23.6vh) scale(.73); } 62% { transform: translateY(7vh) scale(.73); } 100% { transform: none; } }
@keyframes fpd-open-out { to { opacity: 0; } }

/* ---------- Écrin à deux portes, plaque à monogramme ---------- */
.fpd-open--doors { --mat: var(--fpd-deep); --mat-tile: var(--deep-tile); --open-ink: color-mix(in srgb, var(--fpd-deep-ink) 82%, transparent); }
.fpd-open__door { position: absolute; top: 0; bottom: 0; width: 50.2%; will-change: transform; filter: drop-shadow(0 0 16px rgba(0, 0, 0, .5)); }
.fpd-open__door--left { left: 0; transform-origin: 0 50%; }
.fpd-open__door--right { right: 0; transform-origin: 100% 50%; }
.fpd-open__door .fpd-mat::before { content: ''; position: absolute; inset: 22px 18px; border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 0, 0, .1); }
.fpd-open__door .fpd-mat::after { content: ''; position: absolute; inset: 0; }
.fpd-open__door--left .fpd-mat::after { background: linear-gradient(90deg, rgba(0, 0, 0, .16), transparent 20%, transparent 88%, rgba(0, 0, 0, .26) 100%); border-right: 1px solid color-mix(in srgb, var(--fpd-gold) 70%, transparent); }
.fpd-open__door--right .fpd-mat::after { background: linear-gradient(270deg, rgba(0, 0, 0, .16), transparent 20%, transparent 88%, rgba(0, 0, 0, .26) 100%); border-left: 1px solid color-mix(in srgb, var(--fpd-gold) 70%, transparent); }
.fpd-open__plaque { position: absolute; left: 0; top: 50%; z-index: 2; width: min(36vw, 152px); aspect-ratio: .8; transform: translate(-50%, -50%); filter: drop-shadow(0 7px 10px rgba(0, 0, 0, .45)); }
.fpd-open--doors .fpd-open__names, .fpd-open--doors .fpd-open__hint { text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
/* Épaisseur du battant (chant sombre côté jour) et ombre qui s'accentue avec l'angle */
.fpd-open__door::after { content: ''; position: absolute; top: 0; bottom: 0; width: 7px; z-index: 1; background: linear-gradient(90deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, .14)); }
.fpd-open__door--left::after { right: 0; }
.fpd-open__door--right::after { left: 0; transform: scaleX(-1); }
.fpd-open__door::before { content: ''; position: absolute; inset: 0; z-index: 1; background: #000; opacity: 0; pointer-events: none; }
/* Au toucher : la plaque s'enfonce aussitôt, le jour s'ouvre dès 0,15 s, les battants pivotent pendant plus d'une seconde */
.fpd-open--doors.is-playing .fpd-open__plaque { animation: fpd-plaque-press .45s cubic-bezier(.2, .8, .2, 1) both; }
.fpd-open--doors.is-playing .fpd-open__door--left { animation: fpd-door-l 1.55s cubic-bezier(.3, .1, .25, 1) .1s both; }
.fpd-open--doors.is-playing .fpd-open__door--right { animation: fpd-door-r 1.55s cubic-bezier(.3, .1, .25, 1) .18s both; }
.fpd-open--doors.is-playing .fpd-open__door::before { animation: fpd-door-shade 1.2s ease-in .2s both; }
@keyframes fpd-plaque-press { 0% { transform: translate(-50%, -50%) scale(1); } 30% { transform: translate(-50%, -50%) scale(.93); } 100% { transform: translate(-50%, -50%) scale(1); } }
@keyframes fpd-door-shade { to { opacity: .42; } }
/* Une lueur chaude filtre par le jour qui s'ouvre entre les portes */
.fpd-open--doors::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 30% 64% at 50% 50%, rgba(255, 190, 80, .44), rgba(255, 170, 60, .13) 55%, transparent 74%); opacity: 0; }
.fpd-open--doors.is-playing::before { animation: fpd-glow 1.7s ease .1s both; }
@keyframes fpd-glow { 0% { opacity: 0; } 32% { opacity: 1; } 100% { opacity: 0; } }
/* Orient : portes de laque bleu canard, treillis de laiton, médaillon étoilé (au lieu de portes du même bleu que la page) */
.fpd-motif-arabesque .fpd-open--doors { --mat: color-mix(in srgb, var(--fpd-deep) 38%, #0d5f68); }
.fpd-motif-arabesque .fpd-open__door .fpd-mat::before { inset: 14px 12px; border: 1px solid color-mix(in srgb, var(--fpd-gold) 80%, transparent); outline: 1px solid color-mix(in srgb, var(--fpd-gold) 42%, transparent); outline-offset: -7px; box-shadow: none; background: radial-gradient(circle at 50% 50%, transparent 0 7.4px, color-mix(in srgb, var(--fpd-gold) 60%, transparent) 7.4px 8.3px, transparent 8.3px) 0 0 / 40px 40px, repeating-linear-gradient(45deg, transparent 0 27.6px, color-mix(in srgb, var(--fpd-gold) 40%, transparent) 27.6px 28.28px), repeating-linear-gradient(-45deg, transparent 0 27.6px, color-mix(in srgb, var(--fpd-gold) 40%, transparent) 27.6px 28.28px); }
@keyframes fpd-door-l { to { transform: rotateY(-102deg); } }
@keyframes fpd-door-r { to { transform: rotateY(102deg); } }

/* ---------- Rideau de velours ----------
   Il se fronce vers ses embrasses et reste en scène : la couverture porte le même rideau (.fpd-drapeprop, .fpd-valanceprop, mêmes
   formes et mêmes plis), qui prend le relais sans à-coup quand ce calque disparaît. Le calque se limite à la colonne de la page. */
.fpd-open--curtain { --mat: var(--fpd-paper); perspective: none; left: 50%; right: auto; width: min(100%, 720px); transform: translateX(-50%); }
.fpd-open__drape, .fpd-drapeprop { position: absolute; top: -2%; bottom: -2%; filter: drop-shadow(0 0 16px rgba(0, 0, 0, .55)); }
.fpd-open__drape { width: 52%; will-change: transform; }
.fpd-drapeprop { width: min(25%, 150px); }
.fpd-open__drape--left, .fpd-drapeprop--left { left: 0; transform-origin: 0 50%; }
.fpd-open__drape--right, .fpd-drapeprop--right { right: 0; transform-origin: 100% 50%; }
.fpd-open__drape .fpd-mat, .fpd-drapeprop .fpd-mat { --mat: var(--fpd-paper); }
.fpd-open__drape--left .fpd-mat { clip-path: polygon(0 0, 100% 0, 100% 14%, 100% 30%, 100% 52%, 100% 74%, 100% 100%, 0 100%); }
.fpd-open__drape--right .fpd-mat { clip-path: polygon(100% 0, 0 0, 0 14%, 0 30%, 0 52%, 0 74%, 0 100%, 100% 100%); }
.fpd-drapeprop--left .fpd-mat { clip-path: polygon(0 0, 100% 0, 62% 14%, 34% 30%, 46% 52%, 60% 74%, 70% 100%, 0 100%); }
.fpd-drapeprop--right .fpd-mat { clip-path: polygon(100% 0, 0 0, 38% 14%, 66% 30%, 54% 52%, 40% 74%, 30% 100%, 100% 100%); }
/* Plis : trois trames de pas différents, en % de la largeur du pan (ils se resserrent quand le rideau se fronce) */
.fpd-open__drape .fpd-mat::after, .fpd-drapeprop .fpd-mat::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .32), transparent 22%, transparent 78%, rgba(0, 0, 0, .3)), repeating-linear-gradient(90deg, rgba(0, 0, 0, .44) 0%, rgba(255, 255, 255, .08) 6%, rgba(0, 0, 0, .03) 10%, rgba(0, 0, 0, .38) 17%), repeating-linear-gradient(90deg, rgba(0, 0, 0, .24) 0%, transparent 9%, rgba(255, 255, 255, .05) 15%, rgba(0, 0, 0, .2) 29%), repeating-linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .17) 23%, transparent 41%); }
/* Embrasse dorée */
.fpd-open__drape::after, .fpd-drapeprop::after { content: ''; position: absolute; top: 29.4%; width: 44%; height: 5px; border-radius: 3px; background: linear-gradient(180deg, color-mix(in srgb, var(--fpd-gold) 60%, #fff), var(--fpd-gold) 45%, color-mix(in srgb, var(--fpd-gold) 60%, #000)); box-shadow: 0 2px 3px rgba(0, 0, 0, .45); }
.fpd-open__drape--left::after, .fpd-drapeprop--left::after { left: 0; }
.fpd-open__drape--right::after, .fpd-drapeprop--right::after { right: 0; }
.fpd-open__drape::after { opacity: 0; }
.fpd-open__valance, .fpd-valanceprop { position: absolute; left: -2%; right: -2%; top: -1%; height: min(17%, 150px); z-index: 3; filter: drop-shadow(0 9px 10px rgba(0, 0, 0, .5)); }
.fpd-open__valance svg, .fpd-valanceprop > svg { display: block; width: 100%; height: 100%; }
.fpd-open--curtain.is-playing .fpd-open__drape--left { animation: fpd-drape 1.55s cubic-bezier(.6, 0, .2, 1) .55s both; }
.fpd-open--curtain.is-playing .fpd-open__drape--right { animation: fpd-drape 1.55s cubic-bezier(.6, 0, .2, 1) .62s both; }
.fpd-open--curtain.is-playing .fpd-open__drape--left .fpd-mat { animation: fpd-drape-l 1.55s cubic-bezier(.6, 0, .2, 1) .55s both; }
.fpd-open--curtain.is-playing .fpd-open__drape--right .fpd-mat { animation: fpd-drape-r 1.55s cubic-bezier(.6, 0, .2, 1) .62s both; }
.fpd-open--curtain.is-playing .fpd-open__drape::after { animation: fpd-open-in .5s ease 1.75s both; }
@keyframes fpd-drape { to { transform: scaleX(var(--drape-s, .48)); } }
@keyframes fpd-drape-l { to { clip-path: polygon(0 0, 100% 0, 62% 14%, 34% 30%, 46% 52%, 60% 74%, 70% 100%, 0 100%); } }
@keyframes fpd-drape-r { to { clip-path: polygon(100% 0, 0 0, 38% 14%, 66% 30%, 54% 52%, 40% 74%, 30% 100%, 100% 100%); } }
@keyframes fpd-open-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Calque dépoli, ceinture et sceau ---------- */
.fpd-open--vellum { perspective: none; }
.fpd-open__vellum { position: absolute; inset: 0; background: linear-gradient(160deg, color-mix(in srgb, var(--fpd-paper) 58%, transparent), color-mix(in srgb, var(--fpd-paper) 34%, transparent)); -webkit-backdrop-filter: blur(9px) saturate(1.1); backdrop-filter: blur(9px) saturate(1.1); box-shadow: 0 16px 34px rgba(40, 50, 70, .3); will-change: transform; }
/* Ombre du bord inférieur du calque, visible quand il se soulève */
.fpd-open__vellum::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(180deg, transparent, rgba(60, 70, 90, .16)); }
.fpd-open__band { position: absolute; left: -4%; right: -4%; top: 50%; height: 104px; margin-top: -52px; --mat: var(--fpd-paper); box-shadow: 0 8px 22px rgba(40, 50, 70, .22); will-change: transform; }
.fpd-open__band .fpd-mat { border-block: 1px solid color-mix(in srgb, var(--fpd-gold) 65%, transparent); outline: 1px solid color-mix(in srgb, var(--fpd-gold) 30%, transparent); outline-offset: -7px; }
.fpd-open--vellum.is-playing .fpd-open__band { animation: fpd-band 1.25s cubic-bezier(.6, 0, .2, 1) .55s both; }
.fpd-open--vellum.is-playing .fpd-open__vellum { animation: fpd-vellum 1.35s cubic-bezier(.6, 0, .2, 1) 1.05s both; }
@keyframes fpd-band { to { transform: translateX(110%); } }
@keyframes fpd-vellum { to { transform: translateY(-108%) rotate(-2.5deg); } }

/* ---------- Iris : la page se découpe en cercle grandissant ---------- */
.fpd-open--iris { perspective: none; --open-ink: color-mix(in srgb, var(--fpd-ink) 78%, transparent); }
.fpd-open__surface { position: absolute; inset: 0; }
/* Décor de l'écran fermé, ton sur ton (cadre art déco estampé, ou ciel étoilé) : la page qui s'ouvre le prolonge */
.fpd-open__art { position: absolute; inset: 0; }
.fpd-open__art svg { display: block; width: 100%; height: 100%; }
.fpd-open__ring { position: absolute; left: 50%; top: 46%; z-index: 3; width: min(46vw, 184px); aspect-ratio: 1; transform: translate(-50%, -50%); }
.fpd-open--iris.is-playing .fpd-open__ring { animation: fpd-ring-out 1.35s cubic-bezier(.6, 0, .2, 1) .2s both; }
@keyframes fpd-ring-out { to { transform: translate(-50%, -50%) scale(10); opacity: 0; } }
body.is-irising .fpd-page { z-index: 60; clip-path: circle(0 at 50% 46vh); animation: fpd-iris 1.5s cubic-bezier(.6, 0, .2, 1) .28s both; }
@keyframes fpd-iris { to { clip-path: circle(80vmax at 50% 46vh); } }
/* L'ouverture a un bord : un liseré doré (et un second, en retard) suit exactement le cercle, avec une ombre intérieure qui creuse la page */
body.is-irising::after, body.is-irising::before { content: ''; position: fixed; left: 50%; top: 46vh; z-index: 62; width: 0; height: 0; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }
body.is-irising::after { border: 2px solid var(--fpd-gold); box-shadow: 0 0 0 3px rgba(0, 0, 0, .5), 0 0 0 4px color-mix(in srgb, var(--fpd-gold) 60%, transparent), inset 0 0 0 4px rgba(0, 0, 0, .35), inset 0 0 0 5px color-mix(in srgb, var(--fpd-gold) 45%, transparent), inset 0 0 34px 8px rgba(0, 0, 0, .5), 0 0 22px color-mix(in srgb, var(--fpd-gold) 45%, transparent); animation: fpd-rim 1.5s cubic-bezier(.6, 0, .2, 1) .28s both; }
/* Lueur chaude qui borde l'intérieur de l'ouverture : l'intérieur ne ressemble plus à l'extérieur, puis elle s'éteint */
body.is-irising::before { z-index: 61; background: radial-gradient(circle closest-side, transparent 56%, color-mix(in srgb, var(--fpd-gold) 24%, transparent) 84%, color-mix(in srgb, var(--fpd-gold) 46%, transparent) 99%, transparent 100%); animation: fpd-rim 1.5s cubic-bezier(.6, 0, .2, 1) .28s both, fpd-open-out .55s ease 1.2s both; }
@keyframes fpd-rim { to { width: 160vmax; height: 160vmax; } }
/* Chic : laque noire brillante (sans grain) devant une page mate, monogramme rayonnant */
.fpd-motif-lines .fpd-open--iris .fpd-open__surface .fpd-mat { background-image: none; }
.fpd-motif-lines .fpd-open--iris .fpd-open__surface::after { content: ''; position: absolute; inset: 0; background: linear-gradient(118deg, transparent 22%, rgba(255, 255, 255, .08) 36%, transparent 47%, transparent 58%, rgba(255, 255, 255, .045) 68%, transparent 80%), radial-gradient(ellipse at 50% 46%, rgba(255, 255, 255, .06), transparent 62%); }
.fpd-motif-lines .fpd-open__ring { width: min(66vw, 264px); }

/* ---------- Carte qui se fend en deux ---------- */
.fpd-open--split { perspective: none; }
.fpd-open__half { position: absolute; left: 0; right: 0; height: 50.1%; overflow: hidden; will-change: transform; }
.fpd-open__half--top { top: 0; z-index: 1; }
.fpd-open__half--bottom { bottom: 0; }
/* Le grain du papier de la moitié basse part du haut de l'écran, comme celui de la moitié haute : aucune couture visible avant l'ouverture */
.fpd-open__half--bottom .fpd-mat { top: -99.6%; }
.fpd-open__big { position: absolute; left: 0; right: 0; z-index: 2; text-align: center; font-family: var(--fpd-display); font-size: clamp(120px, 40vw, 250px); line-height: 1; letter-spacing: -.02em; white-space: nowrap; color: var(--fpd-ink); }
.fpd-open__half--top .fpd-open__big { bottom: -.5em; }
.fpd-open__half--bottom .fpd-open__big { top: -.5em; }
.fpd-open--split.is-playing .fpd-open__half--top { animation: fpd-split-t 1.3s cubic-bezier(.6, 0, .2, 1) .15s both; }
.fpd-open--split.is-playing .fpd-open__half--bottom { animation: fpd-split-b 1.3s cubic-bezier(.6, 0, .2, 1) .15s both; }
@keyframes fpd-split-t { to { transform: translateY(-101%); } }
@keyframes fpd-split-b { to { transform: translateY(101%); } }

@media (prefers-reduced-motion: reduce) {
  .fpd-open *, .fpd-under, .fpd-under *, body.is-carding .fpd-page { animation-duration: .2s !important; animation-delay: 0s !important; }
  body.is-irising .fpd-page { animation-duration: .2s; animation-delay: 0s; }
}
