/* ===== Page Membres (scopé, sans collision) ===== */

/* En-tête + méta */
.wo-membres-header{ display:flex; flex-direction:column; gap:.75rem; margin-bottom:1rem; }
.wo-membres-title{ margin:0; }
.wo-membres-meta{ font-size:.95rem; color: var(--text-2); }

/* === Barre de recherche (form) === */
.wo-membres-header .wo-membres-filters{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  width:100%; margin:12px 0 8px; justify-content:flex-start;
}
.wo-membres-header .wo-membres-filters .wo-membres-search{
  flex:1 1 auto; width:auto; max-width:none; min-width:260px;
}
.wo-membres-header .wo-membres-filters select.input{ flex:0 0 auto; width:auto; }
.wo-membres-header .wo-membres-filters .btn.primary{ margin-left:auto; flex:0 0 auto; }
@media (max-width: 680px){
  .wo-membres-header .wo-membres-filters .btn.primary{ margin-left:0; }
}
@media (max-width: 900px){
  .wo-membres-header .wo-membres-filters{
    display:grid !important; grid-template-columns:1fr; gap:10px; align-items:stretch; justify-content:stretch;
  }
  .wo-membres-header .wo-membres-filters .wo-membres-search,
  .wo-membres-header .wo-membres-filters select.input{
    width:100% !important; max-width:none !important; min-width:0 !important; flex:1 1 auto !important;
  }
  .wo-membres-header .wo-membres-filters .btn.primary{
    margin-left:0 !important; justify-self:center; width:auto;
  }
}
/* Confort tactile */
.wo-membres-header .wo-membres-filters .wo-membres-search,
.wo-membres-header .wo-membres-filters select.input,
.wo-membres-header .wo-membres-filters .btn.primary{ min-height:44px; }

/* Grille des cartes : 3 / 2 / 1 colonnes */
.wo-membres-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1.25rem;
}
@media (max-width:1200px){ .wo-membres-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:720px){  .wo-membres-grid{ grid-template-columns:1fr; } }

/* Carte membre (tuile) */
.wo-membres-card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow: var(--shadow, 0 2px 10px rgba(0,0,0,.06));
  padding:18px 16px;
  display:flex; flex-direction:column; align-items:center; text-align:center;
  position:relative;
}

/* Ligne du haut : statut gauche, badge rôle droite */
.wo-card-top{
  width:100%; display:flex; align-items:center; justify-content:space-between;
  margin-bottom:8px; font-size:12px; color:var(--text-2);
}
.wo-card-top .left{ display:flex; align-items:center; gap:6px; }

/* Pastilles de statut */
.wo-membres-status{ display:inline-flex; align-items:center; gap:.5rem; font-size:.9rem; color: var(--text-2); }
.wo-membres-dot{ width:10px; height:10px; border-radius:50%; display:inline-block; background:var(--muted); }
.wo-membres-dot.online{  background:#37b24d; box-shadow:0 0 8px rgba(55,178,77,.55); }
.wo-membres-dot.idle{    background:#f59f00; box-shadow:0 0 8px rgba(245,159,0,.45); }
.wo-membres-dot.offline{ background:#c92a2a; }

/* Badge rôle */
.wo-role-badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:.15rem .45rem; border-radius:999px; font-size:.78rem; font-weight:800;
  border:1px solid var(--line); background:var(--surface-2, var(--surface)); color:var(--text-2);
}
.wo-role-badge.v-superadmin{
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--danger) 40%, var(--line));
  color:#b52121;
}
.wo-role-badge.v-admin{
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
  color:var(--primary);
}
.wo-role-badge.v-moderator{
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  color:#1e6e66;
}
.wo-membres-role{ margin-left:auto; }

