:root {
  --bg0: #e8eef2;
  --bg1: #f4f7f9;
  --surface: rgba(255, 255, 255, 0.92);
  --solid: #fff;
  --ink: #0b1c24;
  --text: #15262e;
  --muted: #5c727c;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --accent-soft: #d8f3ef;
  --border: rgba(15, 38, 46, 0.12);
  --danger: #c2314a;
  --ok: #0d8a5f;
  --radius: 16px;
  --font: "Figtree", sans-serif;
  --display: "Syne", sans-serif;
  --shadow: 0 12px 32px rgba(11, 28, 36, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  font-family: var(--font); color: var(--text);
  background: var(--bg0); font-size: 15px; line-height: 1.5;
}
body { position: relative; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.app-bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(20, 184, 166, 0.2), transparent 60%),
    radial-gradient(700px 420px at 90% 0%, rgba(15, 118, 110, 0.12), transparent 55%),
    linear-gradient(165deg, var(--bg1), var(--bg0));
}

.top {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.85rem 1.25rem;
  background: color-mix(in srgb, var(--ink) 94%, transparent);
  color: #eef7f5;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: inherit; font-family: var(--display);
  font-weight: 700; letter-spacing: -0.02em;
}
.brand-mark {
  width: 1.8rem; height: 1.8rem; border-radius: 8px;
  object-fit: cover; display: block; flex-shrink: 0;
}
.top-nav { display: flex; gap: 0.35rem; flex: 1; }
.top-nav a {
  color: #9db0b8; text-decoration: none; font-weight: 600;
  padding: 0.4rem 0.7rem; border-radius: 8px; font-size: 0.9rem;
}
.top-nav a:hover, .top-nav a.active { color: #99f6e4; background: rgba(45,212,191,0.12); }
.top-actions { display: flex; gap: 0.5rem; align-items: center; }
.user-label {
  font-size: 0.82rem; color: #99f6e4; background: rgba(45,212,191,0.12);
  border: 1px solid rgba(45,212,191,0.25); border-radius: 8px; padding: 0.25rem 0.6rem;
}

.page { max-width: 1100px; margin: 0 auto; padding: 2rem 1.1rem 3.5rem; }

.hero { text-align: center; margin-bottom: 2rem; animation: fade-up 0.45s var(--ease); }
.eyebrow {
  display: inline-block; margin: 0 0 0.6rem; color: var(--accent-dark);
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.hero h1 {
  margin: 0; font-family: var(--display); font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: -0.03em; line-height: 1.15;
}
.lead { max-width: 38rem; margin: 0.85rem auto 0; color: var(--muted); font-size: 1.05rem; }
.billing-hint { margin-top: 0.75rem; font-size: 0.85rem; }
.flash {
  margin: 1rem auto 0; max-width: 36rem; padding: 0.75rem 1rem; border-radius: 10px;
  font-weight: 600; font-size: 0.92rem;
}
.flash.ok { background: #dcfce7; color: var(--ok); }
.flash.err { background: #fff1f3; color: var(--danger); }
.flash.info { background: var(--accent-soft); color: var(--accent-dark); }

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.plan-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.35rem 1.25rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
  backdrop-filter: blur(8px); animation: fade-up 0.5s var(--ease) both;
  position: relative;
}
.plan-card.featured {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 118, 110, 0.16);
}
.plan-card.featured::before {
  content: "Populaire";
  position: absolute; top: -0.7rem; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 0.25rem 0.7rem; border-radius: 999px; letter-spacing: 0.04em; text-transform: uppercase;
}
.plan-card h2 {
  margin: 0; font-family: var(--display); font-size: 1.35rem; letter-spacing: -0.02em;
}
.plan-card .tagline { color: var(--muted); font-size: 0.9rem; margin: 0.35rem 0 1rem; min-height: 2.6em; }
.price-row { display: flex; align-items: baseline; gap: 0.3rem; margin-bottom: 1rem; }
.price {
  font-family: var(--display); font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em;
  color: var(--ink);
}
.period { color: var(--muted); font-size: 0.9rem; }
.features { list-style: none; margin: 0 0 1.1rem; padding: 0; flex: 1; }
.features li {
  padding: 0.4rem 0 0.4rem 1.35rem; position: relative; font-size: 0.92rem;
  border-bottom: 1px solid rgba(15, 38, 46, 0.06);
}
.features li::before {
  content: ""; position: absolute; left: 0; top: 0.7rem;
  width: 0.55rem; height: 0.55rem; border-radius: 2px;
  background: var(--accent);
}
.features li.no {
  color: var(--muted); opacity: 0.75;
}
.features li.no::before { background: #cbd5e1; }

.btn {
  border: none; border-radius: 10px; padding: 0.7rem 1rem; font: inherit;
  font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; transition: background 0.18s var(--ease);
}
.btn.accent { background: var(--accent); color: #fff; width: 100%; }
.btn.accent:hover { background: var(--accent-dark); }
.btn.outline {
  width: 100%; background: transparent; border: 1px solid var(--border); color: var(--text);
}
.btn.outline:hover { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.btn.ghost {
  background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #eef7f5;
  padding: 0.4rem 0.75rem; font-size: 0.88rem;
}
.btn.ghost:hover { background: rgba(255,255,255,0.08); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.current-badge {
  text-align: center; font-size: 0.82rem; font-weight: 700; color: var(--accent-dark);
  margin-bottom: 0.55rem;
}

.faq { margin-top: 2.5rem; max-width: 640px; }
.faq h2 {
  font-family: var(--display); letter-spacing: -0.02em; margin: 0 0 0.85rem;
}
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 0.85rem 1rem; margin-bottom: 0.55rem;
}
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.92rem; }

.site-footer {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}
.site-footer p { margin: 0; }

.modal {
  position: fixed; inset: 0; background: rgba(8, 18, 22, 0.5);
  display: flex; align-items: center; justify-content: center; z-index: 40; padding: 1rem;
  backdrop-filter: blur(4px);
}
.modal-card {
  background: var(--solid); border-radius: 16px; border: 1px solid var(--border);
  padding: 1.25rem; width: min(400px, 100%); box-shadow: var(--shadow);
}
.modal-card h3 { margin: 0 0 0.25rem; font-family: var(--display); }
.field { display: flex; flex-direction: column; gap: 0.25rem; margin: 0.65rem 0; }
.field span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; color: var(--muted); }
.field input {
  border: 1px solid var(--border); border-radius: 9px; padding: 0.5rem 0.6rem; font: inherit;
}
.auth-tabs { display: flex; gap: 0.35rem; margin: 0.75rem 0 0.35rem; }
.auth-tab {
  flex: 1; border: 1px solid var(--border); background: #f4f8f9; border-radius: 8px;
  padding: 0.45rem; font: inherit; font-weight: 600; cursor: pointer;
}
.auth-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0.85rem 0 0.35rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}
.btn-google:hover { background: #f4f8f9; }
.btn-google.disabled { opacity: 0.5; pointer-events: none; cursor: not-allowed; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.65rem 0 0.15rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.modal-actions { display: flex; gap: 0.45rem; margin-top: 0.75rem; }
.modal-actions .btn.accent { width: auto; flex: 1; }
.modal-actions .btn.ghost { color: var(--text); border-color: var(--border); }
.error {
  background: #fff1f3; color: var(--danger); border: 1px solid #f5c2cc;
  border-radius: 8px; padding: 0.5rem; font-size: 0.82rem; white-space: pre-wrap;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .plan-card.featured { transform: none; }
}

@media (max-width: 560px) {
  .top { padding: 0.7rem; }
  .top-nav { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
