.member-body { min-height: 100vh; }

.auth-box {
  position: relative;
  max-width: 400px;
  margin: 90px auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.auth-box .logo { margin-bottom: 8px; }
.auth-box h2 { margin-top: 0; margin-bottom: 20px; }

.form-row-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  font-weight: 400;
}
.form-row-checkbox input[type="checkbox"] { width: 16px; height: 16px; flex: none; }
.auth-box form { text-align: left; }
.auth-box p { margin-top: 16px; font-size: 0.85rem; }

.auth-box #lang-switcher {
  position: absolute;
  top: 12px;
  right: 12px;
  margin-left: 0;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.google-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  color: #4285f4;
  font-weight: 700;
  font-size: 0.8rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.member-main { padding-bottom: 64px; }

.subsection-title {
  margin: 32px 0 16px;
  font-size: 1.15rem;
}

.stat-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.expert-symbol-select {
  font-size: 1rem;
  font-weight: 600;
  background: var(--bg-alt);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  max-width: 100%;
}

.expert-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.expert-chart-header .subsection-title { margin-bottom: 0; }
.expert-chart-tabs { margin-bottom: 0; border-bottom: none; }

.accrual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.accrual-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.accrual-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.accrual-card-header h4 {
  margin: 0;
  font-size: 1rem;
}

.accrual-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 4px 0;
}

.accrual-row strong { color: var(--text); }

.accrual-gain {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  margin: 8px 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}

.accrual-gain span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.accrual-gain strong {
  font-size: 1.3rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.accrual-countdown {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.accrual-disclaimer {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  line-height: 1.4;
}

.by-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.project-share-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.project-share-card h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.project-share-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 4px 0;
}

.project-share-row strong { color: var(--text); }

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 8px;
}

#history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

#history-table th,
#history-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

#history-table td:nth-child(5) {
  white-space: normal;
  word-break: break-all;
  min-width: 160px;
}

#history-table th {
  background: var(--bg-alt);
  color: var(--text-muted);
  font-weight: 600;
}

#gains-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

#gains-table th,
#gains-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

#gains-table td:nth-child(5) {
  white-space: normal;
  word-break: break-all;
  min-width: 160px;
}

#gains-table th {
  background: var(--bg-alt);
  color: var(--text-muted);
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-pending { background: rgba(255, 193, 7, 0.15); color: #ffc107; }
.badge-valide { background: rgba(61, 220, 151, 0.15); color: var(--accent); }
.badge-rejete { background: rgba(255, 107, 107, 0.15); color: var(--danger); }
.badge-neutre { background: rgba(148, 163, 184, 0.15); color: var(--text-muted); }

.badge-verified-account {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px 7px 10px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #eafff6;
  background: linear-gradient(135deg, #17b884, #0e9d6f);
  box-shadow: 0 6px 16px -6px rgba(23, 184, 132, .6), inset 0 1px 0 rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .12);
  margin-left: 12px;
  vertical-align: middle;
}
.badge-verified-account svg { width: 18px; height: 18px; flex-shrink: 0; }

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-visible { opacity: 1; transform: translateX(0); }

.toast-success { border-left-color: var(--accent); }
.toast-error { border-left-color: var(--danger); }

.text-muted { color: var(--text-muted); }
.btn-sm { padding: 6px 10px; font-size: 0.82rem; }

.selfie-capture {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.selfie-capture video,
.selfie-capture img {
  width: 240px;
  height: 240px;
  max-width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  background: #000;
  margin: 0 auto 12px;
  display: block;
  transform: scaleX(-1);
}

.selfie-capture #selfie-placeholder {
  margin: 12px 0;
}

.selfie-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.selfie-capture .form-error { margin-top: 12px; }

/* Solde Duels : panneau de chargement du portefeuille de jeu */
.game-wallet-row .stat-card { align-items: flex-start; gap: 10px; }
.game-wallet-row #game-charge-btn { margin-top: 4px; }

.game-charge-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  max-width: 520px;
}
.game-charge-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.game-charge-instruction { color: var(--warning); font-size: 0.9rem; }

/* Sélecteur de moyen de paiement en pastilles — même patron que
   .bucket-toggle-row/.bucket-toggle-btn (choix réel/démo des Duels), pour
   que le retrait de gains de parrainage reste visuellement cohérent avec
   le reste de l'app plutôt que d'introduire un nouveau composant. */
