// ============================================================ // Monarch — L'Encyclopédie patrimoniale du dirigeant (composant) // Définit window.EncyclopediePage. Requiert React + window.MONARCH_ENCYCLO. // ============================================================ (function () { const { useState, useEffect, useRef } = React; const C = { vert: "#1E3A2B", ivoire: "#F7F3E9", encre: "#222222", or: "#C8A45C", fond: "#FDFCF9", gris: "#6B6B66", grisC: "#9A9A92", trait: "#E6E1D4", blanc: "#FFFFFF" }; const SERIF = "'Fraunces', Georgia, serif"; const BODY = "'Archivo', system-ui, sans-serif"; const CAL_URL = "https://cal.eu/hugo-groslambert/diagnostic1h"; const TYPES = { notion: { label: "Notion", color: C.vert, bg: "#E8EEEA" }, dispositif: { label: "Dispositif", color: "#9A7B22", bg: "#F4ECD7" }, montage: { label: "Montage", color: "#3D5468", bg: "#E7EDF2" }, cas: { label: "Cas pratique", color: "#5C6F5C", bg: "#E9EEE9" }, glossaire: { label: "Glossaire", color: "#6B6B66", bg: "#ECEAE3" } }; function injectStyles() { if (document.getElementById("encyclo-styles")) return; const s = document.createElement("style"); s.id = "encyclo-styles"; s.textContent = ` .enc-body h2 { font-family:${SERIF}; font-size:clamp(22px,2.6vw,28px); font-weight:500; color:${C.vert}; letter-spacing:-0.01em; margin:40px 0 14px; } .enc-body h3 { font-family:${SERIF}; font-size:20px; font-weight:500; color:${C.vert}; margin:28px 0 10px; } .enc-body p { font-family:${BODY}; font-size:17px; line-height:1.7; color:${C.encre}; margin:0 0 18px; } .enc-body ul { font-family:${BODY}; font-size:17px; line-height:1.7; color:${C.encre}; padding-left:22px; margin:0 0 18px; } .enc-body li { margin-bottom:8px; } .enc-body strong { color:${C.encre}; font-weight:700; } .enc-body a[data-entry] { color:${C.vert}; text-decoration:none; border-bottom:1px solid ${C.or}; cursor:pointer; padding-bottom:1px; } .enc-body a[data-entry]:hover { background:${C.ivoire}; } .enc-body span[data-def] { border-bottom:1px dotted ${C.or}; cursor:help; position:relative; } .enc-body span[data-def]:hover::after { content:attr(data-def); position:absolute; left:0; top:calc(100% + 8px); width:260px; background:${C.vert}; color:#fff; font-family:${BODY}; font-size:12.5px; font-weight:400; line-height:1.5; letter-spacing:0; text-transform:none; padding:10px 12px; border-radius:3px; z-index:40; box-shadow:0 12px 30px -12px rgba(0,0,0,.4); } .enc-toc a.on { color:${C.vert} !important; font-weight:600 !important; } .enc-toc a.on { color:${C.vert} !important; font-weight:600 !important; } .enc-mobilebar { display:none; } @media (max-width:1040px){ .enc-toc { display:none !important; } } @media (max-width:900px){ .enc-sidebar { display:none !important; } .enc-grid { grid-template-columns:1fr !important; } .enc-entry-grid { grid-template-columns:1fr !important; gap:0 !important; } .enc-shell { grid-template-columns:1fr !important; gap:0 !important; } .enc-mobilebar { display:block !important; } } `; document.head.appendChild(s); } function slugifyH(s) { return (s || "").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60); } function Badge({ type }) { const t = TYPES[type] || TYPES.notion; return {t.label}; } // ---------- Sidebar ---------- function Sidebar({ data, current, onOpen, query, setQuery }) { const q = query.trim().toLowerCase(); const TYPE_ORDER = ["notion", "dispositif", "montage", "cas", "glossaire"]; // modules dans l'ordre déclaré, + tout module utilisé non listé const modNames = (data.modules || []).map((m) => m.name); (data.entries || []).forEach((e) => { if (e.module && !modNames.includes(e.module)) modNames.push(e.module); }); return ( ); } // ---------- Overview (index) ---------- function Overview({ data, onOpen, query }) { const q = (query || "").trim().toLowerCase(); const azList = data.entries.slice().sort((a, b) => a.title.localeCompare(b.title, "fr")); // Mode recherche : liste plate filtrée if (q) { const hits = data.entries.filter((e) => (e.title + " " + e.definition + " " + (e.body || "").replace(/<[^>]+>/g, " ")).toLowerCase().includes(q)); return (
Recherche

{hits.length} résultat{hits.length > 1 ? "s" : ""}

pour « {query.trim()} »

