/*
 * v4.37.0 §6 — LE PORTAIL INVESTISSEUR. Feuille autonome (aucune dépendance).
 * v4.38.0 §1 — AUCUNE COULEUR DE MARQUE ICI : `--accent`, `--accent-ink`, `--accent-soft`,
 * `--gold*` sont posés par la coquille (`layouts/investisseur`) depuis l'identité de
 * l'installation, déclinés par `PaletteTheme` (contraste mesuré ≥ 4,5 : 1). La graphie est celle
 * de l'espace client : Plus Jakarta Sans (servie par l'application), rayons 20 / 15 / 11, boutons
 * de 44 px. Ne restent ici que des neutres : gris, « Prévisionnel » (ambre), bon / mauvais.
 * Les champs de saisie sont à 16 px au moins : en dessous, iOS zoome la page au focus.
 */
:root {
    --fond: #f0eee8;
    --carte: #ffffff;
    --encre: #1b1d25;
    --doux: #5f6270;
    --trait: #e9e6df;
    --accent-doux: var(--accent-soft);
    --prev: #92400e;
    --prev-fond: #fef3c7;
    --projection: #b45309;
    --bon: #2f7d57;
    --mauvais: #a3342f;
    --plaque: #ffffff;
    --plaque-trait: #e2ded4;
    --rayon: 15px;
    --r-lg: 20px; --r-md: 15px; --r-sm: 11px;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--encre);
    background: var(--fond);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--fond); }
body { font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); text-decoration: none; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 16px; margin: 0 0 10px; }
h3 { font-size: 14px; margin: 0 0 8px; color: var(--doux); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
input, select, textarea, button { font: inherit; font-size: 16px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--trait); border-radius: var(--r-sm); background: #fff; color: var(--encre); }
textarea { min-height: 96px; }
label { display: block; font-size: 14px; color: var(--doux); margin-bottom: 6px; }

.coquille { display: flex; min-height: 100vh; min-height: 100dvh; }
.cote { width: 232px; flex: 0 0 232px; background: var(--carte); border-right: 1px solid var(--trait); padding: 22px 14px; position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 4px; }
.cote .marque { font-weight: 700; font-size: 16px; padding: 4px 10px 18px; }
.cote .marque small { display: block; font-weight: 500; color: var(--doux); font-size: 12px; }
.cote a.lien { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--encre); font-weight: 500; }
.cote a.lien:hover { background: var(--fond); text-decoration: none; }
.cote a.lien.actif { background: var(--accent-doux); color: var(--accent); }
.cote .bas { margin-top: auto; }
.principal { flex: 1; min-width: 0; padding: 26px 30px 40px; max-width: 1180px; }
.entete { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.entete .sous { color: var(--doux); }
.onglets-bas { display: none; }

.grille { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--r-md); padding: 16px 18px; min-width: 0; }
.chiffre { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.grand { font-size: 32px; font-weight: 750; letter-spacing: -0.02em; }
.muet { color: var(--doux); font-size: 13px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent-doux); color: var(--accent); }
.prev { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--prev-fond); color: var(--prev); vertical-align: middle; }
.bon { color: var(--bon); } .mauvais { color: var(--mauvais); }
.alerte { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.alerte.mauvais { background: #FEF2F2; color: var(--mauvais); }
.alerte.bon { background: #ECFDF5; color: var(--bon); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 15px; min-height: 44px; border-radius: var(--r-sm); border: 1px solid var(--trait); background: #fff; color: var(--encre); cursor: pointer; font-weight: 700; font-size: 13.5px; letter-spacing: .01em; }
.btn.primaire { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.large { width: 100%; }
.selecteur { display: inline-flex; gap: 4px; background: var(--fond); padding: 3px; border-radius: 10px; }
.selecteur button { border: 0; background: transparent; padding: 5px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--doux); }
.selecteur button.actif { background: #fff; color: var(--encre); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.graphe { width: 100%; height: 220px; display: block; }
.anneau { width: 150px; height: 150px; }
.mini { width: 90px; height: 26px; }
.legende { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.legende li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.table-defile { overflow-x: auto; }
table.positions { width: 100%; border-collapse: collapse; font-size: 14px; }
table.positions th { text-align: left; color: var(--doux); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; padding: 8px 10px; border-bottom: 1px solid var(--trait); white-space: nowrap; }
table.positions td { padding: 10px; border-bottom: 1px solid var(--trait); vertical-align: middle; white-space: nowrap; }
table.positions td.num, table.positions th.num { text-align: right; font-variant-numeric: tabular-nums; }
.jauge { width: 110px; height: 6px; background: var(--fond); border-radius: 99px; overflow: hidden; }
.jauge > span { display: block; height: 100%; background: var(--accent); }
.evenements { list-style: none; padding: 0; margin: 0; }
.evenements li { padding: 8px 0; border-bottom: 1px solid var(--trait); font-size: 14px; }
.evenements li:last-child { border-bottom: 0; }
.formule { background: var(--accent-doux); border-radius: var(--rayon); padding: 14px 18px; font-size: 14px; }
.porte { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.porte .carte { width: 100%; max-width: 420px; padding: 26px; border-radius: var(--r-lg); }

/* v4.38.0 §1 — Le logo : TOUJOURS sur plaque claire. */
.plaque-logo { display: inline-flex; align-items: center; background: var(--plaque); border: 1px solid var(--plaque-trait); border-radius: 9px; padding: 5px 8px; max-width: 100%; }
.plaque-logo img { display: block; max-height: 40px; max-width: 180px; width: auto; height: auto; }
.plaque-logo.petit img { max-height: 28px; max-width: 120px; }
.cote .marque .plaque-logo { margin-bottom: 8px; }
.porte-logo { margin-bottom: 14px; }
.entete-mobile { display: none; }
.source summary { cursor: pointer; list-style: none; }
.source summary::-webkit-details-marker { display: none; }
.source .detail { font-size: 13px; padding-left: 12px; }
.source.exclue summary span, .source.exclue .detail span { color: var(--doux); text-decoration: line-through; }
.source.exclue summary .muet { text-decoration: none; }
.pagination { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 10px; }
.champ { margin-bottom: 14px; }
.liste-cartes { display: grid; gap: 12px; }
.ligne { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--trait); }
.ligne:last-child { border-bottom: 0; }

@media (max-width: 1080px) {
    .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .cote { display: none; }
    .entete-mobile { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 700; }
    .principal { padding: 18px 16px 96px; }
    .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
    .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grand { font-size: 28px; }
    .onglets-bas { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
        background: var(--carte); border-top: 1px solid var(--trait); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
    .onglets-bas a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--doux); padding: 4px; }
    .onglets-bas a.actif { color: var(--accent); }
    .onglets-bas a:hover { text-decoration: none; }
}
