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

:root {
  --bg-deep: #0a1628;
  --bg-mid: #12243d;
  --teal: #3dd4c0;
  --teal-dim: #2a9d8f;
  --gold: #e8b84a;
  --gold-soft: #f0d078;
  --violet: #6b4fa0;
  --text: #e8f4f2;
  --text-muted: #8fb8b0;
  --block-shadow: rgba(0, 0, 0, 0.45);
  --header-h: 4.25rem;
  --font-parchemin: 'Citadel of Blackrose', Georgia, serif;
}

@font-face {
  font-family: 'Citadel of Blackrose';
  src: url('../font/Citadel of Blackrose.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html, body {
  min-height: 100%;
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg-deep);
}

body.body--page {
  overflow-x: hidden;
}

/* Background */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(61, 212, 192, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 60%, rgba(107, 79, 160, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 50% 35% at 10% 70%, rgba(232, 184, 74, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #0d1f35 0%, var(--bg-deep) 40%, #060e18 100%);
}

.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.4); }
}

.blocks {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.block {
  position: absolute;
  width: var(--size, 48px);
  height: var(--size, 48px);
  border-radius: 6px;
  opacity: 0.12;
  animation: float var(--float-dur, 12s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 -3px 0 rgba(0, 0, 0, 0.25),
    0 8px 24px var(--block-shadow);
}

.block--teal   { background: linear-gradient(145deg, #4ee8d4, #2a9d8f); }
.block--gold   { background: linear-gradient(145deg, #f0d078, #c9952e); }
.block--violet { background: linear-gradient(145deg, #8b6fc4, #4a3570); }
.block--stone  { background: linear-gradient(145deg, #6a7a8a, #3d4a56); }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-18px) rotate(calc(var(--rot, 0deg) + 6deg)); }
}

.ground {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(6, 14, 24, 0.9));
}

.ground__hills {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
}

.ground__hills svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Header & nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgba(10, 22, 40, 0.82);
  border-bottom: 1px solid rgba(61, 212, 192, 0.15);
  backdrop-filter: blur(14px);
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.site-header__logo {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.site-header__name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold-soft);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav__link {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.site-nav__link:hover {
  color: var(--teal);
  background: rgba(61, 212, 192, 0.08);
}

.site-nav__link.is-active {
  color: var(--gold-soft);
  background: rgba(232, 184, 74, 0.1);
  border-color: rgba(232, 184, 74, 0.25);
}

.site-nav__link--connexion {
  color: var(--bg-deep);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  box-shadow: 0 2px 0 #a07828;
}

.site-nav__link--connexion:hover {
  color: var(--bg-deep);
  background: linear-gradient(180deg, #f5dc88, var(--gold-soft));
}

.site-nav__link--connexion.is-active {
  color: var(--bg-deep);
  border-color: transparent;
}

.site-nav__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.site-nav__link--connexion .site-nav__avatar {
  margin-right: 0.15rem;
}

@media (max-width: 640px) {
  .site-nav__link--connexion {
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .site-header__name { display: none; }
  .site-nav__link { padding: 0.4rem 0.6rem; font-size: 0.72rem; }
}

/* Shared typography */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--teal);
}

h1, .page-title {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 20px rgba(61, 212, 192, 0.25);
}

h1 .accent, .page-title .accent {
  display: block;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold), var(--gold-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  color: var(--text-muted);
  line-height: 1.55;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg-deep);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 0 #a07828, 0 8px 24px rgba(232, 184, 74, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #a07828, 0 12px 32px rgba(232, 184, 74, 0.4);
}

.cta:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #a07828, 0 4px 16px rgba(232, 184, 74, 0.25);
}

.cta--ghost {
  color: var(--teal);
  background: rgba(61, 212, 192, 0.08);
  border: 1px solid rgba(61, 212, 192, 0.3);
  box-shadow: none;
}

.cta--ghost:hover {
  color: var(--text);
  background: rgba(61, 212, 192, 0.14);
  box-shadow: 0 4px 20px rgba(61, 212, 192, 0.15);
}

.cta svg {
  width: 18px;
  height: 18px;
}

/* Home page */
.home {
  position: relative;
  z-index: 1;
  padding: calc(var(--header-h) + 2rem) clamp(1rem, 4vw, 2rem) 3rem;
  max-width: 72rem;
  margin: 0 auto;
}

.home-hero {
  display: grid;
  grid-template-columns: 1fr minmax(12rem, 22rem);
  gap: 2rem 3rem;
  align-items: center;
  margin-bottom: 3rem;
}

.home-hero__copy {
  text-align: left;
}

.home-hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0.5rem 0 1rem;
}

.home-hero__desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-hero__logo {
  width: 100%;
  max-width: 18rem;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.4));
}

.home-stats {
  margin-bottom: 3.5rem;
}

.home-stats__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  background: rgba(18, 36, 61, 0.65);
  border: 1px solid rgba(61, 212, 192, 0.18);
  backdrop-filter: blur(10px);
}

.home-stats__item {
  text-align: center;
}

.home-stats__value {
  display: block;
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--gold-soft);
}

.home-stats__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-section {
  margin-bottom: 3.5rem;
}

.home-section__head {
  text-align: center;
  margin-bottom: 2rem;
}

.home-section__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text);
  margin-bottom: 0.5rem;
}

.home-section__sub {
  color: var(--text-muted);
  font-size: 1rem;
}

.home-grid {
  display: grid;
  gap: 1.25rem;
}

.home-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.feature-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.5rem;
  border-radius: 14px;
  background: rgba(18, 36, 61, 0.75);
  border: 1px solid rgba(61, 212, 192, 0.18);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 212, 192, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.feature-card__icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 1rem;
}

.feature-card__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.2rem;
  color: var(--gold-soft);
  margin-bottom: 0.5rem;
}

.feature-card__text {
  flex: 1;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.feature-card__link {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
}

.news-card {
  padding: 1.5rem;
  border-radius: 14px;
  background: rgba(18, 36, 61, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

.news-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.news-card__tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  background: rgba(61, 212, 192, 0.1);
  border: 1px solid rgba(61, 212, 192, 0.2);
}

.news-card__date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.news-card__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.news-card__excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.home-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.home-steps__item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 14px;
  background: rgba(18, 36, 61, 0.55);
  border: 1px solid rgba(232, 184, 74, 0.12);
  text-align: left;
}

.home-steps__num {
  flex-shrink: 0;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.7;
}

.home-steps__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1rem;
  color: var(--gold-soft);
  margin-bottom: 0.35rem;
}

