*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base: #0a0a0b;
  --text-primary: #f0ead8;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-tertiary: rgba(255, 255, 255, 0.45);
  --ember-deep: #8b3a0f;
  --ember: #d4622a;
  --ember-bright: #f09042;
  --ember-pale: #ffc87a;
  --gold: #d4af6a;
  --gold-pale: rgba(212, 175, 106, 0.75);
  --success: #4ade80;
  --discord: #5865f2;
  --border-faint: rgba(255, 255, 255, 0.06);
  --border-soft: rgba(255, 255, 255, 0.1);
  --border-ember: rgba(212, 98, 42, 0.25);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: "DM Sans", sans-serif;
  overflow-x: hidden;
  position: relative;
}

::selection { background: rgba(212, 98, 42, 0.35); }

canvas#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ambient-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 450px;
  background: radial-gradient(ellipse, rgba(212, 98, 42, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
@keyframes sigil-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes btn-shimmer {
  from { left: -100%; }
  to { left: 200%; }
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}
@keyframes node-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(212, 98, 42, 0.12); }
  50% { box-shadow: 0 0 20px rgba(212, 98, 42, 0.25); }
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.stage { position: relative; z-index: 1; }

/* ── Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-faint);
}
.site-nav-brand {
  font-family: "Cinzel", serif;
  font-weight: 700;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.site-nav-brand-top { font-size: 15px; letter-spacing: 0.12em; }
.site-nav-brand-bottom {
  font-size: 8px;
  color: var(--gold-pale);
  letter-spacing: 0.25em;
  margin-top: 2px;
}
.site-nav-right { display: flex; align-items: center; gap: 24px; }
.nav-link {
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  text-transform: uppercase;
  padding-bottom: 4px;
  position: relative;
  transition: color 0.3s;
}
.nav-link:hover { color: var(--ember-bright); }
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 1px;
  background: var(--ember);
  transition: width 0.3s ease, left 0.3s ease;
}
.nav-link:hover::after { width: 100%; left: 0; }
.nav-discord {
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  transition: color 0.3s;
}
.nav-discord:hover { color: var(--discord); }

.lang-switch {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  background: none;
  border: 1px solid transparent;
  padding: 5px 14px;
  font-family: "Cinzel", serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  border-radius: 6px;
}
.lang-btn.active {
  background: rgba(212, 98, 42, 0.12);
  color: var(--ember-bright);
  border-color: var(--border-ember);
}

.nav-account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 4px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-faint);
  border-radius: 999px;
  cursor: pointer;
}
.nav-account-chip-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5865f2, #4752c4);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 12px;
  overflow: hidden;
}
.nav-account-chip-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nav-account-chip-name {
  font-family: "DM Sans", sans-serif;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
}

/* ── Buttons ── */
.btn-ornate {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  font-family: "Cinzel", serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  border: none;
  transition: all 0.35s ease;
}
.btn-ornate::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
}
.btn-ornate:hover::before { animation: btn-shimmer 0.7s ease forwards; }
.btn-ornate:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ember {
  background: linear-gradient(135deg, var(--ember-deep) 0%, var(--ember) 40%, var(--ember-bright) 60%, var(--ember) 100%);
  border: 1px solid rgba(240, 144, 66, 0.5);
  color: var(--bg-base);
  box-shadow:
    inset 0 0 0 2px rgba(10, 10, 11, 0.5),
    inset 0 0 0 3px rgba(240, 144, 66, 0.2),
    0 4px 24px rgba(212, 98, 42, 0.2);
}
.btn-ember:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow:
    inset 0 0 0 2px rgba(10, 10, 11, 0.4),
    inset 0 0 0 3px rgba(240, 144, 66, 0.35),
    0 8px 36px rgba(212, 98, 42, 0.35);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  box-shadow:
    inset 0 0 0 2px rgba(10, 10, 11, 0.9),
    inset 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.btn-ghost:hover:not(:disabled) {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-discord {
  background: var(--discord);
  border: 1px solid rgba(88, 101, 242, 0.6);
  color: white;
  box-shadow:
    inset 0 0 0 2px rgba(10, 10, 11, 0.2),
    0 4px 24px rgba(88, 101, 242, 0.2);
}
.btn-discord:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 8px 36px rgba(88, 101, 242, 0.4);
}

