:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(26, 34, 52, 0.7);
  --border-card: rgba(255, 255, 255, 0.08);
  --accent-green: #10b981;
  --accent-cyan: #06b6d4;
  --accent-red: #f43f5e;
  --accent-glow: rgba(16, 185, 129, 0.15);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background Gradients */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 600px;
  background: radial-gradient(circle at 50% 10%, rgba(16, 185, 129, 0.18), transparent 70%),
              radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.12), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Navigation */
header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(11, 15, 25, 0.8);
  border-bottom: 1px solid var(--border-card);
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  object-fit: cover;
}

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
}

.btn-nav {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--accent-green), #059669);
  color: white !important;
  font-weight: 600 !important;
  border-radius: 9999px;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.btn-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero h1 span {
  background: linear-gradient(135deg, #fff 30%, var(--accent-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 36px;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* Apple App Store Button */
.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px 22px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.btn-appstore:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.15);
}

.btn-appstore svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.btn-appstore .btn-text {
  text-align: left;
  line-height: 1.2;
}

.btn-appstore .btn-small {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
}

.btn-appstore .btn-bold {
  font-size: 1.05rem;
  font-weight: 700;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-card);
  color: #fff;
  padding: 13px 26px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.app-preview-card {
  max-width: 760px;
  margin: 0 auto;
  border-radius: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
}

.stat-item {
  text-align: center;
  padding: 10px 20px;
}

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

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Features Grid */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--border-card);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* FAQ & Support */
/* Challenges */
.challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.challenge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.challenge-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
}

.challenge-routine::before { background: linear-gradient(90deg, #ef4444, #22c55e, #f59e0b); }
.challenge-finish::before { background: linear-gradient(90deg, #f59e0b, #f97316); }
.challenge-grouping::before { background: linear-gradient(90deg, #0d9488, #14b8a6); }

.challenge-number {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-green);
  margin-bottom: 8px;
}

.challenge-finish .challenge-number { color: #f59e0b; }
.challenge-grouping .challenge-number { color: #0d9488; }

.challenge-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.challenge-card p {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.challenge-card ul {
  list-style: none;
  margin-bottom: 16px;
}

.challenge-card li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  color: var(--text-main);
}

.challenge-card li::before {
  content: "🎯";
  position: absolute;
  left: 0;
  font-size: 0.8rem;
  top: 3px;
}

/* Screenshots gallery */
.screens-gallery {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 24px;
  -webkit-overflow-scrolling: touch;
}

.screens-gallery figure {
  flex: 0 0 220px;
  scroll-snap-align: center;
  text-align: center;
}

.screens-gallery img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  border: 1px solid var(--border-card);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
  display: block;
}

.screens-gallery figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.faq-grid {
  display: grid;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 22px 26px;
}

.faq-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}

.faq-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.support-box {
  max-width: 800px;
  margin: 40px auto 0;
  text-align: center;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 18px;
  padding: 36px 24px;
}

.support-box h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.support-box p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #0b0f19;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.25);
}

/* Content Page (Privacy / Terms) */
.legal-content {
  max-width: 800px;
  margin: 50px auto 80px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 40px;
}

.legal-content h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.legal-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 30px;
  display: block;
}

.legal-content h2 {
  font-size: 1.4rem;
  margin-top: 30px;
  margin-bottom: 12px;
  color: #fff;
}

.legal-content p, .legal-content ul {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 16px;
}

.legal-content ul {
  padding-left: 24px;
}

.legal-content li {
  margin-bottom: 8px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-card);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  list-style: none;
  flex-wrap: wrap;
  row-gap: 12px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

@media (max-width: 1024px) {
  nav {
    flex-direction: column;
    height: auto;
    padding: 16px 0;
    gap: 16px;
  }
  
  .nav-links {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 40px 0;
  }

  .legal-content {
    padding: 24px;
  }
}

/* Language switcher */
.nav-links .lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border-card);
  border-radius: 999px;
}

.nav-links .lang-switch a {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--text-muted);
}

.nav-links .lang-switch a:hover {
  color: #fff;
}

.nav-links .lang-switch a.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Libellés de navigation sur une seule ligne (noms d'app longs selon la langue) */
.brand span,
.btn-nav {
  white-space: nowrap;
}

/* Mots longs (allemand) : titres plus petits sur téléphone, jamais de mot coupé.
   overflow-wrap ne sert que de filet de sécurité pour un mot plus large que l'écran. */
.legal-content {
  overflow-wrap: break-word;
}

@media (max-width: 480px) {
  .legal-content h1 {
    font-size: 1.5rem;
  }
}
