/* Sous 2 toits : léger et joyeux, sans être enfantin. */
@font-face {
  font-family: Nunito;
  font-weight: 800;
  font-display: swap;
  src: url(fonts/nunito-latin-800-normal.woff2) format("woff2");
}
@font-face {
  font-family: Nunito;
  font-weight: 900;
  font-display: swap;
  src: url(fonts/nunito-latin-900-normal.woff2) format("woff2");
}
@font-face {
  font-family: Inter;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/inter-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: Inter;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/inter-latin-600-normal.woff2) format("woff2");
}

:root {
  color-scheme: light dark;
  --bg: #fbf8f4;
  --surface: #ffffff;
  --surface-2: #f5f1ea;
  --text: #2b2f36;
  --muted: #5b6270;
  --line: #e9e3d9;
  --a: #2f4a6d;
  --a-tint: #e3eaf3;
  --a-ink: #1f3350;
  --a-logo: #2f4a6d;
  --b: #e8836b;
  --b-tint: #fbe4dc;
  --b-ink: #7a3323;
  --b-text: #b5503a;
  --b-logo: #e8836b;
  --sun: #f4c95d;
  --sun-line: #e0ae2e;
  --sun-tint: #fdf3d6;
  --sun-ink: #6b4e07;
  --ok: #2e7d5b;
  --ok-tint: #e2f2ea;
  --danger: #b42318;
  --danger-tint: #fde8e6;
  --primary: #2f4a6d;
  --on-primary: #ffffff;
  --shadow: 0 1px 2px rgba(43, 47, 54, 0.06), 0 8px 24px rgba(43, 47, 54, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16191e;
    --surface: #1f242b;
    --surface-2: #262c34;
    --text: #ece8e2;
    --muted: #a8aeb8;
    --line: #313842;
    --a: #8fb0d9;
    --a-tint: #25344a;
    --a-ink: #d5e2f2;
    --a-logo: #a9c2e3;
    --b: #f0a08c;
    --b-tint: #4a2c25;
    --b-ink: #f8d5cb;
    --b-text: #f2a895;
    --b-logo: #f0a08c;
    --sun: #f4c95d;
    --sun-line: #e0ae2e;
    --sun-tint: #3e3420;
    --sun-ink: #f7de9c;
    --ok: #6cc59a;
    --ok-tint: #1e3a2d;
    --danger: #f28b82;
    --danger-tint: #4a2320;
    --primary: #a9c2e3;
    --on-primary: #16191e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.55 Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  font-family: Nunito, Inter, sans-serif;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(26px, 4vw, 34px);
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 17px;
}
p {
  margin: 0 0 1em;
}
a {
  color: var(--a);
}
a:hover {
  color: var(--a-ink);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 14px;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--a);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip:focus {
  left: 8px;
}

/* En-tête */
.top {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 72rem;
  margin: 0 auto;
  padding: 14px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--a-logo);
}
.mark-a {
  stroke: var(--a-logo);
}
.mark-b {
  stroke: var(--b-logo);
}
.mark-2 {
  stroke: var(--a-logo);
}
.wordmark {
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 21px;
  color: var(--a-logo);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark-2 {
  color: var(--b-logo);
  font-weight: 900;
}
.account {
  margin-left: auto;
}
.logout {
  margin: 0;
}

/* Navigation de l'application : en haut sur grand écran, en bas sur téléphone */
.appnav {
  display: flex;
  gap: 4px;
  margin-left: 24px;
}
.appnav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition:
    background 0.15s var(--ease),
    color 0.15s var(--ease);
}
.appnav a:hover {
  background: var(--surface-2);
  color: var(--text);
}
.appnav a[aria-current="page"] {
  color: var(--a);
  background: var(--a-tint);
}
@media (max-width: 720px) {
  .appnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    z-index: 5;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 6px 6px calc(10px + env(safe-area-inset-bottom));
  }
  .appnav a {
    flex-direction: column;
    gap: 2px;
    font-size: 11.5px;
    padding: 6px 0;
  }
  .appnav a[aria-current="page"] {
    background: transparent;
  }
  body.with-appnav {
    padding-bottom: 84px;
  }
  .wordmark {
    font-size: 19px;
  }
}