.home-steps__text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.home-cta-band {
  margin-bottom: 2.5rem;
}

.home-cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 2rem 2rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(61, 212, 192, 0.12), rgba(107, 79, 160, 0.12));
  border: 1px solid rgba(61, 212, 192, 0.25);
}

.home-cta-band__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  color: var(--text);
  margin-bottom: 0.35rem;
}

.home-cta-band__text {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 28rem;
}

.site-footer--home {
  padding-top: 1rem;
  font-size: 0.75rem;
}

@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .home-hero__copy { text-align: center; }
  .home-hero__desc { margin-left: auto; margin-right: auto; }
  .home-hero__actions { justify-content: center; }
  .home-hero__logo { max-width: 14rem; }

  .home-grid--3,
  .home-steps {
    grid-template-columns: 1fr;
  }

  .home-cta-band__inner {
    flex-direction: column;
    text-align: center;
  }

  .home-cta-band__text { margin: 0 auto; }
}

/* Inner pages */
.page-content {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding: calc(var(--header-h) + 2rem) 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-content__inner {
  width: min(42rem, 100%);
  text-align: center;
}

.page-content .page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.page-content .tagline {
  font-size: 1rem;
  margin-bottom: 2rem;
}

.card {
  padding: 2rem 1.5rem;
  border-radius: 14px;
  background: rgba(18, 36, 61, 0.75);
  border: 1px solid rgba(61, 212, 192, 0.2);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.card__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.25rem;
  color: var(--gold-soft);
  margin-bottom: 0.5rem;
}

.card__text {
  color: var(--text-muted);
  line-height: 1.6;
}

.site-footer {
  position: relative;
  z-index: 1;
  font-size: clamp(0.62rem, 1.2vh, 0.75rem);
  color: rgba(143, 184, 176, 0.55);
  letter-spacing: 0.03em;
  line-height: 1.3;
  text-align: center;
}

.site-footer a {
  color: var(--teal-dim);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.page-content .site-footer {
  margin-top: 3rem;
}

/* Auth / Connexion */
.auth-page__inner {
  width: min(28rem, 100%);
}

.auth-alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.auth-alert--error {
  background: rgba(220, 80, 80, 0.12);
  border: 1px solid rgba(220, 80, 80, 0.35);
  color: #f0a0a0;
}

.auth-alert--success {
  background: rgba(61, 212, 192, 0.1);
  border: 1px solid rgba(61, 212, 192, 0.3);
  color: var(--teal);
}

.auth-login__card,
.auth-profile__card {
  padding: 2rem 1.5rem;
  border-radius: 14px;
  background: rgba(18, 36, 61, 0.75);
  border: 1px solid rgba(61, 212, 192, 0.2);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  margin-bottom: 1.5rem;
}

.auth-discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.9rem 1.25rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: #5865f2;
  box-shadow: 0 4px 0 #4752c4, 0 8px 24px rgba(88, 101, 242, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-discord-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #4752c4, 0 12px 32px rgba(88, 101, 242, 0.45);
}

.auth-discord-btn svg {
  width: 22px;
  height: 22px;
}

.auth-login__note {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.auth-login__error {
  color: #f0a0a0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-login__error code {
  font-size: 0.82rem;
  color: var(--teal);
}

.auth-login__guild {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-login__guild a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.auth-login__guild a:hover {
  text-decoration: underline;
}

.auth-profile__card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-align: left;
}

.auth-profile__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(61, 212, 192, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.auth-profile__name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.35rem;
  color: var(--gold-soft);
  margin-bottom: 0.25rem;
}

.auth-profile__email,
.auth-profile__id {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.auth-profile__hint {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.auth-profile__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.auth-logout {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.auth-logout:hover {
  color: #f0a0a0;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .auth-profile__card {
    flex-direction: column;
    text-align: center;
  }
}

/* Ville */
.ville-page__inner {
  width: min(56rem, 100%);
}

.ville-page__inner:has(.ville-structure) {
  width: min(72rem, 100%);
}

.ville-back {
  display: inline-block;
  margin-bottom: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--teal);
  text-decoration: none;
  white-space: nowrap;
}

.ville-back:hover {
  color: var(--gold-soft);
  text-decoration: underline;
}

.ville-detail__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.ville-detail__aside {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  min-width: clamp(88px, 14vw, 200px);
}

.ville-detail__aside .ville-back {
  align-self: center;
  text-align: center;
}

.ville-detail__intro {
  min-width: 0;
  text-align: left;
}

.ville-detail__intro .page-title,
.ville-detail__intro .tagline {
  text-align: left;
}

.ville-detail__marker {
  flex-shrink: 0;
  width: clamp(88px, 14vw, 200px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

.ville-mayor {
  margin: 0 0 1.5rem;
}

.ville-mayor__heading {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-soft);
  margin-bottom: 0.65rem;
}

.ville-mayor__card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(18, 36, 61, 0.75);
  border: 1px solid rgba(61, 212, 192, 0.22);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.ville-mayor__card:hover {
  transform: translateY(-2px);
  border-color: rgba(61, 212, 192, 0.4);
}

.ville-mayor__avatar {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(61, 212, 192, 0.25);
  background: rgba(10, 22, 40, 0.6);
}

.ville-mayor__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ville-mayor__name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-soft);
}

.ville-mayor__title {
  font-size: 0.85rem;
  color: var(--teal);
}

.ville-mayor__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ville-mayor__link {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal);
}

@media (max-width: 540px) {
  .ville-detail__header {
    flex-direction: column;
    text-align: center;
  }

  .ville-detail__aside {
    min-width: 0;
  }

  .ville-detail__intro,
  .ville-detail__intro .page-title,
  .ville-detail__intro .tagline {
    text-align: center;
  }

  .ville-mayor__link {
    display: none;
  }
}

.ville-structure--available {
  margin-bottom: 2.5rem;
}

.ville-structure--available .ville-structure__title {
  color: var(--teal);
}

.ville-region__type {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.ville-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.ville-stats__item {
  min-width: 8rem;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  background: rgba(18, 36, 61, 0.65);
  border: 1px solid rgba(61, 212, 192, 0.18);
}

.ville-stats__value {
  display: block;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold-soft);
}

.ville-stats__label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ville-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1rem;
  text-align: left;
}