.network-toggle-row { display: flex; gap: 8px; flex-wrap: wrap; }
.network-toggle-btn {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border, #333);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.network-toggle-btn.active { background: rgba(79, 142, 247, 0.15); color: var(--accent-2); border-color: var(--accent-2); }

/* Retour de validation en direct sous le champ adresse — purement indicatif,
   le serveur reste la seule autorité de validation réelle. */
.field-hint { font-size: 0.8rem; margin-top: 2px; }
.field-hint.ok { color: var(--accent); }
.field-hint.bad { color: var(--danger); }

/* Étape de récapitulatif avant un retrait externe (argent réel, envoi
   crypto irréversible) : liste claire montant/moyen/adresse à relire avant
   confirmation finale. */
.earnings-recap { margin: 4px 0 14px; }
.earnings-recap-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.92rem;
}
.earnings-recap-row:last-child { border-bottom: none; }
.earnings-recap-row dt { color: var(--text-muted); margin: 0; }
.earnings-recap-row dd { margin: 0; font-weight: 600; text-align: right; word-break: break-all; }
.earnings-recap-address { font-family: monospace; font-size: 0.85rem; }
.status-message.warning { color: var(--warning); }
.game-qr-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.game-qr-box img { width: 180px; height: 180px; border-radius: 8px; background: #fff; padding: 6px; }
.game-pay-fields { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.game-pay-fields code { word-break: break-all; }
.game-charge-status { color: var(--text-muted); font-size: 0.9rem; margin-top: 14px; }
.game-tx-positive { color: var(--accent); }
.game-tx-negative { color: var(--danger); }

/* Filtre "3 dernières entrées / période" partagé par tous les tableaux
   d'historique (duels, outsider, tournois, transactions, gains) — cf.
   public/member/history-filter.js. La carte Alertes n'utilise pas ces
   classes, elle garde son propre rendu. */
.history-filter-bar { display: flex; gap: 16px; margin: -6px 0 12px; }
.history-filter-toggle, .history-filter-reduce {
  background: none; border: none; color: var(--accent-2); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; padding: 2px 0; font-family: inherit;
}
.history-filter-toggle:hover, .history-filter-reduce:hover { text-decoration: underline; }
.history-filter-panel {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; margin: 0 0 14px;
}
.history-filter-panel.hidden { display: none; }
.history-filter-panel input[type="date"] {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 6px 8px; font-size: 0.82rem; font-family: inherit;
}
.history-filter-arrow { color: var(--text-muted); font-size: 0.82rem; }

/* Lobby des Duels */
.duel-create-card { max-width: 420px; padding: 20px; margin-bottom: 24px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); }
.duel-create-card .btn { margin-top: 10px; }
.duel-challenges-list { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.duel-challenge-card {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px;
}
.duel-challenge-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.duel-challenge-info span { color: var(--text-muted); font-size: 0.88rem; }
.duel-active-box {
  position: relative; width: 100%; max-width: min(94vw, 760px);
  padding: clamp(20px, 3vw, 36px);
  background: var(--card-bg); border: 1px solid var(--accent); border-radius: var(--radius);
  margin: 0 auto 24px;
}
/* Plein écran pendant un duel actif (posé/retiré par duels.js via
   enterGameMode/enterLobbyMode) : rien d'autre à l'écran ne doit distraire
   tant qu'une manche est en jeu — recouvre entièrement l'en-tête et le
   reste de la page, sans avoir à les cibler un par un individuellement.
   Revient automatiquement à la normale au clic sur "Retour au lobby". */
body.duel-fullscreen { overflow: hidden; }
body.duel-fullscreen .duel-active-box {
  position: fixed;
  inset: 0;
  z-index: 1000;
  max-width: none;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  border-radius: 0;
  border-width: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(16px, 4vh, 40px);
}
.duel-sound-btn {
  position: absolute; top: 10px; right: 10px;
  background: transparent; border: 1px solid var(--border); border-radius: 6px;
  font-size: 1rem; line-height: 1; padding: 5px 7px; cursor: pointer;
}
.duel-sound-btn:hover { border-color: var(--accent); }
.duel-players { font-size: 1.05rem; font-weight: 600; }
.duel-pot { color: var(--accent); font-weight: 600; }
.duel-note { color: var(--text-muted); font-size: 0.9rem; }

/* Écran de jeu des Duels */
.duel-scoreboard { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.duel-side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.duel-player-name { color: var(--text-muted); font-size: clamp(0.92rem, 1.6vw, 1.15rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Zone centrale des réactions emoji : entre le tableau des scores et la
   zone de tir — plutôt que collées dans le coin de chaque nom, désormais
   bien visibles, groupées et nettement plus grosses. Hauteur réservée même
   à vide pour ne jamais faire sauter la mise en page quand un emoji apparaît. */
.duel-emoji-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  min-height: clamp(3.2rem, 7vw, 4.6rem);
}
.duel-emoji-bubble {
  font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; flex-shrink: 0;
}
.duel-emoji-pop { animation: duel-emoji-pop 0.25s ease-out; }
@keyframes duel-emoji-pop {
  from { transform: scale(0.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.duel-emoji-bar { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 4px; }
.duel-emoji-btn {
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1; padding: clamp(6px, 1vw, 10px) clamp(8px, 1.2vw, 12px); cursor: pointer;
}
.duel-emoji-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.duel-emoji-btn:disabled { opacity: 0.45; cursor: default; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .duel-emoji-pop { animation: none; }
}
.duel-score { font-size: clamp(1.6rem, 4vw, 2.6rem); color: var(--text); }
.duel-round-indicator { color: var(--accent-2); font-weight: 600; font-size: clamp(0.9rem, 1.4vw, 1.05rem); white-space: nowrap; }
.duel-role { font-weight: 600; margin: 6px 0 10px; font-size: clamp(1rem, 1.6vw, 1.2rem); }
.duel-role-badge {
  display: inline-block; margin-top: 14px; padding: clamp(7px, 1vw, 10px) clamp(16px, 2.5vw, 24px);
  border-radius: 999px; font-weight: 800; font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  letter-spacing: 0.06em;
}
.duel-role-badge-shooter { background: rgba(61, 220, 151, 0.16); color: var(--accent); border: 1px solid var(--accent); }
.duel-role-badge-keeper { background: rgba(79, 142, 247, 0.16); color: var(--accent-2); border: 1px solid var(--accent-2); }
.duel-goal {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.5vw, 18px);
  background: linear-gradient(180deg, rgba(79, 142, 247, 0.12), transparent);
  border: 2px solid var(--border); border-bottom: none;
  border-radius: 10px 10px 0 0; padding: clamp(18px, 2.5vw, 28px) clamp(12px, 2vw, 20px) clamp(22px, 3vw, 32px);
}
.duel-zone {
  padding: clamp(26px, 4vw, 44px) 8px; font-size: clamp(0.95rem, 1.6vw, 1.15rem); font-weight: 600;
  background: var(--bg); color: var(--text);
  border: 1px dashed var(--accent-2); border-radius: 8px; cursor: pointer;
}
.duel-zone:hover:not(:disabled) { background: rgba(79, 142, 247, 0.18); }
.duel-zone:disabled { opacity: 0.45; cursor: not-allowed; }
.duel-countdown { color: var(--warning); font-weight: 600; margin-top: 12px; font-size: clamp(1rem, 1.4vw, 1.1rem); }
.duel-last-result { font-weight: 600; color: var(--accent); min-height: 1.4em; font-size: clamp(1rem, 1.4vw, 1.15rem); }
.duel-history { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; color: var(--text-muted); font-size: 0.88rem; }
.duel-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.duel-dot-goal { background: var(--accent); }
.duel-dot-miss { background: var(--danger); }
#duel-final h3 { font-size: 1.5rem; margin-bottom: 8px; }
/* Bulle de notification Duels (menu + carte du tableau de bord) */
.nav-duels-link { position: relative; }
.duels-nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; margin-left: 5px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 0.68rem; font-weight: 700; line-height: 1; vertical-align: top;
}
.duels-nav-badge-pulse { animation: duels-badge-pulse 1.2s ease-in-out infinite; }
@keyframes duels-badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}
.duels-alert { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 0.88rem; font-weight: 600; color: var(--accent-2); }
.duels-alert-active { color: var(--danger); }
.duels-alert-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.duels-alert-active .duels-alert-dot { animation: duels-badge-pulse 1.2s ease-in-out infinite; }
.duels-push-btn { margin-top: 10px; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; }
.push-btn-icon { width: 15px; height: 15px; flex-shrink: 0; }
.game-demo-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 6px 10px;
  border: 1px dashed var(--warning, #c9982a);
  border-radius: 8px;
  background: rgba(201, 152, 42, 0.08);
  font-size: 0.85rem;
  color: var(--warning, #c9982a);
}
.game-demo-balance-text { display: inline-flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.game-demo-balance strong { color: var(--warning, #c9982a); }
.game-balance-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ovt-est {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(79, 142, 247, 0.12);
  border-radius: 5px;
  padding: 2px 8px;
  white-space: nowrap;
}
.ovt-rate-note { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 0.76rem; color: var(--text-muted); }
.ovt-rate-note::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); display: inline-block; }
.bucket-choice-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 6px 0 12px;
  font-size: 0.88rem;
}
.bucket-choice-label { color: var(--text-muted); }
.bucket-choice-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.duel-demo-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(201, 152, 42, 0.15);
  color: var(--warning, #c9982a);
  vertical-align: middle;
}
.duel-real-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(61, 220, 151, 0.15);
  color: var(--accent, #3ddc97);
  vertical-align: middle;
}
.bucket-toggle-row { display: flex; gap: 6px; margin: 6px 0 10px; }
.bucket-toggle-btn {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--border, #333);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.bucket-toggle-btn.active.bucket-toggle-reel { background: rgba(61, 220, 151, 0.15); color: var(--accent, #3ddc97); border-color: var(--accent, #3ddc97); }
.bucket-toggle-btn.active.bucket-toggle-demo { background: rgba(201, 152, 42, 0.15); color: var(--warning, #c9982a); border-color: var(--warning, #c9982a); }
.game-transfer-code { display: block; margin-top: 8px; font-size: 0.85rem; color: var(--text-muted); }
.game-transfer-code strong { color: var(--text); letter-spacing: 1px; }
.game-transfer-copy { background: none; border: none; cursor: pointer; padding: 0 4px; color: var(--text-muted); display: inline-flex; align-items: center; }
.game-transfer-copy svg { width: 16px; height: 16px; }
.game-transfer-copy:hover { color: var(--accent-2); }
.game-transfer-recipient { font-weight: 600; color: var(--accent); margin: 4px 0 10px; }
.game-transfer-recipient.form-error { color: var(--danger); }
.game-pseudo-form { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.game-pseudo-form input { flex: 0 1 160px; padding: 4px 8px; }
#game-pseudo-error { display: block; margin-top: 4px; font-size: 0.8rem; }
.duels-push-hint { display: block; margin-top: 6px; font-size: 0.8rem; color: var(--text-muted); }
@media (prefers-reduced-motion: reduce) {
  .duels-nav-badge-pulse { animation: none; }
  .duels-alert-active .duels-alert-dot { animation: none; }
}

.duel-outcome { font-weight: 600; white-space: nowrap; }
.duel-outcome-won { color: var(--accent); }
.duel-outcome-lost { color: var(--danger); }

.duel-leaderboard-wrapper { max-width: 560px; margin-bottom: 24px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
#leaderboard-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
#leaderboard-table th, #leaderboard-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
#leaderboard-table th { background: var(--bg-alt); color: var(--text-muted); font-weight: 600; }
#leaderboard-table td:nth-child(2) { white-space: normal; word-break: break-word; }

/* ----- Animation du tir : but stylisé, ballon et gardien ----- */
/* Le ballon part du point de penalty (bas, centre) vers la zone tirée ;
   le gardien plonge vers la zone qu'il a choisie. La zone (gauche/centre/
   droite) est posée en JS via --zone-mult (-1/0/1) sur chaque élément ;
   --goal-half et --goal-rise (définies ici, en fonction de la largeur
   d'écran) donnent la distance réelle à parcourir, donc l'animation reste
   proportionnée quelle que soit la taille du terrain. La classe .duel-anim
   déclenche les transitions. */
.duel-pitch {
  position: relative; height: clamp(128px, 20vw, 210px); max-width: min(92%, 460px); margin: 14px auto 6px;
  --goal-half: clamp(80px, 15vw, 150px);
  --goal-rise: clamp(82px, 14vw, 145px);
}
.duel-goal-frame {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: clamp(240px, 86%, 400px); height: clamp(72px, 60%, 120px);
  border: 3px solid var(--border); border-bottom: none; border-radius: 6px 6px 0 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 14px);
}
.duel-keeper {
  position: absolute; top: 24%; left: 50%; font-size: clamp(1.7rem, 4vw, 2.8rem); line-height: 1;
  transform: translateX(calc(-50% + (var(--zone-mult, 0) * var(--goal-half))));
}
.duel-ball {
  position: absolute; bottom: 0; left: 50%; font-size: clamp(1.35rem, 3vw, 2.2rem); line-height: 1;
  transform: translate(-50%, 0);
}
.duel-anim .duel-ball {
  transition: transform 0.55s ease-in;
  transform: translate(calc(-50% + (var(--zone-mult, 0) * var(--goal-half))), calc(-1 * var(--goal-rise)));
}
.duel-anim .duel-keeper { transition: transform 0.4s ease-out 0.12s; }
.duel-anim-goal .duel-goal-frame { animation: duel-goal-flash 0.9s ease-out 0.55s; }
.duel-anim-save .duel-keeper { animation: duel-keeper-save 0.5s ease-out 0.55s; }
@keyframes duel-goal-flash {
  0% { border-color: var(--accent); box-shadow: 0 0 18px rgba(79, 142, 247, 0.55); }
  100% { border-color: var(--border); box-shadow: none; }
}
@keyframes duel-keeper-save {
  0%, 100% { transform: translateX(calc(-50% + (var(--zone-mult, 0) * var(--goal-half)))) scale(1); }
  50% { transform: translateX(calc(-50% + (var(--zone-mult, 0) * var(--goal-half)))) scale(1.35); }
}
.duel-score-pop { animation: duel-score-pop 0.5s ease-out; }
@keyframes duel-score-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.45); color: var(--accent); }
  100% { transform: scale(1); }
}

/* Terrain 3D (Three.js, cf. public/member/pitch3d.js) — classes distinctes
   de .duel-pitch/.duel-keeper/.duel-ball ci-dessus, volontairement : le
   Jeu de Tir au Fusil réutilise encore ces classes-là pour son animation
   CSS 2D, donc on ne les touche pas pour ne rien casser côté Fusil. */
.duel-pitch-3d {
  position: relative;
  width: min(92%, 460px);
  aspect-ratio: 4 / 3;
  margin: 14px auto 6px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, #0d1424 0%, #0a1a12 72%);
  border: 1px solid var(--border);
}
.duel-pitch-3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Même gabarit que .duel-pitch-3d, fond de repli désertique/crépuscule
   propre au Fusil (cf. public/member/range3d.js) le temps que la scène
   WebGL prenne le relais. */
.range-pitch-3d {
  position: relative;
  width: min(92%, 460px);
  aspect-ratio: 4 / 3;
  margin: 14px auto 6px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, #2a1730 0%, #5c2f3a 45%, #c9713f 100%);
  border: 1px solid var(--border);
}
@media (prefers-reduced-motion: reduce) {
  .duel-anim .duel-ball, .duel-anim .duel-keeper { transition: none; }
  .duel-anim-goal .duel-goal-frame, .duel-anim-save .duel-keeper, .duel-score-pop { animation: none; }
}

/* ----- Mode Outsider (sous-onglet de Duels) ----- */
.game-mode-tabs { display: flex; gap: 8px; margin: 4px 0 20px; border-bottom: 1px solid var(--border); }
.game-mode-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted); font-weight: 600; font-size: 0.95rem; cursor: pointer;
  padding: 10px 4px; margin-bottom: -1px;
}
.game-mode-tab:hover { color: var(--text); }
.game-mode-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.outsider-formats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
.outsider-format-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px;
}
.outsider-format-card strong { font-size: 1.02rem; }
.outsider-format-seats { color: var(--text-muted); font-size: 0.85rem; }
.outsider-format-card .btn { align-self: stretch; }
.outsider-format-track {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.outsider-format-track .btn { margin-left: auto; align-self: auto; }

.outsider-seats-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.outsider-seats-row span:last-child { margin-left: 6px; color: var(--text-muted); font-size: 0.9rem; }

.outsider-reveal { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 3vw, 28px); margin: 10px 0 16px; flex-wrap: wrap; }
.outsider-team-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(14px, 2vw, 22px) clamp(18px, 3vw, 30px); min-width: 140px;
}
.outsider-team-weak { border-color: var(--border); }
.outsider-team-strong { border-color: var(--accent-2); }
.outsider-team-emoji { width: clamp(52px, 9vw, 76px); height: auto; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255,255,255,0.08); }
.outsider-team-card strong { font-size: clamp(0.95rem, 1.6vw, 1.1rem); text-align: center; }
.outsider-team-rating { color: var(--text-muted); font-size: 0.82rem; }
.outsider-vs { font-weight: 800; color: var(--text-muted); letter-spacing: 0.05em; }
.outsider-score-line { text-align: center; font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 700; margin: 6px 0; }

/* Drapeaux (images SVG hébergées — cf. outsider.js flagImg()) utilisés dans
   l'historique et le tableau de classement, en ligne avec le texte. */
.outsider-flag { width: 20px; height: 15px; object-fit: cover; border-radius: 2px; vertical-align: -2px; box-shadow: 0 0 0 1px rgba(255,255,255,0.12); }
.outsider-history-title-row { display: inline-flex; align-items: center; gap: 6px; }
.outsider-ranking-teams { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; white-space: normal !important; }

/* Phase de sélection d'équipe (2 minutes, choix libre) */
.outsider-picking-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px;
  margin-top: 14px; max-height: 420px; overflow-y: auto; padding-right: 4px;
}
.outsider-pick-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--bg); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 12px 8px; cursor: pointer; font-family: inherit; color: var(--text);
  transition: border-color 0.15s, transform 0.1s;
}
.outsider-pick-card:hover { border-color: var(--accent-2); transform: translateY(-1px); }
.outsider-pick-card .outsider-flag { width: 32px; height: 24px; }
.outsider-pick-card strong { font-size: 0.82rem; text-align: center; line-height: 1.2; }
.outsider-pick-card-selected { border-color: var(--accent); background: rgba(61, 220, 151, 0.08); }
.outsider-pick-card-selected::after { content: '✓'; color: var(--accent); font-weight: 800; margin-top: -4px; }