/* XIVAuth — gradient corail→bleu inspiré du logo officiel (fond polygonal rouge/bleu, clé blanche) */
:root {
  --xivauth-coral: #d6543a;
  --xivauth-blue: #4a85b3;
}
.btn-xivauth {
  background: linear-gradient(135deg, var(--xivauth-coral) 0%, #b56755 35%, #6a7da0 65%, var(--xivauth-blue) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  box-shadow:
    inset 0 0 0 2px rgba(10, 10, 11, 0.25),
    0 4px 24px rgba(74, 133, 179, 0.18);
}
.btn-xivauth:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.08) saturate(1.1);
  box-shadow: 0 8px 36px rgba(214, 84, 58, 0.28);
}
.btn-xivauth-logo {
  /* Le PNG fourni est une silhouette sombre sur transparent : on l'inverse pour avoir une clé blanche sur le bouton coloré. */
  filter: brightness(0) invert(1);
  display: block;
}

.login-providers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 28px;
}
.login-providers .btn-ornate {
  justify-content: center;
  min-height: 52px;
  padding: 12px 28px;
}
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  color: var(--text-tertiary);
  font-family: "Cinzel", serif;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.login-divider::before, .login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-faint), transparent);
}

.btn-diamond { font-size: 8px; opacity: 0.55; line-height: 1; }

/* ── Hero / landing ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 40px 100px;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(212, 98, 42, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  opacity: 0.5;
}
.hero-glow {
  position: absolute;
  top: -10%; left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(212, 98, 42, 0.05) 0%, transparent 65%);
  pointer-events: none;
}
.hero-sigil-wrap {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(85vw, 720px);
  aspect-ratio: 1;
  pointer-events: none;
}
.sigil-outer { animation: sigil-spin 200s linear infinite; }
.sigil-inner { animation: sigil-spin 280s linear infinite reverse; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(212, 98, 42, 0.06);
  border: 1px solid rgba(212, 98, 42, 0.2);
  border-radius: 999px;
  padding: 6px 20px;
  margin-bottom: 32px;
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(240, 144, 66, 0.95);
  text-transform: uppercase;
  position: relative;
  z-index: 2;
  animation: fadeUp 0.8s 0.05s ease both;
}
.hero-badge-icon { opacity: 0.7; animation: shimmer 2s infinite; }

.hero-title {
  font-family: "Cinzel", serif;
  font-size: clamp(42px, 8vw, 88px);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.05;
  margin-bottom: 24px;
  text-shadow: 0 0 80px rgba(212, 98, 42, 0.12);
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeUp 0.8s ease both;
}
.hero-title-main { margin-top: 12px; }
.hero-title-connect {
  background: linear-gradient(135deg, #d4622a 0%, #f09042 45%, #ffc87a 70%, #f09042 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.hero-title-sub {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(212, 175, 106, 0.6);
  margin-top: 4px;
}
.hero-sub {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(17px, 2.2vw, 22px);
  font-style: italic;
  color: rgba(255, 255, 255, 0.6);
  max-width: 580px;
  line-height: 1.6;
  margin-bottom: 48px;
  padding: 0 8px;
  position: relative;
  z-index: 2;
  animation: fadeUp 0.8s 0.15s ease both;
}
.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  position: relative;
  z-index: 2;
  animation: fadeUp 0.8s 0.3s ease both;
}
.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-family: "Cinzel", serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.25s;
}
.hero-cta-secondary:hover { color: var(--ember-bright); }

/* ── Features ── */
.features {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 40px 100px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
}
.feature-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-faint);
  border-radius: 14px;
  padding: 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: default;
}
.feature-card:hover {
  border-color: var(--border-ember);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.feature-card-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(212, 98, 42, 0.08);
  border: 1px solid rgba(212, 98, 42, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ember-bright);
}
.feature-card-title {
  font-family: "Cinzel", serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.feature-card-desc {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Page frame ── */
.page-frame {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px;
}

/* ── Login ── */
.login-card {
  max-width: 480px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.008) 100%);
  border: 1px solid var(--border-ember);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent 3%, var(--ember) 50%, transparent 97%);
  opacity: 0.6;
}
.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(212, 98, 42, 0.06);
  border: 1px solid rgba(212, 98, 42, 0.2);
  border-radius: 999px;
  padding: 5px 16px;
  margin-bottom: 24px;
  font-family: "Cinzel", serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ember-bright);
  text-transform: uppercase;
}
.login-title {
  font-family: "Cinzel", serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.login-sub {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 36px;
}
.login-discord-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}
.login-scope-note {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.6;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-faint);
  border-radius: 10px;
  text-align: left;
}
.login-scope-note strong { color: var(--gold); font-weight: 500; }
.login-warning {
  margin-top: 16px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 13.5px;
  color: rgba(212, 175, 106, 0.7);
  line-height: 1.5;
}

