/* Navigation simplifiée : 5 entrées, menu du compte et menu « Ajouter ». Jetons de refonte.css uniquement. */

/* Pastille de compteur dans le menu latéral (échéances fiscales). */
html body[data-design] .nav_link .nav_count {
  margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--c-warning-bg); color: var(--c-warning);
  font-size: var(--fs-caption); font-weight: 600; line-height: 20px; text-align: center;
}

/* Menu du compte : le bloc utilisateur devient un bouton qui ouvre la liste vers le haut. */
html body[data-design] .account-menu_component { position: relative; }
html body[data-design] .account-menu_component > summary { list-style: none; cursor: pointer; border-radius: var(--r-md); transition: background var(--dur-fast) var(--ease); }
html body[data-design] .account-menu_component > summary::-webkit-details-marker { display: none; }
html body[data-design] .account-menu_component > summary:hover { background: var(--c-bg); }
html body[data-design] .account-menu_component > summary:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
html body[data-design] .account-menu_chevron { margin-left: auto; width: 16px; height: 16px; color: var(--c-muted); transition: transform var(--dur-fast) var(--ease); }
html body[data-design] .account-menu_component[open] .account-menu_chevron { transform: rotate(180deg); }
html body[data-design] .account-menu_list,
html body[data-design] .add-menu_list {
  position: absolute; z-index: 60; display: grid; padding: var(--sp-2); min-width: 240px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); box-shadow: var(--sh-pop);
}
html body[data-design] .account-menu_list { left: 0; right: 0; bottom: calc(100% + var(--sp-2)); }
html body[data-design] .account-menu_list a,
html body[data-design] .add-menu_list a {
  display: flex; align-items: center; min-height: var(--h-control-sm); padding: 0 var(--sp-3); border-radius: var(--r-sm);
  color: var(--c-text); font-size: var(--fs-body-sm); font-weight: 500; text-decoration: none; white-space: nowrap;
}
html body[data-design] .account-menu_list a:hover,
html body[data-design] .add-menu_list a:hover { background: var(--c-bg); color: var(--c-ink); }
html body[data-design] .account-menu_list a[aria-current] { background: var(--c-brand-soft); color: var(--c-brand); }
html body[data-design] .account-menu_list a.is-logout { margin-top: var(--sp-1); border-top: 1px solid var(--c-line); border-radius: 0 0 var(--r-sm) var(--r-sm); color: var(--c-danger); }

/* Bouton « Ajouter » : action principale globale de la barre du haut. */
html body[data-design] .add-menu_component { position: relative; }
html body[data-design] .add-menu_button {
  list-style: none; display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--h-control-sm);
  padding: 0 var(--sp-4); border: 0; border-radius: var(--r-md); cursor: pointer;
  background: var(--c-brand); color: var(--c-on-brand); font-size: var(--fs-body-sm); font-weight: 600;
  transition: background var(--dur-fast) var(--ease);
}
html body[data-design] .add-menu_button::-webkit-details-marker { display: none; }
html body[data-design] .add-menu_button:hover { background: var(--c-brand-hover); }
html body[data-design] .add-menu_button:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
html body[data-design] .add-menu_button .ui_icon { width: 18px; height: 18px; stroke: currentColor; }
html body[data-design] .add-menu_list { right: 0; top: calc(100% + var(--sp-2)); }

/* Accès au compte sur mobile (le menu latéral y est masqué). */
html body[data-design] .topbar_account,
html body[data-design] .add-menu_component.is-fab { display: none; }
html body[data-design] .topbar_account .user_avatar { width: 32px; height: 32px; font-size: var(--fs-small); }

