/* Simulateur tarifaire (2.24.0) — partagé par l'application (#/tarifs) et la page publique (/tarifs).
   Il emploie les jetons du système de conception (--surface, --text, --primary…) ; la page publique les définit
   elle-même (tarifs-public.css), en clair et en sombre. */

.ts { --ts-a: #1795d0; --ts-b: #7c3aed; --ts-c: #e8791d; --ts-r: var(--radius, 10px);
  color: var(--text, #17202b); display: grid; gap: 18px; }
.ts-charge { padding: 40px; text-align: center; color: var(--text-muted, #5f6e80); }
.ts-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ts-h1 { font-size: 1.6rem; margin: 0 0 4px; letter-spacing: -.01em; }
.ts-h2 { font-size: 1.25rem; margin: 0; }
.ts-h3 { font-size: 1.05rem; margin: 0 0 8px; }
.ts-sous { margin: 0; color: var(--text-muted, #5f6e80); max-width: 62ch; }
.ts-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.ts-badge { font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: var(--surface-3, #eef2f6); color: var(--text-2, #3b4a5c); border: 1px solid var(--border, #dfe6ee); }
.ts-badge-avert { background: var(--caution-soft, #fff6d6); color: var(--caution-text, #713f12); border-color: var(--caution-border, #fde68a); }
.ts-bandeau { padding: 10px 14px; border-radius: var(--ts-r); background: var(--info-soft, #e3f1fa); color: var(--info-text, #0b4e73); border: 1px solid var(--info-border, #cfe6f5); }
.ts-err { padding: 10px 14px; border-radius: var(--ts-r); background: var(--error-soft, #fdecec); color: var(--error-text, #86181d); border: 1px solid var(--error-border, #f1c4c6); }
.ts-aide { color: var(--text-muted, #5f6e80); font-size: .85rem; margin: 4px 0; }

/* profils */
.ts-profils { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.ts-profil { text-align: start; display: grid; gap: 6px; padding: 14px; border-radius: var(--ts-r); cursor: pointer; font: inherit; color: inherit;
  background: var(--surface, #fff); border: 1px solid var(--border, #dfe6ee);
  transition: border-color var(--dur, 180ms) var(--ease, ease), box-shadow var(--dur, 180ms) var(--ease, ease), transform var(--dur, 180ms) var(--ease, ease); }
.ts-profil:hover { border-color: var(--border-hover, #c7d2de); transform: translateY(-1px); }
.ts-profil.on { border-color: var(--primary, #0b6fa4); box-shadow: 0 0 0 2px var(--primary-soft, #e3f1fa); background: var(--primary-softer, #f2f8fc); }
.ts-profil:focus-visible, .ts-seg button:focus-visible, .ts-chip:focus-visible, .ts-palier:focus-visible, .ts-btn:focus-visible { outline: 2px solid var(--primary, #0b6fa4); outline-offset: 2px; }
.ts-profil-t { font-weight: 700; }
.ts-profil-d { font-size: .82rem; color: var(--text-muted, #5f6e80); line-height: 1.35; }
.ts-profil-f { display: flex; gap: 4px; }
.ts-pastille { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: .75rem; font-weight: 700; color: #fff; }
.ts-fA { --ts-k: var(--ts-a); } .ts-fB { --ts-k: var(--ts-b); } .ts-fC { --ts-k: var(--ts-c); }
.ts-pastille.ts-fA, .ts-pastille.ts-fB, .ts-pastille.ts-fC { background: var(--ts-k); }

/* grille formulaire / résultat */
.ts-grille { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.ts-form { display: grid; gap: 12px; }
.ts-bloc { margin: 0; border: 1px solid var(--border, #dfe6ee); border-radius: var(--ts-r); background: var(--surface, #fff); padding: 12px 16px 14px; min-width: 0; }
.ts-bloc legend { font-weight: 700; padding: 0 6px; }
.ts-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; background: var(--surface-3, #eef2f6); border-radius: 8px; }
.ts-seg button { font: inherit; font-size: .85rem; border: 0; background: transparent; color: var(--text-2, #3b4a5c); padding: 6px 10px; border-radius: 6px; cursor: pointer;
  transition: background var(--dur-fast, 120ms), color var(--dur-fast, 120ms); }
.ts-seg button.on { background: var(--surface, #fff); color: var(--primary, #0b6fa4); box-shadow: 0 1px 2px rgb(var(--shadow-rgb, 16 24 40) / .12); font-weight: 600; }
.ts-seg button:disabled { opacity: .45; cursor: not-allowed; }
.ts-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-chip { font: inherit; display: grid; text-align: start; gap: 1px; padding: 7px 10px; border-radius: 8px; cursor: pointer; color: inherit;
  border: 1px solid var(--border, #dfe6ee); background: var(--surface-2, #f8fafc); transition: all var(--dur-fast, 120ms) var(--ease, ease); }
.ts-chip span { font-size: .86rem; font-weight: 600; }
.ts-chip small { font-size: .74rem; color: var(--text-muted, #5f6e80); }
.ts-chip.on { border-color: var(--primary, #0b6fa4); background: var(--primary-soft, #e3f1fa); }
.ts-chip.on small { color: var(--primary, #0b6fa4); }
.ts-paliers { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.ts-palier { font: inherit; color: inherit; display: grid; gap: 2px; text-align: start; padding: 10px; border-radius: 8px; cursor: pointer; border: 1px solid var(--border, #dfe6ee); background: var(--surface-2, #f8fafc); }
.ts-palier span, .ts-palier small { font-size: .78rem; color: var(--text-muted, #5f6e80); }
.ts-palier.on { border-color: var(--primary, #0b6fa4); background: var(--primary-soft, #e3f1fa); }
.ts-curseur { display: grid; gap: 4px; margin: 8px 0; }
.ts-curseur-l { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ts-curseur-l label { font-weight: 600; font-size: .9rem; }
.ts-val { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--primary, #0b6fa4); }
.ts-curseur input[type=range] { width: 100%; accent-color: var(--primary, #0b6fa4); }
.ts-curseur-b { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ts-num { width: 84px; font: inherit; padding: 4px 6px; border: 1px solid var(--border-strong, #8491a1); border-radius: 6px; background: var(--surface, #fff); color: inherit; }
.ts-ligne { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.ts-lbl { font-weight: 600; font-size: .9rem; min-width: 90px; }
.ts-bascule { display: flex; gap: 8px; align-items: center; margin: 8px 0; cursor: pointer; }
.ts-bascule.off { opacity: .7; cursor: default; }
.ts-bascule input { width: 18px; height: 18px; accent-color: var(--primary, #0b6fa4); }

/* référentiels */
.ts-recherche { width: 100%; font: inherit; padding: 7px 10px; border: 1px solid var(--border-strong, #8491a1); border-radius: 8px; background: var(--surface, #fff); color: inherit; margin: 6px 0; }
.ts-refs-liste { max-height: 300px; overflow: auto; border: 1px solid var(--border-soft, #eef2f6); border-radius: 8px; padding: 6px 8px; }
.ts-ref-fam-t { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted, #5f6e80); margin: 8px 0 2px; }
.ts-ref { display: flex; align-items: center; gap: 8px; padding: 3px 2px; cursor: pointer; }
.ts-ref-enfant { margin-inline-start: 22px; }
.ts-ref-t { font-size: .88rem; }
.ts-tag { font-size: .72rem; color: var(--violet-text, #3730a3); background: var(--violet-soft, #eef2ff); border-radius: 999px; padding: 1px 7px; }
.ts-choisis { margin: 4px 0; }
.ts-chip-x span { font-weight: 500; }
.ts-groupe { font-size: .8rem; color: var(--text-2, #3b4a5c); padding: 2px 0; }

/* résultat */
.ts-res { position: sticky; top: calc(var(--top-h, 0px) + 12px); border-radius: calc(var(--ts-r) + 2px); padding: 18px; background: var(--surface, #fff);
  border: 1px solid var(--border, #dfe6ee); box-shadow: 0 10px 30px rgb(var(--shadow-rgb, 16 24 40) / .08); display: grid; gap: 6px; transition: opacity var(--dur, 180ms); }
.ts-res.ts-occupe { opacity: .72; }
.ts-prix { font-size: 2.3rem; font-weight: 800; letter-spacing: -.02em; color: var(--primary, #0b6fa4); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ts-prix-l { color: var(--text-muted, #5f6e80); margin-top: -4px; }
.ts-prix-a { font-size: .92rem; color: var(--text-2, #3b4a5c); }
.ts-essai { padding: 8px 10px; border-radius: 8px; background: var(--success-soft, #e7f6ee); color: var(--success-text, #135c33); }
.ts-tco { margin-top: 8px; }
.ts-tco-t { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted, #5f6e80); margin-bottom: 4px; }
.ts-tco-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ts-tco-c { background: var(--surface-2, #f8fafc); border: 1px solid var(--border-soft, #eef2f6); border-radius: 8px; padding: 6px 8px; display: grid; }
.ts-tco-c small { color: var(--text-muted, #5f6e80); font-size: .74rem; }
.ts-tco-c b { font-variant-numeric: tabular-nums; font-size: .92rem; }
.ts-ia { font-size: .82rem; color: var(--text-muted, #5f6e80); }
.ts-avert { margin: 4px 0; padding-inline-start: 18px; color: var(--warning-text, #7c2d12); font-size: .84rem; }
.ts-detail summary { cursor: pointer; font-weight: 600; margin: 6px 0; }
.ts-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.ts-table td { padding: 4px 2px; border-bottom: 1px solid var(--border-soft, #eef2f6); vertical-align: top; }
.ts-table td.n { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ts-rem td { color: var(--success-text, #135c33); }
.ts-tot td { font-weight: 700; }
.ts-sous { margin-top: 6px; }
.ts-sous-t { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted, #5f6e80); margin: 10px 0 2px; }
.ts-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ts-btn { font: inherit; font-size: .88rem; padding: 7px 12px; border-radius: 8px; cursor: pointer; border: 1px solid var(--border-hover, #c7d2de); background: var(--surface, #fff); color: inherit;
  transition: background var(--dur-fast, 120ms), border-color var(--dur-fast, 120ms); }
.ts-btn:hover { border-color: var(--primary, #0b6fa4); }
.ts-btn-p { background: var(--primary, #0b6fa4); color: var(--on-primary, #fff); border-color: var(--primary, #0b6fa4); }
.ts-btn-p:hover { background: var(--primary-hover, #095a86); }

/* comparatif */
.ts-cmp { border: 1px solid var(--border, #dfe6ee); border-radius: var(--ts-r); background: var(--surface, #fff); padding: 16px; display: grid; gap: 12px; }
.ts-cmp:empty { display: none; }
.ts-cmp-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ts-cmp-axe select { font: inherit; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border-strong, #8491a1); background: var(--surface, #fff); color: inherit; }
.ts-cmp-phrase { font-size: 1.02rem; font-weight: 600; margin: 0; }
.ts-cmp-cartes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ts-cmp-carte { position: relative; padding: 14px; border-radius: var(--ts-r); border: 1px solid var(--border, #dfe6ee); background: var(--surface-2, #f8fafc); display: grid; gap: 4px;
  border-top: 4px solid var(--ts-k); transition: transform var(--dur, 180ms) var(--ease-out, ease), box-shadow var(--dur, 180ms); }
.ts-cmp-carte.meilleure { box-shadow: 0 0 0 2px var(--ts-k), 0 10px 24px rgb(var(--shadow-rgb, 16 24 40) / .10); transform: translateY(-2px); background: var(--surface, #fff); }
.ts-ruban { position: absolute; top: -12px; inset-inline-end: 12px; background: var(--ts-k); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.ts-cmp-f { font-weight: 600; }
.ts-cmp-v { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ts-cmp-l { display: flex; justify-content: space-between; font-size: .84rem; color: var(--text-2, #3b4a5c); }
.ts-fig { margin: 0; overflow-x: auto; background: var(--chart-bg, #fff); color: var(--chart-text, #17202b); border-radius: 8px; padding: 6px; }
.ts-fig svg { width: 100%; max-width: 1100px; height: auto; display: block; margin: 0 auto; }

/* fenêtres */
.ts-voile { position: fixed; inset: 0; background: var(--overlay, rgb(13 26 43 / .45)); display: grid; place-items: center; z-index: 1000; padding: 16px; }
.ts-fen { background: var(--surface, #fff); color: var(--text, #17202b); border-radius: 12px; padding: 18px; width: min(520px, 100%); box-shadow: 0 20px 60px rgb(0 0 0 / .3);
  animation: ts-entree var(--dur-slow, 260ms) var(--ease-out, ease); }
.ts-fen-t { display: flex; justify-content: space-between; align-items: center; }
.ts-x { font: inherit; font-size: 1.4rem; line-height: 1; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 2px 8px; }
.ts-lien { flex: 1; min-width: 0; font: inherit; padding: 7px 10px; border: 1px solid var(--border-strong, #8491a1); border-radius: 8px; background: var(--surface-2, #f8fafc); color: inherit; }
.ts-devis { display: grid; gap: 8px; }
.ts-champ { display: grid; gap: 3px; font-size: .88rem; font-weight: 600; }
.ts-champ input, .ts-champ textarea { font: inherit; font-weight: 400; padding: 7px 10px; border: 1px solid var(--border-strong, #8491a1); border-radius: 8px; background: var(--surface, #fff); color: inherit; }
.ts-ok { color: var(--success-text, #135c33); font-weight: 600; }
@keyframes ts-entree { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ts * { transition: none !important; animation: none !important; } .ts-fen { animation: none; } }

@media (max-width: 980px) {
  .ts-grille { grid-template-columns: 1fr; }
  .ts-res { position: static; }
  .ts-cmp-cartes { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .ts-tco-g { grid-template-columns: 1fr 1fr 1fr; }
  .ts-prix { font-size: 1.9rem; }
}

/* Offre de la plateforme (console) et Mon abonnement (2.25.0) */
.of-barre { height: 8px; border-radius: 999px; background: var(--surface-3, #eef2f6); overflow: hidden; margin: 4px 0; min-width: 80px; }
.of-barre span { display: block; height: 100%; background: var(--success, #1a7f45); border-radius: inherit; transition: width var(--dur-slow, 260ms) var(--ease-out, ease); }
.of-barre.orange span { background: var(--warning, #c2410c); }
.of-barre.rouge span { background: var(--error, #c0282f); }
.of-ia-cell { min-width: 110px; }
.of-compteurs, .ab-compteurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.of-compteur, .ab-compteur { border: 1px solid var(--border, #dfe6ee); border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px; background: var(--surface-2, #f8fafc); }
.of-compteur small, .ab-compteur span { color: var(--text-muted, #5f6e80); font-size: .8rem; }
.of-compteur b, .ab-compteur b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.of-liste { margin: 4px 0; padding-inline-start: 18px; }
.of-liste li { margin: 3px 0; }
.of-liste li.barre { text-decoration: line-through; color: var(--text-muted, #5f6e80); }
.of-coches { display: flex; flex-wrap: wrap; gap: 12px; }
.of-simu { border: 1px dashed var(--border, #dfe6ee); border-radius: 10px; padding: 10px; }
.of-rubriques { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.of-editeur { border: 1px solid var(--border, #dfe6ee); border-radius: 10px; padding: 10px; max-height: 64vh; overflow: auto; }
.of-obj { display: grid; gap: 4px; }
.of-ligne { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 8px; align-items: start; padding: 4px 0; border-bottom: 1px solid var(--border-soft, #eef2f6); }
.of-cle { padding-top: 6px; color: var(--text-2, #3b4a5c); }
.of-num { width: 120px; }
.of-tri { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.of-tri label { display: grid; gap: 2px; }
.of-tri input, .of-val > input[type=text] { width: 100%; }
.of-tab td, .of-tab th { vertical-align: top; }
.of-json { width: 100%; min-height: 50vh; }
.ab { display: grid; gap: 16px; }
.ab-sub { display: grid; gap: 12px; }
.ab-tete { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.ab-tete h2 { margin: 0; }
.ab-estim { display: grid; text-align: end; }
.ab-estim b { font-size: 1.8rem; color: var(--primary, #0b6fa4); font-variant-numeric: tabular-nums; }
.ab-grille { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; }
.ab-ia-chiffre { font-weight: 600; }
.ab-politiques { display: grid; gap: 6px; }
.ab-pol { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--border, #dfe6ee); border-radius: 8px; cursor: pointer; }
.ab-pol.on { border-color: var(--primary, #0b6fa4); background: var(--primary-soft, #e3f1fa); }
@media (max-width: 900px) { .ab-grille { grid-template-columns: 1fr; } .of-tri { grid-template-columns: 1fr; } .of-ligne { grid-template-columns: 1fr; } }
.of-montants { width: 100%; }
.of-montants td.num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; width: 1%; padding-inline-start: 16px; }
.ab-h1 { margin: 0; font-size: 1.5rem; }