{hits.length === 0 ?

Aucune entrée ne correspond. Essayez un autre terme.

:
{hits.map((e) => )}
}
); } return (
L'Encyclopédie patrimoniale

L'Encyclopédie patrimoniale du dirigeant

Le dirigeant, souverain sur son patrimoine.

Un corpus de référence interconnecté et pédagogique sur les holdings, la structuration de groupe, la fiscalité et la transmission du patrimoine des dirigeants. Chaque entrée va à l'essentiel — en euros et en conséquences concrètes.

{data.modules.map((mod) => { const entries = data.entries.filter((e) => e.module === mod.name); return (

{mod.name}

{mod.intro}

{entries.map((e) => )}
); })} {/* Index A–Z */}
Index A–Z
{azList.map((e) => )}

Information générale à vocation pédagogique — ne constitue pas une consultation juridique.

{data.publishedAt &&

Encyclopédie mise à jour le {new Date(data.publishedAt).toLocaleDateString("fr-FR", { day: "numeric", month: "long", year: "numeric" })}.

}
); } // ---------- Entry ---------- function Entry({ data, entry, onOpen, goHome }) { const bodyRef = useRef(null); const [toc, setToc] = useState([]); const [activeId, setActiveId] = useState(""); useEffect(() => { const root = bodyRef.current; if (!root) return; // liens internes root.querySelectorAll("a[data-entry]").forEach((a) => { a.onclick = (ev) => { ev.preventDefault(); onOpen(a.getAttribute("data-entry")); }; }); // sommaire const hs = Array.from(root.querySelectorAll("h2")); const items = hs.map((h, i) => { const id = h.id || slugifyH(h.textContent) || "s" + i; h.id = id; h.style.scrollMarginTop = "100px"; return { id, text: h.textContent }; }); setToc(items); const obs = new IntersectionObserver((es) => es.forEach((e) => { if (e.isIntersecting) setActiveId(e.target.id); }), { rootMargin: "-90px 0px -65% 0px" }); hs.forEach((h) => obs.observe(h)); return () => obs.disconnect(); }, [entry.slug]); // JSON-LD useEffect(() => { const isTerm = entry.type === "notion" || entry.type === "glossaire"; const graph = [{ "@type": isTerm ? "DefinedTerm" : "Article", "name": entry.title, "headline": entry.title, "description": entry.definition, "inDefinedTermSet": isTerm ? "L'Encyclopédie patrimoniale du dirigeant — Monarch" : undefined, "author": { "@type": "Person", "name": "Hugo Groslambert" }, "publisher": { "@type": "LegalService", "name": "Monarch", "areaServed": "Toulouse" } }]; const old = document.getElementById("enc-jsonld"); if (old) old.remove(); const el = document.createElement("script"); el.type = "application/ld+json"; el.id = "enc-jsonld"; el.textContent = JSON.stringify({ "@context": "https://schema.org", "@graph": graph }); document.head.appendChild(el); return () => { el.remove(); }; }, [entry.slug]); const related = (entry.voirAussi || []).map((s) => data.entries.find((e) => e.slug === s)).filter(Boolean); const crumb = { color: C.gris }; return (
{/* fil d'Ariane */}
/ {entry.module} / {entry.title}
Niveau : {entry.niveau}

{entry.title}

{/* Définition canonique — liseré or */}
Définition

{entry.definition}

{/* En bref */} {entry.enBref && entry.enBref.length > 0 &&
En bref
    {entry.enBref.map((b, i) =>
  • {b}
  • )}
} {/* Corps */}
{/* À ne pas confondre */} {entry.confusion &&
À ne pas confondre

} {/* Voir aussi */} {related.length > 0 &&
Voir aussi
{related.map((e) => )}
} {/* Fondements */} {entry.fondements && entry.fondements.length > 0 &&
Fondements
    {entry.fondements.map((f, i) =>
  • {f}
  • )}
} {/* CTA discret */}
Une question sur l'application à votre situation ? Pré-audit avec le cabinet →
Dernière mise à jour : {entry.maj}

Information générale à vocation pédagogique — ne constitue pas une consultation juridique.

{/* ToC sticky droite */}
); } // ---------- Page ---------- function EncyclopediePage({ go, slug }) { useEffect(injectStyles, []); const data = window.MONARCH_ENCYCLO || { modules: [], entries: [] }; const [query, setQuery] = useState(""); const [navOpen, setNavOpen] = useState(false); const entry = slug ? data.entries.find((e) => e.slug === slug) : null; const open = (s) => { setNavOpen(false); go("encyclo", s); window.scrollTo({ top: 0 }); }; const home = () => { go("encyclo"); window.scrollTo({ top: 0 }); }; // recherche depuis le mobile : on revient à l'index (qui affiche les résultats) const onMobileSearch = (v) => { setQuery(v); if (entry && v.trim()) { go("encyclo"); window.scrollTo({ top: 0 }); } }; // liste des modules pour le tiroir mobile const modNames = (data.modules || []).map((m) => m.name); (data.entries || []).forEach((e) => { if (e.module && !modNames.includes(e.module)) modNames.push(e.module); }); return (
{/* Barre mobile : recherche + tiroir de navigation */}
onMobileSearch(e.target.value)} placeholder="Rechercher dans l'encyclopédie…" style={{ width: "100%", fontFamily: BODY, fontSize: 15, color: C.encre, background: "#fff", border: `1px solid ${C.trait}`, borderRadius: 2, padding: "12px 38px 12px 36px", outline: "none" }} /> {query && }
{navOpen &&
{modNames.map((mod) => { const inMod = (data.entries || []).filter((e) => e.module === mod); if (!inMod.length) return null; return (
{mod}
{inMod.map((e) => )}
); })}
}
{entry ? : }
); } window.EncyclopediePage = EncyclopediePage; })();