/**
 * blog-article.css
 * Styles pour les articles de blog - Progress bar et Modal
 * Extrait de build-html.js pour ameliorer le LCP
 */

/* Progress Bar */
.article-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 9999;
  pointer-events: none;
}

.article-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #06b6d4 100%);
  width: 0%;
  transition: width 0.1s ease-out;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5);
}

/* Demo Modal */
.demo-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.demo-modal-content {
  position: relative;
  background: #0f0f1a;
  border-radius: 24px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.demo-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.2s;
}

.demo-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.demo-modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.demo-modal-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.375rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.demo-modal-header h3 {
  font-size: 1.25rem;
  color: #fff;
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.demo-modal-header p {
  color: rgba(255, 255, 255, 0.7); /* Improved contrast for WCAG AA */
  font-size: 0.875rem;
  margin: 0;
}

/* Profession Grid */
.profession-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  max-height: 45vh;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.profession-tag {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.85); /* Improved contrast for WCAG AA */
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.profession-tag:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(6, 182, 212, 0.3);
  color: #fff;
}

/* Email Form */
.demo-email-input {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

.demo-email-input:focus {
  outline: none;
  border-color: rgba(6, 182, 212, 0.5);
}

.demo-email-input::placeholder {
  color: rgba(255, 255, 255, 0.55); /* Improved contrast for WCAG AA */
}

.demo-form-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin: -0.5rem 0 1rem;
}

.demo-submit-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.demo-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
}

.demo-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.demo-form-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5); /* Improved contrast for WCAG AA */
  margin: 1rem 0 0;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .demo-modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }

  .profession-grid {
    grid-template-columns: 1fr;
  }
}
