/* ============================================
   LEAN SAAS - STYLES PRINCIPAUX
   Styles spécifiques aux composants de l'application
   ============================================ */

/* ============================================
   HEADER / NAVIGATION
   ============================================ */

.header {
  background-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
}

.navbar-brand .logo {
  font-size: var(--text-2xl);
  /* Space Grotesk first; falls back gracefully to the existing display font
     (Outfit) then to a generic sans if Google Fonts is unavailable. */
  font-family: 'Space Grotesk', var(--font-title), sans-serif;
  color: var(--color-white);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.navbar-brand .logo .logo-accent {
  color: var(--color-action);
}

.navbar-menu {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
}

.nav-link {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-white);
  text-decoration: none;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--color-action);
  border-radius: var(--radius-full);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.lang-switcher {
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.lang-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.lang-btn:hover { color: white; background: rgba(255,255,255,0.1); }
.lang-btn.lang-btn-active { background: rgba(255,255,255,0.2); color: white; }

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--color-alert);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-action);
}

.user-name {
  color: var(--color-white);
  font-weight: 500;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--color-primary);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  list-style: none;
  margin: 0;
  padding: var(--space-1) 0;
  z-index: 2000;
}
.user-dropdown.open { display: block; }
.user-dropdown li a {
  display: block;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: #fff;
  text-decoration: none;
  transition: background var(--transition-fast);
}
.user-dropdown li a:hover { background: rgba(255,255,255,0.08); }

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  padding: var(--space-10) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2316B3AE' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.1;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: var(--text-5xl);
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--color-secondary);
  margin-bottom: var(--space-8);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
}

.stat-card {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 150px;
}

.stat-number {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-action);
  font-family: var(--font-title);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-secondary);
  margin-top: var(--space-2);
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: var(--space-10) 0;
}

.section.bg-white {
  background-color: var(--color-white);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.section-header h2 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-3);
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
}

/* ============================================
   METHOD CARDS
   ============================================ */

.method-card {
  text-align: center;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.method-card:hover {
  transform: translateY(-4px);
}

.method-icon {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-4);
}

.method-card h3 {
  margin-bottom: var(--space-3);
}

.method-steps {
  text-align: left;
}

.method-step {
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
}

/* ============================================
   TOOL CARDS
   ============================================ */

.tool-card {
  text-align: center;
  cursor: pointer;
}

.tool-card h4 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background-color: var(--color-primary);
  color: var(--color-secondary);
  padding: var(--space-8) 0 var(--space-4);
  margin-top: var(--space-10);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-6);
}

.footer-section h4,
.footer-section h5 {
  color: var(--color-white);
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: var(--color-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-action);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(157, 188, 200, 0.2);
  padding-top: var(--space-4);
  text-align: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .navbar-menu {
    gap: var(--space-4);
  }

  .hero-title {
    font-size: var(--text-4xl);
  }

  .hero-subtitle {
    font-size: var(--text-lg);
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
  }

  .navbar-menu {
    order: 3;
    width: 100%;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-4);
    display: none;
  }

  .navbar-menu.active {
    display: flex;
  }

  .hero-stats {
    flex-direction: column;
    align-items: center;
  }

  .stat-card {
    width: 100%;
    max-width: 300px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: var(--text-3xl);
  }
}

/* ============================================
   ANIMATIONS SPÉCIFIQUES
   ============================================ */

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: slideInUp 0.6s ease-out;
}

.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }

/* ============================================
   ÉTATS DE CHARGEMENT
   ============================================ */

.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid var(--color-secondary);
  border-top-color: var(--color-action);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   TOASTS / NOTIFICATIONS
   ============================================ */

.toast {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  background-color: var(--color-white);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 300px;
  animation: slideInRight 0.3s ease-out;
  z-index: 9999;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-success {
  border-left: 4px solid #16a34a;
}

.toast-error {
  border-left: 4px solid var(--color-alert);
}

.toast-info {
  border-left: 4px solid var(--color-action);
}

/* ============================================
   MODALES
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(26, 31, 52, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  animation: fadeIn 0.2s ease-out;
}

.modal {
  background-color: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-bg-light);
}

.modal-title {
  font-size: var(--text-2xl);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: var(--text-2xl);
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-alert);
}

/* ============================================
   FIN DES STYLES PRINCIPAUX
   ============================================ */