/* Suspense avant révélation : "Confrontation en cours…" */
.outsider-resolving-spinner {
  width: 46px; height: 46px; margin: 8px auto 16px;
  border: 4px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: outsider-spin 0.9s linear infinite;
}
@keyframes outsider-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .outsider-resolving-spinner { animation: none; }
}
#outsider-resolving { text-align: center; }

#outsider-ranking-table, #outsider-leaderboard-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
#outsider-ranking-table th, #outsider-ranking-table td,
#outsider-leaderboard-table th, #outsider-leaderboard-table td {
  padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap;
}
#outsider-ranking-table th, #outsider-leaderboard-table th { background: var(--bg-alt); color: var(--text-muted); font-weight: 600; }
#outsider-ranking-table td:nth-child(2), #outsider-ranking-table td:nth-child(3),
#outsider-leaderboard-table td:nth-child(2) { white-space: normal; word-break: break-word; }
.outsider-ranking-mine { background: rgba(61, 220, 151, 0.08); }

/* ----- Token OwnVest (OVT) — mode simulation ----- */
.token-sim-banner {
  background: rgba(255, 176, 32, 0.12); border: 1px solid var(--warning); color: var(--warning);
  border-radius: var(--radius); padding: 10px 16px; font-size: 0.85rem; font-weight: 600;
  margin-bottom: 20px;
}
/* Annonce (pas un avertissement) : palette accent-2, texte scintillant en
   boucle douce. prefers-reduced-motion respecté — l'annonce reste lisible,
   juste statique, pour les utilisateurs qui désactivent les animations. */
