/* Charte graphique ALKEO : vert principal #2FAF4A (dominant), bleu principal #1F6E9B (accent), gris typographique #7D8B97. */
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("fonts/opensans-latin.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
:root {
	--green: #2FAF4A; --green-dark: #23903b; --green-light: #5CC96F; --green-soft: #eaf7ed;
	--blue: #1F6E9B; --blue-light: #3C8DB6; --blue-soft: #e7f1f7;
	--gray: #7D8B97; --text: #23313b; --muted: #7D8B97; --border: #cfd8de; --line: #e3e8ec; --bg: #f4f7f8; --red: #c0392b;
	--title: "Montserrat", "Segoe UI", system-ui, sans-serif;
	--body: "Open Sans", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #fff; color: var(--text); font: 13px/1.5 var(--body); }
h1, h2, h3, .nav p, .grid thead th, .btn, .tabs a, .version { font-family: var(--title); }
a { color: var(--blue); }
h1 { margin: 0 0 14px; font-size: 20px; font-weight: 700; color: var(--text); }
h2 { margin: 26px 0 10px; font-size: 15px; font-weight: 600; color: var(--blue); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
input, select, textarea { font: inherit; color: inherit; padding: 6px 9px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
kbd { padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); font-size: 12px; }

/* Boutons */
.btn { display: inline-block; padding: 7px 14px; font-weight: 600; font-size: 12.5px; line-height: 1.2; color: #fff; background: var(--green);
	border: 1px solid var(--green); border-radius: 18px; cursor: pointer; text-decoration: none; transition: background .15s; }
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn.ghost { color: var(--text); background: #fff; border-color: var(--border); }
.btn.ghost:hover { color: var(--blue); border-color: var(--blue); background: #fff; }
.btn.small { padding: 5px 10px; font-size: 12px; white-space: nowrap; }
.link-danger { padding: 0; font: inherit; font-size: 12px; color: var(--red); background: none; border: 0; cursor: pointer; text-decoration: underline; }

/* Connexion */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--bg); }
.card { width: 100%; max-width: 400px; background: #fff; border-radius: 12px; padding: 36px 32px; box-shadow: 0 10px 30px rgba(0, 0, 0, .08); }
.card .brand { display: block; width: 200px; max-width: 100%; height: auto; margin: 0 auto 8px; }
.card h1 { font-size: 18px; text-align: center; margin: 0 0 24px; color: var(--muted); font-weight: 500; }
.card .field label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.card .field input { width: 100%; padding: 12px 14px; font-size: 16px; border-radius: 8px; margin-bottom: 18px; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 20px; }
.primary { width: 100%; padding: 12px; font: 600 15px var(--title); color: #fff; background: var(--green); border: 0; border-radius: 22px; cursor: pointer; }
.primary:hover { background: var(--green-dark); }
.error { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 18px; }
.info { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 18px; }
.links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 14px; color: var(--muted); }

/* Bandeau */
.topbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
	height: 58px; padding: 0 20px; background: #fff; border-bottom: 3px solid var(--green); }
.topbar .brand img { height: 36px; width: auto; display: block; }
.fund-picker { display: flex; align-items: center; gap: 8px; }
.fund-picker select { min-width: 280px; padding: 7px 12px; font: 600 13px var(--title); color: var(--blue); border-color: var(--blue); background: var(--blue-soft); border-radius: 18px; }
.topbar .actions { justify-self: end; display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--muted); }
.logout { padding: 5px 12px; border-radius: 16px; font: inherit; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.logout:hover { border-color: var(--blue); color: var(--blue); }

/* Mise en page : menu à gauche */
.layout { display: flex; min-height: calc(100vh - 58px); }
.nav { width: 230px; flex-shrink: 0; padding: 16px 12px 32px; background: #fff; border-right: 1px solid var(--line); }
.nav p { margin: 16px 10px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark); }
.nav p:first-child { margin-top: 4px; }
.nav a { display: block; padding: 5px 10px 5px 16px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 12.5px; }
.nav a:hover { background: var(--bg); }
.nav a.active { background: var(--green-soft); color: var(--green-dark); font-weight: 600; box-shadow: inset 3px 0 0 var(--green); }
.content { flex: 1; min-width: 0; padding: 22px 28px 48px; background: var(--bg); }

.page-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.page-head .btn { margin-left: auto; }
.page-head .muted { font-size: 12px; }
.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.notice.good { background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0; }
.notice.bad { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.empty { padding: 40px 24px; background: #fff; border: 1px dashed var(--border); border-radius: 10px; text-align: center; color: var(--muted); }
.empty h2 { margin-top: 0; color: var(--text); }

/* Fiche caractéristiques */
.sheet { max-width: 760px; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sheet-row { display: grid; grid-template-columns: 280px 1fr; align-items: center; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.sheet-row:last-child { border-bottom: 0; }
.sheet-row label, .sheet-row dt { font-weight: 600; font-size: 14px; color: var(--muted); }
.sheet-row dd { margin: 0; }
.sheet-row input, .sheet-row select { width: 100%; }
.sheet-actions { display: flex; gap: 10px; padding: 14px 18px; background: var(--bg); border-top: 1px solid var(--line); }
.danger-zone { margin-top: 24px; font-size: 13px; }

/* Onglets */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 14px; font-size: 13px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a.on { color: var(--green-dark); border-bottom-color: var(--green); }

/* Tableaux */
.grid { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 12.5px; }
.grid th, .grid td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.grid th.num, .grid td.num { text-align: right; }
.grid thead th { background: var(--blue); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #fff; }
.grid tfoot th { background: #f9fafb; font-weight: 700; }
.grid tr.group td { background: var(--green-soft); color: var(--green-dark); }
.grid tr.subtotal td { font-weight: 600; background: #fafafa; }
.grid tbody.entry-block { border-top: 2px solid var(--line); }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions form { display: inline-block; margin-left: 8px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.open { background: #ecfdf3; color: #166534; }
.tag.frozen { background: #eef2ff; color: #3730a3; }

/* Barres d'outils et formulaires */
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; font-size: 14px; }
.toolbar label { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted); }
.chip { padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text); text-decoration: none; font-size: 13px; }
.chip.on, .chip:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.inline-form label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.card-form { max-width: 480px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.card-form h2 { margin-top: 0; }
.card-form .field { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; color: var(--muted); }
.card-form .field input, .card-form .field textarea { display: block; width: 100%; margin-top: 6px; font-weight: 400; }
.two-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 24px; }
.two-cols .card-form { max-width: none; }

/* Saisie des écritures */
.entry { position: relative; }
.entry-grid td { padding: 0; }
.entry-grid td input { width: 100%; border: 0; border-radius: 0; padding: 9px 10px; background: transparent; }
.entry-grid td input:focus { outline: 2px solid var(--blue); outline-offset: -2px; background: #f8fbff; }
.entry-grid td.del { text-align: center; }
.entry-grid td.del button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; }
.entry-grid tr.bad td { background: #fff7f7; }
.entry-status { font-weight: 600; }
.entry-status.ok { color: #166534; }
.entry-status.ko { color: var(--red); }
.entry-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.entry-msg { font-size: 14px; font-weight: 600; }
.entry-msg.ok { color: #166534; }
.entry-msg.ko { color: var(--red); }
.watermark { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; pointer-events: none;
	font-size: 64px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(185, 28, 28, .16); transform: rotate(-8deg); }

@media (max-width: 900px) {
	.topbar { grid-template-columns: auto 1fr auto; height: auto; padding: 10px 16px; }
	.topbar .who { display: none; }
	.fund-picker select { min-width: 0; width: 100%; }
	.layout { flex-direction: column; }
	.nav { width: 100%; display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
	.nav p { display: none; }
	.nav a { flex-shrink: 0; white-space: nowrap; padding: 7px 10px; }
	.content { padding: 20px 16px; overflow-x: auto; }
	.sheet-row { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 600px) {
	.topbar { grid-template-columns: 1fr auto; }
	.fund-picker { grid-column: 1 / -1; order: 3; }
	.topbar .brand img { height: 32px; }
}

/* États financiers */
h3 { margin: 22px 0 10px; font-size: 15px; }
.table-wrap { overflow-x: auto; margin-bottom: 14px; }
.statement td:first-child { min-width: 320px; }
.statement .st-head td { background: #f9fafb; font-weight: 700; color: var(--text); }
.statement .st-head.lvl1 td { padding-left: 24px; font-weight: 600; color: var(--muted); }
.statement tr.lvl1 td:first-child { padding-left: 24px; }
.statement tr.lvl2 td:first-child { padding-left: 40px; color: #374151; }
.statement tr.lvl2 td { font-size: 12px; }
.grid tr.st-sub td { font-weight: 600; background: #fafafa; }
.grid tr.st-total td { font-weight: 700; background: var(--green-soft); }
.grid tr.st-grand td { font-weight: 700; font-size: 13.5px; background: var(--green); color: #fff; }
.grid tr.st-head td { background: #f9fafb; font-weight: 700; }

/* Annexe */
.annex-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.annex-toc a { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; text-decoration: none; color: var(--text); }
.annex-toc a:hover { border-color: var(--blue); color: var(--blue); }
.annex-section { margin-bottom: 28px; padding-top: 4px; scroll-margin-top: 80px; }
.annex-prose { max-width: none; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.annex-prose p { margin: 0 0 8px; }
.annex-prose p:last-child { margin-bottom: 0; }
.annex-prose.placeholder { color: var(--muted); font-style: italic; border-style: dashed; }
.annex-text { width: 100%; max-width: none; min-height: 260px; display: block; margin-bottom: 12px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.annex-bar { position: sticky; top: 72px; z-index: 5; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding: 10px 14px; background: #fff7e6; border: 1px solid #fde4b0; border-radius: 10px; }

/* Calendrier */
.cal-new, .cal-card { margin-bottom: 16px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.cal-new h2 { margin: 0 0 12px; }
.cal-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.cal-row label, .cal-add label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.cal-label { font-weight: 600; font-size: 14px; color: var(--muted); }
.kind-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kind { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px; color: var(--text); cursor: pointer; user-select: none; }
.kind:has(input:checked) { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); font-weight: 600; }
.kind input { margin: 0; accent-color: var(--green); }
.kind-day { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.kind-day select { padding: 5px 8px; }
.cal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cal-head h3 { margin: 0 0 4px; font-size: 17px; }
.cal-head .tag { margin-left: 8px; }
.cal-list { margin-top: 12px; }
.cal-list summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--blue); margin-bottom: 10px; }
.cal-add { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Entrées de saisie */
.entry-grid td input { padding: 7px 8px; font-size: 12.5px; }

/* Participations */
.op-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 18px; }
.op-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.op-group-label { width: 100%; font: 700 10.5px var(--title); letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.op-form { margin-bottom: 20px; padding: 18px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 10px; }
.op-form h2 { margin-top: 0; }
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; }
.op-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.op-grid label input, .op-grid label select, .op-grid label textarea { font-weight: 400; color: var(--text); }
.op-grid .wide { grid-column: 1 / -1; }
.op-post { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; font-weight: 600; }
.schema-label { max-width: 180px; margin-top: 2px; }

/* Ratios */
.ratio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 10px; }
.ratio-card { padding: 16px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gray); border-radius: 10px; }
.ratio-card.ok { border-left-color: var(--green); }
.ratio-card.ko { border-left-color: var(--red); }
.ratio-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ratio-card h3 { margin: 0; font-size: 13.5px; }
.ratio-card .tag.frozen { background: #fdecea; color: var(--red); }
.ratio-figure { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 6px; }
.ratio-figure strong { font: 700 26px var(--title); color: var(--blue); font-variant-numeric: tabular-nums; }
.ratio-bar { position: relative; height: 8px; background: var(--line); border-radius: 4px; margin-bottom: 10px; }
.ratio-bar span { display: block; height: 100%; background: var(--blue-light); border-radius: 4px; }
.ratio-card.ok .ratio-bar span { background: var(--green); }
.ratio-card.ko .ratio-bar span { background: var(--red); }
.ratio-bar i { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--text); }
.ratio-dl { margin: 0 0 6px; display: grid; gap: 2px; }
.ratio-dl div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.ratio-dl dt { color: var(--muted); }
.ratio-dl dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-edit { margin-top: 10px; }
.cal-edit summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--blue); }
.cal-edit form { margin-top: 8px; }

/* ===== Version colorée (charte ALKEO) ===== */
.content { background: linear-gradient(180deg, #eef6f1 0, #f2f6f9 220px, #f2f6f9 100%); }

/* Menu de gauche : bleu ALKEO, rubriques avec pastilles colorées */
.nav { background: linear-gradient(180deg, #1F6E9B 0%, #185d84 60%, #14506f 100%); border-right: 0; padding: 14px 10px 32px; }
.nav p.nav-group { display: flex; align-items: center; gap: 8px; margin: 16px 6px 6px; color: #fff; font-size: 10.5px; letter-spacing: .08em; }
.nav p.nav-group:first-child { margin-top: 4px; }
.nav-ic { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 7px; color: #fff; flex-shrink: 0; }
.nav-ic.g { background: var(--green); box-shadow: 0 2px 6px rgba(47, 175, 74, .45); }
.nav-ic.b { background: var(--blue-light); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.nav a { color: rgba(255, 255, 255, .82); padding: 5px 10px 5px 36px; border-radius: 8px; }
.nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a.active { background: #fff; color: var(--blue); font-weight: 700; box-shadow: inset 4px 0 0 var(--green), 0 2px 8px rgba(0, 0, 0, .15); }

/* Bandeau supérieur */
.topbar { box-shadow: 0 2px 10px rgba(31, 110, 155, .08); }

/* En-tête de page coloré */
.page-head { padding: 14px 18px; background: linear-gradient(90deg, #ffffff 0%, #f3fbf5 55%, #edf5fa 100%); border: 1px solid #dbeee1; border-left: 5px solid var(--green); border-radius: 12px; box-shadow: 0 2px 8px rgba(31, 110, 155, .05); }
.page-head h1 { color: var(--blue); }
h2 { display: flex; align-items: center; gap: 8px; }
h2::before { content: ""; width: 4px; height: 15px; border-radius: 2px; background: linear-gradient(180deg, var(--green), var(--blue)); flex-shrink: 0; }
.cal-head h3, .ratio-card h3 { color: var(--blue); }

/* Onglets en pastilles */
.tabs { gap: 6px; border-bottom: 0; margin-bottom: 18px; }
.tabs a { padding: 7px 16px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--blue); margin-bottom: 0; }
.tabs a:hover { border-color: var(--blue-light); }
.tabs a.on { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 2px 8px rgba(47, 175, 74, .3); }

/* Cartes avec bandeau de couleur */
.cal-new, .card-form, .op-form, .supplier-form, .supplier-card, .annex-prose { border-top: 3px solid var(--green); }
.cal-card, .op-group, .ratio-card { border-top: 3px solid var(--blue); }
.cal-card:nth-of-type(2n), .op-group:nth-child(2n) { border-top-color: var(--green-light); }
.cal-new { background: linear-gradient(180deg, #f6fcf7, #fff 60px); }
.inline-form { border-left: 4px solid var(--blue-light); }

/* Fiche caractéristiques et paramétrages */
.sheet-row dt, .sheet-row label { color: var(--blue); }
.sheet-row:nth-child(odd) { background: #f8fbfd; }
.sheet { border-top: 3px solid var(--green); }

/* Tableaux */
.grid tbody tr:hover td { background: #f3fbf5; }
.grid tfoot th { background: var(--blue-soft); color: var(--blue); }
.tag.open { background: var(--green-soft); color: var(--green-dark); }
.tag.frozen { background: #e8eef9; color: #2c4f8f; }
.btn.ghost { color: var(--blue); border-color: #bcd3e2; }
.btn.ghost:hover { background: var(--blue-soft); color: var(--blue); border-color: var(--blue); }
.notice.good { border-left: 4px solid var(--green); }
.notice.bad { border-left: 4px solid var(--red); }
.empty { border: 1px dashed #b9d9c2; background: linear-gradient(180deg, #fbfefc, #fff); }
.empty h2::before { display: none; }

/* Fournisseurs : liste + fiche */
.master-detail { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.md-list { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 10px; padding: 10px; max-height: 70vh; overflow-y: auto; }
.md-search input { width: 100%; margin-bottom: 8px; border-radius: 18px; }
.md-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; text-decoration: none; color: var(--text); }
.md-item:hover { background: var(--blue-soft); }
.md-item.on { background: var(--green-soft); box-shadow: inset 3px 0 0 var(--green); }
.md-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: linear-gradient(135deg, var(--green), var(--blue)); color: #fff; font: 700 13px var(--title); }
.md-empty { padding: 8px; }
.supplier-form, .supplier-card { padding: 18px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 10px; }
.supplier-form h2, .supplier-card h2 { margin-top: 0; }
@media (max-width: 900px) {
	.master-detail { grid-template-columns: 1fr; }
	.nav { background: var(--blue); }
	.nav a { padding-left: 10px; }
}
@media (max-width: 900px) { .nav p.nav-group { display: none; } }
.content > h1 { padding: 14px 18px; color: var(--blue); background: linear-gradient(90deg, #ffffff 0%, #f3fbf5 55%, #edf5fa 100%); border: 1px solid #dbeee1; border-left: 5px solid var(--green); border-radius: 12px; box-shadow: 0 2px 8px rgba(31, 110, 155, .05); }

/* ===== v3.4 : une seule police partout ===== */
:root { --title: "Open Sans", "Segoe UI", system-ui, sans-serif; }
body, input, select, textarea, button, .btn, h1, h2, h3, .nav p, .grid thead th, .tabs a, .primary, .ratio-figure strong, .md-avatar, .op-group-label { font-family: "Open Sans", "Segoe UI", system-ui, sans-serif; }
h1 { font-weight: 700; } h2, h3 { font-weight: 600; }

/* Bandeau : société de gestion → fonds → arrêté */
.topbar { grid-template-columns: auto 1fr auto; height: auto; min-height: 62px; padding: 8px 20px; }
.ctx { display: flex; align-items: flex-end; justify-content: center; flex-wrap: wrap; gap: 8px 12px; }
.ctx-item { display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--gray); }
.ctx-item select, .ctx-item input { padding: 5px 10px; font-size: 12.5px; font-weight: 600; text-transform: none; letter-spacing: 0; border-radius: 16px; border-color: #bcd3e2; color: var(--blue); background: #fff; }
.ctx-fund select { min-width: 220px; background: var(--blue-soft); border-color: var(--blue); }
.ctx-date input { width: 140px; }
.ctx .btn { align-self: flex-end; }
.topbar .who small { color: var(--green-dark); font-weight: 600; }
.topbar .who { text-align: right; line-height: 1.25; }
.layout { min-height: calc(100vh - 62px); }

/* Calendrier épuré */
details.cal-new { padding: 0; }
details.cal-new > summary { padding: 12px 18px; cursor: pointer; font-weight: 700; color: var(--green-dark); list-style: none; }
details.cal-new[open] > summary { border-bottom: 1px solid var(--line); }
details.cal-new > form { padding: 14px 18px; }
.cal-card { padding: 14px 16px; }
.cal-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.cal-title h3 { margin: 0; font-size: 14px; }
.cal-head .tag { margin-left: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cchip { position: relative; }
.cchip > summary, .cchip-static { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid #cfe3d4; border-radius: 14px; background: #f6fcf7; font-size: 12px; cursor: pointer; list-style: none; user-select: none; }
.cchip-static { cursor: default; }
.cchip > summary::-webkit-details-marker { display: none; }
.cchip.frozen > summary, .cchip.frozen .cchip-static { background: #eef1f8; border-color: #c9d3ea; color: #2c4f8f; }
.cchip[open] > summary { border-color: var(--green); box-shadow: 0 0 0 2px rgba(47, 175, 74, .2); }
.chip-date { font-weight: 600; font-variant-numeric: tabular-nums; }
.chip-kind { color: var(--gray); font-size: 11px; }
.cchip-menu { position: absolute; z-index: 15; top: calc(100% + 6px); left: 0; display: flex; flex-direction: column; gap: 8px; min-width: 230px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(31, 110, 155, .18); }
.cchip-move { display: flex; gap: 6px; }
.cchip-move input { flex: 1; min-width: 0; }
.cal-tools { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.cal-tools summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--blue); }
.cal-tools form { margin-top: 8px; }
.cal-legend { margin-top: 4px; }

/* Participations : boutons les uns sous les autres dans chaque famille */
.op-group { flex-direction: column; align-items: stretch; }
.op-group .btn { text-align: left; }

/* Parts : modification en ligne */
.inline-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.edit-row td { background: var(--green-soft) !important; }

/* Journaux et grand livre */
.journal-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.journal-bar .tabs { margin-bottom: 0; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.grid tbody.entry-block.focus td { background: #fff8e1; }
.grid tr.opening td { color: var(--blue); font-style: italic; background: #f8fbfd; }
.grid tr.clickable { cursor: pointer; }

/* Accès */
.role-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 16px; }
.role-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gray); border-radius: 10px; font-size: 12px; }
.role-card strong { font-size: 12.5px; color: var(--text); }
.role-card span { color: var(--gray); }
.role-administrateur { border-left-color: var(--blue); }
.role-senior { border-left-color: var(--green); }
.role-junior { border-left-color: var(--green-light); }
.role-bg-administrateur { background: var(--blue); }
.role-bg-senior { background: var(--green); }
.role-bg-junior { background: var(--green-light); }
.role-bg-consultation { background: var(--gray); }
.access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.access-sg { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfc; }
.access-funds { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 0 10px; font-size: 12.5px; }
.inline-check { flex-direction: row !important; align-items: center; gap: 8px !important; }

/* Correspondance */
.acc-root { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 7px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-weight: 600; font-size: 11.5px; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .ctx { justify-content: flex-start; } .ctx-fund select { min-width: 0; } }
.toolbar select { max-width: 460px; }

/* ---------- v3.5 ---------- */

/* Bandeau : listes sans intitulés, bouton « + Fonds » à droite près du nom. */
.ctx { align-items: center; }
.ctx select { padding: 6px 12px; font-size: 12.5px; font-weight: 600; border-radius: 16px; border: 1px solid #bcd3e2; color: var(--blue); background: #fff; max-width: 300px; }
.ctx .ctx-fund { min-width: 220px; background: var(--blue-soft); border-color: var(--blue); }
.ctx .ctx-date { border-color: var(--green); color: var(--green-dark); background: var(--green-soft); }
.topbar .add-fund { white-space: nowrap; }

/* Menu de gauche resserré : interlignes réduits, libellés sur une ligne, menu fixe qui défile seul si besoin. */
.nav { padding: 8px 8px 12px; position: sticky; top: 62px; align-self: flex-start; height: calc(100vh - 62px); overflow-y: auto; scrollbar-width: thin; }
.nav p.nav-group { margin: 7px 4px 1px; font-size: 10px; gap: 6px; }
.nav p.nav-group:first-child { margin-top: 0; }
.nav a { padding: 1px 8px 1px 30px; line-height: 1.3; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-ic { width: 17px; height: 17px; border-radius: 5px; }
.nav-ic svg { width: 11px; height: 11px; }
@media (max-width: 900px) { .nav { position: static; height: auto; overflow-x: auto; } }

/* États financiers : colonne des libellés plus étroite, montants rapprochés. */
.statement { width: auto; min-width: 0; max-width: 860px; }
.statement td:first-child { min-width: 0; width: 460px; max-width: 460px; }
.statement th.num, .statement td.num { width: 150px; white-space: nowrap; }

/* Accueil. */
.welcome { margin-bottom: 20px; }
.welcome h1 { margin-bottom: 2px; }
.welcome p { margin: 0 0 12px; }
.welcome-stats { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.welcome-stats .stat { display: flex; align-items: baseline; gap: 6px; padding: 8px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.welcome-stats .stat strong { font-size: 20px; color: var(--blue); }
.welcome-stats .stat span { color: var(--muted); font-size: 12.5px; }
.home-sg { margin: 0 0 18px; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; border-top: 4px solid var(--blue); }
.home-sg header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.home-sg h2 { margin: 0; font-size: 16px; color: var(--blue); }
.home-funds { margin: 0; }
.home-funds .fund-link { font-weight: 700; color: var(--text); }
.badge-open { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--green); color: #fff !important; font-weight: 600; font-size: 12px; text-decoration: none; }
.badge-open:hover { background: var(--green-dark); }
.badge-open .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.badge-frozen { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #e8eef9; color: #2c4f8f; font-weight: 600; font-size: 12px; }

/* Indicateurs (souscripteurs, appels, performance). */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 18px; }
.kpis > div { padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; border-left: 4px solid var(--green); }
.kpis > div.warn { border-left-color: #e8a317; }
.kpis span { display: block; font-size: 11.5px; color: var(--muted); }
.kpis strong { display: block; font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.kpis small { display: block; font-size: 11px; color: var(--muted); }
.kpis.perf > div:first-child { border-left-color: var(--blue); }
.kpis.perf > div:first-child strong { color: var(--blue); font-size: 20px; }
.warn-text { color: #b45309; }
.kind-pick { display: flex; gap: 18px; border: 0; padding: 0; margin: 0 0 10px; }
.kind-pick label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
fieldset.op-grid { border: 0; padding: 0; margin: 0; min-width: 0; }
.pay-line { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.pay-line form { display: inline; }
.pay-form { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.pay-form input[type=date] { width: 135px; }
.flows td { vertical-align: top; }
tr.clickable.on td { background: var(--green-soft); }
.import-box { margin: 14px 0; padding: 10px 16px; background: #fff; border: 1px dashed #bcd3e2; border-radius: 12px; }
.import-box summary { cursor: pointer; font-weight: 700; color: var(--blue); }
.import-box code { font-size: 11.5px; }
.call-form { margin-top: 10px; }
.call-detail { margin: 10px 0 18px; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.call-detail h2 { margin-top: 0; }
.inline-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 6px; flex-wrap: wrap; }
.inline-check .muted { flex-basis: 100%; }
.edit-banner { background: #fff7e6; border: 1px solid #f5c26b; color: #7a4b00; }

/* Correspondance : numéros de compte complets. */
.acc-num { display: inline-block; margin: 2px 3px 2px 0; padding: 1px 6px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-weight: 600; font-size: 11px; font-variant-numeric: tabular-nums; }
.acc-num.muted { background: #f3f4f6; color: var(--muted); }
[hidden] { display: none !important; }

/* v3.5 : contrôles du bilan, clôture, extournes. */
.controls { margin-top: 22px; }
.ctrl tr.ok td { background: #f2fbf4; }
.ctrl tr.ko td { background: #fdecea; }
.ctrl td:first-child { width: 360px; }
.ctrl-ok { color: var(--green-dark); font-weight: 700; white-space: nowrap; }
.ctrl-ko { color: #b42318; font-weight: 700; white-space: nowrap; }
.tag.closed { background: #1f2937; color: #fff; }
.tag.auto { background: #fff4e0; color: #8a5300; }
.btn-close { background: #1f2937; border-color: #1f2937; }
.btn-close:hover { background: #000; border-color: #000; }
details.rev { display: inline-block; }
details.rev summary { list-style: none; cursor: pointer; }
details.rev summary::-webkit-details-marker { display: none; }
details.rev[open] form { display: flex; gap: 6px; margin-top: 4px; }
tr.cancelled td { color: var(--muted); text-decoration: line-through; }
tr.cancelled td:last-child { text-decoration: none; }
.perm-grid td.c, .perm-grid th.c { text-align: center; width: 120px; }
.perm-grid tr.grp td { background: var(--blue-soft); color: var(--blue); font-weight: 700; }

/* ---------- v3.5.1 : une seule police et une échelle de tailles commune à toutes les pages ---------- */
.topbar, .topbar *, .layout, .layout *:not(svg):not(path):not(rect):not(circle) { font-family: "Open Sans", "Segoe UI", system-ui, sans-serif; }
.layout { font-size: 12px; line-height: 1.45; }
.content h1, .welcome h1 { font-size: 17px; }
.content h2, .home-sg h2 { font-size: 13.5px; }
.content h3, .cal-head h3, .cal-title h3, .ratio-card h3 { font-size: 13px; }
.content .small, .content .muted.small, .page-head .muted { font-size: 11px; }
.content .notice, .content .toolbar, .content .inline-form label, .content .card-form .field, .content .sheet-row label, .content .sheet-row dt,
.content .cal-row label, .content .cal-label, .content .cal-list summary, .content .entry-msg, .content .tabs a, .content .danger-zone,
.content .chip, .content .annex-toc a, .content .kind-day, .content .op-grid label, .content .kind-pick label, .content .import-box summary { font-size: 12px; }
.content .grid, .content .entry-grid td input, .content input, .content select, .content textarea { font-size: 12px; }
.content .grid thead th { font-size: 10px; }
.content .statement tr.lvl2 td { font-size: 11.5px; }
.content .grid tr.st-grand td { font-size: 12.5px; }
.content .btn { font-size: 12px; }
.content .btn.small, .content .link-danger, .content .tag, .content .badge-open, .content .badge-frozen, .content .pay-line, .content .cchip > summary, .content .cchip-static { font-size: 11px; }
.content .kpis strong { font-size: 15px; }
.content .kpis.perf > div:first-child strong, .content .welcome-stats .stat strong { font-size: 18px; }
.content .ratio-figure strong { font-size: 22px; }
.topbar .ctx select, .topbar .actions, .topbar .btn { font-size: 12px; }

/* Menu : titres de rubriques un peu plus grands, liens inchangés. */
.nav p.nav-group { font-size: 11.5px; margin: 7px 4px 1px; gap: 7px; }
.nav p.nav-group:first-child { margin-top: 1px; }
.nav-ic { width: 20px; height: 20px; }
.nav-ic svg { width: 12px; height: 12px; }
.nav a { padding-left: 33px; }

/* ---------- v3.6 ---------- */
.role-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; }
.role-bg-consultation { background: var(--gray); }
.users-list tr.on td { background: var(--green-soft); }
.temp-pw { font-size: 15px; padding: 2px 8px; background: #fff; border: 1px dashed var(--green); border-radius: 6px; letter-spacing: .05em; }
.scope-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 10px 0; }
.scope-pick label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.scope-funds { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; }
.scope-funds label { font-weight: 400; }

/* Police plus moderne (Plus Jakarta Sans, licence SIL OFL, hébergée sur le site) et contenu resserré. */
@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/plusjakarta-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
body, input, select, textarea, button, .btn, .primary,
.topbar, .topbar *, .layout, .layout *:not(svg):not(path):not(rect):not(circle), .login, .login *:not(svg) { font-family: var(--app-font, "Plus Jakarta Sans"), "Segoe UI", system-ui, sans-serif; }
.font-choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 10px 0; }
.font-choice label { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: #fff; }
.font-choice input { margin-right: 6px; }
.font-choice label:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 2px rgba(46, 158, 79, .15); }
.layout .font-choice label, .layout .font-choice label * { font-family: var(--fc), sans-serif; }
.font-choice .sample { font-size: 15px; margin: 6px 0 2px; }
.font-choice .sample-num { font-size: 13px; font-variant-numeric: tabular-nums; }
.layout { line-height: 1.35; }
.content { padding: 16px 22px 36px; }
.page-head { padding: 9px 16px; margin-bottom: 12px; gap: 12px; }
.content h2 { margin: 16px 0 7px; }
.content h3 { margin: 12px 0 6px; }
.grid th, .grid td { padding: 4px 9px; }
.content .grid thead th { padding-top: 6px; padding-bottom: 6px; }
.sheet-row { padding: 6px 16px; gap: 12px; }
.notice { padding: 7px 12px; margin-bottom: 12px; }
.op-form, .supplier-form, .call-detail, .home-sg, .import-box { padding-top: 10px; padding-bottom: 10px; }
.op-grid { gap: 8px 14px; }
.kpis { margin: 8px 0 12px; gap: 8px; }
.kpis > div { padding: 7px 12px; }
.content input, .content select, .content textarea { padding: 4px 8px; }
.content .btn { padding: 5px 12px; }
.content .btn.small { padding: 3px 9px; }
.sheet-actions { padding: 8px 0; }
.edit-row input, .edit-row select { width: 100%; min-width: 0; box-sizing: border-box; }
.siren-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.siren-row label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; }
.siren-row input { width: 160px; font-size: 14px; letter-spacing: .04em; }
.lookup-msg { color: var(--blue); }
.list-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 8px; }
.das2-form { display: flex; align-items: center; gap: 8px; }
.das2-form label { display: flex; align-items: center; gap: 6px; }
.contact-form { margin-top: 8px; flex-wrap: wrap; }
.radio-row { display: inline-flex; gap: 18px; flex-wrap: wrap; }
.radio-row label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; color: var(--text); }
.import-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.import-card { padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; border-top: 3px solid var(--blue); }
.import-card h2 { margin-top: 0; }
.import-card form { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.import-card textarea { width: 100%; box-sizing: border-box; }
.pcg-form .op-grid { grid-template-columns: 180px 1fr; }
.move-form { margin-top: 10px; }

/* ---------- v3.7 ---------- */
.import-intro { padding: 10px 16px; margin-bottom: 12px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px; }
.import-intro p { margin: 3px 0; }
.import-table td { vertical-align: top; padding-top: 8px; padding-bottom: 8px; }
.import-table td.step span { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; }
.import-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.import-form label { display: inline-flex; align-items: center; gap: 4px; }
tr.todo td { background: #fff7e6; }

/* États financiers périodiques et annuels : document imprimable. */
.fin-doc { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 24px; }
.doc-cover { text-align: center; padding: 18px 0 14px; border-bottom: 3px solid var(--green); margin-bottom: 10px; }
.doc-cover h2 { margin: 0; font-size: 20px; color: var(--blue); }
.doc-cover .doc-fund { font-size: 17px; font-weight: 700; margin: 6px 0 2px; }
.doc-cover .doc-date { font-weight: 600; color: var(--green-dark); }
.doc-toc { display: inline-block; text-align: left; margin: 8px auto 0; color: var(--muted); }
.doc-section { margin-top: 18px; }
.doc-section > h2 { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.doc-annex .page-head, .doc-annex .annex-bar, .doc-annex .annex-toc { display: none; }
.fin-doc .statement { max-width: none; width: 100%; }
.fin-doc .inv td:first-child { width: auto; }
@media print {
	.topbar, .nav, .no-print, .notice, .btn, .ctx { display: none !important; }
	.layout { display: block; }
	.content { padding: 0; background: #fff !important; }
	.fin-doc { border: 0; padding: 0; }
	.doc-section { break-before: page; }
	.doc-cover { break-after: page; padding-top: 30vh; }
	.grid { font-size: 9.5pt; }
	.grid thead th { background: #1F6E9B !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.geco-box { margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
#geco-results { flex-basis: 100%; display: flex; flex-direction: column; gap: 4px; }
.geco-item { text-align: left; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 12px; }
.geco-item:hover { border-color: var(--green); background: var(--green-soft); }

/* ---------- v3.8 ---------- */
input.upper { text-transform: uppercase; }
.notice.warn { background: #fff7e6; color: #7a5200; border: 1px solid #f0c36d; border-left: 4px solid #e8a317; }
.notice.muted { background: #f6f7f9; color: var(--muted); }
.op-auto { margin: 10px 0 0; padding: 8px 12px; background: #f6f9f7; border-radius: 8px; }
.op-grid label .muted.small { display: block; font-weight: 400; margin-top: 2px; }
.switch-field > span:first-child { display: block; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin-top: 6px; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider { position: relative; flex: none; width: 38px; height: 22px; background: #cfd6dd; border-radius: 999px; transition: background .2s; }
.switch .slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::after { transform: translateX(16px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch-text { font-size: 13px; color: var(--muted); }
.switch input:checked ~ .switch-text { color: var(--text); }
a.isin-link { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; text-decoration: underline dotted; }
input.est-input { width: 120px; }
.part-sheet { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.fund-contacts { margin-top: 26px; }
.soon-row td { opacity: .7; }
.kpis > div.good { border-left-color: var(--green); }
.kpis > div.bad { border-left-color: #c0392b; }
.bar-nc { position: relative; display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: #eef1f4; margin: 0 0 18px; }
.bar-nc .ok { background: var(--green); }
.bar-nc .nc { background: #c0392b; }
.bar-nc .todo { background: #e8a317; }
.bar-nc i { position: absolute; top: 0; bottom: 0; width: 2px; background: #1d2b36; }
.tibi-grid select { font-size: 12px; max-width: 150px; }
.tibi-grid textarea { min-width: 220px; font-size: 12.5px; }
.tibi-sheet .checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 12px; }

/* ---------- v3.9 Ampère ---------- */
.amp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 6px 0 16px; }
.amp-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none; }
.amp-card.on { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-soft); }
.amp-card strong { font-size: 16px; color: var(--blue); }
.amp-bar { height: 6px; background: #eef1f4; border-radius: 999px; overflow: hidden; }
.amp-bar i { display: block; height: 100%; background: var(--green); }
.amp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-top: 8px; }
.amp-head h2 { margin: 0 0 4px; }
.amp-section { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.amp-section > summary { display: flex; gap: 10px; align-items: center; padding: 9px 14px; cursor: pointer; font-weight: 600; color: var(--blue); }
.amp-section > summary > span:first-child { flex: 1; }
.amp-fields { margin: 0; border-radius: 0; }
.amp-fields td { vertical-align: top; padding: 6px 10px; }
.amp-code { width: 34%; }
.amp-code code { font-size: 11.5px; word-break: break-all; }
.amp-def { width: 38%; font-size: 12.5px; }
.amp-val input, .amp-val select { width: calc(100% - 52px); font-size: 13px; }
.amp-fields tr.missing td { background: #fff8f0; }
.req { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 0 5px; border-radius: 4px; background: #eef1f4; color: var(--muted); }
.req-m { background: #fde8e8; color: #b42318; }
.req-c { background: #fff4e0; color: #8a5a00; }
.amp-pos input { width: 92px; font-size: 12px; }
.amp-pos input.has-auto::placeholder { color: #6b7a86; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(255,255,255,.95); padding: 10px 0; }
.amp-head .btn { white-space: nowrap; }
.findatex-box { margin-top: 22px; }
.findatex-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 8px 0; }
.findatex-log { margin: 4px 0 0; padding-left: 18px; color: var(--muted); }

/* ---------- v4.0 AIFMD ---------- */
.aifmd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; margin: 10px 0 16px; }
.aifmd-grid section { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.aifmd-grid h3 { margin: 2px 0 8px; font-size: 14px; color: var(--blue); }
.aifmd-grid table { margin: 0; font-size: 12.5px; }
.xml-preview { max-height: 420px; overflow: auto; background: #0f1d27; color: #d6e4ee; padding: 12px; border-radius: 8px; font-size: 11.5px; }
.aifmd-form h2 { margin-top: 18px; }

/* ---------- v4.1 États financiers : présentation compacte et impression page par page ---------- */
.fin-doc { max-width: 1000px; }
.fin-doc .statement { width: auto; max-width: 860px; }
.fin-doc .statement td:first-child { width: 440px; max-width: 440px; }
.fin-doc .statement th.num, .fin-doc .statement td.num { width: 130px; }
.fin-doc .statement td, .fin-doc .statement th { padding-top: 3px; padding-bottom: 3px; font-size: 12px; }
.fin-doc .statement.vl { max-width: 640px; }
.fin-doc .doc-inv .table-wrap { overflow: visible; }
.fin-doc .statement.inv { width: 100%; max-width: none; table-layout: auto; }
.fin-doc .statement.inv td, .fin-doc .statement.inv th { font-size: 11px; white-space: normal; }
.fin-doc .statement.inv td:first-child { width: auto; max-width: 260px; }
.fin-doc .statement.inv th.num, .fin-doc .statement.inv td.num { width: auto; white-space: nowrap; }
.fin-doc .doc-cover { padding: 8px 0 8px; }
.fin-doc .doc-cover p { margin: 2px 0; }
.fin-doc .doc-section > h3 { margin: 10px 0 4px; font-size: 13px; }
@page { size: A4 portrait; margin: 12mm 12mm 14mm; }
@page paysage { size: A4 landscape; margin: 10mm 12mm; }
@media print {
	.fin-doc { max-width: none; }
	.fin-doc .doc-cover { break-after: auto; padding: 0 0 4mm; margin-bottom: 3mm; }
	.fin-doc .doc-cover h2 { font-size: 14pt; }
	.fin-doc .doc-cover .doc-fund { font-size: 12pt; }
	.fin-doc .doc-section { margin-top: 0; break-before: page; }
	.fin-doc .doc-section.doc-bilan { break-before: auto; }
	.fin-doc .doc-section > h2 { font-size: 12pt; margin: 0 0 2mm; }
	.fin-doc .doc-section > h3 { font-size: 10pt; margin: 2mm 0 1mm; }
	.fin-doc .table-wrap { overflow: visible !important; }
	.fin-doc .statement { width: 100%; max-width: none; }
	.fin-doc .statement td, .fin-doc .statement th { font-size: 8pt; padding: 1.2px 5px; line-height: 1.2; }
	.fin-doc .statement td:first-child { width: auto; max-width: none; }
	.fin-doc .statement tr.lvl2 td { font-size: 7.5pt; }
	.fin-doc .doc-bilan, .fin-doc .doc-bilan table { break-inside: avoid; }
	.fin-doc .doc-inv { page: paysage; }
	.fin-doc .doc-inv .statement td, .fin-doc .doc-inv .statement th { font-size: 7.5pt; }
	.fin-doc .doc-section p.muted { font-size: 7pt; margin: 1mm 0; }
	.fin-doc .doc-annex { page: auto; }
}
@media print {
	html, body, .layout, .content, .fin-doc, .fin-doc .doc-inv { overflow: visible !important; }
	.fin-doc .doc-inv { width: 273mm; max-width: none; }
	.fin-doc .doc-inv .statement.inv, .fin-doc .doc-inv .statement { width: 273mm !important; max-width: 273mm !important; }
	.fin-doc .doc-inv .statement.vl { width: 150mm !important; max-width: 150mm !important; }
	.fin-doc .doc-inv .statement td, .fin-doc .doc-inv .statement th { padding: 1px 5px; }
}

/* ---------- v4.2 Informations de la participation pour les reportings ---------- */
.px-box { margin: 12px 0 4px; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; background: #fbfcfd; }
.px-box > summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.px-group { border: 0; margin: 8px 0 0; padding: 0; }
.px-group legend { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--green-dark); padding: 0; margin-bottom: 4px; }
.px-used { display: inline-block; margin-left: 4px; font-size: 10px; font-weight: 600; color: var(--blue); background: var(--blue-soft); border-radius: 999px; padding: 0 6px; vertical-align: 1px; align-self: flex-start; width: max-content; }
.siren-inline { display: flex; gap: 6px; }
.siren-inline input { flex: 1; }

/* ---------- v4.4 Colonnes resserrées, états centrés ---------- */
.content .grid.ledger { width: auto; min-width: 640px; max-width: 100%; margin-left: auto; margin-right: auto; }
.content .grid.ledger td, .content .grid.ledger th { white-space: nowrap; }
.content .grid.ledger td:not(.num) { white-space: normal; max-width: 460px; }
.content .grid.ledger td.date, .content .grid.ledger td:first-child { white-space: nowrap; }
.entry-grid td input[type="date"], .entry-grid td input[data-date] { padding-left: 6px; padding-right: 2px; }
.center-col { max-width: 860px; margin: 0 auto; }
.center-col .statement { margin-left: auto; margin-right: auto; }
.fin-doc { margin-left: auto; margin-right: auto; }
.fin-doc .doc-cover, .fin-doc .doc-section { max-width: 860px; margin-left: auto; margin-right: auto; }
.fin-doc .statement { margin-left: auto; margin-right: auto; }
.fin-doc .doc-section.doc-inv { max-width: none; }
@media print {
	.fin-doc .doc-cover, .fin-doc .doc-section, .center-col { max-width: none; }
	.fin-single .doc-section { break-before: auto; }
}

/* ---------- v4.6 Schéma comptable aligné ---------- */
.schema-grid td, .schema-grid th { vertical-align: top; }
.schema-grid th.schema-op, .schema-grid td.schema-op { width: 230px; min-width: 230px; }
.schema-grid td input { width: 92px; }
.schema-grid .schema-label { max-width: 150px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
h2.schema-group { margin-top: 18px; }

.coupon-pay { margin-top: 4px; text-align: left; font-size: 12px; }
.coupon-pay .pay-form { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.coupon-pay .pay-form input[type=date] { width: 130px; }

/* ---------- v4.6 Portefeuille par blocs ---------- */
.ledger tr.pf-block td { background: var(--blue-soft); color: var(--blue); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 11.5px; }
.ledger tr.pf-sub td { font-weight: 600; background: #f9fafb; }
.ledger tfoot tr.pf-other td { font-weight: 500; background: #fff; }
.ledger tfoot tr.pf-net th { background: var(--green); color: #fff; font-size: 13px; }

/* ---------- v4.7 Sécurité ---------- */
.tag.bad { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.block-box form { display: flex; gap: 4px; margin-top: 4px; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.sec-log tr.sec-warn td { background: #fffbeb; }
.sec-log tr.sec-alert td { background: #fef2f2; }
.sec-log .list-bar { flex-wrap: wrap; gap: 6px; }

/* v4.8 – ILPA */
.ilpa-grid td:first-child, .ilpa-grid th:first-child { width: 22rem; min-width: 22rem; max-width: 22rem; white-space: normal; }
.ilpa-grid td.num { white-space: nowrap; }
.ilpa-grid td.neg { color: var(--danger, #b42318); }
.ilpa-grid tr.total td { font-weight: 600; border-top: 1px solid var(--line, #d0d5dd); }
.ilpa-grid tr.sub td { background: var(--soft, #f6f7f9); }