/* Mise en page */
main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 16px 20px 64px;
}
.narrow {
  max-width: 30rem;
  margin: 24px auto;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 8px 0 16px;
}
.page-head h1 {
  margin: 0;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 20px;
  align-items: start;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card.soft {
  background: var(--surface-2);
  box-shadow: none;
  margin-top: 16px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.grow {
  flex: 1;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stack button {
  margin-top: 8px;
  align-self: flex-start;
}
.inline {
  display: inline;
  margin: 0;
}

/* Formulaires */
label {
  font-weight: 600;
  font-size: 14.5px;
}
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 44px;
  width: 100%;
  transition:
    border-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--a);
  box-shadow: 0 0 0 3px var(--a-tint);
}
input.short {
  width: 7rem;
}
textarea {
  min-height: 6rem;
  resize: vertical;
}
details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--a);
  padding: 8px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}
details[open] summary {
  margin-bottom: 8px;
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: var(--on-primary);
  font:
    600 15px Inter,
    sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.15s var(--ease),
    filter 0.15s var(--ease);
}
.btn:hover {
  color: var(--on-primary);
  filter: brightness(1.08);
}
.btn:active {
  transform: translateY(1px);
}
.btn.secondary {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn.secondary:hover {
  color: var(--text);
  background: var(--surface-2);
  filter: none;
}
.btn-link {
  background: none;
  border: 0;
  padding: 8px 4px;
  min-height: 44px;
  font:
    600 15px Inter,
    sans-serif;
  color: var(--a);
  cursor: pointer;
  text-decoration: none;
}
.btn-link:hover {
  text-decoration: underline;
}
.btn-link.danger {
  color: var(--danger);
}

/* Messages d'état */
.alert,
.notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin: 0 0 16px;
}
.alert {
  background: var(--danger-tint);
  color: var(--danger);
}
.notice {
  background: var(--ok-tint);
  color: var(--ok);
  animation: pop 0.35s var(--ease);
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.empty {
  color: var(--muted);
  font-style: italic;
}

/* Familles */
.houses {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.house {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
}
.house div {
  display: flex;
  flex-direction: column;
}
.house-a {
  background: var(--a-tint);
  color: var(--a-ink);
}
.house-b {
  background: var(--b-tint);
  color: var(--b-ink);
}
.house-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex: none;
}
.house-a .house-dot {
  background: var(--a);
}
.house-b .house-dot {
  background: var(--b);
}
.house .muted {
  color: inherit;
  opacity: 0.8;
}
.list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.list li:last-child {
  border-bottom: 0;
}
.list li > div {
  display: flex;
  flex-direction: column;
}

/* Pastilles */
.chip {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.chip-a {
  background: var(--a-tint);
  color: var(--a-ink);
}
.chip-b {
  background: var(--b-tint);
  color: var(--b-ink);
}
.chip-sun {
  background: var(--sun-tint);
  color: var(--sun-ink);
}

/* Accueil */
.hero {
  max-width: 44rem;
  margin: 40px 0 40px;
}
.hero h1 {
  font-size: clamp(32px, 5.5vw, 52px);
  color: var(--a-logo);
}
.lead {
  font-size: 19px;
  color: var(--muted);
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 20px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Calendrier */
.narrow-lg {
  max-width: 38rem;
}
.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.callout {
  background: var(--sun-tint);
  box-shadow: none;
  margin-bottom: 20px;
}
.callout h2 {
  color: var(--sun-ink);
}
.pending {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  box-shadow: none;
}
.pending h2 {
  font-size: 18px;
}
.quote {
  border-left: 3px solid var(--line);
  padding: 2px 0 2px 12px;
  color: var(--muted);
  font-style: italic;
  white-space: pre-line;
}
.cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .cal-layout {
    grid-template-columns: 1fr;
  }
}
.cal {
  padding: 16px;
}
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: var(--a);
}
.icon-btn:hover {
  background: var(--surface-2);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13px;
  color: var(--muted);
  margin: 0 4px 12px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sw {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 4px;
}
.sw-a {
  background: var(--a);
}
.sw-b {
  background: var(--b);
}
.sw-off {
  height: 4px;
  border-radius: 2px;
  background: var(--sun-line);
}
.sw-swap {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
}
.cal-head,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.cal-head {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  padding-bottom: 6px;
}
.day {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 8px;
  height: 54px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  transition:
    transform 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}
.day:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(43, 47, 54, 0.12);
}
.day-a,
.day-a:hover {
  background: var(--a-tint);
  color: var(--a-ink);
}
.day-b,
.day-b:hover {
  background: var(--b-tint);
  color: var(--b-ink);
}
.day-none,
.day-none:hover {
  background: var(--surface-2);
  color: var(--muted);
}
.day-out {
  opacity: 0.42;
}
.day-today {
  box-shadow: inset 0 0 0 2px var(--text);
}
.day-today .day-n {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.day-swap {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}
.day-off {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  height: 4px;
  border-radius: 2px;
  background: var(--sun-line);
}
@media (min-width: 901px) {
  .day {
    height: 72px;
  }
}
.cal-sum {
  margin: 12px 4px 0;
}
.info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.big {
  font-family: Nunito, sans-serif;
  font-size: 22px;
  font-weight: 800;
}
.next {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.links {
  display: flex;
  flex-direction: column;
  padding: 8px 20px;
}
.links a {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
}
.links a:last-child {
  border-bottom: 0;
}
.list.compact li {
  padding: 8px 0;
  font-size: 14.5px;
}
.list.compact li > span:first-child {
  font-weight: 600;
}
.status {
  font-size: 12.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.status-acceptee {
  background: var(--ok-tint);
  color: var(--ok);
}
.status-refusee {
  background: var(--danger-tint);
  color: var(--danger);
}
.demande {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.demande:last-child {
  border-bottom: 0;
}
.demande p {
  margin: 0 0 4px;
}
.hint {
  margin: -4px 0 4px;
}
.row.two {
  align-items: flex-start;
}
.row.two > .stack {
  flex: 1;
  min-width: 9rem;
}

/* Choix (boutons radio en cartes) */
fieldset.choices {
  border: 0;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
fieldset.choices legend {
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 8px;
  padding: 0;
}
.choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 400;
  transition:
    border-color 0.15s var(--ease),
    background 0.15s var(--ease);
}
.choice:hover {
  background: var(--surface-2);
}
.choice:has(input:checked) {
  border-color: var(--a);
  background: var(--a-tint);
}
.choice input {
  width: auto;
  min-height: 0;
  margin-top: 4px;
  accent-color: var(--a);
  flex: none;
}
.choice > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
fieldset.inline-choices {
  flex-direction: row;
  flex-wrap: wrap;
}
.inline-choices legend {
  width: 100%;
}
.inline-choices .choice {
  flex: 1;
  min-width: 9rem;
  align-items: center;
}
.inline-choices .choice input {
  margin-top: 0;
}
.choice-b:has(input:checked) {
  border-color: var(--b);
  background: var(--b-tint);
}

/* Dépenses */
.solde {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  background: var(--b-tint);
  color: var(--b-ink);
  box-shadow: none;
}
.solde > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.solde .muted {
  color: inherit;
  opacity: 0.8;
}
.solde-ok {
  background: var(--ok-tint);
  color: var(--ok);
}
.row.spread {
  justify-content: space-between;
}
.expenses {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.expense {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto auto;
  gap: 4px 14px;
  align-items: center;
  padding: 12px 8px;
  margin: 0 -8px;
  border-radius: 10px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s var(--ease);
}
.expense:hover {
  background: var(--surface-2);
  color: inherit;
}
.expenses li:last-child .expense {
  border-bottom: 0;
}
.exp-date {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.exp-main,
.exp-amount {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.exp-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .expense {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "date status" "main main" "amount amount";
  }
  .exp-date {
    grid-area: date;
  }
  .expense .status {
    grid-area: status;
  }
  .exp-main {
    grid-area: main;
  }
  .exp-amount {
    grid-area: amount;
    text-align: left;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
  }
}
.status-approuvee {
  background: var(--ok-tint);
  color: var(--ok);
}
.status-contestee {
  background: var(--danger-tint);
  color: var(--danger);
}
.status-en_attente {
  background: var(--sun-tint);
  color: var(--sun-ink);
}
.totals {
  margin: 12px 0 0;
}
dl.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 20px;
  margin: 12px 0 16px;
}
dl.facts dt {
  color: var(--muted);
}
dl.facts dd {
  margin: 0;
  font-weight: 600;
}
.receipts {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 12px;
}
.receipts a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
  word-break: break-word;
}
.receipts img,
.file-icon {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--muted);
}
input[type="file"] {
  padding: 8px;
}

/* Messagerie */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.center {
  text-align: center;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  word-break: break-all;
  background: var(--surface-2);
  padding: 10px 12px;
  border-radius: 8px;
}
.appnav a {
  position: relative;
}
.badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--b-text);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 720px) {
  .appnav .badge {
    position: absolute;
    top: 2px;
    left: calc(50% + 6px);
  }
}
.msg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .msg-layout {
    grid-template-columns: 1fr;
  }
}
.thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}
.msgs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.msg-day {
  text-align: center;
  margin: 14px 0 6px;
}
.msg-day span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  padding: 3px 12px;
  border-radius: 999px;
}
.msg {
  display: flex;
  flex-direction: column;
  max-width: min(80%, 34rem);
  animation: pop 0.25s var(--ease);
}
.msg-mine {
  align-self: flex-end;
  align-items: flex-end;
}
.msg-theirs {
  align-self: flex-start;
  align-items: flex-start;
}
.msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.45;
}
.msg-bubble p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg-a .msg-bubble {
  background: var(--a-tint);
  color: var(--a-ink);
}
.msg-b .msg-bubble {
  background: var(--b-tint);
  color: var(--b-ink);
}
.msg-mine .msg-bubble {
  border-bottom-right-radius: 4px;
}
.msg-theirs .msg-bubble {
  border-bottom-left-radius: 4px;
}
.msg-author {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 2px;
}
.msg-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 6px 4px;
}
.composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.composer textarea {
  min-height: 5rem;
}

