/**
 * Astrologie Pro 2026 — App CSS
 * Palette : #6D28D9 (violet mystique)
 * Clone du pattern Auto Pro avec adaptations astrologie
 */

/* ── Dark mode neutralisé ────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) and (max-width: 0px) {
  body { background: #000; }
}

/* ── Variables ────────────────────────────────────────────────────────────────── */
:root {
  --astro-primary: #6D28D9;
  --astro-primary-dark: #5B21B6;
  --astro-primary-soft: #EDE9FE;
  --astro-primary-lighter: #F5F3FF;
  --astro-bg: #F7F8FA;
  --astro-text: #101828;
  --astro-text-secondary: #475467;
  --astro-text-muted: #98A2B3;
  --astro-border: #E4E7EC;
  --astro-success: #059669;
  --astro-danger: #DC2626;
  --astro-warning: #D97706;
  --astro-nav-height: 64px;
  --astro-header-height: 56px;
}

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

body.app-astrologie {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--astro-bg);
  color: var(--astro-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: var(--astro-header-height);
  padding-bottom: calc(var(--astro-nav-height) + 16px);
}

/* ── Header ───────────────────────────────────────────────────────────────────── */
.astro-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--astro-header-height);
  background: var(--astro-primary);
  color: #fff;
  display: flex; align-items: center; padding: 0 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.astro-header-back { background: none; border: none; color: #fff; cursor: pointer; padding: 8px; margin-right: 4px; border-radius: 8px; }
.astro-header-back:hover { background: rgba(255,255,255,0.15); }
.astro-header-logo { display: flex; align-items: center; gap: 8px; }
.astro-logo-icon { font-size: 1.4rem; }
.astro-logo-text { font-weight: 700; font-size: 1.05rem; }
.astro-header-title { font-size: 1rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none !important; }

/* ── Bottom nav ───────────────────────────────────────────────────────────────── */
.astro-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--astro-nav-height);
  background: #fff;
  border-top: 1px solid var(--astro-border);
  display: flex; justify-content: space-around; align-items: center;
  padding: 4px 0 env(safe-area-inset-bottom, 0);
}
.astro-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; cursor: pointer;
  color: var(--astro-text-muted); font-size: 0.65rem; font-weight: 500;
  padding: 6px 12px; border-radius: 8px; transition: color 0.2s;
  min-width: 56px;
}
.astro-nav-item.active { color: var(--astro-primary); }
.astro-nav-item:hover { color: var(--astro-primary-dark); }
.astro-nav-item svg { stroke: currentColor; }

/* ── Screens ──────────────────────────────────────────────────────────────────── */
.astro-main { min-height: 100vh; }
.astro-screen { display: none; animation: astroFadeIn 0.25s ease-out; }
.astro-screen.active { display: block; }
.astro-screen-inner { padding: 16px; max-width: 640px; margin: 0 auto; }
@keyframes astroFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Hero ──────────────────────────────────────────────────────────────────────── */
.astro-hero {
  background: linear-gradient(135deg, var(--astro-primary), var(--astro-primary-dark));
  color: #fff; text-align: center; padding: 2.5rem 1.5rem 2rem;
  border-radius: 16px; margin-bottom: 1rem;
}
.astro-hero-emoji { font-size: 2.5rem; margin-bottom: 0.5rem; }
.astro-hero-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.25rem; }
.astro-hero-sub { font-size: 0.85rem; opacity: 0.9; }

