/* ===================================================
   MODALE D'AUTHENTIFICATION (AUTH GUARD)
   =================================================== */
.auth-guard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.guard-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 24px;
  padding: 40px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalScaleUp 0.3s ease-out;
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.guard-spinner {
  font-size: 3rem;
  color: var(--primary-color, #2563eb);
  margin-bottom: 20px;
}

.guard-icon {
  font-size: 3.2rem;
  color: #ef4444;
  margin-bottom: 20px;
}

.guard-card h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.guard-card p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ===================================================
   AVATAR UTILISATEUR DANS LA NAVBAR
   =================================================== */
header nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary-color, #3b82f6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.user-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Icône animée par défaut si pas de photo */
.animated-user-icon {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6);
  background-size: 200% 200%;
  animation: gradientGlow 4s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.95rem;
}

.animated-user-icon i {
  animation: pulseUser 2s ease-in-out infinite;
}

@keyframes gradientGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulseUser {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ===================================================
   INTERFACE CHAT BOTPRESS PLEIN ÉCRAN
   =================================================== */
.gemini-page-container.full-page {
  max-width: 100%;
  margin: 0;
  padding: 12px 16px;
  height: calc(100vh - 100px); /* Ajuste la hauteur en fonction de la barre de navigation */
}

.gemini-wrapper.full-height {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  height: 100%;
  min-height: unset;
  display: flex;
  flex-direction: column;
}

#chat-integre-bp.full-iframe-container {
  width: 100%;
  height: 100%;
  flex: 1;
}

#chat-integre-bp iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .gemini-page-container.full-page {
    padding: 8px;
    height: calc(100vh - 80px);
  }

  .gemini-wrapper.full-height {
    border-radius: 12px;
  }
}
