/* Mon Petit Logiciel — design system v2
   Premium dark-on-cream studio aesthetic with motion + depth.
   Inter from Google Fonts (loaded in each <head>).
*/

:root {
  --bg: #faf9f6;
  --bg-tint: #f4f2ed;
  --surface: #ffffff;
  --ink: #0a0e0c;
  --ink-soft: #2d3531;
  --ink-muted: #6b736f;
  --line: #e8eae5;
  --line-strong: #cfd3cd;
  --accent: #1f4d3a;
  --accent-2: #2d6e54;
  --accent-soft: #e8f0eb;
  --sage: #a8ff8c;
  --sage-glow: rgba(168, 255, 140, 0.35);
  --danger: #c44545;
  --max: 1200px;
  --max-narrow: 740px;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(10, 14, 12, 0.04), 0 2px 8px rgba(10, 14, 12, 0.04);
  --shadow-md: 0 4px 12px rgba(10, 14, 12, 0.06), 0 12px 32px rgba(10, 14, 12, 0.05);
  --shadow-lg: 0 12px 32px rgba(10, 14, 12, 0.10), 0 32px 80px rgba(10, 14, 12, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--accent); color: #fff; }

/* ─── nav ────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 249, 246, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(250, 249, 246, 0.92);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sage);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0;
  box-shadow: 0 2px 6px rgba(31, 77, 58, 0.25);
}
.brand .accent { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink) !important;
  color: #fff !important;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 500;
  transition: background 0.2s var(--ease), transform 0.1s ease;
}
.nav-cta:hover { background: var(--accent) !important; transform: translateY(-1px); }
.nav-cta:active { transform: translateY(0); }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  font-size: 14px;
}
@media (max-width: 760px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 14px 16px;
    border-radius: 10px;
  }
  .nav-links a:hover { background: var(--bg-tint); }
  .nav-toggle { display: inline-flex; }
}

/* ─── layout ─────────────────────────────────────── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--max-narrow); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-tight { padding: 56px 0; }

/* ─── typography ─────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.028em;
  line-height: 1.05;
  margin: 0 0 16px;
  color: var(--ink);
  font-weight: 700;
}
h1 { font-size: clamp(40px, 6vw, 76px); letter-spacing: -0.04em; }
h2 { font-size: clamp(30px, 4vw, 48px); margin-top: 56px; }
h3 { font-size: 22px; font-weight: 600; margin-top: 32px; letter-spacing: -0.02em; }
h4 { font-size: 17px; font-weight: 600; margin-top: 24px; }
p { margin: 0 0 16px; color: var(--ink-soft); }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--ink-soft); }
.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 20px;
  padding: 6px 12px;
  background: var(--accent-soft);
  border-radius: 999px;
}
strong { color: var(--ink); font-weight: 600; }
a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 0.15s ease, border-color 0.15s ease;
}
a:hover { color: var(--accent-2); }
ul { padding-left: 22px; margin: 0 0 16px; color: var(--ink-soft); }
li { margin-bottom: 8px; }
hr { border: none; border-top: 1px solid var(--line); margin: 56px 0; }
code, kbd {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 0.88em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ─── hero (cream variant for /) ─────────────────── */
.hero {
  position: relative;
  padding: 120px 0 96px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% 0 -10%;
  background:
    radial-gradient(60% 40% at 20% 10%, rgba(168, 255, 140, 0.18), transparent 60%),
    radial-gradient(50% 40% at 80% 30%, rgba(31, 77, 58, 0.10), transparent 65%),
    radial-gradient(40% 30% at 50% 80%, rgba(45, 110, 84, 0.08), transparent 60%);
  filter: blur(40px);
  z-index: -1;
  animation: floatBg 18s ease-in-out infinite alternate;
}
@keyframes floatBg {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, -2%, 0) scale(1.05); }
}
.hero h1 { max-width: 900px; }
.hero .lead { max-width: 640px; margin-top: 28px; }
.hero-cta { margin-top: 40px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ─── buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.2s ease;
  border-bottom: none !important;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: #fff !important;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.btn-ghost {
  color: var(--ink) !important;
  border: 1px solid var(--line-strong) !important;
  background: transparent;
}
.btn-ghost:hover { background: var(--surface); border-color: var(--ink) !important; transform: translateY(-2px); }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ─── feature grid + cards ───────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, #fff 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 18px;
  transition: transform 0.3s var(--ease);
}
.card:hover .icon { transform: rotate(-5deg) scale(1.06); }

/* card variant: tinted */
.card-tinted {
  background: linear-gradient(160deg, var(--accent-soft) 0%, var(--surface) 60%);
  border-color: transparent;
}

/* ─── pricing ────────────────────────────────────── */
.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 40px;
  align-items: stretch;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.price-card.featured {
  border-color: var(--ink);
  border-width: 2px;
  background: linear-gradient(180deg, #fff 0%, var(--accent-soft) 200%);
  box-shadow: var(--shadow-md);
}
.price-card .badge {
  position: absolute; top: -12px; left: 24px;
  background: var(--ink); color: #fff;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.price-card h3 { margin: 0 0 4px; font-size: 15px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.price-card .price {
  font-size: 44px; font-weight: 700;
  letter-spacing: -0.04em; color: var(--ink);
  margin: 16px 0 4px;
  line-height: 1;
}
.price-card .per { color: var(--ink-muted); font-size: 14px; }
.price-card .equiv { color: var(--ink); font-size: 13px; margin-top: 8px; font-weight: 500; }
.price-card ul { margin-top: 24px; flex: 1; padding-left: 0; list-style: none; }
.price-card ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 14px;
}
.price-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.price-card .legal {
  font-size: 11px; color: var(--ink-muted);
  margin-top: 22px; line-height: 1.45;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ─── footer ─────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 40px;
  margin-top: 96px;
  color: var(--ink-muted);
  font-size: 13px;
  background: var(--bg-tint);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer h4 {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-soft); margin: 0 0 14px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: none;
  transition: color 0.15s ease;
}
.footer a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