/* ── Link ── */
.link-hero { text-align: center; margin-bottom: 56px; }
.link-title {
  font-family: "Cinzel", serif;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  color: var(--text-primary);
}
.link-sub {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.55;
}
.link-card {
  max-width: 620px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-faint);
  border-radius: 20px;
  padding: 48px 40px;
}
.link-step {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.link-step-number {
  width: 32px; height: 32px;
  transform: rotate(45deg);
  background: rgba(212, 98, 42, 0.1);
  border: 1.5px solid rgba(212, 98, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: node-pulse 3s ease-in-out infinite;
}
.link-step-number > span {
  transform: rotate(-45deg);
  font-family: "Cinzel", serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ember-bright);
}
.link-step-text {
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.link-step-text code {
  font-family: "DM Sans", monospace;
  font-size: 13px;
  padding: 2px 8px;
  background: rgba(212, 98, 42, 0.08);
  border: 1px solid var(--border-ember);
  border-radius: 6px;
  color: var(--ember-bright);
}

.code-input-wrap {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 32px 0 12px;
}
.code-input-cell {
  width: 48px; height: 60px;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid var(--border-soft);
  border-radius: 10px;
  font-family: "DM Sans", sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--ember-bright);
  text-align: center;
  letter-spacing: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
  caret-color: var(--ember-bright);
  text-transform: uppercase;
  outline: none;
}
.code-input-cell:focus {
  border-color: var(--ember-bright);
  box-shadow: 0 0 18px rgba(240, 144, 66, 0.25);
}
.code-input-cell.filled {
  border-color: rgba(212, 98, 42, 0.5);
  box-shadow: 0 0 16px rgba(212, 98, 42, 0.18);
}
.code-input-sep {
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 18px;
}

.link-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 32px;
}
.link-meta-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: live-pulse 2s infinite;
}
.link-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.link-error {
  margin-top: 16px;
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: #ef4444;
  min-height: 1.5em;
}

/* ── Account ── */
.account-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
}
@media (max-width: 768px) {
  .account-layout { grid-template-columns: 1fr; }
}

.sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-faint);
  border-radius: 14px;
  padding: 14px;
}
.sidebar-title {
  font-family: "Cinzel", serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 8px 12px 12px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-family: "Cinzel", serif;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.sidebar-link:hover { background: rgba(255, 255, 255, 0.03); color: var(--text-primary); }
.sidebar-link.active {
  background: rgba(212, 98, 42, 0.08);
  color: var(--ember-bright);
}
.sidebar-link.disabled { opacity: 0.35; cursor: not-allowed; }
.sidebar-link-soon {
  margin-left: auto;
  font-family: "DM Sans", sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--gold-pale);
  text-transform: uppercase;
}

.sidebar-divider {
  height: 1px;
  margin: 12px 12px;
  background: var(--border-faint);
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 0px);
  padding: 10px 12px;
  background: transparent;
  border: none;
  font-family: "Cinzel", serif;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.sidebar-logout:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

.account-main-title {
  font-family: "Cinzel", serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.account-main-sub {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.account-section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 20px;
}
.account-section-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212, 98, 42, 0.2), transparent);
}
.account-section-divider-text {
  font-family: "Cinzel", serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-pale);
}

.uid-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-faint);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
}
.uid-card:hover {
  border-color: var(--border-ember);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.uid-card-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: linear-gradient(to right, transparent 3%, var(--ember) 50%, transparent 97%);
  opacity: 0.5;
}
.uid-card-row {
  display: flex;
  align-items: center;
  gap: 18px;
}
.uid-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(212, 98, 42, 0.08);
  border: 1px solid rgba(212, 98, 42, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.uid-card-icon > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
}
.uid-card-body { flex: 1; min-width: 0; }
.uid-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.uid-card-uid {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.uid-card-alias {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 16px;
  color: var(--gold);
}
.uid-card-meta {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}
.uid-card-badges { display: flex; gap: 8px; align-items: center; }
.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(212, 175, 106, 0.08);
  border: 1px solid rgba(212, 175, 106, 0.3);
  border-radius: 999px;
  font-family: "Cinzel", serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.badge-verified-diamond {
  width: 6px; height: 6px;
  transform: rotate(45deg);
  background: var(--gold);
  opacity: 0.85;
}
.uid-card-actions { display: flex; gap: 10px; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-soft);
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.icon-btn:hover {
  color: var(--ember-bright);
  border-color: var(--border-ember);
  background: rgba(212, 98, 42, 0.06);
}
.icon-btn.danger:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.06);
}

.identity-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: flex-start;
}

.add-uid-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 768px) {
  .add-uid-grid { grid-template-columns: 1fr; }
}

.add-uid-card {
  background: transparent;
  border: 1.5px dashed var(--border-soft);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}
.add-uid-card:hover {
  border-color: var(--border-ember);
  background: rgba(212, 98, 42, 0.02);
}
.add-uid-card-xivauth:hover {
  border-color: rgba(214, 84, 58, 0.45);
  background: linear-gradient(135deg, rgba(214,84,58,0.04), rgba(74,133,179,0.04));
}
.add-uid-card-xivauth .add-uid-card-title { color: var(--gold); }

