/* MailProtect — Design System */
/* Palette bleu → violet → rose (extraite de l'icône avion en papier av5_clean) */

:root {
  /* Couleurs de marque (gradient avion) */
  --brand-blue: #4c9aff;
  --brand-purple: #9b4dff;
  --brand-pink: #ec4899;
  --brand-gradient: linear-gradient(
    135deg,
    #4c9aff 0%,
    #9b4dff 50%,
    #ec4899 100%
  );

  /* Variables historiques (--indigo*) remappées sur la nouvelle palette
     pour rester compatibles avec les styles inline dans les HTML.
     L'accent principal devient le violet (contraste AA sur blanc). */
  --indigo: #7c3aed;
  --indigo-light: #a855f7;
  --indigo-dark: #6d28d9;
  --indigo-50: #f5f3ff;
  --indigo-100: #ede9fe;
  --indigo-900: #4c1d95;
  --red: #da1f1f;
  --red-light: #eb3333;
  --surface: #fafbff;
  --surface-dark: #0f0e1a;
  --text: #1e1b4b;
  --text-secondary: #64748b;
  --text-dark: #e2e8f0;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: rgba(124, 58, 237, 0.1);
  --shadow-lg: rgba(155, 77, 255, 0.25);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
}

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family:
    "Poppins",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Typo */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}
h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

p {
  max-width: 680px;
}

a {
  color: var(--indigo);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--indigo-light);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(250, 251, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  transition: all var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}

.navbar-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.navbar-nav a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
}
.navbar-nav a:hover {
  color: var(--indigo);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  font-size: 0.85rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  transition: all var(--transition);
}
.lang-switch:hover {
  color: var(--indigo);
  border-color: var(--indigo);
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-gradient);
  color: var(--white);
  box-shadow: 0 4px 14px var(--shadow-lg);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow-lg);
  color: var(--white);
  filter: brightness(1.06);
}

.btn-secondary {
  background: var(--white);
  color: var(--indigo);
  border: 2px solid var(--indigo);
}
.btn-secondary:hover {
  background: var(--indigo-50);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--indigo);
  padding: 12px 20px;
}
.btn-ghost:hover {
  background: var(--indigo-50);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
  border-radius: 14px;
}

/* Hero — vidéo d'ondulations réelles en fond + teinte de marque */
.hero {
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #faf8ff;
}

/* La vidéo couvre le hero, légèrement désaturée + teintée violet */
.ripple-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
  opacity: 0.55;
  filter: saturate(0.6) brightness(1.05) hue-rotate(-15deg);
  mix-blend-mode: multiply;
}

/* Voile gradient violet/rose pour intégrer la vidéo à la marque */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      ellipse at 50% 30%,
      rgba(155, 77, 255, 0.08) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse at 80% 70%,
      rgba(236, 72, 153, 0.06) 0%,
      transparent 55%
    ),
    linear-gradient(
      180deg,
      rgba(250, 248, 255, 0.4) 0%,
      rgba(250, 248, 255, 0.85) 100%
    );
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .ripple-video {
    display: none;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--indigo-50);
  color: var(--indigo);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid var(--indigo-100);
}

.hero h1 {
  margin-bottom: 20px;
  color: var(--text);
}

.hero h1 span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--indigo);
  display: block;
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Sections */
.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--surface-dark);
  color: var(--text-dark);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header p {
  color: var(--text-secondary);
  margin: 16px auto 0;
  font-size: 1.1rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--indigo);
  margin-bottom: 12px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.feature-card {
  padding: 18px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
  border-color: var(--indigo-100);
}

.feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(76, 154, 255, 0.12) 0%,
    rgba(155, 77, 255, 0.12) 50%,
    rgba(236, 72, 153, 0.12) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 10px;
}