/* ─── policy / long-form ─────────────────────────── */
.policy { padding: 64px 0 96px; }
.policy h1 { font-size: clamp(32px, 4.5vw, 48px); }
.policy .meta {
  font-size: 13px; color: var(--ink-muted);
  margin-bottom: 36px;
  padding: 16px 20px;
  background: var(--bg-tint);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
}
.policy table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0 24px;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.policy th, .policy td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.policy tr:last-child td { border-bottom: none; }
.policy th { font-weight: 600; color: var(--ink); background: var(--accent-soft); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ─── product hero (dark for /caloriesia) ────────── */
.product-hero {
  position: relative;
  background: #0a0e0c;
  color: #fafaf8;
  padding: 140px 0 120px;
  overflow: hidden;
}
.product-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 35% at 80% 0%, rgba(168, 255, 140, 0.22), transparent 60%),
    radial-gradient(45% 35% at 0% 60%, rgba(31, 77, 58, 0.45), transparent 65%),
    radial-gradient(40% 35% at 50% 100%, rgba(168, 255, 140, 0.12), transparent 60%);
  filter: blur(20px);
  z-index: 0;
  animation: floatBg 22s ease-in-out infinite alternate;
}
.product-hero > * { position: relative; z-index: 1; }
.product-hero h1 { color: #fafaf8; }
.product-hero p { color: rgba(250, 250, 248, 0.78); }
.product-hero .eyebrow {
  background: rgba(168, 255, 140, 0.12);
  color: var(--sage);
  border: 1px solid rgba(168, 255, 140, 0.25);
}
.product-hero .btn-primary {
  background: var(--sage); color: #0a0e0c !important;
  box-shadow: 0 4px 24px var(--sage-glow);
}
.product-hero .btn-primary:hover { background: #c0ffaa; box-shadow: 0 6px 32px var(--sage-glow); }
.product-hero .btn-ghost {
  border-color: rgba(250, 250, 248, 0.25) !important;
  color: #fafaf8 !important;
}
.product-hero .btn-ghost:hover { background: rgba(250, 250, 248, 0.06); border-color: var(--sage) !important; }

.hero-flex {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 920px) {
  .hero-flex { grid-template-columns: 1fr; }
  .hero-flex .device-col { display: none; }
}

/* ─── iPhone device frame (SVG) ──────────────────── */
.device {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 320 / 660;
  background: linear-gradient(180deg, #1a1f1c 0%, #0a0e0c 100%);
  border-radius: 44px;
  padding: 14px;
  box-shadow:
    0 0 0 2px rgba(168, 255, 140, 0.15),
    0 30px 80px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: floatDevice 8s ease-in-out infinite;
}
@keyframes floatDevice {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-12px) rotate(-2deg); }
}
.device-screen {
  position: relative;
  width: 100%; height: 100%;
  background: #0a0e0c;
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.device-notch {
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 22px;
  background: #0a0e0c;
  border-radius: 14px;
  z-index: 5;
}
.device-content {
  padding: 44px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.device-eyebrow {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(168, 255, 140, 0.7);
  text-transform: uppercase;
}
.device-greet {
  font-size: 26px;
  font-weight: 700;
  color: #fafaf8;
  letter-spacing: -0.025em;
  margin-top: 6px;
  line-height: 1;
}
.device-ring {
  margin: 24px auto 6px;
  width: 140px; height: 140px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    conic-gradient(var(--sage) 0% 64%, rgba(255, 255, 255, 0.06) 64% 100%);
  position: relative;
}
.device-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #0a0e0c;
}
.device-ring-inner {
  position: relative; z-index: 1;
  text-align: center;
  color: #fafaf8;
}
.device-ring-inner .num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.device-ring-inner .lbl {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.5);
  margin-top: 2px;
}
.device-macros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 14px;
}
.device-macro {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
}
.device-macro .v { font-size: 13px; font-weight: 600; color: #fafaf8; }
.device-macro .l { font-size: 8px; color: rgba(250, 250, 248, 0.5); margin-top: 1px; letter-spacing: 0.1em; text-transform: uppercase; }
.device-cta {
  margin-top: auto;
  background: var(--sage);
  color: #0a0e0c;
  border-radius: 999px;
  text-align: center;
  padding: 11px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ─── motion: fade-in on scroll ──────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .device, .hero::before, .product-hero::before { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ─── lang switch ────────────────────────────────── */
.lang-switch {
  font-size: 12px;
  color: var(--ink-muted);
}
.lang-switch a { color: var(--ink-muted); margin-left: 8px; border-bottom: none; }
.lang-switch a.active { color: var(--ink); font-weight: 600; }

/* ─── inline number callouts ─────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-top: 48px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.stat .n { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.stat .l { font-size: 13px; color: var(--ink-muted); margin-top: 6px; }
