/* Theyia Portal — cosmos statique (CSS pur, 0 GPU animé) */

:root {
  --bg-void: #020617;
  --bg-deep: #030712;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --earth: #38bdf8;
  --earth-glow: rgba(56, 189, 248, 0.45);
  --mind: #818cf8;
  --mind-glow: rgba(129, 140, 248, 0.45);
  --glass: rgba(8, 15, 35, 0.62);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.06);
  --radius: 28px;
  --radius-sm: 16px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-void);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════
   COSMOS — fond principal
   ═══════════════════════════════════════ */

.cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

/* Un seul calque plein écran = 1 texture GPU au lieu de 8–11 */
.cosmos__sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 70% at 50% 42%, transparent 28%, rgba(2, 6, 23, 0.55) 72%, rgba(2, 6, 23, 0.82) 100%),
    radial-gradient(2px 2px at 63% 19%, rgba(224, 231, 255, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 31% 11%, rgba(186, 230, 253, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 47% 33%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 18% 8%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1px 1px at 52% 52%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 78% 12%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 35% 68%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 88% 42%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 12% 38%, rgba(255, 255, 255, 0.38), transparent),
    linear-gradient(75deg, transparent 5%, rgba(99, 102, 241, 0.14) 35%, rgba(14, 165, 233, 0.1) 55%, transparent 85%),
    linear-gradient(105deg, transparent 5%, rgba(56, 189, 248, 0.18) 30%, rgba(129, 140, 248, 0.26) 48%, rgba(167, 139, 250, 0.18) 62%, transparent 90%),
    radial-gradient(ellipse 95% 75% at 50% 38%, rgba(88, 28, 135, 0.3) 0%, rgba(49, 46, 129, 0.12) 32%, transparent 62%),
    radial-gradient(ellipse 58% 48% at 18% 22%, rgba(14, 165, 233, 0.2) 0%, transparent 58%),
    radial-gradient(ellipse 52% 42% at 82% 26%, rgba(99, 102, 241, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 120% 80% at 50% 110%, rgba(15, 23, 42, 0.95) 0%, transparent 55%),
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(30, 27, 75, 0.5) 0%, transparent 50%),
    linear-gradient(180deg, #010409 0%, #020617 32%, #0f172a 68%, #020617 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 140% 55%, 140% 55%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-position: center, center, center, center, center, center, center, center, center, center, -10% -4%, -10% 10%, center, center, center, center, center, center;
  background-repeat: no-repeat;
}

/* Galaxie — pas de filter:drop-shadow (évite une texture GPU dédiée) */
.cosmos__galaxy {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(900px, 120vw);
  height: min(900px, 120vw);
  transform: translate(-50%, -55%);
  opacity: 0.74;
}

/* Planète décorative */
.cosmos__planet {
  position: absolute;
  bottom: -18%;
  right: -8%;
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(186, 230, 253, 0.35) 0%, transparent 25%),
    radial-gradient(circle at 50% 50%, #0c4a6e 0%, #082f49 35%, #020617 70%);
  box-shadow:
    inset -30px -20px 60px rgba(0, 0, 0, 0.6),
    inset 20px 20px 40px rgba(56, 189, 248, 0.08),
    0 0 80px rgba(14, 165, 233, 0.12);
}

.cosmos__planet::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 60% 20% at 30% 45%, rgba(34, 211, 238, 0.15), transparent),
    radial-gradient(ellipse 40% 15% at 60% 55%, rgba(56, 189, 248, 0.1), transparent);
  opacity: 0.8;
}

.cosmos__planet::after {
  content: "";
  position: absolute;
  top: 12%;
  left: 18%;
  width: 22%;
  height: 10%;
  border-radius: 50%;
  background: rgba(186, 230, 253, 0.18);
}

/* Anneau orbital */
.cosmos__ring {
  position: absolute;
  bottom: 8%;
  right: 5%;
  width: min(680px, 85vw);
  height: min(200px, 25vw);
  border: 2px solid rgba(186, 230, 253, 0.08);
  border-radius: 50%;
  transform: rotate(-18deg);
  box-shadow:
    0 0 40px rgba(56, 189, 248, 0.06),
    inset 0 0 30px rgba(99, 102, 241, 0.04);
  opacity: 0.72;
}

