@import url('https://fonts.googleapis.com/css2?family=Bungee&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Le site n'a qu'un thème sombre (pas de bascule clair/sombre) : sans cette ligne, le
     navigateur dessine certains éléments natifs (icône du sélecteur datetime-local, cases à
     cocher, barres de défilement sous Chrome) avec son rendu "clair" par défaut, souvent
     illisible sur ce fond sombre — ex: l'icône de calendrier des champs de date était noire sur
     fond quasi-noir. color-scheme: dark indique au navigateur d'utiliser directement ses
     variantes sombres natives pour tout ça, sans bricolage CSS par élément. */
  color-scheme: dark;
  --bg: #08070C;
  --surface: #131019;
  --surface-2: #1B1626;
  --line: #2C2438;
  --accent: #7C3AED;
  --accent-bright: #9D5CFF;
  --accent-soft: #C9B8F5;
  --text: #F3F1F8;
  --text-dim: #A79FBD;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(124, 58, 237, 0.16), transparent 45%),
    radial-gradient(circle at 100% 20%, rgba(124, 58, 237, 0.10), transparent 40%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.55;
}

h1, h2, h3 { margin: 0 0 0.4em 0; line-height: 1.08; }
h1 { font-family: 'Bungee', 'Inter', sans-serif; font-weight: 400; letter-spacing: 0.5px; }
h2, h3 { font-family: 'Inter', sans-serif; font-weight: 700; }

a { color: inherit; text-decoration: none; }
p { color: var(--text-dim); }

/* --- Navbar --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 3.5rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(8, 7, 12, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.05rem; }
.brand img { width: 38px; height: 38px; border-radius: 50%; }

.nav-links { display: flex; gap: 1.6rem; align-items: center; }
.nav-links a { color: var(--text-dim); transition: color 0.15s ease; font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }

.btn-discord, .btn-primary {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #fff;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  display: inline-block;
  box-shadow: 0 8px 24px -8px rgba(124, 58, 237, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-discord:hover, .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -6px rgba(124, 58, 237, 0.75);
}

.btn-secondary {
  border: 1px solid var(--line);
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  color: var(--text);
  display: inline-block;
  /* Explicite, même si un <a> n'en a pas besoin (fond transparent par défaut) : sans ça, un
     <button class="btn-secondary"> hérite du fond clair par défaut du navigateur, invisible
     avec le texte quasi-blanc du thème (--text) — c'était le cas des boutons "Chercher"
     (leaderboard), "Filtrer" (journal de modération), "Réclamée"/"Complet" (profil), et des
     boutons de gestion du serveur Minecraft. */
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease;
}
.btn-secondary:hover { border-color: var(--accent-bright); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-danger {
  background: #E74C3C;
  color: #fff;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  display: inline-block;
  transition: background 0.15s ease;
}
.btn-danger:hover { background: #cf4436; }

/* --- Hero --- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 5rem 3.5rem 4rem;
}

.hero-copy { max-width: 34rem; }

.hero-eyebrow {
  display: inline-block;
  color: var(--accent-soft);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.hero h1 { font-size: 3.1rem; margin-bottom: 0.7rem; }
.hero-copy p { font-size: 1.08rem; margin-bottom: 2rem; max-width: 30rem; }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-logo {
  flex-shrink: 0;
  width: 320px;
}
.hero-logo img {
  width: 100%;
  border-radius: 50%;
  filter: drop-shadow(0 20px 60px rgba(124, 58, 237, 0.45));
}

/* --- Stats strip --- */
.stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  padding: 2.5rem 3.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat .number { font-family: 'Bungee', sans-serif; font-size: 2rem; color: var(--accent-bright); display: block; }
.stat .label { color: var(--text-dim); font-size: 0.85rem; }

/* --- Features --- */
.features {
  max-width: 1180px;
  margin: 0 auto;
  padding: 5rem 3.5rem;
}
.features-head { max-width: 34rem; margin-bottom: 3rem; }
.features-head h2 { font-size: 2rem; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
  /* La moitié des cartes sont maintenant des <a> (voir landing.ejs) : sans ces deux lignes,
     elles hériteraient du bleu souligné par défaut du navigateur pour un lien, cassant
     l'homogénéité visuelle avec les cartes restées de simples <div> (ex: "Salons vocaux à la
     demande", qui n'a pas de page dédiée vers laquelle pointer). */
  display: block;
  color: inherit;
  text-decoration: none;
}
/* Affordance de survol réservée aux cartes RÉELLEMENT cliquables : l'appliquer aussi aux <div>
   sans lien promettrait visuellement une interaction qui n'existe pas (bug corrigé — avant
   cette mise à jour, TOUTES les cartes avaient ce survol alors qu'aucune n'était cliquable). */
a.feature-card:hover, .feature-card:focus-visible { border-color: var(--accent); transform: translateY(-3px); }
.feature-card .icon { font-size: 1.6rem; margin-bottom: 1rem; display: block; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.92rem; margin: 0; }

/* --- CTA band --- */
.cta-band {
  max-width: 1180px;
  margin: 0 auto 5rem;
  padding: 3.5rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(124, 58, 237, 0.04));
  border: 1px solid var(--line);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: 1.6rem; margin-bottom: 0.3rem; }
.cta-band p { margin: 0; }

footer {
  border-top: 1px solid var(--line);
  padding: 2rem 3.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}
footer .brand img { width: 26px; height: 26px; }
footer a { text-decoration: underline; text-underline-offset: 2px; }
footer a:hover { color: var(--text); }

/* --- Dashboard --- */
.dashboard { padding: 3rem 3.5rem; max-width: 1080px; margin: 0 auto; }
.dashboard > h1 { font-size: 1.8rem; margin-bottom: 2rem; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.75rem;
}
.panel h2 { font-size: 1.05rem; margin-bottom: 1.1rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; color: var(--text-dim); font-weight: 500; padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--line); }
td { padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }

