/* ════════════════════════════════════════════════════════════════════════════════════════════════════════
   POLARISTAR · SYNAXIS — « OUVERTURE DU PORTAIL » (04/11)
   L'écran qui couvre une page du Portail pendant qu'elle se charge (AKASHA et toutes les dimensions).
   Un sceau céleste au centre, source de la lumière ; derrière lui un grand cercle astronomique très pâle ;
   l'anneau d'or extérieur suit les VRAIES étapes du chargement (plateau.page.js, veilStage) :
     data-stage="1" la demande est partie · "2" la page répond (son document existe) · "3" elle s'affiche.
   Tout est SVG + CSS (transform / opacity seulement). Mouvement réduit : rien ne tourne ni ne respire.
   Chargée après toutes les feuilles du plateau ; remplace l'ancien petit astrolabe (plateau.sanctuaire.css §5).
   ════════════════════════════════════════════════════════════════════════════════════════════════════════ */

html body.pl .pl-pop-load {
  --pp-abyss: #050316; --pp-night: #100822; --pp-amethyst: #2B1845; --pp-amethyst-l: #8755D7;
  --pp-gold: #C9A45B; --pp-gold-l: #F0D895; --pp-text: #F4EFF9; --pp-text-2: #B8ABC9;
  --pp-orb: clamp(168px, min(44vmin, 36vh), 264px);
  position: absolute; inset: 0; z-index: 2; overflow: hidden;
  display: grid; place-items: center; gap: 0; padding: 24px 16px;
  font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--pp-text);
  background:
    radial-gradient(ellipse 52% 42% at 50% 40%, rgba(135, 85, 215, .20), transparent 72%),
    radial-gradient(circle at 50% 40%, var(--pp-amethyst) 0%, var(--pp-night) 34%, var(--pp-abyss) 76%);
  opacity: 1; transition: opacity .44s ease;
}
html body.pl .pl-pop-load[hidden] { display: none; }
html body.pl .pl-pop-load::before { content: none; }
/* voile cosmique : une brume améthyste qui respire, très lentement */
html body.pl .pl-pop-load::after {
  content: ""; position: absolute; inset: -10%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 34% 22% at 30% 68%, rgba(135, 85, 215, .10), transparent 70%),
    radial-gradient(ellipse 30% 20% at 72% 30%, rgba(201, 164, 91, .06), transparent 70%);
  animation: pl-pl-mist 9s ease-in-out infinite alternate;
}

/* ── composition verticale ── */
.pl-pl-stage {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center;
  max-width: 34rem; transform: translateY(-1.5vh);
}
.pl-pl-orb { position: relative; width: var(--pp-orb); height: var(--pp-orb); margin-bottom: clamp(22px, 4.2vh, 38px);
  transition: transform .44s cubic-bezier(.6, 0, .3, 1); }

/* ── le ciel derrière le sceau : cercle céleste, écliptique, repères, quelques étoiles ── */
.pl-pl-sky { position: absolute; left: 50%; top: 50%; width: calc(var(--pp-orb) * 3.3); height: calc(var(--pp-orb) * 3.3);
  transform: translate(-50%, -50%); overflow: visible; pointer-events: none; }
.pl-pl-sky-geo { transform-box: view-box; transform-origin: 0 0; animation: pl-pl-turn 240s linear infinite; }
.pl-pl-sky :is(.pl-pl-l-gold, .pl-pl-l-ticks, .pl-pl-l-dash, .pl-pl-l-am, .pl-pl-l-faint) { fill: none; vector-effect: non-scaling-stroke; }
.pl-pl-l-gold { stroke: rgba(201, 164, 91, .13); stroke-width: 1; }
.pl-pl-l-ticks { stroke: rgba(201, 164, 91, .26); stroke-width: 9px; vector-effect: none !important; stroke-dasharray: .45 29.55; }
.pl-pl-l-dash { stroke: rgba(135, 85, 215, .22); stroke-width: 1; stroke-dasharray: 2 7; }
.pl-pl-l-am { stroke: rgba(135, 85, 215, .16); stroke-width: 1; }
.pl-pl-l-faint { stroke: rgba(201, 164, 91, .07); stroke-width: 1; }
.pl-pl-mark { fill: rgba(201, 164, 91, .32); }
.pl-pl-stars circle { fill: var(--pp-text); opacity: .42; }
.pl-pl-stars .tw { animation: pl-pl-twinkle 4.2s ease-in-out infinite; }
.pl-pl-stars .tw:nth-child(5) { animation-delay: -1.1s; }
.pl-pl-stars .tw:nth-child(7) { animation-delay: -2.3s; }
.pl-pl-stars .tw:nth-child(9) { animation-delay: -3.1s; }
.pl-pl-stars .tw:nth-child(12) { animation-delay: -1.7s; }

