:root {
  --bg: #f4f3ef;
  --card: #ffffff;
  --card2: #f1efe9;
  --line: #dcd8cd;
  --fg: #16130d;
  --muted: #514c43;
  --dim: #5f594f;
  /* --amber : texte et traits (foncé, lisible sur blanc) ; --jaune : fonds des boutons */
  --amber: #8a5a00;
  --amber-bg: #fff4d1;
  --jaune: #ffc82e;
  --green: #17763a;
  --green-bg: #e4f5ea;
  --red: #b3261e;
  --red-bg: #fdeceb;
  --blue: #1458a6;
  --r: 18px;
  --tap: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  color-scheme: light;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 500 18px/1.4 var(--font);
}
body {
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
}
.num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
a {
  color: var(--blue);
}
h2 {
  font-size: 1.35rem;
  margin: 0 0 0.8rem;
  font-weight: 850;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.08rem;
  margin: 0 0 0.5rem;
  font-weight: 800;
}
p {
  margin: 0.4rem 0;
}
.muted {
  color: var(--muted);
}
.dim {
  color: var(--dim);
}
.small {
  font-size: 0.88rem;
}

/* En-tête */
header.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  background: rgba(8, 9, 11, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--amber), #ff8a1f);
  display: grid;
  place-items: center;
  color: #1a1200;
  font-weight: 950;
  font-size: 1.1rem;
  flex: none;
  box-shadow: 0 4px 18px #ffb02e44;
}
.brand {
  flex: 1;
  min-width: 0;
}
.brand b {
  display: block;
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.brand span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}
.seal-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 99px;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid #1f6b3c;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}
.seal-pill.bad {
  background: var(--red-bg);
  color: var(--red);
  border-color: #7a211d;
}
.icon-btn {
  min-width: 48px;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font-size: 1.3rem;
}
.demo-banner {
  display: none;
  background: repeating-linear-gradient(-45deg, #ffc82e, #ffc82e 14px, #1a1400 14px, #1a1400 28px);
  padding: 4px 0;
}
.demo-banner div {
  background: #1a1400;
  color: var(--amber);
  text-align: center;
  font-weight: 950;
  letter-spacing: 0.08em;
  padding: 0.35rem;
  font-size: 0.9rem;
}
body.demo .demo-banner {
  display: block;
}

main {
  padding: 1rem;
  max-width: 640px;
  margin: 0 auto;
}
.view {
  animation: fadeUp 0.28s ease both;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1rem;
  margin: 0 0 0.9rem;
}
.card.flat {
  background: transparent;
}
.row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  min-width: 0;
}
.row.wrap {
  flex-wrap: wrap;
}
.grow {
  flex: 1;
  min-width: 0;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.kpi {
  background: var(--card2);
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
}
.kpi .v {
  font-size: clamp(1.15rem, 6.2vw, 1.6rem);
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}
.kpi .l {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag {
  display: inline-block;
  max-width: 100%;
  padding: 0.18rem 0.55rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  background: var(--card2);
  color: var(--muted);
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.tag.ok {
  color: var(--green);
  border-color: #1f6b3c;
  background: var(--green-bg);
}
.tag.warn {
  color: var(--amber);
  border-color: #6b5410;
  background: var(--amber-bg);
}
.tag.bad {
  color: var(--red);
  border-color: #7a211d;
  background: var(--red-bg);
}
.note {
  border-left: 4px solid var(--amber);
  background: var(--amber-bg);
  color: #ffe7a3;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.92rem;
  margin: 0.6rem 0;
}
.note.info {
  border-color: var(--blue);
  background: #0d1d2b;
  color: #cfe8ff;
}
.note.bad {
  border-color: var(--red);
  background: var(--red-bg);
  color: #ffd2cf;
}

/* Formulaires */
label {
  display: block;
  font-weight: 800;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.95rem;
}
label .hint {
  font-weight: 500;
}
.hint {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}
input[type="text"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
select,
textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 0.6rem 0.85rem;
  font: 700 1.12rem var(--font);
  color: var(--fg);
  background: #0d0e11;
  border: 2px solid var(--line);
  border-radius: 14px;
}
textarea {
  min-height: 7rem;
  font-weight: 500;
  font-size: 1rem;
}
input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}
.check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-weight: 700;
  margin: 0.8rem 0;
}
.check input {
  width: 28px;
  height: 28px;
  flex: none;
  accent-color: var(--amber);
  margin-top: 2px;
}

button {
  font: 850 1.08rem var(--font);
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  touch-action: manipulation;
  color: var(--fg);
}
.btn {
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: var(--tap);
  padding: 0.8rem 1rem;
  margin-top: 0.7rem;
  background: var(--card2);
  border: 2px solid var(--line);
  transition: transform 0.08s ease;
}
.btn:active,
.bigbtn:active {
  transform: scale(0.97);
}
.btn.primary {
  background: var(--amber);
  color: #1a1200;
  border-color: var(--amber);
}
.btn.go {
  background: var(--green);
  color: #03160a;
  border-color: var(--green);
}
.btn.stop {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn.ghost {
  background: transparent;
}
.btn.sm {
  min-height: 48px;
  font-size: 0.95rem;
  width: auto;
  padding: 0.4rem 0.9rem;
  margin: 0;
}
.btn[disabled] {
  opacity: 0.5;
}

/* Pointer */
.clock {
  text-align: center;
  padding: 0.4rem 0 0.2rem;
}
.clock .state {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 99px;
  background: var(--card2);
  color: var(--muted);
}
.clock .state i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}
.clock.work .state {
  color: var(--green);
  background: var(--green-bg);
}
.clock.work .state i {
  animation: blink 1.4s ease-in-out infinite;
}
.clock.pause .state {
  color: var(--amber);
  background: var(--amber-bg);
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
.clock .big {
  font-size: min(4.4rem, 16vw);
  font-weight: 950;
  line-height: 1;
  margin: 0.6rem 0 0.2rem;
  max-width: 100%;
}
.clock .sub {
  color: var(--muted);
  font-weight: 700;
}
.bigbtn-wrap {
  display: grid;
  place-items: center;
  margin: 1.1rem 0 0.4rem;
  position: relative;
}
.bigbtn {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  font-size: 2.1rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
  transition:
    transform 0.1s ease,
    box-shadow 0.3s ease;
}
.bigbtn small {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  opacity: 0.85;
  margin-top: 0.3rem;
}
.bigbtn.go {
  background: radial-gradient(circle at 35% 30%, #5ef08f, #19b553 70%);
  color: #021309;
  box-shadow:
    0 0 0 10px #2fd36b22,
    0 18px 50px #2fd36b40;
}
.bigbtn.pause {
  background: radial-gradient(circle at 35% 30%, #ffe07a, #f5b000 70%);
  color: #1a1200;
  box-shadow:
    0 0 0 10px #ffc82e22,
    0 18px 50px #ffc82e3d;
}
.bigbtn.resume {
  background: radial-gradient(circle at 35% 30%, #5ef08f, #19b553 70%);
  color: #021309;
  box-shadow: 0 0 0 10px #2fd36b22;
}
.ring {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  border: 3px solid var(--green);
  opacity: 0;
}
.working .ring {
  animation: ring 2.2s ease-out infinite;
}
.working .ring.r2 {
  animation-delay: 1.1s;
}
@keyframes ring {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.timeline li:last-child {
  border-bottom: 0;
}
.timeline .t {
  font-size: 1.35rem;
  font-weight: 900;
  min-width: 4.2rem;
}
.timeline .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
}
.dot.debut,
.dot.reprise {
  background: var(--green);
}
.dot.pause {
  background: var(--amber);
}
.dot.fin {
  background: var(--red);
}
.timeline .hash {
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--dim);
  overflow-wrap: anywhere;
}
.strike {
  text-decoration: line-through;
  color: var(--dim);
  font-size: 0.95rem;
}

/* Ma paie */
.hero {
  border-radius: 24px;
  padding: 1.3rem 1.1rem 1.2rem;
  margin-bottom: 0.9rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% -30%;
  height: 120%;
  background: radial-gradient(closest-side, var(--glow, #ffc82e33), transparent);
  pointer-events: none;
}
.hero.doit {
  --glow: #ff5a5240;
  border-color: #7a211d;
  background: linear-gradient(160deg, #2a0d0c, #15171c 70%);
}
.hero.ordre {
  --glow: #2fd36b33;
  border-color: #1f6b3c;
  background: linear-gradient(160deg, #0b2615, #15171c 70%);
}
.hero .lead {
  font-weight: 900;
  font-size: 1.15rem;
}
.hero .amount {
  font-size: 3.6rem;
  font-weight: 950;
  line-height: 1.02;
  margin: 0.35rem 0;
}
.hero.doit .amount {
  color: var(--red);
  text-shadow: 0 0 30px #ff5a5244;
}
.hero.ordre .amount {
  color: var(--green);
}
.hero .est {
  display: inline-block;
  margin-top: 0.3rem;
  font-weight: 850;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--amber);
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  height: 150px;
  padding: 0.4rem 0 0;
}
.bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}
.bar .seg {
  border-radius: 6px 6px 0 0;
  transform-origin: bottom;
  animation: grow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.bar .seg + .seg {
  border-radius: 0;
}
.seg.n {
  background: #4b5160;
}
.seg.c {
  background: var(--blue);
}
.seg.h1 {
  background: var(--amber);
}
.seg.h2 {
  background: #ff8a1f;
}
@keyframes grow {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
.bar .lbl {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.3rem;
  font-weight: 700;
}
.bar .val {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 900;
  margin-bottom: 0.2rem;
}
.bar .line35 {
  position: absolute;
  left: -4px;
  right: -4px;
  border-top: 2px dashed #ffffff55;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.6rem;
}
.legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 0.3rem;
  vertical-align: -1px;
}
table.calc {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
table.calc td,
table.calc th {
  padding: 0.55rem 0.2rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
table.calc th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
table.calc td.r,
table.calc th.r {
  text-align: right;
  white-space: nowrap;
}
table.calc tr.tot td {
  font-weight: 950;
  font-size: 1.1rem;
  border-bottom: 0;
}
.ecart-pos {
  color: var(--red);
  font-weight: 900;
}
.ecart-neg {
  color: var(--green);
  font-weight: 800;
}
.art {
  font-size: 0.72rem;
  color: var(--dim);
  display: block;
}
.forecast .bigx {
  font-size: 2.8rem;
  font-weight: 950;
  line-height: 1.05;
}
.forecast .big.net {
  color: var(--green);
}

/* Réclamer */
.seg-ctl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  background: var(--card2);
  padding: 0.35rem;
  border-radius: 16px;
}
.seg-ctl button {
  min-height: 54px;
  min-width: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.92rem;
  border-radius: 12px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.seg-ctl button[aria-pressed="true"] {
  background: var(--amber);
  color: #1a1200;
}
.paper {
  background: #fbfaf6;
  color: #15120c;
  border-radius: 12px;
  padding: 1.1rem 1rem;
  font:
    500 0.9rem/1.45 ui-serif,
    Georgia,
    "Times New Roman",
    serif;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  box-shadow: 0 10px 30px #0008;
  max-height: 62vh;
  overflow: auto;
}
.contact {
  border-top: 1px solid var(--line);
  padding: 0.8rem 0;
}
.contact:first-of-type {
  border-top: 0;
}
.contact .actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.contact .actions a {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  padding: 0.3rem 0.9rem;
  border-radius: 12px;
  background: var(--card2);
  border: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

/* Contrat */
.field-proposal {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.field-proposal input[type="checkbox"] {
  width: 26px;
  height: 26px;
  accent-color: var(--amber);
}
.field-proposal .ex {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--dim);
}
.drop {
  border: 2px dashed #5a5f6c;
  border-radius: 18px;
  padding: 1.1rem;
  text-align: center;
}
.progress {
  height: 10px;
  background: var(--card2);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 0.6rem;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--amber);
  width: 0;
  transition: width 0.2s;
}

/* Barre d'onglets */
nav.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #0d0e11;
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  gap: 4px;
}
nav.tabs button {
  min-height: 72px;
  background: transparent;
  color: var(--muted);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 850;
}
nav.tabs svg {
  width: 28px;
  height: 28px;
}
nav.tabs button[aria-current="page"] {
  color: var(--amber);
  background: #1f1a08;
}
.day-select {
  width: auto;
  max-width: 46%;
  min-width: 0;
}

dialog {
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.1rem;
  width: min(560px, 94vw);
}
dialog::backdrop {
  background: #000b;
}
#toast {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  background: #101215;
  border: 2px solid var(--green);
  color: var(--fg);
  padding: 0.85rem 1rem;
  border-radius: 16px;
  font-weight: 800;
  box-shadow: 0 10px 40px #000a;
  animation: fadeUp 0.2s ease;
}
#toast.bad {
  border-color: var(--red);
}
#print-area {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  body {
    background: #fff;
    color: #000;
    padding: 0;
  }
  body > *:not(#print-area) {
    display: none !important;
  }
  #print-area {
    display: block !important;
    white-space: pre-wrap;
    font:
      11pt/1.45 Georgia,
      "Times New Roman",
      serif;
    color: #000;
  }
  #print-area .pb {
    page-break-before: always;
  }
}
table.calc.cmp {
  font-size: 0.74rem;
  letter-spacing: -0.01em;
}
table.calc.cmp td,
table.calc.cmp th {
  padding: 0.5rem 0.1rem;
}
table.calc.cmp td:first-child {
  width: 34%;
}
table.calc td.r.wr {
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: right;
}
table.calc.info td:first-child {
  width: 38%;
}
table.calc.cmp td.r,
table.calc.cmp th.r {
  padding-left: 0.25rem;
}
.scroll-x {
  overflow-x: auto;
}

/* Mes heures : saisie de la journée, semaine, historique */
.lbl {
  display: block;
  font-weight: 800;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.95rem;
}
.hm {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.35rem;
}
.hm select {
  padding: 0.6rem 0.4rem;
  text-align: center;
}
.total-jour {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 1rem 0 0.6rem;
  padding: 0.8rem 1rem;
  background: var(--card2);
  border-radius: 14px;
  font-weight: 800;
}
.total-jour b {
  font-size: 1.8rem;
  color: var(--amber);
}
.btn.big {
  min-height: 72px;
  font-size: 1.15rem;
  font-weight: 950;
  letter-spacing: 0.02em;
}
.fait {
  font-size: 1.1rem;
  margin: 0.4rem 0;
}
table.semaine {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.6rem;
  font-size: 1.08rem;
}
table.semaine td {
  padding: 0.7rem 0.4rem;
  border-bottom: 1px solid var(--line);
}
table.semaine td.r {
  text-align: right;
  font-weight: 800;
}
table.semaine tr.auj td {
  color: var(--amber);
}
table.semaine tr.tot td {
  font-weight: 950;
  font-size: 1.2rem;
  border-bottom: 0;
}
ul.jours {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}
ul.jours li {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

/* Thème clair : remplace les teintes sombres codées en dur plus haut */
header.top {
  background: rgba(244, 243, 239, 0.95);
}
.logo,
.btn.primary,
.seg-ctl button[aria-pressed="true"],
.progress i,
.seg.h1 {
  background: var(--jaune);
  border-color: #e0aa00;
  color: #1a1200;
  box-shadow: none;
}
.seal-pill,
.tag.ok {
  border-color: #9fd3b2;
}
.seal-pill.bad,
.tag.bad {
  border-color: #efb4b0;
}
.tag.warn {
  border-color: #e9cf85;
}
.note {
  color: #4a3500;
}
.note.info {
  background: #e8f1fc;
  color: #0d3566;
}
.note.bad {
  color: #6e1410;
}
input[type="text"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
select,
textarea {
  background: #fff;
  border-color: #cfcabd;
}
.btn {
  background: #fff;
}
.btn.ghost {
  background: transparent;
}
.hero.doit {
  --glow: transparent;
  border-color: #efb4b0;
  background: #fdf1f0;
}
.hero.ordre {
  --glow: transparent;
  border-color: #9fd3b2;
  background: #eef8f1;
}
.hero.doit .amount {
  text-shadow: none;
}
.seg.n {
  background: #9a958a;
}
.bar .line35 {
  border-top-color: #16130d55;
}
.paper {
  box-shadow: 0 4px 16px #0002;
  border: 1px solid var(--line);
}
.drop {
  border-color: #b9b3a6;
}
nav.tabs {
  background: #fff;
  border-top: 1px solid var(--line);
}
nav.tabs button[aria-current="page"] {
  background: var(--amber-bg);
}
dialog::backdrop {
  background: #0007;
}
#toast {
  background: #16130d;
  color: #fff;
  box-shadow: 0 10px 30px #0004;
}
.demo-banner {
  background: repeating-linear-gradient(-45deg, #ffc82e, #ffc82e 14px, #16130d 14px, #16130d 28px);
}
.demo-banner div {
  background: #fff4d1;
  color: #5a3c00;
}
.btn.habitude {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 88px;
}
.btn.habitude small {
  font-size: 0.95rem;
  font-weight: 700;
}
#j-autres > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  margin-top: 0.6rem;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
}
details.card > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
details.card > summary h3 {
  margin: 0;
}
table.resume {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.08rem;
}
table.resume td {
  padding: 0.65rem 0.2rem;
  border-bottom: 1px solid var(--line);
}
table.resume td.r {
  text-align: right;
  font-weight: 800;
}
table.resume tr.tot td {
  font-size: 1.35rem;
  font-weight: 950;
  color: var(--green);
}
table.resume td:first-child {
  width: auto;
}
.verdict {
  font-size: 1.35rem;
  font-weight: 950;
  margin: 0.4rem 0 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
}
.verdict.ok {
  background: var(--green-bg);
  color: var(--green);
}
.verdict.bad {
  background: var(--red-bg);
  color: var(--red);
}
ul.verifs {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0.8rem;
}
ul.verifs li {
  display: flex;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.02rem;
}
ul.verifs .ic {
  flex: none;
}

/* Bouton unique « Ajouter ma fiche de paie ou mon contrat » */
.doc-btn {
  flex-direction: column;
  gap: 0.15rem;
  text-align: center;
}
.doc-btn small {
  font-weight: 600;
  font-size: 0.85rem;
  opacity: 0.85;
}
#doc-lecture {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(22, 19, 13, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#doc-lecture .doc-box {
  background: var(--card);
  border-radius: var(--r);
  padding: 1.2rem;
  width: 100%;
  max-width: 420px;
}
#doc-lecture .doc-box h2 {
  margin-top: 0;
}

/* Ma paie : ligne par ligne lisible sans défilement horizontal */
.cmp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cmp-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.cmp-list li.ko .cmp-t span:first-child {
  font-weight: 700;
}
.cmp-list li.tot {
  border-bottom: 0;
  font-weight: 800;
}
.cmp-t {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.2rem 0.6rem;
  align-items: baseline;
}
.cmp-t > :first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.cmp-t > :last-child {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}
.ok-txt {
  color: var(--green);
  font-weight: 700;
}
.section-titre {
  margin: 1.4rem 0.2rem 0.6rem;
  color: var(--muted);
  font-size: 1rem;
}
@media (max-width: 440px) {
  .brand span {
    display: none;
  }
}
.choix-courrier {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.choix-courrier button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-height: 72px;
  padding: 0.7rem;
  text-align: left;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}
.choix-courrier button span {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}
.choix-courrier button[aria-pressed="true"] {
  border-color: var(--amber);
  background: var(--amber-bg);
}

.btn + .card,
.btn + details.card {
  margin-top: 0.8rem;
}

/* Ma paie : trois pages courtes */
.sous-onglets {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  padding: 0.35rem 0;
  margin-bottom: 0.8rem;
  background: var(--bg);
}
.sous-onglets button {
  min-height: 52px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
}
.sous-onglets button[aria-selected="true"] {
  border-color: var(--amber);
  background: var(--jaune);
}
#bi-corriger summary {
  list-style: none;
}
#bi-corriger summary::-webkit-details-marker {
  display: none;
}
.sous-onglets button {
  white-space: nowrap;
  font-size: 0.9rem;
  padding: 0 0.2rem;
}
.resume td.num,
.calc td.r {
  white-space: nowrap;
}
.corr-row {
  display: grid;
  grid-template-columns: 1fr 8.5rem;
  gap: 0.5rem;
  align-items: center;
  margin: 0.35rem 0;
}
.corr-row label {
  margin: 0;
}
.corr-row input {
  margin: 0;
}
.resume td.num {
  width: 1%;
}
.demo-banner {
  position: relative;
}
.demo-quit {
  display: block;
  margin: 0.35rem auto 0.1rem;
  min-height: 44px;
  padding: 0 1rem;
  border: 2px solid #16130d;
  border-radius: 99px;
  background: #fff;
  color: #16130d;
  font: inherit;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
}
