/* Calcul Indemnités. Bleu nuit sur papier froid ; le résultat prend la forme d'un décompte ligne par ligne,
   comme un solde de tout compte, avec un vert sobre pour le total. */
:root {
  --bg: #f3f5f8;
  --paper: #ffffff;
  --ink: #1c2541;
  --ink-soft: #5b6478;
  --line: #d8dde6;
  --green: #2a7f62;
  --green-soft: #eaf4ef;
  --amber: #8a5a00;
  --serif: "Source Serif 4", Georgia, serif;
  --text: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 40rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 1.04rem; line-height: 1.6; }
a { color: var(--green); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.wrap { max-width: 54rem; margin: 0 auto; padding: 0 1.25rem; }

.site-header { padding: 1.1rem 0 0.4rem; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1.5rem; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; font-size: 0.95rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.9rem, 4.5vw, 2.6rem); line-height: 1.15; margin: 1.5rem 0 0.5rem; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; line-height: 1.25; margin: 2.75rem 0 0.75rem; }
.lede { color: var(--ink-soft); max-width: var(--measure); margin: 0 0 1.5rem; font-size: 1.08rem; }
.prose { max-width: var(--measure); }
.prose p, .prose li { margin: 0 0 0.8rem; }

.outil { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 1.4rem; }
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem 1.25rem; margin-bottom: 1rem; align-items: end; }
.champs label, .motif { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 600; font-size: 0.95rem; }
.aide { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }
.anciennete { border: 0; padding: 0; margin: 0; display: flex; gap: 0.6rem; min-width: 0; }
.anciennete legend { font-weight: 600; font-size: 0.95rem; padding: 0; margin-bottom: 0.25rem; }
.anciennete label { flex-direction: row; align-items: center; gap: 0.35rem; font-weight: 400; flex: 1; }
.outil input, .outil select { font: inherit; font-size: 1.08rem; padding: 0.5rem 0.6rem; border: 2px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
.outil input:focus, .outil select:focus { outline: none; border-color: var(--green); }
.motif { max-width: 34rem; margin-bottom: 1rem; }

/* Le décompte */
.decompte { border-top: 2px solid var(--ink); margin-top: 0.5rem; padding-top: 0.6rem; }
.decompte dl { margin: 0; }
.decompte dl div { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px dotted var(--line); }
.decompte dt { flex: 1; }
.decompte dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.decompte .sous-total { border-bottom: 1px solid var(--ink); }
.decompte .total { background: var(--green-soft); border: 0; border-left: 4px solid var(--green); padding: 0.7rem 0.8rem; margin: 0.5rem 0; font-size: 1.15rem; }
.decompte .total dd { font-family: var(--serif); font-size: 1.6rem; color: var(--green); }
.decompte .employeur { color: var(--ink-soft); font-size: 0.95rem; }
.note { color: var(--ink-soft); font-size: 0.9rem; margin: 0.8rem 0 0; }
.note strong { color: var(--amber); }
.vide { color: var(--ink-soft); margin: 0.4rem 0; }

.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 0.97rem; }
th, td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); }
th { font-weight: 600; background: #eef1f5; }

details { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; margin: 0 0 0.6rem; padding: 0.7rem 1rem; max-width: var(--measure); }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 0.6rem 0 0.1rem; }

.site-footer { margin-top: 4rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.9rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.site-footer a { color: var(--ink-soft); }