.token-sim-banner-announce {
  background: rgba(79, 142, 247, 0.12);
  border-color: var(--accent-2);
  color: var(--accent-2);
  text-align: center;
  animation: token-banner-twinkle 2.4s ease-in-out infinite;
}
@keyframes token-banner-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .token-sim-banner-announce { animation: none; }
}
.token-rate-note { display: block; color: var(--text-muted); font-size: 0.78rem; margin-top: 2px; }
.token-exchange-card { max-width: 480px; padding: 24px; margin-bottom: 24px; }
.token-tabs { display: flex; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.token-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted); font-weight: 600; font-size: 0.95rem; cursor: pointer;
  padding: 8px 4px; margin-bottom: -1px;
}
.token-tab:hover { color: var(--text); }
.token-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.token-quote { color: var(--accent-2); font-weight: 600; min-height: 1.3em; margin: 8px 0 4px; }
.token-note { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 10px; }
#token-history-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
#token-history-table th, #token-history-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
#token-history-table th { background: var(--bg-alt); color: var(--text-muted); font-weight: 600; }

/* Retrait du solde de jeu */
.game-wallet-actions { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.game-pending-withdrawal { color: var(--warning); font-size: 0.85rem; }

/* ===== App shell : sidebar persistante (desktop) / rail d'icônes (tablette)
   / bottom-nav fixe (mobile). Remplace l'ancienne nav en liste de liens
   horizontale dans .site-header, devenue illisible avec 7 destinations. */
:root { --app-topbar-h: 56px; }

.app-shell { min-height: 100vh; }

.app-topbar { height: var(--app-topbar-h); display: flex; align-items: center; }
.app-topbar-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.app-body { display: flex; align-items: flex-start; }

.app-sidebar {
  flex-shrink: 0;
  width: 208px;
  position: sticky;
  top: var(--app-topbar-h);
  height: calc(100vh - var(--app-topbar-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 12px;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
}

.app-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
}
.app-nav-item:hover { background: var(--card-bg); color: var(--text); }
.app-nav-item.active { background: rgba(61, 220, 151, 0.12); color: var(--accent); font-weight: 600; }
.app-nav-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 20px; height: 20px; }
.app-nav-icon svg { width: 20px; height: 20px; }
.app-nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-sidebar-spacer { flex: 1; }
.app-nav-logout { color: var(--danger); }
.app-nav-logout:hover { background: rgba(255, 107, 107, 0.12); color: var(--danger); }

.app-content { flex: 1; min-width: 0; }

.app-bottomnav { display: none; }

/* Tablette : la sidebar garde ses icônes mais perd les libellés, pour ne
   pas manger la largeur du contenu. */
@media (max-width: 1024px) {
  .app-sidebar { width: 68px; padding: 16px 8px; align-items: center; }
  .app-nav-item { justify-content: center; padding: 12px 8px; }
  .app-nav-label { display: none; }
}

/* Mobile : sidebar remplacée par une barre de navigation fixe en bas
   d'écran, limitée à 4 destinations pour rester lisible. */
@media (max-width: 767px) {
  .app-sidebar { display: none; }
  .app-content { padding-bottom: 76px; }
  .app-bottomnav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 20;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .app-bnav-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 0.68rem;
    padding: 4px 2px;
  }
  .app-bnav-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
  .app-bnav-icon svg { width: 20px; height: 20px; }
  .app-bnav-item.active { color: var(--accent); }
  /* Bulle Duels/Tournoi de la bottom-nav : ancrée en absolu près de l'icône
     plutôt qu'empilée sous le libellé (cf. #duels-nav-badge-mobile /
     #tournoi-nav-badge-mobile, mêmes classes que la sidebar desktop). */
  .app-bnav-item .duels-nav-badge {
    position: absolute;
    top: 1px;
    left: calc(50% + 5px);
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 0.6rem;
  }
}

