/* Backoffice Lokaway — composants.
   Le fichier ne definit aucune couleur en dur : tout vient de css/tokens/.
   Regle qui se casse en premier, rappelee ici : le menthe dit "Lokaway", il ne
   dit pas "valide". Aucun etat positif n'est en menthe ; "actif" est en encre. */

@import url("tokens/fonts.css");
@import url("tokens/colors.css");
@import url("tokens/typography.css");
@import url("tokens/spacing.css");
@import url("tokens/radius.css");
@import url("tokens/elevation.css");
@import url("tokens/motion.css");
@import url("tokens/grid.css");
@import url("tokens/semantic.css");
@import url("tokens/density.css");

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

html, body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--size-400);
  line-height: var(--leading-dense);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--text-link-hover); }

/* Focus clavier visible partout : exigence d'accessibilite du design system. */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-1);
}

.lk-numeric { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; }

/* Masque a l'ecran, lu par les lecteurs d'ecran. */
.lk-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ======================================================================
   LOGOTYPE
   LOK en encre (ou papier sur fond sombre), AWAY en menthe. Pas de symbole :
   le signe n'est pas arrete (section 3.4 du document de reference).
   ====================================================================== */

.lk-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  line-height: 1;
  color: var(--text-primary);
}
.lk-logo--inverse,
a.lk-logo--inverse:hover { color: var(--bg); }
a.lk-logo { text-decoration: none; }
.lk-logo__mark { display: block; height: 1.2em; width: auto; }
.lk-logo__suffix {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  color: rgb(250 250 249 / 45%);
}

/* ======================================================================
   ECRANS D'AUTHENTIFICATION — artboards 4a et 4b
   Panneau d'encre a gauche (520 px) qui porte l'avertissement, formulaire de
   420 px centre a droite.
   ====================================================================== */

.lk-auth {
  display: flex;
  min-height: 100vh;
  background: var(--bg-page);
}

.lk-auth__aside {
  flex: none;
  width: 520px;
  background: var(--ink);
  padding: var(--space-14) var(--space-12);
  display: flex;
  flex-direction: column;
}
.lk-auth__aside .lk-logo { font-size: 20px; }

.lk-auth__lede {
  margin-top: auto;
  font-size: var(--size-400);
  line-height: 1.55;
  color: rgb(250 250 249 / 85%);
}

.lk-auth__note {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: var(--stroke-1) solid rgb(250 250 249 / 16%);
  font-size: var(--size-200);
  line-height: 1.5;
  color: rgb(250 250 249 / 60%);
}

.lk-auth__main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-12);
}

.lk-auth__panel { width: 420px; }

/* Sur telephone — un prospect ouvre le lien de demo depuis le sien : le
   panneau d'encre passe au-dessus, le formulaire prend la largeur. */
@media (max-width: 900px) {
  .lk-auth { flex-direction: column; }
  .lk-auth__aside { width: auto; padding: var(--space-8) var(--space-4); }
  .lk-auth__lede { margin-top: var(--space-6); font-size: var(--size-300); }
  .lk-auth__main { padding: var(--space-8) var(--space-4); align-items: flex-start; }
  .lk-auth__panel { width: 100%; max-width: 420px; }
}

.lk-auth__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--size-600);
  font-weight: var(--weight-bold);
  line-height: 1.14;
  color: var(--text-primary);
}

.lk-auth__subtitle {
  margin: var(--space-2) 0 0;
  font-size: var(--size-300);
  line-height: 1.5;
  color: var(--text-secondary);
}

.lk-auth__fields {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lk-auth__meta {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--size-200);
  line-height: 1.4;
  color: var(--text-secondary);
}
.lk-auth__meta a { font-weight: var(--weight-semibold); }

/* Encart de rappel, en bas du formulaire : filet superieur, pas de fond. */
.lk-auth__rule {
  margin-top: var(--space-8);
  padding-top: 18px;
  border-top: var(--stroke-1) solid var(--border-default);
  font-size: var(--size-200);
  line-height: 1.5;
  color: var(--text-primary);
}

/* Encart de rappel sur bloc neutre, une ligne par regle. */
.lk-auth__facts {
  margin-top: var(--space-6);
  padding: 14px var(--space-4);
  background: var(--bg-neutral);
  border-radius: var(--radius-1);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--size-200);
  line-height: 1.5;
  color: var(--text-primary);
  list-style: none;
  margin-bottom: 0;
}
.lk-auth__facts li { margin: 0; }

