/* Auto-hébergée (voir static/fonts/LICENSE.md) : plus de dépendance à
   fonts.googleapis.com en production. Fichier variable, une seule source
   couvre les graisses 400 à 700. */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
}

/* ==========================================================================
   Jetons : palette tirée du logo Coprinet (bleu marine, bleu roi, cyan)
   ========================================================================== */
:root {
  color-scheme: light;
  --app-navy: #031d42;
  --app-bg: #eef4fa;
  --app-surface: #ffffff;
  --app-field: #f4f8fc;
  --app-hover: #e6f0fa;
  --app-primary: #0069bd;
  --app-primary-strong: #004f94;
  --app-accent: #00a9f0;
  --app-accent-strong: #0069bd;
  --app-accent-soft: #e1effb;
  --app-text: #0b1f3a;
  --app-text-2: #3d4f68;
  --app-text-muted: #5a6b82;
  --app-success: #177a55;
  --app-success-bg: #e3f2ea;
  --app-info: #1d6f86;
  --app-info-bg: #e1f0f4;
  --app-warn: #8f5709;
  --app-warn-bg: #f8eedc;
  --app-danger: #b3302a;
  --app-danger-bg: #f8e4e2;
  --app-line: #d5e0ec;
  --app-line-2: #e6eef6;
  --shadow-card-sm: 0 1px 2px rgba(3, 29, 66, 0.05);
  --shadow-card: 0 1px 2px rgba(3, 29, 66, 0.07), 0 8px 24px rgba(3, 29, 66, 0.08);
  --font-display: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --largeur-barre: 264px;
  --largeur-contenu: 1120px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--app-bg);
  color: var(--app-text);
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--app-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.num {
  text-align: right;
  white-space: nowrap;
}

.muted {
  color: var(--app-text-muted);
  font-size: 0.85rem;
}

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

/* ==========================================================================
   Mise en page : page d'immeuble (barre latérale + contenu)
   ========================================================================== */
.page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: var(--largeur-contenu);
  margin: 0 auto;
  padding: 24px 16px 96px;
}

.page--etroite {
  max-width: 680px;
}

.page--moyenne {
  max-width: 860px;
}

@media (min-width: 900px) {
  .page {
    padding-bottom: 48px;
  }

  /* Les pages qui portent la barre latérale lui laissent la place et centrent
     leur contenu dans l'espace restant. */
  .page:has(.cote) {
    max-width: calc(var(--largeur-contenu) + 64px);
    margin-left: max(
      var(--largeur-barre),
      calc((100vw - var(--largeur-contenu) - 64px + var(--largeur-barre)) / 2)
    );
    margin-right: 0;
    padding: 28px 32px 48px;
  }

  [dir="rtl"] .page:has(.cote) {
    margin-left: 0;
    margin-right: max(
      var(--largeur-barre),
      calc((100vw - var(--largeur-contenu) - 64px + var(--largeur-barre)) / 2)
    );
  }
}

/* En-tête de page : surtitre, titre, introduction, actions. */
.entete {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.entete__texte {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.entete__surtitre {
  font-size: 13px;
  color: var(--app-text-muted);
}

.entete h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.entete__intro {
  max-width: 52rem;
  margin: 4px 0 0;
  color: var(--app-text-2);
  font-size: 0.92rem;
}

.entete__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   Barre latérale (bureau), bandeau et barre basse (mobile)
   ========================================================================== */
.cote {
  display: none;
}

.bandeau-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bandeau-mobile img {
  display: block;
  height: 26px;
  width: auto;
}

.bandeau-mobile__immeuble {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  max-width: 60%;
  line-height: 1.25;
  text-decoration: none;
}

.bandeau-mobile__immeuble b,
.bandeau-mobile__immeuble small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bandeau-mobile__immeuble b {
  color: var(--app-text);
  font-size: 14px;
  font-weight: 600;
}

.bandeau-mobile__immeuble small {
  color: var(--app-text-muted);
  font-size: 12px;
}

.barre-basse {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: space-around;
  background: var(--app-surface);
  border-top: 1px solid var(--app-line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}

.barre-basse > a,
.menu-mobile > summary {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 5px 2px;
  border-radius: 7px;
  color: var(--app-text-muted);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  list-style: none;
  cursor: pointer;
}

.barre-basse > a span,
.menu-mobile > summary span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-mobile {
  flex: 1;
  display: flex;
}

.menu-mobile > summary::-webkit-details-marker {
  display: none;
}

.barre-basse svg {
  width: 21px;
  height: 21px;
}

.barre-basse > a[aria-current="page"],
.menu-mobile > summary[aria-current="page"],
.menu-mobile[open] > summary {
  background: var(--app-accent-soft);
  color: var(--app-primary);
}

.menu-mobile__panneau {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 8px 12px 16px;
  background: var(--app-surface);
  border-top: 1px solid var(--app-line);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -16px 40px rgba(3, 29, 66, 0.18);
}

.menu-mobile__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
  padding: 6px 0;
}

.menu-mobile__nav + .menu-mobile__nav {
  border-top: 1px solid var(--app-line-2);
}

.menu-mobile__groupe {
  grid-column: 1 / -1;
  padding: 8px 8px 2px;
  color: var(--app-text-muted);
  font-size: 12px;
  font-weight: 500;
}

.menu-mobile__nav form {
  margin: 0;
}

.menu-mobile__lien {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--app-text);
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-mobile__lien svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--app-text-muted);
}

.menu-mobile__lien[aria-current="page"] {
  background: var(--app-accent-soft);
  color: var(--app-primary);
}

.menu-mobile__lien[aria-current="page"] svg {
  color: var(--app-primary);
}

@media (min-width: 900px) {
  .bandeau-mobile,
  .barre-basse {
    display: none;
  }

  .cote {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--largeur-barre);
    padding: 20px 14px;
    overflow-y: auto;
    background: var(--app-surface);
    border-right: 1px solid var(--app-line);
    z-index: 30;
  }

  [dir="rtl"] .cote {
    inset: 0 0 0 auto;
    border-right: 0;
    border-left: 1px solid var(--app-line);
  }
}

.cote__logo {
  display: block;
  padding: 0 8px;
}

.cote__logo img {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
}

.cote__immeuble {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: var(--app-field);
  text-decoration: none;
}

.cote__immeuble:hover {
  border-color: var(--app-primary);
}

.cote__immeuble-texte {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.cote__immeuble b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.cote__immeuble small {
  color: var(--app-text-muted);
  font-size: 12.5px;
}

.cote__immeuble svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--app-text-muted);
}

.cote__nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cote__groupe {
  padding: 8px 12px 3px;
  color: var(--app-text-muted);
  font-size: 12px;
  font-weight: 500;
}

.cote__lien {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 12px;
  border-radius: 7px;
  color: var(--app-text-2);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
}

.cote__lien svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.cote__lien:hover {
  background: var(--app-hover);
  color: var(--app-text);
}

.cote__lien[aria-current="page"] {
  background: var(--app-accent-soft);
  color: var(--app-primary);
}

.cote__pied {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-top: 12px;
  border-top: 1px solid var(--app-line);
}

.cote__pied form {
  margin: 0;
}

.cote__pied button {
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

/* ==========================================================================
   Cartes, listes, tableaux, indicateurs
   ========================================================================== */
.carte {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 10px;
  box-shadow: var(--shadow-card-sm);
  padding: 18px 20px;
}

.carte--tableau {
  padding: 0;
  overflow: hidden;
}

.carte--accent {
  border-color: var(--app-primary);
}

.carte__titre {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 600;
}

.carte__titre--seul {
  margin: 0;
}

.carte__entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 20px;
}

.carte__entete h2 {
  font-size: 1.05rem;
  font-weight: 600;
}

.carte__aide {
  margin: 4px 0 0;
  color: var(--app-text-muted);
  font-size: 13.5px;
}

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
  gap: 20px;
  align-items: start;
}

.deux-colonnes {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}

.deux-colonnes > .principal {
  flex: 3 1 460px;
  min-width: 0;
}

.deux-colonnes > .secondaire {
  flex: 2 1 320px;
  min-width: 0;
}

