/* === Profils & badges (lot communauté) ===
   Pages /joueurs, /joueur/<slug>, /classements, /mon-profil + encart « nouveau badge ».
   Couleurs : variables du thème actif (style.css). Cibles tactiles ≥ 44 px. */

.pf-wrap { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.2rem 5rem; box-sizing: border-box; width: 100%; }
.pf-hero { text-align: center; padding: 3.2rem 1.2rem 1rem; }
.pf-hero h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 4.5vw, 2.8rem); color: var(--bone); margin: .7rem 0; }
.pf-hero p { color: var(--bone-dim, var(--ash)); max-width: 720px; margin: 0 auto; }
.pf-muted { color: var(--ash); }
.pf-err { color: var(--rust-light, #e74c3c); }
.pf-card { background: var(--bg-card, rgba(0,0,0,.35)); border: 1px solid var(--border-warm, rgba(255,255,255,.12)); border-radius: 6px; padding: 1.1rem; margin-bottom: 1.1rem; overflow-wrap: anywhere; }
.pf-card h2, .pf-card h3 { font-family: var(--font-display); color: var(--gold, #f39c12); margin: 0 0 .8rem; font-size: 1.15rem; }
.pf-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--border-warm, #555); background: rgba(0,0,0,.35); color: var(--bone); font-family: var(--font-accent, inherit); cursor: pointer; border-radius: 4px; text-decoration: none; font-size: .9rem; }
.pf-btn:hover, .pf-btn:focus-visible { border-color: var(--gold, #f39c12); color: var(--gold, #f39c12); }
.pf-btn.primary { background: var(--orange, #e67e22); color: var(--bg-deep, #111); border-color: transparent; }
.pf-btn.primary:hover { background: var(--gold, #f39c12); color: var(--bg-deep, #111); }
.pf-btn.danger { border-color: var(--rust, #c0392b); color: var(--rust-light, #e74c3c); }
.pf-btn[disabled] { opacity: .5; cursor: not-allowed; }
.pf-input, .pf-select, .pf-textarea { min-height: 44px; padding: .55rem .8rem; background: rgba(0,0,0,.4); color: var(--bone); border: 1px solid var(--border-warm, #555); border-radius: 4px; font: inherit; box-sizing: border-box; max-width: 100%; }
.pf-textarea { width: 100%; min-height: 120px; resize: vertical; }

/* Barre de filtres du répertoire */
.pf-filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.pf-filters .pf-input, .pf-filters .pf-select { width: 100%; }
.pf-check { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; color: var(--bone); cursor: pointer; }
.pf-check input { width: 20px; height: 20px; }
@media (max-width: 820px) { .pf-filters { grid-template-columns: 1fr 1fr; } .pf-filters .pf-q { grid-column: 1 / -1; } }

/* Grille de cartes joueur */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; }
.pf-player { display: flex; gap: .7rem; align-items: center; padding: .8rem; background: rgba(0,0,0,.32); border: 1px solid var(--border-warm, #444); border-left: 3px solid var(--gold, #f39c12); border-radius: 5px; text-decoration: none; color: var(--bone); min-height: 72px; min-width: 0; }
.pf-player:hover, .pf-player:focus-visible { border-color: var(--gold, #f39c12); background: rgba(243,156,18,.07); }
.pf-player .pf-av { width: 52px; height: 52px; flex: none; }
.pf-player-txt { min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.pf-player-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-player-sub { font-size: .8rem; color: var(--ash); }
.pf-av { border-radius: 50%; object-fit: cover; background: #222; display: block; }
.pf-pager { display: flex; gap: .5rem; justify-content: center; align-items: center; margin-top: 1.2rem; flex-wrap: wrap; }

/* Badges */
.pf-badges { display: flex; flex-wrap: wrap; gap: .45rem; }
.pf-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .55rem .25rem .3rem; border-radius: 999px; border: 1px solid var(--b-color, #9aa5b1); background: rgba(0,0,0,.35); color: var(--bone); font-size: .82rem; line-height: 1.2; max-width: 100%; }
.pf-badge-ico { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; flex: none; }
.pf-badge-ico img { width: 22px; height: 22px; object-fit: contain; }
.pf-badge.mini { padding: .1rem; border-radius: 50%; }
.pf-badge.mini .pf-badge-txt { display: none; }
.pf-badge[data-rarity="legendary"] { box-shadow: 0 0 8px rgba(243,156,18,.45); }
.pf-badge-big { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem; border: 1px solid var(--b-color, #9aa5b1); border-radius: 6px; background: rgba(0,0,0,.3); }
.pf-badge-big .pf-badge-ico { width: 40px; height: 40px; font-size: 1.7rem; }
.pf-badge-big .pf-badge-ico img { width: 40px; height: 40px; }
.pf-badge-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; }
.pf-rar { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--b-color, #9aa5b1); }

/* Page profil */
.pf-banner { height: 140px; border-radius: 6px 6px 0 0; background: linear-gradient(135deg, rgba(192,57,43,.35), rgba(0,0,0,.5)); background-size: cover; background-position: center; }
.pf-head { display: flex; gap: 1rem; align-items: flex-end; margin-top: -56px; padding: 0 1rem 1rem; flex-wrap: wrap; }
.pf-head .pf-avbox { width: 112px; height: 112px; flex: none; }
.pf-head .pf-av { width: 112px; height: 112px; border: 4px solid var(--bg-deep, #111); }
.pf-head-txt { flex: 1 1 220px; min-width: 0; }
.pf-head-txt h1 { font-family: var(--font-display); color: var(--bone); margin: .2rem 0; font-size: clamp(1.4rem, 4vw, 2rem); overflow-wrap: anywhere; }
.pf-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.pf-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.1rem; }
@media (max-width: 860px) { .pf-cols { grid-template-columns: 1fr; } }
.pf-kv { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; margin: 0; }
.pf-kv dt { color: var(--ash); }
.pf-kv dd { margin: 0; color: var(--bone); overflow-wrap: anywhere; }
.pf-bio { white-space: pre-line; color: var(--bone); line-height: 1.5; }
.pf-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.pf-stat { background: rgba(0,0,0,.3); border: 1px solid var(--border-warm, #444); border-radius: 5px; padding: .6rem; text-align: center; }
.pf-stat b { display: block; font-family: var(--font-display); font-size: 1.4rem; color: var(--gold, #f39c12); }
.pf-stat span { font-size: .8rem; color: var(--ash); }
.pf-prog { margin: .45rem 0; }
.pf-prog-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; color: var(--bone); flex-wrap: wrap; }
.pf-bar { height: 8px; background: rgba(255,255,255,.08); border-radius: 4px; overflow: hidden; margin-top: .25rem; }
.pf-bar i { display: block; height: 100%; background: var(--gold, #f39c12); }
.pf-showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.pf-tcard { border: 2px solid var(--c-color, #888); border-radius: 6px; overflow: hidden; background: rgba(0,0,0,.4); display: flex; flex-direction: column; min-width: 0; }
.pf-tcard img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #111; }
.pf-tcard span { padding: .35rem .45rem; font-size: .8rem; color: var(--bone); overflow-wrap: anywhere; }
.pf-friends { display: flex; flex-wrap: wrap; gap: .5rem; }
.pf-friend { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .2rem .6rem .2rem .25rem; border: 1px solid var(--border-warm, #444); border-radius: 999px; color: var(--bone); text-decoration: none; max-width: 100%; }
.pf-friend img { width: 34px; height: 34px; border-radius: 50%; }
.pf-reserved { text-align: center; padding: 2rem 1rem; color: var(--bone-dim, var(--ash)); }

/* Classements */
.pf-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.pf-tab { min-height: 44px; padding: .45rem .9rem; border: 1px solid var(--border-warm, #555); background: rgba(0,0,0,.3); color: var(--bone); border-radius: 4px; cursor: pointer; font: inherit; }
.pf-tab.is-active { border-color: var(--gold, #f39c12); color: var(--gold, #f39c12); background: rgba(243,156,18,.1); }
.pf-lb { list-style: none; margin: 0; padding: 0; }
.pf-lb li { display: grid; grid-template-columns: 3rem 44px minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .45rem .5rem; border-bottom: 1px solid rgba(255,255,255,.06); min-height: 52px; }
.pf-lb li.is-me { background: rgba(243,156,18,.1); }
.pf-lb .pf-rank { font-family: var(--font-display); color: var(--gold, #f39c12); text-align: center; font-size: 1.1rem; }
.pf-lb .pf-av { width: 40px; height: 40px; }
.pf-lb a { color: var(--bone); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; min-height: 44px; line-height: 44px; }
.pf-lb .pf-anon { color: var(--ash); font-style: italic; }
.pf-lb .pf-val { font-weight: 700; color: var(--bone); white-space: nowrap; }
.pf-me-box { margin-top: .8rem; padding: .7rem; border: 1px dashed var(--gold, #f39c12); border-radius: 5px; color: var(--bone); }

/* Réglages (mon-profil) */
.pf-form-row { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .9rem; }
.pf-form-row label { color: var(--bone); font-weight: 600; }
.pf-radio { display: flex; flex-wrap: wrap; gap: .5rem; }
.pf-radio label { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .8rem; border: 1px solid var(--border-warm, #555); border-radius: 4px; cursor: pointer; font-weight: 400; }
.pf-radio input:checked + span { color: var(--gold, #f39c12); }
.pf-code { font-family: var(--font-accent, monospace); font-size: 1.3rem; letter-spacing: .08em; color: var(--gold, #f39c12); }
.pf-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; max-height: 420px; overflow-y: auto; padding: .2rem; }
.pf-pick { position: relative; cursor: pointer; border: 2px solid transparent; border-radius: 6px; background: rgba(0,0,0,.35); padding: 0; color: var(--bone); font: inherit; text-align: left; min-height: 44px; }
.pf-pick.is-on { border-color: var(--gold, #f39c12); }
.pf-pick img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px 4px 0 0; display: block; }
.pf-pick span { display: block; font-size: .75rem; padding: .25rem .35rem; overflow-wrap: anywhere; }
.pf-pick em { position: absolute; top: .3rem; left: .3rem; background: var(--gold, #f39c12); color: #111; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; }
.pf-order { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; }
.pf-order li { list-style: none; display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .4rem; border: 1px solid var(--border-warm, #555); border-radius: 4px; }
.pf-order button { min-width: 44px; min-height: 44px; background: none; border: none; color: var(--bone); cursor: pointer; font-size: 1rem; }

/* Encart « nouveau badge » (main.js) */
.pf-toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 9000; max-width: min(360px, calc(100vw - 2rem)); background: var(--bg-card, #1a1410); border: 1px solid var(--gold, #f39c12); border-radius: 8px; padding: .8rem; box-shadow: 0 6px 24px rgba(0,0,0,.5); color: var(--bone); display: flex; gap: .6rem; align-items: flex-start; box-sizing: border-box; }
.pf-toast-body { flex: 1; min-width: 0; }
.pf-toast-body strong { color: var(--gold, #f39c12); display: block; margin-bottom: .2rem; }
.pf-toast-body a { color: var(--bone); }
.pf-toast-close { min-width: 44px; min-height: 44px; background: none; border: none; color: var(--ash); cursor: pointer; font-size: 1.1rem; }
.report-btn { min-height: 44px; }