/* ======================================================================
   CHAMPS
   ====================================================================== */

.lk-field { display: block; }

.lk-field__label {
  display: block;
  font-size: var(--size-200);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  color: var(--text-primary);
}

.lk-field__control {
  margin-top: var(--space-1);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 44px;
  padding: 0 var(--space-3);
  background: var(--bg-surface);
  border: var(--stroke-1) solid var(--border-strong);
  border-radius: var(--radius-1);
}
.lk-field__control:focus-within {
  border-width: var(--stroke-2);
  border-color: var(--border-ink);
  padding: 0 11px;
}

/* Le conteneur porte deja le focus, en filet d'encre de 2 px : ajouter l'anneau
   sur le champ lui-meme ferait deux indications pour une seule information. */
.lk-field__control :focus-visible { box-shadow: none; }

.lk-field__control input,
.lk-field__control select {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-numeric);
  font-size: var(--size-300);
  color: var(--text-primary);
}
/* Texte long : le motif ecrit d'une decision. */
.lk-field__control--area { height: auto; padding: var(--space-2) var(--space-3); align-items: stretch; }
.lk-field__control--area:focus-within { padding: 7px 11px; }
.lk-field__control textarea {
  flex: 1;
  min-width: 0;
  min-height: 88px;
  border: 0;
  outline: 0;
  resize: vertical;
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--size-200);
  line-height: 1.45;
  color: var(--text-primary);
}
.lk-field__control input[type="password"] { letter-spacing: 0.24em; }
.lk-field__control input::placeholder { color: var(--text-disabled); letter-spacing: normal; }

.lk-field__reveal {
  flex: none;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--size-100);
  font-weight: var(--weight-semibold);
  color: var(--action-bg);
  cursor: pointer;
}

.lk-field__hint {
  margin-top: var(--space-1);
  font-size: var(--size-100);
  line-height: 1.4;
  color: var(--text-tertiary);
}

/* Etat d'erreur : pas de rouge, la DA n'en a pas. Filet d'encre 2 px et
   pictogramme, comme tous les etats negatifs du systeme. */
.lk-field--invalid .lk-field__control {
  border-width: var(--stroke-2);
  border-color: var(--border-ink);
  padding: 0 11px;
}
.lk-field__error {
  margin-top: var(--space-1);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--size-100);
  line-height: 1.4;
  font-weight: var(--weight-semibold);
  color: var(--status-negative-ink);
}
.lk-field__error::before { content: "\2715"; flex: none; }

/* Jauge de robustesse du mot de passe : quatre segments en encre. */
.lk-strength {
  margin-top: var(--space-2);
  display: flex;
  gap: var(--space-1);
}
.lk-strength__seg {
  flex: 1;
  height: 5px;
  background: var(--border-default);
}
.lk-strength__seg--on { background: var(--ink); }

/* ======================================================================
   BOUTONS
   Tout ce qui est cliquable est en menthe profond. Le menthe vif n'est jamais
   un fond de bouton : il ne monte qu'a 2,5:1.
   ====================================================================== */

.lk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  border: var(--stroke-2) solid transparent;
  border-radius: var(--radius-1);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.lk-btn--primary { background: var(--action-bg); color: var(--action-fg); }
.lk-btn--primary:hover { background: var(--action-bg-hover); color: var(--action-fg); }
.lk-btn--primary:active { background: var(--action-bg-active); }

.lk-btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-ink);
}
.lk-btn--secondary:hover { background: var(--bg-neutral); color: var(--text-primary); }

.lk-btn--ghost { background: transparent; color: var(--text-link); border-color: transparent; }
.lk-btn--ghost:hover { color: var(--text-link-hover); }

.lk-btn[disabled], .lk-btn[aria-disabled="true"] {
  background: var(--action-disabled-bg);
  color: var(--action-disabled-fg);
  border-color: transparent;
  cursor: not-allowed;
}

/* Pleine largeur, 48 px : le bouton de validation des ecrans d'authentification. */
.lk-btn--block {
  width: 100%;
  height: 48px;
  margin-top: 18px;
  font-size: var(--size-400);
}