/* Carte de personnage XIVAuth dans la liste "Mes personnages" */
.uid-card-icon-xivauth {
  background: linear-gradient(135deg, var(--xivauth-coral, #d6543a) 0%, #b56755 35%, #6a7da0 65%, var(--xivauth-blue, #4a85b3) 100%) !important;
  border-color: rgba(255,255,255,0.18) !important;
}
.uid-card-icon-avatar, .identity-card-icon-avatar {
  overflow: hidden;
  padding: 0 !important;
}

/* Liste des personnages associés à une SecretKey UmbraSync */
.identity-card-umbra { align-items: flex-start; }
.umbra-characters-list {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-faint);
}
.umbra-characters-label {
  font-family: "Cinzel", serif;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-pale);
  margin-bottom: 8px;
}
.umbra-characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px 14px;
}
.umbra-character {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
}
.umbra-character::before {
  content: "◆";
  font-size: 7px;
  color: var(--ember-bright);
  opacity: 0.75;
}
.umbra-character-name {
  color: var(--text-primary);
  font-weight: 500;
}
.umbra-character-world {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 13px;
  color: var(--gold);
}
.uid-card-xivauth .uid-card-stripe {
  background: linear-gradient(to right, transparent 3%, var(--xivauth-coral, #d6543a) 30%, var(--xivauth-blue, #4a85b3) 70%, transparent 97%);
  opacity: 0.45;
}
.add-uid-card-title {
  font-family: "Cinzel", serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember-bright);
  margin-bottom: 4px;
}
.add-uid-card-sub {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  color: var(--text-tertiary);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--text-tertiary);
}

/* ── Identity cards (Discord, XIVAuth, futurs providers) ── */
.identity-level {
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}
.identity-level strong {
  color: var(--gold);
  font-weight: 600;
  margin-left: 6px;
}
.identity-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-faint);
  border-radius: 14px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, background 0.3s;
}
.identity-card-link:hover {
  border-color: var(--border-ember);
  background: rgba(212, 98, 42, 0.02);
}
.identity-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.identity-card-icon-xiv {
  background: linear-gradient(135deg, var(--xivauth-coral) 0%, var(--xivauth-blue) 100%);
  border-color: rgba(255, 255, 255, 0.2);
}
.identity-card-body { flex: 1; min-width: 0; }
.identity-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.identity-card-name {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}
.identity-card-provider {
  font-family: "Cinzel", serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.identity-card-world {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  color: var(--gold-pale);
}
.identity-card-meta {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: var(--text-tertiary);
}
.identity-card-cta {
  font-family: "Cinzel", serif;
  font-size: 18px;
  color: var(--ember-bright);
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
}
.identity-card-link:hover .identity-card-cta {
  opacity: 1;
  transform: translateX(3px);
}

.page-section[hidden] { display: none; }

/* ── Footer ── */
.footer {
  max-width: 1200px;
  margin: 100px auto 0;
  padding: 40px;
  text-align: center;
  border-top: 1px solid var(--border-faint);
}
.footer-quote {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  color: rgba(212, 98, 42, 0.55);
  margin-bottom: 8px;
}
.footer-sub {
  font-size: 11px;
  color: var(--text-tertiary);
}
.footer-links {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-tertiary);
}
.footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  margin: 0 4px;
}
.footer-links a:hover { color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .sigil-outer, .sigil-inner,
  .hero-badge-icon, .link-step-number, .link-meta-dot,
  .feature-card, .uid-card { animation: none !important; transition: none !important; }
}

/* ── Profil RP — accordéon par perso ──────────────────────────────── */
.rp-card {
  background: rgba(20, 16, 14, 0.5);
  border: 1px solid rgba(212, 98, 42, 0.18);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.rp-card[open] { border-color: rgba(212, 98, 42, 0.4); }
.rp-card-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.rp-card-summary::-webkit-details-marker { display: none; }
.rp-card-summary-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(212, 98, 42, 0.12);
  border: 1px solid rgba(212, 98, 42, 0.4);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.rp-card-summary-icon img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.rp-card-summary-text { flex: 1; min-width: 0; }
.rp-card-summary-name {
  font-family: var(--font-display, "Cinzel"), serif;
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.rp-card-summary-world {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--gold);
  font-size: 13px;
  margin-top: 2px;
}
.rp-card-summary-chevron {
  color: var(--ember-bright);
  font-size: 16px;
  transition: transform 0.2s ease;
}
.rp-card[open] .rp-card-summary-chevron { transform: rotate(180deg); }
.rp-card-body {
  padding: 18px;
  border-top: 1px solid rgba(212, 98, 42, 0.15);
  background: rgba(10, 10, 11, 0.4);
}
.rp-form { display: flex; flex-direction: column; gap: 16px; }
.rp-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.rp-field { display: flex; flex-direction: column; gap: 4px; }
.rp-field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  font-weight: 500;
}
.rp-field input[type="text"],
.rp-field input[type="number"],
.rp-field textarea {
  background: rgba(10, 10, 11, 0.6);
  border: 1px solid rgba(212, 98, 42, 0.2);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text-primary);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  transition: border-color 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}