/* Pendant un duel en plein écran (body.duel-fullscreen, cf. duels.js
   enterGameMode), le recouvrement doit occuper tout l'écran : la nav ne
   doit pas rester visible dessous. */
body.duel-fullscreen .app-topbar,
body.duel-fullscreen .app-sidebar,
body.duel-fullscreen .app-bottomnav,
body.duel-fullscreen .app-topnav,
body.duel-fullscreen .side-panel { display: none; }
/* Pendant un duel en plein écran, la carte fidélité/alertes disparaît :
   la grille repasse à une seule colonne pour ne pas laisser de gouttière vide. */
body.duel-fullscreen .side-panel-layout { grid-template-columns: 1fr; }

/* Colonne fidélité/alertes : d'abord sur Vérification (.verif-layout),
   désormais aussi sur Accueil/Duels/Tournoi (.side-panel-layout) — même
   mise en page générique, juste un nom de classe non lié à une page précise. */
.verif-layout, .side-panel-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}
@media (min-width: 960px) {
  .verif-layout, .side-panel-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .verif-side, .side-panel { position: sticky; top: 24px; }
}

.verif-main, .side-panel-main { min-width: 0; }

.verif-side, .side-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 24px;
  margin-bottom: 24px;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}
.profile-row + .profile-row { border-top: 1px solid var(--border); }