/* Abonnement */
.banner {
  background: var(--sun-tint);
  color: var(--sun-ink);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin: 0 0 16px;
  font-size: 14.5px;
}
.banner a {
  color: inherit;
  font-weight: 700;
}
.banner-ro {
  background: var(--b-tint);
  color: var(--b-ink);
}
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 20px;
  margin: 20px 0;
}
.plan {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.plan .price {
  font-family: Nunito, sans-serif;
  font-weight: 900;
  font-size: 36px;
  margin: 0;
  color: var(--a-logo);
}
.plan .btn {
  margin-top: 12px;
}
.plan-best {
  box-shadow:
    inset 0 0 0 2px var(--a),
    var(--shadow);
}

.solde.callout {
  background: var(--sun-tint);
  color: var(--sun-ink);
}

/* Compte, pages légales, pied de page */
.account {
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn.danger {
  background: var(--danger);
  color: #fff;
}
.danger-zone {
  border: 1px solid var(--danger-tint);
  box-shadow: none;
}
.legal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin: 16px auto 0;
}
.legal h2 {
  margin-top: 28px;
}
.legal ul {
  padding-left: 1.2em;
}
.legal li {
  margin-bottom: 6px;
}
.foot {
  max-width: 72rem;
  margin: 0 auto;
  padding: 24px 20px 40px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
}
.foot nav {
  display: flex;
  gap: 16px;
}
.foot a {
  color: var(--muted);
}
@media (max-width: 720px) {
  body.with-appnav .foot {
    padding-bottom: 24px;
  }
  /* Sur téléphone, dans l'application : compte et déconnexion passent par l'onglet Famille. */
  body.with-appnav .account .hdr-link {
    display: none;
  }
}

dl.facts dd {
  overflow-wrap: anywhere;
}
.account .btn-link {
  display: inline-flex;
  align-items: center;
}

.trial-chip {
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sun-tint);
  color: var(--sun-ink);
  text-decoration: none;
  white-space: nowrap;
  margin-right: 4px;
}
.trial-chip:hover {
  color: var(--sun-ink);
  filter: brightness(0.97);
}
.trial-soon {
  background: var(--b-tint);
  color: var(--b-ink);
}

