/**
 * StoryPoo Login Popup - Styles
 *
 * Couleurs de la marque StoryPoo :
 * - Pêche/Beige : #f7d9c4
 * - Texte foncé : #3d3d3d
 * - Accent : #e8b69a
 */

/* Overlay */
.storyppo-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  animation: storyppo-fadeIn 0.2s ease-out;
}

@keyframes storyppo-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Container */
.storyppo-popup-container {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 420px;
  width: 100%;
  padding: 2rem;
  position: relative;
  text-align: center;
  animation: storyppo-slideUp 0.3s ease-out;
}

@keyframes storyppo-slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Bouton fermer */
.storyppo-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  color: #6b7280;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.storyppo-popup-close:hover {
  background-color: #f3f4f6;
  color: #3d3d3d;
}

.storyppo-popup-close:focus {
  outline: 2px solid #f7d9c4;
  outline-offset: 2px;
}

/* Icône utilisateur */
.storyppo-popup-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #f7d9c4 0%, #fde8d9 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: #3d3d3d;
}

/* Titre */
.storyppo-popup-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #3d3d3d;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

/* Message */
.storyppo-popup-message {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  color: #6b7280;
  margin: 0 0 1.75rem 0;
  line-height: 1.5;
}

/* Conteneur des boutons */
.storyppo-popup-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Boutons */
.storyppo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.storyppo-btn:focus {
  outline: 2px solid #f7d9c4;
  outline-offset: 2px;
}

/* Bouton principal - Se connecter */
.storyppo-btn-primary {
  background: linear-gradient(135deg, #f7d9c4 0%, #e8b69a 100%);
  color: #3d3d3d;
  border-color: #e8b69a;
}

.storyppo-btn-primary:hover {
  background: linear-gradient(135deg, #e8b69a 0%, #daa584 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232, 182, 154, 0.4);
}

.storyppo-btn-primary:active {
  transform: translateY(0);
}

/* Bouton secondaire - Créer un compte */
.storyppo-btn-secondary {
  background: #ffffff;
  color: #3d3d3d;
  border-color: #e5e7eb;
}

.storyppo-btn-secondary:hover {
  background: #f9fafb;
  border-color: #f7d9c4;
}

/* Bouton Annuler */
.storyppo-popup-cancel {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: color 0.2s ease;
}

.storyppo-popup-cancel:hover {
  color: #6b7280;
}

.storyppo-popup-cancel:focus {
  outline: 2px solid #f7d9c4;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 480px) {
  .storyppo-popup-container {
    padding: 1.5rem;
    margin: 0.5rem;
  }

  .storyppo-popup-title {
    font-size: 1.25rem;
  }

  .storyppo-popup-message {
    font-size: 0.9375rem;
  }

  .storyppo-popup-icon {
    width: 64px;
    height: 64px;
  }

  .storyppo-popup-icon svg {
    width: 32px;
    height: 32px;
  }
}

/* Support mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
  /* Désactivé par défaut - décommenter si le site supporte le mode sombre */
  /*
  .storyppo-popup-container {
    background: #1f2937;
  }

  .storyppo-popup-title {
    color: #f9fafb;
  }

  .storyppo-popup-message {
    color: #9ca3af;
  }

  .storyppo-popup-close:hover {
    background-color: #374151;
    color: #f9fafb;
  }

  .storyppo-btn-secondary {
    background: #374151;
    color: #f9fafb;
    border-color: #4b5563;
  }

  .storyppo-btn-secondary:hover {
    background: #4b5563;
  }
  */
}