/* ── Result hero (WOW moment) ─────────────────────────────────────────────────── */
.astro-result-hero {
  background: linear-gradient(135deg, var(--astro-primary-soft), #DDD6FE);
  border: 2px solid var(--astro-primary);
  border-radius: 16px; text-align: center; padding: 2rem 1.5rem; margin-bottom: 1rem;
}
.astro-result-hero--small { padding: 1.5rem 1rem; margin-bottom: 1rem; }
.astro-result-label { font-size: 0.8rem; font-weight: 600; color: var(--astro-primary-dark); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.astro-result-value { font-size: 2rem; font-weight: 900; color: var(--astro-primary-dark); }
.astro-result-value--big { font-size: 3rem; }
.astro-result-titre { font-size: 1.1rem; font-weight: 700; color: var(--astro-primary); margin-top: 0.25rem; }
.astro-diff-badge {
  display: inline-block; margin-top: 0.75rem;
  background: var(--astro-primary); color: #fff;
  padding: 6px 16px; border-radius: 100px;
  font-size: 0.78rem; font-weight: 700;
}
.astro-revelation {
  margin-top: 1rem; font-size: 0.92rem; color: var(--astro-text);
  line-height: 1.5; max-width: 440px; margin-left: auto; margin-right: auto;
}

/* ── Zodiac wheel ──────────────────────────────────────────────────────────────── */
.astro-zodiac-wheel {
  display: flex; justify-content: center; gap: 4px; flex-wrap: wrap;
  margin-bottom: 0.75rem; opacity: 0.6;
}
.astro-zodiac-glyph { font-size: 1.1rem; }

/* ── Hero badge ───────────────────────────────────────────────────────────────── */
.astro-hero-badge {
  display: inline-block; margin-top: 0.75rem;
  background: rgba(255,255,255,0.2); backdrop-filter: blur(4px);
  padding: 6px 16px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
}

/* ── Cards ─────────────────────────────────────────────────────────────────────── */
.astro-grid-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  margin-top: 1rem;
}
.astro-grid-cards--secondary { margin-top: 12px; }
.astro-card-link {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 1.25rem 0.75rem 1rem; border: none; cursor: pointer;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
  overflow: hidden;
}
.astro-card-link:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(109,40,217,0.18); }
.astro-card-link:active { transform: scale(0.97); }
.astro-card-emoji { font-size: 2rem; margin-bottom: 4px; }
.astro-card-label { font-size: 0.85rem; font-weight: 700; color: var(--astro-text); }
.astro-card-sub { font-size: 0.68rem; color: var(--astro-text-muted); margin-top: 2px; }
.astro-card-lock {
  position: absolute; top: 8px; right: 8px;
  background: var(--astro-primary); color: #fff;
  font-size: 0.6rem; font-weight: 800;
  padding: 2px 8px; border-radius: 4px;
  letter-spacing: 0.05em;
}

