.constellation-web {width:100%; max-width:none; margin:2rem 0; padding:0; color:#fff; font:1.1875rem/1.65 system-ui,sans-serif; text-align:left;}
:root {
  --portal-border-color: rgba(205, 238, 215, 0.38);
  --portal-bg-start: #020604;
  --portal-bg-end: #000000;
  --portal-inner-shadow: rgba(0, 0, 0, 0.72);
  --portal-text-color: #ffffff;
  --portal-link-color: #e9f8ed;
  --portal-link-hover-color: #ffffff;

  --portal-wave-core: rgba(235, 255, 240, 1);
  --portal-wave-soft: rgba(165, 235, 180, 0.28);
}


/* ==========================================================
   FENÊTRE
   ========================================================== */

.portal-window {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: 1.5rem 1.75rem;

  border: 1px solid var(--portal-border-color);
  border-radius: 15px;

  background:
    linear-gradient(
      135deg,
      var(--portal-bg-start),
      var(--portal-bg-end)
    );

  box-shadow:
    inset 0 0 1.5rem var(--portal-inner-shadow),
    0 0.5rem 1.5rem rgba(0, 0, 0, 0.45);

  color: var(--portal-text-color);

  display: flex;
  justify-content: center;
  align-items: center;

  text-align: center;
  isolation: isolate;
  overflow: hidden;

  transition:
    transform 180ms ease-out,
    box-shadow 180ms ease-out;
}


/* ==========================================================
   SUPPRESSION DES ANCIENS EFFETS
   Aucun conic-gradient.
   Aucune rotation.
   ========================================================== */

.portal-window::before,
.portal-window::after {
  content: none !important;
}


/* ==========================================================
   VRAI CONTOUR SVG
   ========================================================== */

.portal-wave {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  display: block;
  pointer-events: none;

  z-index: 1;
  overflow: visible;
}


/* ==========================================================
   CONTOUR FIXE
   ========================================================== */

.portal-wave-base {
  fill: none;

  stroke: rgba(205, 238, 215, 0.32);
  stroke-width: 1;

  vector-effect: non-scaling-stroke;
}


/* ==========================================================
   ONDE LUMINEUSE
   ----------------------------------------------------------
   Le segment se déplace sur le chemin SVG.
   Il ne tourne pas dans la fenêtre.
   ========================================================== */

.portal-wave-light {
  fill: none;

  stroke: var(--portal-wave-core);
  stroke-width: 2;

  stroke-linecap: round;
  stroke-linejoin: round;

  stroke-dasharray: 55 945;
  stroke-dashoffset: 0;

  vector-effect: non-scaling-stroke;

  filter:
    drop-shadow(0 0 2px rgba(225, 255, 232, 0.85))
    drop-shadow(0 0 6px rgba(150, 235, 170, 0.30));

  animation:
    seed-border-wave
    8s
    linear
    infinite;
}


/* ==========================================================
   DÉPLACEMENT SUR LE PÉRIMÈTRE
   ========================================================== */

@keyframes seed-border-wave {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -1000;
  }
}


/* ==========================================================
   HOVER DU CADRE
   ========================================================== */

.portal-window:hover {
  transform: translateY(-2px);

  box-shadow:
    inset 0 0 1.75rem rgba(0, 0, 0, 0.75),
    0 0.75rem 1.75rem rgba(0, 0, 0, 0.55);
}


/* ==========================================================
   LIENS
   ========================================================== */

.portal-links {
  position: relative;
  z-index: 10;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;

  gap: 0.5rem 0.7rem;
  font-size: 1.08rem;
}


/* ==========================================================
   LIENS INDIVIDUELS
   ========================================================== */

.portal-link {
  position: relative;
  display: inline-block;

  font-size: inherit;
  color: var(--portal-link-color);

  text-decoration: none;
  white-space: nowrap;

  padding: 0.15rem 0.35rem;
  border-radius: 999px;

  transition:
    color 300ms ease,
    text-shadow 300ms ease,
    transform 300ms ease;
}


/* Aucun petit cadre autour des liens */

.portal-link::before {
  content: none;
}


/* ==========================================================
   HOVER DES LIENS
   ========================================================== */

.portal-link:hover,
.portal-link:focus-visible {
  color: var(--portal-link-hover-color);
  background: transparent;

  transform: translateY(-1px);

  text-shadow:
    0 0 7px rgba(225, 255, 232, 0.55),
    0 0 18px rgba(165, 235, 180, 0.22);
}


/* ==========================================================
   ACCUEIL
   ========================================================== */

.portal-link-home {
  font-weight: 600;
}


/* ==========================================================
   SÉPARATEURS
   ========================================================== */

.portal-separator {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding: 0 0.15rem;

  font-size: 1.15rem;
  color: rgba(220, 245, 225, 0.62);
}


/* ==========================================================
   FOCUS CLAVIER
   ========================================================== */

.portal-link:focus-visible {
  outline: 1px solid rgba(220, 255, 230, 0.75);
  outline-offset: 4px;
  border-radius: 3px;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 640px) {
  .portal-window {
    padding: 1.25rem 1.1rem;
    border-radius: 13px;
  }

  .portal-links {
    gap: 0.4rem 0.5rem;
    font-size: 1rem;
  }

  .portal-separator {
    font-size: 1.05rem;
  }
}


/* ==========================================================
   ACCESSIBILITÉ
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
  .portal-wave-light {
    animation: none;
    stroke: rgba(225, 255, 232, 0.72);
  }
}


/* Constellation centrée, avec une largeur limitée. */
.details-widget.sources-widget.constellation-web {
  box-sizing: border-box;
  width: 100%;
  max-width: 900px;
  margin: 30px auto 40px;
  padding: 0;
}
.constellation-web .portal-window {width:100%; max-width:900px; margin:0 auto;}


@media(max-width:640px){.details-widget.sources-widget.constellation-web{width:calc(100% - 24px);}}
.scroll-tools{right:max(14px,env(safe-area-inset-right));bottom:calc(18px + env(safe-area-inset-bottom));gap:8px;}
.scroll-tools a{width:44px;height:44px;font-size:26px;line-height:1;touch-action:manipulation;}
.scroll-tools a:focus-visible{outline:3px solid #e8ffc7;outline-offset:3px;}