/* Taille backoffice : 32 px, filet, pas d'aplat, sauf action principale. */
.lk-btn--compact {
  height: 32px;
  padding: 0 var(--space-3);
  font-size: var(--size-200);
  border-width: var(--stroke-1);
}
.lk-btn--compact.lk-btn--secondary { border-color: var(--border-strong); }
.lk-btn--compact.lk-btn--secondary:hover { border-color: var(--border-ink); }

.lk-btn--small {
  height: 28px;
  padding: 0 10px;
  font-size: var(--size-100);
  border-width: var(--stroke-1);
}

/* ======================================================================
   BADGE DE STATUT
   Huit valeurs, resolues par la FORME du contenant, l'EPAISSEUR du filet et le
   MOT. La couleur n'intervient que sur "en cours", et elle y est redondante.
   Il n'existe volontairement aucune valeur "success".
   ====================================================================== */

.lk-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--size-200);
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: var(--stroke-1) solid transparent;
  white-space: nowrap;
}
.lk-badge__glyph { font-size: 12px; line-height: 1; text-decoration: none; }

[data-density="backoffice"] .lk-badge,
.lk-badge--compact {
  font-size: 11px;
  padding: 3px 9px;
  gap: var(--space-1);
}
[data-density="backoffice"] .lk-badge__glyph,
.lk-badge--compact .lk-badge__glyph { font-size: 10px; }

