/* FollowMet — page quasi blanche, profondeur par les éléments (ombres douces).
   Violet là où ça compte. Light-only by design. */

:root {
  --bg: #FAFAFB;
  --surface: #FFFFFF;
  --surface-2: #F4F6F8;
  --border: #E7EAEE;
  --border-strong: #D6DBE1;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 2px 8px rgba(16, 24, 40, 0.05);
  --ink: #2C3138;
  --ink-2: #5E6A75;
  --ink-3: #8C99A5;
  --purple: #6747D6;
  --purple-deep: #4B32A8;
  --purple-tint: #EFEAFB;
  --purple-border: #D8CCF5;
  --st-open-bg: #FBEFD8;    --st-open-ink: #8A5200;
  --st-prog-bg: #EDE8FC;    --st-prog-ink: #4B32A8;
  --st-wait-bg: #F0E9DA;    --st-wait-ink: #6E5D3B;
  --st-confirm-bg: #DCEFEC; --st-confirm-ink: #1F6B5E;
  --st-solved-bg: #E1F1E6;  --st-solved-ink: #256B45;
  --danger-ink: #A33D2E;    --danger-bg: #FBE5E0;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  line-height: 1.5;
  font-size: 15px;
}
a { color: var(--purple-deep); }
h1, h2, h3 { letter-spacing: -0.01em; }

/* ---------------------------------------------------------------- appbar */
.appbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.wordmark { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 16px; color: var(--ink); text-decoration: none; }
.wordmark .mark {
  width: 26px; height: 26px; border-radius: 8px; background: var(--purple);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.appnav { display: flex; gap: 2px; margin-left: 18px; margin-right: auto; flex-wrap: wrap; }
.appnav a { font-size: 13.5px; color: var(--ink-2); text-decoration: none; padding: 6px 11px; border-radius: 8px; white-space: nowrap; }
.appnav a.active { color: var(--purple-deep); background: var(--purple-tint); font-weight: 600; }
.appnav a:hover { color: var(--ink); }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); }
.userbox form { margin: 0; }
.linklike { background: none; border: none; color: var(--ink-3); font: inherit; font-size: 13px; cursor: pointer; padding: 0; text-decoration: underline; }
.linklike:hover { color: var(--ink); }