.ville-card {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(18, 36, 61, 0.75);
  border: 1px solid rgba(61, 212, 192, 0.18);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.ville-grid--towns {
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  justify-content: center;
}

.ville-card--town {
  display: flex;
  flex-direction: column;
  color: inherit;
}

.ville-card__media-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.ville-card__title-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.ville-card__title-link:hover .ville-card__title {
  color: var(--teal);
}

.ville-card--town:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 212, 192, 0.35);
}

.ville-card:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 212, 192, 0.35);
}

.ville-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.ville-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ville-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 3rem;
  background: rgba(18, 36, 61, 0.9);
}

.ville-card__tag_ville {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  background: rgba(10, 22, 40, 0.82);
  border: 1px solid rgba(61, 212, 192, 0.25);
  backdrop-filter: blur(6px);
}

.ville-card__tag_capitale {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-soft);
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  background: rgba(40, 40, 10, 0.82);
  border: 1px solid rgba(202, 212, 61, 0.25);
  backdrop-filter: blur(6px);
}

.ville-card__body {
  padding: 1.25rem 1.35rem 1.35rem;
}

.ville-card__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.15rem;
  color: var(--gold-soft);
  margin-bottom: 0.45rem;
  line-height: 1.3;
}

.ville-card__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.ville-card__mayor {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: rgba(10, 22, 40, 0.45);
  border: 1px solid rgba(61, 212, 192, 0.12);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ville-card__mayor:hover {
  border-color: rgba(61, 212, 192, 0.35);
  background: rgba(10, 22, 40, 0.6);
}

.ville-card__mayor:hover .ville-card__mayor-name {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.ville-card__mayor-avatar {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(61, 212, 192, 0.2);
}

.ville-card__mayor-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.ville-card__mayor-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ville-card__mayor-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ville-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ville-card__amount {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.ville-card__amount strong {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.1rem;
  color: var(--teal);
  margin-right: 0.25rem;
}

.ville-card__id {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(143, 184, 176, 0.5);
  font-family: ui-monospace, monospace;
}

.ville-card__link {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  text-decoration: none;
  flex-shrink: 0;
}

.ville-card__link:hover {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.ville-empty {
  padding: 1.5rem;
  border-radius: 12px;
  background: rgba(18, 36, 61, 0.65);
  border: 1px solid rgba(61, 212, 192, 0.15);
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.ville-empty code {
  color: var(--teal);
  font-size: 0.82rem;
}

.ville-structure {
  margin-bottom: 2rem;
}

.ville-structure__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.05rem;
  color: var(--gold-soft);
  margin-bottom: 0.85rem;
}

.ville-structure__count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ville-regions-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(61, 212, 192, 0.15);
  background: rgba(18, 36, 61, 0.65);
}

.ville-regions {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.ville-regions th,
.ville-regions td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ville-regions th {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.15);
}

.ville-regions tbody tr:last-child td {
  border-bottom: none;
}

.ville-region__name {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.ville-region__id {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  font-family: ui-monospace, monospace;
  color: rgba(143, 184, 176, 0.55);
}

.ville-region-state {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 99px;
  border: 1px solid transparent;
}

.ville-region-state--owned {
  color: var(--gold-soft);
  background: rgba(232, 184, 74, 0.1);
  border-color: rgba(232, 184, 74, 0.25);
}

.ville-region-state--available {
  color: var(--teal);
  background: rgba(61, 212, 192, 0.1);
  border-color: rgba(61, 212, 192, 0.25);
}

.ville-region-state--rented {
  color: #93c5fd;
  background: rgba(147, 197, 253, 0.1);
  border-color: rgba(147, 197, 253, 0.25);
}

.ville-region-state--unknown {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.ville-regions a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.ville-regions a:hover {
  color: var(--gold-soft);
  text-decoration: underline;
}

@media (max-width: 720px) {
  .ville-grid {
    grid-template-columns: 1fr;
  }

  .ville-regions th:nth-child(2),
  .ville-regions td:nth-child(2) {
    display: none;
  }
}

/* Métiers */
.metier-page__inner {
  width: min(72rem, 100%);
  text-align: left;
}

.metier-section {
  margin-bottom: 1rem;
  border-radius: 14px;
  background: rgba(18, 36, 61, 0.45);
  border: 1px solid rgba(61, 212, 192, 0.12);
  overflow: hidden;
}

.metier-section[open] {
  border-color: rgba(61, 212, 192, 0.22);
}

.metier-section__title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.05rem;
  color: var(--gold-soft);
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.metier-section__title::-webkit-details-marker {
  display: none;
}

.metier-section__title::before {
  content: '▸';
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--teal);
  transition: transform 0.2s ease;
}

.metier-section[open] .metier-section__title::before {
  transform: rotate(90deg);
}

.metier-section__title:hover {
  background: rgba(61, 212, 192, 0.06);
  color: var(--teal);
}

.metier-section__label {
  flex: 1;
}

.metier-section__count {
  font-family: 'Nunito', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metier-section__body {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.metier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
  padding-top: 1.25rem;
}

.metier-card {
  display: flex;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-radius: 14px;
  background: rgba(18, 36, 61, 0.75);
  border: 1px solid rgba(61, 212, 192, 0.18);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.metier-card:hover {
  transform: translateY(-3px);
  border-color: rgba(61, 212, 192, 0.35);
}

.metier-card__icon-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}

.metier-card__icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.metier-card__body {
  min-width: 0;
  flex: 1;
}

.metier-card__tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.35rem;
}

.metier-card__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.05rem;
  color: var(--gold-soft);
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

.metier-card__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.metier-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
}

.metier-card__level strong {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--teal);
}

.metier-card__rp {
  color: var(--text-muted);
  font-weight: 600;
}

.metier-card__link {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
}

.metier-detail__hero {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.metier-detail__icon-wrap {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  padding: 0.75rem;
  border-radius: 16px;
/*   background: rgba(18, 36, 61, 0.75);
  border: 1px solid rgba(61, 212, 192, 0.2); */
  display: grid;
  place-items: center;
}

.metier-detail__icon {
  width: 150px;
  height: 150px;
  object-fit: contain;
}

.metier-detail__emoji {
  font-size: 3rem;
}

.metier-detail__title {
  margin-bottom: 0.5rem;
}

.metier-detail__tagline {
  text-align: left;
  margin-bottom: 0.85rem;
}

.metier-detail__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.metier-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.metier-badge--tracked {
  color: var(--teal);
  border-color: rgba(61, 212, 192, 0.25);
  background: rgba(61, 212, 192, 0.08);
}

.metier-badge--rp {
  color: var(--gold-soft);
  border-color: rgba(232, 184, 74, 0.25);
  background: rgba(232, 184, 74, 0.08);
}

.metier-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  background: rgba(61, 212, 192, 0.08);
  border: 1px solid rgba(61, 212, 192, 0.2);
}

.metier-progress__stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.metier-progress__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.metier-progress__value {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal);
}

.metier-progress__link {
  margin-left: auto;
}

.metier-notice {
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  background: rgba(18, 36, 61, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.metier-notice a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}

.metier-notice a:hover {
  text-decoration: underline;
}

.metier-panel {
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: rgba(18, 36, 61, 0.65);
  border: 1px solid rgba(61, 212, 192, 0.15);
}

.metier-panel__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.95rem;
  color: var(--gold-soft);
  margin-bottom: 0.75rem;
}

.metier-panel__text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.metier-activities {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.metier-activities li {
  font-size: 0.88rem;
  color: var(--text);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  border-left: 3px solid var(--teal);
}

@media (max-width: 720px) {
  .metier-grid {
    grid-template-columns: 1fr;
  }

  .metier-detail__hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .metier-detail__tagline {
    text-align: center;
  }

  .metier-detail__badges {
    justify-content: center;
  }

  .metier-progress__link {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
}

/* Histoire */
.histoire-page__inner {
  width: min(70rem, 100%);
  text-align: left;
}

.histoire-timeline {
  list-style: none;
  margin: 2rem 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.histoire-chapter__link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  background: rgba(18, 36, 61, 0.75);
  border: 1px solid rgba(61, 212, 192, 0.18);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.histoire-chapter__link:hover {
  transform: translateY(-2px);
  border-color: rgba(61, 212, 192, 0.35);
}

.histoire-chapter__step {
  flex-shrink: 0;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-soft);
  opacity: 0.7;
  min-width: 2rem;
}

.histoire-chapter__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.histoire-chapter__era {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
}

.histoire-chapter__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.05rem;
  color: var(--gold-soft);
}

.histoire-chapter__excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.histoire-chapter__arrow {
  flex-shrink: 0;
  color: var(--teal);
  font-weight: 700;
}

.histoire-detail__title {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  margin: 0 0 1.25rem;
  padding: 1.15rem 3rem 1rem;
  text-align: center;
  font-family: var(--font-parchemin);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-soft);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.histoire-detail__title::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: -1;
  aspect-ratio: 707 / 353;
  width: 100%;
  transform: translateY(-50%);
  background: url('../images/banderole.png') center center / 100% 100% no-repeat;
  pointer-events: none;
}

.histoire-detail__excerpt {
  text-align: left;
  margin-bottom: 1.5rem;
}

.histoire-detail__frame {
  --banderole-scale: 1.22;
  --banderole-zone: 30%;
  position: relative;
  overflow: visible;
}

.histoire-detail__body {
  --histoire-body-pad-x: 1.85rem;
  --histoire-body-pad-y: 1.75rem;
  position: relative;
  overflow: visible;
  padding: 0 0 var(--histoire-body-pad-y);
  border-radius: 14px;
  font-family: var(--font-parchemin);
  background:
    linear-gradient(168deg, rgba(18, 36, 61, 0.9) 0%, rgba(10, 22, 40, 0.94) 55%, rgba(12, 28, 52, 0.92) 100%);
  border: 1px solid rgba(61, 212, 192, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(61, 212, 192, 0.1),
    inset 0 0 48px rgba(61, 212, 192, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.4);
}

.histoire-detail__body::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 75% 55% at 10% 0%, rgba(61, 212, 192, 0.14) 0%, transparent 58%),
    radial-gradient(ellipse 65% 50% at 92% 100%, rgba(107, 79, 160, 0.12) 0%, transparent 58%);
  pointer-events: none;
  z-index: 0;
}

