/* Negalium Wiki — design minéral clair */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Syne:wght@600;700;800&display=swap');

:root {
  --bg: #e8eee6;
  --bg-deep: #d4ddd0;
  --ink: #1a2420;
  --ink-soft: #3d4a44;
  --muted: #5c6b63;
  --accent: #2f6b4f;
  --accent-hot: #3d8f68;
  --copper: #b86b3c;
  --copper-soft: #d4925a;
  --panel: rgba(255, 252, 247, 0.82);
  --panel-solid: #fffaf4;
  --line: rgba(26, 36, 32, 0.12);
  --sidebar: #f4f7f2;
  --sidebar-w: 280px;
  --radius: 14px;
  --radius-sm: 8px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --shadow: 0 1px 0 rgba(26, 36, 32, 0.04), 0 12px 40px rgba(26, 36, 32, 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  height: 100%;
  min-height: 100dvh;
  line-height: 1.55;
  overflow: hidden;
}

/* Atmosphère */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(61, 143, 104, 0.18), transparent 55%),
    radial-gradient(900px 600px at 100% 20%, rgba(184, 107, 60, 0.14), transparent 50%),
    linear-gradient(165deg, #eef3ec 0%, #e2e9df 40%, #d8e0d4 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(26, 36, 32, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 36, 32, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--copper);
}

button,
input {
  font-family: inherit;
}

/* Layout */
.app {
  display: flex;
  height: 100%;
  min-height: 100dvh;
  max-height: 100dvh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.35s var(--ease);
}

.sidebar-brand {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 10px;
  border-radius: 12px;
}

.sidebar-brand .mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.sidebar-brand .mark span {
  color: var(--accent);
}

.sidebar-brand .tag {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.sidebar-welcome {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(47, 107, 79, 0.12);
  border: 1px solid rgba(47, 107, 79, 0.22);
}

.sidebar-welcome[hidden] {
  display: none !important;
}

.user-head {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  image-rendering: pixelated;
  background: #1a2420;
  object-fit: cover;
  flex-shrink: 0;
}

.user-head[hidden] {
  display: none !important;
}

.user-head--lg {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.profile-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}

.profile-modal-head .auth-modal-lead {
  margin: 0;
}

.profile-modal-head h2 {
  margin: 0 0 4px;
}

.welcome-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
}

.nav-link-btn {
  width: 100%;
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  text-align: left;
}

.nav-link[hidden],
.nav-link-btn[hidden],
.sidebar-welcome[hidden] {
  display: none !important;
}

/* Auth modal */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 36, 32, 0.45);
  backdrop-filter: blur(3px);
}

.auth-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  max-height: min(92dvh, 920px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin: auto;
  padding: 28px 26px 24px;
  border-radius: var(--radius);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: pageIn 0.35s var(--ease);
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.auth-modal-close:hover {
  background: rgba(26, 36, 32, 0.06);
  color: var(--ink);
}

.auth-modal-panel h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  padding-right: 28px;
}

.auth-modal-lead {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: var(--radius-sm);
  background: rgba(26, 36, 32, 0.05);
}

.auth-tab {
  flex: 1;
  border: none;
  border-radius: 6px;
  padding: 9px 12px;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.active {
  background: var(--panel-solid);
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(26, 36, 32, 0.08);
}

.auth-forgot-link {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
}

.auth-discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 4px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #4752c4;
  background: #5865f2;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.28);
  transition: background 0.15s ease, transform 0.15s ease;
}

.auth-discord-btn:hover {
  background: #4752c4;
  transform: translateY(-1px);
  color: #fff !important;
}

.auth-discord-btn[hidden] {
  display: none !important;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-divider[hidden] {
  display: none !important;
}

.auth-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 0.92rem;
  outline: none;
  box-sizing: border-box;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus {
  border-color: var(--accent);
}

.auth-form input[readonly],
.auth-form input[readonly]:focus {
  background: rgba(26, 36, 32, 0.06);
  color: var(--muted);
  cursor: not-allowed;
  border-color: var(--line);
}

.profile-pseudo-locked-hint {
  margin: -6px 0 14px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.profile-pseudo-locked-hint a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.auth-legal-block {
  margin: 4px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(26, 36, 32, 0.03);
}

.auth-form label.auth-legal-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 0;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-soft);
  cursor: pointer;
}

.auth-form label.auth-legal-check + .auth-legal-check {
  border-top: 1px solid rgba(26, 36, 32, 0.08);
  margin-top: 4px;
  padding-top: 10px;
}

.auth-form label.auth-legal-check input[type="checkbox"] {
  appearance: auto;
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  padding: 0;
  flex: 0 0 1.1rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-form label.auth-legal-check span {
  flex: 1;
  min-width: 0;
}

.auth-form .auth-legal-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-form .auth-legal-link:hover {
  color: var(--ink);
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
  justify-content: center;
}

.auth-hint {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--muted);
  min-height: 1.2em;
}

.auth-hint.is-error {
  color: #a33a2a;
}

.auth-hint.is-ok {
  color: var(--accent);
}

.auth-modal-panel--wide {
  max-width: 480px;
}

.auth-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  resize: vertical;
  outline: none;
}

.auth-form textarea:focus {
  border-color: var(--accent);
}

.profile-panel[hidden] {
  display: none;
}

.profile-orders {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-orders li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.9rem;
}

.profile-order-row .profile-order-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.profile-order-row .profile-order-main span {
  color: var(--muted);
  font-size: 0.84rem;
}

.profile-order-invoice {
  flex-shrink: 0;
}

.profile-delete-box {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(180, 60, 50, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(180, 60, 50, 0.06);
}

.profile-delete-box .admin-sub {
  margin: 0 0 6px;
  color: #8a3a32;
}

.profile-delete-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
  text-align: left;
}

.profile-delete-field input {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.profile-delete-field input:focus {
  outline: 2px solid rgba(155, 59, 52, 0.35);
  border-color: rgba(155, 59, 52, 0.45);
}

.profile-delete-btn {
  width: 100%;
  margin-top: 6px;
  background: #9b3b34;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 14px;
  font-weight: 650;
  cursor: pointer;
}

.profile-delete-btn:hover {
  background: #7e2f2a;
}

.profile-delete-modal {
  z-index: 260;
}

.profile-delete-panel {
  max-width: 420px;
  text-align: center;
  padding-top: 28px;
}

.profile-delete-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(155, 59, 52, 0.12);
  color: #9b3b34;
  font-size: 1.35rem;
}

.profile-delete-panel h2 {
  color: #7e2f2a;
}

.profile-delete-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 8px;
}

.profile-delete-modal-actions .profile-delete-btn {
  margin-top: 0;
  width: auto;
}

.loyalty-head {
  margin-bottom: 12px;
}