.profile-row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.profile-row-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.profile-row-value { font-size: 0.95rem; word-break: break-word; }

/* Badge KYC de la carte Profil : plus visible que .badge (partagé avec les
   tableaux d'historique) — dégradé + icône, façon référence. */
.kyc-pill {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 7px 16px 7px 10px; border-radius: 999px;
  font-weight: 700; font-size: 0.86rem; color: #eafff6;
  background: linear-gradient(135deg, #17b884, #0e9d6f);
  box-shadow: 0 6px 16px -6px rgba(23,184,132,.6), inset 0 1px 0 rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.12);
}
.kyc-pill svg { width: 18px; height: 18px; flex-shrink: 0; }
.kyc-pill-pending { background: linear-gradient(135deg, #d99a1f, #b97c12); box-shadow: 0 6px 16px -6px rgba(217,154,31,.55), inset 0 1px 0 rgba(255,255,255,.18); }
.kyc-pill-rejete { background: linear-gradient(135deg, #e0555a, #b8383d); box-shadow: 0 6px 16px -6px rgba(224,85,90,.55), inset 0 1px 0 rgba(255,255,255,.18); }
.kyc-pill-neutre { background: linear-gradient(135deg, #3a4362, #2b3350); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); color: var(--text-muted); }

/* Variante bouton : même esthétique que les badges Vérifié / Compte Vérifié,
   utilisée pour des actions comme "Changer votre mot de passe". */
.kyc-pill-btn {
  border: 1px solid rgba(255,255,255,.12);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s ease, opacity 0.2s ease;
}
.kyc-pill-btn:hover { opacity: 0.92; }
.kyc-pill-btn:active { transform: scale(0.98); }
.kyc-pill-btn:disabled { opacity: 0.6; cursor: not-allowed; }

#profile-password-msg { margin: 0 0 12px; }

.loyalty-card,
.alerts-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.loyalty-card {
  border-color: rgba(61, 220, 151, 0.35);
  box-shadow: 0 0 0 1px rgba(61, 220, 151, 0.08) inset;
}

.loyalty-card h3,
.alerts-card h3 { margin: 0 0 8px; font-size: 1.05rem; }

.alerts-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.alerts-head h3 { margin: 0; }
.mark-read-btn { font-family: inherit; font-size: 0.72rem; color: var(--accent-2); background: none; border: none; cursor: pointer; padding: 2px 0; }
.mark-read-btn:hover { text-decoration: underline; }
.alerts-feed-item { transition: opacity 0.2s ease; }

.loyalty-hint { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 16px; }

.loyalty-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}
.loyalty-count-value { font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1; }
.loyalty-count-label { color: var(--text-muted); font-size: 0.85rem; }

.loyalty-earnings {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.loyalty-earnings-label { color: var(--text-muted); font-size: 0.8rem; }
.loyalty-earnings-value { font-weight: 700; color: var(--accent-2); font-size: 1.05rem; }
#loyalty-withdraw-btn { margin-bottom: 10px; }

/* Touche « Retirer le gain » toujours visible : grisée (mais cliquable —
   pas un vrai disabled HTML, pour pouvoir répondre au clic) tant que le
   seuil minimum n'est pas atteint, colorée (gradient .btn-primary) une fois
   réclamable. Même patron réutilisé sur /compte/invites (earnings-credit-btn
   / earnings-withdraw-btn). */
.btn-muted { opacity: 0.5; cursor: not-allowed; }

.loyalty-field-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.loyalty-link-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.loyalty-link-row input {
  flex: 1;
  min-width: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--text);
  font-size: 0.82rem;
}

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 8px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text-muted);
  cursor: pointer;
}
.icon-btn:hover { color: var(--accent-2); border-color: rgba(79,142,247,.4); }
.icon-btn svg { width: 16px; height: 16px; }

#loyalty-copy-msg { margin: 0 0 12px; font-size: 0.8rem; }

.alerts-live {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}
.alerts-live-item { display: flex; align-items: center; gap: 8px; }
.alerts-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2, var(--accent));
  flex-shrink: 0;
}

.alerts-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.alerts-feed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.alerts-feed-item:last-child { border-bottom: none; padding-bottom: 0; }
.alerts-feed-label { color: var(--text); }
.alerts-feed-date { color: var(--text-muted); font-size: 0.75rem; }
.alerts-feed-amount { font-weight: 600; white-space: nowrap; }
.alerts-feed-amount.positive { color: var(--accent); }
.alerts-feed-amount.negative { color: var(--danger); }

/* Jeu de Dé + Jeu de Tir au Fusil : réutilisent au maximum les classes
   .duel-* génériques (scoreboard, historique, countdown…) — juste ce qui est
   spécifique à chacun des deux jeux. */
.game-big-icon {
  font-size: clamp(3.5rem, 10vw, 5.5rem);
  text-align: center;
  margin: 14px 0;
  line-height: 1;
}
.dice-faces-row { display: flex; justify-content: center; gap: 40px; margin: 10px 0 20px; }
.dice-face-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dice-face-label { color: var(--text-muted); font-size: 0.85rem; }

/* Cube 3D du Jeu de Dé — pur CSS (preserve-3d), aucune dépendance. Chaque
   face est positionnée dans l'espace 3D local du cube via translateZ + une
   rotation fixe ; faire pivoter le CUBE entier amène la face voulue devant
   la caméra. Le sens des faces opposées (1-6, 2-5, 3-4 = 7) suit un vrai dé. */
.dice3d-scene {
  width: 76px;
  height: 76px;
  perspective: 420px;
}
.dice3d-cube {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.22, 1.24, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  .dice3d-cube { transition-duration: 0.15s; }
}
.dice3d-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 13px;
  box-sizing: border-box;
  border-radius: 14px;
  background: linear-gradient(155deg, var(--card-bg), var(--bg-alt) 75%);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), inset 0 -6px 10px rgba(0, 0, 0, 0.25);
}
.dice3d-face[data-side="front"]  { transform: translateZ(38px); }
.dice3d-face[data-side="back"]   { transform: rotateY(180deg) translateZ(38px); }
.dice3d-face[data-side="right"]  { transform: rotateY(90deg) translateZ(38px); }
.dice3d-face[data-side="left"]   { transform: rotateY(-90deg) translateZ(38px); }
.dice3d-face[data-side="top"]    { transform: rotateX(90deg) translateZ(38px); }
.dice3d-face[data-side="bottom"] { transform: rotateX(-90deg) translateZ(38px); }

