/* Store afup — feuille de style unique, sans framework ni police tierce (aucune requête externe). */
:root {
  --green: #0b8f1f;
  --green-dark: #076a16;
  --green-soft: #e8f6ea;
  --ink: #111511;
  --text: #1f2421;
  --muted: #5e6862;
  --line: #dde3df;
  --bg: #ffffff;
  --bg-alt: #f5f7f5;
  --card: #ffffff;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --info-soft: #eaf2fd;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 21, 17, .06), 0 6px 18px rgba(17, 21, 17, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --green: #3cc456; --green-dark: #2aa443; --green-soft: #12301a;
    --ink: #f2f5f2; --text: #dfe5e0; --muted: #9aa69e; --line: #2b322d;
    --bg: #0f1310; --bg-alt: #151a16; --card: #161c17;
    --danger-soft: #3a1714; --info-soft: #14243a;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--green-dark); }
@media (prefers-color-scheme: dark) { a { color: var(--green); } }
h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .5rem; }
h2 { font-size: 1.5rem; margin: 0 0 1rem; }
h3 { font-size: 1.1rem; margin: 0 0 .4rem; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.section { padding: 32px 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 10; background: var(--bg); padding: 8px 12px; }

/* En-tête */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.1rem; }
.brand img { height: 32px; width: auto; }
.main-nav { display: flex; gap: 16px; }
.main-nav a { color: var(--text); text-decoration: none; font-weight: 500; }
.main-nav a:hover { color: var(--green); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch a { text-decoration: none; color: var(--muted); font-size: .85rem; padding: 4px 6px; border-radius: 6px; }
.lang-switch a[aria-current] { color: var(--ink); background: var(--bg-alt); font-weight: 600; }
.currency-switch select { font: inherit; font-size: .85rem; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 10px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--brand, var(--green)); color: #fff; }
.btn-primary:hover { filter: brightness(.92); }
.btn-outline { border-color: var(--brand, var(--green)); color: var(--brand, var(--green-dark)); background: transparent; }
.btn-outline:hover { background: var(--green-soft); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-block { width: 100%; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* Accueil */
.hero { background: linear-gradient(160deg, var(--green-soft), var(--bg) 70%); padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.hero .lead { margin-bottom: 1.5rem; }

/* Grilles & cartes */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.product-card { display: flex; flex-direction: column; gap: 8px; border-top: 4px solid var(--brand); }
.product-card .btn { margin-top: auto; align-self: flex-start; }
.product-card-head { display: flex; gap: 12px; align-items: center; }
.product-card-head h3 a { color: var(--ink); text-decoration: none; }
.product-card-head .tag { margin-left: auto; }
.tagline { font-weight: 600; color: var(--ink); margin: 0; }
.app-icon { border-radius: 14px; flex: none; object-fit: cover; }
.app-icon-fallback { width: 56px; height: 56px; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; font-size: 1.5rem; }
.app-icon-lg { width: 96px; height: 96px; border-radius: 22px; }
.app-icon-lg.app-icon-fallback { font-size: 2.5rem; }

.platforms, .badges { list-style: none; padding: 0; margin: .5rem 0; display: flex; flex-wrap: wrap; gap: 6px; }
.platforms li { font-size: .8rem; padding: 2px 10px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); }
.badges li { font-size: .8rem; padding: 2px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-weight: 600; }
@media (prefers-color-scheme: dark) { .badges li { color: var(--green); } }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg-alt); color: var(--muted); vertical-align: middle; }
.tag-beta, .tag-trialing { background: var(--info-soft); color: #1d5fb4; }
.tag-coming_soon, .tag-past_due, .tag-grace { background: #fff4e0; color: #8a5300; }
.tag-active, .tag-reco { background: var(--green-soft); color: var(--green-dark); }
.tag-expired, .tag-cancelled, .tag-suspended { background: var(--danger-soft); color: var(--danger); }

/* Fiche produit */
.product-hero { background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 12%, var(--bg)), var(--bg) 75%); border-bottom: 1px solid var(--line); padding: 40px 0; }
.product-hero-inner { display: flex; gap: 24px; align-items: flex-start; }
.product-hero-text { flex: 1; min-width: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }
.stats-row { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 24px; }
.stat { flex: 1 1 160px; background: var(--bg-alt); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; }
.stat strong { font-size: 1.4rem; color: var(--ink); }
.stat span { color: var(--muted); font-size: .85rem; }
.gallery { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; }
.shot { margin: 0; flex: none; scroll-snap-align: start; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-alt); }
.shot-desktop { width: min(640px, 85vw); }
.shot-mobile { width: 220px; }
.prose > * { max-width: 75ch; }
.prose ul, .checks { padding-left: 1.2rem; }
.checks { list-style: none; padding: 0; }
.checks li { padding-left: 1.6rem; position: relative; margin: .3rem 0; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.plans { align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 6px; position: relative; }
.plan .btn { margin-top: auto; }
.plan-recommended { border: 2px solid var(--brand); }
.plan .tag-reco { position: absolute; top: -11px; left: 20px; }
.price { margin: .5rem 0; }
.price strong { font-size: 1.6rem; color: var(--ink); }
.trial { color: var(--green-dark); font-weight: 600; }
.changelog { list-style: none; padding: 0; border-left: 2px solid var(--line); }
.changelog > li { padding: 0 0 12px 18px; position: relative; }
.changelog > li::before { content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand, var(--green)); }
.faq { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); }

