feat(credits): solde IA unique (option M), packs Stripe et polish billing

Un pot de crédits global (BASIC 100 / PRO 1 000 / BUSINESS 4 000) remplace
les seaux par fonction côté débit. Packs one-shot S/M/L, admin sans seaux
legacy, usage multi-features, hints de coût, anti-flash thème et hydratation
admin. Inclut aussi le pipeline slides renforcé et la page publique polishée.
This commit is contained in:
Antigravity
2026-07-16 20:43:18 +00:00
parent 704fed1191
commit 556a0b2f3f
77 changed files with 35745 additions and 10430 deletions

View File

@@ -16,18 +16,18 @@ export function getThemeScript(serverTheme: string = 'light', serverAccentColor:
var allowed = { light:1, dark:1, auto:1, sepia:1, midnight:1, rose:1, green:1, lavender:1, sand:1, ocean:1, sunset:1, blue:1 };
var theme = allowed[raw] ? raw : 'light';
var root = document.documentElement;
root.classList.remove('dark');
root.removeAttribute('data-theme');
if (theme === 'auto') {
if (window.matchMedia('(prefers-color-scheme: dark)').matches) root.classList.add('dark');
} else if (theme === 'dark') {
root.classList.add('dark');
} else if (theme === 'light') {
/* :root papier */
} else {
try {
document.cookie = 'memento-theme=' + encodeURIComponent(theme) + '; path=/; max-age=31536000; SameSite=Lax';
if (!stored) localStorage.setItem('theme-preference', theme);
} catch (e) {}
var wantsDark = theme === 'dark' || theme === 'midnight' || (theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches);
if (wantsDark) root.classList.add('dark');
else root.classList.remove('dark');
if (theme === 'auto' || theme === 'dark' || theme === 'light') root.removeAttribute('data-theme');
else {
root.setAttribute('data-theme', theme);
if (theme === 'midnight') root.classList.add('dark');
}
root.setAttribute('data-applied-theme', theme);
var accentStored = localStorage.getItem('accent-color');
var effectiveAccent = accentStored || ${JSON.stringify(defaultAccent)};
root.style.setProperty('--color-brand-accent', effectiveAccent);