.loyalty-spent {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.loyalty-head .hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.loyalty-tiers {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: min(52vh, 440px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.loyalty-card {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 12px;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  transition: background 0.15s var(--ease);
}

.loyalty-slot {
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(145deg, #3d8f68, #2f6b4f);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.loyalty-objective {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  margin-top: 2px;
}

.loyalty-progress {
  width: 100%;
  min-width: 0;
  height: 6px;
  border: none;
  border-radius: 999px;
  background: #e2e8e3;
  overflow: hidden;
  box-shadow: none;
}

.loyalty-progress-meta {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
  line-height: 1.2;
}

.loyalty-progress-meta span:nth-child(2)::before {
  content: none;
}

.loyalty-card-actions {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: center;
  flex-shrink: 0;
  min-width: 88px;
}

.loyalty-action-done,
.loyalty-action-locked {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
  max-width: none;
  line-height: 1.25;
}

.loyalty-card:last-child {
  border-bottom: none;
}

.loyalty-card:hover {
  background: rgba(47, 107, 79, 0.04);
}

.loyalty-card--locked {
  opacity: 0.72;
}

.loyalty-card--claimable {
  background: rgba(47, 107, 79, 0.07);
}

.loyalty-card--claimable:hover {
  background: rgba(47, 107, 79, 0.11);
}

.loyalty-card--claimed {
  background: rgba(184, 107, 60, 0.06);
}

.loyalty-card--locked .loyalty-slot {
  background: #c5cec8;
}

.loyalty-card--claimed .loyalty-slot {
  background: linear-gradient(145deg, #d4925a, #b86b3c);
}

.loyalty-slot-level {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff;
  text-shadow: none;
}

.loyalty-card--locked .loyalty-slot-level {
  color: #5c6b63;
}

.loyalty-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.loyalty-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.loyalty-card-top h4 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--ink);
  text-shadow: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loyalty-status {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: none;
  border-radius: 999px;
  background: #e8eee6;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.loyalty-status--locked {
  background: #e8eee6;
  color: var(--muted);
}

.loyalty-status--claimable {
  background: rgba(47, 107, 79, 0.15);
  color: var(--accent);
}

.loyalty-status--claimed {
  background: rgba(184, 107, 60, 0.15);
  color: var(--copper);
}

.loyalty-obj-label {
  display: none;
}

.loyalty-objective p {
  display: none;
}

.loyalty-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hot));
  transition: width 0.25s var(--ease);
  box-shadow: none;
}

.loyalty-card--claimed .loyalty-progress-bar {
  background: linear-gradient(90deg, var(--copper), var(--copper-soft));
}

.loyalty-rewards {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.loyalty-rewards ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loyalty-rewards li {
  display: inline;
}

.loyalty-rewards li + li::before {
  content: " · ";
  color: var(--muted);
}

.loyalty-card-actions .btn {
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 5px 12px;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
  background: var(--accent);
  color: #fff;
}

.loyalty-card-actions .btn:hover {
  background: var(--accent-hot);
}

/* Lien d'invitation parrainage */
.profile-discord-box {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, rgba(47, 107, 79, 0.06), rgba(255, 255, 255, 0.9));
}

.profile-discord-box .admin-sub {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.profile-discord-box > .hint {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.profile-discord-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--ink);
}
.profile-discord-status.is-ok {
  color: #1b5e3a;
}
.profile-discord-status .fa-discord {
  color: #5865f2;
}
.profile-discord-id {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}
.profile-discord-linked .btn {
  display: block;
  margin: 0 auto 6px;
}

.referral-link-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.referral-link-row label {
  flex: 1;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.referral-link-row input[type="text"] {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.referral-link-row input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.15);
}

.referral-link-row #referralCopyBtn {
  align-self: flex-end;
  margin: 0;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .loyalty-card {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .loyalty-card-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .referral-link-row {
    flex-direction: column;
  }
  .referral-link-row #referralCopyBtn {
    align-self: stretch;
  }
}

.profile-skin {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 8px;
}

.profile-skin-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(ellipse at 50% 70%, rgba(47, 107, 79, 0.12), transparent 65%),
    linear-gradient(180deg, #e8eee9 0%, #d5ddd7 100%);
  min-height: 300px;
  overflow: hidden;
}

.profile-skin-canvas {
  display: block;
  width: 180px;
  height: 260px;
  max-width: 100%;
  cursor: grab;
  touch-action: none;
  border-radius: 8px;
}

.profile-skin-canvas[hidden] {
  display: none !important;
}

.profile-skin-canvas:active {
  cursor: grabbing;
}

.profile-skin-hint-3d {
  margin: 0;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.profile-skin-hint-3d[hidden] {
  display: none !important;
}

.profile-skin-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
  padding: 24px 8px;
}

.profile-skin-placeholder[hidden] {
  display: none !important;
}

.profile-skin-placeholder i {
  font-size: 1.6rem;
  opacity: 0.5;
}

.profile-skin-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.profile-skin-form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  font-size: 0.9rem;
}

.profile-skin-file {
  margin-bottom: 10px;
}

.profile-skin-file-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.profile-skin-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.profile-skin-file-btn {
  width: 100%;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border-style: dashed !important;
  min-height: 42px;
}

.profile-skin-file-btn:hover {
  border-color: var(--accent) !important;
  color: var(--accent);
}

.profile-skin-file-input:focus + .profile-skin-file-btn {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.profile-skin-form > .btn {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

@media (max-width: 480px) {
  .profile-skin {
    grid-template-columns: 1fr;
  }
}

.cart-fab {
  position: fixed;
  right: 24px;
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  z-index: 150;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(26, 36, 32, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s var(--ease), background 0.2s;
}

.cart-fab[hidden] {
  display: none;
}

.cart-fab:hover {
  background: var(--accent);
  transform: scale(1.06);
}

.cart-fab-count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--copper);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-search {
  padding: 16px 18px 8px;
  position: relative;
}

.sidebar-search input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-solid);
  color: var(--ink);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s var(--ease);
}

.sidebar-search input:focus {
  border-color: var(--accent);
}

.sidebar-search .search-ico {
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-35%);
  color: var(--muted);
  font-size: 0.85rem;
  pointer-events: none;
}

#searchResults {
  display: none;
  margin: 0 18px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.search-hit {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  color: var(--ink);
  font-size: 0.85rem;
}

.search-hit:hover {
  background: rgba(47, 107, 79, 0.08);
}

.search-hit strong {
  display: block;
  font-size: 0.8rem;
  color: var(--accent);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 28px;
}

/* Scrollbars fines (sidebar + contenu principal + panneaux) */
.sidebar-nav,
.main,
.admin-content,
.admin-nav,
.auth-modal-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(47, 107, 79, 0.45) transparent;
}

.sidebar-nav::-webkit-scrollbar,
.main::-webkit-scrollbar,
.admin-content::-webkit-scrollbar,
.admin-nav::-webkit-scrollbar,
.auth-modal-panel::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track,
.main::-webkit-scrollbar-track,
.admin-content::-webkit-scrollbar-track,
.admin-nav::-webkit-scrollbar-track,
.auth-modal-panel::-webkit-scrollbar-track {
  background: transparent;
  margin: 8px 0;
}

.sidebar-nav::-webkit-scrollbar-thumb,
.main::-webkit-scrollbar-thumb,
.admin-content::-webkit-scrollbar-thumb,
.admin-nav::-webkit-scrollbar-thumb,
.auth-modal-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(47, 107, 79, 0.35), rgba(47, 107, 79, 0.55));
  border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover,
.main::-webkit-scrollbar-thumb:hover,
.admin-content::-webkit-scrollbar-thumb:hover,
.admin-nav::-webkit-scrollbar-thumb:hover,
.auth-modal-panel::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.nav-link-admin {
  color: var(--copper);
}

.nav-link-admin:hover {
  color: var(--copper);
  background: rgba(184, 107, 60, 0.12);
}

.admin-placeholder {
  margin-top: 8px;
  padding: 28px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: center;
  color: var(--muted);
}

.admin-modal {
  padding: 12px;
  align-items: stretch;
  justify-content: stretch;
}