/* Formulaires */
.auth { display: flex; justify-content: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 440px; }
form label { display: block; margin-bottom: 14px; font-weight: 500; font-size: .95rem; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
.field-error { display: block; color: var(--danger); font-size: .85rem; margin-top: 4px; }
.flashes { padding-top: 16px; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 12px; }
.flash-success { background: var(--green-soft); color: var(--green-dark); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-info { background: var(--info-soft); }

/* Espace client */
.account-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.list { padding-left: 1.2rem; }

/* Erreurs */
.error-page { text-align: center; padding: 72px 16px; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--green); margin: 0; }

/* Pied de page */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); background: var(--bg-alt); padding: 32px 0; }
.footer-inner { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer img { height: 44px; width: auto; background: #fff; padding: 6px 10px; border-radius: 8px; }

@media (max-width: 640px) {
  .product-hero-inner { flex-direction: column; }
  .header-inner { padding-top: 8px; padding-bottom: 8px; }
  .header-tools { width: 100%; justify-content: flex-end; }
}
.preview-banner { background: #fff4e0; color: #8a5300; text-align: center; padding: 8px 16px; font-weight: 600; font-size: .9rem; border-bottom: 1px solid #f0d9a8; }

/* Commerce */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.checkout-grid > div { display: flex; flex-direction: column; gap: 16px; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; }
.summary dt { color: var(--text); }
.summary dd { margin: 0; text-align: right; white-space: nowrap; }
.summary .total { font-weight: 700; font-size: 1.15rem; color: var(--ink); border-top: 1px solid var(--line); padding-top: 10px; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.plan .plan-actions .btn { margin-top: 0; }
.operators { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.operators legend { font-weight: 500; margin-bottom: 6px; }
.op { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.op:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.waiting-card { text-align: center; }
.spinner { width: 40px; height: 40px; margin: 0 auto 12px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--green); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.paid-card { border-color: var(--green); background: var(--green-soft); }
.payments-list { list-style: none; padding: 0; margin: 0; }
.payments-list li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.auth-card.wide { max-width: 560px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.orders-list li { margin: 6px 0; }
@media (max-width: 760px) { .checkout-grid { grid-template-columns: 1fr; } .checkout-grid .summary { order: -1; } }
.summary h3 { margin: 18px 0 6px; }