.histoire-detail__header {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0 0 -0.35rem;
  padding: 0;
  padding-bottom: var(--banderole-zone);
}

.histoire-detail__header::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: calc(var(--banderole-scale) * 134%);
  aspect-ratio: 707 / 240;
  transform: translate(-50%, -50%);
  background: url('../images/banderole.png') center center / 100% 100% no-repeat;
  pointer-events: none;
}

.histoire-detail__header .parchemin-title {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 1280px;
  margin: 0;
  padding: 0 0.5rem;
  transform: translate(-50%, -52%);
  text-align: center;
  color: var(--gold-soft);
  font-family: var(--font-parchemin);
  font-weight: 600;
  font-size: 50px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.histoire-detail__body p {
  position: relative;
  z-index: 1;
  font-family: inherit;
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.9;
  letter-spacing: 0.02em;
  margin: 0 0 1rem;
  padding: 0 var(--histoire-body-pad-x);
}

.histoire-detail__body p:last-child {
  margin-bottom: 0;
}

.histoire-detail__body > p:first-child {
  padding-top: var(--histoire-body-pad-y);
}

.histoire-detail__body:has(.histoire-detail__header) > p:first-child {
  padding-top: 0.15rem;
}

.histoire-detail__body .histoire-personnage {
  color: var(--gold-soft);
  font-weight: 700;
}

.histoire-detail__body .histoire-legende {
  color: #c4b5fd;
  font-style: italic;
}

.histoire-detail__body .histoire-orbis {
  color: var(--teal);
  font-weight: 700;
}

.histoire-detail__body .histoire-civilisation {
  color: #fbbf24;
  font-weight: 700;
}

.histoire-detail__body .histoire-ville {
  color: #60a5fa;
  font-weight: 700;
}

.histoire-detail__body .histoire-danger {
  color: #f87171;
  font-weight: 700;
}

.histoire-detail__body .histoire-lieu {
  color: #86efac;
  font-weight: 600;
}

.histoire-detail__body .histoire-metier,
.histoire-detail__body a.histoire-metier {
  color: #a2ff00;
  font-weight: 700;
}

.histoire-detail__body a.histoire-metier {
  text-decoration: underline;
  text-decoration-color: rgba(162, 255, 0, 0.4);
  text-underline-offset: 0.15em;
  cursor: pointer;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.histoire-detail__body a.histoire-metier:hover {
  color: #c8ff4d;
  text-decoration-color: currentColor;
}

.histoire-detail__body .histoire-economie {
  color: #fcd34d;
  font-weight: 700;
}

.histoire-detail__body .histoire-action {
  color: #f472b6;
  font-weight: 700;
}

.histoire-detail__body .histoire-capitale,
.histoire-detail__body a.histoire-capitale {
  color: #38bdf8;
  font-weight: 700;
}

.histoire-detail__body a.histoire-capitale {
  text-decoration: underline;
  text-decoration-color: rgba(56, 189, 248, 0.4);
  text-underline-offset: 0.15em;
  cursor: pointer;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.histoire-detail__body a.histoire-capitale:hover {
  color: #7dd3fc;
  text-decoration-color: currentColor;
}

.histoire-detail__body .histoire-ere {
  color: var(--gold-soft);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.histoire-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.histoire-nav__btn {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(18, 36, 61, 0.75);
  border: 1px solid rgba(61, 212, 192, 0.18);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
  min-width: 0;
}

.histoire-nav__btn--next {
  text-align: right;
}

a.histoire-nav__btn:hover {
  transform: translateY(-2px);
  border-color: rgba(61, 212, 192, 0.35);
}

.histoire-nav__btn.is-disabled {
  opacity: 0.45;
  cursor: default;
}

.histoire-nav__direction {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
}

.histoire-nav__label {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.88rem;
  color: var(--gold-soft);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.histoire-nav__progress {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0 0.35rem;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .histoire-nav {
    grid-template-columns: 1fr;
  }

  .histoire-nav__progress {
    order: -1;
    padding-bottom: 0.25rem;
  }

  .histoire-nav__btn--next {
    text-align: left;
  }
}

/* Profil joueur */
.profil-page__inner {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
}

.profil-welcome {
  width: min(42rem, 100%);
  text-align: center;
  margin-bottom: 1.5rem;
}

.profil-hero {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: min(42rem, 100%);
  padding-right: 1.75rem;
  margin-bottom: 1.75rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(18, 36, 61, 0.9), rgba(10, 22, 40, 0.85));
  border: 1px solid rgba(232, 184, 74, 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.profil-hero__frame {
  flex-shrink: 0;
  position: relative;
  padding: 6px;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--gold-soft), var(--gold), var(--teal-dim));
  box-shadow: 0 0 24px rgba(232, 184, 74, 0.2);
}

.profil-hero__frame--bordure {
  --profil-frame-size: 288px;
  --profil-avatar-fit: 64%;
  position: relative;
  display: grid;
  place-items: center;
  width: var(--profil-frame-size);
  height: var(--profil-frame-size);
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.profil-hero__frame--bordure:has(.profil-hero__avatar--hytale) {
  --profil-avatar-shift-y: -8px;
}

.profil-hero__frame--bordure:has(.profil-hero__avatar--discord) {
  --profil-frame-size: 200px;
  --profil-avatar-fit: 62%;
}

.profil-hero__frame--bordure .profil-hero__avatar-wrap,
.profil-hero__frame--bordure .profil-hero__bordure {
  grid-area: 1 / 1;
}

.profil-hero__frame--bordure .profil-hero__avatar-wrap {
  position: relative;
  z-index: 1;
  width: var(--profil-avatar-fit);
  height: var(--profil-avatar-fit);
  padding: 0;
  border-radius: 12px;
  background: rgba(10, 22, 40, 0.95);
  overflow: hidden;
  line-height: 0;
  transform: translateY(var(--profil-avatar-shift-y, 0));
}

.profil-hero__bordure {
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  object-fit: contain;
  user-select: none;
}

.profil-hero__frame--bordure .profil-hero__avatar--hytale,
.profil-hero__frame--bordure .profil-hero__avatar--discord {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(10, 22, 40, 0.95);
}

.profil-hero__frame--bordure .profil-hero__avatar--hytale {
  object-position: center 8%;
}

.profil-hero__frame--bordure .profil-hero__avatar--discord {
  object-position: center top;
}

.profil-hero__frame--bordure .profil-hero__level {
  position: absolute;
  z-index: 3;
  right: calc((100% - var(--profil-avatar-fit)) / 2 - 8px);
  bottom: calc((100% - var(--profil-avatar-fit)) / 2 - 8px - var(--profil-avatar-shift-y, 0));
  margin: 0;
}

.profil-hero__avatar-wrap {
  position: relative;
  padding: 8px;
  border-radius: 16px;
  background: rgba(10, 22, 40, 0.95);
}

.profil-hero__avatar-wrap--crafthead {
  cursor: pointer;
}

.profil-hero__avatar {
  display: block;
  border-radius: 12px;
}

.profil-hero__avatar--discord {
  width: 112px;
  height: 112px;
  object-fit: cover;
}

.profil-hero__avatar--hytale {
  width: 200px;
  height: 200px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: rgba(0, 0, 0, 0.25);
}

.profil-hero__body-preview {
  position: absolute;
  left: calc(100% + 1rem);
  top: 50%;
  transform: translateY(-50%) scale(0.96);
  z-index: 20;
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(10, 22, 40, 0.96);
  border: 1px solid rgba(61, 212, 192, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.profil-hero__avatar-wrap--crafthead:hover .profil-hero__body-preview,
.profil-hero__avatar-wrap--crafthead:focus-within .profil-hero__body-preview {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}

.profil-hero__body-img {
  display: block;
  width: auto;
  height: 280px;
  max-width: 180px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.profil-hero__level {
  position: absolute;
  bottom: -6px;
  right: -6px;
  z-index: 3;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.4rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bg-deep);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border: 2px solid rgba(10, 22, 40, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.profil-hero__info {
  flex: 1;
  min-width: 0;
  margin-top: 2rem;
}

.profil-hero__name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text);
  margin: 0.35rem 0 0.2rem;
  line-height: 1.15;
}

.profil-hero__title {
  font-size: 0.92rem;
  color: var(--teal);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 1.1rem;
}

.profil-xp {
  margin-bottom: 1rem;
  max-width: 22rem;
}

.profil-xp__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
}

.profil-xp__total {
  color: var(--teal-dim);
  font-size: 0.65rem;
}

.profil-xp__track {
  height: 8px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.profil-xp__fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal-dim), var(--teal), var(--gold));
  box-shadow: 0 0 10px rgba(61, 212, 192, 0.45);
}

.profil-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.profil-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.profil-badge--gold {
  color: var(--gold-soft);
  border-color: rgba(232, 184, 74, 0.3);
  background: rgba(232, 184, 74, 0.08);
}

.profil-badge--teal {
  color: var(--teal);
  border-color: rgba(61, 212, 192, 0.25);
  background: rgba(61, 212, 192, 0.08);
}

.profil-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
}

.profil-panel {
  width: min(42rem, 100%);
  box-sizing: border-box;
  padding: 1.35rem 1.5rem;
  border-radius: 14px;
  background: rgba(18, 36, 61, 0.65);
  border: 1px solid rgba(61, 212, 192, 0.15);
}

.profil-panel--wide {
  width: min(48rem, 100%);
  grid-column: unset;
}

.profil-panel.profil-skills-board-skills,
.profil-panel.profil-panel-regions {
  width: min(72rem, 100%);
}

.profil-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profil-panel__head .profil-panel__title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.profil-panel__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1rem;
  color: var(--gold-soft);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profil-skills-total {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profil-skills-total strong {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1rem;
  color: var(--gold-soft);
  margin-left: 0.35rem;
}

.profil-skills-empty {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Skills board (mockup layout) */
.profil-skills-board,
.profil-activity-board {
  padding: 1.35rem 1.5rem 1.5rem;
  background:
    radial-gradient(circle at 0% 100%, rgba(61, 212, 192, 0.06), transparent 45%),
    radial-gradient(circle at 100% 0%, rgba(232, 184, 74, 0.05), transparent 40%),
    rgba(18, 36, 61, 0.72);
}


.profil-skills-board__head,
.profil-activity-board__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profil-skills-board__title,
.profil-activity-board__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1rem;
  color: var(--gold-soft);
  margin: 0;
}

.profil-skills-board__total {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.profil-skills-board__totals {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.profil-skills-board__scroll-btn {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(232, 184, 74, 0.35);
  background: rgba(18, 36, 61, 0.85);
  color: var(--gold-soft);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.profil-skills-board__scroll-btn:hover {
  border-color: rgba(61, 212, 192, 0.45);
  background: rgba(61, 212, 192, 0.12);
  color: var(--teal);
}

.profil-skills-board__scroll-icon {
  display: block;
  line-height: 1;
}

.profil-skills-expand {
    display: block;
    width: 100%;
    margin-top: 1.15rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.profil-skills-expand:hover {
  color: var(--teal);
  border-color: rgba(61, 212, 192, 0.25);
  background: rgba(61, 212, 192, 0.06);
  cursor: pointer;
}


.profil-skill-cards-viewport--clamped {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.profil-skill-cards-viewport--expanded {
  overflow: visible;
  max-height: none !important;
}

.profil-skills-board__total-badge--teal {
  color: var(--teal);
  background: linear-gradient(180deg, rgba(61, 212, 192, 0.18), rgba(61, 212, 192, 0.06));
  border-color: rgba(61, 212, 192, 0.35);
}

.profil-skills-board__total-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profil-skills-board__total-badge {
  display: grid;
  place-items: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.45rem;
  border-radius: 10px;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-soft);
  background: linear-gradient(180deg, rgba(232, 184, 74, 0.18), rgba(232, 184, 74, 0.06));
  border: 1px solid rgba(232, 184, 74, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.profil-skill-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 1rem;
}

.profil-skill-cards--paged {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profil-skill-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.profil-skill-card--mining {
  border-color: rgba(61, 212, 192, 0.22);
  box-shadow: inset 0 0 0 1px rgba(61, 212, 192, 0.05);
}

.profil-skill-card--woodcutting {
  border-color: rgba(162, 255, 0, 0.18);
  box-shadow: inset 0 0 0 1px rgba(162, 255, 0, 0.04);
}

.profil-skill-card--farming {
  border-color: rgba(74, 222, 128, 0.2);
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.05);
}

.profil-skill-card--fishing {
  border-color: rgba(96, 165, 250, 0.22);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.06);
}

.profil-skill-card--hunting {
  border-color: rgba(248, 113, 113, 0.2);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.05);
}

.profil-skill-card--acrobatics {
  border-color: rgba(56, 189, 248, 0.22);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.06);
}

.profil-skill-card--building {
  border-color: rgba(232, 184, 74, 0.22);
  box-shadow: inset 0 0 0 1px rgba(232, 184, 74, 0.06);
}

.profil-skill-card--crafting {
  border-color: rgba(251, 146, 60, 0.22);
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.06);
}

.profil-skill-card--excavation {
  border-color: rgba(120, 113, 108, 0.28);
  box-shadow: inset 0 0 0 1px rgba(120, 113, 108, 0.08);
}

.profil-skill-card--harvesting {
  border-color: rgba(134, 239, 172, 0.22);
  box-shadow: inset 0 0 0 1px rgba(134, 239, 172, 0.06);
}

.profil-skill-card--swords {
  border-color: rgba(239, 68, 68, 0.22);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.06);
}

.profil-skill-card--combat {
  border-color: rgba(220, 38, 38, 0.22);
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.06);
}

.profil-skill-card--archery {
  border-color: rgba(248, 113, 113, 0.2);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.05);
}

.profil-skill-card--defense {
  border-color: rgba(59, 130, 246, 0.22);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.06);
}

.profil-skill-card--enchanting {
  border-color: rgba(168, 85, 247, 0.22);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.06);
}