.dice3d-pip {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  align-self: center;
  justify-self: center;
  background: var(--text);
  box-shadow: inset 0 1px 1.5px rgba(0, 0, 0, 0.4), 0 0.5px 0.5px rgba(255, 255, 255, 0.15);
}
.dice3d-pip.tl { grid-area: 1 / 1; } .dice3d-pip.tc { grid-area: 1 / 2; } .dice3d-pip.tr { grid-area: 1 / 3; }
.dice3d-pip.ml { grid-area: 2 / 1; } .dice3d-pip.mc { grid-area: 2 / 2; } .dice3d-pip.mr { grid-area: 2 / 3; }
.dice3d-pip.bl { grid-area: 3 / 1; } .dice3d-pip.bc { grid-area: 3 / 2; } .dice3d-pip.br { grid-area: 3 / 3; }

/* Léger surlignage accent pendant que le dé "attend" d'être lancé (avant le
   premier résultat) — purement décoratif, jamais utilisé comme seul porteur
   d'information. */
.dice3d-scene.dice3d-idle .dice3d-face[data-side="front"] { border-color: var(--accent); }

/* Échecs : plateau 2D en grille CSS, pièces en glyphes Unicode (aucun asset
   externe). Cases claires/foncées teintées pour rester lisibles sur le fond
   sombre de l'app plutôt que le blanc/marron classique. */
