/* Chalet RedMount — Tweaks app Three expressive controls that reshape the whole feel: - Ambiance : colour world (Crème & Bois / Chalet du soir / Neige fraîche) - Typographie: serif voice (Classique / Éditorial / Caractère) - Géométrie : shape language (Anguleux / Arrondi / Doux) Drives data-ambiance / data-type / data-geo on ; all visual work lives in styles.css. */ // Palettes shown as colour chips; index maps to an ambiance key. const RM_PALETTES = [ ["#f4ecd9", "#9d7745", "#fffdf8"], // Crème & Bois (default) ["#211b15", "#d8a85f", "#2f2820"], // Chalet du soir ["#eaf0f5", "#4a6f93", "#ffffff"], // Neige fraîche ]; const RM_AMBIANCE_KEYS = ["creme", "soir", "neige"]; const ambianceKey = (arr) => { const i = RM_PALETTES.findIndex((p) => JSON.stringify(p) === JSON.stringify(arr)); return RM_AMBIANCE_KEYS[i] || "creme"; }; const RM_TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "ambiance": ["#f4ecd9", "#9d7745", "#fffdf8"], "typographie": "classique", "geometrie": "arrondi" }/*EDITMODE-END*/; function ChaletTweaks() { const [t, setTweak] = useTweaks(RM_TWEAK_DEFAULTS); React.useEffect(() => { const r = document.documentElement; r.setAttribute("data-ambiance", ambianceKey(t.ambiance)); r.setAttribute("data-type", t.typographie); r.setAttribute("data-geo", t.geometrie); }, [t]); return ( setTweak("ambiance", v)} /> setTweak("typographie", v)} /> setTweak("geometrie", v)} /> ); } ReactDOM.createRoot(document.getElementById("tweaks-root")).render();