.profil-skill-card--magic {
  border-color: rgba(192, 132, 252, 0.22);
  box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.06);
}

.profil-skill-card--taming {
  border-color: rgba(132, 204, 22, 0.22);
  box-shadow: inset 0 0 0 1px rgba(132, 204, 22, 0.06);
}

.profil-skill-card--mmo {
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.06);
}

.profil-skill-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.profil-skill-card__identity {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.profil-skill-card__icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
}

.profil-skill-card__name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0;
}

.profil-skill-card--mining .profil-skill-card__name {
  color: var(--teal);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(61, 212, 192, 0.25);
}

.profil-skill-card--woodcutting .profil-skill-card__name {
  color: #a2ff00;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(162, 255, 0, 0.2);
}

.profil-skill-card--farming .profil-skill-card__name {
  color: #4ade80;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(74, 222, 128, 0.2);
}

.profil-skill-card--fishing .profil-skill-card__name {
  color: #60a5fa;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(96, 165, 250, 0.25);
}

.profil-skill-card--hunting .profil-skill-card__name {
  color: #f87171;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(248, 113, 113, 0.2);
}

.profil-skill-card--acrobatics .profil-skill-card__name {
  color: #38bdf8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(56, 189, 248, 0.25);
}

.profil-skill-card--building .profil-skill-card__name {
  color: var(--gold-soft);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(232, 184, 74, 0.25);
}

