/* =====================================================================
   Shendow — profile.css (LOT 5) : profils publics, communauté, espace membre
   ===================================================================== */
:root { --accent: var(--gold); }

/* ---------- Bannières de secours (reprend le Lot 4.1, utile si absent) ---------- */
.cover-fallback { background-color: var(--night-3); background-position: center; background-size: cover; }
.cf-1 { background-image: url("/assets/img/zones/zone1-sm.webp"); } .cf-2 { background-image: url("/assets/img/zones/zone2-sm.webp"); }
.cf-3 { background-image: url("/assets/img/zones/zone3-sm.webp"); } .cf-4 { background-image: url("/assets/img/zones/zone4-sm.webp"); }

/* ---------- Page profil ---------- */
.profile-page { position: relative; isolation: isolate; padding-bottom: 2rem; }
.profile-bg { position: fixed; inset: 0; z-index: -2; background: center / cover no-repeat; opacity: .28; filter: saturate(1.05) blur(2px); }
.profile-page.has-bg::before { content: ""; position: fixed; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7,13,31,.55), rgba(7,13,31,.92) 60%); }
.profile-hero { padding-top: 1.4rem; }
.profile-banner { position: relative; height: clamp(160px, 26vw, 300px); border-radius: 16px; background: center / cover no-repeat var(--night-3);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 24px 50px -28px #000, inset 0 -80px 80px -40px rgba(7,13,31,.85); overflow: visible; }
.banner-report { position: absolute; top: .7rem; right: .7rem; }
.profile-id { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.2rem; margin-top: -64px; padding: 0 1.4rem; position: relative; }
.profile-avatar { position: relative; flex: none; width: 148px; height: 148px; border-radius: 28px; padding: 5px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 90%, #fff 10%), color-mix(in srgb, var(--accent) 55%, #000)); box-shadow: 0 16px 40px -14px #000, 0 0 30px -10px var(--accent); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 23px; background: var(--night-3); display: block; }
.profile-names { flex: 1; min-width: 220px; padding-bottom: .3rem; }
.profile-names h1 { margin: 0 0 .3rem; font-size: clamp(1.6rem, 3.6vw, 2.4rem); color: #fff; text-shadow: 0 3px 16px rgba(0,0,0,.7);
  background: linear-gradient(180deg, #FFF3D1, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.profile-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .2rem; }
.profile-title { font-family: var(--font-title); font-style: italic; color: var(--accent); }
.profile-meta { margin: 0; }
.profile-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding-bottom: .4rem; }
.profile-layout { display: grid; gap: 1.3rem; margin-top: 1.6rem; }
@media (min-width: 980px) { .profile-layout { grid-template-columns: 340px minmax(0, 1fr); align-items: start; } .profile-side { position: sticky; top: 120px; } }
.panel h2 { font-size: 1.1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.panel-head h2 { margin: 0; }
.panel-danger { border-color: rgba(224,93,93,.45); }
.profile-bio { white-space: normal; overflow-wrap: anywhere; color: var(--text-dim); }

/* Cadres cosmétiques (boutique, Lot 8) */
.profile-avatar.frame-gold { background: conic-gradient(from 0deg, #FFE7A6, #C98A22, #FFF3D1, #9C6416, #FFE7A6); }
.profile-avatar.frame-kweebec { background: conic-gradient(from 0deg, #8BF3C2, #1F8E5C, #CFF5E3, #3FCF8E, #8BF3C2); }
.profile-avatar.frame-void { background: conic-gradient(from 0deg, #B05CFF, #2A0F1E, #FF6A3D, #6A1E8C, #B05CFF); animation: frame-spin 8s linear infinite; }
@keyframes frame-spin { to { filter: hue-rotate(360deg); } }

/* Réseaux */
.socials { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.soc { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 99px; border: 1px solid var(--line); background: rgba(7,13,31,.55);
  color: var(--text); font-size: .84rem; font-weight: 600; text-decoration: none; }
.soc::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--gold)); box-shadow: 0 0 6px var(--c, var(--gold)); }
a.soc:hover { border-color: var(--c, var(--gold)); color: #fff; }
.soc-discord { --c: #5865F2; } .soc-twitch { --c: #9146FF; } .soc-youtube { --c: #FF3B3B; } .soc-x { --c: #E7E9EA; }
.soc-tiktok { --c: #25F4EE; } .soc-instagram { --c: #E1306C; } .soc-website { --c: var(--zone-accent); }

/* Badges */
.badge-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.badge-chip { --r: #9AA6C2; display: flex; align-items: center; gap: .7rem; padding: .5rem .7rem; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--r) 45%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--r) 14%, transparent), rgba(7,13,31,.5)); }
.badge-chip img, .badge-chip .badge-glyph { width: 40px; height: 40px; flex: none; }
.badge-chip strong { display: block; font-size: .9rem; color: var(--text); }
.badge-chip small { color: var(--r); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.badge-chip.is-featured { box-shadow: 0 0 18px -6px var(--r); }
.badge-glyph { display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--r, var(--gold)) 40%, transparent), transparent 70%); color: var(--r, var(--gold)); font-size: 1.3rem; }
.rarity-common { --r: #9AA6C2; } .rarity-rare { --r: #4FB3E8; } .rarity-epic { --r: #A98BFF; } .rarity-legendary { --r: #F3C46A; }
.rarity-legendary.badge-chip { animation: legend-glow 3s ease-in-out infinite; }
@keyframes legend-glow { 50% { box-shadow: 0 0 22px -4px rgba(243,196,106,.65); } }

/* Statistiques */
.stat-grid-front { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .6rem 0 0; }
.stat-grid-front div { padding: .55rem .7rem; border-radius: 8px; background: rgba(7,13,31,.5); border: 1px solid var(--line); }
.stat-grid-front dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat-grid-front dd { margin: .1rem 0 0; font: 700 1.05rem var(--font-title); color: var(--accent); }
.player-dot.off { background: var(--muted); box-shadow: none; }

/* Galerie */
.gallery-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery-item { margin: 0; border-radius: 12px; overflow: hidden; background: rgba(7,13,31,.55); border: 1px solid var(--line); }
.gallery-item img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s var(--ease); }
.gallery-item a:hover img { transform: scale(1.04); }
.gallery-item figcaption { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem 0; font-size: .9rem; }
.gallery-item figcaption strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-item > p, .gallery-item > form { padding: 0 .7rem .6rem; margin: .3rem 0 0; }
.gallery-item.is-pending { opacity: .65; }

/* Mur */
.wall-form { display: grid; gap: .5rem; margin-bottom: 1.2rem; }
.wall-form-foot { display: flex; justify-content: space-between; align-items: center; }
.wall-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.wall-post { display: flex; gap: .8rem; padding: .8rem; border-radius: 12px; background: rgba(7,13,31,.5); border: 1px solid var(--line); }
.wall-post img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.wall-body { flex: 1; min-width: 0; }
.wall-body p { margin: 0; overflow-wrap: anywhere; }
.wall-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .25rem !important; }
.wall-head a { color: var(--gold-2); text-decoration: none; }
.wall-tools { display: flex; align-items: flex-start; gap: .2rem; }
.wall-post.is-pending { border-style: dashed; opacity: .75; }

/* Signalement */
.report-menu { position: relative; display: inline-block; }
.report-menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); border: 1px solid transparent; background: rgba(7,13,31,.6); font-size: .9rem; }
.report-menu summary::-webkit-details-marker { display: none; }
.report-menu summary:hover, .report-menu[open] summary { color: #FF9C9C; border-color: rgba(224,93,93,.5); }
.report-form { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 30; width: 250px; display: grid; gap: .5rem; padding: .8rem; border-radius: 10px;
  background: #111B39; border: 1px solid rgba(224,93,93,.45); box-shadow: var(--shadow); }
.report-form input, .report-form select { padding: .45rem .6rem; font-size: .85rem; }

/* ---------- Communauté ---------- */
.members-filter { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.6rem; }
.members-filter input { flex: 1; min-width: 200px; max-width: 380px; } .members-filter select { width: auto; }
.member-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.member-card { position: relative; display: grid; justify-items: center; gap: .35rem; padding: 0 1rem 1.1rem; border-radius: 14px; overflow: hidden; text-align: center;
  text-decoration: none; color: var(--text); background: linear-gradient(180deg, rgba(25,40,79,.85), rgba(14,22,46,.95)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  transition: transform .25s var(--ease), border-color .25s; }
.member-card:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--text); }
.member-banner { display: block; width: calc(100% + 2rem); height: 78px; margin: 0 -1rem; background: center / cover no-repeat var(--night-3); }
.member-avatar { width: 72px; height: 72px; margin-top: -38px; border-radius: 18px; object-fit: cover; border: 3px solid var(--accent); background: var(--night-3); box-shadow: 0 8px 20px -8px #000; }
.member-card strong { color: var(--gold-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Espace membre ---------- */
.account-nav-me { display: flex !important; align-items: center; gap: .7rem; padding: .7rem !important; margin-bottom: .4rem; border-bottom: 1px solid var(--line); border-radius: 0 !important; }
.account-nav-me img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; border: 1px solid var(--gold); }
.account-nav-me strong { display: block; color: var(--gold-2); } .account-nav-me small { color: var(--muted); font-size: .78rem; }
.account-hero { padding: 0; overflow: hidden; }
.account-hero-banner { height: 120px; background: center / cover no-repeat var(--night-3); }
.account-hero-body { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; padding: 0 1.4rem 1.2rem; margin-top: -40px; }
.account-hero-avatar { width: 96px; height: 96px; border-radius: 20px; object-fit: cover; border: 3px solid var(--accent); background: var(--night-3); }
.account-hero-body h1 { margin: 0; font-size: 1.6rem; }
.account-hero-body > div:nth-child(2) { flex: 1; min-width: 200px; }
.account-hero-body p { margin: .2rem 0 0; }
.account-hero-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; }
.stat-tile { display: grid; gap: .1rem; padding: .9rem 1rem; border-radius: 12px; text-decoration: none; color: var(--text); background: rgba(14,22,46,.8); border: 1px solid var(--line); }
.stat-tile:hover { border-color: var(--gold); color: var(--text); }
.stat-tile strong { font: 700 1.5rem var(--font-title); color: var(--gold-2); }
.stat-tile span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.two-cols { display: grid; gap: 1.2rem; }
@media (min-width: 1000px) { .two-cols { grid-template-columns: 1fr 1fr; } }
.link-row { display: flex; gap: .9rem; align-items: flex-start; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.link-row:last-child { border-bottom: 0; }
.link-row p { margin: .15rem 0 .5rem; }
.link-ico { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.link-hytale { background: linear-gradient(145deg, #F6D27E, #9C6416); } .link-discord { background: linear-gradient(145deg, #7983F5, #4752C4); }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.notif-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.notif-list li.is-new span::before { content: "● "; color: var(--gold); }
.notif-dot { min-width: 18px; height: 18px; padding: 0 .3rem; border-radius: 99px; background: var(--bad); color: #fff; font: 700 .68rem/18px var(--font-body); text-align: center; }
.img-fields { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.img-field { display: grid; gap: .5rem; align-content: start; }
.img-preview { border-radius: 12px; background: center / cover no-repeat var(--night-3); border: 1px dashed var(--line); }
.img-preview.is-empty { background-image: url("/assets/img/ornaments/rune-circle.svg"); background-size: 48px; opacity: .6; }
.img-field-avatar .img-preview { width: 120px; aspect-ratio: 1; }
.img-field-banner .img-preview { aspect-ratio: 4 / 1; }
.img-field-background .img-preview { aspect-ratio: 16 / 9; }
.accent-row { display: flex; align-items: center; gap: .8rem; }
.accent-row input[type=color] { width: 56px; height: 40px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: transparent; }
.form-actions-front { display: flex; justify-content: flex-end; }
.radio-cards { display: grid; gap: .5rem; border: 0; padding: 0; margin: 0; }
.radio-cards legend { font-weight: 600; margin-bottom: .4rem; }
.radio-card { display: flex !important; gap: .7rem; align-items: flex-start; padding: .7rem .9rem; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; font-weight: 400 !important; }
.radio-card:has(input:checked) { border-color: var(--gold); background: rgba(229,169,60,.08); }
.radio-card strong { display: block; } .radio-card small { color: var(--muted); }
.badge-pick { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.badge-card { --r: #9AA6C2; display: grid !important; justify-items: center; gap: .25rem; padding: .8rem .5rem; border-radius: 12px; text-align: center; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--r) 40%, transparent); background: rgba(7,13,31,.5); font-weight: 400 !important; }
.badge-card input { justify-self: end; accent-color: var(--gold); }
.badge-card:has(input:checked) { box-shadow: 0 0 16px -4px var(--r); border-color: var(--r); }
.badge-card img, .badge-card .badge-glyph { width: 48px; height: 48px; }
.badge-card small { color: var(--r); font-size: .72rem; }
.or-sep { display: flex; align-items: center; gap: .8rem; margin: 1.2rem 0; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.center { text-align: center; }
.btn-discord { background: #5865F2; border-color: #6F7BFF; color: #fff; }
.btn-discord:hover { color: #fff; filter: brightness(1.1); }
@media (max-width: 640px) {
  .profile-id { margin-top: -48px; padding: 0 .6rem; }
  .profile-avatar { width: 108px; height: 108px; border-radius: 22px; }
}

/* ===== LOT 5.1 : bannières de profil / communauté visibles, avatars au premier plan ===== */
.account-hero-banner.cover-fallback.cf-1, .member-banner.cover-fallback.cf-1, .profile-banner.cover-fallback.cf-1 { background-image: url("/assets/img/zones/zone1-sm.webp"); }
.account-hero-banner.cover-fallback.cf-2, .member-banner.cover-fallback.cf-2, .profile-banner.cover-fallback.cf-2 { background-image: url("/assets/img/zones/zone2-sm.webp"); }
.account-hero-banner.cover-fallback.cf-3, .member-banner.cover-fallback.cf-3, .profile-banner.cover-fallback.cf-3 { background-image: url("/assets/img/zones/zone3-sm.webp"); }
.account-hero-banner.cover-fallback.cf-4, .member-banner.cover-fallback.cf-4, .profile-banner.cover-fallback.cf-4 { background-image: url("/assets/img/zones/zone4-sm.webp"); }
.account-hero-banner, .member-banner, .profile-banner { position: relative; z-index: 0; }
.account-hero-banner::after, .member-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,13,31,0) 40%, rgba(7,13,31,.75)); }
.account-hero-body, .profile-id { position: relative; z-index: 2; }
.account-hero-avatar, .member-avatar { position: relative; z-index: 2; }
.account-hero-banner { height: 150px; }
.account-hero-body { margin-top: -48px; }
.account-hero-body h1 { text-shadow: 0 2px 10px rgba(0,0,0,.8); }
.member-card { padding-top: 0; }
.member-banner { height: 84px; }
.cover-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.cover-actions form { margin: 0 !important; }

/* ===== LOT 5.2 : pseudo et infos sous la bannière (profil public et Mon compte) ===== */
.profile-id { align-items: flex-start; }
.profile-names { padding-top: 76px; padding-bottom: 0; }
.profile-actions { padding-top: 84px; padding-bottom: 0; }
.account-hero-body { align-items: flex-start; }
.account-hero-body > div:nth-child(2) { padding-top: 58px; }
.account-hero-actions { padding-top: 62px; }
@media (max-width: 640px) {
  .profile-names, .profile-actions, .account-hero-body > div:nth-child(2), .account-hero-actions { padding-top: 0; }
  .profile-id, .account-hero-body { align-items: flex-end; }
}