.rp-field textarea { resize: vertical; min-height: 60px; }
.rp-field input:focus,
.rp-field textarea:focus {
  outline: none;
  border-color: var(--ember-bright);
}
.rp-field-tiny { max-width: 140px; }
.rp-row-flags {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.rp-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
}
.rp-flag input[type="checkbox"] { accent-color: var(--ember); }

.rp-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 6px 2px;
}
.rp-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
}
.rp-radio input[type="radio"] { accent-color: var(--ember); }
.rp-radio input[type="radio"]:checked + span { color: var(--ember-bright); }

/* Éditeur BBCode */
.bbcode-editor {
  display: flex;
  flex-direction: column;
}
.bbcode-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: rgba(20, 16, 14, 0.7);
  border: 1px solid rgba(212, 98, 42, 0.2);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  flex-wrap: wrap;
}
.bbcode-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}
.bbcode-btn:hover,
.bbcode-btn.active {
  background: rgba(212, 98, 42, 0.18);
  border-color: rgba(212, 98, 42, 0.4);
  color: var(--ember-bright);
}
.bbcode-sep {
  width: 1px;
  height: 18px;
  background: rgba(212, 98, 42, 0.2);
  margin: 0 4px;
}
.bbcode-color {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.bbcode-color:hover { border-color: rgba(212, 98, 42, 0.4); }
.bbcode-color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}
.bbcode-color-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
/* Le textarea hérite du style .rp-field textarea, on ajuste juste le radius pour s'aligner avec la toolbar */
.bbcode-editor textarea {
  border-radius: 0 0 6px 6px !important;
  border-top: none !important;
}
.bbcode-preview {
  min-height: 60px;
  padding: 12px;
  background: rgba(10, 10, 11, 0.6);
  border: 1px solid rgba(212, 98, 42, 0.2);
  border-top: none;
  border-radius: 0 0 6px 6px;
  color: var(--text-primary);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  line-height: 1.55;
}
.bbcode-preview strong { color: var(--text-primary); }
.bbcode-preview em { color: var(--gold); }

/* Éditeur de Profil RP Enrichi */
.enriched-editor { margin-top: 8px; }
.enriched-intro {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  margin: 0 0 18px;
}
.enriched-visibility {
  background: rgba(20, 16, 14, 0.5);
  border: 1px solid rgba(212, 98, 42, 0.18);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.enriched-visibility-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.enriched-vis-opt {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(212, 98, 42, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  align-items: center;
}
.enriched-vis-opt:hover { border-color: rgba(212, 98, 42, 0.5); }
.enriched-vis-opt input[type="radio"] {
  grid-row: 1 / 3;
  align-self: center;
  accent-color: var(--ember);
}
.enriched-vis-opt:has(input:checked) {
  border-color: var(--ember-bright);
  background: rgba(212, 98, 42, 0.08);
}
.enriched-vis-label {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}
.enriched-vis-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: "DM Sans", sans-serif;
}

.enriched-blocks { display: flex; flex-direction: column; gap: 10px; }
.enriched-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-tertiary);
  font-style: italic;
  font-family: "Cormorant Garamond", serif;
  font-size: 14px;
  border: 1px dashed rgba(212, 98, 42, 0.2);
  border-radius: 10px;
}
.enriched-block {
  background: rgba(10, 10, 11, 0.5);
  border: 1px solid rgba(212, 98, 42, 0.2);
  border-radius: 10px;
  overflow: hidden;
}
.enriched-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 6px 14px;
  background: rgba(212, 98, 42, 0.05);
  border-bottom: 1px solid rgba(212, 98, 42, 0.15);
}
.enriched-block-type {
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ember-bright);
  font-weight: 500;
}
.enriched-block-actions { display: flex; gap: 4px; }
.enriched-block-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.enriched-block-body input[type="text"],
.enriched-block-body input[type="url"],
.enriched-block-body textarea {
  background: rgba(10, 10, 11, 0.6);
  border: 1px solid rgba(212, 98, 42, 0.2);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text-primary);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}
