/* MySubis — site de présentation. Palette alignée sur l'app (dark + light). */

/* ---- Thème sombre (défaut) ---- */
:root {
  --bg: #0b1310;
  --bg-2: #0e1a15;
  --surface: #141f1a;
  --surface-2: #1e2c25;
  --border: #26352e;
  --accent: #12c48a;
  --accent-2: #34d399;
  --gold: #eebb55;
  --text: #edf4ef;
  --muted: #8ba79a;
  --prose: #cdddd4;
  --shadow: rgba(0, 0, 0, 0.8);
  --nav-bg: rgba(11, 19, 16, 0.72);
  --radius: 20px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

/* ---- Thème clair ---- */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f4f8f5;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --surface-2: #eef4f0;
    --border: #dbe6e0;
    --accent: #0e9f6e;
    --accent-2: #0a8754;
    --gold: #a8780a;
    --text: #13201a;
    --muted: #5e7268;
    --prose: #2a3b33;
    --shadow: rgba(20, 40, 32, 0.18);
    --nav-bg: rgba(244, 248, 245, 0.78);
  }
}
:root[data-theme="light"] {
  --bg: #f4f8f5;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef4f0;
  --border: #dbe6e0;
  --accent: #0e9f6e;
  --accent-2: #0a8754;
  --gold: #a8780a;
  --text: #13201a;
  --muted: #5e7268;
  --prose: #2a3b33;
  --shadow: rgba(20, 40, 32, 0.18);
  --nav-bg: rgba(244, 248, 245, 0.78);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- Visibilité par langue (piloté par [data-lang] sur <html>) ---- */
[data-lang="fr"] .lang-en { display: none !important; }
[data-lang="en"] .lang-fr { display: none !important; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; }
.brand__mark { width: 32px; height: 32px; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { color: var(--muted); font-size: 0.95rem; transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__tools { display: flex; align-items: center; gap: 8px; }

/* Toggles thème + langue */
.toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; min-width: 38px; padding: 0 12px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: background 0.2s, transform 0.15s;
}
.toggle:hover { background: var(--surface-2); }
.toggle:active { transform: scale(0.94); }
.toggle svg { width: 18px; height: 18px; }
.toggle .sun { display: none; }
[data-theme="light"] .toggle .sun, :root:not([data-theme]) .toggle .sun { display: block; }
[data-theme="light"] .toggle .moon, :root:not([data-theme]) .toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .toggle .sun { display: none; }
  :root:not([data-theme]) .toggle .moon { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 14px; font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.15s, filter 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #04140d; }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 84px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 0 auto 0; height: 620px;
  background: radial-gradient(60% 60% at 50% 0%, rgba(18, 196, 138, 0.18), transparent 70%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: rgba(18, 196, 138, 0.1); border: 1px solid rgba(18, 196, 138, 0.28);
  color: var(--accent-2); font-size: 0.82rem; font-weight: 600; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.5rem); line-height: 1.08; letter-spacing: -0.02em; font-weight: 800; }
.hero h1 .grad { background: linear-gradient(120deg, var(--accent-2), var(--gold)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.lead { margin: 22px 0 30px; font-size: 1.18rem; color: var(--muted); max-width: 34ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__note { margin-top: 16px; font-size: 0.85rem; color: var(--muted); }

/* Phone mockup avec screenshot réel */
.phone { justify-self: center; width: 268px; border-radius: 44px; padding: 11px;
  background: linear-gradient(160deg, #223029, #0f1712); border: 1px solid var(--border);
  box-shadow: 0 40px 90px -30px var(--shadow); position: relative; }
.phone__screen { border-radius: 34px; overflow: hidden; display: block; background: #000; aspect-ratio: 1179 / 2556; }
.phone__screen img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head .eyebrow { color: var(--accent-2); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); letter-spacing: -0.02em; margin: 10px 0 12px; font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: transform 0.2s, border-color 0.2s; }
.feature:hover { transform: translateY(-4px); border-color: rgba(18, 196, 138, 0.4); }
.feature__icon { width: 46px; height: 46px; border-radius: 13px; background: rgba(18, 196, 138, 0.12); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 16px; }
.feature h3 { font-size: 1.12rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.96rem; }

/* Stats band */
.band { background: linear-gradient(180deg, var(--surface), var(--bg)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat b { display: block; font-size: 2rem; font-weight: 800; color: var(--accent-2); }
.stat span { color: var(--muted); font-size: 0.92rem; }

/* ---------- Comparatif Gratuit / Premium ---------- */
.compare { max-width: 760px; margin: 0 auto; border: 1px solid var(--border); border-radius: 24px; overflow: hidden; background: var(--surface); }
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.96rem; }
.compare thead th { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.compare thead th:nth-child(3) { color: var(--gold); }
.compare td:nth-child(2), .compare td:nth-child(3),
.compare th:nth-child(2), .compare th:nth-child(3) { text-align: center; width: 22%; }
.compare tbody td:first-child { color: var(--text); font-weight: 500; }
.compare tr:last-child td { border-bottom: none; }
.compare .yes { color: var(--accent-2); font-weight: 800; }
.compare .no { color: var(--muted); }
.compare .col-premium { background: rgba(238, 187, 85, 0.06); }
.compare .price-row td { font-weight: 700; }
.compare-cta { text-align: center; margin-top: 28px; }

/* Premium */
.premium-card { background: linear-gradient(150deg, rgba(238,187,85,0.12), var(--surface)); border: 1px solid rgba(238,187,85,0.3); border-radius: 26px; padding: 44px; text-align: center; }
.premium-card h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; }
.premium-card .price { font-size: 2.4rem; font-weight: 800; margin: 14px 0 6px; }
.premium-card .price span { font-size: 1rem; color: var(--muted); font-weight: 500; }

/* CTA final */
.cta { text-align: center; }
.cta h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; }
.cta p { color: var(--muted); margin: 14px 0 28px; font-size: 1.1rem; }
.cta-badge { display: flex; justify-content: center; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 44px 0; background: var(--bg); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.footer__links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer__links a { color: var(--muted); font-size: 0.92rem; transition: color 0.2s; }
.footer__links a:hover { color: var(--text); }
.footer__copy { color: var(--muted); font-size: 0.86rem; }

/* ---------- Legal pages (prose) ---------- */
.legal { padding: 56px 0 80px; }
.legal__wrap { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 34px; }
.legal h2 { font-size: 1.3rem; margin: 34px 0 12px; font-weight: 700; }
.legal p, .legal li { color: var(--prose); margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 12px; }
.legal a { color: var(--accent-2); text-decoration: underline; }
.legal .back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); margin-bottom: 28px; font-size: 0.92rem; }
.legal .box { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; margin: 18px 0; color: var(--prose); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-2); font-size: 1.4rem; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero p.lead { max-width: none; }
  .features { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav__links { display: none; }
}
@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .hero { padding: 56px 0; }
  .compare th, .compare td { padding: 13px 12px; font-size: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; transition: none; } }

/* =====================================================================
   POLISH — finitions pro
   ===================================================================== */

/* Accessibilité focus */
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

/* Nav : ombre au scroll */
.nav { transition: box-shadow 0.3s, background 0.3s; }
.nav.scrolled { box-shadow: 0 8px 30px -12px var(--shadow); }

/* Hero : grille de points subtile en fond */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(currentColor 1px, transparent 1px);
  background-size: 34px 34px; color: var(--border); opacity: 0.4;
  -webkit-mask-image: radial-gradient(70% 55% at 50% 0%, #000, transparent 75%);
  mask-image: radial-gradient(70% 55% at 50% 0%, #000, transparent 75%);
}

/* Ligne de confiance (étoiles) */
.trust { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.trust .stars { color: var(--gold); letter-spacing: 2px; font-size: 1rem; }
.trust span { color: var(--muted); font-size: 0.9rem; }

/* Badge App Store */
.appstore {
  display: inline-flex; align-items: center; gap: 11px; padding: 11px 20px 11px 16px;
  background: #000; color: #fff; border-radius: 14px; border: 1px solid rgba(255,255,255,0.14);
  transition: transform 0.15s, filter 0.2s;
}
.appstore:hover { filter: brightness(1.15); }
.appstore:active { transform: scale(0.97); }
.appstore svg { width: 26px; height: 26px; flex-shrink: 0; }
.appstore .as-txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.appstore .as-txt small { font-size: 0.66rem; opacity: 0.85; letter-spacing: 0.02em; }
.appstore .as-txt b { font-size: 1.12rem; font-weight: 600; letter-spacing: 0.01em; }
[data-theme="light"] .appstore { border-color: rgba(0,0,0,0.1); }

/* Halo sous le mockup */
.phone { z-index: 1; }
.phone::before {
  content: ""; position: absolute; inset: -14% -10% -8%; z-index: -1;
  background: radial-gradient(50% 50% at 50% 45%, rgba(18,196,138,0.34), transparent 70%);
  filter: blur(30px); opacity: 0.7;
}

/* Feature : liseré dégradé au survol */
.feature { position: relative; overflow: hidden; }
.feature::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s;
}
.feature:hover::before { transform: scaleX(1); }

/* Section « Comment ça marche » */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 26px 26px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 16px;
  border-radius: 12px; font-weight: 800; font-size: 1.1rem; color: #04140d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.96rem; }
.step__line { position: absolute; top: 51px; right: -14px; width: 28px; height: 2px; background: var(--border); }
.step:last-child .step__line { display: none; }

/* Reveal au scroll (scopé .js pour rester visible si JS est absent) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1 !important; transform: none !important; } }

/* Cartes premium/compare : ombres plus douces */
.compare, .premium-card { box-shadow: 0 24px 60px -34px var(--shadow); }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .step__line { display: none; }
}
