/* ══════════════════════════════════════════════════════════════════════════
   plateau.pantheon.css — le Panthéon des dimensions (2026-10-30)
   ──────────────────────────────────────────────────────────────────────────
   Onglet « Dimensions » du Codex de SYNAXIS (rendu : plateau.codex.js, préfixe pn-).
   Cinq stèles filles des pierres du Cœur Atlante : roche bleu-noir, filet d'or gravé,
   couronne = le rendu de la pierre elle-même (ASSETS/synaxis/steles/<clé>.webp)
   posée sur l'anneau de SYNAXIS, socle cérémoniel qui porte les deux actions.
   Une âme de couleur par dimension (--soul, --soul2) dans un cadre commun.
   Lien avec le cercle : l'emblème (SYNAXIS vu d'en haut), un fil qui descend,
   une poutre d'or qui distribue un fil à chaque stèle (rangée de cinq seulement).
   Mobile d'abord, mise en page par requêtes de conteneur (la largeur du Codex, pas
   celle de l'écran). Seuls transform et opacity s'animent ; le halo ne respire que
   lorsque le Panthéon est à l'écran (.is-awake) et jamais en mode réduit ou Rapide.
   Chargée en dernier : elle l'emporte sur les anciens styles cx-dim et cx-body.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 0. Le titre du Codex : une galerie sacrée, pas un sous-bloc ─────────── */