.pile {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pile--large {
  gap: 20px;
}

.rangee {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.rangee--entre {
  justify-content: space-between;
}

/* Indicateurs chiffrés en tête de page */
.indicateurs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 12px;
}

.indicateur {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 10px;
  text-decoration: none;
}

a.indicateur:hover {
  border-color: var(--app-primary);
  box-shadow: var(--shadow-card);
}

.indicateur__valeur {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.indicateur__libelle {
  color: var(--app-text-muted);
  font-size: 13px;
}

.indicateur__note {
  color: var(--app-text-2);
  font-size: 12.5px;
}

.indicateur--alerte .indicateur__valeur {
  color: var(--app-danger);
}

.indicateur--ok .indicateur__valeur {
  color: var(--app-success);
}

/* Barre de progression */
.jauge {
  height: 6px;
  border-radius: 3px;
  background: var(--app-line-2);
  overflow: hidden;
  display: flex;
}

.jauge > i {
  display: block;
  height: 100%;
  background: var(--app-primary);
}

.jauge--ok > i {
  background: var(--app-success);
}

.jauge--alerte > i {
  background: var(--app-danger);
}

.jauge--attention > i {
  background: var(--app-warn);
}

/* Liste d'éléments : icône, corps, élément de fin */
.liste {
  display: flex;
  flex-direction: column;
}

.liste__element {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--app-line-2);
}

.liste__element:last-child {
  border-bottom: 0;
}

.liste__corps {
  flex: 1 1 220px;
  min-width: 0;
}

.liste__titre {
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.35;
}

.liste__meta {
  color: var(--app-text-muted);
  font-size: 13px;
}

.liste--cartes .liste__element {
  padding: 12px 20px;
}

/* Ligne libellé / valeur */
.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.kv > span:first-child {
  color: var(--app-text-muted);
}

.faits {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.25rem;
  margin: 0;
}

.faits dt {
  color: var(--app-text-muted);
}

.faits dd {
  margin: 0;
}

/* Tableaux */
.table-defile {
  overflow-x: auto;
}

/* Laisse la place au panneau d'un menu de ligne ouvert, même dans un tableau court */
.table-defile:has(.menu-ligne[open]) {
  min-height: 31rem;
}

.menu-ligne__panneau .segmented {
  display: flex;
}

.menu-ligne__panneau .segmented label {
  flex: 1;
  text-align: center;
  white-space: nowrap;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  padding: 10px 14px;
  background: var(--app-field);
  border-bottom: 1px solid var(--app-line);
  color: var(--app-text-muted);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

[dir="rtl"] .table th {
  text-align: right;
}

.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--app-line-2);
  vertical-align: top;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: var(--app-hover);
}

.table th.num,
.table td.num {
  text-align: right;
  white-space: nowrap;
}

.table tfoot td {
  background: var(--app-field);
  border-top: 1px solid var(--app-line);
  font-weight: 600;
}

.table .sous-texte {
  display: block;
  color: var(--app-text-muted);
  font-size: 12.5px;
  font-weight: 400;
}

.ligne-annulee td {
  color: var(--app-text-muted);
  text-decoration: line-through;
}

.ligne-annulee td:last-child,
.ligne-annulee td .pill {
  text-decoration: none;
}

/* ==========================================================================
   Pastilles, alertes
   ========================================================================== */
.pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  background: var(--app-line-2);
  color: var(--app-text-muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.pill::before,
.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pill svg,
.status-pill svg {
  display: none;
}

.pill--ok,
.status-pill--ok {
  background: var(--app-success-bg);
  color: var(--app-success);
}

.pill--warn,
.status-pill--warn {
  background: var(--app-warn-bg);
  color: var(--app-warn);
}

.pill--danger,
.status-pill--danger {
  background: var(--app-danger-bg);
  color: var(--app-danger);
}

.pill--info,
.status-pill--info {
  background: var(--app-info-bg);
  color: var(--app-info);
}

.pill--accent {
  background: var(--app-accent-soft);
  color: var(--app-primary);
}

.pill--neutre,
.pill--grey,
.status-pill--grey {
  background: var(--app-line-2);
  color: var(--app-text-muted);
}

.alerte,
.banner-error,
.banner-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.alerte svg {
  flex: none;
}

.alerte--erreur,
.banner-error {
  background: var(--app-danger-bg);
  color: var(--app-danger);
}

.alerte--succes,
.banner-success {
  background: var(--app-success-bg);
  color: var(--app-success);
}

.alerte--attention {
  background: var(--app-warn-bg);
  color: var(--app-warn);
}

.alerte--info {
  background: var(--app-accent-soft);
  color: var(--app-primary);
}

.alerte a {
  color: inherit;
  text-decoration: underline;
}

.vide {
  padding: 28px 20px;
  color: var(--app-text-muted);
  text-align: center;
}

/* ==========================================================================
   Boutons, liens, formulaires
   ========================================================================== */
.btn,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--app-line);
  border-radius: 7px;
  background: var(--app-surface);
  color: var(--app-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  background: var(--app-hover);
}

.btn svg,
.btn-primary svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.btn--primaire,
.btn-primary {
  border-color: var(--app-primary);
  background: var(--app-primary);
  color: #fff;
}

.btn--primaire:hover,
.btn-primary:hover {
  border-color: var(--app-primary-strong);
  background: var(--app-primary-strong);
}

.btn--discret {
  border-color: transparent;
  background: transparent;
  color: var(--app-primary);
}

.btn--discret:hover {
  background: var(--app-accent-soft);
}

.btn--danger {
  border-color: var(--app-danger);
  background: var(--app-danger);
  color: #fff;
}

.btn--danger:hover {
  background: var(--app-danger);
  filter: brightness(0.92);
}

.btn--petit {
  padding: 6px 12px;
  font-size: 13px;
}

.btn--plein {
  width: 100%;
}

.btn:disabled,
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lien,
.link-muted {
  padding: 0;
  border: 0;
  background: none;
  color: var(--app-primary);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.lien:hover,
.link-muted:hover {
  text-decoration: underline;
}

.lien--danger {
  color: var(--app-danger);
}

.formulaire {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.formulaire__grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: 12px 16px;
}

.formulaire__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.champ,
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.champ > label,
.field > label {
  color: var(--app-text-muted);
  font-size: 12.5px;
  font-weight: 500;
}

.champ input,
.champ select,
.champ textarea,
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--app-line);
  border-radius: 7px;
  background: var(--app-surface);
  color: var(--app-text);
  font-size: 14px;
}

.champ textarea,
.field textarea {
  min-height: 84px;
  resize: vertical;
}

.champ input[type="checkbox"],
.champ input[type="radio"],
.field input[type="checkbox"],
.field input[type="radio"] {
  width: auto;
}

.champ input:focus,
.champ select:focus,
.champ textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px var(--app-accent-soft);
}

.champ__aide {
  color: var(--app-text-muted);
  font-size: 12px;
}

.filtre {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.filtre .champ {
  min-width: 13rem;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 9px;
}

.segmented button,
.segmented a {
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--app-text-2);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.segmented button.is-active,
.segmented a.is-active {
  background: var(--app-accent-soft);
  color: var(--app-primary);
}

/* Action repliable (annuler, muter...) */
.annuler summary {
  color: var(--app-danger);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.annuler form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Composants d'accueil : icône, carte de statut, bannière, actions rapides
   ========================================================================== */
.icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--app-accent-soft);
  color: var(--app-primary);
}

.icon-badge svg {
  width: 19px;
  height: 19px;
}

.icon-badge--lg {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.icon-badge--lg svg {
  width: 24px;
  height: 24px;
}

.icon-badge--ok {
  background: var(--app-success-bg);
  color: var(--app-success);
}

.icon-badge--warn {
  background: var(--app-warn-bg);
  color: var(--app-warn);
}

.icon-badge--danger {
  background: var(--app-danger-bg);
  color: var(--app-danger);
}

.icon-badge--info {
  background: var(--app-info-bg);
  color: var(--app-info);
}

.status-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.status-card .status-body {
  flex: 1 1 160px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-card .status-amount {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.banner-gradient {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 18px 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--app-navy) 0%, var(--app-primary) 100%);
  color: #fff;
  text-decoration: none;
}

.banner-gradient .eyebrow {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 600;
}

.banner-gradient .title {
  flex: 1 1 280px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.banner-gradient .cta,
.banner-gradient a.cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 7px;
  background: #fff;
  color: var(--app-primary);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: 10px;
}

.quick-actions a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 10px;
  color: var(--app-text);
  text-decoration: none;
}

