/* Reset & global */
* {
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
}

body {
  margin: 0;
  background-color: #0b0b0b;
  color: #fff;
}

/* --- Page --- */
.profile-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* --- Card --- */
.profile-card {
  width: 100%;
  max-width: 380px;
  background-color: #141414;
  border-radius: 20px;
  padding: 30px 24px;
  text-align: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.6);
}

/* --- Avatar --- */
.profile-avatar {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #333;
}

#changeAvatarBtn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  border-radius: 100%;
  border: none;
  background: none;
  -webkit-backdrop-filter : blur(5px);
  backdrop-filter: blur(5px);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

#changeAvatarBtn:hover {
  background: #25d366;
  transform: scale(1.1);
  box-shadow: 0 0 10px #25d366aa;
}


#changeAvatarBtn {
  animation: cameraPulse 2.2s infinite ease-in-out;
}

@keyframes cameraPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* --- View mode --- */
#viewMode h2 {
  margin: 10px 0 6px;
  font-size: 22px;
}

#viewMode p {
  font-size: 14px;
  opacity: 0.75;
  margin-bottom: 20px;
}

/* --- Buttons --- */
button, .profile-btn {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #252525;
  cursor: pointer;
  margin-top: 10px;
  background: linear-gradient(145deg, #1f1f1f, #181818);
  color: #fff;
  font-size: 15px;
  transition: all 0.2s ease;
}

button:hover, .profile-btn:hover {
  background: #25d366;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px #25d36655;
}


@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 0.4; }
  100% { transform: scale(0.9); opacity: 0.7; }
}
/* --- Edit mode --- */
.hidden {
  display: none;
}

#editMode input,
#editMode textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  margin-bottom: 12px;
  background-color: #1a1a1a;
  color: #fff;
}

#editMode textarea {
  resize: none;
  height: 80px;
}

/* --- Responsive --- */
@media (max-width: 420px) {
  .profile-card {
    padding: 24px 16px;
  }

  .profile-avatar {
    width: 100px;
    height: 100px;
  }

  button, .profile-btn {
    padding: 10px;
    font-size: 14px;
  }
}


/*========= BADGES =========*/
/* Badge ultra premium vert */
.pseudo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;              /* un peu plus grand */
  height: 26px;
  font-size: 16px;
  margin-left: 8px;         /* espace légèrement plus large */
  border-radius: 50%;
  box-shadow: 0 0 10px #25d366aa, 0 0 20px #25d36655 inset; /* glow + profondeur */
  vertical-align: middle;
  position: relative;
  
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Halo animé plus premium */
.pseudo-badge.verified::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
 
  animation: pulseGlow 1.6s infinite ease-in-out;
  z-index: 0;
}

/* Hover plus vivant */
.pseudo-badge:hover {
  transform: scale(1.3) rotate(-5deg);
  box-shadow: 0 0 15px #25d366cc, 0 0 30px #25d36677 inset;
}

/* Animation pulse */
@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.5; }
}




/* Donner plus de profondeur à la card*/
.profile-card {
  background: linear-gradient(145deg, #141414, #101010);
  border: 1px solid #1f1f1f;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}


/* --- Loader skeleton --- */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
}

/* Avatar skeleton */
.avatar-skeleton {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #222;
  position: relative;
  overflow: hidden;
}

.avatar-skeleton::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #444, transparent);
  animation: shimmer 1.5s infinite;
}

/* Text skeleton */
.text-skeleton {
  height: 16px;
  width: 80%;
  background: #222;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.text-skeleton.short { width: 40%; }
.text-skeleton.medium { width: 60%; }
.text-skeleton.long { width: 80%; }

.text-skeleton::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #444, transparent);
  animation: shimmer 1.5s infinite;
}

/* Animation shimmer */
@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.hidden {
  display: none;
}


/* Cacher email, rôle et date d'inscription dans le profil */
#viewEmail,
#viewRole,
#viewCreated {
  display: none;
}



/* bouton chat */
.notif-btn{
  position:relative;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border-radius:10px;
  transition:all .2s ease;
}

/* hover élégant */
.notif-btn:hover{
  background:rgba(189, 178, 178, 0.08);
  transform:translateY(-1px);
}

/* badge notification 
#notif-badge{
  position:absolute;
  top:-6px;
  right:-6px;
  min-width:18px;
  height:18px;
  padding:2px 5px;

  background:linear-gradient(135deg,#ff3b3b,#ff0000);
  color:white;

  font-size:11px;
  font-weight:600;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:50px;
  box-shadow:0 0 0 2px #0f172a;

  animation:notifPulse 1s infinite;
}

/* animation douce 
@keyframes notifPulse {
  0%   { transform: scale(0.9); box-shadow: 0 0 6px #ff0000aa; }
  50%  { transform: scale(1.2); box-shadow: 0 0 14px #ff0000ff; }
  100% { transform: scale(0.9); box-shadow: 0 0 6px #ff0000aa; }
}

*/
/* Loader petit cercle pour bouton avatar */

#changeAvatarBtn .loader {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  border-top: 3px solid #25d366; /* vert pulse */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#changeAvatarBtn .loader.hidden {
  display: none;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}


#myAiBtn {
  background: linear-gradient(
    90deg,
    #6cf2c2,
    #4cc9f0,
    #9b5de5,
    #f15bb5
  );
  color: black;
  font-weight: 700;
}