/* ==== Avatar + fournaise (overlay), rond + zoom ==== */
.wo-membres-avatar-wrap{
  position:relative;
  width:92px; height:92px;
  margin:6px auto 10px;
}
.wo-membres-avatar{
  width:100%; height:100%;
  border-radius:50%;
  object-fit:cover; display:block;
  border:3px solid rgba(0,0,0,.04);
  transition: transform .18s ease, box-shadow .18s ease;
}
/* Zoom au survol (desktop) */
@media (hover:hover){
  .wo-membres-avatar-wrap:hover .wo-membres-avatar{
    transform:scale(1.06);
    box-shadow:0 8px 20px rgba(0,0,0,.12);
  }
}
/* Zoom à l’appui (mobile) */
@media (hover:none){
  .wo-membres-avatar-wrap:active .wo-membres-avatar{ transform:scale(1.05); }
}
/* Médaillon fournaise en bas-droite */
.wo-membres-furnace{
  position:absolute; right:-8px; bottom:-8px;
  width:44px; height:44px; border-radius:12px;
  display:grid; place-items:center; pointer-events:none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}
.wo-membres-furnace img{ width:100%; height:100%; object-fit:contain; }
@media (max-width:480px){
  .wo-membres-avatar-wrap{ width:84px; height:84px; }
  .wo-membres-furnace{ width:38px; height:38px; right:-6px; bottom:-6px; }
}

/* Nom + serveur */
.wo-card-name{ font-size:18px; margin:0; word-break:break-word; }
.wo-card-sub{ font-size:12px; color:var(--text-2); margin:2px 0 8px 0; }

/* Mini stats : Cœurs / Joués / Gagnés (sur 1 ligne) */
.wo-mini-stats{
  display:grid; grid-template-columns:repeat(3,1fr); gap:10px; width:100%; margin:6px 0 10px 0;
}
.wo-mini-stats .item{ padding:6px 0; }
.wo-mini-stats .k{
  font-size:11px; text-transform:uppercase; letter-spacing:.04em;
  color:var(--text-2); margin-bottom:4px;
}
.wo-mini-stats .v{ font-size:16px; display:flex; gap:6px; align-items:center; justify-content:center; }
.wo-mini-stats .v .num{ font-weight:700; }

/* Humeur + slogan : slogan complet (pas d’ellipsis) */
.wo-moodline{
  display:flex; align-items:flex-start; gap:8px; justify-content:center;
  width:100%; margin:4px 0 8px 0;
}
.wo-moodline .emoji{ font-size:20px; line-height:1; }
.wo-moodline .slogan{
  font-size:13px; color:var(--text-1, #344054);
  white-space:normal; overflow:visible; text-overflow:clip; word-break:break-word;
}

/* Réseaux — style moderne avec hover “aura” */
.wo-social{
  display:flex; gap:10px; align-items:center; justify-content:center;
  list-style:none; margin:6px 0 12px 0; padding:0;
}
.wo-social li{
  width:36px; height:36px;
  border-radius:999px;
  background:var(--surface-2, var(--surface));
  border:1px solid var(--line);
  display:grid; place-items:center;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}
.wo-social a{ display:grid; place-items:center; width:100%; height:100%; border-radius:inherit; }
.wo-social img{ display:block; width:20px; height:20px; filter: drop-shadow(0 1px 0 rgba(0,0,0,.12)); }

.wo-social li:hover,
.wo-social li:has(a:focus-visible){
  transform: translateY(-2px) scale(1.06);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
  box-shadow:
    0 6px 16px rgba(0,0,0,.14),
    0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}

/* Actions */
.wo-card-actions{ display:flex; gap:10px; justify-content:center; width:100%; }
.wo-card .btn.primary{ padding:.55rem .9rem; border-radius:999px; }

/* Bouton cœur (like) */
.wo-heart-btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:.4rem; padding:.4rem .6rem; border:1px solid var(--line);
  background:var(--surface-2, var(--surface)); border-radius:999px; cursor:pointer;
}
.wo-heart-btn img.wo-heart-icon{ width:22px; height:22px; display:block; }
.wo-heart-btn[aria-pressed="true"]{ background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }

/* Pagination */
.wo-membres-pagination{ margin-top:1rem; }

/* Modale */
.wo-membres-hidden{ display:none !important; }

/* Responsive affinement */
@media (max-width:480px){
  .wo-membres-card{ padding:16px 12px; }
  .wo-mini-stats{ gap:8px; }
}

/* ===== Onglets (profil & pages reliées) ===== */
.wo-tabs{
  margin-top:1rem;
  display:block;
}
.wo-tabs > input[type="radio"]{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.wo-tabs > label{
  display:inline-block;
  padding:.6rem 1rem;
  margin:0 .25rem -1px 0;
  border:1px solid var(--line);
  border-bottom:none;
  border-top-left-radius:10px;
  border-top-right-radius:10px;
  background:var(--surface-2, var(--surface));
  color:var(--text-2);
  font-weight:600;
  cursor:pointer;
  user-select:none;
}
.wo-tabs > label:hover{ filter:brightness(1.03); }

/* État actif du label en fonction du radio coché */
#tab-activity:checked + label[for="tab-activity"],
#tab-tournaments:checked + label[for="tab-tournaments"],
#tab-security:checked + label[for="tab-security"]{
  background:var(--surface);
  color:var(--text);
  border-color:var(--line);
}

/* Contenus des onglets */
.wo-tabs__content{
  display:none;
  padding:1rem;
  border:1px solid var(--line);
  border-radius:0 10px 10px 10px;
  background:var(--surface);
}

/* Afficher le bon contenu selon l’onglet sélectionné */
#tab-activity:checked   ~ .wo-tabs__content[data-for="tab-activity"],
#tab-tournaments:checked~ .wo-tabs__content[data-for="tab-tournaments"],
#tab-security:checked   ~ .wo-tabs__content[data-for="tab-security"]{
  display:block;
}

/* Responsive onglets : labels en wrap sur mobile/tablette */
@media (max-width: 720px){
  .wo-tabs{ display:block; }
  .wo-tabs > label{
    margin-bottom:0;
    font-size:.95rem;
  }
  .wo-tabs__content{
    padding:.85rem;
  }
}


/* ====== Profil membre : ajouts spécifiques (header boutons + badge) ====== */

/* Modale étroite + petit emoji genre */
.wo-modal__content--narrow{ max-width:520px; }
.wo-gender-emoji{ font-size:1.35rem; line-height:1; margin-left:.35rem; }

/* Header “Infos joueur” : aligner et uniformiser les 2 boutons */
.wo-card__header{
  display:flex; align-items:center; gap:16px;
}
.wo-card__header .wo-header-actions{
  margin-left:auto; display:flex; gap:16px; flex-wrap:wrap;
}

/* Même taille/typo pour tous les boutons du header
   (marche avec .wo-btn et .btn si jamais l’un des deux est utilisé) */