/* ═══════════════════════════════════════
   CONTENU
   ═══════════════════════════════════════ */

.shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px 100px;
}

/* ── Nav ── */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0 56px;
  animation: fadeUp 1s var(--ease) both;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.nav__emblem {
  width: auto;
  height: 88px;
  max-width: 220px;
  object-fit: contain;
  display: block;

}

@media (max-width: 640px) {
  .nav__emblem {
    height: 68px;
    max-width: 170px;
  }
}

.nav__brand span {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

.nav__actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.nav__social {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.nav__social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  text-decoration: none;
  flex-shrink: 0;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s var(--ease), border-color 0.2s, background 0.2s;
}

.nav__social-btn:hover,
.nav__social-btn:focus-visible {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.nav__social-btn:visited {
  color: var(--text-muted);
}

.nav__social-btn svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .nav__social {
    gap: 6px;
  }

  .nav__social-btn {
    width: 34px;
    height: 34px;
  }

  .nav__social-btn svg {
    width: 16px;
    height: 16px;
  }

  .btn-shop {
    padding: 11px 18px;
    font-size: 0.88rem;
  }
}

/* ── Langue (menu compact) ── */

.lang {
  position: relative;
}

.lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(8, 15, 35, 0.72);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  list-style: none;
  transition: color 0.25s var(--ease), border-color 0.25s, background 0.25s;
}

.lang__btn::-webkit-details-marker {
  display: none;
}

.lang__btn::marker {
  content: "";
}

.lang__btn:hover,
.lang[open] .lang__btn {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(14, 22, 42, 0.88);
}

.lang__btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.75;
}

.lang__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 148px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(8, 15, 35, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.lang__opt {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang__opt:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.lang__opt.is-active {
  color: var(--text);
  background: rgba(129, 140, 248, 0.12);
}

.lang__opt:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.btn-shop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(14, 22, 42, 0.92), rgba(8, 15, 35, 0.88));
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.btn-shop:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 40px rgba(139, 92, 246, 0.3);
}

.btn-shop svg {
  width: 18px;
  height: 18px;
}

/* ── Hero ── */

.hero {
  text-align: center;
  margin-bottom: 72px;
  animation: fadeUp 1.1s var(--ease) 0.15s both;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  margin-bottom: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 15, 35, 0.82);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #cbd5e1;
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.12);
}

.hero__eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--earth), var(--mind));
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.8);
  animation: pulse 2.5s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 12px rgba(129, 140, 248, 0.8); }
  50% { opacity: 0.7; transform: scale(0.85); box-shadow: 0 0 20px rgba(56, 189, 248, 0.6); }
}

.hero h1.hero__h1 {
  margin: 0 auto 24px;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-shadow: 0 0 60px rgba(129, 140, 248, 0.2);
  text-align: center;
}

.hero__h1-line {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  text-align: center;
}

