/* Laderc Studio · Démonstration « Comparateur de formules » (marque fictive Banque Horizon) */
.bh {
  --t: #1F6F78; --t-dark: #10454B; --t-soft: #E8F4F5; --gold: #F2B544;
  --b-ink: #16232E; --b-ink-2: #5A6773; --b-line: #DCE3E8; --b-bg: #FFFFFF; --b-alt: #F6F9FA;
  width: 100%; background: var(--b-bg); color: var(--b-ink); border-radius: 14px; overflow: hidden; box-shadow: 0 20px 50px rgb(11 31 58 / .16); font-size: 15px; line-height: 1.5;
}
.bh__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--b-line); flex-wrap: wrap; }
.bh__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--t); }
.bh__brand i { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(var(--t) 0 70%, var(--gold) 0); }
.bh__body { padding: 22px 20px 26px; display: grid; gap: 18px; }
.bh h3 { font-size: 24px; letter-spacing: -.01em; color: var(--b-ink); }
.bh__sub { color: var(--b-ink-2); margin-top: -8px; }

/* Réglages */
.bh__ctrls { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.tg { display: inline-flex; border: 1px solid var(--b-line); border-radius: 999px; padding: 3px; background: var(--b-alt); }
.tg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font: 700 13px/1 var(--f-ui); color: var(--b-ink-2); cursor: pointer; }
.tg button[aria-pressed="true"] { background: var(--t); color: #FFF; }
.sw { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.sw input { appearance: none; width: 40px; height: 24px; border-radius: 99px; background: #C5CED6; position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.sw input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FFF; transition: transform .15s; box-shadow: 0 1px 2px rgb(0 0 0 / .2); }
.sw input:checked { background: var(--t); }
.sw input:checked::after { transform: translateX(16px); }
.sw input:focus-visible { outline: 3px solid color-mix(in srgb, var(--t) 45%, transparent); outline-offset: 2px; }

/* Choix de la formule sur mobile */
.pick { display: none; }
.pick__lbl { font-size: 13px; font-weight: 700; color: var(--b-ink-2); margin-bottom: 6px; display: block; }
.pick .tg { display: flex; width: 100%; }
.pick .tg button { flex: 1; padding: 10px 6px; }

/* Tableau */
.cmp-wrap { border: 1px solid var(--b-line); border-radius: 12px; overflow: hidden; }
table.cmp { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cmp caption { text-align: left; padding: 0; }
.cmp th, .cmp td { padding: 12px 14px; border-bottom: 1px solid var(--b-line); text-align: center; vertical-align: middle; }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp thead th { background: var(--b-alt); vertical-align: bottom; padding-top: 18px; }
.cmp thead th:first-child { text-align: left; }
.cmp tbody th { text-align: left; font-weight: 600; font-size: 14px; width: 34%; }
.cmp tbody th small { display: block; font-weight: 400; color: var(--b-ink-2); font-size: 12px; }
.cmp .grp th { background: var(--b-alt); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--b-ink-2); padding-block: 8px; }
.offer { display: grid; gap: 4px; justify-items: center; }
.offer b { font-size: 16px; }
.offer .price { font-size: 24px; font-weight: 800; color: var(--t-dark); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.offer .per { font-size: 12px; color: var(--b-ink-2); }
.offer .reco { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--gold); color: #3A2A05; padding: 3px 8px; border-radius: 99px; }
.offer .noreco { height: 21px; }
.cmp .is-reco { background: color-mix(in srgb, var(--t-soft) 70%, transparent); }
.cmp thead .is-reco { background: var(--t-soft); box-shadow: inset 0 3px 0 var(--t); }
.yes, .no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.yes { background: var(--t-soft); color: var(--t); } .no { color: #A4AEB8; }
.yes svg, .no svg { width: 14px; height: 14px; }
.val { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.cmp tr.same { transition: opacity .2s; }
.bh[data-diff="on"] .cmp tr.same { display: none; }
.cta-row td { padding-block: 16px; }
.cta-row a { display: inline-block; padding: 10px 14px; border-radius: 8px; border: 1.5px solid var(--t); color: var(--t); font-weight: 800; font-size: 13px; text-decoration: none; }
.cta-row .is-reco a { background: var(--t); color: #FFF; }
.bh__foot { font-size: 12px; color: var(--b-ink-2); }

/* Étroit : une seule formule à la fois, choisie avec le sélecteur */
@container (max-width: 600px) {
  .pick { display: block; }
  table.cmp { table-layout: auto; }   /* en largeur fixe, les colonnes masquées garderaient leur place */
  .cmp tbody th, .cmp thead th:first-child { width: 55%; }
  .bh[data-col="1"] .cmp [data-c]:not([data-c="1"]),
  .bh[data-col="2"] .cmp [data-c]:not([data-c="2"]),
  .bh[data-col="3"] .cmp [data-c]:not([data-c="3"]) { display: none; }
  .cmp thead th:first-child { font-size: 0; }
}