html body.pl .cx-head { position: relative; display: grid; justify-items: center; gap: 6px; padding-top: 34px; }
html body.pl .cx-head::before {   /* le fil qui descend du cercle */
  content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 26px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(232, 196, 106, .55));
}
html body.pl .cx-head .pl-eyebrow { margin: 0; letter-spacing: .32em; }
html body.pl .cx-title {
  margin: 2px 0 0; font-weight: 500; letter-spacing: .14em; line-height: 1.2; text-wrap: balance;
  font-size: clamp(22px, 4.6vw, 34px);
  background: linear-gradient(180deg, #FBF5E4 15%, #F0E6CC 45%, #E8C46A 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(232, 196, 106, .22));
}
html body.pl .cx-head::after {   /* filet – perle – filet */
  content: ""; width: min(340px, 72%); height: 9px; margin-top: 6px; opacity: .8;
  background:
    radial-gradient(circle at 50% 50%, #E8C46A 2.6px, transparent 3.2px),
    linear-gradient(90deg, transparent, rgba(232, 196, 106, .7)) left center / calc(50% - 10px) 1px no-repeat,
    linear-gradient(270deg, transparent, rgba(232, 196, 106, .7)) right center / calc(50% - 10px) 1px no-repeat;
}

/* ── 1. Le cadre de l'onglet ─────────────────────────────────────────────── */
html body.pl .cx-body:has(> .pn) {
  padding: 30px 16px 40px;
  background: radial-gradient(70% 38% at 50% 0%, rgba(155, 121, 232, .16), transparent 70%), linear-gradient(180deg, #100d33, #0A0722 45%, #070519);
  border-color: rgba(232, 196, 106, .3);
}
@media (min-width: 760px) { html body.pl .cx-body:has(> .pn) { padding: 38px 28px 48px; } }
html body.pl .pn {
  --pn-gold: #E8C46A; --pn-ivory: #F0E6CC; --pn-text: rgba(240, 230, 204, .88); --pn-soft: rgba(240, 230, 204, .7);
  --pn-ease: cubic-bezier(.22, .8, .24, 1);
  container-type: inline-size; display: grid; gap: 26px; min-width: 0; color: var(--pn-text);
}

/* ── 2. L'en-tête : SYNAXIS vu d'en haut ─────────────────────────────────── */
html body.pl .pn-head { display: grid; justify-items: center; text-align: center; gap: 8px; max-width: 720px; margin: 0 auto; }
html body.pl .pn-emblem { width: 58px; height: 58px; overflow: visible; filter: drop-shadow(0 0 10px rgba(232, 196, 106, .3)); }
html body.pl .pn-em-ring { fill: none; stroke: var(--pn-gold); stroke-width: 1; opacity: .75; }
html body.pl .pn-em-in { opacity: .45; }
html body.pl .pn-em-core { fill: #FFE7A3; }
html body.pl .pn-eyebrow { margin: 4px 0 0 !important; font: 400 11px/1.3 var(--pl-display); letter-spacing: .32em; text-transform: uppercase; color: var(--pn-gold) !important; }
html body.pl .pn-title {
  margin: 0; font-family: var(--pl-display); font-weight: 400; letter-spacing: .1em; line-height: 1.2; text-wrap: balance;
  font-size: clamp(20px, 3.6vw, 27px); color: var(--pn-ivory);
}
html body.pl .pn-lead { margin: 0 !important; max-width: 56ch; font-size: clamp(16px, 2vw, 17.5px); line-height: 1.55; color: var(--pn-soft) !important; text-wrap: balance; }

/* ── 3. La galerie : une pile au téléphone, puis 2, 3, et la rangée des cinq ── */
html body.pl .pn-steles {
  --pn-gap: 18px;
  position: relative; list-style: none; margin: 0; padding: 30px 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 48px var(--pn-gap);
}
html body.pl .pn-steles::before {   /* le fil sous l'en-tête, terminé par un losange */
  content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 22px; transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(232, 196, 106, .1), rgba(232, 196, 106, .6));
}
html body.pl .pn-stele { position: relative; flex: 0 1 100%; max-width: 380px; display: flex; padding-bottom: 12px; }
/* pile : un fil d'or relie chaque stèle à la précédente */
html body.pl .pn-stele + .pn-stele::before {
  content: ""; position: absolute; top: -44px; left: 50%; width: 1px; height: 38px; transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(232, 196, 106, .05), color-mix(in srgb, var(--soul) 60%, transparent));
}
@container (min-width: 560px) {
  html body.pl .pn-stele { flex-basis: calc((100% - var(--pn-gap)) / 2); max-width: 340px; }
  html body.pl .pn-stele + .pn-stele::before { content: none; }
}
@container (min-width: 900px) {
  html body.pl .pn-stele { flex-basis: calc((100% - 2 * var(--pn-gap)) / 3); }
}
@container (min-width: 1040px) {
  html body.pl .pn-steles { --pn-gap: 16px; flex-wrap: nowrap; padding-top: 40px; }
  html body.pl .pn-steles::before { height: 24px; }
  html body.pl .pn-stele { flex: 1 1 0; max-width: none; }
  /* la poutre d'or : chaque stèle porte sa part, du centre de la première au centre de la dernière */
  html body.pl .pn-stele::before, html body.pl .pn-stele + .pn-stele::before {
    content: ""; position: absolute; top: -16px; left: calc(var(--pn-gap) / -2); right: calc(var(--pn-gap) / -2); height: 16px; width: auto; transform: none;
    background:
      linear-gradient(180deg, rgba(232, 196, 106, .55), color-mix(in srgb, var(--soul) 70%, transparent)) center bottom / 1px 100% no-repeat,
      linear-gradient(90deg, rgba(232, 196, 106, .5), rgba(232, 196, 106, .5)) center top / 100% 1px no-repeat;
  }
  html body.pl .pn-stele:first-child::before { left: 50%; background-position: left bottom, right top; }
  html body.pl .pn-stele:last-child::before { right: 50%; background-position: right bottom, left top; }
}

/* ── 4. La stèle : roche sacrée, arc, filet gravé, socle ─────────────────── */
html body.pl .pn-stele {
  --soul: var(--dh, #E8C46A); --soul2: #E8C46A;
}
html body.pl .pn-stele[data-k="constella"] { --soul: #F0B83A; --soul2: #9CC2FF; }
html body.pl .pn-stele[data-k="astrae"]    { --soul: #B48CFF; --soul2: #E8C46A; }
html body.pl .pn-stele[data-k="akasha"]    { --soul: #E6B866; --soul2: #F3ECDC; }
html body.pl .pn-stele[data-k="corpus"]    { --soul: #4FC29A; --soul2: #E2C77E; }
html body.pl .pn-stele[data-k="sapientia"] { --soul: #4FDCF5; --soul2: #7FA6FF; }

html body.pl .pn-body {
  position: relative; isolation: isolate; flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 16px 18px 0;
  border-radius: 50% 50% 16px 16px / 112px 112px 16px 16px;
  border: 1px solid color-mix(in srgb, var(--soul2) 26%, rgba(232, 196, 106, .3));
  background:
    radial-gradient(110% 46% at 50% 0%, color-mix(in srgb, var(--soul) 17%, transparent), transparent 66%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #262849 0%, #1A1B3C 38%, #111232 72%, #0C0D27 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 214, .09), inset 1px 0 0 rgba(255, 244, 214, .03), inset -1px 0 0 rgba(0, 0, 0, .3),
    inset 0 -40px 50px -20px rgba(0, 0, 0, .4),
    0 22px 44px -18px rgba(0, 0, 0, .7);
  transition: transform .45s var(--pn-ease), border-color .35s ease;
}
html body.pl .pn-body::before {   /* le filet d'or gravé, à 6 px du bord */
  content: ""; position: absolute; inset: 6px; z-index: -1; border-radius: 50% 50% 11px 11px / 106px 106px 11px 11px; pointer-events: none;
  border: 1px solid rgba(232, 196, 106, .15);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
  transition: border-color .35s ease;
}
html body.pl .pn-body::after {   /* le socle : une dalle plus large, posée sur une flaque de lumière */
  content: ""; position: absolute; left: -9px; right: -9px; bottom: -11px; height: 13px; z-index: -1; border-radius: 3px 3px 7px 7px;
  background: linear-gradient(180deg, #2C2D58, #14153A 60%, #0C0D26);
  border-top: 1px solid rgba(232, 196, 106, .5);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .5), 0 14px 26px -8px color-mix(in srgb, var(--soul) 42%, transparent), 0 18px 30px rgba(0, 0, 0, .45);
}

/* la couronne : la pierre du cercle, sur l'anneau de SYNAXIS */
html body.pl .pn-crown { position: relative; width: 100%; height: 168px; display: grid; place-items: center; margin: 2px 0 6px; }
html body.pl .pn-crown > * { grid-area: 1 / 1; }
html body.pl .pn-halo {
  width: 176px; height: 176px; border-radius: 50%; opacity: .7;
  background: radial-gradient(circle, color-mix(in srgb, var(--soul) 42%, transparent) 0%, color-mix(in srgb, var(--soul) 12%, transparent) 46%, transparent 70%);
}
html body.pl .pn-orbit {
  width: 138px; height: 138px; border-radius: 50%;
  border: 1px solid rgba(232, 196, 106, .42);
  box-shadow: 0 0 0 7px rgba(232, 196, 106, .0), 0 0 0 8px rgba(232, 196, 106, .1);
}
html body.pl .pn-glyph { font-size: 40px; line-height: 1; color: var(--soul); text-shadow: 0 0 12px currentColor; }
html body.pl .pn-stone {
  position: relative; height: 154px; width: auto; max-width: none;
  filter: brightness(1.14) drop-shadow(0 12px 12px rgba(0, 0, 0, .55)) drop-shadow(0 0 16px color-mix(in srgb, var(--soul) 30%, transparent));
  transition: transform .5s var(--pn-ease);
}

/* le visage : nom, phrase d'identité, points forts */
html body.pl .pn-face { display: grid; justify-items: center; align-content: start; gap: 6px; width: 100%; padding: 0 2px 18px; }
html body.pl .pn-axis { margin: 0 !important; font: 400 10.5px/1.3 var(--pl-display); letter-spacing: .3em; text-transform: uppercase; color: color-mix(in srgb, var(--soul2) 80%, #F0E6CC) !important; }
html body.pl .pn-name {
  margin: 0; font-family: var(--pl-display); font-weight: 500; font-size: 22px; letter-spacing: .16em; line-height: 1.15;
  background: linear-gradient(180deg, #FBF5E4 25%, color-mix(in srgb, var(--soul) 55%, #F0E6CC) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
html body.pl .pn-motto { margin: 0 !important; font-style: italic; font-size: 17px; line-height: 1.35; color: color-mix(in srgb, var(--soul) 42%, #F0E6CC) !important; text-wrap: balance; }
html body.pl .pn-orn {
  position: relative; display: block; width: 74%; height: 9px; margin: 4px 0 6px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--soul) 55%, rgba(232, 196, 106, .6)), transparent) center / 100% 1px no-repeat;
}
html body.pl .pn-orn i {
  position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; transform: translate(-50%, -50%) rotate(45deg);
  background: #12133A; border: 1px solid var(--soul2);
}
html body.pl .pn-feats { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; justify-self: center; text-align: left; }
html body.pl .pn-feats li { display: grid; grid-template-columns: 12px 1fr; gap: 8px; align-items: baseline; font-size: 15.5px; line-height: 1.4; color: var(--pn-text); }
html body.pl .pn-feats li::before {
  content: ""; width: 5px; height: 5px; justify-self: center; transform: translateY(-2px) rotate(45deg);
  background: var(--soul); box-shadow: 0 0 6px color-mix(in srgb, var(--soul) 70%, transparent);
}
html body.pl .pn-more { margin: 4px 0 0 !important; font-size: 14.5px; font-style: italic; color: rgba(240, 230, 204, .56) !important; }

/* le socle : les deux actions, sous un filet d'or */
html body.pl .pn-socle {
  align-self: stretch; margin: auto -18px 0; padding: 16px 16px 16px;
  display: grid; gap: 4px; justify-items: stretch;
  border-radius: 0 0 15px 15px;
  background:
    linear-gradient(90deg, transparent, rgba(232, 196, 106, .55), transparent) top / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(4, 4, 18, .2), rgba(4, 4, 18, .5));
}

/* ── 5. Les boutons sacrés ───────────────────────────────────────────────── */
html body.pl .pn-rite {
  position: relative; overflow: hidden; isolation: isolate; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 18px; border-radius: 999px;
  font: 400 13px/1 var(--pl-display); letter-spacing: .18em; text-transform: uppercase; color: #FBF3DD;
  border: 1px solid rgba(232, 196, 106, .68);
  background:
    radial-gradient(120% 140% at 50% 125%, color-mix(in srgb, var(--soul) 34%, transparent), transparent 62%),
    linear-gradient(180deg, #2B2B5E, #16163C);
  box-shadow: inset 0 1px 0 rgba(255, 238, 196, .26), inset 0 -1px 0 rgba(0, 0, 0, .45), 0 8px 18px -10px color-mix(in srgb, var(--soul) 80%, transparent);
  transition: transform .2s var(--pn-ease), border-color .3s ease, color .3s ease;
}
html body.pl .pn-rite::before {   /* la lumière monte du socle */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(90% 130% at 50% 115%, color-mix(in srgb, var(--soul) 58%, transparent), transparent 72%);
  opacity: 0; transition: opacity .4s ease;
}
html body.pl .pn-rite > span[aria-hidden="true"] { display: inline-block; color: var(--pn-gold); transition: transform .3s var(--pn-ease); }
html body.pl .pn-veil {
  min-height: 44px; padding: 0 12px; border: 0; background: none; cursor: pointer;
  font: inherit; font-style: italic; font-size: 16px; line-height: 1.2; color: rgba(240, 230, 204, .78);
  text-decoration: underline 1px rgba(232, 196, 106, .38); text-underline-offset: 5px;
  transition: color .3s ease, text-decoration-color .3s ease;
}
html body.pl .pn-rite:active, html body.pl .pn-veil:active { transform: scale(.985); }
html body.pl :is(.pn-rite, .pn-veil):focus-visible { outline: 2px solid var(--soul2); outline-offset: 3px; }

/* ── 6. Survol et focus : la lumière monte, rien ne clignote ─────────────── */
@media (hover: hover) {
  html body.pl .pn-body:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--soul2) 40%, rgba(232, 196, 106, .55)); }
  html body.pl .pn-body:hover::before { border-color: rgba(232, 196, 106, .32); }
  html body.pl .pn-body:hover .pn-stone { transform: translateY(-4px) scale(1.025); }
  html body.pl .pn-body:hover .pn-halo { opacity: 1; }
  html body.pl .pn-rite:hover { border-color: #F6DC98; color: #FFF8E6; }
  html body.pl .pn-rite:hover::before { opacity: 1; }
  html body.pl .pn-rite:hover > span[aria-hidden="true"] { transform: translateX(3px); }
  html body.pl .pn-veil:hover { color: #FFF6DC; text-decoration-color: var(--pn-gold); }
}
html body.pl .pn-body:focus-within::before { border-color: rgba(232, 196, 106, .32); }
html body.pl .pn-body:focus-within .pn-halo { opacity: 1; }
html body.pl .pn-halo { transition: opacity .5s ease; }

/* la respiration : très lente, décalée d'une stèle à l'autre, seulement à l'écran */
@keyframes pn-souffle { from { opacity: .5; } to { opacity: .85; } }
html body.pl .pn.is-awake .pn-halo { animation: pn-souffle 7.5s ease-in-out infinite alternate; }
html body.pl .pn.is-awake .pn-stele:nth-child(2) .pn-halo { animation-delay: -1.5s; }
html body.pl .pn.is-awake .pn-stele:nth-child(3) .pn-halo { animation-delay: -3s; }
html body.pl .pn.is-awake .pn-stele:nth-child(4) .pn-halo { animation-delay: -4.5s; }
html body.pl .pn.is-awake .pn-stele:nth-child(5) .pn-halo { animation-delay: -6s; }
@media (hover: hover) { html body.pl .pn.is-awake .pn-body:hover .pn-halo { animation: none; } }
html body.pl .pn.is-awake .pn-body:focus-within .pn-halo { animation: none; }

/* ── 7. Rangée des cinq : stèles plus élancées, texte un peu plus serré ──── */
@container (min-width: 1040px) {
  html body.pl .pn-body { padding: 14px 14px 0; border-radius: 50% 50% 14px 14px / 96px 96px 14px 14px; }
  html body.pl .pn-body::before { border-radius: 50% 50% 9px 9px / 90px 90px 9px 9px; }
  html body.pl .pn-body::after { left: -5px; right: -5px; }   /* chaque socle reste à part : jamais une dalle continue */
  html body.pl .pn-crown { height: 156px; }
  html body.pl .pn-stone { height: 142px; }
  html body.pl .pn-halo { width: 160px; height: 160px; }
  html body.pl .pn-orbit { width: 126px; height: 126px; }
  html body.pl .pn-name { font-size: 19px; letter-spacing: .13em; }
  html body.pl .pn-motto { font-size: 16px; }
  html body.pl .pn-feats li { font-size: 15px; }
  html body.pl .pn-socle { margin-inline: -14px; padding-inline: 12px; }
  html body.pl .pn-rite { padding: 0 12px; letter-spacing: .15em; }
}

/* ── 8. Téléphone : la pile garde son prestige, rien ne se tasse ────────── */
@container (max-width: 559px) {
  html body.pl .pn-steles { gap: 50px; }
  html body.pl .pn-body { padding-inline: 20px; }
  html body.pl .pn-name { font-size: 23px; }
  html body.pl .pn-feats li { font-size: 16px; }
  html body.pl .pn-socle { margin-inline: -20px; padding: 16px 18px 18px; }
  html body.pl .pn-rite { min-height: 50px; font-size: 13.5px; }
}

/* ── 9. Économie de mouvement ────────────────────────────────────────────── */
html.pl-reduced body.pl .pn .pn-halo, .pl--rapide .pn .pn-halo, html.lx-lite body.pl .pn .pn-halo { animation: none !important; }
html.pl-reduced body.pl :is(.pn-body, .pn-stone, .pn-rite, .pn-rite::before, .pn-halo) { transition: none; }
@media (hover: hover) { html.pl-reduced body.pl .pn-body:hover, html.pl-reduced body.pl .pn-body:hover .pn-stone { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html body.pl .pn .pn-halo { animation: none !important; }
  html body.pl :is(.pn-body, .pn-stone, .pn-rite, .pn-halo) { transition: none; }
  html body.pl .pn-body:hover, html body.pl .pn-body:hover .pn-stone { transform: none; }
}