.enriched-block-body textarea {
  resize: vertical;
  min-height: 60px;
}
.enriched-block-body input:focus,
.enriched-block-body textarea:focus {
  outline: none;
  border-color: var(--ember-bright);
}
.enriched-block[data-type="title"] .enriched-block-body input {
  font-family: var(--font-display, "Cinzel"), serif;
  font-size: 18px;
  letter-spacing: 0.04em;
}
.enriched-block[data-type="subtitle"] .enriched-block-body input {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 15px;
  color: var(--gold);
}
.enriched-divider-preview {
  text-align: center;
  color: var(--ember);
  letter-spacing: 0.4em;
  font-size: 18px;
}

.enriched-add-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(20, 16, 14, 0.5);
  border: 1px dashed rgba(212, 98, 42, 0.25);
  border-radius: 8px;
}
.enriched-add-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-right: 4px;
}
.enriched-add-btn {
  background: rgba(212, 98, 42, 0.12);
  border: 1px solid rgba(212, 98, 42, 0.4);
  color: var(--ember-bright);
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.enriched-add-btn:hover {
  background: rgba(212, 98, 42, 0.22);
  border-color: var(--ember-bright);
  color: #ffd29a;
}

.enriched-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(212, 98, 42, 0.1);
  flex-wrap: wrap;
}
.enriched-public-link {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: var(--ember-bright);
  text-decoration: none;
  flex: 1;
  word-break: break-all;
}
.enriched-public-link:hover { color: #ffd29a; text-decoration: underline; }
.enriched-status { font-size: 12px; font-style: italic; }

/* Compteur de caractères "X / Y" affiché à droite des champs maxlength */
.char-counter {
  display: block;
  text-align: right;
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: "DM Sans", sans-serif;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.char-counter-warning { color: #ef4444; }

/* Login : carte unique avec onglets Se connecter / Créer un compte */
.login-error-banner {
  max-width: 480px;
  margin: 0 auto 20px;
  padding: 14px 18px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  border-radius: 10px;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  text-align: center;
}
.login-tabs {
  display: flex;
  gap: 4px;
  background: rgba(10, 10, 11, 0.6);
  padding: 4px;
  border: 1px solid rgba(212, 98, 42, 0.2);
  border-radius: 10px;
  margin-bottom: 22px;
}
.login-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.login-tab:hover { color: var(--text-primary); }
.login-tab-active {
  background: linear-gradient(135deg, rgba(212, 98, 42, 0.18), rgba(212, 175, 106, 0.1));
  color: var(--ember-bright);
  box-shadow: inset 0 0 0 1px rgba(212, 98, 42, 0.4);
}
.login-steps {
  margin: 14px 0 4px;
  padding-left: 22px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.login-steps li { margin-bottom: 4px; }

/* Bannière cookie RGPD (cookies essentiels uniquement) */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 720px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  background: rgba(15, 12, 11, 0.96);
  border: 1px solid rgba(212, 98, 42, 0.3);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  font-family: "DM Sans", sans-serif;
  animation: cookieSlide 0.4s ease forwards;
}
@keyframes cookieSlide {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.cookie-banner-fading { opacity: 0; transition: opacity 0.25s ease; }
.cookie-banner-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.cookie-banner-text strong {
  color: var(--ember-bright);
  font-weight: 600;
}
.cookie-banner-link {
  color: var(--gold);
  text-decoration: none;
  margin-left: 4px;
}
.cookie-banner-link:hover { text-decoration: underline; }
.cookie-banner-ok {
  flex-shrink: 0;
  background: rgba(212, 98, 42, 0.18);
  border: 1px solid rgba(212, 98, 42, 0.5);
  color: var(--ember-bright);
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 12px;
  padding: 9px 18px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cookie-banner-ok:hover {
  background: rgba(212, 98, 42, 0.28);
  border-color: var(--ember-bright);
  color: #ffd29a;
}
@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; align-items: stretch; }
}

/* Pages légales (privacy, mentions, conditions) */
.legal-page {
  max-width: 760px;
  margin: 60px auto 0;
  padding: 40px 50px 50px;
  background: rgba(15, 12, 11, 0.65);
  border: 1px solid rgba(212, 98, 42, 0.2);
  border-radius: 14px;
  font-family: "DM Sans", sans-serif;
  color: var(--text-primary);
  line-height: 1.65;
}
.legal-page h1 {
  font-family: "Cinzel", serif;
  font-size: 30px;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--ember-bright), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 8px;
}
.legal-page h2 {
  font-family: "Cinzel", serif;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin: 28px 0 8px;
  padding-top: 22px;
  border-top: 1px solid rgba(212, 98, 42, 0.15);
}
.legal-page section:first-of-type h2 { padding-top: 0; border-top: none; }
.legal-page h3 {
  font-family: "Cinzel", serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin: 16px 0 6px;
}
.legal-page p, .legal-page ul, .legal-page ol {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 10px;
}
.legal-page ul, .legal-page ol { padding-left: 22px; }
.legal-page li { margin-bottom: 6px; }
.legal-page strong { color: var(--text-primary); }
.legal-page code {
  background: rgba(212, 98, 42, 0.08);
  border: 1px solid rgba(212, 98, 42, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--ember-bright);
}
.legal-lead {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 16px !important;
  color: var(--gold) !important;
  margin: 8px 0 20px !important;
}
.legal-note {
  background: rgba(212, 98, 42, 0.05);
  border-left: 2px solid rgba(212, 98, 42, 0.4);
  padding: 8px 14px;
  font-size: 12.5px !important;
  font-style: italic;
  color: var(--text-tertiary) !important;
  border-radius: 0 6px 6px 0;
  margin: 8px 0 14px !important;
}
.legal-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(212, 98, 42, 0.15);
  font-size: 12px !important;
  color: var(--text-tertiary) !important;
  text-align: center;
}

/* Bannière onboarding (link.html en mode signup) */
.onboarding-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 640px;
  margin: 0 auto 28px;
  padding: 18px 22px;
  background: linear-gradient(165deg, rgba(212, 98, 42, 0.12), rgba(212, 175, 106, 0.08));
  border: 1px solid rgba(212, 98, 42, 0.4);
  border-radius: 12px;
}
.onboarding-banner-icon {
  font-size: 26px;
  color: var(--ember-bright);
  line-height: 1;
}
.onboarding-banner-title {
  font-family: "Cinzel", serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 4px;
}
.onboarding-banner-sub {
  font-family: "DM Sans", sans-serif;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* Ligne CTA "Éditer le profil RP enrichi" sous l'avatar dans la page de profil */
.profile-editor-cta-row {
  display: flex;
  justify-content: center;
  margin: 4px 0 22px;
}
.rp-form-secondary {
  background: transparent;
  border: 1px solid rgba(212, 98, 42, 0.4);
  color: var(--ember-bright);
  padding: 10px 24px;
  font-size: 12px;
}
.rp-form-secondary:hover {
  background: rgba(212, 98, 42, 0.1);
  border-color: var(--ember-bright);
  color: #ffd29a;
}

/* Onboarding (premier accès au profil enrichi) — affiché en in-flow ; les autres
   sections de l'éditeur sont masquées tant qu'on est en mode onboarding. */
.enriched-editor.enriched-onboarding-active > *:not(.enriched-onboarding) {
  display: none !important;
}
.enriched-onboarding {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.enriched-onboarding[hidden] { display: none !important; }
.enriched-onboarding-card {
  max-width: 540px;
  background: linear-gradient(165deg, rgba(20, 16, 14, 0.95), rgba(15, 12, 11, 0.95));
  border: 1px solid rgba(212, 98, 42, 0.4);
  border-radius: 14px;
  padding: 32px 36px;
  text-align: left;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 98, 42, 0.15);
}
.enriched-onboarding-icon {
  text-align: center;
  font-size: 28px;
  color: var(--ember-bright);
  margin-bottom: 6px;
}
.enriched-onboarding-title {
  font-family: "Cinzel", serif;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-align: center;
  margin: 0 0 16px;
  background: linear-gradient(135deg, var(--ember-bright), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.enriched-onboarding-card p {
  font-family: "DM Sans", sans-serif;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 14px;
}
.enriched-onboarding-card strong { color: var(--text-primary); }
.enriched-onboarding-bullets {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--text-secondary);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  line-height: 1.6;
}
.enriched-onboarding-bullets li { margin-bottom: 6px; }
.enriched-onboarding-bullets code {
  background: rgba(212, 98, 42, 0.08);
  border: 1px solid rgba(212, 98, 42, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--ember-bright);
}
.enriched-onboarding-note {
  font-style: italic;
  color: var(--text-tertiary) !important;
  font-size: 12.5px !important;
}
.enriched-onboarding-start {
  display: block;
  margin: 6px auto 0;
}

/* Page publique de profil enrichi (/c/...) */
.enriched-page {
  max-width: 760px;
  margin: 60px auto 0;
  padding: 40px 50px 60px;
  background: rgba(15, 12, 11, 0.65);
  border: 1px solid rgba(212, 98, 42, 0.2);
  border-radius: 14px;
  backdrop-filter: blur(2px);
}
.ep-header {
  text-align: center;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(212, 98, 42, 0.2);
}
.ep-avatar {
  width: 140px;
  height: 140px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
}
.ep-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ep-header-name {
  font-family: "Cinzel", serif;
  font-size: 36px;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
  background: linear-gradient(135deg, var(--ember-bright), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ep-header-world {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--gold);
  font-size: 18px;
  margin: 0;
}
.ep-title {
  font-family: "Cinzel", serif;
  font-size: 26px;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin: 32px 0 8px;
}
.ep-subtitle {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--gold);
  font-size: 17px;
  margin: 0 0 16px;
}
.ep-paragraph {
  font-family: "DM Sans", sans-serif;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 18px;
}
.ep-paragraph strong { color: var(--ember-bright); }
.ep-paragraph em     { color: var(--gold); }
.ep-image {
  margin: 26px 0;
  text-align: center;
}
.ep-image img {
  max-width: 100%;
  max-height: 520px;
  border-radius: 8px;
}
.ep-image-caption {
  margin-top: 10px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--text-tertiary);
  font-size: 14px;
}
.ep-quote {
  margin: 26px 0;
  padding: 18px 24px;
  border-left: 3px solid var(--ember);
  background: rgba(212, 98, 42, 0.05);
  border-radius: 0 8px 8px 0;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 17px;
  color: var(--text-primary);
}
.ep-quote p { margin: 0; }
.ep-quote-author {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  color: var(--text-tertiary);
}
.ep-divider {
  margin: 32px auto;
  border: none;
  border-top: 1px solid rgba(212, 98, 42, 0.4);
  width: 60%;
  position: relative;
}
.ep-divider::after {
  content: "❖";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 12, 11, 0.65);
  padding: 0 12px;
  color: var(--ember);
}
.rp-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(212, 98, 42, 0.1);
}
.rp-form-status {
  font-size: 12px;
  font-style: italic;
}
.rp-form-save {
  padding: 8px 22px;
  font-size: 13px;
}
.rp-form-save:disabled { opacity: 0.5; cursor: wait; }