/* Card color variants */
.astro-card--purple { background: linear-gradient(145deg, #F5F3FF, #EDE9FE); }
.astro-card--indigo { background: linear-gradient(145deg, #EEF2FF, #E0E7FF); }
.astro-card--pink   { background: linear-gradient(145deg, #FDF2F8, #FCE7F3); }
.astro-card--amber  { background: linear-gradient(145deg, #FFFBEB, #FEF3C7); }
.astro-card--blue   { background: linear-gradient(145deg, #EFF6FF, #DBEAFE); }
.astro-card--teal   { background: linear-gradient(145deg, #F0FDFA, #CCFBF1); }
.astro-card--green  { background: linear-gradient(145deg, #F0FDF4, #DCFCE7); }
.astro-card--rose   { background: linear-gradient(145deg, #FFF1F2, #FFE4E6); }

.astro-resume-card { margin-bottom: 1rem; }
.astro-resume-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--astro-primary-dark); display: flex; align-items: center; gap: 6px; }
.astro-resume-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 1rem; }
.astro-resume-item { display: flex; flex-direction: column; }
.astro-resume-label { font-size: 0.7rem; color: var(--astro-text-muted); text-transform: uppercase; }
.astro-resume-value { font-size: 0.9rem; font-weight: 700; }

/* ── Form ──────────────────────────────────────────────────────────────────────── */
.astro-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 1rem 0; }
.astro-form-group { display: flex; flex-direction: column; gap: 4px; }
.astro-form-group label { font-size: 0.82rem; font-weight: 600; }
.astro-form-group small { font-size: 0.72rem; color: var(--astro-text-muted); }

/* ── Positions natales ────────────────────────────────────────────────────────── */
.astro-positions { display: flex; flex-direction: column; gap: 0; }
.astro-pos-row {
  display: grid; grid-template-columns: 100px 1fr 1fr; gap: 8px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--astro-border);
}
.astro-pos-row:last-child { border-bottom: none; }
.astro-pos-label { font-size: 0.82rem; color: var(--astro-text-secondary); }
.astro-pos-value { font-size: 0.92rem; font-weight: 700; }
.astro-pos-detail { font-size: 0.75rem; color: var(--astro-text-muted); }

/* ── Tags ──────────────────────────────────────────────────────────────────────── */
.astro-tags { margin-top: 1rem; }
.astro-tag {
  display: inline-block; padding: 4px 12px; border-radius: 100px;
  font-size: 0.78rem; font-weight: 600; margin: 4px 4px 4px 0;
}
.astro-tag--green { background: #DCFCE7; color: #166534; }
.astro-tag--red { background: #FEE2E2; color: #991B1B; }
.astro-tag--yellow { background: #FEF3C7; color: #92400E; }
.astro-element-badge {
  display: inline-block; padding: 6px 16px; border-radius: 8px;
  background: var(--astro-primary-lighter); color: var(--astro-primary-dark);
  font-size: 0.85rem; font-weight: 600;
}

/* ── Share ──────────────────────────────────────────────────────────────────────── */
.astro-share { display: flex; gap: 8px; justify-content: center; margin: 1rem 0; }

/* ── Premium teaser ───────────────────────────────────────────────────────────── */
.astro-premium-teaser {
  background: var(--astro-primary-lighter);
  border: 2px solid var(--astro-primary);
  border-radius: 12px; padding: 1.25rem; margin-top: 1rem;
  text-align: center;
}
.astro-premium-teaser p { font-size: 0.88rem; margin-bottom: 0.75rem; }

/* ── Compat ───────────────────────────────────────────────────────────────────── */
.astro-compat-score { margin-bottom: 1rem; }
.astro-compat-stars { font-size: 1.8rem; color: var(--astro-primary); letter-spacing: 4px; }
.astro-compat-pair { font-size: 1rem; font-weight: 700; }

/* ── Transits ─────────────────────────────────────────────────────────────────── */
.astro-transit-card { margin-bottom: 0.75rem; }
.astro-transit-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.astro-transit-planete { font-weight: 700; font-size: 0.95rem; }
.astro-transit-aspect { font-size: 0.85rem; color: var(--astro-primary); font-weight: 600; }
.astro-transit-dates { font-size: 0.78rem; color: var(--astro-text-muted); margin-bottom: 0.5rem; }
.astro-transit-interp { font-size: 0.88rem; line-height: 1.5; }
.astro-sub { font-size: 0.85rem; color: var(--astro-text-secondary); margin-bottom: 1rem; }

/* ── Prévisions mois ──────────────────────────────────────────────────────────── */
.astro-mois-grid { display: flex; flex-direction: column; gap: 8px; }
.astro-mois-card { padding: 1rem !important; }
.astro-mois-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.astro-mois-nom { font-weight: 700; font-size: 0.92rem; text-transform: capitalize; }
.astro-mois-transits { display: flex; flex-wrap: wrap; gap: 4px; }
.astro-mini-transit { font-size: 0.72rem; padding: 2px 8px; border-radius: 4px; background: var(--astro-primary-lighter); color: var(--astro-primary-dark); }

/* ── Carte du ciel — maisons ──────────────────────────────────────────────────── */
.astro-maisons-grid { display: flex; flex-direction: column; gap: 0; }
.astro-maison-row {
  display: grid; grid-template-columns: 36px 120px 1fr; gap: 8px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--astro-border);
}
.astro-maison-row:last-child { border-bottom: none; }
.astro-maison-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--astro-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
}
.astro-maison-signe { font-weight: 600; font-size: 0.88rem; }
.astro-maison-domaine { font-size: 0.78rem; color: var(--astro-text-secondary); }

/* ── Synastrie ────────────────────────────────────────────────────────────────── */
.astro-synastrie-row {
  display: grid; grid-template-columns: 1fr 80px 1fr; gap: 8px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--astro-border); font-size: 0.85rem;
}
.astro-syn-planetes { font-weight: 600; }
.astro-syn-domaine { color: var(--astro-primary); font-weight: 600; text-align: center; }
.astro-syn-effet { color: var(--astro-text-secondary); }

/* ── Paywall ──────────────────────────────────────────────────────────────────── */
.astro-paywall-card { max-width: 560px; margin: 0 auto; }
.astro-lock-icon { color: var(--astro-primary); margin-bottom: 0.5rem; }
.astro-paywall-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 0.5rem; }
.astro-paywall-hook { font-size: 0.92rem; color: var(--astro-text-secondary); margin-bottom: 1.25rem; line-height: 1.5; }

.astro-paywall-preview { margin: 1.25rem 0; text-align: left; }
.astro-preview-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--astro-border); font-size: 0.85rem; }

.astro-compare { margin: 1.5rem 0; text-align: left; }
.astro-compare-header { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.astro-compare-col-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; padding: 8px; border-radius: 6px; text-align: center; }
.astro-compare-col-title--free { background: #F3F4F6; color: var(--astro-text-secondary); }
.astro-compare-col-title--premium { background: var(--astro-primary); color: #fff; }
.astro-compare-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
.astro-compare-cell { font-size: 0.82rem; padding: 8px; border-radius: 6px; background: #F9FAFB; display: flex; align-items: flex-start; gap: 6px; }
.astro-compare-cell--premium { background: var(--astro-primary-lighter); }

.astro-paywall-benefits-v2 { margin: 1.5rem 0; text-align: left; }
.astro-benefit-v2 { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--astro-border); }
.astro-benefit-v2:last-child { border-bottom: none; }
.astro-benefit-v2-icon { color: var(--astro-primary); flex-shrink: 0; margin-top: 2px; }
.astro-benefit-v2-title { font-size: 0.88rem; font-weight: 700; margin-bottom: 2px; }
.astro-benefit-v2-desc { font-size: 0.82rem; color: var(--astro-text-secondary); line-height: 1.4; }

.astro-mockup-preview {
  margin: 1.5rem 0; padding: 1rem; border: 2px dashed var(--astro-border);
  border-radius: 12px; text-align: center;
}
.astro-mockup-title { font-size: 0.78rem; font-weight: 700; color: var(--astro-primary); margin-bottom: 0.75rem; text-transform: uppercase; }
.astro-mockup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.astro-mockup-cell { background: var(--astro-primary-lighter); padding: 8px; border-radius: 6px; font-size: 0.75rem; }
.astro-mockup-caption { font-size: 0.72rem; color: var(--astro-text-muted); margin-top: 0.75rem; }

.astro-economie-block {
  margin: 1.5rem 0; padding: 1.25rem; border-radius: 12px;
  background: linear-gradient(135deg, #FFF7ED, #FFEDD5); border: 2px solid #F97316;
  text-align: left;
}
.astro-economie-title { font-size: 0.85rem; font-weight: 700; color: #9A3412; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 6px; }
.astro-economie-compare { display: flex; flex-direction: column; gap: 6px; }
.astro-eco-item { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.85rem; }
.astro-eco-label { color: var(--astro-text-secondary); }
.astro-eco-price { font-weight: 700; }
.astro-eco-item--highlight { background: var(--astro-primary); color: #fff; padding: 8px 12px; border-radius: 8px; margin-top: 4px; }
.astro-eco-item--highlight .astro-eco-label { color: rgba(255,255,255,0.9); }
.astro-eco-item--highlight .astro-eco-price { color: #fff; }

.astro-how-it-works { margin: 1.5rem 0; text-align: left; }
.astro-how-it-works-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.75rem; }
.astro-how-step { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; font-size: 0.85rem; }
.astro-how-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--astro-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
}

.astro-social-proof { margin: 1.5rem 0; text-align: left; }
.astro-social-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 0.82rem; color: var(--astro-success); }

.astro-license-form { margin-top: 1.5rem; text-align: left; }
.astro-license-form label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; }
.astro-license-msg { font-size: 0.82rem; margin-top: 6px; padding: 8px; border-radius: 6px; }
.astro-license-msg.error { background: #FEE2E2; color: #991B1B; }
.astro-license-msg.success { background: #DCFCE7; color: #166534; }

.astro-checkout-btn { white-space: normal; }
.astro-payhip-pending { padding: 1rem; background: #F3F4F6; border-radius: 8px; color: var(--astro-text-muted); }
.astro-payhip-pending-sub { font-size: 0.78rem; margin-top: 4px; }

.astro-premium-status { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 8px; background: #F3F4F6; font-size: 0.88rem; font-weight: 600; margin-bottom: 1rem; }
.astro-premium-status--active { background: #DCFCE7; color: #166534; }

/* ── Install banner ───────────────────────────────────────────────────────────── */
.astro-install-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 12px; margin-bottom: 1rem;
  background: #fff; border: 1px solid var(--astro-border); cursor: pointer;
}
.astro-install-icon { color: var(--astro-primary); flex-shrink: 0; }
.astro-install-title { font-size: 0.88rem; font-weight: 700; }
.astro-install-desc { font-size: 0.78rem; color: var(--astro-text-muted); }

/* ── Drawer ───────────────────────────────────────────────────────────────────── */
.astro-drawer-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.astro-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.astro-drawer {
  position: fixed; top: 0; right: -280px; bottom: 0; z-index: 201;
  width: 280px; background: #fff; transition: right 0.3s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}
.astro-drawer.open { right: 0; }
.astro-drawer-header {
  display: flex; align-items: center; gap: 8px; padding: 16px;
  border-bottom: 1px solid var(--astro-border); font-weight: 700;
}
.astro-drawer-close { margin-left: auto; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--astro-text-muted); }
.astro-drawer-nav { padding: 8px 0; }
.astro-drawer-link { display: block; padding: 12px 16px; color: var(--astro-text); text-decoration: none; font-size: 0.92rem; }
.astro-drawer-link:hover { background: var(--astro-primary-lighter); color: var(--astro-primary); }

/* ── Responsive ≥640px (MUST BE AT END) ───────────────────────────────────────── */
@media (min-width: 640px) {
  .astro-screen-inner { padding: 24px; }
  .astro-form-grid { grid-template-columns: 1fr 1fr; }
  .astro-grid-cards { grid-template-columns: repeat(3, 1fr); }
  .astro-grid-cards--secondary { grid-template-columns: repeat(2, 1fr); max-width: 420px; margin-left: auto; margin-right: auto; }
  .astro-hero { padding: 3rem 2rem; }
  .astro-result-hero { padding: 2.5rem 2rem; }
  .astro-compare-cell { font-size: 0.85rem; }
  .astro-card-emoji { font-size: 2.2rem; }
  .astro-zodiac-glyph { font-size: 1.3rem; }
}