.lk-badge--progress {
  border-color: var(--status-progress);
  background: var(--status-progress-tint);
  color: var(--status-progress-ink);
}
.lk-badge--waiting {
  border-style: dashed;
  border-color: var(--status-waiting-border);
  background: transparent;
  color: var(--status-waiting-ink);
}
.lk-badge--confirmed {
  border-color: var(--status-confirmed-border);
  background: transparent;
  color: var(--status-confirmed-ink);
}
.lk-badge--done {
  border-color: transparent;
  background: var(--status-done-bg);
  color: var(--status-done-fg);
}
.lk-badge--refused {
  border-width: var(--status-negative-stroke);
  border-color: var(--status-negative-border);
  background: var(--bg-surface);
  color: var(--status-negative-ink);
}
.lk-badge--disputed {
  border-width: var(--status-negative-stroke);
  border-color: var(--status-negative-border);
  background: repeating-linear-gradient(135deg, transparent, transparent 4px, var(--bg-neutral) 4px, var(--bg-neutral) 8px);
  color: var(--status-negative-ink);
}
.lk-badge--expired {
  border-color: var(--status-expired-border);
  background: transparent;
  color: var(--status-expired-ink);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.lk-badge--cancelled {
  border-color: transparent;
  background: var(--status-cancelled-bg);
  color: var(--status-cancelled-ink);
}

/* ======================================================================
   COQUILLE DU BACKOFFICE — composant BoShell
   Rail de sections (212 px, encre), sous-navigation (196 px), barre de titre
   (52 px), contenu. Desktop uniquement, 1440 minimum.
   ====================================================================== */

.lk-shell {
  display: flex;
  height: 100vh;
  min-width: var(--grid-desktop-width);
  background: var(--bg-page);
  font-family: var(--font-body);
}

.lk-shell__rail {
  flex: none;
  width: var(--grid-backoffice-rail);
  background: var(--ink);
  display: flex;
  flex-direction: column;
  padding: 18px 0;
}
.lk-shell__rail .lk-logo { font-size: 15px; padding: 0 18px 22px; }

.lk-shell__rail-nav { display: flex; flex-direction: column; }

.lk-shell__rail-item {
  padding: 9px 18px;
  font-size: var(--size-200);
  line-height: 1.3;
  color: rgb(250 250 249 / 60%);
  text-decoration: none;
}
.lk-shell__rail-item:hover { color: rgb(250 250 249 / 90%); }
.lk-shell__rail-item[aria-current] {
  font-weight: var(--weight-semibold);
  color: #FAFAF9;
  background: rgb(250 250 249 / 12%);
}

/* Une section a laquelle le role connecte n'a pas acces reste visible mais
   inerte : le support doit voir ce qu'il ne peut pas ouvrir (section 8). */
.lk-shell__rail-item--locked {
  color: rgb(250 250 249 / 28%);
  cursor: not-allowed;
}
.lk-shell__rail-item--locked::after {
  content: "\00a0\00a0\1F512";
  font-size: 9px;
}

.lk-shell__identity {
  margin-top: auto;
  padding: 14px 18px 0;
  border-top: var(--stroke-1) solid rgb(250 250 249 / 14%);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lk-shell__identity-name {
  font-size: var(--size-100);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  color: #FAFAF9;
}
.lk-shell__identity-role {
  font-size: 11px;
  line-height: 1.3;
  color: rgb(250 250 249 / 55%);
}
.lk-shell__identity-out {
  margin-top: var(--space-2);
  font-size: 11px;
  color: rgb(250 250 249 / 55%);
}
.lk-shell__identity-out:hover { color: #FAFAF9; }

.lk-shell__subnav {
  flex: none;
  width: var(--grid-backoffice-subnav);
  background: var(--bg-surface);
  border-right: var(--stroke-1) solid var(--border-default);
  padding: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.lk-shell__subnav-title {
  padding: 0 var(--space-4) 10px;
  font-size: 10px;
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.lk-shell__subnav-item {
  padding: var(--space-2) var(--space-4);
  font-size: var(--size-200);
  line-height: 1.3;
  color: var(--text-secondary);
  text-decoration: none;
}
.lk-shell__subnav-item:hover { color: var(--text-primary); background: var(--bg-sunken); }
.lk-shell__subnav-item[aria-current] {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  background: var(--bg-neutral);
}
.lk-shell__subnav-item--todo { color: var(--text-disabled); cursor: not-allowed; }
.lk-shell__subnav-item--todo:hover { background: transparent; color: var(--text-disabled); }

.lk-shell__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.lk-shell__topbar {
  flex: none;
  height: 52px;
  padding: 0 var(--space-6);
  background: var(--bg-surface);
  border-bottom: var(--stroke-1) solid var(--border-default);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.lk-shell__title {
  margin: 0;
  font-size: var(--size-400);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  color: var(--text-primary);
}
.lk-shell__spacer { flex: 1; min-width: 0; }

/* La recherche globale est l'ecran d'entree du support : elle est presente dans
   la barre de titre de tous les ecrans. */
.lk-shell__search {
  flex: none;
  width: 300px;
  height: 32px;
  padding: 0 var(--space-3);
  border: var(--stroke-1) solid var(--border-default);
  border-radius: var(--radius-1);
  background: var(--bg-surface);
  font-family: var(--font-body);
  font-size: var(--size-200);
  color: var(--text-primary);
}
.lk-shell__search::placeholder { color: var(--text-tertiary); }

.lk-shell__content {
  flex: 1;
  min-height: 0;
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
}

/* ======================================================================
   BARRE DE FILTRES
   ====================================================================== */

.lk-filters {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.lk-filters__spacer { flex: 1; }
/* Separe deux familles de puces, comme sur l'artboard 6a. */
.lk-filters__sep { width: 1px; height: 20px; margin: 0 var(--space-1); background: var(--border-default); }
.lk-filters__note { font-size: var(--size-100); line-height: 1; color: var(--text-tertiary); }

.lk-chip {
  height: 28px;
  padding: 0 var(--space-3);
  border: var(--stroke-1) solid var(--border-default);
  border-radius: var(--radius-1);
  display: inline-flex;
  align-items: center;
  font-size: var(--size-100);
  line-height: 1;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}
.lk-chip:hover { border-color: var(--border-strong); color: var(--text-primary); }
.lk-chip[aria-current] {
  border-color: var(--border-ink);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

/* ======================================================================
   TABLEAU DENSE
   Lignes de 36 px, filets horizontaux seulement. La charte n'utilise pas de
   tableau quadrille.
   ====================================================================== */

.lk-table {
  flex: 1;
  min-height: 0;
  background: var(--bg-surface);
  border: var(--stroke-1) solid var(--border-default);
  border-radius: var(--radius-1);
  overflow: auto;
  width: 100%;
  border-collapse: collapse;
  display: block;
}
.lk-table table { width: 100%; border-collapse: collapse; }

.lk-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px var(--space-4);
  background: var(--bg-neutral);
  border-bottom: var(--stroke-1) solid var(--border-default);
  font-size: 10px;
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-align: left;
  white-space: nowrap;
}
.lk-table th.lk-num, .lk-table td.lk-num { text-align: right; }

.lk-table tbody td {
  height: var(--grid-backoffice-row);
  padding: 9px var(--space-4);
  border-bottom: var(--stroke-1) solid var(--border-default);
  font-size: var(--size-200);
  line-height: 1.3;
  color: var(--text-primary);
  vertical-align: middle;
}
.lk-table tbody tr:hover td { background: var(--bg-sunken); }
/* Ligne signalee : un compte suspendu, un lien expire. */
.lk-table tbody tr[data-flagged] td { background: var(--bg-neutral); }
.lk-table tbody tr[data-flagged]:hover td { background: var(--bg-neutral); }

/* En-tete de groupe : l'adresse au-dessus de ses lots. Ce n'est pas une
   ligne de donnees, elle ne se survole pas comme telle. */
.lk-table tbody tr.lk-table__group td {
  height: auto;
  padding: 7px var(--space-4);
  background: var(--bg-neutral);
  font-size: var(--size-100);
  color: var(--text-tertiary);
}
.lk-table tbody tr.lk-table__group:hover td { background: var(--bg-neutral); }
.lk-table__group-name { font-size: var(--size-200); font-weight: var(--weight-bold); color: var(--text-primary); }
.lk-table__group-open { float: right; color: var(--text-link); }
.lk-table td.lk-cell-indent { padding-left: calc(var(--space-4) * 2); }

.lk-cell-name { font-weight: var(--weight-semibold); color: var(--text-primary); }
/* Un horodatage qui passe a la ligne casse le balayage vertical d'un journal. */
.lk-table td.lk-numeric, .lk-table td.lk-num { white-space: nowrap; }
.lk-cell-meta { margin-left: var(--space-2); font-size: var(--size-100); color: var(--text-tertiary); white-space: nowrap; }
/* Sous-libelle sur sa propre ligne, tronque plutot que d'elargir la colonne. */
.lk-cell-meta--block { display: block; margin-left: 0; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.lk-table td.lk-cell-shrink { max-width: 0; }
/* Le message d'un echec, qui passe a la ligne au lieu d'etre tronque.
   C'est l'exception a la regle du dessus, et elle se justifie : cet ecran n'a
   pas de fiche de detail, donc un message coupe dirait qu'il y a un probleme
   sans permettre de le regler. */
.lk-cell-failure { display: block; margin-top: 3px; font-size: var(--size-100); line-height: 1.4; color: var(--text-secondary); white-space: normal; overflow-wrap: anywhere; }
/* Le texte d'un locataire ou d'un proprietaire : une phrase de constat se lit
   en entier, une coupure changerait ce qui a ete signe. Meme exception. */
.lk-cell-prose { margin: 0; font-size: var(--size-200); line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.lk-cell-prose .lk-cell-meta--block { white-space: normal; }
/* Un tableau parmi d'autres sur un ecran de lecture (pilotage, conformite,
   catalogues) : il prend sa hauteur naturelle. Avec `flex: 1`, les tableaux
   empiles se partageaient la hauteur de la page et chacun defilait dans une
   fente, lignes coupees. Leurs sous-libelles sont des explications, pas des
   etiquettes : ils passent a la ligne plutot que d'elargir la page. */
.lk-table--flow { flex: none; }
.lk-table--flow .lk-cell-meta--block { white-space: normal; }
/* Dix colonnes de comptes sur un ecran de 1440 : un en-tete sur deux lignes
   coute moins qu'un tableau qu'il faut faire defiler pour lire son total. */
.lk-table--flow thead th { white-space: normal; vertical-align: bottom; }
/* Une ligne de plusieurs paragraphes se lit depuis le haut, libelle compris. */
.lk-table tbody tr[data-element] td { vertical-align: top; }

.lk-cell-muted { color: var(--text-tertiary); }
.lk-cell-actions { display: flex; gap: var(--space-3); justify-content: flex-end; }
.lk-cell-actions form { display: inline; }
.lk-cell-actions button {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: var(--size-200);
  color: var(--text-link);
  cursor: pointer;
}
.lk-cell-actions button:hover { color: var(--text-link-hover); }

/* Etat vide d'un tableau. */
.lk-empty {
  padding: var(--space-10) var(--space-4);
  text-align: center;
  color: var(--text-tertiary);
  font-size: var(--size-200);
}

/* ======================================================================
   ENCARTS ET MESSAGES
   ====================================================================== */

.lk-panel {
  background: var(--bg-surface);
  border: var(--stroke-1) solid var(--border-default);
  border-radius: var(--radius-1);
  padding: var(--space-4);
}
.lk-panel--neutral { background: var(--bg-neutral); border-color: transparent; }

.lk-stats { flex: none; display: flex; gap: var(--space-2); }
.lk-stat {
  flex: 1;
  background: var(--bg-surface);
  border: var(--stroke-1) solid var(--border-default);
  border-radius: var(--radius-1);
  padding: 10px var(--space-3);
}
.lk-stat__label {
  font-size: 10px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.lk-stat__value {
  margin-top: var(--space-1);
  font-family: var(--font-numeric);
  font-variant-numeric: tabular-nums;
  font-size: var(--size-500);
  font-weight: var(--weight-bold);
  line-height: 1;
  color: var(--text-primary);
}
.lk-stat__hint { margin-top: var(--space-1); font-size: var(--size-100); color: var(--text-tertiary); }

/* Message ephemere. Positif en encre, jamais en menthe. */
.lk-flash {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px var(--space-3);
  border-radius: var(--radius-1);
  font-size: var(--size-200);
  line-height: 1.45;
}
.lk-flash__glyph { flex: none; font-weight: var(--weight-bold); }
.lk-flash--done { background: var(--ink); color: var(--bg); }
.lk-flash--pending { background: var(--status-progress-tint); border: var(--stroke-1) solid var(--status-progress); color: var(--status-progress-ink); }
.lk-flash--negative { background: var(--bg-surface); border: var(--stroke-2) solid var(--border-ink); color: var(--text-primary); }

/* Bloc d'explication d'un ecran : ce que le support doit savoir avant d'agir. */
.lk-note {
  flex: none;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-neutral);
  border-radius: var(--radius-1);
  font-size: var(--size-200);
  line-height: 1.5;
  color: var(--text-primary);
}
.lk-note strong { font-weight: var(--weight-semibold); }

/* ======================================================================
   BRIS DE GLACE — les photos d'un état des lieux
   Il doit se distinguer nettement du reste du backoffice : trait épais à
   l'encre, bandeau inversé et hachuré, comme un statut négatif.
   ====================================================================== */
.lk-breakglass {
  flex: none;
  border: var(--stroke-2) solid var(--ink);
  border-radius: var(--radius-1);
  background: var(--bg-surface);
  overflow: hidden;
}
.lk-breakglass__band {
  padding: var(--space-2) var(--space-4);
  background: repeating-linear-gradient(135deg, var(--ink), var(--ink) 10px, var(--ink-secondary) 10px, var(--ink-secondary) 20px);
  color: var(--bg-surface);
  font-size: var(--size-200);
  font-weight: var(--weight-semibold);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.lk-breakglass__body { padding: var(--space-3) var(--space-4); }
.lk-breakglass__history { margin-top: var(--space-4); }
.lk-photo-grid { display: flex; flex-wrap: wrap; gap: var(--space-3); padding-bottom: var(--space-4); }
.lk-photo figcaption { margin-top: var(--space-2); }
.lk-photo { margin: 0; width: 280px; max-width: 100%; }
.lk-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius-1); background: var(--bg-neutral); }

/* ======================================================================
   FORMULAIRE EN LIGNE DU BACKOFFICE
   ====================================================================== */

.lk-form-row { display: flex; gap: var(--space-3); align-items: flex-end; flex-wrap: wrap; }
.lk-form-row .lk-field { flex: 1; min-width: 200px; }
.lk-form-row .lk-field__control { height: 32px; }
.lk-form-row .lk-field__control input,
.lk-form-row .lk-field__control select { font-size: var(--size-200); font-family: var(--font-body); }

/* Pied de tableau : les chiffres qui resument ce que la liste montre.
   Artboards 5a et 2a. */
.lk-tablefoot {
  flex: none;
  margin-top: -14px;
  padding: 11px var(--space-4);
  background: var(--bg-neutral);
  border: var(--stroke-1) solid var(--border-default);
  border-top: 0;
  border-radius: 0 0 var(--radius-1) var(--radius-1);
  display: flex;
  gap: var(--space-6);
  align-items: center;
  font-size: var(--size-100);
  line-height: 1;
  color: var(--text-secondary);
}

/* En-tete de fiche : le bandeau d'identite d'un bien. */
.lk-hero {
  flex: none;
  background: var(--bg-surface);
  border: var(--stroke-1) solid var(--border-default);
  border-radius: var(--radius-1);
  padding: var(--space-4) 18px;
}
.lk-hero__top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-5); }
.lk-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--size-500);
  font-weight: var(--weight-bold);
  line-height: 1.15;
  color: var(--text-primary);
}
.lk-hero__sub { margin: var(--space-1) 0 0; font-size: var(--size-200); line-height: 1.45; color: var(--text-secondary); }
.lk-hero__facts {
  margin-top: 14px;
  padding-top: 14px;
  border-top: var(--stroke-1) solid var(--border-default);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.lk-hero__label {
  font-size: 10px;
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.lk-hero__value {
  margin-top: 6px;
  font-size: var(--size-200);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
  color: var(--text-primary);
}

/* Panneau avec un titre, utilise sur la fiche d'un bien. */
.lk-card { background: var(--bg-surface); border: var(--stroke-1) solid var(--border-default); border-radius: var(--radius-1); overflow: hidden; }
.lk-card__title { padding: 13px var(--space-4) 10px; font-size: var(--size-300); font-weight: var(--weight-semibold); line-height: 1.2; color: var(--text-primary); }
.lk-card__body { padding: 0 var(--space-4) 14px; }

/* Un texte long rendu depuis Markdown : les textes legaux. Une colonne de
   lecture, pas la largeur de l'ecran ; les titres gardent la hierarchie du
   texte sans ecraser celle de la page. Une URL longue passe a la ligne au
   lieu d'elargir la carte. */
.lk-prose { max-width: 72ch; font-size: var(--size-200); line-height: 1.55; color: var(--text-primary); overflow-wrap: anywhere; }
.lk-prose > :first-child { margin-top: 0; }
.lk-prose > :last-child { margin-bottom: 0; }
.lk-prose h1, .lk-prose h2 { margin: var(--space-6) 0 var(--space-2); font-size: var(--size-300); font-weight: var(--weight-semibold); line-height: 1.3; }
.lk-prose h3, .lk-prose h4 { margin: var(--space-4) 0 var(--space-1); font-size: var(--size-200); font-weight: var(--weight-semibold); line-height: 1.3; }
.lk-prose p { margin: 0 0 var(--space-3); }
.lk-prose ul, .lk-prose ol { margin: 0 0 var(--space-3); padding-left: var(--space-5); }
.lk-prose li + li { margin-top: var(--space-1); }
.lk-prose strong { font-weight: var(--weight-semibold); }
.lk-prose a { color: var(--text-link); }

/* Titre d'une sous-section dans une page de liste. */
.lk-subheading { margin: var(--space-6) 0 var(--space-3); font-size: var(--size-300); font-weight: var(--weight-semibold); color: var(--text-primary); }

/* Liste cle / valeur d'un panneau lateral. */
.lk-pairs { margin: 0; display: flex; flex-direction: column; gap: 7px; font-size: var(--size-200); line-height: 1.4; }
.lk-pairs > div { display: flex; justify-content: space-between; gap: 10px; }
.lk-pairs dt { color: var(--text-secondary); }
.lk-pairs dd { margin: 0; font-weight: var(--weight-semibold); color: var(--text-primary); text-align: right; }

/* Une cellule dont le contenu est un identifiant d'un seul tenant — un slug, une
   URL — pousse toutes les autres colonnes quand la table se repartit toute
   seule. On la tronque avec des points de suspension, la valeur complete restant
   dans l'infobulle. */
.lk-cell-truncate {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ======================================================================
   RECHERCHE GLOBALE — artboard 1k
   Un seul champ, 44 px, filet d'encre de 2 px. C'est l'ecran d'entree du
   support : il doit repondre en un resultat.
   ====================================================================== */

.lk-search {
  flex: none;
  background: var(--bg-surface);
  border: var(--stroke-1) solid var(--border-default);
  border-radius: var(--radius-1);
  padding: var(--space-4) 18px;
}
.lk-search__row { display: flex; gap: var(--space-3); align-items: center; }
.lk-search__input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: var(--stroke-2) solid var(--border-ink);
  border-radius: var(--radius-1);
  background: var(--bg-surface);
  font-family: var(--font-numeric);
  font-size: var(--size-400);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}
.lk-search__input::placeholder { font-weight: var(--weight-regular); color: var(--text-disabled); }
.lk-search__input:focus-visible { box-shadow: none; }
.lk-search__submit { flex: none; height: 44px; padding: 0 18px; font-size: var(--size-300); }
.lk-search__meta {
  margin-top: 10px;
  display: flex;
  gap: var(--space-4);
  font-size: var(--size-100);
  line-height: 1.4;
  color: var(--text-secondary);
}
.lk-search__count { color: var(--text-primary); }

/* Une carte de resultat : rubrique sur 96 px, corps, lien a droite. */
.lk-result {
  background: var(--bg-surface);
  border: var(--stroke-1) solid var(--border-default);
  border-radius: var(--radius-1);
  padding: 14px var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.lk-result__kind {
  flex: none;
  width: 96px;
  font-size: 10px;
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.lk-result__body { flex: 1; min-width: 0; }
.lk-result__title { font-size: var(--size-300); font-weight: var(--weight-semibold); line-height: 1.3; color: var(--text-primary); }
.lk-result__detail { margin-top: 2px; font-size: var(--size-100); line-height: 1.4; color: var(--text-secondary); }
.lk-result__link { flex: none; font-size: var(--size-100); line-height: 1; white-space: nowrap; }
/* Contact anonymise : la ligne reste, barree, pour dire qu'elle a existe. */
.lk-result--gone .lk-result__title { text-decoration: line-through; color: var(--text-tertiary); }

.lk-accepts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px var(--space-6); font-size: var(--size-200); line-height: 1.45; color: var(--text-primary); }
.lk-accepts strong { font-weight: var(--weight-semibold); }
.lk-card__foot {
  margin: 0 var(--space-4);
  padding: 10px 0 14px;
  border-top: var(--stroke-1) solid var(--border-default);
  font-size: var(--size-100);
  line-height: 1.45;
  color: var(--text-secondary);
}

.lk-recent ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.lk-recent li { font-size: var(--size-200); line-height: 1.3; }
.lk-recent__empty { margin: 10px 0 0; font-size: var(--size-100); line-height: 1.45; color: var(--text-secondary); }

.lk-never { display: flex; flex-direction: column; gap: var(--space-2); font-size: var(--size-200); line-height: 1.45; color: var(--text-primary); }

/* La barre de titre porte un vrai formulaire de recherche. */
.lk-shell__searchform { flex: none; display: flex; }

/* Separateur vertical entre deux groupes de puces de filtre. */
.lk-filters__sep { width: 1px; height: 20px; background: var(--border-default); margin: 0 var(--space-1); }
/* Le jeton d'un lien magique : absent, et dit comme tel. */
.lk-magic__token { color: var(--text-tertiary); font-weight: var(--weight-semibold); }

/* Test : la zone de depot d'une photo. Le champ fichier la recouvre, invisible,
   pour qu'un clic ouvre le selecteur et qu'un depot tombe dessus. */
.lk-dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); min-height: 180px; padding: var(--space-4); border: 2px dashed var(--border-default); border-radius: var(--radius-1); background: var(--bg-surface); color: var(--text-secondary); text-align: center; cursor: pointer; }
.lk-dropzone--over { border-color: var(--text-link); background: var(--bg-neutral); }
.lk-dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lk-dropzone img { max-width: 100%; max-height: 260px; border-radius: 4px; }
.lk-test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-4); flex: none; }
.lk-test-result img { max-width: 100%; max-height: 320px; border-radius: 4px; display: block; margin-bottom: var(--space-3); }
.lk-test-result dl { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; margin: 0; }
.lk-test-result dt { color: var(--text-secondary); }
.lk-test-result dd { margin: 0; overflow-wrap: anywhere; }
.lk-test-pre { margin: 0; padding: 10px 12px; background: var(--bg-neutral); border-radius: 4px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-numeric); font-size: var(--size-100); line-height: 1.5; }