@media (max-width: 640px) {
  .hero {
    padding-inline: 0;
    overflow-x: clip;
  }

  .hero h1.hero__h1 {
    /* Valeur sûre avant JS — évite le flash rogné au chargement */
    font-size: clamp(1.35rem, 7.2vw, 2.35rem);
    max-width: 100%;
  }

  .hero__lead,
  .hero__lead--sub {
    padding-inline: 4px;
    max-width: 100%;
  }

  .shell {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.hero h1.hero__h1 .gradient {
  background: linear-gradient(135deg, #7dd3fc 0%, #a5b4fc 40%, #c4b5fd 70%, #f0abfc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

}

.hero__lead {
  max-width: 580px;
  margin: 0 auto;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.hero__lead--sub {
  margin-top: 0.65rem;
  font-size: 1rem;
  color: var(--text-dim);
}

/* ── Cards ── */

.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 100px;
}

@media (max-width: 768px) {
  .products { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 44px 40px 40px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: linear-gradient(160deg, rgba(22, 32, 58, 0.94) 0%, rgba(10, 18, 38, 0.9) 45%, rgba(8, 15, 35, 0.88) 100%);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.45s, box-shadow 0.45s;
  animation: fadeUp 1.2s var(--ease) both;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 var(--glass-highlight);
}

.card--terra { animation-delay: 0.25s; }
.card--neura { animation-delay: 0.4s; }

.card__glow {
  position: absolute;
  inset: -50%;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.card--terra .card__glow {
  background: radial-gradient(circle at 30% 20%, var(--earth-glow), transparent 50%);
}

.card--neura .card__glow {
  background: radial-gradient(circle at 70% 20%, var(--mind-glow), transparent 50%);
}

.card.is-switching {
  transform: scale(0.985);
  opacity: 0.92;
  transition-duration: 60ms;
}

.card:hover {
  transform: translateY(-10px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.18);
}

.card--terra:hover {
  box-shadow:
    0 32px 80px rgba(14, 165, 233, 0.25),
    0 0 0 1px rgba(56, 189, 248, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

.card--neura:hover {
  box-shadow:
    0 32px 80px rgba(99, 102, 241, 0.28),
    0 0 0 1px rgba(129, 140, 248, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

.card:hover .card__glow { opacity: 1; }

.card__logo {
  width: 96px;
  height: 96px;
  margin-bottom: 32px;
  transition: transform 0.45s var(--ease), filter 0.45s;
}

.card--terra .card__logo {
  filter: drop-shadow(0 6px 18px rgba(14, 165, 233, 0.35));
}

.card--neura .card__logo {
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.15));
}

.card:hover .card__logo {
  transform: scale(1.08) translateY(-4px);
}

.card--terra:hover .card__logo {
  filter: drop-shadow(0 8px 24px rgba(14, 165, 233, 0.5));
}

.card--neura:hover .card__logo {
  filter: drop-shadow(0 0 28px rgba(255, 255, 255, 0.25));
}

.card__tag {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.card--terra .card__tag { color: #7dd3fc; text-shadow: 0 0 20px rgba(56, 189, 248, 0.5); }
.card--neura .card__tag { color: #a5b4fc; text-shadow: 0 0 20px rgba(129, 140, 248, 0.5); }

.card h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.card__desc {
  flex: 1;
  margin: 0 0 32px;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 15px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  transition: gap 0.35s var(--ease);
}

.card--terra .card__cta {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  color: #fff;
  box-shadow: 0 4px 24px rgba(14, 165, 233, 0.45);
}

.card--neura .card__cta {
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.45);
}

.card:hover .card__cta { gap: 14px; }

.card__cta svg {
  width: 18px;
  height: 18px;
  transition: transform 0.35s var(--ease);
}

.card:hover .card__cta svg { transform: translateX(4px); }

/* ── Shop ── */

.shop {
  padding: 72px 0 0;
  animation: fadeUp 1.2s var(--ease) 0.55s both;
}

.shop__header {
  text-align: center;
  margin-bottom: 52px;
}

.shop__header h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  text-shadow: 0 0 40px rgba(129, 140, 248, 0.15);
}

.shop__header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.shop__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.shop__grid--single {
  grid-template-columns: minmax(0, 360px);
  justify-content: center;
}

@media (max-width: 900px) {
  .shop__grid { grid-template-columns: 1fr; }
}

.shop-item {
  padding: 32px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(10, 18, 38, 0.9);
  text-align: center;
  transition: border-color 0.35s, transform 0.35s var(--ease), box-shadow 0.35s;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.shop-item--link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.shop-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(99, 102, 241, 0.12);
}

.shop-item__icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.2));
}

.shop-item h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.shop-item p {
  margin: 0 0 18px;
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.55;
}

.shop-item__price {
  font-weight: 700;
  font-size: 1.1rem;
}

.shop-item__cta {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.shop-item__badge {
  display: inline-block;
  margin-top: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.2);
}

/* ── Footer ── */

.footer {
  margin-top: 88px;
  padding-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-dim);
  animation: fadeUp 1.2s var(--ease) 0.65s both;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer a:hover { color: var(--text); }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  margin-bottom: 16px;
}

.footer__link,
.footer__link-btn {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.footer__link:hover,
.footer__link-btn:hover {
  color: var(--text-muted);
}

.footer__sep {
  color: rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
  user-select: none;
}

/* ── Pages légales statiques ── */

.shell--legal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.nav--legal {
  justify-content: space-between;
}

.legal-page__back {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.legal-page__back:hover {
  color: var(--text);
}

.legal-page {
  flex: 1;
  max-width: 640px;
  margin: 48px auto 64px;
  padding: 0 24px;
  animation: fadeUp 0.8s var(--ease) both;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.legal-page__body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.legal-page__body p + p {
  margin-top: 14px;
}

.legal-page__body strong {
  color: var(--text);
  font-weight: 600;
}

.legal-page__body code {
  font-size: 0.85em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.legal-page__cta {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  color: #c4b5fd;
  text-decoration: none;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.legal-page__cta:hover {
  border-color: rgba(167, 139, 250, 0.45);
}

/* ── Dialog légal portail ── */

/* Standard Theyia — lightbox épurée (feuille centrée, pas de boîte dialog) */
.standard-lightbox {
  padding: 0;
  border: none;
  margin: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  background: transparent;
  color: inherit;
}

.standard-lightbox::backdrop {
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(49, 46, 129, 0.35), transparent 70%),
    rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(10px);
}

.standard-lightbox__close {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(8, 15, 35, 0.72);
  color: #e8eef5;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.standard-lightbox__close:hover {
  background: rgba(24, 32, 56, 0.9);
  border-color: rgba(167, 139, 250, 0.4);
  transform: scale(1.04);
}

.standard-lightbox__figure {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.standard-lightbox__figure img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  object-fit: contain;
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 80px rgba(0, 0, 0, 0.55);
  animation: standard-lightbox-in 0.28s ease-out;
}

@keyframes standard-lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .standard-lightbox__figure img {
    animation: none;
  }
}

.portal-dialog {
  padding: 0;
  border: none;
  max-width: min(560px, calc(100vw - 32px));
  background: transparent;
  color: var(--text);
}

.portal-dialog::backdrop {
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
}

.portal-dialog__panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(8, 15, 35, 0.98);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.portal-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-dialog__header h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.portal-dialog__close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.portal-dialog__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.portal-dialog__body {
  padding: 20px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.portal-legal__lead {
  color: var(--text);
  margin-bottom: 8px;
}

.portal-legal__meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.portal-legal__h3 {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin: 18px 0 10px;
}

.portal-legal__list {
  margin: 0;
  padding-left: 1.1rem;
}

.portal-legal__list li + li {
  margin-top: 10px;
}

.portal-legal__note {
  font-size: 0.85rem;
  font-style: italic;
}

.portal-legal__products {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.portal-legal a {
  color: #93c5fd;
}

/* ── Sélecteur langue (pied de page, style Tesla) ── */

.locale-switcher {
  margin-top: 20px;
}

.locale-switcher__details {
  position: relative;
  display: inline-block;
}

.locale-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s;
}

.locale-switcher__trigger::-webkit-details-marker {
  display: none;
}

.locale-switcher__trigger::after {
  content: "▾";
  font-size: 0.65rem;
  opacity: 0.55;
  margin-left: 2px;
}

.locale-switcher__trigger:hover,
.locale-switcher__details[open] .locale-switcher__trigger {
  color: var(--text-muted);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.locale-switcher__list {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  min-width: 220px;
  margin: 0;
  padding: 6px;
  list-style: none;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(8, 15, 35, 0.97);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}

.locale-switcher__opt {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.locale-switcher__opt:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.locale-switcher__opt.is-active {
  color: var(--text);
  background: rgba(129, 140, 248, 0.12);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}