.admin-modal .admin-panel {
  width: min(1480px, 98vw);
  max-width: 98vw;
  height: min(96vh, 980px);
  max-height: 96vh;
  margin: auto;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: none;
}

.admin-nav {
  background: linear-gradient(180deg, rgba(40, 28, 20, 0.95), rgba(28, 20, 14, 0.98));
  color: #f2e8dc;
  padding: 22px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow-y: auto;
}

.admin-content {
  padding: 22px 28px 32px;
  overflow-y: auto;
  background: var(--panel, #fff);
  min-height: 0;
}

.admin-nav h2 {
  font-size: 1.05rem;
  margin: 0 8px 4px;
  color: #fff;
}

.admin-nav-lead {
  margin: 0 8px 16px;
  font-size: 0.75rem;
  opacity: 0.65;
}

.admin-nav-btn {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: rgba(242, 232, 220, 0.82);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  margin-bottom: 4px;
}

.admin-nav-btn:hover,
.admin-nav-btn.active {
  background: rgba(184, 107, 60, 0.28);
  color: #fff;
}

.admin-nav-group {
  margin-bottom: 4px;
}

.admin-nav-group > .admin-nav-btn {
  margin-bottom: 0;
}

.admin-nav-sub {
  display: flex;
  flex-direction: column;
  padding: 2px 0 2px 18px;
  margin: 0 0 2px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  margin-left: 18px;
}

.admin-nav-btn--sub {
  font-size: 0.82rem;
  padding: 8px 10px;
  margin-bottom: 2px;
  opacity: 0.9;
}

.admin-nav-group.is-open .admin-nav-btn:not(.admin-nav-btn--sub).active,
.admin-nav-group.has-active > .admin-nav-btn:not(.admin-nav-btn--sub) {
  background: rgba(184, 107, 60, 0.18);
}

.admin-shop-products {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.admin-shop-cat-block {
  margin: 0;
  padding: 14px 16px 10px;
}

.admin-shop-cat-block .admin-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-shop-cat-block .admin-table-wrap {
  margin: 0;
}

.admin-promo-items {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line, rgba(0, 0, 0, 0.08));
}

.admin-promo-items-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.admin-promo-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
  padding: 4px 2px;
}

.admin-promo-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-promo-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.9rem;
  cursor: pointer;
}

.admin-promo-check input {
  margin: 0;
}

.admin-pane--console {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.admin-pane--console[hidden] {
  display: none !important;
}

.admin-pane--console h3 {
  flex: 0 0 auto;
}

.admin-mc-console {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 320px;
  max-height: calc(96vh - 140px);
  border: 1px solid rgba(40, 28, 20, 0.18);
  border-radius: 10px;
  overflow: hidden;
  background: #1a1511;
  color: #e8dccf;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.84rem;
}

.admin-mc-console-out {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-mc-console-out:empty::before {
  content: "Console vide — aucune sortie pour le moment.";
  color: rgba(232, 220, 207, 0.38);
  font-style: italic;
}

.admin-mc-console-line {
  margin: 0 0 4px;
}

.admin-mc-console-line--chat {
  color: #d8f0c8;
}

.admin-mc-console-line--cmd {
  color: #f0c9a0;
}

.admin-mc-console-line--panel {
  color: #c9b4ff;
}

.admin-mc-console-line--info {
  color: #9ec9e8;
}

.admin-mc-console-line--server {
  color: #ffd28a;
  font-weight: 600;
}

.admin-mc-console-line--box {
  color: #7dd3c0;
  font-weight: 600;
}

.admin-mc-console-line--muted {
  color: rgba(232, 220, 207, 0.45);
}

.admin-mc-console-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #241c16;
}

.admin-mc-console-bar--readonly {
  opacity: 0.72;
  cursor: default;
  user-select: none;
}

.admin-mc-console-readonly {
  flex: 1;
  min-width: 0;
  color: rgba(242, 232, 220, 0.4);
  font-style: italic;
  font-size: 0.82rem;
}

.admin-mc-console-prompt {
  color: #c47a45;
  font-weight: 700;
  user-select: none;
}

.admin-mc-console-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #f2e8dc;
  font: inherit;
  outline: none;
  padding: 6px 0;
}

.admin-mc-console-input::placeholder {
  color: rgba(242, 232, 220, 0.35);
}

.admin-mc-console-send {
  flex: 0 0 auto;
}

.admin-content h3 {
  margin: 0 0 16px;
  font-size: 1.15rem;
}

.admin-sub {
  margin: 22px 0 10px;
  font-size: 0.95rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.admin-dash-extra {
  margin-top: 20px;
}

.admin-online-card {
  margin-bottom: 14px;
}

.admin-online-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.admin-online-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(40, 28, 20, 0.1);
  background: linear-gradient(180deg, #fffdf9, #f6f0e8);
}

.admin-online-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.admin-online-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink, #2a2118);
}

.admin-online-op-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: rgba(184, 107, 60, 0.18);
  color: var(--copper, #b86b3c);
}

.admin-online-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-act-btn {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 5px 10px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.admin-act-btn:hover {
  transform: translateY(-1px);
}

.admin-act-btn:active {
  transform: translateY(0);
}

.admin-act-btn--kick {
  background: #ebe4da;
  color: #4a3b2e;
  border-color: rgba(40, 28, 20, 0.12);
}

.admin-act-btn--kick:hover {
  background: #e0d5c6;
}

.admin-act-btn--ban {
  background: #c45c4a;
  color: #fff;
  box-shadow: 0 1px 0 rgba(120, 40, 28, 0.25);
}

.admin-act-btn--ban:hover {
  background: #b04e3d;
}

.admin-act-btn--op {
  background: var(--copper, #b86b3c);
  color: #fff;
  box-shadow: 0 1px 0 rgba(120, 70, 30, 0.25);
}

.admin-act-btn--op:hover {
  background: #a55d32;
}

.admin-act-btn--deop {
  background: #2a2118;
  color: #f2e8dc;
}

.admin-act-btn--deop:hover {
  background: #3a2e22;
}

.admin-dash-pager {
  margin-top: 10px;
}

.admin-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.admin-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  min-height: 28px;
}

.admin-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(90, 122, 74, 0.12);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: #eee;
  color: #555;
}

.admin-badge--pending {
  background: rgba(180, 120, 30, 0.15);
  color: #8a5a00;
}

.admin-badge--delivered {
  background: rgba(90, 122, 74, 0.15);
  color: #3d6a35;
}

.admin-reward-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-reward-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-reward-tab {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-reward-tab.active {
  background: var(--sidebar, #3d2e24);
  color: #fff;
  border-color: transparent;
}

.admin-reward-actions {
  display: flex;
  gap: 6px;
}

.admin-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.admin-pager-info {
  font-size: 0.8rem;
  color: var(--muted);
  margin-right: auto;
}

.admin-stat {
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.admin-stat b {
  display: block;
  font-size: 1.35rem;
  color: var(--copper);
  line-height: 1.2;
}

.admin-stat span {
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.admin-invoice-pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.admin-invoice-actions {
  white-space: nowrap;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  background: var(--bg);
  font-weight: 600;
  white-space: nowrap;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table .btn-xs {
  font-size: 0.72rem;
  padding: 4px 8px;
  margin: 0 2px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
}

.admin-table .btn-xs.danger {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.35);
}

.admin-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  align-items: flex-end;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 1 140px;
  min-width: 110px;
}

.admin-field > span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}

.admin-field--grow {
  flex: 1 1 200px;
  min-width: 160px;
}

.admin-field--num {
  flex: 0 0 88px;
  min-width: 72px;
  max-width: 100px;
}

.admin-field input,
.admin-field textarea,
.admin-select,
.admin-form-row input[type="text"],
.admin-form-row input:not([type="checkbox"]),
.admin-settings-form input[type="url"],
.admin-settings-form input[type="text"],
.admin-settings-form input[type="password"],
.admin-settings-form input:not([type="checkbox"]) {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--bg);
  color: inherit;
}

.admin-field--num input {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.admin-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% + 2px), calc(100% - 9px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
  cursor: pointer;
}

.admin-media {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.02);
}