/* Petit badge notif (si tu veux l’utiliser un jour) */
.wo-badge{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:1.5em; height:1.5em; padding:0 .35em; margin-left:.5em;
  font-size:.85em; line-height:1; font-weight:700;
  color:#fff; background:var(--danger, #ef4444); border-radius:999px;
  position:relative;
}
.wo-badge--pulse::after{
  content:""; position:absolute; inset:0; border-radius:999px;
  box-shadow:0 0 0 0 color-mix(in srgb, var(--danger, #ef4444) 60%, transparent);
  animation:wo-badge-pulse 1.5s infinite;
}
@keyframes wo-badge-pulse{
  0%   { box-shadow:0 0 0 0 color-mix(in srgb, var(--danger, #ef4444) 60%, transparent); }
  70%  { box-shadow:0 0 0 12px color-mix(in srgb, var(--danger, #ef4444) 0%, transparent); }
  100% { box-shadow:0 0 0 0 color-mix(in srgb, var(--danger, #ef4444) 0%, transparent); }
}

/* Dark mode : déjà géré par tes variables (surface/text/line). 
   Ici on ne fixe aucune couleur dure (sauf danger), donc tout suit le thème. */


/* 0) Garder ça global, c'est sain (neutralise les styles UA) */
button, input, select, textarea { font: inherit; }

/* 1) Remettre une base neutre partout (pas gras) */
.wo-btn{
  font-weight: 500;                       /* base normale */
  font-variation-settings: "wght" 500;    /* Inter VF : poids exact */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-shadow: none;
  line-height: 1.05;
}

/* 2) Appliquer le “600 net” UNIQUEMENT aux 2 boutons du header */
.wo-card__header .wo-header-actions .wo-btn{
  font-weight: 600;
  font-variation-settings: "wght" 600;
}

/* 3) (optionnel) si tu veux cibler précisément les IDs */
#editProfileBtn.wo-btn,
#myTicketsBtn.wo-btn{
  font-weight: 600;
  font-variation-settings: "wght" 600;
}

/* 4) Micro : pas de transform au repos (évite toute impression de flou) */
.wo-btn { transform: none; }
.wo-btn:hover { transform: translateY(-1px); }

/* === Header buttons = EXACT same look as "Afficher mon profil" ================= */
#editProfileBtn.wo-btn.wo-btn--primary,
#myTicketsBtn.wo-btn.wo-btn--primary{
  /* même typographie que .wo-btn par défaut */
  font-weight: 500 !important;
  font-variation-settings: "wght" 500 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-shadow: none;

  /* mêmes métriques que .wo-btn */
  padding: .65rem .9rem !important;
  border-radius: 12px !important;
  transform: none !important;
}

/* Si tu as encore ce bloc ailleurs, il sera neutralisé par celui-ci :
   .wo-card__header .wo-header-actions .wo-btn { font-weight:600; padding:.6rem 1rem; ... } */
/* === Modale "Éditer le profil" — mobile/tablette responsive ================= */

/* PC/Tablet par défaut : limite de hauteur + scroll interne (pas la page) */
#editProfileModal .wo-modal__content{
  width: min(680px, 92vw);
  max-height: 90vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Titre toujours visible quand on défile */
#editProfileModal h1{
  position: sticky;
  top: 0;
  margin: 0 0 10px;
  padding: .25rem 0 .5rem;
  background: var(--surface);
  z-index: 2;
}

/* Bouton fermer collé en haut pendant le scroll */
#editProfileModal .wo-modal__close{
  position: sticky;
  top: 8px;
  margin-left: auto;
  z-index: 3;
}

/* Confort de saisie et pas de contenu qui se cache sous le bord iOS */
#editProfileModal .form{
  display: block;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}

/* --- Mode "bottom sheet" sur mobile : plein large, coin arrondi, scroll OK --- */
@media (max-width: 900px){
  /* on aligne la modale en bas de l'écran */
  #editProfileModal{
    align-items: flex-end;   /* écrase l'align-items:center de .wo-modal */
  }
  #editProfileModal .wo-modal__content{
    width: 100vw;
    max-width: 100vw;
    height: auto;
    max-height: calc(100vh - 16px);  /* laisse un petit espace en haut */
    border-radius: 14px 14px 0 0;
    margin: 0;
    padding: 16px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;              /* geste vertical fluide */
  }
}



/* ================================ */
/* POPUP BADGES — DESIGN 2025       */
/* ================================ */

.wo-badges-wrapper {
    position: relative;
}

.wo-badges-toggle {
    background: #f2f2f7;
    border-radius: 8px;
    border: none;
    padding: 4px 10px;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s ease;
}

.wo-badges-toggle:hover {
    background: #e8e8ef;
}

/* Panel popup (pas modifié) */
.wo-badges-panel {
    position: absolute;
    bottom: 50px;
    left: 0;
    display: flex;
    gap: 8px;
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.14);
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.18s ease-in-out;
}

.wo-badges-wrapper:hover .wo-badges-panel,
.wo-badges-toggle:focus + .wo-badges-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Petit badge popup */
.wo-badges-panel img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 8px;
    background: #fafafa;
    padding: 4px;
    border: 1px solid #ececec;
    transition: 0.2s ease;
}

/* Zoom popup */
.wo-badges-panel img:hover,
.wo-badges-panel img:active,
.wo-badges-panel img:focus-visible {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}





/* ================================ */
/* BADGES MODERNES (2025) — VERSION AMÉLIORÉE */
/* ================================ */

.wo-badges-modern {
    margin-top: 16px;
    padding: 0;
}

h4.wo-badges-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text); /* ← clé magique */
}