.profil-skill-card--crafting .profil-skill-card__name {
  color: #fb923c;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(251, 146, 60, 0.2);
}

.profil-skill-card--excavation .profil-skill-card__name {
  color: #a8a29e;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(168, 162, 158, 0.2);
}

.profil-skill-card--harvesting .profil-skill-card__name {
  color: #86efac;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(134, 239, 172, 0.2);
}

.profil-skill-card--swords .profil-skill-card__name {
  color: #ef4444;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(239, 68, 68, 0.25);
}

.profil-skill-card--combat .profil-skill-card__name {
  color: #dc2626;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(220, 38, 38, 0.25);
}

.profil-skill-card--archery .profil-skill-card__name {
  color: #f87171;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(248, 113, 113, 0.2);
}

.profil-skill-card--defense .profil-skill-card__name {
  color: #3b82f6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(59, 130, 246, 0.25);
}

.profil-skill-card--enchanting .profil-skill-card__name {
  color: #a855f7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(168, 85, 247, 0.25);
}

.profil-skill-card--magic .profil-skill-card__name {
  color: #c084fc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(192, 132, 252, 0.25);
}

.profil-skill-card--taming .profil-skill-card__name {
  color: #84cc16;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(132, 204, 22, 0.2);
}

.profil-skill-card--mmo .profil-skill-card__name {
  color: #94a3b8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(148, 163, 184, 0.2);
}