.admin-media-preview {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}

.admin-media-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.admin-media-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-media-pick {
  cursor: pointer;
  margin: 0;
}

.admin-media-hint {
  font-size: 0.8rem;
}

.admin-form-row input[type="text"],
.admin-form-row input:not([type="checkbox"]),
.admin-settings-form input[type="url"],
.admin-settings-form input[type="text"],
.admin-settings-form input[type="password"],
.admin-settings-form input:not([type="checkbox"]) {
  flex: 1 1 120px;
  min-width: 100px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--bg);
  color: inherit;
}

.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  padding-bottom: 8px;
}

.admin-settings-form {
  display: grid;
  gap: 10px;
  max-width: 480px;
  margin-bottom: 18px;
}

.admin-settings-form label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
}

.admin-settings-form .admin-check {
  display: inline-flex;
}

.admin-hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 6px 0;
}

.admin-sec-info {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}

.admin-sec-info ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.admin-info-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-info-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-size: 0.82rem;
  color: var(--muted);
}

.admin-info-chip strong {
  color: var(--text);
  font-weight: 600;
}

.admin-info-chip--afk {
  border-color: color-mix(in srgb, #c9a227 45%, var(--line));
  background: color-mix(in srgb, #c9a227 12%, var(--bg));
}

.admin-info-player {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.admin-info-head {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  image-rendering: pixelated;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--line) 40%, transparent);
}

.admin-info-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-info-op {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: #3b6d11;
  vertical-align: middle;
}

.admin-info-afk {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #a67c00;
}

.admin-info-muted {
  color: var(--muted);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.shop-grid[hidden],
#shopHomePanel[hidden] {
  display: none !important;
}

.shop-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--panel, #fff);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
}

.shop-card h3 {
  margin: 0;
  font-size: 1rem;
}

.shop-card .shop-price {
  color: var(--copper);
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.shop-price-old {
  color: var(--muted);
  font-weight: 500;
  text-decoration: line-through;
  font-size: 0.85em;
}

.shop-price-sale {
  color: var(--copper);
  font-weight: 700;
}

.shop-sale-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(196, 90, 58, 0.14);
  color: var(--copper);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.shop-sale-until {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.shop-card .btn {
  margin-top: auto;
}

.shop-loading,
.vote-empty {
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-captcha {
  margin: 10px 0 6px;
  min-height: 0;
}

.auth-captcha.is-on {
  min-height: 78px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1a6b3c;
  font-weight: 700;
}

.hero-online.is-live {
  color: #157a3a;
}

.hero-online .online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22a05a;
  box-shadow: 0 0 0 0 rgba(34, 160, 90, 0.45);
  animation: onlinePulse 2s ease infinite;
}

.hero-online.is-offline {
  color: #6b7280;
  font-weight: 600;
}

.hero-online.is-offline .online-dot {
  background: #b42318;
  animation: none;
  box-shadow: none;
}

.hero-online.is-loading {
  opacity: 0.75;
}

@keyframes onlinePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 160, 90, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(34, 160, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 160, 90, 0); }
}

.hero-online i {
  font-size: 0.85em;
  opacity: 0.9;
}

.admin-console-form {
  margin: 16px 0 10px;
}

.admin-console-label {
  display: block;
  font-size: 0.88rem;
}

.admin-console-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 6px;
}

.admin-console-prefix {
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}

.admin-console-row input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 12px;
  font: inherit;
  font-family: ui-monospace, Consolas, monospace;
  background: var(--bg);
  color: inherit;
}

.admin-console-row .btn {
  border-radius: 0 8px 8px 0;
  white-space: nowrap;
}

.admin-console-out {
  margin: 0;
  min-height: 140px;
  max-height: 280px;
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #1a1410;
  color: #e8dcc8;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.vote-list {
  display: grid;
  gap: 12px;
}

.vote-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel, #fff);
}

.vote-row strong {
  display: block;
  margin-bottom: 2px;
}

.vote-row span {
  font-size: 0.82rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .admin-modal {
    padding: 0;
  }
  .admin-modal .admin-panel {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    max-height: 40vh;
  }
  .admin-nav h2,
  .admin-nav-lead {
    width: 100%;
  }
  .admin-nav-btn {
    width: auto;
    flex: 1 1 auto;
  }
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 16px 10px 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav-link i {
  width: 1.1em;
  text-align: center;
  opacity: 0.75;
}

.nav-link:hover {
  background: rgba(47, 107, 79, 0.1);
  color: var(--ink);
  transform: translateX(2px);
}

.nav-link.active {
  background: var(--accent);
  color: #fff;
}

.nav-link.active i {
  opacity: 1;
}

.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100dvh;
  margin-left: var(--sidebar-w);
}

.main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  overscroll-behavior: contain;
}

.site-footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 28px;
  padding-right: 100px;
  min-height: 56px;
  box-sizing: border-box;
  border-top: 1px solid var(--line);
  background: rgba(244, 247, 242, 0.92);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 30;
  overflow: visible;
}

.footer-rating {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  min-width: 0;
  text-align: center;
  position: relative;
}

.footer-rating-label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: #c4892a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.footer-rating-label i {
  font-size: 0.78rem;
  color: #e0a824;
  filter: drop-shadow(0 0 3px rgba(224, 168, 36, 0.35));
}

.footer-stars {
  display: inline-flex;
  gap: 1px;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 244, 214, 0.55), rgba(255, 236, 190, 0.28));
  border: 1px solid rgba(212, 160, 23, 0.28);
  box-shadow: 0 1px 6px rgba(212, 160, 23, 0.1);
}

.footer-star {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0 1px;
  margin: 0;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  color: #c9a227;
  -webkit-text-stroke: 0.6px rgba(120, 80, 10, 0.35);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45),
    0 1px 4px rgba(180, 120, 20, 0.22);
  filter: grayscale(0.3) brightness(1.05);
  opacity: 0.75;
  transition: color 0.15s ease, transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease, text-shadow 0.15s ease;
}

.footer-star:hover,
.footer-star.is-hover,
.footer-star.is-active {
  color: #ffc107;
  -webkit-text-stroke: 0.4px rgba(160, 100, 0, 0.45);
  filter: none;
  opacity: 1;
  transform: translateY(-1px) scale(1.1);
  text-shadow:
    0 0 6px rgba(255, 200, 40, 0.8),
    0 0 12px rgba(255, 180, 0, 0.4),
    0 1px 0 rgba(180, 110, 0, 0.3);
}

.footer-star:focus-visible {
  outline: 2px solid rgba(212, 160, 23, 0.65);
  outline-offset: 1px;
  border-radius: 4px;
}

.footer-star:disabled {
  cursor: default;
  opacity: 0.9;
}