.feature-card h3 {
  margin-bottom: 6px;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Catégories de features — espacement entre blocs compacts */
.features-category {
  margin-top: 48px;
  margin-bottom: 18px;
}
.features-category:first-of-type {
  margin-top: 0;
}
.features-category-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.features-category-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Checklist dense (mockup 3) ---------- */
.features-col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 24px;
}
.features-col {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 22px;
  transition: all var(--transition);
}
.features-col:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--shadow);
  border-color: var(--indigo-100);
}
.features-col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f3e8ff;
}
.features-col-emoji {
  font-size: 22px;
}
.features-col-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.features-col-count {
  font-size: 12px;
  color: var(--indigo);
  background: var(--indigo-50);
  padding: 2px 9px;
  border-radius: 10px;
  margin-left: auto;
  font-weight: 700;
}
.feat {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  align-items: flex-start;
  font-size: 14px;
}
.feat-check {
  color: #16a34a;
  font-weight: 700;
  flex-shrink: 0;
}
.feat-soon {
  color: #ca8a04;
  font-weight: 700;
  flex-shrink: 0;
}
.feat-text strong {
  display: inline;
  font-weight: 600;
  color: var(--text-primary);
}
.feat-text span {
  color: var(--text-secondary);
  font-size: 12.5px;
  display: block;
  margin-top: 2px;
}
.features-summary {
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  color: white;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  margin-top: 40px;
  text-align: center;
}
.features-summary-number {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.1;
}
.features-summary-label {
  font-size: 15px;
  opacity: 0.92;
  margin-top: 4px;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.pricing-card {
  padding: 40px 32px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  text-align: center;
  position: relative;
  transition: all var(--transition);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow);
}

.pricing-card.popular {
  border-color: var(--indigo);
  box-shadow: 0 8px 30px var(--shadow-lg);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 20px;
  background: var(--brand-gradient);
  color: var(--white);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.pricing-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.pricing-price {
  margin-bottom: 8px;
}

.pricing-price .amount {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
}

.pricing-price .currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.pricing-price .period {
  font-size: 1rem;
  color: var(--text-secondary);
}

.pricing-save {
  display: inline-block;
  padding: 4px 14px;
  background: #ecfdf5;
  color: #059669;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin: 24px 0;
}

.pricing-features li {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li::before {
  content: "✓";
  color: var(--indigo);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Comparison */
.comparison-table {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.comparison-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.comparison-row:last-child {
  border-bottom: none;
}

.comparison-row.header {
  background: var(--indigo-50);
  font-weight: 700;
}

.comparison-cell {
  padding: 16px 20px;
  font-size: 0.9rem;
  text-align: center;
}

.comparison-cell:first-child {
  text-align: left;
  font-weight: 500;
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--white);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  font-family: inherit;
  transition: background var(--transition);
}

.faq-question:hover {
  background: var(--indigo-50);
}

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--indigo);
  font-weight: 300;
  transition: transform var(--transition);
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 80px 0;
  background: var(--brand-gradient);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 30% 50%,
    rgba(255, 255, 255, 0.18) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 16px;
}
.cta-section p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0 auto 32px;
}

.cta-section .btn-primary {
  background: var(--white);
  color: var(--indigo);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.cta-section .btn-primary:hover {
  background: var(--indigo-50);
}

/* Footer */
.footer {
  padding: 60px 0 30px;
  background: var(--text);
  color: rgba(255, 255, 255, 0.6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 280px;
}

.footer h4 {
  color: var(--white);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  display: block;
  padding: 4px 0;
  transition: color var(--transition);
}
.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

/* Mobile hamburger */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: all var(--transition);
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 8px 30px var(--shadow);
}

.auth-card h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.auth-card .subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition);
  background: var(--surface);
}

.form-group input:focus {
  outline: none;
  border-color: var(--indigo);
  background: var(--white);
}

.form-error {
  color: var(--red);
  font-size: 0.85rem;
  margin-top: 4px;
  display: none;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: none;
}

.alert-error {
  background: #fef2f2;
  color: var(--red);
  border: 1px solid #fecaca;
}

.alert-success {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

/* Dashboard */
.dashboard {
  padding: 120px 24px 60px;
  max-width: 800px;
  margin: 0 auto;
}

.dashboard-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 32px;
  margin-bottom: 24px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-active {
  background: #ecfdf5;
  color: #059669;
}

.status-inactive {
  background: #fef2f2;
  color: var(--red);
}

.status-past_due {
  background: #fffbeb;
  color: #d97706;
}

.status-canceling {
  background: #fff7ed;
  color: #ea580c;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }

  .hero {
    padding: 120px 0 60px;
  }
  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }

  .section {
    padding: 60px 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .comparison-table {
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .navbar-actions .btn {
    display: none;
  }
}
