/* =====================
   LOGIN BUBBLE MODERN DESIGN
   ===================== */
#loginBubble {
  position: fixed;
  top: 120px;
  right: 80px;
  width: 340px;
  background: linear-gradient(145deg, #1a1a1a, #111);
  border-radius: 20px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8);
  padding: 2rem 1.8rem 2rem;
  z-index: 1000;
  border: 1px solid rgba(255,255,255,0.07);
  display: none;
  animation: fadeInBubble 0.4s ease forwards;
  backdrop-filter: blur(6px);
}

#loginBubble.active {
  display: block;
}

@keyframes fadeInBubble {
  from { opacity: 0; transform: translateY(-15px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Close Button --- */
.closeBubble {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 1.6rem;
  color: #ffc700;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
}
.closeBubble:hover {
  transform: scale(1.25) rotate(-10deg);
  color: #ff9c1a;
}

/* --- Logo --- */
.bubble-logo {
  display: block;
  width: 180px;
  height: auto;
  margin: 0 auto -3rem;
  position: relative;
  top: -45px;
  filter: drop-shadow(0 0 10px rgba(255,199,0,0.4));
  transition: transform 0.3s ease;
}
.bubble-logo:hover { transform: scale(1.1); }

/* --- Forms --- */
#loginBubble form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#loginBubble input {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #1c1c1c;
  color: #eee;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}
#loginBubble input:focus {
  outline: none;
  border-color: #ffc700;
  background: #222;
  transform: scale(1.02);
}

#loginBubble button {
  background: linear-gradient(90deg, #ffc700, #ff9c1a);
  border: none;
  border-radius: 50px;
  padding: 0.85rem;
  font-weight: 700;
  color: #111;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
#loginBubble button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255,172,0,0.35);
}

/* =====================
   USER INFO & DASHBOARD
   ===================== */
#loginBubble .user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  text-align: center;
  padding: 1rem 1.5rem;
  border-radius: 20px;
  backdrop-filter: blur(6px);
}

/* Avatar */
#loginBubble .user-info img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffc700;
  box-shadow: 0 6px 25px rgba(255,199,0,0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#loginBubble .user-info img:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 30px rgba(255,199,0,0.5);
}

/* Nom et rôle */
#loginBubble .user-info h3 {
  font-size: 1.15rem;
  color: #fff;
  margin: 0.2rem 0;
}
#loginBubble .user-info p {
  font-size: 0.9rem;
  color: #ccc;
  margin: 0.1rem 0;
}

/* Statistiques rapides */
#loginBubble .user-info .user-stats {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: #eee;
  font-size: 0.9rem;
}

#loginBubble .user-info .user-stats .stats-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ---------------------
   Toggle Actions Rapides
   --------------------- */
#loginBubble .toggle-actions {
  width: 100%;
  padding: 0.65rem 0;
  font-weight: 700;
  background: linear-gradient(90deg, #ffc700, #ff9c1a);
  color: #111;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 0.6rem;
  transition: all 0.3s ease;
}
#loginBubble .toggle-actions:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,172,0,0.35);
}

/* Actions rapides (cachées par défaut) */
#loginBubble .user-info .actions {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  width: 100%;
  align-items: center;
}

#loginBubble .user-info .actions a {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #111;
  background: linear-gradient(90deg, #ffc700, #ff9c1a);
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
}
#loginBubble .user-info .actions a:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(255,172,0,0.35);
}

/* Affiche les actions quand actif */
#loginBubble .user-info .actions.active {
  display: flex;
}

/* Bouton logout */
#loginBubble .user-info form button {
  width: 100%;
  padding: 15px;
  font-weight: 700;
  background: linear-gradient(90deg, #ffc700, #ff9c1a);
  color: #111;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 0.6rem;
  transition: all 0.3s ease;
}
#loginBubble .user-info form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,172,0,0.35);
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 600px) {
  #loginBubble {
    right: 20px;
    top: 90px;
    width: 90%;
    padding: 1.5rem;
  }
  .bubble-logo { width: 200px; top: -30px; }
  #loginBubble .user-info img { width: 55px; height: 55px; }
  #loginBubble .user-info h3 { font-size: 1rem; }
  #loginBubble .user-info p,
  #loginBubble .user-info .user-stats,
  #loginBubble .user-info .actions a { font-size: 0.8rem; }
  #loginBubble .user-info .actions { gap: 0.3rem; }
}

@media (max-width: 480px) {
  #nav-menu {
    display: none;         
    flex-direction: column;
    gap: 0.6rem;
    background: linear-gradient(145deg, #1a1a1a, #111);
    position: absolute;
    top: 80px;          /* ← descend le menu par rapport au header */
    right: 10px;
    padding: 1rem;
    border-radius: 12px;
    width: 80%;
    text-align: center;
    z-index: 999;
  }

  #nav-menu.active {
    display: flex;
    top: 100px;         /* ← descend encore plus quand actif */
  }
}