.footer-gems-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 0;
  padding: 3px 10px 3px 6px;
  border-radius: 999px;
  border: 1px solid rgba(184, 107, 60, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 248, 235, 0.95), rgba(255, 236, 210, 0.88));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 2px 8px rgba(184, 107, 60, 0.1);
  cursor: help;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.footer-gems-badge:hover,
.footer-gems-badge:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(184, 107, 60, 0.45);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 6px 16px rgba(184, 107, 60, 0.18);
  outline: none;
}

.footer-gems-badge.is-claimed {
  border-color: rgba(61, 122, 69, 0.3);
  background: linear-gradient(135deg, rgba(236, 248, 238, 0.95), rgba(220, 240, 224, 0.9));
  box-shadow: none;
  cursor: default;
}

.footer-gems-badge.is-pending {
  border-color: rgba(184, 140, 40, 0.4);
  background: linear-gradient(135deg, rgba(255, 248, 220, 0.98), rgba(255, 236, 190, 0.92));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  cursor: help;
}

.footer-gems-badge.is-claimed:hover,
.footer-gems-badge.is-claimed:focus-visible {
  transform: none;
  box-shadow: none;
}

.footer-gems-badge.is-pending .footer-gems-amt,
.footer-gems-badge.is-pending .footer-gems-txt {
  color: #9a6b12;
}

.footer-gems-badge.is-hidden {
  display: none;
}

.footer-gems-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
}

.footer-gems-amt,
.footer-gems-txt {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--copper, #b86b3c);
  letter-spacing: 0.01em;
  line-height: 1;
}

.footer-gems-badge.is-claimed .footer-gems-amt,
.footer-gems-badge.is-claimed .footer-gems-txt {
  color: #3d7a45;
}

.footer-gems-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 220px;
  padding: 8px 11px;
  border-radius: 10px;
  background: #1f2a22;
  color: #f4f7f2;
  font-size: 0.72rem;
  font-weight: 550;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 8px 22px rgba(20, 28, 22, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 40;
}

.footer-gems-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1f2a22;
}

.footer-gems-tip strong {
  color: #f0c15a;
  font-weight: 750;
}

.footer-gems-badge:hover .footer-gems-tip,
.footer-gems-badge:focus-visible .footer-gems-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.footer-gems-badge.is-claimed .footer-gems-tip {
  display: none;
}

.footer-rating-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-rating-avg {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--muted);
  line-height: 1;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(26, 36, 32, 0.05);
  border: 1px solid var(--line);
}

.footer-rating-avg[hidden] {
  display: none;
}

.admin-avis-head {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  image-rendering: pixelated;
  vertical-align: middle;
  background: #e8ece6;
}

.admin-avis-stars {
  color: #d4a017;
  letter-spacing: 1px;
  font-size: 1rem;
}

/* Badge reCAPTCHA — logo seul dans le footer, s’ouvre au survol */
.grecaptcha-badge {
  bottom: 8px !important;
  right: 18px !important;
  z-index: 35 !important;
  width: 70px !important;
  height: 60px !important;
  overflow: hidden !important;
  transition: width 0.25s ease;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1) !important;
  border-radius: 2px;
}

.grecaptcha-badge:hover,
.grecaptcha-badge:focus-within {
  width: 256px !important;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-link,
.footer-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ink, #2a3228);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.footer-link:hover,
.footer-btn:hover {
  color: var(--accent);
  border-color: rgba(90, 122, 74, 0.35);
  background: rgba(90, 122, 74, 0.08);
}

.footer-btn--discord {
  background: rgba(88, 101, 242, 0.08);
  border-color: rgba(88, 101, 242, 0.25);
  color: #4a56c8;
}

.footer-btn--discord:hover {
  background: rgba(88, 101, 242, 0.14);
  color: #3b47b0;
}

.footer-credit {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
  max-width: min(380px, calc(100% - 90px));
  margin-right: 4px;
  padding-right: 0;
}

.footer-legal {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted);
}

.footer-credit strong {
  color: var(--ink-soft);
  font-weight: 700;
}

.menu-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 120;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-solid);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 36, 32, 0.35);
  z-index: 90;
}

/* Pages */
.page {
  display: none;
  animation: pageIn 0.45s var(--ease);
}

.page.active {
  display: block;
}

#home.page.active {
  height: 100%;
  min-height: 100%;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero — un seul écran, pas de défilement */
.hero {
  position: relative;
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 48px 56px;
  overflow: hidden;
  box-sizing: border-box;
}

.hero-plane {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 20%, rgba(232, 238, 230, 0.55) 55%, var(--bg) 92%),
    linear-gradient(120deg, rgba(47, 107, 79, 0.35) 0%, transparent 45%),
    linear-gradient(300deg, rgba(184, 107, 60, 0.28) 0%, transparent 40%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #2a4a3a 0%, #4a6b52 35%, #8a9e7a 70%, #c4b49a 100%);
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 9vw, 5.8rem);
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: var(--ink);
  margin-bottom: 18px;
}

.hero-brand em {
  font-style: normal;
  color: var(--accent);
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 34ch;
  margin-bottom: 28px;
  font-weight: 500;
}

.hero-meta {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #1a2420;
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
}

.hero-meta .sep {
  margin: 0 10px;
  color: var(--copper);
}

.hero-ip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 250, 244, 0.92);
  color: #14201a !important;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  border: 1px solid rgba(26, 36, 32, 0.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hero-ip a,
a.hero-ip {
  color: #14201a !important;
  text-decoration: none !important;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--ink);
  color: #f4f7f2;
}

.btn-primary:hover {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: var(--copper);
  color: var(--copper);
}

#voteChangeName[hidden] {
  display: none !important;
}

.btn-copper {
  background: var(--copper);
  color: #fffaf4;
}

.btn-copper:hover {
  background: var(--copper-soft);
  color: #fff;
}

.btn.copied {
  background: var(--accent);
  color: #fff;
}

/* Content sections */
.section {
  padding: 40px 48px 72px;
  max-width: 960px;
}

.section-head {
  margin-bottom: 28px;
}

.section-head h1 {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.section-head p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 52ch;
}

.block {
  margin-bottom: 36px;
}

.block h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.block > .hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.cmd-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.cmd-row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.search-highlight {
  background: rgba(47, 107, 79, 0.16) !important;
  box-shadow: inset 0 0 0 2px var(--accent);
  border-radius: 6px;
  animation: highlightPulse 0.7s var(--ease);
}

@keyframes highlightPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

.cmd-row:last-child {
  border-bottom: none;
}

.cmd-row code {
  font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

.cmd-row span {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 12px;
}

.info-item {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  min-width: 0;
  overflow: hidden;
}

.info-item .label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}

.info-item .value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

.info-item a.value {
  color: var(--accent);
  display: block;
  max-width: 100%;
}

.prose {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px 24px;
  margin-bottom: 16px;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.prose p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.prose p + p {
  margin-top: 10px;
}

.prose em {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 0.88rem;
  color: var(--copper);
  font-weight: 600;
}

.grade-path {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ink);
}

/* Grades & Jobs — cartes style wiki (bordures néon + visuels) */
.grade-hint {
  margin-bottom: 28px;
}

.grade-section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 14px;
  color: var(--ink);
}