.btn-danger { background: var(--danger); color: #1a0505; }

.chess-color-tag { font-size: 0.85rem; color: var(--text-muted); }

.chess-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  width: min(94vw, 480px);
  aspect-ratio: 1 / 1;
  margin: 12px auto;
  border: 2px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.chess-square {
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.4rem, 5.5vw, 2.4rem);
  line-height: 1;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.chess-square-light { background: #2a3350; }
.chess-square-dark { background: #171d30; }
.chess-piece-white { color: #f4f6fb; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
/* Contour clair simulé par des ombres portées dans 4 directions : sans ça,
   une pièce noire quasi-noire (#14161f) se fond dans la case sombre
   (#171d30, même luminosité) et devient illisible — le contour la détache
   du fond quelle que soit la case (claire ou sombre). */
.chess-piece-black {
  color: #14161f;
  text-shadow:
    1.5px 0 0 #cbd3e6,
    -1.5px 0 0 #cbd3e6,
    0 1.5px 0 #cbd3e6,
    0 -1.5px 0 #cbd3e6,
    0 0 5px rgba(203, 211, 230, 0.55);
}
.chess-square-selected { box-shadow: inset 0 0 0 3px var(--accent); }
.chess-square-target::after {
  content: ''; position: absolute; width: 28%; height: 28%; border-radius: 50%;
  background: var(--accent); opacity: 0.55;
}
.chess-square-target.chess-piece-white::after,
.chess-square-target.chess-piece-black::after {
  width: 92%; height: 92%; border-radius: 8px; background: transparent;
  box-shadow: inset 0 0 0 3px var(--accent); opacity: 0.85;
}
.chess-square-lastmove { box-shadow: inset 0 0 0 3px rgba(255, 176, 32, 0.55); }
.chess-square-check { box-shadow: inset 0 0 0 3px var(--danger); }

.chess-draw-offer {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin: 10px 0; padding: 10px; border-radius: 8px;
  background: var(--bg-alt); border: 1px solid var(--border);
  font-size: 0.9rem;
}
.chess-actions-row { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.chess-moves-list {
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  max-height: 90px; overflow-y: auto;
  margin-top: 12px; padding: 8px 10px;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.85rem; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