/* ── halo : la source de lumière ── */
.pl-pl-halo { position: absolute; left: 50%; top: 50%; width: calc(var(--pp-orb) * 1.6); height: calc(var(--pp-orb) * 1.6);
  margin: calc(var(--pp-orb) * -.8) 0 0 calc(var(--pp-orb) * -.8); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(240, 216, 149, .16) 0%, rgba(135, 85, 215, .22) 30%, rgba(135, 85, 215, .06) 52%, transparent 68%);
  animation: pl-pl-breathe 3.4s ease-in-out infinite alternate; }

/* ── le sceau ── */
.pl-pl-seal { position: relative; display: block; width: 100%; height: 100%; overflow: visible;
  animation: pl-pl-rise .7s cubic-bezier(.22, .8, .24, 1) both; }
.pl-pl-seal :is(.pl-pl-track, .pl-pl-bar, .pl-pl-ticks, .pl-pl-thin, .pl-pl-dots, .pl-pl-rays, .pl-pl-star) { fill: none; }
.pl-pl-track { stroke: rgba(201, 164, 91, .16); stroke-width: 1.2; }
.pl-pl-bar { stroke: url(#plpl-gold); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100;
  transition: stroke-dashoffset .3s ease; }
.pl-pop-load[data-stage="1"] .pl-pl-bar { stroke-dashoffset: 62; transition: stroke-dashoffset 6s cubic-bezier(.08, .62, .2, 1); }
.pl-pop-load[data-stage="2"] .pl-pl-bar { stroke-dashoffset: 16; transition: stroke-dashoffset 4s cubic-bezier(.12, .7, .2, 1); }
.pl-pop-load[data-stage="3"] .pl-pl-bar { stroke-dashoffset: 0; transition: stroke-dashoffset .28s ease-out; }
.pl-pop-load[data-stage="0"] .pl-pl-bar { stroke-dashoffset: 100; transition: none; }
.pl-pl-ring1, .pl-pl-ring2 { transform-box: view-box; transform-origin: 0 0; }
.pl-pl-ring1 { animation: pl-pl-turn 18s linear infinite; }
.pl-pl-ring2 { animation: pl-pl-turn 28s linear infinite reverse; }
.pl-pl-ticks { stroke: rgba(240, 216, 149, .62); stroke-width: 5; stroke-dasharray: .5 4.5; }
.pl-pl-thin { stroke: rgba(201, 164, 91, .42); stroke-width: .8; }
.pl-pl-am { stroke: rgba(135, 85, 215, .55); }
.pl-pl-gem { fill: var(--pp-gold-l); }
.pl-pl-dots { stroke: var(--pp-gold); stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: 0 45; }
.pl-pl-rays { stroke: rgba(240, 216, 149, .30); stroke-width: 12; stroke-dasharray: .35 14.65; }
.pl-pl-star { stroke: rgba(201, 164, 91, .58); stroke-width: .9; stroke-linejoin: round; }
.pl-pl-glow { transform-box: view-box; transform-origin: 0 0; animation: pl-pl-glow 3.4s ease-in-out infinite alternate; }
.pl-pl-heart { stroke: url(#plpl-gold); stroke-width: 1.3; }
.pl-pl-spark { fill: #FFF8E2; animation: pl-pl-twinkle 2.8s ease-in-out infinite; }

/* ── le texte ── */
.pl-pl-title { margin: 0; padding-left: .32em; font-family: var(--pl-display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(16px, .9rem + .55vw, 23px); letter-spacing: .32em; line-height: 1.3;
  color: var(--pp-gold-l); background: linear-gradient(180deg, #FBF0CF 0%, var(--pp-gold-l) 45%, var(--pp-gold) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: pl-pl-in .52s ease-out .12s both; }
.pl-pl-title::after { content: ""; display: block; width: min(240px, 56vw); height: 1px; margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, rgba(201, 164, 91, .75) 30%, rgba(240, 216, 149, .9) 50%, rgba(201, 164, 91, .75) 70%, transparent); }
.pl-pl-sub { margin: 12px 0 0; min-height: 1.5em; font-family: var(--pl-body); font-style: italic;
  font-size: clamp(16px, .95rem + .2vw, 18.5px); letter-spacing: .02em; color: var(--pp-text-2);
  animation: pl-pl-in .52s ease-out .26s both; }
.pl-pl-steps { display: flex; gap: clamp(14px, 3vw, 26px); margin: 18px 0 0; padding: 0; list-style: none;
  font-family: var(--pl-display); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #8f84a6;
  animation: pl-pl-in .52s ease-out .38s both; }
.pl-pl-steps li { display: inline-flex; align-items: center; gap: 7px; transition: color .4s ease; }
.pl-pl-steps li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; transform: rotate(45deg) scale(.9);
  border: 1px solid rgba(201, 164, 91, .5); transition: background-color .4s ease, box-shadow .4s ease; }
.pl-pop-load:is([data-stage="1"], [data-stage="2"], [data-stage="3"]) .pl-pl-steps li:nth-child(1),
.pl-pop-load:is([data-stage="2"], [data-stage="3"]) .pl-pl-steps li:nth-child(2),
.pl-pop-load[data-stage="3"] .pl-pl-steps li:nth-child(3) { color: var(--pp-gold-l); }
.pl-pop-load:is([data-stage="1"], [data-stage="2"], [data-stage="3"]) .pl-pl-steps li:nth-child(1)::before,
.pl-pop-load:is([data-stage="2"], [data-stage="3"]) .pl-pl-steps li:nth-child(2)::before,
.pl-pop-load[data-stage="3"] .pl-pl-steps li:nth-child(3)::before { background: var(--pp-gold-l); box-shadow: 0 0 8px rgba(240, 216, 149, .7); }

/* ── le voile se lève : le sceau s'ouvre un peu, tout s'efface ── */
html body.pl .pl-pop-load.is-out { opacity: 0; pointer-events: none; }
.pl-pop-load.is-out .pl-pl-orb { transform: scale(1.1); }

/* ── téléphone ── */
@media (max-width: 560px) {
  html body.pl .pl-pop-load { --pp-orb: clamp(150px, 48vw, 210px); padding: 20px 16px; }
  .pl-pl-title { letter-spacing: .24em; padding-left: .24em; }
  .pl-pl-steps { font-size: 10.5px; letter-spacing: .14em; gap: 12px; }
}
@media (max-height: 460px) {
  html body.pl .pl-pop-load { --pp-orb: clamp(110px, 34vh, 160px); }
  .pl-pl-orb { margin-bottom: 14px; }
  .pl-pl-steps { display: none; }
}

/* ── mouvement réduit : un sceau immobile ; seule la progression avance, sans fondu ── */
html.pl-reduced body.pl .pl-pop-load, html.pl-reduced body.pl .pl-pop-load::after,
html.pl-reduced body.pl .pl-pop-load * { animation: none !important; }
html.pl-reduced body.pl .pl-pop-load, html.pl-reduced body.pl .pl-pl-orb { transition: none !important; }
html.pl-reduced body.pl .pl-pop-load .pl-pl-bar { transition-duration: .2s !important; transition-timing-function: ease-out !important; }
html.pl-reduced body.pl .pl-pop-load.is-out .pl-pl-orb { transform: none; }

@keyframes pl-pl-turn { to { transform: rotate(360deg); } }
@keyframes pl-pl-breathe { from { transform: scale(.94); opacity: .78; } to { transform: scale(1.05); opacity: 1; } }
@keyframes pl-pl-glow { from { transform: scale(.9); opacity: .7; } to { transform: scale(1.08); opacity: 1; } }
@keyframes pl-pl-twinkle { 0%, 100% { opacity: .25; } 50% { opacity: .95; } }
@keyframes pl-pl-mist { from { opacity: .6; transform: translate3d(-1.5%, 0, 0); } to { opacity: 1; transform: translate3d(1.5%, -1%, 0); } }
@keyframes pl-pl-rise { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes pl-pl-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── 05/11 : mode cinéma d'AETHER VISION dans le portail : la vidéo prend tout l'écran, barre et dock compris ── */
html.pl-pop-cine .pl-pop { inset: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; z-index: 2147483000; }
html.pl-pop-cine .pl-pop-bar, html.pl-pop-cine .pl-pop-strip { display: none !important; }
html.pl-pop-cine body.pl .ps-bottom-nav { display: none !important; }