.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; font-weight: 600; font-size: 13.5px; padding: 8px 15px; cursor: pointer; text-decoration: none; border: 1px solid transparent; }
/* Tous les boutons d'action sont mauves (btn-ghost = alias historique). */
.btn-primary, .btn-ghost { background: var(--purple); color: #fff; border-color: transparent; }
.btn-primary:hover, .btn-ghost:hover { background: var(--purple-deep); color: #fff; border-color: transparent; }
.btn:focus-visible, .appnav a:focus-visible, .input:focus-visible { outline: 2px solid var(--purple-deep); outline-offset: 2px; }

/* --------------------------------------- nouvel incident (saisie progressive) */
.create-upload { padding: 10px 12px; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 8px; }
/* .panel.optional-fields (specificity 0,2,0) so « box-shadow:none » wins over
   the later .panel rule whatever the source order. */
.panel.optional-fields { box-shadow: none; }
.optional-fields > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.optional-fields > summary::after { content: "Afficher"; color: var(--ink-3); font-size: 12px; font-weight: 500; }
.optional-fields[open] > summary::after { content: "Masquer"; }
.smart-suggestion { min-height: 18px; margin: 2px 0 0; color: var(--purple-deep); font-size: 12px; }
/* .vnew (sélecteur d'artisan) impose display:flex, qui bat la règle UA
   [hidden] — sans ceci le sous-formulaire « nouvel artisan » resterait
   visible (même correctif que .row-drawer). */
.vnew[hidden] { display: none; }

/* ---------------------------------------------------------------- layout */
.page { max-width: 1200px; margin: 0 auto; padding: 24px 20px 70px; display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 650; }
.page-head .sub { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.messages { display: flex; flex-direction: column; gap: 8px; }
.msg { border-radius: var(--radius); padding: 10px 14px; font-size: 13.5px; border: 1px solid var(--border); background: var(--surface); }
.msg.success { border-color: #BFE3CC; background: var(--st-solved-bg); color: var(--st-solved-ink); }
.msg.error { border-color: #F0C4BC; background: var(--danger-bg); color: var(--danger-ink); }
.msg.warning { border-color: #EBD9A9; background: var(--st-open-bg); color: var(--st-open-ink); }

/* grand bouton d'action (ex. « ← Tableau de bord ») */
.btn-big { font-size: 15.5px; padding: 13px 26px; border-radius: 10px; justify-content: center; align-self: flex-start; }
@media (max-width: 760px) { .btn-big { align-self: stretch; width: 100%; padding: 15px; } }
/* « + Nouvel incident » du dashboard : pleine largeur, contrairement aux
   autres .btn-big qui restent alignés à gauche (ex. le bouton retour). */
.dashboard-create { align-self: stretch; width: 100%; }
.fsel { width: auto; max-width: 230px; }

/* ------------------------------------------------------------- relances */
.relances { display: flex; flex-direction: column; gap: 8px; }
.relance { background: var(--st-open-bg); border: 1px solid #EBD9A9; border-radius: var(--radius); padding: 11px 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.relance .rtext { font-size: 13.5px; color: var(--st-open-ink); }
.relance .rlate { font-weight: 600; }
.relance .ractions { display: flex; gap: 8px; flex-wrap: wrap; }

/* --------------------------------------------------------- compteur liste */
.countline { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; padding: 0 2px 6px; }

/* --------------------------------------------------------------- filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters .spacer { flex: 1; }
.qsearch { min-width: 200px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); }
.tabs a { font-size: 13.5px; color: var(--ink-2); text-decoration: none; padding: 7px 14px; border-radius: 8px 8px 0 0; border: 1px solid transparent; border-bottom: none; }
.tabs a.on { background: var(--surface); border-color: var(--border); color: var(--purple-deep); font-weight: 600; }

/* ------------------------------------------------------------------ list */
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.list-head, .row { display: grid; grid-template-columns: minmax(0, 2.2fr) 1fr 0.85fr 0.8fr 0.9fr 1.15fr max-content; gap: 12px; align-items: center; padding: 11px 16px; }
.list-head { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.sorth { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
.sorth:hover { color: var(--purple-deep); }
.sorticon { font-size: 9px; color: var(--border-strong); }
.sorticon.on { color: var(--purple-deep); }
.row { border-bottom: 1px solid var(--ink); color: inherit; text-decoration: none; }
.row:last-child { border-bottom: none; }
.row:hover { background: var(--surface-2); }
/* the info cells live inside this link (display:contents → they become grid
   items of .row), so the whole info area navigates while the actions cell
   stays a separate interactive element. */
.rowlink { display: contents; color: inherit; text-decoration: none; }
.rowact { display: flex; justify-content: flex-end; }
.actbtn { font-size: 12px; padding: 5px 11px; white-space: nowrap; }
.actbtn[aria-expanded="true"] { background: var(--purple-deep); }
.row-drawer { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; padding: 12px 2px 4px; }
/* explicit: the flex rule above would otherwise beat the UA [hidden] rule */
.row-drawer[hidden] { display: none; }
.row-drawer .qa { display: flex; align-items: center; gap: 8px; margin: 0; flex-wrap: wrap; }
.row-drawer .qa label { font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; }
.row-drawer .qa .input { width: auto; font-size: 13px; padding: 6px 9px; }
.row-drawer .qa .btn { font-size: 12.5px; padding: 6px 12px; }
.row-drawer .qa-cur { font-size: 12.5px; color: var(--ink-3); }
/* teinte légère du fond selon la gravité (incidents non résolus uniquement) */
.row.sev-5 { background: #FCEEEB; }
.row.sev-5:hover { background: #F9E3DD; }
.row.sev-4 { background: #FCF7E8; }
.row.sev-4:hover { background: #F8F0D8; }
/* signalement locataire à valider : violet, au-dessus de tout */
.row.draft { background: #F3EFFC; }
.row.draft:hover { background: #EBE4F9; }
.chip.sev-normal { background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--border); }
.chip.sev-low { background: var(--surface); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--border); }
.row .title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
/* titre complet : il s'étale sur plusieurs lignes plutôt que d'être tronqué */
.row .title .t { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.row .title .s { font-size: 12.5px; color: var(--ink-3); }
.row .apt, .row .cat { font-size: 13px; color: var(--ink-2); }
.age { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; display: flex; flex-direction: column; gap: 1px; }
.age .due { font-size: 12px; color: var(--ink-3); }
.age .due.planned { color: var(--ink); }
.age .due.over { color: var(--danger-ink); font-weight: 600; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.open    { background: var(--st-open-bg);    color: var(--st-open-ink); }
.chip.prog    { background: var(--st-prog-bg);    color: var(--st-prog-ink); }
.chip.wait    { background: var(--st-wait-bg);    color: var(--st-wait-ink); }
.chip.confirm { background: var(--st-confirm-bg); color: var(--st-confirm-ink); }
.chip.solved  { background: var(--st-solved-bg);  color: var(--st-solved-ink); }
.chip.danger  { background: var(--danger-bg);     color: var(--danger-ink); }
.chip.draft   { background: var(--purple-tint);   color: var(--purple-deep); }

.empty { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 34px 20px; text-align: center; color: var(--ink-2); }
.empty .big { font-size: 17px; font-weight: 650; color: var(--ink); margin-bottom: 4px; }

/* ------------------------------------------------------------------ issue */
.issuehead { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.issuehead h1 { margin: 0; font-size: 20px; font-weight: 650; }
.meta-line { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); align-items: center; }
.meta-line .id { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nextaction { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; display: inline-flex; gap: 8px; align-items: center; }
.nextaction.over { border-color: #F0C4BC; background: var(--danger-bg); color: var(--danger-ink); }
.recurline { font-size: 13px; color: var(--purple-deep); background: var(--purple-tint); border: 1px solid var(--purple-border); border-radius: 8px; padding: 7px 12px; align-self: flex-start; }
.recurline a { color: var(--purple-deep); font-weight: 600; }
.suivi-sec { font-size: 15px; font-weight: 650; margin: 8px 0 0; color: var(--ink); }
.checklabel { display: inline-flex; gap: 6px; align-items: center; }

/* timeline */
.timeline { display: flex; flex-direction: column; }
.event { display: grid; grid-template-columns: 140px 22px minmax(0, 1fr); gap: 0 14px; }
.when { text-align: right; font-size: 12.5px; color: var(--ink-3); padding-top: 3px; font-variant-numeric: tabular-nums; line-height: 1.35; }
.when b { display: block; color: var(--ink-2); font-weight: 600; }
.rail { position: relative; display: flex; justify-content: center; }
.rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--border); }
.event:first-child .rail::before { top: 8px; }
.event.last .rail::before { bottom: auto; height: 8px; }
.node { position: relative; z-index: 1; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink-3); margin-top: 6px; flex: none; }
.node.status { border-color: var(--purple); }
.node.solved { border-color: #2E7D4F; }
.card { margin-bottom: 22px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.card .who { font-size: 13px; color: var(--ink-2); }
.card .who b { color: var(--ink); font-weight: 600; }
.card .body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 15px; font-size: 14px; }
.card .body p { margin: 0 0 6px; white-space: pre-wrap; }
.card .body p:last-child { margin-bottom: 0; }
.statusline { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; flex-wrap: wrap; }
.arrow { color: var(--ink-3); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumb { width: 96px; height: 72px; border-radius: 8px; border: 1px solid var(--border); object-fit: cover; display: block; }
.thumb-link { display: block; line-height: 0; }
.filecard { display: inline-flex; align-items: center; gap: 9px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; font-size: 13px; color: var(--ink-2); text-decoration: none; margin-top: 6px; }
.filecard .ext { font-size: 10px; font-weight: 700; color: var(--purple-deep); background: var(--purple-tint); border-radius: 4px; padding: 2px 6px; letter-spacing: 0.05em; }
.hashline { font-size: 10.5px; color: var(--ink-3); font-family: Consolas, ui-monospace, monospace; margin-top: 6px; overflow-wrap: anywhere; }

/* composer */
.composer { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.composer h2 { margin: 0; font-size: 14px; font-weight: 650; color: var(--ink-2); }
/* minmax(0,1fr) : sans le 0, un input[type=date] force la colonne plus large
   que le conteneur (grid blow-out) et déborde de la carte. */
.composer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.composer-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 11.5px; color: var(--ink-3); }
.input { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 11px; width: 100%; }
/* large tap target for the artisan date picker (easy to open on mobile) */
.input-date { font-size: 17px; padding: 14px 14px; width: 100%; }
.notice-strong { margin: 4px 0 10px; color: var(--ink); font-size: 15px; font-weight: 600; }
textarea.input { resize: vertical; }
.input::placeholder { color: var(--ink-3); }
.filerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filerow input[type="file"] { font-size: 13px; color: var(--ink-2); }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.errorlist { color: var(--danger-ink); font-size: 12.5px; margin: 0; padding-left: 16px; }

/* sections & panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 10px; font-size: 15px; font-weight: 650; }
details.panel summary { cursor: pointer; font-weight: 650; font-size: 14px; color: var(--purple-deep); }
details.panel[open] summary { margin-bottom: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); padding: 7px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* required-field marker */
.req { color: var(--danger-ink); font-weight: 700; }
.reqnote { margin: 0 0 12px; font-size: 12px; color: var(--ink-3); }

/* calendrier des baux */
.chip.neutral { background: var(--surface-2); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--border); }
.cal-summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.tablewrap { overflow-x: auto; }                 /* safety net only; the table now fits */
.cal-table { width: 100%; table-layout: auto; }
.cal-table td { vertical-align: top; }
.cal-term { white-space: nowrap; }
.cal-info { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
.cal-deadline { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* per-cell deadline tint */
.cal-urgent { background: var(--danger-bg); }
.cal-soon   { background: var(--st-open-bg); }
.cal-later  { background: var(--st-solved-bg); }
.cal-past   { background: var(--surface-2); color: var(--ink-3); }
.cal-none   { background: transparent; }
/* row accent on the first cell, keyed on the most pressing deadline */
.cal-row td:first-child { border-left: 3px solid transparent; }
.cal-row-urgent td:first-child { border-left-color: var(--danger-ink); }
.cal-row-soon   td:first-child { border-left-color: #C98A1E; }
.cal-row-later  td:first-child { border-left-color: var(--st-solved-ink); }
.cal-row-past   td:first-child { border-left-color: var(--border-strong); }
/* inline action button under each date */
.cal-act { margin: 6px 0 0; }
.btn-mini { font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; padding: 3px 9px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); white-space: nowrap; }
.btn-mini:hover { border-color: var(--purple-deep); color: var(--purple-deep); }
.btn-mini-danger:hover { border-color: var(--danger-ink); color: var(--danger-ink); }
.muted { color: var(--ink-3); }
.cal-help summary { cursor: pointer; font-weight: 650; font-size: 13.5px; color: var(--purple-deep); }
.cal-help ul { margin: 10px 0 6px; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.cal-help .chip { vertical-align: middle; }

/* lots page sections */
.lotsec { display: flex; flex-direction: column; gap: 10px; }
.lotsec h2 { margin: 8px 0 0; font-size: 15px; font-weight: 650; color: var(--ink); display: flex; align-items: baseline; gap: 10px; }
.lotsec .secsub { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.cards.compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.cards.compact .cardlink { padding: 11px 13px; gap: 3px; }

/* cards grid (apartments, vendors) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.cardlink { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 17px; color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 5px; box-shadow: var(--shadow); }
.cardlink:hover { border-color: var(--purple-border); }
.cardlink .name { font-weight: 650; font-size: 15px; }
.cardlink .sub { font-size: 13px; color: var(--ink-2); white-space: pre-line; }
.cardlink .badges { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.tcard-actions { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.tcard-actions .btn { font-size: 12px; padding: 5px 10px; }

/* markdown-light rendering + toolbar */
.md p { margin: 0 0 6px; white-space: normal; }
.md p:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: 4px 0 6px; padding-left: 22px; }
.md li { margin: 1px 0; }
.mdbar { display: flex; align-items: center; gap: 4px; }
.mdbar button {
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
  border-radius: 6px; padding: 2px 9px; font-size: 12.5px; cursor: pointer; line-height: 1.5;
}
.mdbar button:hover { border-color: var(--purple-border); color: var(--purple-deep); }
.mdhint { margin-left: auto; font-size: 11px; color: var(--ink-3); }

/* vendor picker */
.vpicker { display: flex; flex-direction: column; gap: 8px; }
.vchips { display: flex; flex-wrap: wrap; gap: 6px; }
.vchips:empty { display: none; }
.vchip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; padding: 4px 6px 4px 12px; border-radius: 999px;
  background: var(--purple-tint); color: var(--purple-deep); border: 1px solid var(--purple-border);
}
.vchip button {
  border: none; background: none; color: var(--purple-deep); font-size: 15px; line-height: 1;
  cursor: pointer; padding: 0 5px; border-radius: 50%;
}
.vchip button:hover { background: var(--purple-border); }
.vchip.new { background: var(--surface); border-style: dashed; }
.vnew { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border: 1px dashed var(--border-strong); border-radius: 8px; background: var(--surface-2); }
.vnew .input { flex: 1 1 160px; width: auto; }

/* login */
.login-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 30px 30px 26px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 8px 28px rgba(51,48,43,0.06); }
.login-card .wordmark { justify-content: center; font-size: 18px; }
.login-card p.sub { margin: 0; text-align: center; color: var(--ink-2); font-size: 13.5px; }

/* forms page */
.formpage { max-width: 640px; }

/* ------------------------------------------------------------- mobile */
@media (max-width: 760px) {
  /* barre d'app : logo + compte + bouton « + » en ligne 1,
     navigation défilante horizontalement en ligne 2 */
  .appbar { padding: 8px 12px; flex-wrap: wrap; gap: 6px; }
  .appnav {
    order: 3; flex: 1 1 100%; margin: 0;
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .appnav::-webkit-scrollbar { display: none; }
  .appnav a { padding: 7px 12px; }
  .userbox { margin-left: auto; }
  .userbox .username { display: none; }
  .btn-label { display: none; }
  .appbar .btn-primary { padding: 6px 12px; font-size: 17px; line-height: 1.25; }

  .page { padding: 14px 12px 60px; gap: 14px; }
  .page-head h1 { font-size: 19px; }

  /* iOS zoome sur tout champ < 16px : on l'évite à la racine */
  .input { font-size: 16px; }

  /* filtres : lot pleine largeur, gravité/catégorie côte à côte,
     recherche pleine largeur */
  .filters select[name="apt"] { flex: 1 1 100%; max-width: none; }
  .filters select[name="sev"], .filters select[name="cat"] { flex: 1 1 40%; max-width: none; }
  .filters .spacer { display: none; }
  .qsearch { flex: 1 1 100%; min-width: 0; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; padding: 9px 14px; }

  /* liste : carte à deux niveaux — titre complet,
     puis lot · gravité · statut · âge */
  .list-head { display: none; }
  .row { display: flex; flex-wrap: wrap; gap: 5px 10px; align-items: center; padding: 12px 14px; position: relative; }
  .row .title { flex: 1 1 100%; padding-right: 36px; }
  .row .cat { display: none; }
  .row .apt { font-weight: 600; }
  .row .age { margin-left: auto; }
  .row .age .due { display: none; }
  /* quick-actions button pinned top-right of the card; drawer stacks below */
  .rowact { position: absolute; top: 11px; right: 12px; }
  .row .title { padding-right: 118px; }
  .row-drawer { flex-basis: 100%; width: 100%; flex-direction: column; align-items: stretch; gap: 12px; }
  .row-drawer .qa { flex: 1 1 100%; justify-content: space-between; }
  .row-drawer .qa .input { flex: 1; }

  /* fiche incident */
  .issuehead { padding: 14px; }
  .issuehead h1 { font-size: 18px; }
  .event { grid-template-columns: 16px minmax(0, 1fr); }
  .when { display: none; }
  .composer-grid { grid-template-columns: 1fr; }
  .composer { padding: 12px; }
  .panel { padding: 13px 14px; overflow-x: auto; }
  .thumb { width: 84px; height: 63px; }
}
.when-inline { display: none; font-size: 12px; color: var(--ink-3); }
@media (max-width: 760px) { .when-inline { display: inline; } }

/* --- Réconciliation des loyers -------------------------------------------- */
.recon-page .recon-form-grid { display: grid; grid-template-columns: 210px 1fr 1fr; gap: 14px; margin-bottom: 14px; align-items: start; }
.recon-page .recon-form .field { display: flex; flex-direction: column; gap: 5px; }
.recon-page .recon-form .field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.recon-page .recon-form .hint { font-size: 12px; color: var(--ink-3); }
.recon-page .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.recon-page .recon-table td { vertical-align: top; }
.recon-page .recon-detail { font-size: 12px; color: var(--ink-2); }
.recon-page .recon-detail > div { margin: 1px 0; }
.recon-page .recon-hint { color: var(--st-open-ink); }
.recon-page .recon-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.recon-page .recon-list li { margin: 3px 0; }
.recon-page h2 { font-size: 15px; font-weight: 650; margin: 0 0 10px; }
.recon-page .recon-row td:first-child { border-left: 3px solid transparent; }
.recon-page .recon-manquant td:first-child { border-left-color: var(--danger-ink); }
.recon-page .recon-partiel  td:first-child { border-left-color: #C98A1E; }
.recon-page .recon-manquant { background: var(--danger-bg); }
.recon-page .recon-partiel  { background: var(--st-open-bg); }
.recon-page .recon-surplus  { background: var(--purple-tint); }
.recon-page .recon-pas_echu, .recon-page .recon-attente, .recon-page .recon-anterieur { background: var(--surface-2); }
.recon-page .recon-chip-ok       { background: var(--st-solved-bg); color: var(--st-solved-ink); }
.recon-page .recon-chip-partiel  { background: var(--st-open-bg);   color: var(--st-open-ink); }
.recon-page .recon-chip-manquant { background: var(--danger-bg);    color: var(--danger-ink); }
.recon-page .recon-chip-surplus  { background: var(--purple-tint);  color: var(--purple-deep); }
.recon-page .recon-chip-pas_echu,
.recon-page .recon-chip-attente,
.recon-page .recon-chip-anterieur { background: var(--surface-2); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--border); }
@media (max-width: 760px) { .recon-page .recon-form-grid { grid-template-columns: 1fr; } }