.profil-skill-card__level {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-soft);
  padding: 0.22rem 0.5rem;
  border-radius: 8px;
  background: rgba(232, 184, 74, 0.1);
  border: 1px solid rgba(232, 184, 74, 0.25);
}

.profil-job-badge {
  position: relative;
  flex-shrink: 0;
  width: 3.5rem;
  line-height: 0;
}

.profil-job-badge__frame {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.profil-job-badge__text {
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 62%;
  text-align: center;
  pointer-events: none;
}

.profil-job-badge__label {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.28rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e8c56a;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.9),
    0 1px 3px rgba(0, 0, 0, 0.85),
    0 0 6px rgba(232, 197, 106, 0.3);
  margin-bottom: 0.05rem;
}

.profil-job-badge__value {
  font-family: 'Cinzel', Georgia, serif;
  padding-top: 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  color: #f5d78a;
  text-shadow:
    0 1px 0 #5c4518,
    0 2px 4px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(245, 215, 138, 0.2);
}

.profil-skill-card__xp-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.profil-skill-card__xp-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.3s ease;
}

.profil-skill-card--mining .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(61, 212, 192, 0.85), var(--teal));
}

.profil-skill-card--woodcutting .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(162, 255, 0, 0.75), #a2ff00);
}

.profil-skill-card--farming .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.75), #4ade80);
}

.profil-skill-card--fishing .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.85), #60a5fa);
}

.profil-skill-card--hunting .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.85), #f87171);
}

.profil-skill-card--acrobatics .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.85), #38bdf8);
}

.profil-skill-card--building .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(232, 184, 74, 0.85), var(--gold-soft));
}

.profil-skill-card--crafting .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(251, 146, 60, 0.85), #fb923c);
}

.profil-skill-card--excavation .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(120, 113, 108, 0.85), #a8a29e);
}

.profil-skill-card--harvesting .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(134, 239, 172, 0.85), #86efac);
}

.profil-skill-card--swords .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.85), #ef4444);
}

.profil-skill-card--combat .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.85), #dc2626);
}

.profil-skill-card--archery .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.85), #f87171);
}

.profil-skill-card--defense .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.85), #3b82f6);
}

.profil-skill-card--enchanting .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.85), #a855f7);
}

.profil-skill-card--magic .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(192, 132, 252, 0.85), #c084fc);
}

.profil-skill-card--taming .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(132, 204, 22, 0.85), #84cc16);
}

.profil-skill-card--mmo .profil-skill-card__xp-fill {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.85), #94a3b8);
}

.profil-skill-card__xp-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.profil-skill-card__details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.profil-skill-card__details li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.profil-skill-card__detail-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.profil-skill-card__detail-value {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.82rem;
  color: var(--text);
}