.error-page { max-width: 480px; margin: 6rem auto; text-align: center; padding: 0 2rem; }
.error-page img { width: 72px; margin-bottom: 1.5rem; border-radius: 50%; }
.error-page p { margin-bottom: 1.5rem; }

@media (max-width: 900px) {
  .navbar, .hero, .features, .dashboard, footer { padding-left: 1.5rem; padding-right: 1.5rem; }
  .hero { flex-direction: column-reverse; text-align: center; padding-top: 3rem; }
  .hero-copy p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-logo { width: 220px; }
  .features-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; }
  .stats { gap: 2rem; }
}

/* --- Avatars dans les tableaux du dashboard --- */
.user-cell { display: flex; align-items: center; gap: 0.6rem; }
.user-cell img { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; }

/* --- Pages génériques (règles, équipe) --- */
.page-content { max-width: 900px; margin: 0 auto; padding: 4rem 3.5rem 5rem; }
.page-head { text-align: center; max-width: 42rem; margin: 0 auto 3rem; }
.page-head h1 { font-size: 2.4rem; margin-bottom: 0.6rem; }

/* --- Règles --- */
.rules-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; counter-reset: rule; }
.rule-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  position: relative;
  padding-left: 4.2rem;
  counter-increment: rule;
}
.rule-item::before {
  content: counter(rule);
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.rule-item h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.rule-item p { margin: 0; font-size: 0.92rem; }

/* --- Équipe --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem;
}
.team-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.team-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.team-card img { width: 72px; height: 72px; border-radius: 50%; margin-bottom: 0.9rem; border: 2px solid var(--line); }
.team-card h3 { font-size: 0.98rem; margin-bottom: 0.5rem; }
.role-badge {
  display: inline-block;
  background: rgba(124, 58, 237, 0.18);
  color: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

@media (max-width: 900px) {
  .page-content { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* --- Bannières de statut (boutique) --- */
.banner {
  max-width: 900px;
  margin: 0 auto 2rem;
  padding: 0.9rem 1.25rem;
  border-radius: 10px;
  font-size: 0.92rem;
  text-align: center;
}
.banner-success { background: rgba(46, 204, 113, 0.15); border: 1px solid rgba(46, 204, 113, 0.4); color: #7EE2A8; }
.banner-error { background: rgba(231, 76, 60, 0.15); border: 1px solid rgba(231, 76, 60, 0.4); color: #F1948A; }

/* --- Boutique --- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}
.shop-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 1;
}
/* Même correctif que .game-card (voir plus bas) : sans remonter la carte survolée au-dessus de
   ses voisines, l'infobulle qui déborde de la carte passerait derrière la carte suivante de la
   grille. */
.shop-card:hover, .shop-card:focus-within { z-index: 50; }
.shop-card .icon { font-size: 2.2rem; }
.shop-card h3 { font-size: 1.05rem; margin: 0; }
.shop-card p { font-size: 0.88rem; margin: 0 0 0.5rem; }
.shop-card .price { font-weight: 700; color: var(--accent-soft); margin-bottom: 0.75rem; }
.shop-card form { width: 100%; }
.shop-card button, .shop-card .btn-secondary { width: 100%; border: none; cursor: pointer; font-family: inherit; font-size: 0.95rem; }
.shop-card button:disabled { opacity: 0.4; cursor: not-allowed; }
.shop-card { scroll-margin-top: 6rem; } /* évite que l'ancre #item-X n'atterrisse sous la navbar sticky */

/* Étoile de liste de souhaits, en haut à droite de la carte — un simple bouton-icône, pas un
   bouton pleine largeur comme les autres actions de la carte (voir .shop-card form/button
   ci-dessus, dont ce bouton doit s'affranchir explicitement). */
.wishlist-toggle { position: absolute; top: 0.75rem; right: 0.75rem; width: auto !important; z-index: 2; }
.wishlist-star {
  width: 2rem !important;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}
.wishlist-star:hover { color: var(--accent-bright); background: rgba(124, 58, 237, 0.15); }
.wishlist-star.active { color: #F4C430; }
.wishlist-summary-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.wishlist-summary-chip {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.wishlist-summary-chip:hover { border-color: var(--accent-bright); }

/* Aperçu des avantages au survol — même principe CSS pur que .game-tooltip (voir plus bas) :
   contenu déjà dans le HTML, révélé par :hover/:focus-within, aucun JavaScript nécessaire. Un
   <span tabindex="0"> sert de déclencheur focusable au clavier (la carte n'est pas elle-même
   un lien ni un bouton, contrairement à .game-card). */
.perks-trigger {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--accent-soft);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: default;
}
.perks-tooltip {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  text-align: left;
}
.shop-card:hover .perks-tooltip, .shop-card:focus-within .perks-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.perks-tooltip-title { font-size: 0.78rem; color: var(--text-dim); margin: 0 0 0.6rem; }
.perks-tooltip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.85rem; }
.perks-tooltip-list li { padding-left: 1.1rem; position: relative; }
.perks-tooltip-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent-soft); }

/* --- Profil --- */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}
.stat-block { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.stat-label { color: var(--text-dim); font-size: 0.85rem; }
.stat-value { font-family: 'Bungee', sans-serif; font-size: 1.8rem; }
.stat-sub { color: var(--text-dim); font-size: 0.8rem; }

.xp-bar { width: 100%; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 0.3rem 0; }
.xp-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); border-radius: 999px; }

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.badge-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
}
.badge-item.owned { background: rgba(124, 58, 237, 0.1); border-color: var(--accent); }
.badge-item.locked { opacity: 0.55; }
.badge-emoji { font-size: 1.6rem; }
.badge-name { font-weight: 600; font-size: 0.92rem; }
.badge-desc { font-size: 0.78rem; color: var(--text-dim); }

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

