/* ToutSachetInvest – styles propres à la page outils.html (chargés après style.css, seulement sur cette page).
   Fichier rempli par automatisation/css-split.py : les règles y gardent leur ordre d'origine. */
.tool-hint { color: var(--muted); font-size: .9rem; margin-top: -.4rem; }
#i-pct { font-family: var(--f-mono); color: var(--gold); font-weight: 500; }
.stackbar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface); }
.stackbar span { display: block; height: 100%; }
.chart-wrap { min-width: 0; }
.sim-chart { width: 100%; height: auto; }
.sim-chart text { fill: var(--muted); font-family: var(--f-mono); font-size: 11px; }
.sw-paid, .sw-int { background: #8FB5A3; }
.sw-gain { background: var(--teal); }
.sw-fix { background: var(--paper); width: 3px; }
.score-total { font-weight: 700; font-size: 1.05rem; }
.score-total b { font-family: var(--f-mono); color: var(--green); }
.ext-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.ext-links a { text-decoration: none; color: var(--fg); padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--line); font-size: .9rem; transition: border-color .2s, color .2s; }
.ext-links a::after { content: " ↗"; color: var(--teal); }
.ext-links a:hover { border-color: var(--teal); color: var(--teal); }
.score-list .ko .mark { background: rgba(200,44,32,.35); color: #FFD7D2; }
.score-list .mid .mark { background: rgba(255,255,255,.14); color: var(--paper); }
.compare-bars { display: grid; gap: .8rem; }
.cb-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) 6.5rem; gap: .8rem; align-items: center; }
.cb-label { font-size: .9rem; font-weight: 600; }
.cb-bar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: rgba(255,255,255,.06); }
.cb-bar span { display: block; height: 100%; }
.cb-val { font-family: var(--f-mono); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw-zul { background: var(--red); }
@media (max-width: 640px) {
.cb-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: .4rem; }
.cb-label { grid-column: 1; grid-row: 1; }
.cb-val { grid-column: 2; grid-row: 1; }
.cb-bar { grid-column: 1 / -1; grid-row: 2; }
}
.tool-intro { color: var(--muted); font-size: .92rem; }
.page-outils #outils h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.2rem); }
.sw-real { background: transparent; border: 2px dashed var(--paper); }
.sw-loss { background: var(--red); }
.fchip-link { display: inline-flex; align-items: center; text-decoration: none; color: var(--teal); border-style: dashed; }
.fchip-link:hover { border-color: var(--teal); }
.tool-cta-btns { display: flex; flex-wrap: wrap; gap: .6rem; }
.tool-cta-center .tool-cta-btns { justify-content: center; }
.rb-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 40px; gap: .4rem; align-items: end; padding: .6rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(0,0,0,.08); }
.rb-row .rb-name { grid-column: 1 / -1; }
.rb-f { display: grid; gap: .2rem; font-size: .75rem; color: var(--muted); font-weight: 600; }
.rb-row input[type=number] { -moz-appearance: textfield; }
.rb-row input::-webkit-outer-spin-button, .rb-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rb-rows { display: grid; gap: .45rem; }
.rb-row input { width: 100%; min-width: 0; font: inherit; font-size: .92rem; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .55rem; min-height: 40px; }
.rb-del { font: inherit; background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; min-height: 40px; cursor: pointer; }
.rb-del:hover { color: var(--danger); border-color: var(--danger); }
#rb-add { justify-self: start; }
.rb-bars { display: grid; gap: .55rem; }
.rb-bar { display: grid; grid-template-columns: minmax(0, 130px) minmax(0, 1fr); gap: .6rem; align-items: center; font-size: .85rem; }
.rb-bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); }
.rb-track { display: grid; gap: 3px; }
.rb-track i { display: block; height: 8px; border-radius: 4px; min-width: 2px; }
.rb-cur { background: #8FB5A3; }
.rb-tg { background: var(--gold); }
.opt-desc { margin: -.2rem 0 0; font-size: .88rem; color: var(--soft); background: rgba(255,255,255,.05); border-radius: 8px; padding: .55rem .7rem; }
.tool-wide { grid-template-columns: minmax(0, 1fr); }
.scr-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.bk-intro { color: var(--soft); max-width: 70ch; }
.bk-table th[scope="row"] { font-weight: 700; color: var(--fg); white-space: nowrap; }
.bk-table td { font-size: .92rem; white-space: normal !important; min-width: 7.5rem; }
.bk-table td:last-child { min-width: 14rem; color: var(--soft); }
@media (max-width: 700px) {
.scr-controls { grid-template-columns: minmax(0, 1fr); }
.rb-bar { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
}
.rb-row input { font-size: 1rem; }
.rb-table th, .rb-table td { white-space: normal !important; font-size: .9rem; }
@media (max-width: 700px) {
.bk-table thead { display: none; }
.bk-table, .bk-table tbody, .bk-table tr { display: block; width: 100%; }
.bk-table tr { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .7rem; background: rgba(0,0,0,.08); }
.bk-table th[scope="row"] { display: block; padding: 0 0 .4rem; font-size: 1.02rem; border: 0; white-space: normal; }
.bk-table td { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; min-width: 0 !important; border: 0; text-align: right; }
.bk-table td::before { content: attr(data-label); color: var(--muted); font-family: var(--f-body); font-size: .82rem; text-align: left; flex: 0 0 auto; max-width: 45%; }
.bk-table td:last-child { min-width: 0; }
}
.bk-table td { text-align: left; font-family: var(--f-body); }
.bk-table thead th { white-space: nowrap; }
@media (max-width: 700px) {
.bk-table td { text-align: right; }
}
.bk-table th[scope="row"], .bk-table td { padding-right: .8rem; }
@media (max-width: 700px) {
.bk-table td { padding-right: 0; }
}
.sim-chart text { fill: #7F9A92; }
.tf-group { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem 1rem; margin: 0; display: grid; gap: var(--s-2); min-width: 0; }
.tf-group legend { display: inline-flex; align-items: center; gap: .5rem; padding: 0 .4rem; font-weight: 700; font-size: .95rem; color: var(--fg); }
.tf-group legend span { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--gold); color: #0B0F0D; font-size: .8rem; font-weight: 800; }
.tool-sub { margin: var(--s-3) 0 .4rem; font-size: 1rem; }
.gauge { position: relative; display: grid; grid-template-columns: 70fr 10fr 20fr; height: 10px; border-radius: 999px; overflow: visible; margin: var(--s-2) 0 .3rem; }
.gauge span:first-child { border-radius: 999px 0 0 999px; }
.gauge span:nth-child(3) { border-radius: 0 999px 999px 0; }
.gauge .g-ok { background: rgba(0,229,200,.55); }
.gauge .g-mid { background: rgba(255,207,63,.75); }
.gauge .g-hi { background: rgba(200,44,32,.75); }
.gauge i { position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--fg); box-shadow: 0 0 0 2px #050B09; transition: left .3s ease; }
.gauge-legend { display: grid; grid-template-columns: 70fr 10fr 20fr; font-size: .72rem; color: var(--muted); margin: 0 0 var(--s-2); }
.gauge-legend span:nth-child(2) { text-align: center; }
.gauge-legend span:nth-child(3) { text-align: right; }
@media (prefers-reduced-motion: reduce) {
.gauge i { transition: none; }
}
.ins-chips { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: var(--s-2); }
.ins-chips-l { font-weight: 700; margin-right: .3rem; }
.ins-count { min-height: 1.4em; color: var(--tech); font-weight: 600; margin: 0 0 var(--s-2); }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: var(--s-3); }
.ins-card { display: grid; align-content: start; gap: .45rem; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card, #0D1A17); transition: opacity .25s, border-color .25s; }
.ins-card h3 { margin: 0; font-size: 1.1rem; }
.ins-card p { margin: 0; color: var(--soft); font-size: .93rem; }
.ins-card .ins-de { color: var(--muted); font-size: .82rem; font-style: italic; }
.ins-card .ins-tip { font-size: .86rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .5rem; }
.ins-card .ins-tip b { color: var(--fg); }
.ins-badge { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .72rem !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ins-must .ins-badge { color: #FF8A80 !important; }
.ins-top .ins-badge { color: var(--gold) !important; }
.ins-sit .ins-badge { color: var(--tech) !important; }
.ins-must { border-left: 3px solid #FF6B5E; }
.ins-top { border-left: 3px solid var(--gold); }
.ins-sit { border-left: 3px solid var(--tech); }
.ins-you { display: none; padding: .1rem .5rem; border-radius: 999px; background: var(--tech); color: #04110E; letter-spacing: .04em; }
.ins-card.for-you { border-color: rgba(0,229,200,.6); }
.ins-card.for-you .ins-you { display: inline-block; }
.ins-card.dim { opacity: .5; }
.ins-skip { margin-top: var(--s-4); padding: var(--s-3); border: 1px dashed var(--line); border-radius: var(--radius); }
.ins-skip h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.ins-skip ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .4rem; color: var(--soft); }
.gov-disclaimer { border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius); background: var(--card, #0D1A17); padding: var(--s-3); margin-bottom: var(--s-3); }
.gov-disclaimer p { margin: 0; color: var(--soft); }
.gov-disclaimer b { color: var(--fg); }
.src-table td:last-child { white-space: nowrap; }
.src-table a { color: var(--tech); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) {
.src-table td:last-child { white-space: normal; }
}
.table-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.src-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.src-table th { text-align: left; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.src-table td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--soft); white-space: normal; font-family: inherit; text-align: left; }
.src-table td:last-child { width: 38%; }
@media (max-width: 600px) {
.src-table thead { display: none; }
.src-table tr { display: grid; gap: .25rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.src-table td { border: 0; padding: 0; width: auto !important; }
}
.gl-cat { margin: 1.6rem 0 .6rem; font-size: 1rem; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; }
.gl-list { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.gl-list > div { border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: .8rem .9rem; background: rgba(0,0,0,.18); }
.gl-list dt { font-weight: 800; color: #fff; margin-bottom: .2rem; }
.gl-list dd { margin: 0; color: var(--soft, #DCE2DF); font-size: .93rem; }
.ins-card { min-width: 0; }
.ins-card h3, .ins-card p { overflow-wrap: anywhere; }
.sw-gold { background: #FFCF3F; }
.sw-cyan { background: #00E5C8; }
.tr-chips { display: flex; gap: .5rem; margin: .5rem 0 0; }
.tr-chip { font: inherit; font-size: .88rem; font-weight: 600; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; cursor: pointer; min-height: 44px; }
.tr-chip:hover, .tr-chip:focus-visible { color: var(--fg); border-color: var(--chrome-1); }
.tr-h { margin: var(--s-3) 0 .4rem; font-size: 1rem; }
.tr-table th, .tr-table td { white-space: normal; text-align: left; font-family: inherit; font-weight: 500; vertical-align: top; padding: .6rem .5rem; font-size: .9rem; }
.tr-table tbody th { color: var(--fg); font-weight: 700; }
.tr-table { min-width: 560px; }

/* ===== Page Outils façon application : une rubrique à la fois ===== */
.ot-top { padding-top: clamp(1.6rem, 4vw, 2.6rem); }
.ot-top .section-head { margin-bottom: 1rem; }
.ot-nav-h { display: none; }
.ot-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ot-nav-i { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .5rem .8rem; border: 0; border-radius: 12px; background: transparent; color: #B9C6C1; font: inherit; font-size: .93rem; font-weight: 600; cursor: pointer; white-space: nowrap; text-align: left; }
.ot-nav-i:hover { color: #fff; background: rgba(255,255,255,.04); }
.ot-nav-i[aria-current="true"] { background: rgba(255,207,63,.12); color: #FFE38A; }
.ot-nav-i[aria-current="true"] .ot-ico { color: #FFCF3F; }
.ot-main > .section { padding-block: .4rem 2rem; background: none; border: 0; }
.ot-main > .section > .wrap { max-width: none; padding-inline: 0; }
.ot-main #outils .section-head { display: none; }
.bk-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: .4rem 0 .9rem; }
.bk-filters-l { font-size: .85rem; color: var(--muted); margin-right: .2rem; }
.bk-count { flex-basis: 100%; font-size: .88rem; color: #FFE38A; min-height: 1.2em; }
.bk-table tr[hidden] { display: none; }
@media (min-width: 1024px) {
  .ot-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2rem; align-items: start; padding-bottom: 2rem; }
  .ot-nav { position: sticky; top: 88px; display: flex; flex-direction: column; gap: .15rem; padding: .8rem; border-radius: 20px; background: #070B0A; border: 1px solid #1C2422; max-height: calc(100vh - 110px); overflow-y: auto; }
  .ot-nav-h { display: block; margin: .9rem .7rem .3rem; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6F7C78; }
  .ot-nav-h:first-child { margin-top: .2rem; }
  .ot-nav-i { width: 100%; white-space: normal; text-align: left; line-height: 1.25; } /* libellés longs (« Comparer les comptes bancaires », DE) : passent à la ligne au lieu de déborder */
  .ot-nav-i .ot-ico { flex: none; }
  .ot-nav-i[aria-current="true"] { box-shadow: inset 3px 0 0 #FFCF3F; }
}
@media (max-width: 1023px) {
  .ot-nav { position: sticky; top: var(--hdr-h, 68px); z-index: 30; display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 1rem; padding: .5rem 16px; background: rgba(4, 8, 7, .96); border-bottom: 1px solid #1C2422; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); }
  .ot-nav::-webkit-scrollbar { display: none; }
  .ot-nav-i { flex: none; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: .4rem .85rem; font-size: .88rem; }
  .ot-nav-i[aria-current="true"] { border-color: rgba(255,207,63,.6); }
  .ot-nav-i .ot-ico { width: 17px; height: 17px; }
}
/* App iPhone : pas d'en-tête du site, la barre des rubriques colle en haut */
html.in-ios .ot-nav { top: env(safe-area-inset-top, 0px); }

/* Outils diaspora : points à retenir sous les résultats */
.fine-list { margin: .2rem 0 0; padding-left: 1.1rem; display: grid; gap: .45rem; font-size: .88rem; color: var(--soft); max-width: 72ch; }
.fine-list li::marker { color: var(--gold); }

/* Classes d'impôt des couples : tableau des trois choix */
.sk-table td, .sk-table th { white-space: nowrap; }
@media (max-width: 640px) { .sk-table td, .sk-table th { white-space: normal; } }
#banques .bk-table th[scope="row"] { white-space: normal; min-width: 8rem; }
#banques .bk-table td:last-child { min-width: 11rem; }

/* Page plus légère : les sections sous les calculateurs ne sont dessinées qu'à l'approche de l'écran */
#assurances, #sources-officielles, #banques, #courtiers, #tracker, #glossaire { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* Chercher un bien sur tous les portails */
.ch-portails { list-style: none; margin: .4rem 0 .6rem; padding: 0; display: grid; gap: .55rem; }
.ch-lien { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: .8rem; min-height: 48px; text-align: left; }
.ch-lien span { font-size: .82rem; font-weight: 500; opacity: .85; }
.ch-membres { display: grid; gap: .5rem; justify-items: start; margin-top: 1rem; padding: 1rem; border-radius: 16px; background: rgba(201,164,76,.08); border: 1px solid rgba(201,164,76,.45); }
.ch-membres .kicker, .ch-membres h4 { margin: 0; }
.ch-avantages { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; font-size: .92rem; color: var(--soft); }

/* Comparateurs « réseau de vente » et « contrat de retraite ou ETF » (js/outils-compare.js) */
.vt-flags { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid rgba(255,156,143,.35); background: rgba(255,156,143,.06); }
.vt-flags h4 { margin: 0 0 .5rem; }
.vt-list { margin: 0; padding-left: 1.1rem; display: grid; gap: .45rem; }

/* Recherche « Quel outil cherchez-vous ? » */
.ot-search { position: relative; max-width: 620px; margin: 0 0 1.2rem; display: grid; gap: .45rem; }
.ot-search-l { font-weight: 700; color: var(--fg); font-size: 1rem; }
.ot-search input { width: 100%; min-height: 52px; padding: .7rem 1rem; font: inherit; font-size: 1.02rem; color: var(--fg); background: #0B100F; border: 1px solid #2A3533; border-radius: 14px; }
.ot-search input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-color: var(--gold); }
.ot-res { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; margin: .35rem 0 0; padding: .35rem; list-style: none; background: #070B0A; border: 1px solid #2A3533; border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.55); max-height: min(60vh, 440px); overflow-y: auto; }
.ot-res button { display: grid; gap: .1rem; width: 100%; min-height: 48px; padding: .55rem .8rem; text-align: left; font: inherit; color: var(--fg); background: transparent; border: 0; border-radius: 10px; cursor: pointer; }
.ot-res button:hover, .ot-res button:focus-visible { background: rgba(255,207,63,.10); outline: none; }
.ot-res small { color: var(--muted); font-size: .82rem; }
.ot-res-vide { padding: .7rem .8rem; color: var(--muted); }