.profil-board-cta {
  display: block;
  width: 100%;
  margin-top: 1.15rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.profil-board-cta:hover {
  color: var(--teal);
  border-color: rgba(61, 212, 192, 0.25);
  background: rgba(61, 212, 192, 0.06);
}

.profil-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.profil-activity-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.profil-activity-item__icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.profil-activity-item__text {
  font-size: 0.84rem;
  color: var(--text);
}

.profil-activity-item__date {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.profil-activity-more {
  margin-top: 0.75rem;
}

.profil-activity-more summary {
  list-style: none;
  cursor: pointer;
}

.profil-activity-more summary::-webkit-details-marker {
  display: none;
}

.profil-activity-list--more {
  margin-top: 0.75rem;
}

.profil-activity__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.88rem;
  color: var(--gold-soft);
  margin: 1.25rem 0 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.profil-activity {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.profil-activity li {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.profil-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.profil-stats--skills {
  grid-template-columns: repeat(3, 1fr);
}

.profil-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.85rem 0.5rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.profil-stat--skill {
  padding: 1rem 0.75rem;
  border-color: rgba(61, 212, 192, 0.12);
}

.profil-stat__icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.profil-stat__img {
  width: 48px;
  height: 48px;
  margin-bottom: 0.5rem;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.profil-stat__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profil-stat__value {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal);
  margin-top: 0.15rem;
}

.profil-stat__xp {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.profil-dl {
  margin: 0;
}

.profil-dl__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
}

.profil-dl__row:last-child {
  border-bottom: none;
}

.profil-dl dt {
  color: var(--text-muted);
  font-weight: 600;
}

.profil-dl dd {
  margin: 0;
  color: var(--text);
  text-align: right;
}

.profil-dl dd a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

.profil-dl dd a:hover {
  color: var(--gold-soft);
  text-decoration: underline;
}

.profil-dl__mono {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--text-muted) !important;
}

.profil-achievements {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.65rem;
}

.profil-achievement {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  opacity: 0.55;
}

.profil-achievement.is-done {
  opacity: 1;
  border-color: rgba(61, 212, 192, 0.2);
  background: rgba(61, 212, 192, 0.06);
}

.profil-achievement__icon {
  font-size: 1.25rem;
  line-height: 1;
}

.profil-achievement__name {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.profil-achievement.is-done .profil-achievement__name {
  color: var(--text);
}

.profil-achievement__check {
  color: var(--teal);
  font-weight: 700;
  font-size: 0.9rem;
}

.profil-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.profil-page .site-footer {
  margin-top: 2.5rem;
  text-align: center;
}

.profil-regions__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.88rem;
  color: var(--gold-soft);
  margin: 1.25rem 0 0.75rem;
}

.profil-regions__empty {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profil-regions {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.profil-region {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(61, 212, 192, 0.15);
}

.profil-region__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.profil-region__name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
}

.profil-region__name:hover {
  color: var(--gold-soft);
}

.profil-region__state {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-soft);
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  background: rgba(232, 184, 74, 0.1);
  border: 1px solid rgba(232, 184, 74, 0.22);
}

.profil-region__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem 1rem;
  margin: 0;
}

.profil-region__meta div {
  font-size: 0.78rem;
}

.profil-region__meta dt {
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.profil-region__meta dd {
  margin: 0;
  color: var(--text);
}

@media (max-width: 768px) {
  .profil-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profil-xp {
    margin-left: auto;
    margin-right: auto;
  }

  .profil-hero__badges {
    justify-content: center;
  }

  .profil-hero__body-preview {
    left: 50%;
    top: auto;
    bottom: calc(100% + 0.75rem);
    transform: translateX(-50%) scale(0.96);
  }

  .profil-hero__avatar-wrap--crafthead:hover .profil-hero__body-preview,
  .profil-hero__avatar-wrap--crafthead:focus-within .profil-hero__body-preview {
    transform: translateX(-50%) scale(1);
  }

  .profil-hero__body-img {
    height: 220px;
    max-width: 140px;
  }

  .profil-layout {
    align-items: center;
  }

  .profil-panel,
  .profil-panel--wide,
  .profil-panel.profil-skills-board-skills,
  .profil-panel.profil-panel-regions {
    width: 100%;
  }

  .profil-panel--wide {
    grid-column: auto;
  }

  .profil-stats--skills {
    grid-template-columns: 1fr;
  }

  .profil-skill-cards {
    grid-template-columns: 1fr;
  }

  .profil-skill-cards--paged {
    grid-template-columns: 1fr;
  }

  .profil-skills-board__totals {
    width: 100%;
    margin-left: 0;
  }

  .profil-skills-board__scroll-btn {
    margin-left: auto;
  }

  .profil-skills-board__head,
  .profil-activity-board__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .profil-activity-item {
    grid-template-columns: auto 1fr;
  }

  .profil-activity-item__date {
    grid-column: 2;
    justify-self: start;
    padding-left: 2.05rem;
  }

  .profil-panel__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .profil-dl__row {
    flex-direction: column;
    gap: 0.2rem;
  }

  .profil-dl dd {
    text-align: left;
  }
}

/* ── Prestige (titres Orbis) ─────────────────────────────────────────────── */

.prestige-page__status {
  margin: 0 0 1.75rem;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  background: rgba(18, 36, 61, 0.65);
  border: 1px solid rgba(61, 212, 192, 0.22);
  font-size: 0.92rem;
  color: var(--text-muted);
}

.prestige-page__status strong {
  color: var(--gold-soft);
  font-family: 'Cinzel', Georgia, serif;
}

.prestige-page__status-xp {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.78rem;
  color: var(--teal);
  font-weight: 600;
}

.prestige-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.prestige-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.65rem 1rem;
  border-radius: 14px;
  background: rgba(18, 36, 61, 0.72);
  border: 1px solid rgba(61, 212, 192, 0.16);
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.prestige-card--current {
  border-color: rgba(212, 175, 95, 0.55);
  box-shadow: 0 0 0 1px rgba(212, 175, 95, 0.2), 0 8px 24px rgba(0, 0, 0, 0.25);
}

.prestige-card--locked {
  opacity: 0.45;
  filter: grayscale(0.85);
}


.prestige-card__art {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(8, 18, 32, 0.55);
  overflow: hidden;
}

.prestige-card__image {
  width: 78%;
  height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.prestige-card__placeholder {
  width: 72%;
  height: 72%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(61, 212, 192, 0.22), rgba(12, 28, 48, 0.9));
  border: 1px solid rgba(61, 212, 192, 0.25);
}

.prestige-card__placeholder-rank {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-soft);
  line-height: 1;
}

.prestige-card__badge {
  position: absolute;
  bottom: 0.35rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1a1208;
  background: var(--gold-soft);
}

.prestige-card__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--gold-soft);
  margin: 0;
  min-height: 2.1em;
}

.prestige-card__description {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
}

@media (min-width: 640px) {
  .prestige-grid {
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 1.5rem;
  }

  .prestige-card__title {
    font-size: 0.85rem;
  }
}