.grade-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.grade-card {
  --grade-glow: #4ade80;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 18px 16px 20px;
  border-radius: 12px;
  border: 2px solid var(--grade-glow);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, color-mix(in srgb, var(--grade-glow) 22%, transparent), transparent 70%),
    linear-gradient(180deg, #141a18 0%, #0c100e 100%);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--grade-glow) 35%, transparent),
    0 0 24px color-mix(in srgb, var(--grade-glow) 18%, transparent),
    var(--shadow);
  color: #e8f0ea;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.grade-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--grade-glow) 55%, transparent),
    0 0 36px color-mix(in srgb, var(--grade-glow) 32%, transparent),
    0 16px 40px rgba(0, 0, 0, 0.25);
}

.grade-card--warden { --grade-glow: #2dd4bf; }
.grade-card--wither { --grade-glow: #c084fc; }
.grade-card--dragon { --grade-glow: #f0a468; }
.grade-card--creeper { --grade-glow: #4ade80; }

.grade-card__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 128px;
  margin: 0 0 10px;
  image-rendering: pixelated;
}

.grade-card__visual img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--grade-glow) 50%, transparent));
}

.grade-card__name {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 1.6vw, 1.2rem);
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--grade-glow);
  text-shadow: 0 0 18px color-mix(in srgb, var(--grade-glow) 55%, transparent);
  margin: 0 0 4px;
  line-height: 1.15;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.grade-card--dragon .grade-card__name {
  font-size: clamp(0.78rem, 1.35vw, 1.05rem);
  letter-spacing: 0.01em;
}

.grade-card__price {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f5faf6;
  margin: 0 0 2px;
}

.grade-card__req {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(232, 240, 234, 0.65);
  margin: 0 0 14px;
}

.grade-card__req strong {
  color: var(--grade-glow);
}

.grade-card__block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--grade-glow) 35%, transparent);
}

.grade-card__label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grade-glow);
  margin-bottom: 8px;
  text-align: center;
}

.grade-card__block ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.grade-card__block li {
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
  color: rgba(232, 240, 234, 0.88);
}

.grade-path-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.grade-path-rail span {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.grade-path-rail span:not(:last-child)::after {
  content: none;
}

.grade-path-rail--staff span {
  border-color: color-mix(in srgb, var(--copper) 40%, var(--line));
  color: var(--copper);
}

.grade-path-note {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.job-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.job-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.job-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  transform: translateY(-2px);
}

.job-card strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent);
}

.job-card span {
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .grade-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grade-cards {
    grid-template-columns: 1fr;
  }
}

.box-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.box-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.box-row:last-child {
  border-bottom: none;
}

.box-row strong {
  font-family: var(--font-display);
  color: var(--copper);
  font-size: 0.95rem;
}

.box-row span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* IA chat */
.ia-shell {
  padding: 32px 48px;
  max-width: 800px;
  height: calc(100vh - 0px);
  display: flex;
  flex-direction: column;
}

.ia-shell .section-head {
  flex-shrink: 0;
}