@media (max-width: 900px) {
  html body[data-design] .topbar_account { display: inline-grid; place-items: center; }
  /* Le bas du panneau latéral (menu du compte) reste au-dessus de la barre d'onglets. */
  html body[data-design] .sidebar_component .sidebar_bottom { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  /* Sur mobile, « Ajouter » devient un bouton rond flottant au-dessus de la barre d'onglets. */
  html body[data-design] .topbar_component .add-menu_component { display: none; }
  html body[data-design] .add-menu_component.is-fab { display: block; position: fixed; right: var(--sp-4); bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 45; }
  html body[data-design] .is-fab .add-menu_button { width: 56px; height: 56px; padding: 0; justify-content: center; border-radius: var(--r-lg); box-shadow: var(--sh-pop); }
  html body[data-design] .is-fab .add-menu_button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  html body[data-design] .is-fab .add-menu_button .ui_icon { width: 24px; height: 24px; }
  html body[data-design] .is-fab .add-menu_list { top: auto; bottom: calc(100% + var(--sp-2)); }
}
@media (prefers-reduced-motion: reduce) {
  html body[data-design] .account-menu_chevron, html body[data-design] .add-menu_button { transition: none; }
}

/* Fiche du bail : « Prochaines étapes » (contrat → état des lieux → loyers). */
html body[data-design] .lease_next { padding: var(--sp-5) var(--sp-6); }
html body[data-design] .lease_next h2 { margin: 0 0 var(--sp-3); }
html body[data-design] .lease_next-list { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
html body[data-design] .lease_next-list a {
  display: flex; align-items: center; gap: var(--sp-3); min-height: 64px; padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-line); border-radius: var(--r-md); color: inherit; text-decoration: none;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
html body[data-design] .lease_next-list a:hover { background: var(--c-bg); border-color: var(--c-brand); }
html body[data-design] .lease_next-list a:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
html body[data-design] .lease_next-list a > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
html body[data-design] .lease_next-list strong { color: var(--c-ink); font-weight: 600; }
html body[data-design] .lease_next-list small { color: var(--c-muted); font-size: var(--fs-small); }
html body[data-design] .lease_next-num {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  background: var(--c-brand-soft); color: var(--c-brand); font-weight: 700; font-variant-numeric: tabular-nums;
}
@media (max-width: 650px) { html body[data-design] .lease_next { padding: var(--sp-4); } }
@media (prefers-reduced-motion: reduce) { html body[data-design] .lease_next-list a { transition: none; } }

/* Barre d'encaissement groupé au-dessus de la liste des loyers. */
html body[data-design] .bulk_bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin: 0 0 var(--sp-3); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface); }
html body[data-design] .bulk_bar[hidden] { display: none; }
html body[data-design] .bulk_check { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; cursor: pointer; }
html body[data-design] .bulk_check input { width: 20px; height: 20px; accent-color: var(--c-brand); }
html body[data-design] td .bulk_check { float: left; min-height: 0; margin-right: var(--sp-2); }
html body[data-design] .bulk_count { color: var(--c-muted); font-size: var(--fs-body-sm); font-variant-numeric: tabular-nums; }
html body[data-design] .bulk_hint { flex-basis: 100%; color: var(--c-muted); font-size: var(--fs-small); }

/* Contrôles fiscaux : chaque point est suivi du lien qui permet de le corriger. */
html body[data-design] .fix_list { display: grid; gap: var(--sp-2); margin: 0 0 var(--sp-4); padding: 0; list-style: none; }
html body[data-design] .fix_list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-3); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface); }
html body[data-design] .fix_list li.is-blocker { border-color: var(--c-warning); background: var(--c-warning-bg); }
html body[data-design] .fix_list li > span { flex: 1 1 260px; }
html body[data-design] .button:disabled, html body[data-design] .button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* Choix exclusif en segments (ex. Dépense / Recette) : grandes cibles, état coché visible. */
html body[data-design] .choice_segment { margin: 0 0 var(--sp-4); padding: 0; border: 0; }
html body[data-design] .choice_segment legend { margin-bottom: var(--sp-2); font-weight: 600; color: var(--c-ink); }
html body[data-design] .choice_segment-list { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--c-track, #EBF1F2); }
html body[data-design] .choice_segment label { position: relative; display: block; margin: 0; cursor: pointer; }
html body[data-design] .choice_segment input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
html body[data-design] .choice_segment span { display: grid; place-items: center; min-height: 40px; min-width: 120px; padding: 0 var(--sp-4); border-radius: var(--r-pill); font-weight: 600; color: var(--c-muted); }
html body[data-design] .choice_segment input:checked + span { background: var(--c-surface); color: var(--c-brand); box-shadow: var(--sh); }
html body[data-design] .choice_segment input:focus-visible + span { outline: 2px solid var(--c-focus); outline-offset: 2px; }
html body[data-design] .form_advanced { margin: var(--sp-2) 0 var(--sp-4); }
html body[data-design] .form_advanced summary { cursor: pointer; color: var(--c-brand); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
