/* Calculateur CA en CAE — mobile first, polices système, aucune ressource externe */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #F1F4F2;
  --surface: #FFFFFF;
  --ink: #14211D;
  --muted: #4F5F5A;
  --line: #CFD9D5;
  --line-strong: #7D8C87;
  --accent: #2443C2;
  --accent-ink: #FFFFFF;
  --accent-soft: #E4E9FB;
  --danger: #B3362B;
  /* Bloc résultat : clair, détaché du fond par un liseré d'accent */
  --res-bg: #FFFFFF;
  --res-ink: #14211D;
  --res-muted: #4F5F5A;
  --res-line: #B9C4E8;
  --res-border: #2443C2;
  /* Segments lisibles sur le fond du résultat (contraste ≥ 3:1) */
  --seg-net: #1E3AA8;
  --seg-sal: #4A61CF;
  --seg-pat: #7086E0;
  --seg-fix: #B07415;
  --seg-var: #C2502F;
  --seg-act: #2F7D6B;
  --seg-marge: #6B7F78;
  /* Polices système : aucun téléchargement */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-num: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --cible: 2.75rem;
  --duree: 0.2s;
  --pad-panel: 1rem;
}
:root[data-theme="sombre"] {
  color-scheme: dark;
  --bg: #0F1513;
  --surface: #18201D;
  --ink: #E6EDEA;
  --muted: #A3B3AD;
  --line: #33403B;
  --line-strong: #7A8B85;
  --accent: #9AADFF;
  --accent-ink: #0F1513;
  --accent-soft: #232C4D;
  --danger: #F08A7E;
  --res-bg: #161D33;
  --res-ink: #E6EDEA;
  --res-muted: #A3B3AD;
  --res-line: #34406A;
  --res-border: #34406A;
  --seg-net: #B3C1FF;
  --seg-sal: #7F93EC;
  --seg-pat: #5A6CC4;
  --seg-fix: #E2A94A;
  --seg-var: #E07A5C;
  --seg-act: #6CC5AE;
  --seg-marge: #8DA19A;
}
:root[data-contraste="fort"] {
  --muted: var(--ink);
  --line: var(--line-strong);
  --res-muted: var(--res-ink);
  --res-line: var(--res-muted);
}
:root[data-texte="grand"] { font-size: 112.5%; }
:root[data-texte="tres-grand"] { font-size: 125%; }
:root[data-espacement="large"] body { line-height: 1.8; letter-spacing: 0.05em; word-spacing: 0.16em; }
:root[data-animations="normales"] { scroll-behavior: smooth; }
:root[data-animations="reduites"] *,
:root[data-animations="reduites"] *::before,
:root[data-animations="reduites"] *::after { transition: none !important; animation: none !important; }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1rem; scroll-padding-bottom: 6rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  padding-bottom: 6rem;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
abbr[title] { text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.evitement {
  position: absolute; left: 1rem; top: 0.5rem; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 0.6rem 1rem; border-radius: var(--radius-sm);
  font-weight: 600; transform: translateY(-200%);
}
.evitement:focus { transform: none; }

/* ---------- Bandeau + préférences d'affichage ---------- */
.bandeau {
  max-width: 72rem; margin-inline: auto; padding: 0.75rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.bandeau__marque { font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.affichage { position: relative; }
.affichage__bouton {
  list-style: none; display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: var(--cible); padding: 0 0.9rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-weight: 600; font-size: 0.9375rem; cursor: pointer;
}
.affichage__bouton::-webkit-details-marker { display: none; }
.affichage__bouton:hover, .affichage[open] .affichage__bouton { border-color: var(--accent); color: var(--accent); }
.icone { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.affichage__panneau {
  position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 50;
  width: min(22rem, calc(100vw - 2rem));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 0.18);
  padding: 1rem; display: flex; flex-direction: column; gap: 1rem;
}
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
legend { padding: 0; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9375rem; }

/* Groupe de boutons radio présenté en segments */
.segments { display: flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.segments label { flex: 1 1 0; display: flex; }
.segments label + label { border-left: 1px solid var(--line); }
.segments input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segments span {
  flex: 1; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: var(--cible); padding: 0.25rem 0.4rem; font-size: 0.875rem; cursor: pointer; line-height: 1.2;
}
.segments input:checked + span { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.segments input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: -3px; }
.segments .segments__grand { font-size: 1rem; }
.segments .segments__tres-grand { font-size: 1.125rem; }

/* Interrupteurs (checkbox role="switch") */
.interrupteur { display: flex; align-items: center; gap: 0.75rem; min-height: var(--cible); cursor: pointer; }
.interrupteur input {
  appearance: none; margin: 0; flex: 0 0 auto; position: relative;
  width: 2.75rem; height: 1.5rem; border-radius: 999px; background: var(--line-strong); cursor: pointer;
  transition: background var(--duree);
}
.interrupteur input::after {
  content: ""; position: absolute; top: 0.1875rem; left: 0.1875rem;
  width: 1.125rem; height: 1.125rem; border-radius: 50%; background: var(--surface);
  transition: transform var(--duree);
}
.interrupteur input:checked { background: var(--accent); }
.interrupteur input:checked::after { transform: translateX(1.25rem); }

/* ---------- Page ---------- */
.page { max-width: 72rem; margin-inline: auto; padding: 1rem 1rem 0; display: flex; flex-direction: column; gap: 2rem; }

.intro { display: flex; flex-direction: column; gap: 0.75rem; max-width: 42rem; }
h1 { font-weight: 800; font-size: clamp(1.9rem, 6vw, 3rem); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.intro p { color: var(--muted); }
.intro .avertissement { font-size: 0.9375rem; color: var(--ink); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 0.6rem 0.8rem; }
.ht { font-family: var(--font-num); font-size: 0.8125rem; padding: 0.05rem 0.35rem; border: 1px solid var(--line-strong); border-radius: 0.3rem; color: var(--ink); }

/* Mobile : une colonne, ordre du DOM (salaire → résultat → charges → fiche).
   Desktop : grille 2 colonnes, le résultat occupe toute la colonne droite et reste visible (cas où grid est nécessaire). */
.layout { display: flex; flex-direction: column; gap: 1.5rem; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--pad-panel); display: flex; flex-direction: column; gap: 1rem; min-width: 0;
}
.panel h2 { font-weight: 700; font-size: 1.25rem; }
.panel .sub { margin-top: -0.6rem; color: var(--muted); font-size: 0.9375rem; }

/* ---------- Salaire ---------- */
.salaire { gap: 0.75rem; }
.salaire__titre { font-weight: 600; }
.salaire__saisie { display: flex; align-items: baseline; gap: 0.5rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.25rem; }
.salaire__saisie:focus-within { border-color: var(--accent); }
.salaire__saisie input {
  font-weight: 800; font-size: 2.75rem; letter-spacing: -0.02em; border: 0; background: transparent;
  width: 100%; min-width: 0; padding: 0; font-variant-numeric: tabular-nums;
}
.salaire__saisie input:focus { outline: none; }
.salaire__saisie span { font-size: 1.25rem; color: var(--muted); white-space: nowrap; }
input[type="range"] { width: 100%; min-height: var(--cible); margin: 0; accent-color: var(--accent); cursor: pointer; }
.salaire__bornes { display: flex; justify-content: space-between; margin-top: -0.5rem; font-family: var(--font-num); font-size: 0.8125rem; color: var(--muted); }

/* ---------- Résultat (signature : facture avec talon détachable) ---------- */
.resultats:focus { outline: none; }
.resultat { background: var(--res-bg); color: var(--res-ink); border-color: var(--res-border); }
.resultat .resultat__titre { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--res-muted); }
.resultat__ca { font-weight: 800; font-size: clamp(2.6rem, 11vw, 3.75rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.resultat__ca small { font-size: 0.4em; font-weight: 500; letter-spacing: 0; color: var(--res-muted); }
.resultat__annuel { font-family: var(--font-num); font-size: 0.9375rem; color: var(--res-muted); }
.resultat__erreur { background: var(--danger); color: var(--surface); padding: 0.6rem 0.8rem; border-radius: var(--radius-sm); font-size: 0.9375rem; }

.talon { position: relative; display: flex; flex-direction: column; gap: 1rem; margin-top: 0.5rem; padding-top: 1.5rem; border-top: 2px dashed var(--res-line); }
/* Encoches de découpe, de la couleur du fond de page */
.talon::before, .talon::after {
  content: ""; position: absolute; top: -0.8125rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--bg);
}
/* Encoche centrée sur le bord du bloc : padding + bordure + demi-cercle */
.talon::before { left: calc(-1 * var(--pad-panel) - 0.8125rem); }
.talon::after { right: calc(-1 * var(--pad-panel) - 0.8125rem); }
.talon__phrase { font-size: 1.0625rem; line-height: 1.35; text-wrap: balance; }
.talon__phrase strong { color: var(--seg-net); font-variant-numeric: tabular-nums; white-space: nowrap; }

.barre { display: flex; height: 1rem; border-radius: 0.3rem; overflow: hidden; gap: 2px; }
.barre span { display: block; height: 100%; min-width: 2px; transition: flex-grow 0.3s ease-out; }

.decomp { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9375rem; }
.decomp li { display: flex; align-items: center; gap: 0.6rem; }
.decomp .pastille { width: 0.75rem; height: 0.75rem; border-radius: 0.2rem; flex: 0 0 auto; }
.decomp .lib { flex: 1 1 auto; min-width: 0; }
.decomp .mt { font-family: var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.decomp .pct { font-family: var(--font-num); font-size: 0.8125rem; width: 3.2rem; text-align: right; color: var(--res-muted); }

/* ---------- Charges ---------- */
.groupe { display: flex; flex-direction: column; gap: 0.75rem; }
.groupe__titre { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem 1rem; flex-wrap: wrap; }
.groupe__titre h3 { font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.groupe__titre .total { font-family: var(--font-num); font-size: 0.875rem; color: var(--muted); }
.lignes { display: flex; flex-direction: column; gap: 0.75rem; }
.lignes:empty { display: none; }
.ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.ligne .nom { flex: 1 1 100%; min-width: 0; }
.ligne .valeur { flex: 1 1 0; min-width: 0; }
/* Lignes de charges ajoutables : nom et montant côte à côte, même sur mobile */
.ligne[data-id] { flex-wrap: nowrap; }
.ligne[data-id] .nom { flex: 1 1 0; }
.ligne[data-id] .valeur { flex: 0 0 4.75rem; }
.ligne[data-id] .suppr { width: 2rem; }
.champ { display: flex; align-items: center; min-height: var(--cible); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg); }
.champ:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.champ input { border: 0; background: transparent; padding: 0.5rem 0.6rem; width: 100%; min-width: 0; }
.champ input:focus { outline: none; }
.champ input::placeholder { color: var(--muted); opacity: 0.8; }
.champ .unite { padding-right: 0.6rem; color: var(--muted); font-family: var(--font-num); font-size: 0.875rem; white-space: nowrap; }
.ligne .valeur input { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; }

.suppr {
  flex: 0 0 auto; display: grid; place-items: center; width: var(--cible); height: var(--cible);
  border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--muted);
}
.suppr svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.suppr:hover { color: var(--danger); border-color: var(--line); }

.unites { display: flex; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.unites__choix { min-width: var(--cible); min-height: var(--cible); border: 0; background: transparent; color: var(--muted); font-family: var(--font-num); padding: 0 0.7rem; }
.unites__choix + .unites__choix { border-left: 1px solid var(--line-strong); }
.unites__choix[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

.aide { font-size: 0.875rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn {
  min-height: var(--cible); border: 1px dashed var(--line-strong); background: transparent; border-radius: var(--radius-sm);
  padding: 0.4rem 0.9rem; font-size: 0.9375rem; transition: border-color var(--duree), color var(--duree);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.chip {
  min-height: var(--cible); border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px;
  padding: 0.3rem 0.9rem; font-size: 0.875rem; transition: border-color var(--duree), background var(--duree);
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip:disabled { opacity: 0.45; cursor: not-allowed; }
/* Frais de l'activité : bloc dépliable, le « + » devient « − » à l'ouverture */
.activite__titre {
  list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.75rem;
  min-height: var(--cible); cursor: pointer; font-weight: 600;
}
.activite__titre::-webkit-details-marker { display: none; }
.activite__libelle { flex: 1 1 0; min-width: 0; }
.activite__titre .total { font-family: var(--font-num); font-size: 0.875rem; font-weight: 400; color: var(--muted); }
.activite__plus {
  position: relative; flex: 0 0 auto; width: 1.75rem; height: 1.75rem;
  border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent);
}
.activite__plus::before, .activite__plus::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 0.75rem; height: 2px;
  margin: -1px 0 0 -0.375rem; background: currentColor; transition: transform var(--duree);
}
.activite__plus::after { transform: rotate(90deg); }
.activite[open] .activite__plus::after { transform: rotate(0deg); }
.activite__titre:hover .activite__plus { border-color: var(--accent); }
.activite > .groupe { margin-top: 0.75rem; }

hr { border: 0; border-top: 1px solid var(--line); margin: 0; width: 100%; }

/* ---------- Fiche de paie ---------- */
.fiche { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.fiche th { font-weight: 400; text-align: left; }
.fiche th, .fiche td { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.fiche td { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 1rem; }
.fiche tr.total th, .fiche tr.total td { border-bottom: 0; font-weight: 700; padding-top: 0.75rem; }

.calcul { font-size: 0.9375rem; color: var(--muted); }
.calcul summary { cursor: pointer; color: var(--ink); font-weight: 600; min-height: var(--cible); display: flex; align-items: center; }
.calcul p, .calcul ul { margin: 0.6rem 0 0; }
.calcul code { font-family: var(--font-num); font-size: 0.8125rem; background: var(--bg); padding: 0.1rem 0.3rem; border-radius: 0.25rem; color: var(--ink); overflow-wrap: anywhere; }

.reset { align-self: flex-start; justify-self: start; }
.notes { font-size: 0.875rem; color: var(--muted); max-width: 46rem; display: flex; flex-direction: column; gap: 0.5rem; padding-bottom: 2rem; }

/* ---------- Éléments flottants : annulation + récap mobile ---------- */
.flottant {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 0 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px)); pointer-events: none;
  /* Calque dédié : évite la « barre fantôme » quand la barre d'adresse mobile se replie au défilement */
  transform: translateZ(0);
  will-change: transform;
}
/* Une seule barre à la fois : le message d'annulation remplace temporairement le récap */
.toast:not([hidden]) + .recap { display: none; }
.flottant > * { pointer-events: auto; }
.toast {
  display: flex; align-items: center; gap: 1rem; max-width: 30rem; width: 100%;
  background: var(--ink); color: var(--bg); border-radius: var(--radius-sm); padding: 0.35rem 0.35rem 0.35rem 1rem;
  box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 0.25); font-size: 0.9375rem;
}
.toast span { flex: 1; }
.toast__annuler { min-height: var(--cible); padding: 0 1rem; border: 0; border-radius: 0.375rem; background: transparent; color: inherit; font-weight: 700; text-decoration: underline; }
.toast__annuler:hover { background: rgb(127 127 127 / 0.25); }
.recap {
  display: flex; align-items: center; gap: 0.75rem; width: 100%; max-width: 30rem; min-height: 3.25rem;
  padding: 0.5rem 1rem; border-radius: var(--radius); background: var(--res-bg); color: var(--res-ink);
  border: 1px solid var(--res-line); text-decoration: none; box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 0.25);
}
.recap__label { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--res-muted); }
.recap__montant { flex: 1; font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.recap__lien { font-size: 0.875rem; text-decoration: underline; }

/* ---------- Écrans plus larges ---------- */
@media (min-width: 30rem) {
  :root { --pad-panel: 1.25rem; }
  .ligne[data-id] .suppr { width: var(--cible); }
  .ligne { flex-wrap: nowrap; }
  .ligne .nom { flex: 1 1 auto; }
  .ligne .valeur,
  .ligne[data-id] .valeur { flex: 0 0 8rem; }
}

@media (min-width: 60rem) {
  html { scroll-padding-bottom: 1rem; }
  body { padding-bottom: 0; }
  .bandeau, .page { padding-inline: 1.5rem; }
  .layout {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(22rem, 28rem);
    align-items: start; gap: 1.5rem 2rem;
  }
  .layout > * { grid-column: 1; }
  .resultats { grid-column: 2; grid-row: 1 / span 4; position: sticky; top: 1rem; }
  .recap { display: none; }
}

/* Couleurs des segments de la répartition */
.seg--net { background: var(--seg-net); }
.seg--sal { background: var(--seg-sal); }
.seg--pat { background: var(--seg-pat); }
.seg--fix { background: var(--seg-fix); }
.seg--var { background: var(--seg-var); }
.seg--act { background: var(--seg-act); }
.seg--marge { background: var(--seg-marge); }

/* ---------- Export PDF ---------- */
.export { display: flex; flex-direction: column; gap: 0.4rem; padding-top: 0.5rem; border-top: 1px solid var(--res-line); }
.export__bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: var(--cible);
  padding: 0.4rem 1rem; border: 1px solid var(--accent); border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink); font-weight: 600; transition: background var(--duree), color var(--duree);
}
.export__bouton:hover { background: transparent; color: var(--accent); }
.export .aide { color: var(--res-muted); font-size: 0.8125rem; }
.impression-titre { display: none; }

/* Impression / PDF : thème clair forcé, une colonne, uniquement le récap utile */
@media print {
  @page { margin: 1.5cm; }
  :root, :root[data-theme="sombre"] {
    color-scheme: light;
    --bg: #FFFFFF; --surface: #FFFFFF; --ink: #000000; --muted: #3A4743; --line: #C9D2CE; --line-strong: #7D8C87;
    --accent: #2443C2; --res-bg: #FFFFFF; --res-ink: #000000; --res-muted: #3A4743; --res-line: #C9D2CE; --res-border: #C9D2CE;
    --seg-net: #1E3AA8; --seg-sal: #4A61CF; --seg-pat: #7086E0; --seg-fix: #B07415; --seg-var: #C2502F; --seg-act: #2F7D6B; --seg-marge: #6B7F78;
    font-size: 11pt;
  }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; transition: none !important; }
  body { padding: 0; }
  .evitement, .bandeau, .intro > :not(.impression-titre):not(h1), input[type="range"], .salaire__bornes,
  .actions, .suppr, .aide, .calcul, .reset, .flottant, .export, .talon::before, .talon::after,
  .unites__choix:not([aria-pressed="true"]), .activite.est-vide, .activite__plus { display: none !important; }
  .page { padding: 0; gap: 1rem; }
  .impression-titre { display: block; font-size: 0.875rem; color: var(--muted); }
  h1 { font-size: 1.6rem; }
  .layout { display: flex; flex-direction: column; gap: 1rem; }
  .panel { padding: 0.75rem 0; border: 0; border-top: 2px solid var(--ink); border-radius: 0; gap: 0.6rem; }
  .resultat, .salaire, .fiche, .groupe { break-inside: avoid; }
  .resultat__ca { font-size: 2.2rem; }
  .salaire__saisie { border: 0; padding: 0; }
  .salaire__saisie input { font-size: 1.6rem; width: auto; field-sizing: content; }
  .champ .unite { padding-left: 0.25rem; }
  .champ { min-height: 0; border: 0; background: none; box-shadow: none; }
  .champ input { padding: 0.15rem 0; }
  .ligne { flex-wrap: nowrap; }
  .ligne .nom { flex: 1 1 auto; }
  .ligne .valeur { flex: 0 0 7rem; }
  .unites { border: 0; }
  .unites__choix[aria-pressed="true"] { background: none; color: var(--muted); min-height: 0; min-width: 0; padding: 0; }
  .activite__titre { min-height: 0; }
  .notes { padding: 0; }
}

.aide--important { color: var(--ink); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; }

/* Contribution CAE : curseur de répartition formation / autre activité */
.contribution { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.contribution__tete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.contribution__taux { font-family: var(--font-num); font-size: 1.125rem; color: var(--accent); white-space: nowrap; }
.contribution__bornes { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--font-num); font-size: 0.8125rem; color: var(--muted); }
.contribution .calcul { margin-top: 0.25rem; }
.contribution .calcul .lignes { margin-top: 0.5rem; }
/* Flèche des replis (le display: flex du summary masque le marqueur natif) */
.calcul summary::before { content: "▸"; margin-right: 0.5rem; color: var(--accent); }
.calcul[open] > summary::before { content: "▾"; }