/* Grille — 5 badges max par ligne */
.wo-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 14px;
    padding: 4px;
}

/* Carte badge — petit carré, centré, propre */
.wo-badge-card {
    background: rgba(255,255,255,0.9);
    border-radius: 14px;
    padding: 8px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.06);
    backdrop-filter: blur(6px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    transition: transform .25s ease, box-shadow .25s ease;
}

/* Zoom PLUS fort */
.wo-badge-card:hover {
    transform: scale(1.18);
    box-shadow: 0 6px 18px rgba(0, 132, 255, 0.20);
}

/* Badge image petit + centré */
.wo-badge-img-modern {
    width: 42px;
    height: 42px;
    object-fit: contain;

    transition: transform .25s ease;
}

/* Zoom supplémentaire sur l’image elle-même */
.wo-badge-card:hover .wo-badge-img-modern {
    transform: scale(1.45);
}

/* Label plus petit et bien centré */
.wo-badge-label {
    margin-top: 4px;
    font-size: 0.72rem;
    color: #444;
    line-height: 1.1;
    text-align: center;
}

/* Aucun badge */
.wo-badge-empty-modern {
    font-size: 0.95rem;
    opacity: 0.7;
    padding: 10px 0;
}

/* ================================== */
/* 📱 Mobile : gros zoom tactile      */
/* ================================== */
@media (hover: none) and (pointer: coarse) {
    .wo-badge-card:active {
        transform: scale(1.20);
        box-shadow: 0 6px 18px rgba(0, 132, 255, 0.25);
    }

    .wo-badge-card:active .wo-badge-img-modern {
        transform: scale(1.52);
    }
}

.language-select {
  display: none;
}

.lang-display {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 92%, white);
    color: var(--text);
    outline: none;
    transition: border-color var(--speed), box-shadow var(--speed), background-color var(--speed);
    box-shadow: var(--shadow);
}

.lang-display img {
  width: 22px;
  height: 14px;
  margin-right: 8px;
}

.lang-list {
  position: absolute;
  width: 100%;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 4px;
  list-style: none;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
  z-index: 999;
}

.lang-list li {
  padding: 6px 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.lang-list li:hover {
  background: #f0f0f0;
}

.lang-list img {
  width: 22px;
  height: 14px;
  margin-right: 8px;
}
.language-select-wrapper select.language-select {
    background-image: url("/static/img/icons/arrow-down.svg"), var(--flag-image, none);
    background-repeat: no-repeat;
    background-position: right 12px center, 10px center;
    background-size: 14px, 22px;
    padding-right: 30px; /* espace pour la flèche */
}
.language-select-wrapper {
    position: relative;
}

.language-select-wrapper::after {
    content: "▼";
    font-size: 12px;
    color: #999;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
/* =============== */
/* COMPOSANT SELECT CUSTOM — VERSION GÉNÉRIQUE */
/* =============== */

.custom-select {
    position: relative;
    width: 100%;
}

.custom-select select {
    display: none;
}

.custom-select-display {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 92%, white);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: border-color .15s, box-shadow .15s;
}

.custom-select-display:hover {
    border-color: var(--primary);
}

.custom-select-arrow {
    font-size: 12px;
    color: #999;
}

.custom-select-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: 180px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-select-list li {
    padding: 10px 12px;
    cursor: pointer;
}

.custom-select-list li:hover {
    background: #f0f0f0;
}