/* --- Panneau Minecraft --- */
.mc-form { display: flex; flex-direction: column; gap: 1.1rem; }
.mc-field { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; color: var(--text-dim); }
.mc-field input, .mc-field select, select.mc-field, .mc-field textarea {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
.mc-field textarea { resize: vertical; min-height: 4.5rem; line-height: 1.4; }
/* Le fond/texte du <select> fermé ne suffit pas : la liste déroulante elle-même (les
   <option>) est une surface de rendu à part que les navigateurs ne stylent pas forcément
   d'après le <select> parent — sans cette règle, elle reste blanche par défaut même quand la
   boîte fermée est bien sombre. `select.mc-field` couvre aussi les cas où la classe est posée
   directement sur le <select> plutôt que sur un <label> englobant (ex: filtre du journal de
   modération) — sans ça, ni la boîte fermée ni la liste n'étaient stylées du tout. */
.mc-field option, select.mc-field option {
  background: var(--surface-2);
  color: var(--text);
}
.mc-checkbox { display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; }
.mc-form button { align-self: flex-start; border: none; cursor: pointer; font-family: inherit; }

.mc-status { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.mc-status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mc-status-dot.online { background: #2ECC71; box-shadow: 0 0 8px #2ECC71; }
.mc-status-dot.offline { background: #7f8c8d; }
.mc-actions { display: flex; gap: 0.75rem; margin-left: auto; flex-wrap: wrap; }
.mc-actions button { border: none; cursor: pointer; font-family: inherit; }
.mc-actions button:disabled, .mc-form button:disabled { opacity: 0.4; cursor: not-allowed; }

.mc-logs {
  background: #050408;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
  font-size: 0.8rem;
  color: #B8B4C8;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* --- Responsive : menu hamburger --- */
.nav-toggle-checkbox { display: none; }
.nav-toggle-label {
  display: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
  line-height: 1;
  padding: 0.3rem;
}

.nav-search { display: flex; }
.nav-search input {
  width: 11rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  transition: border-color 0.15s ease, width 0.2s ease;
}
.nav-search input:focus { border-color: var(--accent-bright); width: 14rem; outline: none; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 480px; }

@media (max-width: 780px) {
  .navbar { flex-wrap: wrap; padding: 1rem 1.25rem; }
  .nav-toggle-label { display: block; }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    order: 3;
    margin-top: 1rem;
    border-top: 1px solid var(--line);
    padding-top: 0.75rem;
  }
  .nav-links a { padding: 0.75rem 0.25rem; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links .btn-discord { text-align: center; margin-top: 0.5rem; }
  .nav-search { order: -1; margin-bottom: 0.5rem; }
  .nav-search input, .nav-search input:focus { width: 100%; }

  .nav-toggle-checkbox:checked ~ .nav-links { display: flex; }

  .hero h1 { font-size: 2.2rem; }
  .hero-eyebrow { font-size: 0.8rem; }
  .stats { gap: 1.5rem; padding: 2rem 1.25rem; }
  .stat .number { font-size: 1.5rem; }

  .panel { padding: 1.25rem 1.1rem; }
  .shop-grid, .team-grid, .badge-grid { grid-template-columns: 1fr 1fr; }
  .cta-band { padding: 2rem 1.5rem; text-align: center; flex-direction: column; }
  footer { flex-direction: column; text-align: center; gap: 0.75rem; }
}

@media (max-width: 480px) {
  .shop-grid, .team-grid, .badge-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
  .page-head h1 { font-size: 1.7rem; }
  .mc-actions { width: 100%; }
  .mc-actions button { flex: 1; }
}

/* --- Quêtes (profil) --- */
.quest-list { display: flex; flex-direction: column; gap: 1.25rem; }
.quest-item { padding-bottom: 0.25rem; }
.quest-item.completed .quest-status { color: #7EE2A8; }
.quest-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; flex-wrap: wrap; gap: 0.3rem; }
.quest-label { font-weight: 600; font-size: 0.95rem; }
.quest-status { color: var(--text-dim); font-size: 0.88rem; }
.quest-item .stat-sub { display: block; margin-top: 0.4rem; }

/* --- Récompenses (profil) --- */
.reward-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.reward-item:last-of-type { border-bottom: none; }
.reward-item button:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Statuts d'achat --- */
.status-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.status-active { background: rgba(46, 204, 113, 0.15); color: #7EE2A8; }
.status-expired { background: rgba(127, 140, 141, 0.2); color: var(--text-dim); }

@media (max-width: 480px) {
  .quest-header { flex-direction: column; align-items: flex-start; }
}

/* --- Page Soutiens --- */
.support-panel { text-align: center; max-width: 640px; margin: 0 auto 1.5rem; padding: 2.5rem 2rem; }
.support-icon { font-size: 2.2rem; margin-bottom: 0.75rem; }
.support-panel h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.support-panel p { margin-bottom: 1rem; }
.support-panel .btn-primary, .support-panel .btn-secondary { display: inline-block; margin-top: 0.5rem; }

/* --- Modération rapide (dashboard) --- */
.mod-search-form { display: flex; gap: 0.75rem; margin-bottom: 1.25rem; }
.mod-search-form input { flex: 1; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.9rem; color: var(--text); font-family: inherit; }

.mod-member-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.mod-member-row:last-child { border-bottom: none; }

.mod-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.mod-action-form { display: flex; gap: 0.4rem; align-items: center; }
.mod-action-form input {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
}
.mod-action-form input[name="reason"] { width: 140px; }
.mod-input-narrow { width: 55px !important; }

.btn-mod, .btn-mod-danger {
  border: 1px solid var(--line);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  color: var(--text);
  white-space: nowrap;
}
.btn-mod:hover { border-color: var(--accent-bright); }
.btn-mod-danger { border-color: #E74C3C; color: #F1948A; }
.btn-mod-danger:hover { background: rgba(231, 76, 60, 0.12); }

@media (max-width: 780px) {
  .mod-member-row { flex-direction: column; align-items: flex-start; }
  .mod-actions { width: 100%; }
  .mod-action-form { flex: 1; flex-wrap: wrap; }
  .mod-action-form input[name="reason"] { width: 100%; }
  .mod-search-form { flex-direction: column; }
}

/* --- Pagination --- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-top: 2rem; }
.pagination a.btn-secondary { padding: 0.5rem 1.1rem; }

/* Sélecteur de période du classement général (Tout / Cette semaine / Ce mois-ci) */
.period-selector { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.period-selector a {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.period-selector a:hover { border-color: var(--accent-bright); color: var(--text); }
.period-selector a.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* --- Boîte à suggestions --- */
.suggestion-card { display: flex; gap: 1.25rem; margin-bottom: 1rem; align-items: flex-start; }
.suggestion-vote { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; flex-shrink: 0; }
.vote-btn {
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-dim);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.vote-btn:hover { border-color: var(--accent-bright); color: var(--text); }
.vote-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.vote-btn.active-down { background: #E74C3C; border-color: #E74C3C; color: #fff; }
.vote-score { font-weight: 700; font-size: 1.05rem; }
.suggestion-body { flex: 1; min-width: 0; }

/* --- Sondages --- */
.poll-card { margin-bottom: 1.25rem; }
.poll-options { display: flex; flex-direction: column; gap: 0.6rem; }
.poll-option-form { display: block; }
.poll-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}
button.poll-option:hover { border-color: var(--accent-bright); }
button.poll-option.active { border-color: var(--accent); }
.poll-options-readonly .poll-option { cursor: default; }
.poll-option-label { flex: 0 0 auto; min-width: 30%; font-weight: 600; z-index: 1; }
.poll-option-bar-track {
  flex: 1;
  height: 0.5rem;
  background: var(--surface);
  border-radius: 999px;
  overflow: hidden;
  z-index: 1;
}
.poll-option-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); border-radius: 999px; transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.poll-option-percent { flex: 0 0 auto; font-size: 0.8rem; color: var(--text-dim); z-index: 1; white-space: nowrap; }

/* En dessous de 480px, label (min-width: 30% ci-dessus) + barre + pourcentage sur une seule
   ligne devient trop serré pour un intitulé de réponse un peu long — aucun des trois éléments
   n'avait de traitement mobile dédié jusqu'ici, contrairement au reste des ajouts récents
   (voir .trade-columns, .quest-header ci-dessus). Le label passe sur sa propre ligne
   (min-width: 100% force le retour dans le flex), barre + pourcentage se partagent la ligne
   suivante. */
@media (max-width: 480px) {
  .poll-option { flex-wrap: wrap; row-gap: 0.4rem; }
  .poll-option-label { min-width: 100%; }
}

/* --- Échange direct entre membres --- */
.trade-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 780px) { .trade-columns { grid-template-columns: 1fr; } }
.trade-item-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.75rem; max-height: 16rem; overflow-y: auto; }
.trade-item-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: border-color 0.15s ease;
}
.trade-item-check:hover { border-color: var(--accent-bright); }
.trade-item-check input { width: auto; }
.trade-row { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.trade-row:last-child { border-bottom: none; }
.trade-row p { margin: 0 0 0.4rem; }

/* --- Profil public --- */
.public-profile-avatar { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 1rem; display: block; border: 3px solid var(--line); }

/* --- Liens sur les cellules membres (classement, journal) --- */
a.user-cell { text-decoration: none; }
a.user-cell:hover .badge-name, a.user-cell:hover { color: var(--accent-soft); }

/* --- Liens rapides du dashboard --- */
.dashboard-links { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

/* --- Admin boutique --- */
.shop-admin-item { border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; margin-bottom: 1rem; }
.shop-admin-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.shop-admin-row .mc-field { flex: 1; min-width: 140px; }

/* --- Événements --- */
.event-list { display: flex; flex-direction: column; gap: 1rem; max-width: 700px; margin: 0 auto; }
.event-card { display: flex; align-items: center; gap: 1.5rem; }
.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.15);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  min-width: 80px;
  flex-shrink: 0;
}
.event-day { font-weight: 700; font-size: 0.95rem; text-transform: capitalize; }
.event-time { font-size: 0.8rem; color: var(--text-dim); }
.event-info h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.event-info p { margin: 0; font-size: 0.9rem; }

/* --- Console Minecraft --- */
.mc-console-log {
  background: #050408;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  max-height: 200px;
  overflow-y: auto;
}
.mc-console-line { margin: 0; font-family: monospace; white-space: pre-wrap; word-break: break-word; }
.mc-console-command { color: var(--accent-soft); font-weight: 600; margin-bottom: 0.4rem; }

/* --- Menus déroulants de la navbar --- */
.nav-group { position: relative; }
.nav-group-label { color: var(--text-dim); cursor: default; user-select: none; padding: 0.4rem 0; display: inline-block; }
.nav-group:hover .nav-group-label, .nav-group:focus-within .nav-group-label { color: var(--text); }

/* Bug corrigé : .nav-dropdown était en `display: none` par défaut, donc ses liens n'étaient
   jamais dans l'ordre de tabulation (un élément display:none est ignoré par le clavier) —
   :focus-within sur .nav-group n'aurait jamais pu se déclencher, puisqu'il n'y avait tout
   simplement rien à l'intérieur du groupe sur lequel atterrir au clavier. Résultat concret :
   Infos, Aide, Événements, Soutiens & bons plans, Jeux, Classement, Boutique et Hôtel des
   ventes étaient TOTALEMENT inatteignables au clavier sur desktop, uniquement à la souris.
   Le passage à opacity/pointer-events (déjà le principe utilisé par .game-tooltip et
   .perks-tooltip ailleurs sur ce même site) garde les liens présents et focusables en
   permanence, juste masqués visuellement — donc Tab peut les atteindre, et :focus-within
   fonctionne enfin. tabindex="0" sur .nav-group-label (voir navbar.ejs) permet en plus
   d'ouvrir le menu dès qu'on tabule jusqu'au label lui-même, avant même ses liens. */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  z-index: 20;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.nav-group:hover .nav-dropdown, .nav-group:focus-within .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.nav-dropdown a { padding: 0.5rem 0.75rem !important; border-radius: 6px; }
.nav-dropdown a:hover, .nav-dropdown a:focus-visible { background: var(--surface-2); }

@media (max-width: 780px) {
  .nav-group-label { display: block; padding: 0.75rem 0.25rem; font-weight: 600; border-bottom: 1px solid var(--line); color: var(--text); }
  .nav-dropdown {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    position: static;
    border: none;
    padding: 0;
    box-shadow: none;
    background: transparent;
  }
  .nav-dropdown a { border-bottom: 1px solid var(--line); border-radius: 0; padding: 0.65rem 0.5rem !important; }
}

/* --- Hub admin --- */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.admin-card { text-align: center; text-decoration: none; transition: transform 0.15s ease, border-color 0.15s ease; }
.admin-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.admin-card-icon { font-size: 2rem; display: block; margin-bottom: 0.6rem; }
.admin-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; color: var(--text); }
.admin-card p { font-size: 0.85rem; margin: 0; }

.activity-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.activity-row:last-child { border-bottom: none; }
.activity-emoji { font-size: 1.1rem; }
.activity-time { margin-left: auto; }

/* Brève mise en évidence des lignes ajoutées en direct via le flux SSE du hub admin
   (web/views/admin-hub.ejs) — purement décoratif, s'estompe après 3s. */
.activity-row-new { animation: activity-row-highlight 3s ease-out; }
@keyframes activity-row-highlight {
  from { background: var(--surface-2); }
  to { background: transparent; }
}

.error-message { font-family: monospace; font-size: 0.8rem; max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Onglets CSS-only (radio hack, pas de JS) --- */
.tabs-input { display: none; }
.tabs-nav { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs-nav label {
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.92rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs-nav label:hover { color: var(--text); }
.tab-panel { display: none; }

/* Règles génériques réutilisées sur toutes les pages à onglets (dashboard, Minecraft, profil) */
#tab1:checked ~ #panel1, #tab2:checked ~ #panel2, #tab3:checked ~ #panel3,
#tab4:checked ~ #panel4, #tab5:checked ~ #panel5, #tab6:checked ~ #panel6 { display: block; }

#tab1:checked ~ .tabs-nav label[for="tab1"], #tab2:checked ~ .tabs-nav label[for="tab2"],
#tab3:checked ~ .tabs-nav label[for="tab3"], #tab4:checked ~ .tabs-nav label[for="tab4"],
#tab5:checked ~ .tabs-nav label[for="tab5"], #tab6:checked ~ .tabs-nav label[for="tab6"] { color: var(--text); border-bottom-color: var(--accent); }

/* --- Liste blanche Minecraft --- */
.whitelist-list { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.whitelist-list li { display: flex; justify-content: space-between; align-items: center; background: var(--surface-2); border-radius: 8px; padding: 0.5rem 0.9rem; }

/* --- Sections de la page événements --- */
.event-section-title { text-align: center; font-size: 1.2rem; margin: 2.5rem 0 1.25rem; }
.event-list-past .event-card { opacity: 0.6; }
.event-list-past .event-date { background: rgba(127, 140, 141, 0.15); }

/* --- Collection d'objets --- */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.collection-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  background: rgba(124, 58, 237, 0.06);
}
.collection-item .badge-emoji { font-size: 1.8rem; display: block; margin-bottom: 0.4rem; }
.collection-item .badge-name { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.collection-item .badge-desc { display: block; font-size: 0.78rem; color: var(--text-dim); }

/* --- Info de connexion Minecraft (page d'accueil) --- */
.minecraft-connect-info {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: -1.5rem 0 2rem;
}
.minecraft-connect-info strong { color: var(--accent-soft); }

/* --- Bio du profil public --- */
.profile-bio { max-width: 32rem; margin: 0.75rem auto 0; font-size: 0.95rem; }

/* --- Page Aide --- */
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.help-item {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
a.help-item {
  display: block;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}
a.help-item:hover { background: rgba(124, 58, 237, 0.15); transform: translateY(-2px); }
.help-item code { background: rgba(124, 58, 237, 0.15); padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.85em; }
.help-list { margin: 0; padding-left: 1.25rem; font-size: 0.92rem; line-height: 1.8; }
.help-list code { background: rgba(124, 58, 237, 0.15); padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.9em; }

/* --- Page Jeux (activité de jeu des membres, via Presence Discord) --- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.5rem;
}
.game-card {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
  z-index: 1;
}
/* Bug corrigé : sans z-index relevé ici, l'infobulle (qui déborde hors de sa carte, voir
   .game-tooltip plus bas) passait derrière les cartes suivantes de la grille — z-index sur
   .game-tooltip seul ne suffit pas, il ne joue que par rapport aux AUTRES éléments À
   L'INTÉRIEUR de cette même carte, pas par rapport aux cartes voisines. Il faut remonter la
   carte entière (celle qui est survolée) au-dessus de ses voisines. */
.game-card:hover, .game-card:focus-within { border-color: var(--accent); transform: translateY(-3px); z-index: 50; }
.game-card-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.game-icon { font-size: 1.4rem; }
.game-card h3 { font-size: 1.05rem; margin: 0; }
.game-card .stat-sub { margin: 0; }

/* Aperçu au survol : contenu déjà présent dans le HTML, simplement masqué par défaut (opacité
   0 + pointer-events none) et révélé en CSS pur — pas de JavaScript nécessaire, cohérent avec
   les onglets déjà présents ailleurs sur le site (voir .tabs-input). :focus-within permet la
   même révélation au clavier (Tab), pas seulement à la souris. */
.game-tooltip {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  text-align: left;
}
.game-card:hover .game-tooltip, .game-card:focus-within .game-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.game-tooltip-title { font-size: 0.78rem; color: var(--text-dim); margin: 0 0 0.6rem; }
.game-tooltip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.game-tooltip-list .user-cell { justify-content: space-between; font-size: 0.85rem; }
.game-tooltip-more { font-size: 0.78rem; color: var(--text-dim); margin: 0.6rem 0 0; }

.game-players-section { margin-bottom: 2rem; }
.game-players-section h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.game-players-list { display: flex; flex-direction: column; gap: 0.75rem; }
.game-players-list .user-cell img { width: 32px; height: 32px; }
.game-players-list .user-cell { justify-content: space-between; padding: 0.5rem 0.25rem; }

/* Le survol n'existe pas au tactile : sur petit écran, l'aperçu ne s'affiche jamais (il
   flasherait juste avant la navigation au clic) — un tap va directement à /jeux/:slug, qui
   affiche la liste complète de toute façon. */
@media (max-width: 480px) {
  .game-tooltip { display: none; }
  /* Contrairement à .game-tooltip ci-dessus, il n'existe pas de page dédiée où retrouver les
     avantages d'un article de boutique après coup : plutôt que de masquer l'info sur mobile
     (où le survol n'existe pas), on l'affiche directement dans le flux de la carte, sans
     déclencheur ni positionnement absolu. */
  .perks-trigger { display: none; }
  .perks-tooltip {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    margin-top: 0.5rem;
    width: 100%;
  }
}

/* ==========================================================================
   Animations & micro-interactions — appliquées site-wide plutôt que
   page par page, pour rester cohérentes partout sans avoir à les répéter
   dans chaque vue. Toujours de simples transitions/keyframes CSS (jamais de
   JS) : rien ici ne doit pouvoir casser une page si un navigateur les
   ignore, juste rendre l'ensemble un peu plus vivant.
   ========================================================================== */

/* Préférence système "réduire les animations" (mal des transports, troubles
   vestibulaires...) : coupe tout ce qui suit à la source, prioritaire sur le
   reste de cette section. Toujours la première règle du groupe. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html { scroll-behavior: smooth; }

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Contenu principal : léger fondu/glissement à chaque chargement de page —
   .page-content est le conteneur générique utilisé par la quasi-totalité
   des vues (voir web/views/partials), donc cette seule règle couvre déjà
   l'ensemble du site sans rien changer aux vues elles-mêmes. */
.page-content, .dashboard, .hero { animation: fade-in-up 0.45s ease-out; }

/* L'entrée des bannières est désormais intégrée à banner-lifecycle plus bas dans ce fichier
   (voir la section "toast" qui gère aussi leur disparition automatique). */

/* Changement d'onglet (boutique/marché, dashboard communauté...) : fondu
   doux plutôt qu'un basculement sec — .tab-panel passe de display:none à
   display:block au clic (voir le "radio hack" plus haut dans ce fichier),
   ce qui relance l'animation à chaque bascule. */
.tab-panel { animation: fade-in-up 0.3s ease-out; }

/* Cartes cliquables : lift + ombre douce au survol, uniformisé sur tous les
   types de cartes du site (certaines l'avaient déjà individuellement plus
   haut dans ce fichier — ceci comble les autres : boutique, collection,
   badges débloqués). */
.shop-card, .collection-item, .badge-item.owned {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.shop-card:hover, .collection-item:hover, .badge-item.owned:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.5);
}

/* Boutons et liens-boutons : retour tactile immédiat au clic, en plus des
   transitions de survol déjà en place plus haut — s'applique à tous les
   styles de bouton du site (primaire, secondaire, modération, danger). */
button, .btn-primary, .btn-secondary, .btn-discord, .btn-danger, .btn-mod, .btn-mod-danger {
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
button:active, .btn-primary:active, .btn-secondary:active, .btn-discord:active,
.btn-danger:active, .btn-mod:active, .btn-mod-danger:active {
  transform: scale(0.97);
}

/* Barres de progression (quêtes, défis collectifs) : remplissage animé
   plutôt qu'un saut instantané à la largeur finale. */
.xp-bar-fill { transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1); }

/* Lien de nav : petit soulignement animé au survol, sous le texte plutôt
   qu'un simple changement de couleur (déjà en place, conservé). */
.nav-links a { position: relative; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 2px;
  background: var(--accent-bright);
  transition: right 0.2s ease;
}
.nav-links a:hover::after { right: 0; }

/* Modale de confirmation (voir site-ui.js:confirmAction) — remplace window.confirm() natif sur
   les actions sensibles (suppression, ban, achat...). */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 7, 12, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fade-in-up 0.15s ease-out;
  padding: 1.5rem;
}
.confirm-modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.75rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.6);
}
.confirm-modal p { margin: 0 0 1.5rem; line-height: 1.5; }
.confirm-modal-actions { display: flex; justify-content: flex-end; gap: 0.75rem; }

/* Avatar : léger zoom au survol dans les tableaux (mod log, classement, recherche membre...) —
   purement décoratif, sans changer la mise en page environnante (transform ne déplace pas les
   éléments voisins). */
.user-cell img { transition: transform 0.15s ease; }
.user-cell:hover img { transform: scale(1.35); }

/* Bannières de succès/erreur : disparaissent d'elles-mêmes après quelques secondes plutôt que
   de rester affichées jusqu'au prochain chargement de page (effet "toast"). La séquence
   0%→8%→85%→100% garde le message pleinement lisible un moment avant de l'estomper — le total
   (~6.5s) laisse largement le temps de lire un message court sans avoir à agir dessus. */
@keyframes banner-lifecycle {
  0%   { opacity: 0; transform: translateY(-8px); }
  8%   { opacity: 1; transform: translateY(0); }
  85%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-8px); max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-width: 0; overflow: hidden; }
}
.banner {
  max-height: 220px;
  overflow: hidden;
  animation: banner-lifecycle 6.5s ease-out forwards;
}

/* --- Vitrine du profil : bannière (préréglages), pronoms, badges épinglés ---
   Les couleurs sont des dégradés FIXES choisis dans une liste blanche côté serveur
   (shared/profile-showcase.js) : aucune valeur saisie par un membre n'arrive jamais dans le CSS. */
.profile-banner {
  width: 100%;
  height: 110px;
  border-radius: 14px;
  margin: 0 0 -44px; /* l'avatar chevauche le bas de la bannière */
  border: 1px solid var(--line);
}
.profile-banner-aurore     { background: linear-gradient(120deg, #1f6f5c, #5b3fd1 55%, #c94fa8); }
.profile-banner-ocean      { background: linear-gradient(120deg, #0b3c6e, #1479b8 55%, #35c2d6); }
.profile-banner-foret      { background: linear-gradient(120deg, #123524, #2f7d4a 55%, #a3c65a); }
.profile-banner-braise     { background: linear-gradient(120deg, #5a1414, #c2410c 55%, #f5a524); }
.profile-banner-crepuscule { background: linear-gradient(120deg, #2b1b54, #a03a83 55%, #f08a5d); }
.profile-banner-nuit       { background: radial-gradient(circle at 20% 30%, #3b2f7a, transparent 45%), radial-gradient(circle at 80% 60%, #1d3f72, transparent 40%), #0c0a1a; }
.profile-banner + .public-profile-avatar { position: relative; }
.profile-pronouns { margin: -0.5rem 0 0.5rem; font-size: 0.9rem; color: var(--text-dim); }

.pinned-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; padding: 0; margin: 1rem 0 0; }
.pinned-badge { padding: 0.3rem 0.75rem; border: 1px solid var(--accent); border-radius: 999px; background: rgba(124, 58, 237, 0.12); font-size: 0.85rem; }

.showcase-fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.showcase-fieldset legend { padding: 0; margin-bottom: 0.5rem; }
.showcase-banners { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.6rem; }
.showcase-option { position: relative; display: flex; flex-direction: column; gap: 0.35rem; cursor: pointer; }
.showcase-option input { position: absolute; opacity: 0; pointer-events: none; }
.showcase-swatch { display: block; height: 44px; border-radius: 8px; border: 2px solid var(--line); background: var(--surface-2); }
.showcase-option input:checked + .showcase-swatch { border-color: var(--accent-bright); }
.showcase-option input:focus-visible + .showcase-swatch { outline: 2px solid var(--accent-soft); outline-offset: 2px; }
.showcase-option-label { font-size: 0.8rem; color: var(--text-dim); text-align: center; }
.pin-picker { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pin-option { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; min-height: 44px; }
.pin-option input { width: auto; }
@media (max-width: 480px) {
  .profile-banner { height: 84px; margin-bottom: -36px; }
}