.rp-custom-fields { display: flex; flex-direction: column; gap: 8px; }
.rp-custom-fields-head {
  display: flex; align-items: center; gap: 10px;
}
.rp-custom-add {
  width: 22px; height: 22px;
  border-radius: 5px;
  border: 1px solid rgba(212, 98, 42, 0.4);
  background: rgba(212, 98, 42, 0.12);
  color: var(--ember-bright);
  font-size: 16px; line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s ease;
}
.rp-custom-add:hover {
  background: rgba(212, 98, 42, 0.25);
  border-color: var(--ember-bright);
}
.rp-custom-fields-list { display: flex; flex-direction: column; gap: 6px; }
.rp-custom-empty {
  font-size: 12px;
  font-style: italic;
  color: var(--text-tertiary);
  padding: 6px 2px;
}
.rp-custom-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr) auto auto auto;
  gap: 6px;
  align-items: center;
}
.rp-custom-row input[type="text"] {
  background: rgba(10, 10, 11, 0.6);
  border: 1px solid rgba(212, 98, 42, 0.2);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text-primary);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}
.rp-custom-row input:focus { outline: none; border-color: var(--ember-bright); }
.rp-custom-btn {
  width: 26px; height: 26px;
  border-radius: 5px;
  border: 1px solid rgba(212, 98, 42, 0.25);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s ease;
}
.rp-custom-btn:hover:not(:disabled) {
  border-color: var(--ember-bright);
  color: var(--ember-bright);
}
.rp-custom-btn:disabled { opacity: 0.3; cursor: default; }
.rp-custom-btn-danger:hover:not(:disabled) {
  border-color: #ef4444;
  color: #ef4444;
}