/* Rendez-vous */
.sw-ev {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #7a5bc4;
}
.day-ev {
  position: absolute;
  left: 6px;
  top: 6px;
  min-width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #7a5bc4;
  color: #fff;
  font-size: 9px;
  line-height: 8px;
  font-weight: 700;
  text-align: center;
}
.day-ev:not(:empty) {
  min-width: 13px;
  height: 13px;
  line-height: 13px;
  border-radius: 4px;
}
@media (prefers-color-scheme: dark) {
  .sw-ev,
  .day-ev {
    background: #b9a2ef;
    color: #16191e;
  }
}
.events {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.event {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 4px 14px;
  padding: 10px 0 10px 12px;
  border-left: 3px solid #7a5bc4;
  margin-bottom: 8px;
}
.event .ev-time {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.event .ev-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.event a {
  text-decoration: none;
  color: var(--text);
}
.ev-sante {
  border-left-color: var(--b);
}
.ev-ecole {
  border-left-color: var(--sun-line);
}
.ev-activite {
  border-left-color: var(--ok);
}
.ev-fete {
  border-left-color: #7a5bc4;
}
.ev-autre {
  border-left-color: var(--muted);
}
@media (max-width: 640px) {
  .event {
    grid-template-columns: 1fr;
  }
}
.day-sheet h1 {
  font-size: 24px;
  margin: 0;
  text-align: center;
}
.day-sheet .house {
  margin: 16px 0 8px;
}
label.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
label.check input {
  width: auto;
  min-height: 0;
  accent-color: var(--a);
}

.day-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
@media (max-width: 640px) {
  .day-sheet h1 {
    font-size: 20px;
  }
}