.ia-panel {
  flex: 1;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ia-history {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ia-message {
  display: flex;
  gap: 10px;
  max-width: 92%;
  animation: pageIn 0.3s var(--ease);
}

.ia-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ia-message-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
  background: var(--bg-deep);
  color: var(--accent);
}

.ia-message.user .ia-message-avatar {
  background: var(--ink);
  color: #f4f7f2;
}

.ia-message-bubble {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.ia-message.user .ia-message-bubble {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.ia-message-bubble b {
  color: inherit;
  font-weight: 700;
}

.ia-message.ia .ia-message-bubble b {
  color: var(--ink);
}

.ia-message-loading .ia-loading-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 2px;
  border-radius: 50%;
  background: var(--muted);
  animation: dots 1s infinite ease-in-out;
}

.ia-loading-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.ia-loading-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dots {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.ia-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 10px;
}

.ia-chat-suggestion {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-soft);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.ia-chat-suggestion:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ia-form {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.ia-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.95rem;
  outline: none;
}

.ia-form input:focus {
  border-color: var(--accent);
}

.ia-form button {
  width: 48px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.ia-form button:hover {
  background: var(--accent);
}

/* Responsive */
@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .sidebar {
    transform: translateX(-105%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop.open {
    display: block;
  }

  .main-col {
    margin-left: 0;
  }

  .main {
    margin-left: 0;
  }

  .hero {
    padding: 88px 24px 48px;
  }

  .site-footer {
    padding: 8px 20px;
    padding-right: 96px;
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-meta {
    align-items: flex-start;
    text-align: left;
    max-width: calc(100% - 88px);
  }

  .footer-rating {
    order: 2;
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    padding: 0;
    gap: 8px;
  }

  .footer-meta {
    order: 3;
  }

  .grecaptcha-badge {
    bottom: 8px !important;
    right: 12px !important;
  }

  .section,
  .ia-shell {
    padding: 28px 20px 56px;
  }

  .cmd-row,
  .box-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .ia-shell {
    height: auto;
    min-height: calc(100svh - 40px);
  }
}

/* Azuriom-like shop / vote */
.az-page { max-width: 1100px; }
.az-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
.az-layout--vote { grid-template-columns: 1fr 260px; align-items: start; }
.az-page-title { margin: 0 0 14px; font-size: 1.6rem; line-height: 1.2; }
.az-side { display: flex; flex-direction: column; gap: 12px; }
/* Descend Top votes pour l’aligner avec la carte (sous le titre Vote) */
.az-side--vote {
  align-self: start;
  margin-top: calc(1.6rem * 1.2 + 14px);
}
.az-side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.az-side-title i { color: var(--copper, #b86b3c); font-size: 0.9em; }
.az-cat-nav { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel, #fff); }
.az-cat-btn { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 10px 12px; border-radius: 8px; font: inherit; font-size: 0.9rem; color: inherit; cursor: pointer; text-align: left; }
.az-cat-btn:hover { background: rgba(184, 107, 60, 0.1); }
.az-cat-btn.active { background: var(--copper, #b86b3c); color: #fff; }
.az-side-login { width: 100%; justify-content: center; }
.az-widget, .az-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel, #fff); padding: 14px 16px; }
.az-widget h4 { margin: 0 0 10px; font-size: 0.92rem; display: flex; align-items: center; gap: 8px; }
.az-widget-meta, .az-muted { font-size: 0.82rem; color: var(--muted); margin: 6px 0 0; }
.az-progress { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.az-progress-bar { height: 100%; background: var(--copper, #b86b3c); border-radius: 999px; transition: width 0.35s ease; }
.az-recent, .az-top, .az-rewards { list-style: none; margin: 0; padding: 0; }
.az-recent li, .az-top li, .az-rewards li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.84rem; align-items: center; }
.az-recent li:last-child, .az-top li:last-child, .az-rewards li:last-child { border-bottom: 0; }

.vote-top-player {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.vote-top-head {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  image-rendering: pixelated;
  background: #1a2420;
  flex-shrink: 0;
  object-fit: cover;
}

.vote-top-rank {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.vote-top-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.az-main h1 { margin: 0 0 14px; font-size: 1.6rem; }
.az-main h3 { margin: 0 0 6px; font-size: 1.05rem; }
.az-vote-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.az-vote-form input { flex: 1 1 180px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--bg); color: inherit; }
.az-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.vote-sites-grid { display: grid; gap: 10px; margin-top: 12px; }
.vote-site-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: inherit; font: inherit; cursor: pointer; text-align: left; transition: opacity 0.2s ease, filter 0.2s ease, border-color 0.2s ease; }
.vote-site-btn:hover:not(:disabled):not(.is-cooldown) { border-color: var(--copper, #b86b3c); background: rgba(184, 107, 60, 0.08); }
.vote-site-btn .vote-site-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vote-site-btn .vote-site-img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: rgba(0,0,0,0.04); flex-shrink: 0; }
.vote-site-btn strong { display: block; }
.vote-site-btn .meta { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.vote-site-cta { flex-shrink: 0; padding: 8px 14px; border-radius: 8px; background: var(--copper, #b86b3c); color: #fff; font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vote-site-btn.is-cooldown,
.vote-site-btn:disabled {
  opacity: 0.55;
  filter: grayscale(0.85);
  cursor: not-allowed;
  pointer-events: none;
  background: #eceff1;
  border-color: #d0d5d8;
}
.vote-site-btn.is-cooldown .vote-site-cta,
.vote-site-btn:disabled .vote-site-cta {
  background: #9aa3a8;
  color: #fff;
  min-width: 7.5rem;
  text-align: center;
}
.vote-site-btn.is-cooldown .meta {
  color: #b86b3c;
  font-weight: 600;
}
.vote-reward-row { display: flex; align-items: center; gap: 10px; }
.vote-reward-row img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }

.vote-rewards-card {
  overflow: hidden;
}

.vote-rewards-head {
  margin-bottom: 14px;
}

.vote-rewards-head h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.vote-rewards-head .az-muted {
  margin: 0;
}

.vote-rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.vote-reward-tile {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 250, 244, 0.95), rgba(232, 238, 230, 0.55));
  box-shadow: 0 1px 0 rgba(26, 36, 32, 0.04);
}

.vote-reward-media {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.7), transparent 55%),
    rgba(26, 36, 32, 0.06);
  display: grid;
  place-items: center;
  overflow: hidden;
  image-rendering: pixelated;
}

.vote-reward-media img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.vote-reward-fallback {
  color: var(--copper);
  font-size: 1.25rem;
}

.vote-reward-meta {
  flex: 1;
  min-width: 0;
}

.vote-reward-meta h4 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.vote-reward-chance-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.vote-reward-chance-row strong {
  color: var(--accent);
  font-size: 0.9rem;
}

.vote-reward-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(26, 36, 32, 0.08);
  overflow: hidden;
}

.vote-reward-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--copper), var(--accent-hot));
}

.cart-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cart-item-info strong {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.78rem;
  color: var(--copper);
  font-weight: 600;
}

.cart-item-qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 2px;
}

.cart-qty-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.cart-qty-btn:hover {
  background: rgba(47, 107, 79, 0.1);
  color: var(--accent);
}

.cart-qty-val {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
}

.cart-item-remove {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}

.cart-item-remove:hover {
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
}

.cart-account {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.cart-total {
  margin: 10px 0 0;
  font-size: 0.95rem;
}

.cart-pay-step {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.cart-pay-title {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.cart-pay-back {
  width: 100%;
  margin-bottom: 10px;
}

.paypal-buttons {
  margin-top: 4px;
  min-height: 45px;
}

.email-verify-banner {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(184, 107, 60, 0.12);
  color: #8a5a00;
  font-size: 0.78rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.email-verify-banner[hidden] {
  display: none !important;
}

.email-verify-banner .btn-xs,
#emailVerifyResend {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(184, 107, 60, 0.35);
  background: #fff;
  color: #8a5a00;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.2;
}

.email-verify-banner .btn-xs:hover,
#emailVerifyResend:hover {
  background: rgba(184, 107, 60, 0.12);
  border-color: rgba(184, 107, 60, 0.55);
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 244, 0.96);
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner p {
  margin: 0;
  flex: 1 1 220px;
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Toast haut-droite (remplace alert()) */
.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 12px 14px 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 244, 0.97);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.35;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: toastIn 0.28s var(--ease);
}

.toast.is-ok {
  border-color: rgba(47, 107, 79, 0.35);
  background: rgba(236, 245, 239, 0.98);
}

.toast.is-error {
  border-color: rgba(164, 58, 42, 0.35);
  background: rgba(255, 240, 237, 0.98);
}

.toast-msg {
  flex: 1;
  margin: 0;
}

.toast-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 2px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px) translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }
}

.az-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; }
.admin-az-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--bg);
}
.admin-az-card h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.discord-channel-editor .admin-check {
  display: flex;
  align-items: flex-end;
  padding-bottom: 8px;
}
.discord-perm-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}
.discord-perm-role {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: color-mix(in srgb, var(--bg) 92%, #000 8%);
}
.discord-perm-role-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.discord-perm-role-head strong {
  font-size: 0.92rem;
}
.discord-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 6px 10px;
}
.discord-perm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted, #8a7a6a);
}
.discord-perm-item span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.discord-perm-tog {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.discord-perm-tog button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 2px 7px;
  font-size: 0.72rem;
  cursor: pointer;
  line-height: 1.3;
}
.discord-perm-tog button.is-on[data-state="allow"] {
  background: #2d6a4f;
  color: #fff;
}
.discord-perm-tog button.is-on[data-state="deny"] {
  background: #9b2226;
  color: #fff;
}
.discord-perm-tog button.is-on[data-state="inherit"] {
  background: color-mix(in srgb, var(--line) 80%, #000 20%);
  color: #fff;
}

.discord-welcome-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.discord-welcome-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 16px;
  align-items: start;
}
.discord-welcome-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.discord-welcome-preview-wrap {
  position: sticky;
  top: 8px;
}
.discord-welcome-preview-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #8a7a6a);
  margin-bottom: 8px;
}
.discord-welcome-preview {
  border: 1px solid #2b2d31;
  border-radius: 4px;
  border-left: 4px solid #f07a3a;
  padding: 12px 14px 14px;
  background: #2b2d31;
  color: #dbdee1;
  font-size: 0.9rem;
  line-height: 1.45;
  box-shadow: 0 1px 0 rgba(0,0,0,.2);
}
.discord-welcome-preview-msg {
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 10px;
  min-height: 1.2em;
  color: #dbdee1;
}
.discord-welcome-preview-card {
  border-radius: 10px;
  overflow: hidden;
  min-height: 140px;
  background:
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.72)),
    linear-gradient(135deg, #2b2d31, #1a1b1e);
  background-size: cover;
  background-position: center;
}
.discord-welcome-preview-card.is-hidden {
  display: none;
}
.discord-welcome-preview-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 16px;
  text-align: center;
  min-height: 140px;
}
.discord-welcome-preview-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.85);
  background:
    radial-gradient(circle at 30% 30%, #5865f2, #2b2d31 70%);
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.discord-welcome-preview-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.discord-welcome-preview-user {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255,255,255,.85);
}
.discord-bg-picker-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #8a7a6a);
  margin-bottom: 4px;
}
.discord-bg-presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.discord-bg-preset {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  background: transparent;
  text-align: center;
  color: inherit;
  font: inherit;
}
.discord-bg-preset:hover .discord-bg-preset-swatch {
  transform: translateY(-1px);
}
.discord-bg-preset.is-selected {
  border-color: var(--copper, #b86b3c);
}
.discord-bg-preset.is-selected .discord-bg-preset-swatch {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--copper, #b86b3c) 55%, transparent);
}
.discord-bg-preset-swatch {
  display: block;
  height: 48px;
  border-radius: 8px;
  border: 1px solid var(--line);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.discord-bg-preset-name {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  color: var(--muted, #8a7a6a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discord-bg-picker .admin-media {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.admin-char-count {
  display: block;
  margin-top: 4px;
}
@media (max-width: 900px) {
  .discord-welcome-grid {
    grid-template-columns: 1fr;
  }
  .discord-welcome-preview-wrap {
    position: static;
  }
}

.admin-plugin-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.admin-plugin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.admin-plugin-field-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #8a7a6a);
}

.admin-plugin-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid rgba(40, 28, 20, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(180deg, #fffdf9 0%, #f7f1e8 100%);
  color: var(--ink, #2a2118);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.35;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 1px 2px rgba(40, 28, 20, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: text;
}

.admin-plugin-input:hover {
  border-color: rgba(184, 107, 60, 0.35);
}

.admin-plugin-input:focus {
  border-color: var(--copper, #b86b3c);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 0 0 3px rgba(184, 107, 60, 0.18);
}

.admin-plugin-input--key {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: #3d2e22;
  background:
    linear-gradient(180deg, #1f1813 0%, #2a2118 100%);
  color: #f0dcc4;
  border-color: rgba(40, 28, 20, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 2px rgba(40, 28, 20, 0.12);
}

.admin-plugin-input--key:hover {
  border-color: rgba(184, 107, 60, 0.55);
}

.admin-plugin-input--key:focus {
  border-color: var(--copper, #b86b3c);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 3px rgba(184, 107, 60, 0.22);
}

.admin-plugin-input--key::placeholder {
  color: rgba(240, 220, 196, 0.35);
}
.admin-switch {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  padding: 8px 0;
}
.admin-switch input[type="checkbox"] {
  width: 40px;
  height: 22px;
  accent-color: var(--copper, #b86b3c);
}
.admin-settings-form select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--panel, #fff);
  color: inherit;
}
.admin-stat--online b {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.admin-stat--online .online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22a05a;
  display: inline-block;
}
.admin-stat--online.is-offline .online-dot {
  background: #b42318;
}
.admin-settings-form textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--bg); color: inherit; resize: vertical; }

.vote-toast {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  animation: voteToastIn 0.35s ease;
}

.vote-toast[hidden] {
  display: none !important;
}

.vote-toast--ok {
  background: linear-gradient(135deg, rgba(47, 107, 79, 0.14), rgba(47, 107, 79, 0.06));
  border-color: rgba(47, 107, 79, 0.35);
  box-shadow: 0 8px 24px rgba(47, 107, 79, 0.12);
}

.vote-toast--cooldown {
  background: linear-gradient(135deg, rgba(184, 107, 60, 0.16), rgba(184, 107, 60, 0.06));
  border-color: rgba(184, 107, 60, 0.4);
  box-shadow: 0 8px 24px rgba(184, 107, 60, 0.12);
}

.vote-toast--cooldown .vote-toast-ico {
  background: rgba(184, 107, 60, 0.18);
  color: #b86b3c;
}

.vote-toast-timer {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink, #1a2420);
}

.vote-toast-ico {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}

.vote-toast--ok .vote-toast-ico {
  background: rgba(47, 107, 79, 0.18);
  color: #2f6b4f;
}

.vote-toast--err .vote-toast-ico {
  background: rgba(180, 35, 24, 0.15);
  color: #b42318;
}

.vote-toast-body strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--ink, #1a2420);
}

.vote-toast-body p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted, #5c6b63);
}

@keyframes voteToastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .az-layout, .az-layout--vote { grid-template-columns: 1fr; }
  .az-side--vote { margin-top: 0; }
}

/* —— Responsive fin : tablettes / Android / iPhone —— */
@media (max-width: 900px) {
  .auth-modal-panel,
  .auth-modal-panel--wide {
    max-width: min(420px, 100%);
    padding: 22px 18px 20px;
  }

  .auth-tab {
    min-height: 44px;
    padding: 10px 12px;
  }

  .auth-submit,
  .auth-forgot-link,
  .btn {
    min-height: 44px;
  }

  .auth-form input[type="text"],
  .auth-form input[type="email"],
  .auth-form input[type="password"],
  .auth-form textarea,
  .az-vote-form input,
  input,
  select,
  textarea {
    font-size: 16px; /* évite le zoom auto iOS/Android */
  }

  .auth-form label.auth-legal-check {
    min-height: 44px;
    padding: 8px 0;
  }

  .auth-form label.auth-legal-check input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    flex-basis: 1.25rem;
  }

  .toast-stack {
    top: max(12px, env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    left: auto;
    max-width: min(360px, calc(100vw - 24px));
  }

  .cart-fab {
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  }

  .menu-toggle {
    top: max(12px, env(safe-area-inset-top, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
  }

  .hero-ip,
  .hero-actions {
    flex-wrap: wrap;
  }

  .shop-grid,
  .shop-products-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .auth-modal {
    align-items: flex-end;
    padding: 0;
  }

  .auth-modal-panel,
  .auth-modal-panel--wide {
    max-width: 100%;
    max-height: min(94dvh, 100%);
    border-radius: 16px 16px 0 0;
    padding: 20px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .auth-modal-panel h2 {
    font-size: 1.2rem;
  }

  .auth-modal-lead {
    font-size: 0.84rem;
    margin-bottom: 14px;
  }

  .auth-tabs {
    margin-bottom: 14px;
  }

  .auth-form label {
    margin-bottom: 10px;
  }

  .auth-legal-block {
    padding: 10px 12px;
  }

  .hero {
    padding: 80px 16px 40px;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 9vw, 2.4rem);
  }

  .section,
  .ia-shell {
    padding: 22px 16px 48px;
  }

  .site-footer {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    padding-right: 90px;
    min-height: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .grecaptcha-badge {
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    right: 10px !important;
  }

  .az-page-title,
  .az-main h1 {
    font-size: 1.35rem;
  }

  .vote-site-btn {
    flex-wrap: wrap;
  }

  .vote-site-cta {
    width: 100%;
    text-align: center;
  }

  .admin-nav {
    max-height: 32vh;
    overflow-y: auto;
  }
}

/* Tablettes paysage / petits laptops */
@media (min-width: 901px) and (max-width: 1200px) {
  :root {
    --sidebar-w: 250px;
  }
}

/* Préférence réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Discord admin — composer messages */
.discord-msg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0 6px;
  align-items: center;
}
.discord-msg-toolbar .discord-md-btn {
  min-width: 2rem;
  padding: 4px 8px;
  font-size: 0.85rem;
  line-height: 1.2;
}
.discord-msg-toolbar-sep {
  width: 1px;
  height: 1.4rem;
  background: rgba(0, 0, 0, 0.15);
  margin: 0 4px;
}
.discord-msg-editor-wrap {
  position: relative;
}
.discord-mention-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 20;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  margin-top: 4px;
}
.discord-mention-item {
  display: flex;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
}
.discord-mention-item:hover,
.discord-mention-item:focus {
  background: rgba(88, 101, 242, 0.12);
}
.discord-mention-kind {
  color: #5865f2;
  font-size: 0.75rem;
  text-transform: uppercase;
  min-width: 3.5rem;
}
.discord-files-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  font-size: 0.9rem;
}
.discord-files-list li {
  padding: 2px 0;
}
.discord-file-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
}
.discord-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.discord-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}
.discord-file-input:focus-visible + .discord-file-btn {
  outline: 2px solid #5865f2;
  outline-offset: 2px;
}
.discord-mention-pickers {
  margin: 4px 0 10px;
  align-items: flex-end;
}
.discord-mention-pickers .admin-field {
  min-width: 0;
}