.quick-actions a:hover {
  border-color: var(--app-primary);
  box-shadow: var(--shadow-card);
}

.quick-actions .label {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.quick-actions .label b {
  font-size: 14px;
  font-weight: 600;
}

.quick-actions .label span {
  color: var(--app-text-muted);
  font-size: 12px;
}

/* ==========================================================================
   Pages sans barre latérale : connexion, assistant, pages publiques
   ========================================================================== */
.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

.auth-marque {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 24px;
  background: linear-gradient(135deg, var(--app-navy) 0%, var(--app-primary) 100%);
  color: #fff;
}

.auth-marque__logo {
  align-self: flex-start;
  padding: 12px 18px;
  border-radius: 14px;
  background: #fff;
}

.auth-marque__logo img {
  display: block;
  height: 72px;
  width: auto;
}

.auth-marque h2 {
  max-width: 28rem;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.auth-marque ul {
  display: none;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-marque li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 28rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
}

.auth-marque li .icon-badge {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.auth-marque__pied {
  display: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.auth-formulaire {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 40px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-card h1 {
  font-size: 1.45rem;
  letter-spacing: -0.015em;
}

.auth-card .carte {
  padding: 24px;
}

.auth-tagline {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 13.5px;
}

.auth-pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--app-line-2);
  font-size: 12.5px;
}

.auth-pied a {
  color: var(--app-text-muted);
  text-decoration: none;
}

.auth-pied a:hover {
  text-decoration: underline;
}

.muted-link {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 13.5px;
  text-align: center;
}

.muted-link a {
  color: var(--app-primary);
  font-weight: 600;
  text-decoration: none;
}

.muted-link a:hover {
  text-decoration: underline;
}

@media (min-width: 900px) {
  .auth-split {
    grid-template-columns: minmax(380px, 1fr) minmax(420px, 1fr);
  }

  .auth-marque {
    justify-content: space-between;
    padding: 48px 56px;
  }

  .auth-marque h2 {
    font-size: 2.1rem;
  }

  .auth-marque ul,
  .auth-marque__pied {
    display: flex;
  }
}

.barre-publique {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.barre-publique img {
  display: block;
  height: 36px;
  width: auto;
}

/* Étapes de l'assistant de démarrage */
.etapes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.etapes li {
  padding: 4px 12px;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  background: var(--app-surface);
  color: var(--app-text-muted);
  font-size: 12.5px;
  font-weight: 500;
}

.etapes li.is-active {
  border-color: transparent;
  background: var(--app-accent-soft);
  color: var(--app-primary);
}

.etapes li.is-done {
  color: var(--app-success);
}

.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wizard-steps .step {
  padding: 4px 12px;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  background: var(--app-surface);
  color: var(--app-text-muted);
  font-size: 12.5px;
  font-weight: 500;
}

.wizard-steps .step.is-active {
  border-color: transparent;
  background: var(--app-accent-soft);
  color: var(--app-primary);
}

.wizard-steps .step.is-done {
  color: var(--app-success);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.pager .btn,
.pager .adm-btn {
  text-decoration: none;
}

.pager-off {
  opacity: 0.45;
  cursor: default;
}

.pager-info {
  color: var(--app-text-muted);
  font-size: 0.85rem;
}

/* Compatibilité avec les anciens noms, le temps de finir la migration. */
.stat-inline {
  color: var(--app-text-muted);
  font-size: 13px;
  font-weight: 500;
}

.stat-inline b {
  color: var(--app-text);
  font-weight: 700;
}

/* --- Administration de la plateforme (même style que l'administration d'OneTPE) --- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.adm-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.adm-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem max(16px, 3vw);
  background: var(--app-navy);
  color: #fff;
}

.adm-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.adm-brand small {
  font-weight: 500;
  opacity: 0.7;
}

.adm-brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
}

.adm-brand-mark img {
  width: 22px;
  height: auto;
}

.adm-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
}

.adm-nav a,
.adm-group-btn {
  color: inherit;
  font: inherit;
  font-weight: 500;
  opacity: 0.78;
  text-decoration: none;
}

.adm-nav a:hover,
.adm-nav a[aria-current="page"],
.adm-group-btn:hover,
.adm-group:focus-within .adm-group-btn {
  opacity: 1;
}

.adm-nav a[aria-current="page"] {
  box-shadow: 0 2px 0 var(--app-accent);
}

.adm-group {
  position: relative;
}

.adm-group-btn {
  background: none;
  border: 0;
  padding: 0.25rem 0;
  cursor: pointer;
}

.adm-caret {
  margin-left: 0.3rem;
  font-size: 0.75em;
}

.adm-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -0.75rem;
  z-index: 20;
  min-width: 13rem;
  padding: 0.4rem;
  background: var(--app-navy);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.adm-group:hover .adm-menu,
.adm-group:focus-within .adm-menu {
  display: grid;
}

.adm-menu a {
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
}

.adm-menu a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.adm-badge {
  display: inline-block;
  min-width: 1.25rem;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #c8372f;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  opacity: 1;
}

.adm-who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  font-size: 0.9rem;
}

.adm-who a {
  color: inherit;
  opacity: 0.78;
  text-decoration: none;
}

.adm-who button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  color: inherit;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

.adm-main {
  width: 100%;
  max-width: 82rem;
  margin-inline: auto;
  padding: 1.5rem max(16px, 3vw) 3rem;
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.adm-main h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}

.adm-main h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.adm-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.adm-lede {
  max-width: 52rem;
  margin: 0.35rem 0 0;
  color: var(--app-text-muted);
  font-size: 0.92rem;
}

.adm-retour {
  display: inline-block;
  margin-bottom: 0.3rem;
  color: var(--app-text-muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.adm-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
}

.adm-kpi {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 10px;
}

.adm-kpi strong {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.adm-kpi span {
  color: var(--app-text-muted);
  font-size: 0.85rem;
}

.adm-filtre {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.adm-filtre label {
  display: grid;
  gap: 4px;
  color: var(--app-text-muted);
  font-size: 0.85rem;
}

.adm-filtre select,
.adm-filtre input {
  min-width: 13rem;
  padding: 8px 10px;
  border: 1px solid var(--app-line);
  border-radius: 7px;
  background: var(--app-surface);
  font: inherit;
  color: var(--app-text);
}

.adm-btn {
  padding: 8px 14px;
  border: 1px solid var(--app-line);
  border-radius: 7px;
  background: var(--app-surface);
  color: var(--app-text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.adm-btn:hover {
  background: var(--app-hover);
}

.adm-btn--primary {
  border-color: var(--app-primary);
  background: var(--app-primary);
  color: #fff;
}

.adm-btn--danger {
  border-color: var(--app-danger);
  background: var(--app-surface);
  color: var(--app-danger);
}

.adm-btn--danger:hover {
  background: var(--app-danger-bg);
}

.adm-btn--primary:hover {
  background: var(--app-primary-strong);
}

.adm-table {
  padding: 0;
  overflow-x: auto;
}

.adm-table table {
  min-width: 56rem;
}

.adm-table th {
  text-align: left;
}

.adm-table th,
.adm-table td {
  padding-left: 14px;
  padding-right: 14px;
  vertical-align: top;
}

.adm-table th.num,
.adm-table td.num,
.num {
  text-align: right;
  white-space: nowrap;
}

.adm-nom {
  display: block;
  font-weight: 600;
  text-decoration: none;
}

.adm-nom:hover {
  text-decoration: underline;
}

.adm-muted {
  display: block;
  color: var(--app-text-muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.adm-date {
  width: 11rem;
  white-space: nowrap;
  color: var(--app-text-muted);
}

.adm-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.adm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.adm-modifier summary {
  list-style: none;
}

.adm-modifier summary::-webkit-details-marker {
  display: none;
}

.adm-modifier__form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 14rem;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: var(--app-field);
}

.adm-modifier__form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--app-text-muted);
  font-size: 0.82rem;
}

.adm-modifier__form select,
.adm-modifier__form input {
  padding: 7px 9px;
  border: 1px solid var(--app-line);
  border-radius: 7px;
  background: var(--app-surface);
  font: inherit;
  color: var(--app-text);
}

.adm-vide {
  color: var(--app-text-muted);
  text-align: center;
}

.adm-grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
  gap: 1rem;
  align-items: start;
}

.adm-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.25rem;
  margin: 0;
}

.adm-facts dt {
  color: var(--app-text-muted);
}

.adm-facts dd {
  margin: 0;
}

.status-pill--grey {
  background: var(--app-line-2);
  color: var(--app-text-muted);
}

/* Cadre des pages hors immeuble : en-tête et pied de page */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site__entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-line);
}

.site__logo img {
  display: block;
  width: auto;
  height: 34px;
}

.site__liens {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.site__liens a {
  color: var(--app-text);
  font-weight: 500;
  text-decoration: none;
}

.site__liens a:hover {
  color: var(--app-primary);
}

.site__liens form {
  margin: 0;
}

.site__liens button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  color: var(--app-text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.site__liens button:hover {
  border-color: var(--app-primary);
  color: var(--app-primary);
}

.site__corps {
  flex: 1;
}

.site__corps .page {
  padding-bottom: 32px;
}

.site__pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 18px 20px;
  background: var(--app-surface);
  border-top: 1px solid var(--app-line);
  color: var(--app-text-muted);
  font-size: 13px;
}

.site__pied a {
  color: var(--app-primary);
  text-decoration: none;
}

.site__pied a:hover {
  text-decoration: underline;
}

/* Page d'accueil publique
   Idée directrice : l'immeuble transparent. La façade du héros est faite de lots,
   chaque fenêtre colorée selon l'état de ses paiements ; le reste de la page reste
   sobre et laisse cette image porter l'identité. */
.vit {
  --vit-encre: #031d42;
  --vit-bleu: #0069bd;
  --vit-ciel: #00a9f0;
  --vit-brume: #e9f1f8;
  --vit-papier: #ffffff;
  --vit-ambre: #e0a526;
  --vit-texte: #2c3e57;
  background: var(--vit-papier);
  color: var(--vit-texte);
  font-size: 17px;
  line-height: 1.6;
}

.vit__evitement {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 8px 14px;
  background: var(--vit-encre);
  border-radius: 8px;
  color: #fff;
}

.vit__evitement:focus {
  top: 12px;
}

.vit__cadre {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.vit__cadre--etroit {
  max-width: 760px;
}

.vit :focus-visible {
  outline: 3px solid var(--vit-ciel);
  outline-offset: 2px;
}

/* En-tête */
.vit__entete {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #dde7f1;
  backdrop-filter: saturate(1.4) blur(8px);
}

.vit__barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.vit__logo img {
  display: block;
  width: auto;
  height: 34px;
}

.vit__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vit__lien-nav {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--vit-encre);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.vit__lien-nav:hover {
  background: var(--vit-brume);
}

/* Typographie */
.vit h1,
.vit h2,
.vit h3 {
  color: var(--vit-encre);
  font-weight: 700;
}

.vit h1 {
  max-width: 13ch;
  margin: 0 0 22px;
  font-size: clamp(2.5rem, 6.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.vit h2 {
  max-width: 22ch;
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.vit h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.vit__chapeau {
  max-width: 36rem;
  margin: 0 0 28px;
  font-size: 1.08rem;
}

/* Héros */
.vit__hero {
  padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 104px);
  background: var(--vit-brume);
}

.vit__hero-grille {
  display: grid;
  gap: 56px;
  align-items: center;
}

.vit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.vit__cta-principal {
  padding: 13px 22px;
  font-size: 16px;
}

.vit__note {
  margin: 18px 0 0;
  color: #5a6b82;
  font-size: 14.5px;
}

/* Façade illustrée (SVG) : la vitre et la pastille de chaque fenêtre donnent l'état du lot */
.facade {
  position: relative;
  justify-self: center;
  width: min(100%, 460px);
  margin: 0;
}

.facade__dessin {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 40px rgba(3, 29, 66, 0.12));
}

.facade__fenetre {
  animation: allumage 0.5s ease-out both;
  animation-delay: calc(var(--rang) * 45ms + 200ms);
  transform-box: fill-box;
  transform-origin: center;
}

.facade__code {
  fill: #5a6b82;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
}

.facade__pastille {
  fill: var(--vit-bleu);
}

.facade__fenetre--regler .facade__pastille {
  fill: var(--vit-ciel);
}

.facade__fenetre--retard .facade__pastille {
  fill: var(--vit-ambre);
}

.facade__enseigne {
  fill: #ffffff;
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 600;
  text-anchor: middle;
}

.facade__choix {
  animation: apparition 0.4s ease-out 0.9s both;
}

.facade__fiche {
  position: absolute;
  right: -24px;
  top: 30%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 230px;
  padding: 12px 14px;
  background: var(--vit-papier);
  border: 1px solid #cddcea;
  border-left: 4px solid var(--vit-ambre);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(3, 29, 66, 0.16);
  font-size: 13.5px;
  line-height: 1.4;
  animation: apparition 0.4s ease-out 0.9s both;
}

.facade__fiche b {
  color: var(--vit-encre);
  font-size: 15.5px;
}

.facade__fiche-lot,
.facade__fiche span:last-child {
  color: #5a6b82;
}

.facade__legende {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-top: 14px;
  color: var(--vit-texte);
  font-size: 14px;
}

.facade__legende span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.puce {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--vit-bleu);
}

.puce--regler {
  background: var(--vit-ciel);
}

.puce--retard {
  background: var(--vit-ambre);
}

@keyframes allumage {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

@keyframes apparition {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .facade__fenetre,
  .facade__choix,
  .facade__fiche {
    animation: none;
  }
}

/* Bandes de contenu */
.vit__bande {
  padding: clamp(56px, 8vw, 104px) 0;
}

.vit__bande--clair {
  background: var(--vit-brume);
}

/* Deux rôles */
.roles {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}

.role {
  padding-top: 20px;
  border-top: 3px solid var(--vit-bleu);
}

.role--copro {
  border-top-color: var(--vit-ciel);
}

.role__liste {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.role__liste li {
  max-width: 34rem;
}

.role__liste b {
  display: block;
  color: var(--vit-encre);
}

/* Une année : vraie séquence, donc numérotée par sa chronologie */
.annee {
  display: grid;
  gap: 0;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.annee li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 0 28px 28px;
  border-left: 2px solid #c3d6e8;
}

.annee li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--vit-papier);
  border: 2px solid var(--vit-bleu);
}

.annee li:last-child {
  padding-bottom: 0;
}

.annee__date {
  color: var(--vit-bleu);
  font-size: 14px;
  font-weight: 600;
}

.annee b {
  color: var(--vit-encre);
  font-size: 1.1rem;
}

.annee li > span:last-child {
  max-width: 24rem;
}

/* Offres */
.offres {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

.offre {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 22px;
  border: 1px solid #d5e0ec;
  border-top: 4px solid var(--vit-ciel);
  border-radius: 14px;
  background: #fff;
}

.offre__prix {
  margin: 6px 0 0;
  color: var(--vit-encre);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.offre__annuel {
  margin: 4px 0 0;
  color: var(--app-success);
  font-size: 0.9rem;
  font-weight: 600;
}

.offre__prix small {
  display: block;
  margin-top: 2px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  opacity: 0.75;
}

.offre__pour {
  margin: 0;
}

.offre ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 22px;
  padding: 0 0 0 1.1rem;
}

.offre .btn {
  margin-top: auto;
}

/* Questions */
.questions {
  margin-top: 28px;
  border-top: 1px solid #c9d8e6;
}

.questions details {
  border-bottom: 1px solid #c9d8e6;
}

.questions summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  color: var(--vit-encre);
  font-size: 1.05rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.questions summary::-webkit-details-marker {
  display: none;
}

.questions summary::after {
  content: "+";
  flex: none;
  color: var(--vit-bleu);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}

.questions details[open] summary::after {
  content: "–";
}

.questions p {
  max-width: 40rem;
  margin: 0 0 20px;
}

/* Appel final */
.vit__final {
  padding: clamp(48px, 7vw, 80px) 0;
  background: var(--vit-encre);
}

.vit__final-grille {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.vit__final h2 {
  margin: 0;
  color: #fff;
}

.btn--plein-clair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  background: #fff;
  border-radius: 10px;
  color: var(--vit-encre);
  font-weight: 600;
  text-decoration: none;
}

.btn--plein-clair:hover {
  background: var(--vit-brume);
}

/* Pied de page sur deux lignes */
.vit__pied {
  padding: 32px 0;
  background: var(--vit-papier);
  border-top: 3px solid var(--vit-ciel);
  color: #5a6b82;
  font-size: 14px;
}

.vit__pied-grille {
  display: grid;
  gap: 14px;
}

/* « Suivez Coprinet » : même bloc dans le pied de la vitrine, des pages de compte et de connexion */
.reseaux {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  font-size: 13.5px;
}

.reseaux__titre {
  font-weight: 600;
}

.reseaux__lien {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  text-decoration: none;
  opacity: 0.9;
}

.reseaux__lien:hover {
  opacity: 1;
}

.auth-card .reseaux {
  margin-top: 8px;
  color: var(--app-text-muted);
}

.vit__pied-liens {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}

.vit__pied a {
  color: inherit;
}

.vit__pied a:hover {
  color: var(--vit-bleu);
}

.vit__pied-texte {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
}

.vit__signature {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.vit__signature-lien {
  display: inline-flex;
  padding: 3px 6px;
  background: #fff;
  border: 1px solid #d5e0ec;
  border-radius: 6px;
}

.vit__signature-lien img {
  width: auto;
  height: 20px;
}

@media (min-width: 760px) {
  .roles {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  .offres {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .offres {
    grid-template-columns: repeat(4, 1fr);
  }

  .offre h3 {
    min-height: 2.6em;
    line-height: 1.3;
  }
}

@media (min-width: 760px) {
  .annee {
    grid-template-columns: repeat(4, 1fr);
  }

  .annee li {
    padding: 28px 20px 0 0;
    border-left: 0;
    border-top: 2px solid #c3d6e8;
  }

  .annee li::before {
    left: 0;
    top: -7px;
  }
}

@media (min-width: 960px) {
  .vit__hero-grille {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

@media (max-width: 640px) {
  .vit {
    font-size: 16px;
  }

  .vit__cadre {
    padding: 0 16px;
  }

  .vit__secondaire {
    display: none;
  }

  .vit__barre {
    gap: 8px;
  }

  .vit__logo img {
    height: 26px;
  }

  .vit__nav {
    gap: 2px;
  }

  .vit__lien-nav,
  .vit__nav .btn {
    padding-inline: 9px;
    font-size: 13.5px;
    white-space: nowrap;
  }

  .facade__fiche {
    position: static;
    max-width: none;
    margin-top: 12px;
  }

  .vit__pied-texte {
    justify-content: center;
    text-align: center;
  }
}

/* Pages d'erreur */
.erreur {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(32px, 8vw, 72px) 0;
}

.erreur__code {
  color: var(--app-accent);
  font-size: 15px;
  font-weight: 700;
}

.erreur h1 {
  margin: 0;
  color: var(--app-navy);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.erreur__texte {
  max-width: 34rem;
  margin: 0 0 8px;
  color: var(--app-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Tableaux : sous-texte dans une cellule, et affichage en cartes sur téléphone */
.table td .sous-texte {
  display: block;
  margin-top: 2px;
  color: var(--app-text-muted);
  font-size: 12.5px;
  font-weight: 400;
}

.table__action {
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .table--cartes thead {
    display: none;
  }

  .table--cartes,
  .table--cartes tbody,
  .table--cartes tr,
  .table--cartes td {
    display: block;
    width: 100%;
  }

  .table--cartes tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--app-line-2);
  }

  .table--cartes tbody tr:last-child {
    border-bottom: 0;
  }

  .table--cartes td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border: 0;
    text-align: right;
  }

  .table--cartes td::before {
    content: attr(data-label);
    color: var(--app-text-muted);
    font-size: 13px;
    text-align: left;
  }

  .table--cartes td:not([data-label])::before {
    content: none;
  }

  .table--cartes td.table__titre {
    display: block;
    padding-bottom: 6px;
    text-align: left;
  }

  .table--cartes td.table__action {
    justify-content: flex-start;
    padding-top: 8px;
  }

  .table--cartes td.table__action:empty {
    display: none;
  }

  .table--cartes tbody tr:hover td {
    background: transparent;
  }
}

/* Menu d'actions d'une ligne (« ⋯ ») */
.menu-ligne {
  position: relative;
  display: inline-block;
}

.menu-ligne summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--app-text-muted);
  list-style: none;
  cursor: pointer;
}

.menu-ligne summary::-webkit-details-marker {
  display: none;
}

.menu-ligne summary:hover,
.menu-ligne[open] summary {
  background: var(--app-accent-soft);
  color: var(--app-primary);
}

.menu-ligne form {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(18rem, 80vw);
  padding: 14px;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(3, 29, 66, 0.16);
  text-align: left;
  white-space: normal;
}

[dir="rtl"] .menu-ligne form {
  right: auto;
  left: 0;
}

@media (max-width: 640px) {
  .menu-ligne form {
    right: auto;
    left: 0;
  }
}

/* Champ fichier : bouton du navigateur aligné sur le style des boutons */
input[type="file"] {
  padding: 6px;
  color: var(--app-text-muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  background: var(--app-accent-soft);
  border: 0;
  border-radius: 8px;
  color: var(--app-primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: #cfe4f7;
}

.champ__lien {
  float: right;
  font-size: 13px;
}

[dir="rtl"] .champ__lien {
  float: left;
}

.site__liens a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 520px) {
  .site__entete {
    padding: 10px 16px;
  }

  .site__logo img {
    height: 28px;
  }

  .site__liens {
    gap: 8px;
  }

  .site__liens span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .site__liens a,
  .site__liens button {
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--app-line);
    border-radius: 8px;
  }
}

/* Bloc repliable « + Nouvel élément » au-dessus d'une liste */
.depliant {
  padding: 0;
}

.depliant__titre {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  color: var(--app-primary);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.depliant__titre::-webkit-details-marker {
  display: none;
}

.depliant__titre:hover {
  background: var(--app-hover);
  border-radius: 10px;
}

.depliant[open] > .depliant__titre {
  border-bottom: 1px solid var(--app-line-2);
  border-radius: 10px 10px 0 0;
}

.depliant__corps {
  padding: 18px 20px 20px;
}

.carte__pied {
  padding: 14px 20px;
  border-top: 1px solid var(--app-line-2);
}

.carte__pied form {
  margin: 0;
}

.appel__total {
  color: var(--app-navy);
  font-size: 1.05rem;
  white-space: nowrap;
}

/* Élément de liste cliquable en entier */
.liste__element--lien {
  margin: 0 -12px;
  padding-inline: 12px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  flex-wrap: nowrap;
}

.liste__element--lien:hover {
  background: var(--app-hover);
}

.liste__element--lien .liste__titre,
.liste__element--lien .liste__meta {
  display: block;
}

/* État vide : icône, explication, action éventuelle */
.vide--illustre {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.vide--illustre p {
  max-width: 28rem;
  margin: 0;
}

/* Annonces */
.annonce {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.annonce__entete {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.annonce__entete h2 {
  margin: 0;
  color: var(--app-navy);
  font-size: 1.1rem;
}

.annonce__texte {
  margin: 0;
  line-height: 1.6;
  white-space: pre-line;
}

/* Lien de retour au-dessus d'un en-tête de page */
.lien--retour {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin-bottom: -8px;
  font-size: 14px;
}

/* Parcours en étapes (assemblée générale) */
.etapes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: etape;
}

.etapes__item a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 999px;
  color: var(--app-text-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.etapes__item a:hover {
  border-color: var(--app-primary);
}

.etapes__puce {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--app-accent-soft);
  color: var(--app-primary);
  font-size: 12.5px;
  font-weight: 700;
}

.etapes__item--faite .etapes__puce {
  background: var(--app-success);
  color: #fff;
}

.etape {
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-margin-top: 16px;
}

.etape.carte--tableau {
  gap: 0;
}

.etape__titre {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--app-navy);
  font-size: 1.1rem;
}

.etape p.muted {
  margin: 0;
}

.etape__bloc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--app-line-2);
}

.etape__bloc h3 {
  margin: 0;
  font-size: 0.95rem;
}

.resolutions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 1.4rem;
}

/* Formulaire compact sur une ligne (s'enroule sur mobile) */
.formulaire__ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.formulaire__ligne .champ {
  flex: 1 1 9rem;
}

.formulaire__ligne .champ--large {
  flex: 3 1 16rem;
}

.formulaire__ligne .btn {
  flex: none;
}

.vote {
  align-items: flex-start;
}

.vote__saisie {
  flex-basis: 100%;
}

.vote__saisie .champ {
  flex: 1 1 6rem;
}

/* Présence : le mandataire et le formulaire n'apparaissent que pour le mode choisi */
.presence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.presence select,
.presence input[type="file"] {
  width: auto;
  max-width: 100%;
}

.presence__procuration,
.presence__correspondance {
  display: none;
}

.presence:has(option[value="procuration"]:checked) .presence__procuration,
.presence:has(option[value="correspondance"]:checked) .presence__correspondance {
  display: block;
}

.presence select {
  padding: 6px 8px;
  border: 1px solid var(--app-line);
  border-radius: 7px;
  background: var(--app-surface);
  color: var(--app-text);
  font: inherit;
  font-size: 14px;
}

.presence select:focus {
  outline: 2px solid var(--app-accent);
  outline-offset: 1px;
}

.signalement {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.signalement .segmented {
  align-self: flex-start;
}

.table-defile--encadre {
  border: 1px solid var(--app-line);
  border-radius: 8px;
}

/* Voile derrière le menu mobile ouvert : un toucher dessus le referme */
.menu-mobile[open] > summary::before {
  content: "";
  position: fixed;
  inset: 0 0 calc(62px + env(safe-area-inset-bottom, 0px));
  z-index: -1;
  background: rgba(3, 29, 66, 0.35);
}

.barre-basse > a,
.menu-mobile > summary {
  font-size: 10.5px;
  letter-spacing: -0.01em;
}

@media (max-width: 640px) {
  .presence {
    justify-content: flex-end;
  }
}

/* Page Abonnement */
.abonnement-etat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.abonnement-etat__tete {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.abonnement-etat h2 {
  margin: 2px 0 0;
  color: var(--app-navy);
  font-size: 1.35rem;
}

.abonnement-etat h2 small {
  color: var(--app-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.virement {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--app-field);
  border: 1px dashed var(--app-line);
  border-radius: 8px;
}

.virement__ref {
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.offres-app {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 16px;
}

.offre-app {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.offre-app--conseillee {
  border: 2px solid var(--app-primary);
}

.offre-app--inactive {
  opacity: 0.65;
}

.offre-app__tete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.offre-app__tete h3 {
  margin: 0;
  color: var(--app-navy);
  font-size: 1.1rem;
}

.offre-app__prix {
  margin: 0;
  color: var(--app-navy);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.1;
}

.offre-app__prix small {
  color: var(--app-text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.offre-app__liste {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 8px;
  padding: 0;
  font-size: 14px;
  list-style: none;
}

.offre-app__liste li {
  display: flex;
  gap: 8px;
}

.offre-app__liste svg {
  flex: none;
  margin-top: 2px;
  color: var(--app-success);
}

.offre-app form,
.offre-app > .btn {
  margin-top: auto;
}

/* Accueil du compte : vue d'ensemble des immeubles */
.immeubles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr));
  gap: 16px;
}

.immeuble-carte {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s;
}

.immeuble-carte:hover {
  border-color: var(--app-primary);
}

.immeuble-carte__tete {
  display: flex;
  align-items: center;
  gap: 12px;
}

.immeuble-carte__tete .liste__corps {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.immeuble-carte__nom {
  color: var(--app-navy);
  font-size: 1.02rem;
  line-height: 1.3;
}

.immeuble-carte__chiffres {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--app-line-2);
}

.immeuble-carte__chiffres span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.immeuble-carte__chiffres small {
  color: var(--app-text-muted);
  font-size: 12px;
}

.immeuble-carte__chiffres b {
  font-size: 14.5px;
  white-space: nowrap;
}

.immeuble-carte__pied {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--app-text-muted);
  font-size: 13px;
}

.texte-alerte {
  color: var(--app-danger);
}

.a-traiter__puce {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--app-accent);
}

.a-traiter--0 .a-traiter__puce {
  background: var(--app-danger);
}

.a-traiter--1 .a-traiter__puce {
  background: var(--app-warn);
}

.compte {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compte__identite {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compte__identite .liste__corps {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.compte__identite .liste__meta {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sélecteur d'immeuble (barre latérale et bandeau mobile) */
.selecteur {
  position: relative;
}

.selecteur > summary {
  list-style: none;
  cursor: pointer;
}

.selecteur > summary::-webkit-details-marker {
  display: none;
}

.selecteur[open] > .cote__immeuble {
  border-color: var(--app-primary);
}

.selecteur[open] > .cote__immeuble svg {
  transform: rotate(90deg);
}

.selecteur__liste {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  max-height: 60vh;
  overflow-y: auto;
  padding: 6px;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(3, 29, 66, 0.18);
}

.bandeau-mobile .selecteur__liste {
  left: auto;
  width: min(18rem, 88vw);
}

.selecteur__titre {
  padding: 6px 10px 4px;
  color: var(--app-text-muted);
  font-size: 12px;
}

.selecteur__liste a {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--app-text);
  text-decoration: none;
  line-height: 1.3;
}

.selecteur__liste a:hover {
  background: var(--app-hover);
}

.selecteur__liste b {
  font-size: 14px;
  font-weight: 600;
}

.selecteur__liste small {
  color: var(--app-text-muted);
  font-size: 12px;
}

.selecteur__liste .selecteur__tous {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--app-line-2);
  border-radius: 0 0 7px 7px;
  color: var(--app-primary);
  font-size: 14px;
  font-weight: 600;
}

/* Abonnements par copropriété */
.offres-rappel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
  gap: 12px;
}

.offres-rappel__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 10px;
}

a.offres-rappel__item--lien {
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

a.offres-rappel__item--lien:hover,
a.offres-rappel__item--lien:focus-visible {
  border-color: var(--app-primary);
  box-shadow: 0 4px 14px rgba(3, 29, 66, 0.1);
}

.offres-rappel__item small.offres-rappel__cta {
  margin-top: auto;
  padding-top: 6px;
  color: var(--app-primary);
  font-weight: 600;
}

.offres-rappel__item b {
  color: var(--app-navy);
}

.offres-rappel__item span {
  color: var(--app-primary);
  font-weight: 600;
}

.offres-rappel__item small {
  color: var(--app-text-muted);
  font-size: 13px;
}

.copro-abo {
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-margin-top: 16px;
}

.copro-abo__tete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.copro-abo__tete .liste__corps {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 10rem;
}

.copro-abo__tete h2 {
  margin: 0;
  color: var(--app-navy);
  font-size: 1.1rem;
}

.copro-abo form {
  margin: 0;
}

.offres-rappel__item small.offres-rappel__annuel {
  color: var(--app-success);
  font-weight: 600;
}

/* Fenêtre affichée sans JavaScript (le lien du fond la referme) */
.modale {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
}

.modale__fond {
  position: fixed;
  inset: 0;
  background: rgb(3 29 66 / 55%);
}

.modale__boite {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(34rem, 100%);
  box-shadow: 0 24px 60px rgb(3 29 66 / 30%);
}

.immeuble-carte__pied {
  flex-wrap: wrap;
  gap: 8px 12px;
}

.immeuble-carte__pied:empty {
  display: none;
}

.immeuble-carte__pied > span:not(.pill) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.immeuble-carte__pied {
  flex-wrap: wrap;
  gap: 8px 12px;
}

.immeuble-carte__pied > span:not(.pill) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mise-en-route__faites {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: var(--app-text-muted);
  font-size: 13.5px;
}

.mise-en-route__faites svg {
  color: var(--app-success);
  vertical-align: -2px;
}

.a-payer {
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  border-color: var(--app-primary);
  text-decoration: none;
}

.a-payer .liste__titre,
.a-payer .liste__meta {
  display: block;
}

.a-payer .liste__meta {
  color: var(--app-text-muted);
  font-size: 13.5px;
}

.a-payer .liste__corps {
  flex: 1;
  min-width: 0;
}

@media (max-width: 560px) {
  .a-payer {
    flex-wrap: wrap;
  }

  .a-payer .icon-badge {
    display: none;
  }

  .a-payer .liste__corps {
    flex: 1 1 100%;
  }

  .a-payer .btn {
    flex: 1 1 100%;
    justify-content: center;
    text-align: center;
  }
}

.etapes-releve {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 22px;
  color: var(--app-text-muted);
}

.case {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.balance {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.balance__chiffres {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.balance__chiffres span {
  display: block;
  color: var(--app-text-muted);
  font-size: 13.5px;
}

.balance__chiffres b {
  font-size: 1.35rem;
  color: var(--app-ink);
}

.balance__ok {
  color: var(--app-success) !important;
}

.balance__alerte {
  color: var(--app-danger) !important;
}

.filtre-periode {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filtre-periode select {
  max-width: 18rem;
}

@media (max-width: 560px) {
  .balance__chiffres {
    grid-template-columns: 1fr;
  }
}

/* Équipe */
.equipe-droits {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.equipe-droits dt {
  color: var(--app-navy);
  font-weight: 600;
}

.equipe-droits dd {
  margin: 0;
  color: var(--app-text-muted);
}

/* Aide : étapes, questions et infobulles */
.aide-etapes {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aide-etapes li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.aide-etapes span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.aide-etapes small {
  color: var(--app-text-muted);
  font-size: 13.5px;
}

.questions-aide details {
  border-top: 1px solid var(--app-line);
}

.questions-aide summary {
  padding: 14px 2px;
  font-weight: 600;
  cursor: pointer;
}

.questions-aide p {
  margin: 0 0 14px;
  color: var(--app-text-muted);
  max-width: 68ch;
}

.aide {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--app-accent-soft);
  color: var(--app-primary);
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  vertical-align: middle;
}

.aide::after {
  content: attr(data-aide);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 30;
  display: none;
  width: max-content;
  max-width: min(17rem, 70vw);
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--app-navy);
  color: #fff;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  transform: translateX(-50%);
  white-space: normal;
}

.aide:hover::after,
.aide:focus-visible::after {
  display: block;
}

/* Accueil : bandeau de repères cliquables, cartes de copropriétés, mise en route */
.bandeau {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 14px;
  overflow: hidden;
}

.repere {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 16px 20px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s;
}

.repere + .repere {
  border-left: 1px solid var(--app-line);
}

.repere:hover,
.repere:focus-visible {
  background: var(--app-accent-soft);
}

.repere b {
  color: var(--app-navy);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.repere span {
  color: var(--app-text-muted);
  font-size: 13px;
}

.repere--ok b {
  color: var(--app-success);
}

.repere--alerte b {
  color: var(--app-danger);
}

.deux-colonnes--accueil > .principal {
  flex: 1 1 30rem;
}

.deux-colonnes--accueil > .secondaire {
  flex: 0 1 20rem;
}

#copros,
#a-traiter {
  scroll-margin-top: 16px;
}

.immeuble-carte {
  padding: 20px;
}

.immeuble-carte:hover {
  border-color: var(--app-line);
}

a.immeuble-carte__tete {
  color: inherit;
  text-decoration: none;
}

a.immeuble-carte__tete:hover .immeuble-carte__nom {
  color: var(--app-primary);
}

.immeuble-carte__essai {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.immeuble-carte__essai-ligne {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--app-text-muted);
  font-size: 13.5px;
}

.immeuble-carte__essai-ligne b {
  color: var(--app-text);
  font-weight: 600;
}

.immeuble-carte__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rien-a-traiter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--app-success-bg);
  color: var(--app-text);
}

.rien-a-traiter svg {
  flex: none;
  color: var(--app-success);
}

.demarrage-liste {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demarrage-liste li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
}

.demarrage-liste--faite span:last-child {
  color: var(--app-text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--app-line);
}

@media (max-width: 900px) {
  .bandeau {
    grid-template-columns: repeat(2, 1fr);
  }

  .repere:nth-child(3) {
    border-left: 0;
  }

  .repere:nth-child(n + 3) {
    border-top: 1px solid var(--app-line);
  }
}

/* Création : immeuble seul ou résidence */
.choix-type {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choix-type legend {
  margin-bottom: 6px;
  color: var(--app-text-muted);
  font-size: 12.5px;
}

.choix-type__option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  cursor: pointer;
}

.choix-type__option:has(input:checked) {
  border-color: var(--app-primary);
  background: var(--app-accent-soft);
}

.choix-type__option input {
  margin-top: 3px;
}

.choix-type__option span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.choix-type__option small {
  color: var(--app-text-muted);
  font-size: 13px;
}

.champ--residence {
  display: none;
}

form:has(input[value="residence"]:checked) .champ--residence {
  display: flex;
}

/* Immeubles d'une résidence */
.residence {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.residence__immeubles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.residence__immeuble {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 12px;
  background: var(--app-field);
  border: 1px solid var(--app-line);
  border-radius: 999px;
  font-size: 14px;
}

.residence__immeuble small {
  color: var(--app-text-muted);
}

.table__action .menu-ligne + .menu-ligne {
  margin-left: 2px;
}

/* Parcours de création : champs qui n'apparaissent que si le choix les concerne */
.champ--tantiemes,
.champ--autre {
  display: none;
}

.champ--autre-poste {
  display: none;
}

form:has(select[name="poste_id"] option[value="autre"]:checked) .champ--autre-poste {
  display: flex;
}

form:has(input[name="mode_paiement"][value="virement"]:checked) .champ--instructions {
  display: none;
}

form:has(input[name="mode_appels"][value="budget"]:checked) .champ--cotisation,
form:has(select[name="mode_appels"] option[value="budget"]:checked) .champ--cotisation {
  display: none;
}

form:has(input[name="repartition"][value="tantiemes"]:checked) .champ--tantiemes,
form:has(select[name="nom_poste"] option[value="autre"]:checked) .champ--autre {
  display: flex;
}

.etapes__item a[aria-current="step"] {
  border-color: var(--app-primary);
  color: var(--app-primary);
  font-weight: 600;
}

.etapes__item a:not([href]) {
  cursor: default;
}

.choix-lots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choix-lots[hidden] {
  display: none;
}

.choix-lots legend {
  margin-bottom: 6px;
  color: var(--app-text-muted);
  font-size: 12.5px;
}

.choix-lots__lot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
}

.choix-lots__lot:has(input:checked) {
  border-color: var(--app-primary);
  background: var(--app-accent-soft);
  color: var(--app-primary);
}

.import-etapes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 1.2rem;
  font-size: 14px;
}

.periodicite {
  align-self: end;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--app-line);
}

.periodicite label {
  flex: 1;
  cursor: pointer;
}

.periodicite input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.periodicite span {
  display: block;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.periodicite label:has(input:checked) span {
  background: var(--app-accent-soft);
  color: var(--app-primary);
}

.periodicite label:has(input:focus-visible) span {
  outline: 2px solid var(--app-accent);
}

/* Bouton d'envoi pendant le traitement (voir js/formulaires.js) */
button[aria-busy="true"] {
  opacity: 0.6;
  cursor: progress;
}

.zone-danger .depliant__titre {
  color: var(--app-danger);
}

/* Mise en route d'une copropriété (accueil du syndic) */
.mise-en-route {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-color: var(--app-primary);
}

.mise-en-route__tete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mise-en-route__jauge {
  flex: 0 1 220px;
}

.mise-en-route__liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mise-en-route__etape a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 10px 12px;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.mise-en-route__etape a:hover {
  border-color: var(--app-primary);
  background: var(--app-hover);
}

.mise-en-route__etape .liste__corps {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.mise-en-route__etape--faite a {
  background: var(--app-field);
}

.mise-en-route__etape--faite .liste__titre {
  color: var(--app-text-muted);
  text-decoration: line-through;
}

.mise-en-route__etape--faite .etapes__puce {
  background: var(--app-success);
  color: #fff;
}

/* Menu « ⋯ » contenant plusieurs formulaires (modifier, supprimer) */
.menu-ligne__panneau {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(19rem, 86vw);
  padding: 14px;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(3, 29, 66, 0.16);
  text-align: left;
  white-space: normal;
}

.menu-ligne__panneau form {
  position: static;
  width: auto;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
}

.menu-ligne__panneau .formulaire {
  gap: 10px;
}

@media (max-width: 640px) {
  .menu-ligne__panneau {
    right: auto;
    left: 0;
  }
}

.aide--par-lot {
  display: none;
}

form:has(input[name="type_montant"][value="par_lot"]:checked) .aide--par-lot {
  display: block;
}

form:has(input[name="type_montant"][value="par_lot"]:checked) .aide--total {
  display: none;
}

/* Envoi d'un appel : le bouton ouvre la vérification avant l'envoi. */
.menu-ligne.envoi > summary.btn,
.menu-ligne.export > summary.btn {
  width: auto;
  height: auto;
  gap: 8px;
}

.menu-ligne.export > summary.btn:hover,
.menu-ligne.export[open] > summary.btn {
  background: var(--app-accent-soft);
  color: var(--app-primary);
}

.apercu-message {
  margin: 6px 0 0;
  padding: 12px 14px;
  white-space: pre-wrap;
  font: inherit;
  background: var(--app-field, #f4f7fb);
  border: 1px solid var(--app-line);
  border-radius: 10px;
}

.menu-ligne.envoi > summary.btn--primaire,
.menu-ligne.envoi[open] > summary.btn--primaire {
  background: var(--app-primary);
  color: #fff;
}

.menu-ligne.envoi > summary.btn--primaire:hover {
  background: var(--app-primary-strong);
}

.menu-ligne.envoi .menu-ligne__panneau svg {
  color: var(--app-warn);
  vertical-align: -2px;
}

.menu-ligne__panneau--gauche {
  top: auto;
  bottom: calc(100% + 6px);
  right: auto;
  left: 0;
}

.echeance {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

@media (max-width: 640px) {
  .echeance {
    align-items: flex-end;
  }
}

.confirmation {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-color: var(--app-warn);
  background: #fff8ec;
}

.confirmation__icone {
  background: #fde9c4;
  color: var(--app-warn);
}

.confirmation form {
  margin: 0;
}

/* Assemblée : brouillon, présences par immeuble, votes par copropriétaire */
.brouillon-ag {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-color: var(--app-warn);
}

.brouillon-ag form {
  margin: 0;
}

.presences__message {
  padding: 12px 20px 0;
}

.groupe-presences {
  border-top: 1px solid var(--app-line-2);
}

.groupe-presences > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  list-style: none;
  cursor: pointer;
}

.groupe-presences > summary::-webkit-details-marker {
  display: none;
}

.groupe-presences > summary:hover {
  background: var(--app-hover);
}

.groupe-presences > summary svg:last-child {
  margin-left: auto;
  color: var(--app-text-muted);
  transition: transform 0.15s;
}

.groupe-presences[open] > summary svg:last-child {
  transform: rotate(90deg);
}

.vote {
  flex-wrap: wrap;
}

.vote__explication {
  flex-basis: 100%;
  margin: 0;
  color: var(--app-text-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.vote__explication b {
  display: block;
  margin-top: 2px;
  color: var(--app-text);
}

.vote__saisie {
  flex-basis: 100%;
}

.vote__saisie > summary {
  display: inline-block;
  margin-bottom: 10px;
  cursor: pointer;
}

.votants {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.votant {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--app-line-2);
}

.votant__nom small {
  color: var(--app-text-muted);
}

.votant__choix {
  padding: 3px;
  border: 1px solid var(--app-line);
}

.votant__choix label {
  cursor: pointer;
}

.votant__choix input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.votant__choix span {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
}

.votant__choix label:has(input[value="pour"]:checked) span {
  background: #dff3ea;
  color: var(--app-success);
}

.votant__choix label:has(input[value="contre"]:checked) span {
  background: #fbe3e1;
  color: var(--app-danger);
}

.votant__choix label:has(input[value="abstention"]:checked) span {
  background: var(--app-accent-soft);
  color: var(--app-primary);
}

.votant__choix label:has(input:focus-visible) span {
  outline: 2px solid var(--app-accent);
}

.choix-type--trois {
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
}

.lien-nom {
  color: inherit;
  text-decoration: none;
}

.lien-nom:hover {
  color: var(--app-primary);
  text-decoration: underline;
}

/* Administration : un compte et ses copropriétés dans une même carte. */
.cpt-liste {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cpt-carte {
  padding: 0;
  overflow: visible;
}

.cpt-carte--bloque {
  border-color: var(--app-danger);
}

.cpt-entete {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 16px 18px;
}

.cpt-identite h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.05rem;
}

.cpt-identite p {
  margin: 2px 0 0;
}

.cpt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  color: var(--app-text-muted);
  font-size: 0.85rem;
}

.cpt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
}

.cpt-actions form {
  margin: 0;
}

.cpt-coproprietes {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--app-line);
  background: var(--app-field);
  border-radius: 0 0 12px 12px;
}

.cpt-copro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 8px 16px;
  padding: 10px 18px;
}

.cpt-copro + .cpt-copro {
  border-top: 1px solid var(--app-line);
}

.cpt-copro__nom {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cpt-copro__nom a {
  font-weight: 600;
}

.cpt-copro .adm-btn {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.cpt-case {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 8px !important;
}

@media (max-width: 720px) {
  .cpt-copro {
    grid-template-columns: 1fr;
  }

  .cpt-actions {
    justify-content: flex-start;
  }
}

/* Champ piège anti-robots : invisible pour les personnes, rempli par les robots. */
.champ-piege {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Comptes d'accès : repliés sous la copropriété, un compte par ligne, actions au clic. */
.cpt-acces {
  display: block;
  padding: 0 18px 12px;
  border-top: 0;
}

.cpt-acces__liste > summary,
.cpt-membre > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.cpt-acces__liste > summary::-webkit-details-marker,
.cpt-membre > summary::-webkit-details-marker {
  display: none;
}

.cpt-acces__liste > summary {
  padding: 8px 12px;
  border: 1px dashed var(--app-line);
  border-radius: 8px;
  font-size: 0.9rem;
}

.cpt-acces__corps {
  display: flex;
  flex-direction: column;
  max-height: 22rem;
  margin-top: 8px;
  overflow-y: auto;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: var(--app-surface);
}

.cpt-membre + .cpt-membre {
  border-top: 1px solid var(--app-line);
}

.cpt-membre > summary {
  padding: 10px 12px;
}

.cpt-membre > summary:hover {
  background: var(--app-field);
}

.cpt-membre__id {
  display: flex;
  flex: 1 1 14rem;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cpt-membre__etat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.cpt-membre__action {
  padding: 5px 12px;
  font-size: 0.85rem;
}

.cpt-membre[open] > summary {
  background: var(--app-field);
}

.cpt-membre__panneau {
  padding: 4px 12px 12px;
  background: var(--app-field);
}

.cpt-membre__panneau p {
  margin: 0 0 8px;
}

.cpt-membre__panneau .cpt-actions {
  justify-content: flex-start;
}

.cpt-membre--bloque .cpt-membre__id {
  opacity: 0.7;
}
