/* Outil « Salaire brut en net, et net en brut » (maquette validée par Gilles le 20/10/2026), construit par src/modules/vitrine/outil-salaire.ts.
   Le calcul est la vedette ; une seule chose forte, la barre qui montre ce qui reste pour vous ; le reste calme. */
.sal { max-width: 1180px; margin: 0 auto; padding: 22px max(4.5vw, 24px) 80px; color: var(--ink); }
.sal-ariane { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.sal-ariane a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.sal-tete { margin: 26px 0 30px; max-width: 760px; }
.sal-tete h1 { font-family: var(--heading); font-size: clamp(36px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -2px; margin: 0 0 14px; }
.sal-tete p { font-size: 19px; line-height: 1.5; color: var(--muted); max-width: 60ch; }

.sal-outil { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 0; border-radius: 26px; overflow: hidden; box-shadow: 0 2px 6px #14233f0f, 0 30px 70px -30px #14233f40; background: #fff; }
.sal-form { padding: 30px 30px 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-content: start; border-right: 1px solid #f0e9de; }
.sal fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.sal legend, .sal-montant > label, .sal-pas > label { display: block; margin-bottom: 8px; font-family: var(--heading); font-size: 14px; font-weight: 700; color: var(--ink); }
.sal-pas small { font-family: var(--body); font-weight: 500; color: var(--muted); margin-left: 6px; }
.sal-seg .sal-opts { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: #f3efe7; }
.sal-seg label, .sal-puces label { position: relative; cursor: pointer; }
.sal-seg input, .sal-puces input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sal-seg label > span { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 12px; border-radius: 11px; font-weight: 650; font-size: 15px; color: var(--muted); text-align: center; transition: background-color .18s ease, color .18s ease, box-shadow .18s ease; }
.sal-seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px #14233f1a, 0 4px 12px #14233f14; }
.sal-seg input:focus-visible + span, .sal-puces input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.sal-montant .sal-champ { display: flex; align-items: baseline; gap: 8px; padding: 6px 18px 8px; border: 1.5px solid #e4dccf; border-radius: 16px; background: #fdfcf9; transition: border-color .16s ease; }
.sal-champ:focus-within { border-color: var(--blue); }
.sal-champ input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-family: var(--heading); font-size: 40px; font-weight: 800; letter-spacing: -1.4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.sal-champ span { font-family: var(--heading); font-size: 26px; font-weight: 700; color: var(--muted); }
.sal-unite { margin: 6px 2px 0; font-size: 14px; color: var(--muted); }
.sal-puces .sal-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.sal-puces label > span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid #e4dccf; border-radius: 999px; font-weight: 650; font-size: 15px; color: var(--muted); transition: border-color .16s ease, color .16s ease, background-color .16s ease; }
.sal-puces input:checked + span { border-color: var(--ink); color: var(--ink); background: #fff; }
.sal-champ-petit { display: inline-flex; gap: 6px; padding: 0 14px; min-height: 48px; align-items: center; border: 1.5px solid #e4dccf; border-radius: 14px; background: #fdfcf9; }
.sal-pas .sal-champ input { flex: none; font-size: 20px; letter-spacing: -.3px; width: 4ch; }
.sal-champ-petit span { font-size: 18px; }

.sal-res { padding: 30px 32px 26px; background: linear-gradient(180deg, #fffaf0 0%, #fff4e0 100%); display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; }
.sal-phrase { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 20px; line-height: 1.45; color: #37465b; min-height: 2.9em; }
.sal-gros { margin: 0; display: grid; gap: 2px; }
.sal-gros b { white-space: nowrap; font-family: var(--heading); font-size: clamp(44px, 5vw, 68px); font-weight: 800; line-height: 1; letter-spacing: -3px; color: var(--ink); font-variant-numeric: tabular-nums; }
.sal-gros span { font-size: 16px; color: var(--muted); }
.sal-barre { display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: #efe6d5; }
.sal-barre i { display: block; height: 100%; transition: width .35s cubic-bezier(.23,1,.32,1); }
.sal-barre .net, .sal-legende .net::before { background: linear-gradient(90deg, #f4b942, #ffd36b); }
.sal-barre .ret, .sal-legende .ret::before { background: #8e9bb8; }
.sal-barre .csg, .sal-legende .csg::before { background: #c9cfdb; }
.sal-legende { list-style: none; margin: -6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.sal-legende li { display: inline-flex; align-items: center; gap: 7px; }
.sal-legende li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.sal-legende li > span:first-child { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.sal-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; padding-top: 16px; border-top: 1px solid #f0e2c7; }
.sal-chiffres dt { order: 2; font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.sal-chiffres div { display: flex; flex-direction: column; gap: 3px; }
.sal-chiffres dd { white-space: nowrap; margin: 0; font-family: var(--heading); font-size: 21px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.sal-calcul summary { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: #8a5a00; cursor: pointer; }
/* Sur un écran étroit, le détail défile plutôt que de couper la colonne des montants. */
#sal-detail { overflow-x: auto; }
.sal-calcul table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.sal-calcul th, .sal-calcul td { text-align: left; padding: 7px 0; border-bottom: 1px solid #f0e2c7; }
.sal-calcul td:not(:first-child), .sal-calcul th:not(:first-child) { text-align: right; padding-left: 12px; white-space: nowrap; }
.sal-calcul tfoot td { font-weight: 700; }
.sal-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.sal-res[data-vide] .sal-gros, .sal-res[data-vide] .sal-barre, .sal-res[data-vide] .sal-legende, .sal-res[data-vide] .sal-chiffres, .sal-res[data-vide] .sal-calcul { visibility: hidden; }

.sal-texte { max-width: 720px; margin: 64px 0 0; }
.sal-texte h2 { font-family: var(--heading); font-size: 28px; letter-spacing: -.8px; margin: 40px 0 12px; }
.sal-texte p { font-size: 18px; line-height: 1.6; color: #37465b; }
.sal-grille { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
.sal-grille th, .sal-grille td { text-align: left; padding: 11px 0; border-bottom: 1px solid #ece4d6; }
.sal-grille th { font-family: var(--heading); font-size: 14px; color: var(--muted); }
.sal-grille td:nth-child(2) { font-weight: 700; }
.sal-avanido { position: relative; margin: 64px 0 0; padding: 34px 36px; border-radius: 24px; color: #e6ebf7; background: radial-gradient(420px 220px at 100% 0%, #4a4a8a 0%, #4a4a8a00 70%), #16263f; max-width: 820px; }
.sal-soleil { position: absolute; right: 30px; top: 30px; width: 16px; height: 16px; border-radius: 50%; background: #ffd36b; box-shadow: 0 0 0 7px #ffd36b33, 0 0 28px 8px #ffbf5a55; }
.sal-avanido h2 { font-family: var(--heading); font-size: 28px; letter-spacing: -.8px; color: #fff; margin: 0 0 10px; }
.sal-avanido p { font-size: 17px; line-height: 1.55; color: #b9c3dc; max-width: 56ch; margin: 0 0 22px; }
.sal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* Même poids que .button.outline:hover (style.css), sinon le libellé blanc devient illisible au survol. */
.sal-actions .button.outline, .sal-actions .button.outline:hover { color: #fff; border-color: #ffffff55; background: transparent; }
@media (hover: hover) and (pointer: fine) { .sal-actions .button.outline:hover { background: #ffffff14; border-color: #ffffff88; } }

/* Questions et sources */
.sal-faq { display: grid; border-top: 1px solid #ece4d6; }
.sal-faq details { border-bottom: 1px solid #ece4d6; }
.sal-faq summary { display: flex; align-items: center; min-height: 56px; padding: 6px 0; font-family: var(--heading); font-size: 17px; font-weight: 700; color: var(--ink); cursor: pointer; list-style: none; }
.sal-faq summary::-webkit-details-marker { display: none; }
.sal-faq summary::after { content: "+"; margin-left: auto; padding-left: 16px; font-size: 22px; font-weight: 500; color: var(--muted); }
.sal-faq details[open] summary::after { content: "−"; }
.sal-faq p { margin: 0 0 16px; font-size: 17px; line-height: 1.6; color: #37465b; }
.sal-sources { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 16px; }
.sal-sources a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.sal-texte .sal-note { font-size: 14px; }

@media (max-width: 900px) {
  .sal-outil { grid-template-columns: 1fr; }
  .sal-form { border-right: 0; border-bottom: 1px solid #f0e9de; }
}
@media (max-width: 640px) {
  .sal-calcul table { font-size: 13px; }
  .sal-calcul td:not(:first-child), .sal-calcul th:not(:first-child) { padding-left: 8px; }
  .sal { padding: 16px 16px 60px; }
  .sal-tete h1 { font-size: 34px; letter-spacing: -1.2px; }
  .sal-tete p { font-size: 17px; }
  .sal-outil { border-radius: 20px; margin: 0 -4px; }
  .sal-form, .sal-res { padding: 22px 18px; }
  .sal-montant .sal-champ input { font-size: 34px; }
  .sal-gros b { font-size: 48px; }
  .sal-chiffres { grid-template-columns: 1fr 1fr; }
  .sal-chiffres div:last-child { grid-column: 1 / -1; }
  .sal-avanido { padding: 28px 22px; }
}
.sal-limites { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 17px; line-height: 1.55; color: #37465b; }
/* Contraste élevé : les boutons radio sont masqués, l’option cochée doit rester visible. */
@media (forced-colors: active) { .sal-seg input:checked + span, .sal-puces input:checked + span { outline: 2px solid Highlight; outline-offset: -2px; } }
/* Très petit écran : la colonne « Base » laisse la place aux montants (le défilement reste possible en dernier recours). */
@media (max-width: 400px) { .sal-calcul th:nth-child(2), .sal-calcul td:nth-child(2) { display: none; } }
@media (prefers-reduced-motion: reduce) { .sal-barre i, .sal-seg label > span { transition: none; } }
