:root {
  --bg: #1C1C1C;
  --surface: #252525;
  --surface-variant: #2E2E2E;
  --primary: #B91C1C;
  --primary-light: #DC2626;
  --primary-dark: #7F1D1D;
  --on-bg: #FAFAFA;
  --on-surface: #FAFAFA;
  --on-surface-variant: #B8B8B8;
  --outline: #404040;
  --outline-variant: #525252;
}

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

html {
  scroll-behavior: smooth;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--on-surface);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  background: linear-gradient(to bottom, var(--bg) 60%, transparent);
  transition: background 0.3s;
}

.header.scrolled {
  background: rgba(28, 28, 28, 0.95);
  backdrop-filter: blur(8px);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--on-bg);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  padding: 8px 2px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #f5f5f5;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle span + span {
  margin-top: 4px;
}

.header.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}

.header.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.header.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-3px) rotate(-45deg);
}

.nav a {
  color: var(--on-surface-variant);
  text-decoration: none;
  font-weight: 500;
  margin-left: 32px;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--primary);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(185, 28, 28, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero h1 .accent {
  color: var(--primary);
}

.hero .tagline {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 8px;
}

.hero .subtagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--on-surface-variant);
  margin-bottom: 40px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(185, 28, 28, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--on-surface);
  border: 2px solid var(--outline);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Sections */
section {
  padding: 56px 0;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--on-surface-variant);
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 1.1rem;
}

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

.feature-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--outline);
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--outline-variant);
  transform: translateY(-4px);
}

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

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

.feature-card p {
  color: var(--on-surface-variant);
  font-size: 0.95rem;
}

/* How it works */
.how-list {
  max-width: 640px;
  margin: 0 auto;
}

.how-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--outline);
}

.how-item:last-child {
  border-bottom: none;
}

.how-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.how-item h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.how-item p {
  color: var(--on-surface-variant);
  font-size: 0.95rem;
}

/* CTA Download */
.cta-section {
  text-align: center;
  padding: 64px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(185, 28, 28, 0.08) 50%, transparent 100%);
}

.cta-section .section-title {
  margin-bottom: 12px;
}

.cta-section .section-subtitle {
  margin-bottom: 40px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

.store-badges a {
  display: inline-block;
  transition: opacity 0.2s, transform 0.2s;
}

.store-badges a:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.store-badges img {
  height: 52px;
  width: auto;
  display: block;
}

.download-notice {
  margin-top: 28px;
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.download-notice a {
  color: var(--primary);
  text-decoration: none;
}

.download-notice a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  padding: 40px 24px;
  border-top: 1px solid var(--outline);
  text-align: center;
}

.footer p {
  color: var(--on-surface-variant);
  font-size: 0.9rem;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Pages légales */
.legal-main {
  padding: 80px 0 56px;
  min-height: 100vh;
}

.legal-page {
  max-width: 720px;
}

.legal-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 4px;
}

.legal-updated {
  color: var(--on-surface-variant);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.legal-lead {
  color: var(--on-surface-variant);
  font-size: 1rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.legal-main section {
  padding: 0;
}

.legal-section {
  margin-bottom: 12px;
}

.legal-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--on-surface);
}

.legal-section p,
.legal-section li {
  color: var(--on-surface-variant);
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.6;
}

.legal-section ul {
  margin: 8px 0 8px 24px;
}

.legal-section li {
  margin-bottom: 4px;
}

.legal-back {
  margin-top: 32px;
}

/* Page contact */
.contact-page {
  max-width: 520px;
}

.contact-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 8px;
}

.contact-intro {
  color: var(--on-surface-variant);
  margin-bottom: 32px;
}

.contact-form .contact-label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--on-surface);
}

.contact-form .contact-input {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--on-surface);
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 12px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

.contact-form .contact-input:focus {
  outline: none;
  border-color: var(--primary);
}

.contact-form .contact-input::placeholder {
  color: var(--on-surface-variant);
}

.contact-textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-message {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.contact-message--success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.contact-message--error {
  background: rgba(185, 28, 28, 0.2);
  color: #fca5a5;
}

/* Types de cartes */
.card-types {
  background: var(--surface);
}

.card-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.card-type-card {
  background: var(--bg);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--outline);
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.card-type-card:hover {
  border-color: var(--outline-variant);
  transform: translateY(-2px);
}

.card-type-visual {
  margin-bottom: 16px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-type-visual img {
  max-width: 100%;
  height: auto;
  max-height: 270px;
  object-fit: contain;
}

.card-type-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary-light);
}

.card-type-card p {
  color: var(--on-surface-variant);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Packs */
.packs {
  padding: 56px 0;
}

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

.pack-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--outline);
  transition: border-color 0.2s, transform 0.2s;
}

.pack-card:hover {
  border-color: var(--outline-variant);
  transform: translateY(-2px);
}

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

.pack-tagline {
  color: var(--primary-light);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.pack-text {
  color: var(--on-surface-variant);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.55;
}

.pack-points {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pack-points li {
  color: var(--on-surface-variant);
  font-size: 0.9rem;
  padding: 6px 0 6px 24px;
  position: relative;
  line-height: 1.4;
}

.pack-points li::before {
  content: '•';
  color: var(--primary);
  position: absolute;
  left: 0;
}

/* Démo cartes */
.demo {
  background: linear-gradient(180deg, rgba(185, 28, 28, 0.06) 0%, transparent 50%);
}

.demo-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.demo-text {
  text-align: center;
}

.demo-card-wrapper {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.demo-card {
  position: relative;
  width: 100%;
  padding-top: 100%;
  border-radius: 24px;
  background-color: #f9fafb;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.demo-card-inner {
  position: absolute;
  inset: 16% 14%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.demo-card-content {
  padding: 0px 20px;
  color: #111827;
  font-size: 0.95rem;
  line-height: 1.55;
}

.demo-button {
  flex-shrink: 0;
}

.demo-cta {
  flex-shrink: 0;
}

/* Screenshots */
.screenshots {
  padding: 56px 0 72px;
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  align-items: flex-start;
  justify-items: center;
  max-width: 960px;
  margin: 0 auto;
}

.phone-frame {
  position: relative;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 9 / 19.5;
  border-radius: 34px;
  padding: 12px;
  background: radial-gradient(circle at 20% 0%, rgba(148, 163, 184, 0.35), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}

.phone-frame::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 15% 0%, rgba(248, 250, 252, 0.35), transparent 55%),
    radial-gradient(circle at 85% 100%, rgba(248, 113, 113, 0.25), transparent 55%);
  opacity: 0.55;
  mix-blend-mode: screen;
  pointer-events: none;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 18px;
  background: #020617;
  border-radius: 0 0 14px 14px;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #020617;
  padding: 10px 8px 12px;
  box-sizing: border-box;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 18px;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    inset: 100% 0 auto 0;
    padding: 16px 24px 20px;
    background: rgba(15, 15, 15, 0.98);
    border-bottom: 1px solid rgba(64, 64, 64, 0.9);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .header.menu-open .nav {
    display: flex;
  }

  .nav a {
    margin-left: 0;
    font-size: 0.95rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}