:root { --bg:#0b1020; --card:#101a33; --txt:#e8eefc; --mut:#9fb0d0; --acc:#4a95cc; --danger:#ff4d4d; }
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,Segoe UI,Roboto,Arial;background:linear-gradient(180deg,#070a14, var(--bg));color:var(--txt)}
a{color:var(--txt);text-decoration:none}
.wrap{max-width:1100px;margin:0 auto;padding:18px}
.nav{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0}
.brand{font-weight:800;letter-spacing:.5px}
.navlinks{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.hero{padding:16px 0 0}
.heroGrid{display:grid;grid-template-columns:1.25fr .9fr;gap:18px;align-items:start}
@media (max-width:900px){.heroGrid{grid-template-columns:1fr}}
.lead{color:var(--mut);font-size:1.05rem;line-height:1.5}
.card{background:rgba(16,26,51,.86);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:16px;box-shadow:0 12px 30px rgba(0,0,0,.25)}
.section{padding:18px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
@media (max-width:900px){.grid3{grid-template-columns:1fr}}
.btn{display:inline-block;background:var(--acc);padding:10px 14px;border-radius:12px;font-weight:700;border:0;cursor:pointer}
.btn.small{padding:8px 10px;border-radius:10px;font-weight:700}
.btn.ghost{background:transparent;border:1px solid rgba(255,255,255,.16)}
.btn.danger{background:var(--danger)}
.pillRow{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.pill{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.10);padding:6px 10px;border-radius:999px;color:var(--mut);font-weight:700}
.ctaRow{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}
label{display:block;margin-top:10px;margin-bottom:6px;color:var(--mut);font-weight:700}
input,textarea{width:100%;padding:10px 12px;border-radius:12px;border:1px solid rgba(255,255,255,.12);background:rgba(0,0,0,.25);color:var(--txt);outline:none}
textarea{resize:vertical}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.muted{color:var(--mut)}
.ok{color:#9cffc1}
.error{color:#ffb3b3}
.footer{margin-top:18px;color:var(--mut);padding:18px 0}
.tableWrap{overflow:auto}
table{width:100%;border-collapse:collapse}
th,td{padding:10px;border-bottom:1px solid rgba(255,255,255,.08);text-align:left;white-space:nowrap}
.content h2,.content h3{margin-top:8px}

/* --- FIX PERMANENT AVATAR NAVBAR --- */
/* Conteneur fixe */
.nav .avatarWrap{
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  max-width: 48px;
  max-height: 48px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.25);
}

/* L'image remplit toujours le conteneur */
.nav .avatarWrap .avatar{
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 50% !important;
}

/* Version grande (page settings) */
.avatar.big{
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  max-width: 60px;
  max-height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

/* Alignement du lien */
.logoutLink{
  display: inline-flex;
  align-items: center;
}


/* === HARD FORCE AVATAR SIZE (NAVBAR) === */
.nav .logoutLink{
  width: 48px !important;
  height: 48px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.nav .avatarWrap{
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(255,255,255,.25) !important;
}

.nav .avatarWrap img,
.nav .avatarWrap .avatar{
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 50% !important;
}

/* Keep big avatar in settings page reasonable */
.avatar.big{
  width: 80px !important;
  height: 80px !important;
  max-width: 80px !important;
  max-height: 80px !important;
  min-width: 80px !important;
  min-height: 80px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}


/* === HARD FORCE AVATAR SIZE (SETTINGS PAGE) === */
.settings-avatar-wrap{
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(255,255,255,.25) !important;
}

.settings-avatar-wrap img,
.settings-avatar-wrap .avatar,
.avatar.big{
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 50% !important;
}

/* Absolute clamp: any avatar image inside settings card can't exceed 100x100 */
.settings-page img.avatar,
.settings-page .avatar,
.settings-page img{
  max-width: 30px !important;
  max-height: 30px !important;
}

/* === SETTINGS AVATAR LOCK (SAFE) === */
.settings-page .settingsAvatarRow{gap:14px}
.settings-page .avatarWrapLock{
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(255,255,255,.25) !important;
}
.settings-page img.avatarLock{
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 50% !important;
}