/* Bouton "Éditer le profil" sur les cartes Mes personnages */
.btn-card-action {
  background: rgba(212, 98, 42, 0.12);
  border: 1px solid rgba(212, 98, 42, 0.4);
  color: var(--ember-bright);
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-card-action:hover {
  background: rgba(212, 98, 42, 0.22);
  border-color: var(--ember-bright);
  color: #ffd29a;
}

/* Header de la vue d'édition profil RP */
.profile-editor-topbar {
  margin-bottom: 18px;
}
.profile-editor-head {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
}
.profile-editor-back {
  background: rgba(20, 16, 14, 0.6);
  border: 1px solid rgba(212, 98, 42, 0.3);
  color: var(--text-secondary);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}
.profile-editor-back:hover {
  border-color: var(--ember-bright);
  color: var(--ember-bright);
}
.profile-editor-avatar {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(212, 98, 42, 0.08);
  border: 1px solid rgba(212, 98, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-editor-avatar > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-editor-avatar > svg {
  width: 40px;
  height: 40px;
}
.profile-editor-head-text { flex: 1; min-width: 0; }
.profile-editor-head-name {
  font-family: var(--font-display, "Cinzel"), serif;
  font-size: 22px;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.profile-editor-head-world {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--gold);
  font-size: 15px;
  margin-top: 4px;
}
