/* Le Victoria v2. Précis, technique, contemporain. Un cockpit sombre, tout le reste clair. */
:root {
  /* 5.0: la charte des pages pour les voisins: crème, bleu nuit, lie-de-vin, or */
  --bg: #F4EFE5;
  --panel: #FBF8F1;
  --paper: #FFFDF8;
  --ink: #1A2238;
  --ink-2: #39415C;
  --muted: #6E6A5E;
  --line: #E6DDCB;
  --line-strong: #D2C4A8;
  --cockpit: #1A2238;
  --cockpit-2: #232C49;
  --cockpit-line: #36405F;
  --cockpit-text: #F4EFE5;
  --cockpit-muted: #A7ACC0;
  --accent: #8B2331;
  --accent-deep: #6F1A27;
  --gold: #A8843E;
  --gold-soft: #EADFC6;
  --ok: #4A6B43;
  --warn: #A8843E;
  --crit: #A3283A;
  --none: #9A9486;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --display: "Karla", "Inter", "Helvetica Neue", Arial, sans-serif;
  --sans: "Karla", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  --cut: inset(0 round 3px);
  --rail-w: 236px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; }
a { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: 0; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0; }
.kicker { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.kicker-link { text-decoration: none; display: inline-block; }
.kicker-link:hover { color: var(--accent-deep); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--cockpit) 0, var(--cockpit) var(--rail-w), var(--bg) var(--rail-w)); }
.rail { background: var(--cockpit); color: var(--cockpit-text); position: sticky; top: 0; height: 100vh; box-sizing: border-box; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; padding: 22px 14px 18px; scrollbar-width: thin; scrollbar-color: #3a4152 transparent; z-index: 20; }
.rail::-webkit-scrollbar { width: 6px; } .rail::-webkit-scrollbar-thumb { background: #3a4152; border-radius: 3px; }
.rail-brand { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: 0.06em; white-space: nowrap; text-transform: uppercase; padding: 0 12px; color: #fff; }
.rail-sub { font-family: var(--display); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cockpit-muted); padding: 2px 12px 0; }
.rail-today { font-family: var(--mono); font-size: 11.5px; color: var(--cockpit-text); padding: 10px 12px 0; line-height: 1.4; }
.rail-search { display: flex; gap: 4px; padding: 12px 8px 0; }
.rail-search input[type="search"]::-webkit-search-decoration { display: none; }
.rail-search input { flex: 1 1 auto; min-width: 0; min-height: 38px; padding: 0 10px; border: 1px solid var(--cockpit-line); border-radius: 4px; background: var(--cockpit-2); color: #fff; font-size: 13px; }
.rail-search input::placeholder { color: var(--cockpit-muted); }
.rail-search-go { min-width: 38px; min-height: 38px; border: 1px solid var(--cockpit-line); border-radius: 4px; background: transparent; color: var(--cockpit-text); cursor: pointer; }
.today-strip { display: none !important; }
.rail-report { margin: 16px 0 6px; }
.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-group-label { font-family: var(--display); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cockpit-muted); padding: 16px 12px 6px; opacity: 0.8; }
.rail-nav-foot { margin-bottom: 10px; }
.rail-cluster { display: flex; gap: 6px; margin: 12px 8px 0; text-decoration: none; }
.rail-cluster .cl { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border: 1px solid var(--cockpit-line); border-radius: 6px; background: var(--cockpit-2); }
.rail-cluster .cl b { font-family: var(--mono); font-size: 18px; font-weight: 500; line-height: 1; color: #fff; }
.rail-cluster .cl .dot { margin: 0; width: 8px; height: 8px; }
.rail-cluster .cl-ok b { color: var(--ok); } .rail-cluster .cl-attention b { color: var(--warn); } .rail-cluster .cl-critical b { color: var(--crit); } .rail-cluster .cl-unknown b { color: var(--cockpit-muted); }
.rail-cluster:hover .cl { border-color: var(--accent); }
.rail-nav a {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 12px; height: 46px; padding: 0 12px 0 9px;
  color: var(--cockpit-muted); text-decoration: none; border-left: 3px solid transparent;
  font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: 0.05em; text-transform: uppercase;
}
.rail-nav a svg { width: 18px; height: 18px; flex: 0 0 auto; }
.rail-nav a:hover { color: #fff; }
.rail-nav a.active { color: #fff; border-left-color: var(--accent); background: rgba(255,255,255,0.04); }
.rail-nav .count { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--accent); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 4px; }
.rail-foot .version { font-family: var(--mono); font-size: 11px; color: var(--cockpit-muted); padding: 0 8px; }
.lang-buttons { display: flex; gap: 4px; }
.lang-btn {
  flex: 1 1 0; min-height: 40px; min-width: 40px; background: transparent; color: var(--cockpit-muted);
  border: 1px solid var(--cockpit-line); border-radius: 4px; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: 0.04em;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.lang-btn.active { color: #fff; border-color: var(--accent); }
.rail-settings { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px; color: var(--cockpit-muted); text-decoration: none; font-family: var(--display); text-transform: uppercase; letter-spacing: 0.05em; font-size: 14px; }
.rail-settings.active, .rail-settings:hover { color: #fff; }

.topbar, .tabbar { display: none; }
.main { min-width: 0; padding: 0 32px 64px; }
.page { max-width: 1120px; }

/* mobile */
@media (max-width: 1024px), (max-height: 520px) {
  .shell { display: block; background: var(--bg); }
  .rail { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    position: sticky; top: 0; z-index: 30; background: var(--cockpit); color: #fff; min-height: 52px;
    margin: 0 -16px; padding: env(safe-area-inset-top, 0px) max(6px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
    box-sizing: content-box;
  }
  .topbar .brand { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
  .today-strip { display: flex !important; font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding: 8px 0 0; }
  .topbar .lang-buttons { gap: 2px; }
  .topbar .lang-btn { min-width: 34px; padding: 0; min-height: 44px; border-color: transparent; font-size: 12px; }
  .topbar .lang-btn.active { border-color: var(--accent); }
  .topbar .settings-link { color: var(--cockpit-muted); display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 44px; }
  .topbar .settings-link.active { color: #fff; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--cockpit); border-top: 1px solid var(--cockpit-line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 62px;
    color: var(--cockpit-muted); text-decoration: none; font-family: var(--display); font-size: 11px; letter-spacing: 0.02em; text-transform: uppercase; overflow: hidden;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  }
  .tab span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tab svg { width: 22px; height: 22px; }
  .tab.active { color: #fff; }
  .tab.active svg { color: var(--accent); }
  .tabbar, .tab-report { overflow: visible; }
  .tab-report .hex {
    position: relative; z-index: 1;
    width: 54px; height: 54px; margin-top: -22px; display: flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
  }
  /* a dark rim behind the hexagon hides the bar's top border where it crosses (drawn by the parent, not the clipped element) */
  .tab-report { position: relative; }
  .tab-report::before { content: ""; position: absolute; top: -26px; left: 50%; width: 62px; height: 62px; transform: translateX(-50%); background: var(--cockpit); clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); z-index: 0; }
  .tab-report .hex svg { width: 26px; height: 26px; }
  .main { padding: 0 16px calc(84px + env(safe-area-inset-bottom)); }
}

/* ---------- page head ---------- */
.page-head { padding: 32px 0 24px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.page-head h1 { font-size: 34px; font-weight: 700; letter-spacing: 0; line-height: 1.1; }
.page-head .lead { color: var(--muted); margin: 6px 0 0; max-width: 640px; }
.page-head .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.page-head .head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 40px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line-strong); }
.section-head h2 { font-size: 21px; }
.section-head a { font-family: var(--display); font-weight: 600; font-size: 14px; color: var(--accent-deep); text-decoration: none; }

/* ---------- cockpit ---------- */
.cockpit { background: var(--cockpit); color: var(--cockpit-text); clip-path: var(--cut); padding: 20px 22px 14px; display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 18px; }
.cockpit-title { font-family: var(--display); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cockpit-muted); margin-bottom: 8px; display: flex; justify-content: space-between; }
.cockpit svg { width: 100%; max-width: 640px; height: auto; display: block; font-family: var(--sans); }
.cockpit .marker { cursor: pointer; }
.cockpit .marker text { font-size: 14px; font-weight: 600; fill: var(--cockpit-text); }
.cockpit .marker:hover text, .cockpit .marker:focus text { fill: var(--accent); }
.cockpit .marker:focus { outline: none; }
.cockpit .marker:focus .hexm { stroke: #fff; }
.cockpit .floor-label { font-family: var(--mono); font-size: 11px; fill: var(--cockpit-muted); }
.cockpit .zone-label { font-size: 12px; fill: var(--cockpit-muted); }
.cockpit .line { stroke: #C9CED6; stroke-width: 1.3; fill: none; }
.cockpit .line-soft { stroke: #5C6573; stroke-width: 1; fill: none; }
.cockpit .line-dash { stroke: #5C6573; stroke-width: 1; fill: none; stroke-dasharray: 4 4; }
.cockpit .water { fill: #2B5F8A; fill-opacity: 0.45; stroke: #6FA3D0; }
.cockpit .cabin { fill: #E8EBF0; fill-opacity: 0.12; stroke: #C9CED6; }
.gauges { display: grid; grid-template-rows: repeat(4, 1fr); gap: 6px; align-content: stretch; border-left: 1px solid var(--cockpit-line); padding-left: 18px; }
.gauge { display: flex; flex-direction: column; justify-content: center; }
.gauge .n { font-family: var(--mono); font-size: 32px; line-height: 1; font-weight: 500; }
.gauge .l { font-family: var(--display); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cockpit-muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.gauge-ok .n { color: var(--ok); } .gauge-attention .n { color: var(--warn); } .gauge-critical .n { color: var(--crit); } .gauge-unknown .n { color: var(--none); }
.cockpit-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 8px; padding-top: 10px; border-top: 1px solid var(--cockpit-line); }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 11px 0 9px; border: 1px solid var(--cockpit-line); border-radius: 4px;
  color: var(--cockpit-text); text-decoration: none; font-size: 13px; font-weight: 500;
}
.chip:hover { border-color: var(--accent); }
@media (max-width: 1024px), (max-height: 520px) {
  .cockpit { grid-template-columns: 1fr; padding: 16px 14px 12px; }
  .gauges { grid-template-rows: none; grid-template-columns: repeat(4, 1fr); border-left: 0; border-top: 1px solid var(--cockpit-line); padding: 12px 0 0; }
  .gauge .n { font-size: 26px; }
  .gauge .l { font-size: 9.5px; letter-spacing: 0.03em; white-space: nowrap; }
  .cockpit .marker text.lbl { display: block; font-size: 17px; font-weight: 600; paint-order: stroke; stroke: #0F1218; stroke-width: 4px; stroke-linejoin: round; }
  .cockpit .zone-label { display: none; }
  .cockpit .floor-label { font-size: 13px; }
  .cockpit-title span + span { display: none; }
}

/* ---------- status ---------- */
.dot { display: inline-block; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 2px; transform: rotate(45deg); vertical-align: middle; margin-right: 8px; background: var(--none); }
.dot-ok { background: var(--ok); } .dot-attention { background: var(--warn); } .dot-critical { background: var(--crit); } .dot-unknown { background: var(--none); }
.badge {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 9px 4px 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; white-space: nowrap;
}
.badge .dot { margin-right: 0; }
.badge-sm { font-size: 11px; padding: 2px 7px; }
.tag { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); margin-right: 6px; }
.sev-high { color: var(--crit); } .sev-medium { color: #B37F00; } .sev-low { color: var(--muted); }
.sev { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- cards + lists ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 20px 22px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card h4 { font-size: 15px; font-weight: 600; margin: 14px 0 6px; color: var(--ink-2); }
.card p { margin: 0 0 8px; }
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover { border-color: var(--line-strong); box-shadow: 0 6px 20px rgba(14,17,22,0.06); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; margin-bottom: 8px; }
.card-head .badge { flex: 0 0 auto; }
.card-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 10px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.list li:first-child { padding-top: 6px; }
.list li:last-child { border-bottom: 0; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.row .grow { flex: 1 1 auto; min-width: 0; }
.date { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; text-align: right; }
.date strong { color: var(--ink); font-weight: 500; }
.done { color: var(--muted); text-decoration: line-through; }
.check { display: inline-block; width: 18px; text-align: center; color: var(--ok); font-weight: 700; }
.who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; }
.who .box { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.who .n { font-family: var(--mono); font-size: 26px; line-height: 1; }
.who .l { font-family: var(--display); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

/* dates stand out everywhere */
.date-pill { display: inline-block; font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--ink); background: #E9EDF3; border-radius: 4px; padding: 2px 7px; line-height: 1.5; white-space: nowrap; }
.due-over .date-pill { background: #FBE3E1; color: var(--crit); }
.due-soon .date-pill { background: #FFF1E8; color: var(--accent-deep); }
.msg .meta-line { margin-bottom: 4px; }
.date strong { font-family: var(--mono); font-size: 12.5px; }

/* items on a fixed grid: priority | content | right column */
.item-grid { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 8px 16px; align-items: start; }
.item-l { padding-top: 3px; }
.item-c { min-width: 0; }
.item-r { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 96px; }
.item-r .amount { font-size: 14px; font-weight: 500; }
@media (max-width: 640px) { .item-grid { grid-template-columns: 1fr; gap: 6px; } .item-l .sev-badge { display: inline-block; } .item-r { flex-direction: row; align-items: center; justify-content: flex-start; } }
.notice-info { background: #F3F6FB; border-color: #C9D3E3; }
.link-like { color: var(--accent-deep); cursor: pointer; text-decoration: underline; font-weight: 500; }

/* items: clear hierarchy */
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 6px; font-size: 12.5px; color: var(--muted); min-height: 24px; }
.item-meta .tag { margin: 0; }
.item-meta .owner { font-family: var(--display); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11.5px; }
.sev-badge { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 7px; border-radius: 3px; color: #fff; background: var(--none); line-height: 1.2; }
.item-l .sev-badge { display: block; text-align: center; }
.sev-badge.sev-high { background: var(--crit); } .sev-badge.sev-medium { background: #C98A00; } .sev-badge.sev-low { background: var(--none); }
.item-title { font-size: 15.5px; font-weight: 500; line-height: 1.45; color: var(--ink); }
.item-title.done { color: var(--muted); text-decoration: line-through; font-weight: 400; }
.item-title .tag { vertical-align: middle; margin-left: 6px; margin-right: 0; background: var(--bg); }
.item-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--muted); align-items: center; }
.due { font-family: var(--mono); font-size: 12.5px; }
.due-soon { color: var(--ink); font-weight: 500; }
.due-over { color: var(--crit); font-weight: 500; }
.objchip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 500; }
.objchip .dot { margin-right: 0; width: 8px; height: 8px; }
.who { grid-template-columns: repeat(4, 1fr); }
.who .box { display: block; text-decoration: none; color: inherit; border-top: 3px solid var(--line-strong); }
.who .box:hover { border-color: var(--ink); }
.who .box-syndic { border-top-color: var(--ink); } .who .box-contractor { border-top-color: var(--warn); } .who .box-council { border-top-color: var(--accent); } .who .box-concierge { border-top-color: var(--ok); }
@media (max-width: 640px) { .who { grid-template-columns: repeat(2, 1fr); } }
.contact-actions { display: flex; flex-direction: column; gap: 6px; }
.contact .item-foot a { color: var(--ink); text-decoration: none; }

/* publishing */
.pub-pill { display: inline-block; margin: 10px 8px 0; padding: 6px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-family: var(--display); font-weight: 600; font-size: 12px; text-decoration: none; }
.pub-pill:hover { background: var(--accent-deep); }
.pub-pill-mobile { margin: 0 0 0 10px; padding: 3px 9px; font-size: 11px; }
.today-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.changelog li { padding: 8px 0; font-size: 13.5px; }
.steps-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 12px; }
.steps-list .step-num { font-family: var(--display); font-weight: 600; margin-right: 6px; }
.note { border-left: 4px solid var(--warn); }
.prov-forms details { border-top: 1px solid var(--line); padding: 8px 0; }
.prov-forms details:first-child { border-top: 0; }
.prov-forms summary { cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 15px; min-height: 40px; display: flex; align-items: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-top: 8px; }
.form-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* home side cards: calm links */
.grid-3 .list a { text-decoration: none; color: var(--ink); }
.grid-3 .list a:hover { text-decoration: underline; }
.grid-3 .meta-line { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }

/* overview strip */
.overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.ov { display: flex; flex-direction: column; justify-content: space-between; min-height: 84px; box-sizing: border-box; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.ov:hover { border-color: var(--ink); }
.ov-n { font-size: 20px; font-weight: 500; line-height: 1.2; min-height: 26px; }
.ov-n .dot { width: 9px; height: 9px; margin-right: 4px; }
.ov-l { font-size: 12px; color: var(--muted); margin-top: 4px; }
.synth-text { font-size: 15.5px; }
.chip-mobile { display: none; }
/* labels are drawn on the building on every screen size; equipment chips stay hidden */

/* quick actions, like a car's home tiles */
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 4px 0 16px; }
.quick-tile { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 14px; min-height: 96px; height: 100%; box-sizing: border-box; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 16px; transition: border-color 0.12s, transform 0.12s; }
.quick-tile svg { width: 24px; height: 24px; color: var(--muted); }
.quick-tile:hover { border-color: var(--ink); transform: translateY(-1px); }
.quick-accent { background: var(--cockpit); color: #fff; border-color: var(--cockpit); }
.quick-accent svg { color: var(--accent); }
.quick-accent:hover { border-color: var(--accent); }
@media (max-width: 640px) { .quick { grid-template-columns: repeat(2, 1fr); } .quick-tile { min-height: 84px; } }
.card.empty { text-align: center; padding: 32px 20px; }
.intake .dropzone { padding: 32px 16px; }
.drop-icon { width: 34px; height: 34px; color: var(--muted); margin-bottom: 8px; }
.paste { margin-top: 12px; }
.paste summary { cursor: pointer; color: var(--accent-deep); font-weight: 500; font-size: 14px; min-height: 36px; display: inline-flex; align-items: center; }

/* card system */
.tile-card { display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--line); align-self: start; }
.tile-card.status-ok { border-top-color: var(--ok); } .tile-card.status-attention { border-top-color: var(--warn); } .tile-card.status-critical { border-top-color: var(--crit); } .tile-card.status-unknown { border-top-color: var(--none); }
.tile-card .card-head { margin-bottom: 0; }
.tile-card .card-head h3 { margin-bottom: 0; }
.tile-card p.small { margin: 0; color: var(--ink-2); }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.facts { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.fact { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.fact .fl { flex: 0 0 96px; font-family: var(--display); font-weight: 600; font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.fact .fv { flex: 1 1 auto; min-width: 0; }
.badge-warn { border-color: var(--warn); color: var(--accent-deep); }
.card-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fp { background: var(--bg); padding: 2px 8px; border-radius: 4px; letter-spacing: 0.08em; }
.sig { font-family: var(--mono); font-weight: 600; }
.sig-ok, .sig-line.sig-ok { color: var(--ok); } .sig-bad, .sig-line.sig-bad { color: var(--crit); } .sig-unv, .sig-line.sig-unverified { color: var(--warn); }
.dup-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.dup-side { padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); font-size: 14px; }
@media (max-width: 720px) { .dup-pair { grid-template-columns: 1fr; } }
.help h3 { font-size: 17px; margin-bottom: 6px; }
.help p { margin: 0; font-size: 15px; line-height: 1.6; }
.help { margin-bottom: 12px; }
.understand p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.6; }
.understand p:last-child { margin-bottom: 0; }
.comp { display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: var(--line); gap: 2px; }
.comp-seg { display: block; height: 100%; }
.comp-other { background: #E3E7EE; }
.sw-other { background: #E3E7EE; border: 1px solid var(--line-strong); }
.legend-wrap { flex-wrap: wrap; justify-content: flex-start; margin-top: 10px; }
.shell, .main { overflow-x: clip; }
.page, .card { max-width: 100%; }

/* premises */
.who-5 { grid-template-columns: repeat(5, 1fr); margin-bottom: 20px; }
.who-5 .box { border-top-width: 3px; }
.box-cond-good { border-top-color: var(--ok) !important; } .box-cond-fair { border-top-color: var(--warn) !important; } .box-cond-poor { border-top-color: var(--crit) !important; } .box-cond-works { border-top-color: var(--accent) !important; } .box-cond-unknown { border-top-color: var(--none) !important; }
@media (max-width: 640px) { .who-5 { grid-template-columns: repeat(2, 1fr); } }
.zone-title { font-size: 16px; color: var(--muted); margin: 26px 0 10px; font-weight: 600; }
.cond { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; color: #fff; background: var(--none); white-space: nowrap; }
.cond-good { background: var(--ok); } .cond-fair { background: #C98A00; } .cond-poor { background: var(--crit); } .cond-works { background: var(--accent); } .cond-unknown { background: var(--none); }
.premise { border-top: 3px solid var(--line); }
.cond-border-good { border-top-color: var(--ok); } .cond-border-fair { border-top-color: var(--warn); } .cond-border-poor { border-top-color: var(--crit); } .cond-border-works { border-top-color: var(--accent); }
.cond-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* economy */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 8px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; }
.kpi .l { font-family: var(--display); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.kpi .n { font-family: var(--mono); font-size: 24px; font-weight: 500; margin-top: 6px; line-height: 1.1; }
.kpi .s { font-size: 12.5px; margin-top: 6px; }
.mini-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.mini-kpis .l { font-size: 11.5px; color: var(--muted); }
.mini-kpis .n { font-size: 16px; font-weight: 500; }
.chart { width: 100%; max-width: 760px; height: auto; display: block; margin: 0 auto 6px; }
.chart .bar-budget { fill: #B9CBE3; } .chart .bar-actual { fill: #1F3A5F; } .chart .bar-actual.bar-over { fill: var(--crit); }
.chart .bar-label { font-family: var(--mono); font-size: 11px; fill: var(--ink); }
.chart .axis-label { font-family: var(--display); font-size: 12px; fill: var(--muted); }
.chart .axis { stroke: var(--line-strong); }
.legend-row { display: flex; gap: 18px; justify-content: center; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.sw-budget { background: #B9CBE3; } .sw-actual { background: #1F3A5F; }
.table td:last-child { white-space: nowrap; }
.table-fin .share { width: 110px; }
.share { display: inline-block; width: 90px; height: 8px; background: var(--line); border-radius: 4px; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.share span { display: block; height: 100%; background: var(--ink); }
.table-fin th.r, .table-fin td.r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-fin { table-layout: fixed; }
.table-fin td { vertical-align: middle; }
.table-fin .sw { vertical-align: -2px; }
.table .total td { font-weight: 600; border-top: 2px solid var(--line-strong); }
.xp-engaged { background: var(--ink); } .xp-voted { background: var(--ok); } .xp-risk { background: var(--crit); } .xp-potential { background: var(--none); }
.calc { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: end; }
.calc-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 720px) { .calc { grid-template-columns: 1fr; } .calc-out { grid-template-columns: 1fr; } }

/* closed site: the gate */
body[data-gate="1"] .rail, body[data-gate="1"] .topbar, body[data-gate="1"] .tabbar, body[data-gate="1"] .today-strip { display: none !important; }
body[data-gate="1"] .shell { display: block; background: var(--cockpit); min-height: 100vh; }
body[data-gate="1"] .main { padding: 0; }
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; background: radial-gradient(1200px 600px at 50% -10%, #263041 0, var(--cockpit) 60%); }
.gate-card { width: 100%; max-width: 440px; background: #fff; border-radius: 10px; padding: 28px 26px; box-shadow: 0 20px 60px rgba(0,0,0,0.45); }
.gate-card h1 { font-size: 28px; margin: 6px 0 8px; }
.gate-card .lead { font-size: 14.5px; margin-bottom: 16px; }
.gate-card .lang-buttons { justify-content: center; }
.gate-card .lang-btn { color: var(--muted); border-color: var(--line); }
.gate-card .lang-btn.active { color: var(--ink); border-color: var(--accent); }

/* roles */
.tab-gardien { display: none !important; }
body[data-role="concierge"] .tab-gardien { display: flex !important; }
body[data-role="concierge"] .tab-chrono { display: none !important; }
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.role-tile.selected { border-color: var(--accent); background: #FFF6F1; }
body[data-role="resident"] .rail-nav a[data-section="documents"], body[data-role="concierge"] .rail-nav a[data-section="documents"],
body[data-role="resident"] .topbar a[data-section="documents"], body[data-role="concierge"] .topbar a[data-section="documents"] { display: none; }
body[data-role="resident"] .quick-tile[href="#/documents/deposer"] { display: none; }
body[data-role="concierge"] .quick-tile[href="#/documents/deposer"] { display: none; }

/* progress */
.progress-card { border: 1px solid var(--line-strong); border-left: 4px solid var(--accent); border-radius: 4px; padding: 12px 14px; margin: 12px 0; background: #fff; }
.progress-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.progress-name { font-weight: 500; margin-top: 2px; word-break: break-word; }
.progress-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.progress-stage { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: 0; margin: 10px 0 6px; }
.pbar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; position: relative; }
.pbar span { display: block; height: 100%; background: var(--accent); transition: width 0.3s ease; }
.pbar-indeterminate span { width: 100% !important; background: repeating-linear-gradient(90deg, var(--accent) 0 18px, #FFB08A 18px 36px); background-size: 72px 100%; animation: pbar-move 1s linear infinite; }
@keyframes pbar-move { from { background-position: 0 0; } to { background-position: 72px 0; } }
.progress-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.tiles-3 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tile-col { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; }

/* case files */
.case { border: 1px solid var(--line); border-radius: 6px; background: #fff; margin: 0 0 10px; }
.case-summary { list-style: none; cursor: pointer; padding: 14px 16px; }
.case-summary::-webkit-details-marker { display: none; }
.case-head { display: flex; gap: 12px; align-items: flex-start; }
.case-head .grow { flex: 1 1 auto; min-width: 0; }
.case-title { font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.25; }
.case-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 6px 0 8px; font-size: 12.5px; color: var(--muted); }
.case-next { font-size: 14px; margin-top: 8px; }
.case-next .kicker { font-size: 11px; margin-right: 4px; }
.chev { flex: 0 0 auto; width: 12px; height: 12px; margin-top: 6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.15s; }
.case[open] .chev { transform: rotate(-135deg); }
.case-body { padding: 0 16px 14px; border-top: 1px solid var(--line); }
.case-closed .case-title { color: var(--muted); }
.steps .step-done .step-title { color: var(--muted); text-decoration: line-through; }
.steps .check { display: inline-block; min-width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; background: var(--bg); font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); margin-right: 6px; }
.steps .step-done .check { background: var(--ok); color: #fff; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.inline-form input { flex: 1 1 200px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 4px; }
.item-more { margin-top: 6px; font-size: 13px; }
.item-more summary { cursor: pointer; color: var(--accent-deep); font-size: 13px; font-weight: 500; min-height: 28px; display: inline-flex; align-items: center; gap: 4px; list-style: none; }
.item-more summary::before { content: '›'; font-size: 16px; line-height: 1; transition: transform 0.15s; }
.item-more[open] summary::before { transform: rotate(90deg); }
.item-more summary::-webkit-details-marker { display: none; }
.translation { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 4px; background: #F7FBF8; }
.translation-body { margin-top: 8px; font-size: 14.5px; line-height: 1.55; }

/* case editing */
.case-edit .ce-step { display: grid; grid-template-columns: 24px minmax(0, 1fr) 150px auto; gap: 8px; align-items: center; margin: 6px 0; }
.case-edit .ce-step input[type="text"], .case-edit .ce-step input[type="date"] { min-height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 4px; }
.case-edit .ce-done { width: 20px; height: 20px; accent-color: var(--ok); }
@media (max-width: 640px) { .case-edit .ce-step { grid-template-columns: 24px minmax(0, 1fr); } .case-edit .ce-step input[type="date"], .case-edit .ce-step .btn { grid-column: 2; } }

/* synthesis */
.synth { margin-top: 16px; border-left: 4px solid var(--ink); }
.synth-text { font-size: 16px; line-height: 1.6; margin: 6px 0 10px; }
.synth-points { margin: 0 0 12px; padding-left: 20px; }
.synth-points li { margin: 4px 0; }

/* correspondence */
.msgs { margin-top: 10px; }
.msg { padding: 12px 14px; margin: 10px 0; border-left: 3px solid var(--line-strong); background: #fff; line-height: 1.5; }
.msg-out { border-left-color: var(--ink); }
.msg-in { border-left-color: var(--accent); background: #FFF7F3; }

/* chronology */
.controls { display: flex; flex-direction: column; gap: 10px; margin: 0 0 18px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; align-self: flex-start; background: #fff; }
.seg a { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; text-decoration: none; color: var(--muted); font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: 0.01em; }
.seg a + a { border-left: 1px solid var(--line-strong); }
.seg a.active { background: var(--ink); color: #fff; }
.seg .count { font-family: var(--mono); font-size: 12px; opacity: 0.75; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1 1 auto; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 500; }
.filter-chip.selected { border-color: var(--ink); background: var(--ink); color: #fff; }
.filter-chip .dot { margin-right: 0; }
.years { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.years .kicker { margin-right: 6px; }
.year-jump { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; background: transparent; font-family: var(--mono); font-size: 13px; cursor: pointer; color: var(--ink); }
.year-jump:hover { border-color: var(--accent); color: var(--accent-deep); }
.year { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0 18px; margin: 0 0 18px; }
.year-col { position: relative; }
.year-num { position: sticky; top: 16px; font-family: var(--mono); font-size: 32px; line-height: 1; font-weight: 500; color: var(--ink); padding: 8px 0 12px; text-align: right; }
.year-num.small-year { font-size: 15px; font-family: var(--display); font-weight: 600; letter-spacing: 0; padding-top: 12px; line-height: 1.3; }
.year-entries { border-left: 2px solid var(--line-strong); padding: 6px 0 14px 22px; }
.month-head { font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: 0; color: var(--muted); margin: 22px 0 2px; }
.month-head:first-child { margin-top: 4px; }
.entry { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry-dot { position: absolute; left: -29px; top: 15px; width: 11px; height: 11px; transform: rotate(45deg); background: var(--none); border: 2px solid var(--bg); }
.entry-body { flex: 1 1 auto; min-width: 0; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.entry-kind { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; }
.entry-meta a { color: var(--ink); }
.entry-title { margin-top: 2px; font-size: 15.5px; font-weight: 500; line-height: 1.45; }
.entry-detail { font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.entry-side { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: 0 0 auto; }
.k-event.s-incident .entry-dot { background: var(--crit); }
.k-event.s-inspection .entry-dot { background: var(--ink); }
.k-event.s-intervention .entry-dot, .k-event.s-devis .entry-dot { background: var(--warn); }
.k-event.s-decision .entry-dot, .k-ag .entry-dot { background: var(--ok); }
.k-deadline .entry-dot, .k-reply_due .entry-dot, .k-item_due .entry-dot { background: var(--accent); }
.k-contract .entry-dot { background: #fff; border-color: var(--ink); }
.k-message.s-in .entry-dot { background: var(--accent); }
.k-message.s-out .entry-dot { background: var(--ink); }
.k-document .entry-dot { background: var(--none); }
.k-step .entry-dot { background: var(--ok); }
.card .year { margin: 0; }
.card .year-num { font-size: 24px; top: 8px; }
.card .year-entries { padding-bottom: 6px; }
.next-line { font-size: 13px; margin: 6px 0 0; padding: 8px 10px; background: var(--bg); border-radius: 4px; }
.next-line .kicker { font-size: 11px; margin-right: 4px; }
@media (max-width: 640px) {
  .year { grid-template-columns: 1fr; }
  .year-num { position: static; font-size: 26px; padding: 6px 0 4px; text-align: left; }
  .year-entries { padding-left: 16px; }
  .entry-dot { left: -23px; }
  .entry-side { flex-direction: row; align-items: center; }
  .entry { flex-wrap: wrap; }
}

/* small timeline (cards) */
.timeline { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--line-strong); }
.timeline li { position: relative; padding: 0 0 16px 14px; }
.timeline li::before { content: ""; position: absolute; left: -26px; top: 7px; width: 9px; height: 9px; transform: rotate(45deg); background: var(--warn); }
.timeline li.t-incident::before { background: var(--crit); }
.timeline li.t-inspection::before { background: var(--ink); }
.timeline li.t-decision::before { background: var(--ok); }
.timeline li.t-courrier::before, .timeline li.t-contrat::before, .timeline li.t-devis::before, .timeline li.t-facture::before { background: var(--none); }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-strong); margin: 6px 0 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 0 0 auto; padding: 0 14px; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: 0.01em; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .count { font-family: var(--mono); font-size: 12px; color: var(--accent-deep); }

/* buttons + forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: #fff; font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: 0.01em; text-decoration: none;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:disabled { opacity: 0.45; cursor: default; }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; clip-path: var(--cut); border: 0; padding: 0 22px; }
.btn-accent:hover { background: var(--accent-deep); }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.field { margin: 0 0 14px; }
.field label { display: block; font-family: var(--display); font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--ink-2); margin-bottom: 6px; }
.field input[type="text"], .field input[type="date"], .field input[type="password"], .field input[type="url"], .field input[type="email"], .field input[type="tel"], .field input[type="number"], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff;
}
.field textarea { min-height: 120px; resize: vertical; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.field input[type="file"] { width: 100%; }
.select-inline { min-height: 40px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.switch { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.tile { min-width: 0; overflow-wrap: anywhere; }
.tile { min-height: 54px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; padding: 10px 12px; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 500; -webkit-tap-highlight-color: transparent; }
.tile.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.dropzone { display: block; border: 1px dashed var(--line-strong); border-radius: 6px; padding: 22px 16px; text-align: center; background: #fff; cursor: pointer; }
.dropzone.over { border-color: var(--accent); background: #FFF4EF; }
.dropzone input { display: none; }
.dropzone .big { font-family: var(--display); font-size: 20px; font-weight: 600; }
.notice { border: 1px solid var(--line-strong); background: #fff; padding: 12px 14px; border-radius: 4px; margin: 12px 0; font-size: 14px; }
.notice-ok { border-color: var(--ok); }
.notice-error { border-color: var(--crit); color: var(--crit); }
.banner { background: #fff; border: 1px solid var(--accent); border-left-width: 4px; border-radius: 4px; padding: 10px 14px; margin: 14px 0 0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }

/* table */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-family: var(--display); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line-strong); font-weight: 600; }
.table td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table .num { font-family: var(--mono); font-size: 15px; white-space: nowrap; }
@media (max-width: 640px) {
  .table thead { display: none; }
  .table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table td { display: block; border: 0; padding: 3px 0; }
  .table td[data-label]::before { content: attr(data-label) " "; font-family: var(--display); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
}

/* detail */
.detail-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin: 6px 0 14px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 14px; margin: 0 0 12px; }
.kv dt { font-family: var(--display); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.kv dd { margin: 0; }
@media (max-width: 480px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dt { margin-top: 8px; } }

/* review + inbox */
.review-block { margin: 0 0 14px; }
.review-block h4 { font-size: 20px; margin-bottom: 8px; }
.review-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.review-item input { width: 22px; height: 22px; margin-top: 3px; flex: 0 0 auto; accent-color: var(--accent); }
.review-item .body { flex: 1 1 auto; }
.arrow { color: var(--muted); padding: 0 6px; }
.src { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.meta-line { font-size: 13px; color: var(--muted); }
.meta-line a { color: var(--ink); }
.progress { height: 5px; background: var(--line); border-radius: 2px; overflow: hidden; margin: 8px 0; }
.progress span { display: block; height: 100%; background: var(--ok); }
.letter { width: 100%; min-height: 380px; font-family: var(--mono); font-size: 13px; line-height: 1.5; padding: 14px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }

footer.page-foot { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
@media (max-width: 420px) {
  .topbar .brand { font-size: 15px; letter-spacing: 0.03em; }
  .topbar .lang-btn { min-width: 30px; font-size: 11px; }
  .topbar .settings-link { width: 34px; }
}
@media (max-width: 640px) {
  .card { padding: 16px 16px; }
  .section-head { margin: 28px 0 12px; }
  .lead { font-size: 15px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { padding-top: 8px; }
  .page-head { padding: 22px 0 16px; }
  .table-fin { table-layout: auto; }
  .table-fin colgroup { display: none; }
  .table-fin th.r, .table-fin td.r { text-align: left; }
  .prov-forms .form-grid { grid-template-columns: 1fr; }
  .roles { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .page-head h1 { font-size: 30px; } .section-head h2 { font-size: 23px; } .card { padding: 14px; } .actions .btn { flex: 1 1 auto; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* v4.2: shared-database banner shown while the server holds nothing yet */
.notice.server-empty { margin: 0 0 18px; border-left: 4px solid var(--accent); }
.notice.server-empty a { font-weight: 600; text-decoration: underline; margin-left: 4px; }
.diff-list li { padding: 6px 0; border-bottom: 1px solid var(--line, #E6E2D8); }
.diff-list .tag { margin-right: 6px; }
h4.diff-added { color: var(--positive, #4A6B43); }
h4.diff-changed { color: var(--gold, #A8843E); }
h4.diff-removed { color: var(--negative, #8B2331); }

/* v4.2: compact language menu (one line showing the chosen language; the list opens on tap) */
.lang-menu { position: relative; }
.lang-current {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 0 12px;
  background: transparent; color: var(--cockpit-muted); border: 1px solid var(--cockpit-line); border-radius: 4px;
  font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; text-align: left;
}
.lang-current:hover, .lang-menu.open .lang-current { color: #fff; border-color: var(--accent); }
.lang-chev { font-size: 11px; opacity: 0.8; transition: transform 0.15s; }
.lang-menu.open .lang-chev { transform: rotate(180deg); }
.lang-list {
  display: none; position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); z-index: 30;
  background: var(--cockpit-2); border: 1px solid var(--cockpit-line); border-radius: 4px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.lang-menu.open .lang-list { display: block; }
.lang-item {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 0 12px;
  background: transparent; color: var(--cockpit-muted); border: 0; border-bottom: 1px solid var(--cockpit-line);
  font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; cursor: pointer; text-align: left;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.lang-item:last-child { border-bottom: 0; }
.lang-item:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.lang-item.active { color: #fff; }
.lang-item.active::after { content: "✓"; color: var(--accent); font-size: 14px; }

/* topbar variant (light background, list opens downwards) */
.lang-menu-top { min-width: 120px; }
.lang-menu-top .lang-current { min-height: 40px; color: var(--muted); border-color: var(--line); font-size: 12px; padding: 0 10px; }
.lang-menu-top .lang-current:hover, .lang-menu-top.open .lang-current { color: var(--ink); border-color: var(--accent); }
.lang-menu-top .lang-list { top: calc(100% + 4px); bottom: auto; background: #fff; border-color: var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.lang-menu-top .lang-item { color: var(--muted); border-color: var(--line); }
.lang-menu-top .lang-item:hover { color: var(--ink); background: #F6F7F9; }
.lang-menu-top .lang-item.active { color: var(--ink); }

/* sign-in screen: full language names, the chosen one is the site language */
.gate-lang { margin-top: 20px; }
.gate-lang .small { margin-bottom: 8px; text-align: center; }
.gate-card .lang-buttons { flex-wrap: wrap; }
.gate-card .lang-btn { flex: 1 1 45%; min-height: 44px; font-size: 13px; letter-spacing: 0.02em; }

/* v4.2: sign-in screen on phones. No address in the public space; a steadier, more compact card. */
body[data-gate="1"] .page-foot { display: none !important; }
body[data-gate="1"] .main { min-height: 100vh; }
.gate { min-height: 100vh; }
@supports (min-height: 100dvh) {
  body[data-gate="1"] .shell, body[data-gate="1"] .main, .gate { min-height: 100dvh; }
}
.gate-card .field input { width: 100%; box-sizing: border-box; }
@media (max-width: 640px) {
  /* top-aligned: the card does not re-centre when the browser bar collapses */
  .gate { align-items: flex-start; padding: max(16px, env(safe-area-inset-top)) 12px max(24px, env(safe-area-inset-bottom)); }
  .gate-card { max-width: none; padding: 20px 18px 18px; border-radius: 12px; }
  .gate-card .kicker { font-size: 11px; }
  .gate-card h1 { font-size: 22px; margin: 4px 0 6px; }
  .gate-card .lead { font-size: 14px; line-height: 1.45; margin-bottom: 12px; }
  .gate-card .field { margin-bottom: 10px; }
  .gate-card .field input, .gate-card .field label { font-size: 16px; } /* 16px: iOS does not zoom on focus */
  .gate-card .btn { width: 100%; box-sizing: border-box; }
  .gate-card .small.muted { font-size: 13px; line-height: 1.4; }
  .gate-lang { margin-top: 14px; }
  .gate-card .lang-btn { min-height: 42px; font-size: 13px; }
}

/* v4.2: phones. No zoom on focus anywhere; the language menu fits the top bar. */
@media (max-width: 1024px), (max-height: 520px) {
  .field input, .field select, .field textarea, .rail-search input { font-size: 16px; }
  .lang-menu-top { min-width: 0; }
  .lang-menu-top .lang-current { max-width: 38vw; }
  .lang-current-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.group-box { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.group-box h4 { margin: 0 0 4px; }
.group-code { font-size: 26px; letter-spacing: 0.12em; font-weight: 600; margin: 4px 0 2px; }
.install-card { margin-top: 12px; }
.install-card .row { align-items: center; gap: 12px; }
.srvlog li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); }
.srvlog li .mono.small { color: var(--muted); min-width: 118px; }
.preview-card { max-width: 560px; }
.preview-card .list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.privacy { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.privacy summary { cursor: pointer; list-style: none; line-height: 1.5; }
.privacy summary::-webkit-details-marker { display: none; }
.privacy-more { color: var(--accent); white-space: nowrap; }
.privacy-body { margin-top: 8px; padding: 10px 12px; background: var(--panel, rgba(0,0,0,0.03)); border-radius: 8px; }
.privacy-body p { margin: 0 0 8px; }
.privacy-body p:last-child { margin-bottom: 0; }

/* ============ rapport imprimable ============ */
.report-actions { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; flex-wrap: wrap; }
.printdoc { background: #fff; color: #16181d; max-width: 760px; padding: 28px 32px; border: 1px solid var(--line); border-radius: 10px; }
.printdoc .pd-kicker { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; color: #6b7280; }
.printdoc h1 { font-size: 26px; margin: 2px 0 2px; color: #16181d; }
.printdoc .pd-sub { color: #4b5563; }
.printdoc .pd-meta { margin-top: 6px; font-size: 12px; color: #6b7280; }
.pd-sec { margin-top: 22px; break-inside: auto; }
.pd-sec h2 { font-size: 15px; border-bottom: 2px solid #16181d; padding-bottom: 4px; margin-bottom: 8px; color: #16181d; }
.pd-lead { font-size: 13.5px; line-height: 1.55; margin: 6px 0; }
.pd-ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; }
.pd-ul li { margin: 2px 0; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pd-table th { text-align: left; font-weight: 600; border-bottom: 1px solid #9ca3af; padding: 4px 6px 4px 0; color: #374151; }
.pd-table td { border-bottom: 1px solid #e5e7eb; padding: 5px 6px 5px 0; vertical-align: top; }
.pd-table tr { break-inside: avoid; }
.pd-small { font-size: 11px; color: #6b7280; margin-top: 1px; }
.pd-badge { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 7px; border-radius: 9px; border: 1px solid; white-space: nowrap; }
.pd-ok { color: #166534; border-color: #166534; }
.pd-attention { color: #92400e; border-color: #92400e; }
.pd-critical { color: #991b1b; border-color: #991b1b; }
.pd-unknown { color: #6b7280; border-color: #9ca3af; }
.pd-sev-high td:first-child { border-left: 3px solid #991b1b; padding-left: 7px; }
.pd-current td { font-weight: 600; }
.pd-foot { margin-top: 24px; padding-top: 8px; border-top: 1px solid #e5e7eb; font-size: 10.5px; color: #6b7280; }
@media print {
  @page { size: A4; margin: 13mm 12mm; }
  body { background: #fff !important; }
  .rail, .topbar, .tabbar, .today-strip, .report-actions, .no-print, .page-head, .notice, .page-foot { display: none !important; }
  .main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .printdoc { border: 0; border-radius: 0; padding: 0; max-width: none; }
  .pd-sec h2 { break-after: avoid; }
}
.pd-h3 { font-size: 13px; margin: 10px 0 2px; color: #16181d; break-after: avoid; }
/* demande d'accès */
.join-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.join-consent { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 4px; font-size: 0.9em; line-height: 1.4; cursor: pointer; }
.join-consent input { width: 22px; height: 22px; min-width: 22px; margin: 1px 0 0; }
.join-link { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.join-link .actions { margin-top: 8px; }
.join-link .btn { width: 100%; box-sizing: border-box; justify-content: center; text-align: center; min-height: 44px; }
.join-box { margin-bottom: 14px; }
.join-box .list li { padding: 10px 0; }
.join-msg { margin: 6px 0 2px; padding: 6px 10px; border-left: 2px solid var(--line); white-space: pre-wrap; }
.join-share { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.gate-card .field textarea { width: 100%; box-sizing: border-box; font: inherit; }
/* page d'entrée: deux blocs */
.gate-card-wide { max-width: 480px; }
.gate-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.gate-block h2 { font-size: 18px; margin: 0 0 6px; }
.gate-block > p.small { margin: 0 0 10px; }
.gate-new { background: var(--bg-soft, #F5F6F8); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 16px; margin-top: 14px; }
.gate-steps { margin: 6px 0 12px; padding-left: 22px; font-size: 14px; line-height: 1.45; }
.gate-steps li { margin: 4px 0; }
.gate-steps li::marker { color: var(--accent); font-weight: 700; }
.gate-card .gate-new .btn, .gate-block .btn { min-height: 44px; }
.gate-card .btn-accent { width: 100%; box-sizing: border-box; justify-content: center; text-align: center; }
/* boîte du conseil */
.mail-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.mail-bar .grow { flex: 1 1 auto; }
.mail-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 18px; margin: 0 0 12px; }
.mail-kv .mono { word-break: break-all; }
.tag-ok { color: #2f6b3a; border-color: #9cc7a5; background: #eef7f0; }
.tag-bad { color: #9a2b2b; border-color: #e3aaaa; background: #fbefef; }

/* conseil seulement */
.tag-aud { color: #7a4b00; border-color: #e2c48a; background: #fbf3e2; }
.aud-btn.on { color: #7a4b00; border-color: #e2c48a; background: #fbf3e2; }
.diff-list li.diff-aud { display: flex; gap: 10px; align-items: flex-start; }
.diff-list li.diff-aud label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; color: var(--muted); cursor: pointer; min-height: 24px; }
.diff-list li.diff-aud input { width: 18px; height: 18px; margin: 0; }
.diff-list li.diff-aud.on { background: #fbf3e2; border-radius: 6px; padding-left: 6px; }
.diff-list li.diff-aud.on .aud-lbl { color: #7a4b00; font-weight: 600; }
.aud-lead .actions { flex-wrap: wrap; }
/* synchronisation automatique */
.pub-pill.sync-busy { background: #5C6573; }
.pub-pill.sync-err { background: #9a2b2b; }
.pub-pill.sync-hold { background: #A8843E; }
.an-council { margin: 14px 0 4px; }
.diff-aud-h { margin-top: 14px; }
/* indicateur de sauvegarde */
.pub-pill.sync-ok { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.pub-pill.sync-ok:hover { background: transparent; }
/* rapport pour l'assemblée: fiches par dossier */
.pd-prio { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 7px; border-radius: 9px; white-space: nowrap; color: #fff; }
.pd-prio-urgent { background: #991b1b; }
.pd-prio-important { background: #b45309; }
.pd-prio-watch { background: #6b7280; }
.pd-overview td { vertical-align: middle; }
.pd-ov-urgent td:first-child { border-left: 3px solid #991b1b; padding-left: 7px; }
.pd-ov-important td:first-child { border-left: 3px solid #b45309; padding-left: 7px; }
.pd-fiche { margin: 14px 0 0; padding: 10px 0 8px; border-top: 1px solid #d1d5db; }
.pd-fiche-h { font-size: 14.5px; margin: 0 0 2px; color: #16181d; break-after: avoid; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pd-rank { display: inline-block; min-width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 11px; background: #16181d; color: #fff; font-size: 12px; font-weight: 700; }
.pd-fiche-urgent .pd-rank { background: #991b1b; }
.pd-fiche-important .pd-rank { background: #b45309; }
.pd-next { margin: 6px 0 4px; padding: 6px 10px; background: #f3f4f6; border-left: 3px solid #16181d; font-size: 12.5px; line-height: 1.45; break-inside: avoid; }
.pd-fiche-urgent .pd-next { border-left-color: #991b1b; }
.pd-row { display: grid; grid-template-columns: 118px 1fr; gap: 4px 10px; margin: 5px 0; font-size: 12.5px; line-height: 1.45; break-inside: avoid; }
.pd-lbl { color: #4b5563; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.03em; padding-top: 1px; }
.pd-val { min-width: 0; }
.pd-val .pd-ul { margin: 0; padding-left: 16px; font-size: 12.5px; }
.pd-val .pd-ul li { margin: 1px 0; }
.pd-items { list-style: none; padding-left: 0 !important; }
.pd-items li { padding-left: 0; }
.pd-sev { display: inline-block; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 0 5px; border-radius: 3px; border: 1px solid; vertical-align: 1px; }
.pd-sev-high { color: #991b1b; border-color: #991b1b; }
.pd-sev-medium { color: #92400e; border-color: #92400e; }
.pd-sev-low { color: #6b7280; border-color: #9ca3af; }
.pd-small-inline { font-size: 11px; color: #6b7280; }
.pd-days { color: #6b7280; font-size: 11px; }
.pd-date { display: inline-block; min-width: 76px; color: #374151; font-variant-numeric: tabular-nums; }
.pd-ref { font-size: 10.5px; color: #6b7280; border: 1px solid #d1d5db; border-radius: 3px; padding: 0 4px; }
.pd-xp { font-size: 10.5px; font-weight: 600; color: #374151; border: 1px solid #d1d5db; border-radius: 3px; padding: 0 4px; }
@media print {
  .pd-fiche { break-inside: auto; }
  .pd-sec-fiches h2 { break-after: avoid; }
}
@media (max-width: 560px) { .pd-row { grid-template-columns: 1fr; gap: 1px 0; } }
/* rapport v4.5: décisions, attentes, suivi AG, indicateurs */
.pd-dup { font-size: 10.5px; font-weight: 700; color: #6b7280; border: 1px solid #d1d5db; border-radius: 9px; padding: 0 5px; }
.pd-ag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #1e3a8a; border: 1px solid #1e3a8a; border-radius: 3px; padding: 0 5px; }
.pd-late { font-size: 11px; color: #991b1b; font-weight: 600; }
.pd-kpis { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.pd-kpi { flex: 1 1 140px; border: 1px solid #e5e7eb; border-radius: 6px; padding: 6px 10px; break-inside: avoid; }
.pd-kpi-l { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; }
.pd-kpi-v { font-size: 15px; font-weight: 700; color: #16181d; font-variant-numeric: tabular-nums; }
.pd-kpi-d { font-size: 11px; font-weight: 600; color: #6b7280; }
.pd-kpi-d.up { color: #991b1b; }
.pd-exec { font-size: 11px; font-weight: 600; }
.pd-exec-done { color: #166534; }
.pd-exec-in_progress { color: #92400e; }
.pd-exec-todo { color: #991b1b; }
.pd-exec-na { color: #9ca3af; }
.pd-res-adopted { color: #166534; border-color: #166534; }
.pd-res-rejected { color: #991b1b; border-color: #991b1b; }
.pd-res-info { color: #6b7280; border-color: #9ca3af; }
.pd-owner-table td:first-child { width: auto; }
.pd-ag-table td:nth-child(2) { font-weight: 500; }
.pd-contracts-share { margin-top: 10px; }
.pd-short-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; min-height: 44px; cursor: pointer; }
.pd-short-toggle input { width: 18px; height: 18px; margin: 0; }
.ag-btn.on { color: #1e3a8a; border-color: #93a5d6; background: #e8edf9; }
.tag-ag { color: #1e3a8a; border-color: #93a5d6; background: #e8edf9; }

/* v4.6: demandes, courrier composé, juriste, base juridique */
.tiles-4 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ref { font-family: var(--mono); font-size: 12px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg); margin-right: 6px; vertical-align: middle; }
.tag-level { background: var(--bg); }
.tag-level-relance { color: #7a4b00; border-color: #e2b56b; background: #fbf1df; }
.tag-level-lrar { color: #7a1f1f; border-color: #d99a9a; background: #fae7e7; }
.tag-level-mise_en_demeure { color: #fff; border-color: #8b2331; background: #8b2331; }
.tag-ok { color: #1f5f3a; border-color: #8fc9a8; background: #e5f5ec; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lchip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink); font-size: 13px; cursor: pointer; }
.lchip.selected { border-color: var(--accent); color: var(--accent); background: var(--bg); }
.law-list .item-title a { text-decoration: none; border-bottom: 1px dotted var(--muted); }
.law-quote { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--gold, #A8843E); background: var(--bg); font-size: 13px; line-height: 1.45; }
.law-text { margin-top: 8px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; font-size: 13px; line-height: 1.5; white-space: normal; max-height: 60vh; overflow: auto; }
.jur-answer .kicker { margin-top: 12px; }
.jur-main { font-size: 15px; line-height: 1.5; margin: 6px 0 0; }
.jur-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
ul.plain { margin: 6px 0 0; padding-left: 18px; }
ul.plain li { margin: 3px 0; }
/* courrier sortant (4.7) */
.ob-list > li.ob-card { padding: 14px 0; border-bottom: 1px solid var(--line); }
.ob-list > li.ob-card:last-child { border-bottom: 0; }
.ob-dossier { margin-top: 10px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: 4px; font-size: 14px; }
.ob-dossier .kicker { margin-bottom: 4px; }
.ob-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 4px 0; }
.ob-k { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); min-width: 92px; }
.ob-k-block { display: block; margin: 10px 0 2px; }
.ob-why { margin: 6px 0; font-weight: 500; }
.ob-msgs { margin-top: 4px; }
.ob-msgs .msg { padding: 8px 10px; margin: 6px 0; font-size: 13.5px; }
.ob-points { margin: 2px 0 0; padding-left: 18px; }
.ob-points li { margin: 2px 0; }
.ob-note { margin-top: 8px; }
.ob-quote { color: var(--ink-2); }
.ob-rcpt { margin-top: 8px; word-break: break-word; }
.ob-edit { margin-top: 8px; }
.ob-edit > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--accent-deep); font-weight: 500; }
.ob-edit .field input { width: 100%; }
.ob-edit textarea.letter { min-height: 300px; }
.ob-actions { margin-top: 10px; flex-wrap: wrap; align-items: center; }
.ob-return { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.ob-return .field input, .ob-bulk .field input, .ob-new select { width: 100%; }
.ob-admin > summary { cursor: pointer; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ob-corr-list { margin: 6px 0; }
.tag-wait { color: #7a4b00; border-color: #e2b56b; background: #fbf1df; }
.ob-danger { background: #8b2331; border-color: #8b2331; color: #fff; }
.ob-edit [readonly] { background: var(--bg); color: var(--ink-2); }
body[data-role="resident"] a[data-section="envoi"], body[data-role="concierge"] a[data-section="envoi"] { display: none; }
/* outil courrier (4.8) */
.mail-intro { margin: 10px 0 12px; }
.mail-filters { margin: 4px 0 12px; }
.case-list > li.case-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.case-list > li.case-row:last-child { border-bottom: 0; }
.case-row .item-title a { text-decoration: none; font-weight: 600; }
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; margin-top: 8px; font-size: 14px; }
.case-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.case-step { font-weight: 500; }
.case-step-escalate, .case-step-ag { color: #8b2331; }
.case-step-write { color: var(--accent-deep); }
.case-step-validation, .case-step-draft { color: #7a4b00; }
.mcase-head .case-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 8px; }
.mcase-head .case-now strong { font-size: 16px; }
.mcase-head .case-now .ob-k { min-width: 120px; }
.case-thread { margin-bottom: 12px; }
.who-list > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.who-list > li:last-child { border-bottom: 0; }
.who-best { border-left: 3px solid var(--ok, #2e7d4f); padding-left: 10px !important; }
.law-rules > li, .law-list > li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.law-rules > li:last-child, .law-list > li:last-child { border-bottom: 0; }
.var-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.var-card { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.var-card.var-picked { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.var-preview { white-space: pre-wrap; font-family: var(--mono); font-size: 12px; line-height: 1.45; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; max-height: 320px; overflow: auto; margin: 8px 0; flex: 1; }
.var-editor .field input { width: 100%; }
.var-editor textarea.letter { min-height: 360px; }
@media (max-width: 1100px) { .var-grid { grid-template-columns: 1fr; } .var-preview { max-height: 220px; } }
@media (max-width: 640px) { .case-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .ob-k { min-width: 0; width: 100%; } .ob-edit textarea.letter { min-height: 240px; } }
.send-box .field input { width: 100%; }
@media (max-width: 600px) { .jur-grid { grid-template-columns: 1fr; } .tiles-4 { grid-template-columns: 1fr 1fr; } }

/* 4.8.1: la fonction d'abord, les données dessous */
.mail-compose { margin: 0 0 14px; }
.mail-compose-row { align-items: flex-end; flex-wrap: wrap; }
.mail-compose-row .field { margin: 0; min-width: 220px; }
.mail-compose-row .btn { min-height: 44px; }
.mail-compose .hint { margin-top: 6px; }
.case-row-top { align-items: flex-start; }
.case-row-top .btn { flex: 0 0 auto; }
.ob-card .ob-actions { margin: 8px 0 4px; }
.ob-card .ob-rcpt { margin-top: 4px; }
.form-panel { margin: 0 0 12px; }
.form-panel > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; list-style: none; }
.form-panel > summary::-webkit-details-marker { display: none; }
.form-panel > summary::before { content: '+'; display: inline-block; width: 1.2em; font-weight: 700; color: var(--accent); }
.form-panel[open] > summary::before { content: '−'; }
@media (max-width: 640px) { .mail-compose-row .btn { width: 100%; } .case-row-top { flex-wrap: wrap; } }

/* 4.9: repères juridiques: une ligne sous chaque point ouvert, le détail replié; le repère du dossier en tête du courrier */
.hint { margin-top: 6px; }
.hint-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.hint-ic { width: 16px; height: 16px; flex: 0 0 16px; color: var(--accent-deep); align-self: center; }
.hint-who { font-family: var(--display); font-weight: 600; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-deep); white-space: nowrap; }
.hint-ask { flex: 1 1 220px; min-width: 0; }
.hint-more { margin-top: 2px; font-size: 13px; }
.hint-more summary { cursor: pointer; color: var(--accent-deep); font-size: 13px; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; gap: 4px; list-style: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.hint-more summary::-webkit-details-marker { display: none; }
.hint-more summary::before { content: '›'; font-size: 16px; line-height: 1; transition: transform 0.15s; }
.hint-more[open] summary::before { transform: rotate(90deg); }
.hint-actions { margin: 0 0 8px; flex-wrap: wrap; }
.hint-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 13.5px; line-height: 1.45; }
.hint-dl dt { font-family: var(--display); font-weight: 600; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.hint-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.hint-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.hint-case { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--bg); padding: 10px 12px; margin: 0 0 14px; }
.card > .hint-case:first-child { margin-top: 0; }
.hint-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.hint-bar { padding: 10px 14px; }
.hint-bar .row { align-items: center; gap: 10px; }
.case-grid > .case-hint { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .hint-dl { grid-template-columns: 1fr; gap: 0; }
  .hint-dl dt { padding-top: 8px; }
  .hint-bar .row { flex-wrap: wrap; }
}

/* ================= 5.0: nouvelle charte, tâches, monde 3D ================= */
body { font-size: 15.5px; letter-spacing: 0.005em; }
h1, h2, h3, .page-head h1, .section-head h2, .card h3, .review-block h4 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.005em; }
.page-head h1 { font-size: 42px; line-height: 1.05; }
.page-head .lead { font-size: 15.5px; }
.section-head { border-bottom: 1px solid var(--line-strong); }
.section-head h2 { font-size: 27px; }
.section-head a, .kicker-link:hover { color: var(--accent); }
.kicker { font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: 0.16em; color: var(--gold); }
.card { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 4px; box-shadow: 0 1px 0 rgba(26, 34, 56, 0.03); }
.card.empty, .card.mail-compose { border-left-color: var(--line-strong); }
.card h3 { font-size: 22px; }
.btn { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.01em; border-radius: 3px; background: var(--ink); border-color: var(--ink); }
.btn:hover { background: #222C4A; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(26, 34, 56, 0.05); border-color: var(--ink-2); }
.btn-accent { background: var(--accent); color: #FFF8F0; }
.btn-accent:hover { background: var(--accent-deep); }
.btn-small { font-size: 13px; min-height: 36px; }
.field label { font-family: var(--display); font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.field input[type="text"], .field input[type="date"], .field input[type="password"], .field input[type="url"], .field input[type="email"], .field input[type="tel"], .field input[type="number"], .field select, .field textarea, .select-inline { background: var(--paper); border-color: var(--line-strong); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); outline: 2px solid rgba(168, 132, 62, 0.25); outline-offset: 0; }
.badge, .tile, .dropzone, .notice, .banner { background: var(--paper); }
.dropzone.over { background: #F8EFE6; }
.tabs a { font-family: var(--display); font-weight: 700; font-size: 15px; }
.tabs a.active { border-bottom-color: var(--accent); }
.tabs .count, .rail-nav .count { color: var(--gold); }
.tag { border-color: var(--line-strong); color: var(--ink-2); background: rgba(255, 253, 248, 0.6); }
.dot { border-radius: 1px; }
.lchip { border-color: var(--line-strong); background: var(--paper); }
.lchip.selected { border-color: var(--accent); color: var(--accent); }
a.lchip { text-decoration: none; display: inline-flex; align-items: center; min-height: 36px; }
.lchip-alert { border-color: var(--crit); color: var(--crit); }
.table th { font-family: var(--display); font-weight: 700; color: var(--muted); }
.kv dt { font-family: var(--display); font-weight: 700; color: var(--muted); }
/* menu: bleu nuit, titres en Cormorant, filets d'or */
.shell { background: linear-gradient(90deg, var(--cockpit) 0, var(--cockpit) var(--rail-w), var(--bg) var(--rail-w)); }
.rail-brand { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: 0.01em; text-transform: none; color: #FBF6EC; }
.rail-sub { font-family: var(--display); font-weight: 600; letter-spacing: 0.14em; color: var(--gold); }
.rail-brand::after { content: "\25C6  \25C6  \25C6"; display: block; font-family: var(--sans); font-size: 7px; letter-spacing: 0.3em; color: var(--gold); margin: 4px 0 2px; opacity: 0.9; }
.rail-group-label { font-family: var(--display); font-weight: 700; letter-spacing: 0.16em; color: var(--gold); opacity: 0.85; }
.rail-nav a { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: 0.01em; text-transform: none; color: #C3C7D6; }
.rail-nav a.active { color: #FBF6EC; border-left-color: var(--gold); background: rgba(244, 239, 229, 0.06); }
.rail-search input { background: var(--cockpit-2); border-color: var(--cockpit-line); }
.rail-cluster .cl { background: var(--cockpit-2); border-color: var(--cockpit-line); }
.rail-cluster:hover .cl { border-color: var(--gold); }
.world-toggle { min-height: 40px; border: 1px solid var(--cockpit-line); border-radius: 3px; background: transparent; color: var(--cockpit-text); font-family: var(--display); font-weight: 600; font-size: 13px; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.world-toggle:hover { border-color: var(--gold); }
.topbar .brand { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: 0.01em; text-transform: none; }
.tab { font-family: var(--display); font-weight: 600; text-transform: none; font-size: 11.5px; }
.tab.active svg { color: var(--gold); }
.cockpit { border-radius: 4px; }
@media (max-width: 1024px), (max-height: 520px) { .shell { background: var(--bg); } }
body[data-role="resident"] a[data-section="taches"], body[data-role="concierge"] a[data-section="taches"] { display: none; }

/* ---------- tâches ---------- */
.main { container-type: inline-size; }
.task-new { margin-bottom: 14px; }
.task-new-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.task-filters { margin: 0 0 14px; }
.task-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.task-col { background: rgba(26, 34, 56, 0.03); border: 1px solid var(--line); border-radius: 4px; padding: 10px; min-height: 140px; }
.task-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); padding: 2px 4px 9px; margin-bottom: 10px; border-bottom: 2px solid var(--line-strong); }
.task-col-head .count { font-family: var(--mono); letter-spacing: 0; color: var(--muted); }
.task-col-doing .task-col-head { border-bottom-color: var(--gold); }
.task-col-waiting .task-col-head { border-bottom-color: var(--accent); }
.task-col-done .task-col-head { border-bottom-color: var(--ok); }
.task-empty { margin: 4px 4px 8px; }
.task-card { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: 4px; padding: 10px 12px 4px; margin-bottom: 10px; }
.task-card.task-doing { border-left-color: var(--gold); }
.task-card.task-waiting { border-left-color: var(--accent); }
.task-card.task-done { border-left-color: var(--ok); opacity: 0.82; }
.task-card.task-late { box-shadow: inset 0 0 0 1px rgba(163, 40, 58, 0.55); }
.task-card.task-flash { animation: task-flash 1.8s ease-out; }
@keyframes task-flash { 0% { box-shadow: 0 0 0 3px rgba(168, 132, 62, 0.65); } 100% { box-shadow: 0 0 0 0 rgba(168, 132, 62, 0); } }
.task-title { font-weight: 700; line-height: 1.35; margin-bottom: 8px; overflow-wrap: anywhere; }
.task-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.task-card .item-meta { gap: 6px 8px; }
.task-who { font-size: 13px; }
.task-src { margin-top: 6px; }
.task-edit { margin-top: 2px; }
.task-edit summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; min-height: 40px; display: inline-flex; align-items: center; list-style: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.task-edit summary::-webkit-details-marker { display: none; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); font-family: var(--display); font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; flex: 0 0 auto; }
.task-link { white-space: nowrap; }
.my-tasks .btn { flex: 0 0 auto; }
@container (max-width: 980px) { .task-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 560px) { .task-board { grid-template-columns: 1fr; } .task-new-row { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .task-board { grid-template-columns: 1fr; } .task-new-row { grid-template-columns: 1fr; } }

/* ---------- monde 3D ---------- */
#world { position: fixed; inset: 0; z-index: 1; overflow: hidden; background: radial-gradient(120% 90% at 22% 18%, #FBF7EE 0%, #F4EFE5 45%, #EAE1CF 100%); }
.world-canvas { position: absolute; left: 0; top: 0; display: block; cursor: grab; touch-action: none; }
.world-css { position: fixed !important; left: 0; top: 0; z-index: 30; pointer-events: none; }
.world-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.world-label { position: absolute; left: 0; top: 0; display: none; align-items: center; gap: 6px; max-width: 190px; min-height: 30px; padding: 4px 10px 4px 8px; border: 1px solid var(--line-strong); border-radius: 15px; background: rgba(255, 253, 248, 0.94); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 12.5px; line-height: 1.1; white-space: nowrap; box-shadow: 0 4px 14px rgba(26, 34, 56, 0.16); cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.world-label.wl-on { display: inline-flex; }
.world-label.wl-focus { border-color: var(--ink); background: #FFFDF8; z-index: 2; }
.world-label .wl-name { overflow: hidden; text-overflow: ellipsis; }
.world-label .wl-dot { width: 9px; height: 9px; border-radius: 1px; transform: rotate(45deg); background: var(--none); flex: 0 0 auto; }
.world-label.wl-ok .wl-dot { background: var(--ok); } .world-label.wl-attention .wl-dot { background: var(--warn); } .world-label.wl-critical .wl-dot { background: var(--crit); }
.world-label .wl-n { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.world-hud { position: absolute; z-index: 2; pointer-events: none; padding: 26px 26px 0; color: var(--ink); }
.wh-kicker { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.wh-title { font-family: var(--serif); font-weight: 600; font-size: 46px; line-height: 1; margin-top: 6px; }
.wh-title::after { content: "\25C6  \25C6  \25C6"; display: block; font-family: var(--sans); font-size: 8px; letter-spacing: 0.32em; color: var(--gold); margin-top: 10px; }
.wh-addr { font-size: 13px; color: var(--muted); margin-top: 8px; }
.wh-counts { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 14px; font-size: 13px; font-weight: 600; }
.wh-c { display: inline-flex; align-items: center; gap: 6px; }
.wh-c i { display: inline-block; width: 9px; height: 9px; border-radius: 1px; transform: rotate(45deg); background: var(--none); }
.wh-ok i { background: var(--ok); } .wh-attention i { background: var(--warn); } .wh-critical i { background: var(--crit); }
.wh-tasks { color: var(--ink-2); }
.wh-hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.wh-src { font-size: 11px; color: var(--muted); margin-top: 3px; letter-spacing: 0.02em; }
/* 5.0.1: noms des rues et boussole du plan réel */
.world-street { position: absolute; left: 0; top: 0; display: none; font-family: var(--display); font-weight: 700; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(26, 34, 56, 0.46); white-space: nowrap; pointer-events: none; text-shadow: 0 0 3px var(--bg), 0 0 6px var(--bg); }
.world-street.ws-on { display: block; }
.world-compass { position: absolute; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: rgba(251, 248, 241, 0.86); border: 1px solid rgba(168, 132, 62, 0.55); box-shadow: 0 2px 8px rgba(26, 34, 56, 0.12); pointer-events: none; }
.world-compass b { position: absolute; inset: 0; display: block; transform-origin: 50% 50%; }
.world-compass i { position: absolute; left: 50%; top: 13px; width: 0; height: 0; margin-left: -4px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 13px solid var(--accent); }
.world-compass i::after { content: ""; position: absolute; left: -4px; top: 13px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 9px solid rgba(26, 34, 56, 0.28); }
.world-compass span { position: absolute; left: 0; right: 0; top: 1px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 9px; line-height: 12px; color: var(--ink); }
#world-strip .world-compass { left: auto; top: auto; right: 10px; bottom: 10px; width: 34px; height: 34px; }
#world-strip .world-compass i { top: 11px; border-bottom-width: 11px; }
#world-strip .world-compass i::after { top: 11px; border-top-width: 7px; }
/* grand écran: la page flotte à droite de la scène */
body.world-desk { overflow: hidden; background: #F4EFE5; }
body.world-desk .shell { display: block; background: none; min-height: 0; }
body.world-desk .rail { position: fixed; left: 0; top: 0; width: var(--rail-w); height: 100vh; z-index: 40; background: rgba(26, 34, 56, 0.96); box-shadow: 8px 0 30px rgba(26, 34, 56, 0.18); }
body.world-desk .main { position: fixed; z-index: 30; top: var(--world-m, 20px); right: var(--world-m, 20px); width: var(--world-pw, 900px); height: var(--world-ph, calc(100vh - 40px)); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 34px 40px; background: var(--bg); border: 1px solid rgba(210, 196, 168, 0.9); border-radius: 12px; box-shadow: 0 30px 70px rgba(26, 34, 56, 0.22), 0 2px 6px rgba(26, 34, 56, 0.08); scrollbar-width: thin; scrollbar-color: #CFC3AB transparent; }
body.world-desk .main::-webkit-scrollbar { width: 8px; } body.world-desk .main::-webkit-scrollbar-thumb { background: #CFC3AB; border-radius: 4px; }
body.world-desk .main.in-flight { position: absolute; top: auto; right: auto; overflow: hidden; backface-visibility: hidden; }
body.world-desk .page { max-width: none; }
body.world-desk .page-head { padding-top: 26px; }
body.world-desk .tabbar, body.world-desk .topbar { display: none !important; }
body.world-on .home-cockpit { display: none; }
/* petit écran: le bâtiment en bandeau au-dessus de la page */
#world-strip { position: relative; height: 270px; margin: 12px 0 4px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 4px; overflow: hidden; background: radial-gradient(120% 120% at 30% 10%, #FBF7EE 0%, #F1EADB 70%, #E8DECA 100%); }
#world-strip.ws-hidden { display: none; }
#world-strip .world-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; cursor: grab; touch-action: pan-y; }
#world-strip .world-hud { left: 0; top: 0; padding: 12px 14px 0; }
#world-strip .wh-counts { margin-top: 0; font-size: 12px; }
#world-strip .wh-hint { font-size: 11.5px; margin-top: 4px; }
#world-strip .world-label { font-size: 12px; min-height: 30px; max-width: 150px; }
/* impression (rapport PDF): la scène 3D disparaît, la page reprend le flux normal */
@media print {
  #world, #world-strip { display: none !important; }
  body.world-desk { overflow: visible !important; background: #fff !important; }
  body.world-desk .main { position: static !important; width: auto !important; height: auto !important; overflow: visible !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; background: #fff !important; }
}
body.world-desk .main:focus { outline: none; }
/* écran de connexion: pas de scène 3D */
body[data-gate="1"] #world, body[data-gate="1"] #world-strip, body[data-gate="1"] .world-css { display: none !important; }

/* ================= 5.0.2: rien ne dépasse, tout se touche du doigt ================= */
/* les longues chaînes (adresses, liens, références) passent à la ligne au lieu d'élargir la page */
#app { overflow-wrap: break-word; }
.tag, .ref, .pd-ref, .mono, .item-foot a, .contact a, .kv dd, .entry-title, .item-title, td, code { overflow-wrap: anywhere; }
.tag { max-width: 100%; white-space: normal; vertical-align: middle; }
.page-head > div, .page-head h1, .section-head h2, .card h3 { min-width: 0; overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
img, video, canvas, iframe { max-width: 100%; }
.year { grid-template-columns: 120px minmax(0, 1fr); }
.grid > *, .case-grid > *, .task-board > *, .jur-grid > *, .form-grid > * { min-width: 0; }
.field input, .field select, .field textarea { max-width: 100%; box-sizing: border-box; }

/* écrans étroits (téléphone, et la page à côté de la scène 3D quand elle est étroite) */
@media (max-width: 640px) {
  /* points: les actions en deux colonnes égales, la dernière seule prend toute la largeur */
  .item-r { display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; justify-content: flex-start; gap: 8px; width: 100%; min-width: 0; margin-top: 4px; }
  .item-r > .btn, .item-r > a.btn { flex: 1 1 calc(50% - 4px); min-width: 0; min-height: 44px; padding: 6px 10px; white-space: normal; line-height: 1.2; text-align: center; justify-content: center; }
  .item-r > .amount { flex: 1 1 100%; font-size: 15px; }
  .item.has-toggles .tag-aud, .item.has-toggles .tag-ag { display: none; }  /* le bouton allumé dit déjà « conseil seulement » / « au vote » */
  /* lignes « texte + boutons »: les boutons passent dessous */
  .row { flex-wrap: wrap; }
  .row > .item-r, .row > .contact-actions, .row > .entry-side { flex: 1 1 100%; }
  .contact-actions { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .contact-actions > .btn { flex: 1 1 calc(50% - 4px); min-height: 44px; }
  .entry-side { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-start; }
  .entry-side > .btn { flex: 1 1 auto; min-height: 44px; }
  .task-actions > .btn { flex: 1 1 calc(50% - 3px); min-height: 44px; white-space: normal; line-height: 1.2; }
  .hint-actions > .btn, .actions > .btn, .actions > a.btn { min-height: 44px; white-space: normal; line-height: 1.2; }
  /* tous les boutons et commandes: 44 px de haut, texte à 16 px dans les champs (pas de zoom sur iPhone) */
  .btn, .btn-small, a.btn { min-height: 44px; }
  .btn-small { font-size: 14px; }
  .lchip, a.lchip, .year-jump { min-height: 40px; font-size: 14px; }
  .item-more summary, details > summary, .paste summary { min-height: 44px; }
  .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .row > input:not([type=checkbox]):not([type=radio]) { min-height: 44px; }
  .inline-form input, .inline-form select, input.cs-step { min-height: 44px; font-size: 16px; }
  select, input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], input[type="search"], textarea { font-size: 16px; }
  /* filtres: des pastilles qui passent à la ligne au lieu d'une barre trop large */
  .seg { display: flex; flex-wrap: wrap; gap: 6px; border: 0; border-radius: 0; background: transparent; overflow: visible; align-self: stretch; }
  .seg a, .seg button { min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--panel); font-size: 14px; }
  .seg a + a, .seg button + button { border-left: 1px solid var(--line-strong); }
  .seg a.active, .seg button.active { border-color: var(--ink); background: var(--ink); }
  /* onglets: des pastilles qui passent à la ligne, rien de caché hors de l'écran */
  .tabs { flex-wrap: wrap; gap: 6px; overflow: visible; border-bottom: 0; margin: 4px 0 18px; }
  .tabs a { min-height: 40px; padding: 0 14px; margin: 0; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--panel); font-size: 14px; }
  .tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
  .tabs a.active .count { color: inherit; opacity: 0.85; }
  /* chronologie et accueil 2D: les colonnes ne s'élargissent plus au contenu */
  .year { grid-template-columns: minmax(0, 1fr); }
  .cockpit { grid-template-columns: minmax(0, 1fr); }
  .gauges { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gauge .l { white-space: normal; line-height: 1.15; }
  .cockpit-foot .chip { max-width: 100%; }
  .page-head h1 { font-size: 30px; line-height: 1.1; }
  .page-head .head-actions { width: 100%; }
  .page-head .head-actions > .btn { flex: 1 1 auto; }
  /* rapport PDF à l'écran: les tableaux défilent dans leur cadre */
  .printdoc { padding: 18px 14px; border-radius: 6px; }
  .printdoc .pd-table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .printdoc .pd-row > * { min-width: 0; }
}
/* barre du haut sur téléphone: marque, langue en deux lettres, cinq icônes, sans débordement */
@media (max-width: 1024px), (max-height: 520px) {
  .topbar > .brand { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .topbar > div { flex: 0 0 auto; gap: 2px !important; }
}
@media (max-width: 640px) {
  .topbar > .brand { font-size: 20px; }
  .lang-menu-top .lang-current { min-height: 44px; padding: 0 8px; gap: 4px; border-color: transparent; }
  .lang-menu-top .lang-current-name { font-size: 0; }
  .lang-menu-top .lang-current-name::before { content: attr(data-code); font-size: 13px; letter-spacing: 0.06em; }
  .lang-menu-top .lang-list { right: auto; left: 0; min-width: 150px; }
  .topbar .settings-link { width: 40px; height: 44px; }
}
@media (max-width: 374px) {
  .topbar > .brand { font-size: 18px; }
  .topbar .settings-link { width: 36px; }
  .lang-menu-top .lang-current { padding: 0 6px; }
}
/* calculateur de l'économie: colonnes qui passent à la ligne d'elles-mêmes (téléphone, page étroite à côté de la scène 3D) */
.calc { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.calc-out { grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); }
.kpi { min-width: 0; } .kpi .n { overflow-wrap: anywhere; }

/* ================= 5.0.3: ce qui se passe, toujours visible ================= */
.toasts { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(460px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 11px 6px 11px 14px; background: var(--ink); color: #F4EFE5; border-left: 4px solid var(--gold); border-radius: 6px; box-shadow: 0 12px 32px rgba(26, 34, 56, 0.3); font-size: 14.5px; line-height: 1.4; animation: toast-in 0.18s ease-out; }
.toast-out { opacity: 0; transform: translateY(6px); transition: opacity 0.18s, transform 0.18s; }
.toast-ok { border-left-color: #7FA874; }
.toast-error { border-left-color: #E06A72; background: #3B1820; }
.toast-info { border-left-color: var(--gold); }
.toast-ic { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink); background: #F4EFE5; }
.toast-ok .toast-ic::before { content: "\2713"; } .toast-error .toast-ic { background: #E06A72; color: #fff; } .toast-error .toast-ic::before { content: "!"; } .toast-info .toast-ic::before { content: "i"; }
.toast-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; padding-top: 1px; }
.toast-text strong { display: block; font-weight: 700; }
.toast-sub { display: block; font-size: 12.5px; color: rgba(244, 239, 229, 0.72); margin-top: 2px; font-family: var(--mono); letter-spacing: 0; }
.toast-act { flex: 0 0 auto; min-height: 36px; padding: 0 10px; margin: -6px 0; background: transparent; border: 1px solid rgba(244, 239, 229, 0.35); border-radius: 4px; color: #F1D9A6; font-family: var(--display); font-weight: 700; font-size: 13.5px; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.toast-act:hover { border-color: #F1D9A6; }
.toast-x { flex: 0 0 auto; width: 36px; height: 36px; margin: -8px 0 -8px 0; background: transparent; border: 0; color: rgba(244, 239, 229, 0.7); font-size: 20px; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.toast-x:hover { color: #fff; }
.toast-busy { border-left-color: #8FB4D9; padding-right: 14px; }
.toast-spin, .btn.is-busy::before { flex: 0 0 auto; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: vic-spin 0.8s linear infinite; }
.toast-spin { margin-top: 2px; color: #8FB4D9; }
.btn.is-busy { cursor: progress; }
.btn.is-busy::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; }
@keyframes vic-spin { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast-spin, .btn.is-busy::before { animation-duration: 2.4s !important; } }
/* téléphone: au-dessus de la barre du bas */
@media (max-width: 1024px), (max-height: 520px) { .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); } }
/* grand écran sans 3D: en bas à droite */
@media (min-width: 1025px) and (min-height: 521px) { .toasts { left: auto; right: 24px; transform: none; width: min(420px, calc(100vw - 48px)); } }
/* grand écran avec la scène 3D: en bas de la page flottante */
body.world-desk .toasts { left: auto; transform: none; right: calc(var(--world-m, 20px) + 18px); bottom: calc(var(--world-m, 20px) + 18px); width: min(420px, calc(var(--world-pw, 900px) - 36px)); }
@media print { .toasts { display: none !important; } }

/* 5.0.4: le bâtiment en photos */
.aerial-card { padding: 0; overflow: hidden; margin: 0 0 8px; }
.aerial { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); aspect-ratio: 4 / 3; background: #D9D0BE; }
.aerial img { display: block; width: 100%; height: 100%; object-fit: cover; }
.aerial-pin { position: absolute; left: 48.3%; top: 50%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px solid rgba(255, 248, 230, 0.95); border-radius: 50%; box-shadow: 0 0 0 2px rgba(139, 35, 49, 0.85); pointer-events: none; }
.aerial-card figcaption { padding: 10px 14px 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.photo-card { margin: 0; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.photo-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #E6DECD; }
.photo-card figcaption { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px 12px; font-size: 14px; line-height: 1.35; }
.photo-walk { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 18px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 13px; white-space: nowrap; }
.photo-walk:hover { border-color: var(--accent); color: var(--accent); }
.photo-src { margin-top: 14px; }
@media (max-width: 640px) { .photo-walk { min-height: 40px; } }

/* ---------- 5.1: affaires en cours, frises, tableau de bord du conseil ---------- */
body:not([data-role="council"]):not([data-role="admin"]) .nav-council { display: none !important; }
body[data-role="council"] .nav-public, body[data-role="admin"] .nav-public { display: none !important; }
.seg-3 { flex-wrap: wrap; }
/* qui a la main */
.ball { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; line-height: 1.4; }
.ball::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.ball-council { color: var(--accent); background: #F7E9EA; border-color: #EBCDD1; }
.ball-syndic { color: #7A5E22; background: #F6EFDD; border-color: var(--gold-soft); }
.ball-contractor { color: var(--ink-2); background: #E9EDF3; border-color: #D3DAE6; }
.ball-none { color: #56704F; background: #EEF3EA; border-color: #D5E2CF; }
.ball-solved { color: var(--ok); background: #E8F0E5; border-color: #CFE0C9; }
.ball-followed { color: var(--ink-2); background: #EEF0F4; border-color: #D9DEE8; }
/* la frise des affaires */
.frise-card { padding: 16px 20px 14px; }
.gantt { --g-l: 196px; position: relative; }
.gantt-one { --g-l: 0px; }
.g-head { display: grid; grid-template-columns: var(--g-l) minmax(0, 1fr); }
.g-scale { position: relative; height: 40px; border-bottom: 1px solid var(--line-strong); }
.g-month { position: absolute; top: 18px; bottom: 0; border-left: 1px solid var(--line); }
.g-month > span { position: absolute; left: 5px; bottom: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.g-jan { border-left-color: var(--line-strong); }
.g-today-label { position: absolute; top: 0; transform: translateX(-50%); font-family: var(--display); font-weight: 700; font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: #fff; background: var(--ink); padding: 1px 7px; border-radius: 3px; white-space: nowrap; z-index: 3; }
.g-today-end { transform: translateX(-100%); }
.g-today-start { transform: none; }
.g-rows { list-style: none; margin: 0; padding: 0; }
.g-row { display: grid; grid-template-columns: var(--g-l) minmax(0, 1fr); align-items: center; border-bottom: 1px solid var(--line); }
.g-row:last-child { border-bottom: 0; }
.g-label { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; min-width: 0; min-height: 52px; padding: 6px 12px 6px 0; text-decoration: none; color: var(--ink); }
.g-label:hover .g-name { text-decoration: underline; }
.g-label .dot { margin-right: 0; }
.g-name { display: inline-flex; align-items: center; gap: 7px; font-family: var(--display); font-weight: 700; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.gantt-one .g-head, .gantt-one .g-row { grid-template-columns: minmax(0, 1fr); }
.gantt-one .g-head-l { display: none; }
.g-label .ball { font-size: 10px; padding: 1px 7px; }
.g-track { position: relative; height: 34px; }
.gantt-one .g-track { height: 46px; }
.g-bar { position: absolute; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; background: var(--ink-2); opacity: 0.28; }
.g-council .g-bar { background: var(--accent); opacity: 0.4; }
.g-syndic .g-bar { background: var(--gold); opacity: 0.55; }
.g-plan { position: absolute; top: 50%; height: 0; margin-top: -1px; border-top: 2px dashed var(--line-strong); }
.g-now { position: absolute; top: -1px; bottom: -1px; width: 0; border-left: 2px solid var(--ink); opacity: 0.75; z-index: 2; }
.g-m { position: absolute; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: var(--ink-2); border: 2px solid var(--panel); box-sizing: border-box; z-index: 1; }
.gantt-one .g-m { width: 16px; height: 16px; margin: -8px 0 0 -8px; }
.g-m.k-out { background: var(--accent); }
.g-m.k-in { background: var(--ok); }
.g-m.k-event, .g-m.k-decision { background: var(--ink); border-radius: 2px; transform: rotate(45deg); }
.g-m.k-inc { background: var(--crit); border-radius: 2px; transform: rotate(45deg); }
.g-m.k-step { background: var(--gold); }
.g-m.is-future { background: var(--panel); border: 2px solid var(--gold); }
.g-m.k-reply_due, .g-m.k-escalate { background: var(--panel); border: 2px solid var(--accent); }
.g-m.is-late { background: #FBE9EB; border: 2px solid var(--crit); }
.g-m.k-escalate.is-due { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(139, 35, 49, 0.18); }
.g-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.g-legend span { display: inline-flex; align-items: center; gap: 7px; }
.g-legend .g-m { position: static; margin: 0; flex: 0 0 auto; }
.g-bar-key { display: inline-block; width: 22px; height: 6px; border-radius: 3px; background: var(--ink-2); opacity: 0.35; }
.g-plan-key { display: inline-block; width: 22px; border-top: 2px dashed var(--line-strong); }
/* les cartes d'affaires */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; margin-top: 16px; }
.mcard { min-width: 0; display: flex; flex-direction: column; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: 6px; padding: 14px 18px 16px; }
.mcard-council { border-left-color: var(--accent); }
.mcard-syndic { border-left-color: var(--gold); }
.mcard-contractor { border-left-color: var(--ink-2); }
.mcard-none, .mcard-solved { border-left-color: var(--ok); }
.mcard-followed { border-left-color: var(--ink-2); }
.mcard-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; }
.mcard-title { display: inline-flex; align-items: center; min-height: 40px; min-width: 0; font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.25; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.mcard-title:hover { color: var(--accent-deep); }
.mcard-text { margin: 0; font-size: 15px; line-height: 1.45; }
.mcard-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12.5px; color: var(--muted); }
.mcard-next { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: baseline; font-size: 13.5px; }
.mcard-next .ob-k { white-space: nowrap; }
.mcard-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
/* Signalé, En cours, Réglé */
.phase { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ph { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 20px 8px 0 0; min-width: 0; }
.ph::before { content: ""; position: absolute; top: 6px; left: 8px; right: 0; height: 2px; background: var(--line-strong); }
.ph:last-child::before { display: none; }
.ph-done::before { background: var(--ok); }
.ph-dot { position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 2px solid var(--line-strong); box-sizing: border-box; z-index: 1; }
.ph-done .ph-dot { background: var(--ok); border-color: var(--ok); }
.ph-cur .ph-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(139, 35, 49, 0.14); }
.phase .ph:last-child.ph-cur .ph-dot { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 4px rgba(74, 107, 67, 0.16); }
.ph-l { font-family: var(--display); font-weight: 700; font-size: 13px; }
.ph-cur .ph-l { color: var(--accent-deep); }
.ph-d { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.phase-compact .ph { padding-top: 18px; }
/* la page d'une affaire */
.mnow { display: flex; flex-direction: column; gap: 14px; border-left: 3px solid var(--line-strong); }
.mnow-council { border-left-color: var(--accent); }
.mnow-syndic { border-left-color: var(--gold); }
.mnow-contractor { border-left-color: var(--ink-2); }
.mnow-none, .mnow-solved { border-left-color: var(--ok); }
.mnow-followed { border-left-color: var(--ink-2); }
.mnow-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.mnow-text { margin: 0; font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.35; max-width: 720px; }
.mt-note { margin-top: 14px; }
/* le récit */
.story-card { padding: 8px 20px 14px; }
.story { list-style: none; margin: 0; padding: 0; position: relative; }
.story::before { content: ""; position: absolute; left: 93px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.story-month { position: relative; padding: 16px 0 4px 116px; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.story-month.story-future { color: var(--gold); }
.story-e { display: grid; grid-template-columns: 72px 32px minmax(0, 1fr); gap: 0 6px; align-items: start; padding: 7px 0; }
.story-date { font-family: var(--mono); font-size: 12px; color: var(--ink-2); text-align: right; padding-top: 2px; white-space: nowrap; }
.story-node { position: relative; z-index: 1; justify-self: center; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; background: var(--ink-2); border: 3px solid var(--panel); box-sizing: content-box; }
.story-e.k-out .story-node { background: var(--accent); }
.story-e.k-in .story-node { background: var(--ok); }
.story-e.k-event .story-node, .story-e.k-decision .story-node { background: var(--ink); border-radius: 3px; transform: rotate(45deg); width: 12px; height: 12px; }
.story-e.k-inc .story-node { background: var(--crit); border-radius: 3px; transform: rotate(45deg); width: 12px; height: 12px; }
.story-e.k-step .story-node { background: var(--gold); }
.story-e.is-future .story-node { background: var(--panel); border: 2px dashed var(--gold); width: 12px; height: 12px; margin-top: 4px; }
.story-e.k-escalate .story-node, .story-e.k-reply_due .story-node { background: var(--panel); border: 2px solid var(--accent); width: 12px; height: 12px; margin-top: 4px; }
.story-e.is-late .story-node { background: #FBE9EB; border: 2px solid var(--crit); width: 12px; height: 12px; margin-top: 4px; }
.story-e.k-escalate.is-due .story-node { background: var(--accent); }
.story-body { min-width: 0; }
.story-what { font-family: var(--display); font-weight: 700; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.story-e.is-future .story-what { color: var(--ink-2); }
.story-title { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.story-detail { font-size: 13.5px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.story-what .ref { white-space: nowrap; overflow-wrap: normal; }
.story-rel { font-family: var(--mono); font-size: 11.5px; font-weight: 400; color: var(--muted); }
.story-today { position: relative; margin: 14px 0 6px; padding-left: 52px; }
.story-today::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid var(--ink); }
.story-today span { position: relative; display: inline-block; background: var(--ink); color: #fff; font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase; padding: 4px 10px; border-radius: 3px; }
/* le tableau de bord */
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kpi { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 92px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--line-strong); border-radius: 6px; color: var(--ink); text-decoration: none; }
.kpi:hover { border-color: var(--line-strong); }
.kpi-n { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; }
.kpi-l { font-size: 13px; line-height: 1.3; color: var(--ink-2); }
.kpi-council { border-top-color: var(--accent); }
.kpi-council .kpi-n { color: var(--accent); }
.kpi-syndic { border-top-color: var(--gold); }
.kpi-alert { border-top-color: var(--crit); }
.kpi-alert .kpi-n { color: var(--crit); }
.dash-todo { padding: 6px 20px; }
.dash-calm { border-left: 3px solid var(--ok); }
.todo { list-style: none; margin: 0; padding: 0; }
.todo-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.todo-row:last-child { border-bottom: 0; }
.todo-n { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #F1EEE6; color: var(--ink-2); font-size: 12px; }
.todo-high .todo-n { background: var(--accent); color: #fff; }
.todo-medium .todo-n { background: var(--gold-soft); color: #6B521E; }
.todo-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.todo-text { font-weight: 600; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
.dash-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 0 20px; }
.team { padding: 6px 20px 14px; }
.team-list { list-style: none; margin: 0; padding: 0; }
.team-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.team-row .avatar { width: 32px; height: 32px; font-size: 12px; }
.avatar-free { background: #F1EEE6 !important; color: var(--muted) !important; }
.team-main { min-width: 0; }
.team-name { font-family: var(--display); font-weight: 700; }
.team-count { font-size: 13px; color: var(--ink-2); }
.team-tasks { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; }
.team-tasks li { padding: 2px 0; overflow-wrap: anywhere; }
.team-tasks a { color: var(--ink); }
.agenda { padding: 6px 20px 12px; }
.agenda-month { padding: 12px 0 4px; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.agenda-list { list-style: none; margin: 0; padding: 0; }
.agenda-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.agenda-day { font-family: var(--mono); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.agenda-main { min-width: 0; overflow-wrap: anywhere; }
.agenda-main .objchip { margin-left: 4px; vertical-align: 1px; }
.agenda-what { font-weight: 700; }
.agenda-rel { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.dash-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 32px 0 0; padding-top: 14px; border-top: 1px solid var(--line-strong); }
.dash-links a { display: inline-flex; align-items: center; min-height: 40px; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--accent-deep); text-decoration: none; }
@media (max-width: 760px) {
  .gantt { --g-l: 0px; }
  .g-head, .g-row { grid-template-columns: minmax(0, 1fr); }
  .g-row { padding: 4px 0 8px; }
  .g-label { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 4px 10px; min-height: 40px; padding: 4px 0 0; }
  .g-head-l { display: none; }
  .g-many .g-odd > span { display: none; }
}
@media (max-width: 640px) {
  .frise-card, .story-card, .dash-todo, .team, .agenda { padding-left: 14px; padding-right: 14px; }
  .story::before { left: 74px; }
  .story-e { grid-template-columns: 58px 26px minmax(0, 1fr); gap: 0 4px; }
  .story-month { padding-left: 92px; }
  .story-today { padding-left: 30px; }
  .todo-row { grid-template-columns: 28px minmax(0, 1fr); }
  .todo-row > .btn { grid-column: 2; justify-self: start; }
  .agenda-row { grid-template-columns: 54px minmax(0, 1fr); }
  .agenda-rel { grid-column: 2; }
  .mnow-text { font-size: 18px; }
  .kpi-n { font-size: 26px; }
  .kpi { min-height: 84px; }
}

/* ---------- 5.2: les sujets d'une affaire, le courrier depuis un sujet ---------- */
.sj-list { display: flex; flex-direction: column; gap: 12px; }
.sj-scale-row { display: grid; grid-template-columns: minmax(0, 1fr) 42%; gap: 0 18px; padding: 0 20px; }
.sj-scale .g-scale { border-bottom: 0; }
.sjcard { display: grid; grid-template-columns: minmax(0, 1fr) 42%; gap: 10px 18px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: 6px; padding: 14px 20px 16px; min-width: 0; }
.sj-council { border-left-color: var(--accent); }
.sj-syndic { border-left-color: var(--gold); }
.sj-contractor { border-left-color: var(--ink-2); }
.sj-none { border-left-color: var(--ok); }
.sj-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.sj-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; }
.sj-title { font-size: 17px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; min-width: 0; }
.sj-meta { margin: 0; }
.sj-text { margin: 0; font-size: 15px; line-height: 1.45; }
.sj-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sj-when { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ink-2); }
.sj-when .ob-k { margin-right: 4px; }
.sj-side { align-self: start; padding-top: 4px; }
.g-track-empty { border-top: 1px dashed var(--line); height: 0; margin-top: 17px; }
.sj-items { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 10px; }
.sj-items .kicker { margin-bottom: 4px; }
.sj-it { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sj-it:last-child { border-bottom: 0; }
.sj-it-main { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sj-it-main .item-meta { width: 100%; margin: 0; }
.sj-it-t { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.sj-it-r { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 10px; }
@media (max-width: 640px) { .sj-it { grid-template-columns: minmax(0, 1fr); } .sj-it-r { justify-content: flex-start; } .sj-link { width: 100%; } .sj-link select { max-width: none; } }
.sj-link { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; }
.sj-link select { flex: 1 1 auto; min-width: 0; max-width: 260px; min-height: 40px; text-overflow: ellipsis; }
.sj-it-r > * { max-width: 100%; }
.g-legend-wrap { padding: 0 20px; }
/* le courrier en quatre pas */
.cs-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.cs-step:first-of-type { border-top: 0; }
.cs-n { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--display); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.cs-body { min-width: 0; }
.cs-label { font-family: var(--display); font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-left-width: 3px; border-radius: 6px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.cs-chip.selected { border-color: var(--ink); background: var(--ink); color: #fff; }
.cs-chip-council { border-left-color: var(--accent); }
.cs-chip-syndic { border-left-color: var(--gold); }
.cs-chip-l { font-family: var(--display); font-weight: 700; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.cs-chip-s { font-size: 12px; opacity: 0.8; }
.cs-recall { margin-top: 12px; padding: 10px 12px; background: var(--bg); border-radius: 4px; font-size: 13.5px; }
.cs-recall ul { margin: 4px 0 0; padding-left: 18px; }
.cs-recall li { padding: 1px 0; }
.cs-pts { display: flex; flex-direction: column; gap: 4px; }
.cs-pt { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 8px; align-items: start; min-height: 40px; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.cs-pt:hover { background: #fff; }
.cs-pt input { width: 18px; height: 18px; margin: 2px 0 0; }
.cs-pt-t { font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.cs-pt-m { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.cs-more { margin-top: 6px; }
.cs-more summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-size: 13.5px; color: var(--accent-deep); font-weight: 600; }
.var-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.var-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 56px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.var-tab.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: #FFF8F6; }
.var-tab-t { font-family: var(--display); font-weight: 700; font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.var-tab-s { font-size: 12.5px; color: var(--muted); }
.var-about { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--ink-2); }
.var-addr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.var-editor textarea.letter { min-height: 420px; }
@media (max-width: 900px) {
  .sjcard, .sj-scale-row { grid-template-columns: minmax(0, 1fr); }
  .sj-scale-row > div:first-child { display: none; }
  .sj-side { padding-top: 0; }
  .var-tabs { grid-template-columns: minmax(0, 1fr); }
  .var-addr { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .sjcard { padding: 12px 14px 14px; }
  .sj-scale-row, .g-legend-wrap { padding: 0 14px; }
  .cs-step { grid-template-columns: 26px minmax(0, 1fr); gap: 0 10px; }
  .cs-n { width: 24px; height: 24px; font-size: 12px; }
  .var-editor textarea.letter { min-height: 320px; }
}

/* ---------- 5.3: l'espace des gardiens ---------- */
.gd-form summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.gd-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.gd-check input { width: 20px; height: 20px; }
.gd-follow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0 14px; padding: 4px 12px 0; border-left: 3px solid var(--gold-soft); margin: 0 0 8px; }
.gd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 16px; }
.gd-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.gd-it { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 6px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gd-late { border-left-color: var(--crit); }
.gd-it-head { display: flex; align-items: flex-start; gap: 8px; }
.gd-it-head .sev-badge { display: inline-block; flex: 0 0 auto; margin-top: 2px; }
.gd-it-t { font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.gd-it .item-meta { margin: 0; }
.gd-it-d { line-height: 1.4; overflow-wrap: anywhere; }
.gd-notes { list-style: none; margin: 0; padding: 8px 10px; background: var(--bg); border-radius: 4px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.gd-it-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; }
.gd-assign { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.gd-assign select { min-height: 40px; min-width: 0; max-width: 200px; }
.gd-note-box input { width: 100%; }
.gd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.gd-status { padding: 14px; }
.gd-obj { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--none); border-radius: 6px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gd-obj-ok { border-top-color: var(--ok); } .gd-obj-attention { border-top-color: var(--warn); } .gd-obj-critical { border-top-color: var(--crit); }
.gd-obj-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; }
.gd-obj-name { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; overflow-wrap: anywhere; min-width: 0; }
.gd-obj-st { font-size: 12.5px; color: var(--muted); }
.gd-obj-why { overflow-wrap: anywhere; }
.gd-obj-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.gd-obj-edit { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.seg button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); font-family: var(--display); font-weight: 600; font-size: 14px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button.active { background: var(--ink); color: #fff; }
.seg-st { flex-wrap: wrap; }
.gd-why { width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.gd-prem li { gap: 10px; }
.gd-prem select { min-height: 40px; }
@media (max-width: 640px) { .gd-status { padding: 10px; } .gd-it { padding: 12px 14px; } }

@media (max-width: 640px) { .sj-link select, .gd-assign select, .gd-prem select { min-height: 44px; } }

/* ---------- 5.4: traduction, demandes, point ajouté ---------- */
.tr-wrap { margin: 8px 0 4px; }
.translation-stale { border-left-color: var(--warn); background: #FBF7EC; }
.dem-box { margin: 12px 0 4px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 4px; background: var(--bg); }
.dem-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.dem-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: 4px 12px; align-items: center; }
.dem-text { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.dem-sel { min-height: 40px; min-width: 0; max-width: 100%; }
.cs-addpt { display: flex; gap: 8px; margin-top: 10px; }
.cs-addpt input { flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
@media (max-width: 700px) { .dem-row { grid-template-columns: minmax(0, 1fr); } .dem-sel { min-height: 44px; } .cs-addpt { flex-wrap: wrap; } .cs-addpt .btn { min-height: 44px; } }

/* 5.4.1: repères, une base qui se garde */
.hint-head { flex-wrap: wrap; gap: 6px 10px; }
.hint-history { margin: 8px 0 10px; padding: 8px 12px; border-left: 2px solid var(--line-strong); display: flex; flex-direction: column; gap: 8px; }
.hint-hv { font-size: 13.5px; line-height: 1.4; }
.tag-wait { color: #7A5E22; border-color: var(--gold-soft); background: #F6EFDD; }

/* 5.4.1: ce qui est parti */
.sent-card { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: 4px; background: #F7FBF8; }
.sent-fresh { box-shadow: 0 0 0 1px var(--ok) inset; }
.sent-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 6px; }
.sent-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; margin: 0 0 10px; font-size: 13.5px; }
.sent-dl dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--display); font-weight: 600; }
.sent-dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .sent-dl { grid-template-columns: minmax(0, 1fr); } .sent-dl dt { margin-top: 4px; } }

/* 5.4.2: où en est l'envoi; version visible */
.ss { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; margin: 0 0 12px; border-radius: 4px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.ss-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--none); flex: 0 0 auto; }
.ss-sent .ss-dot, .ss-sent_today .ss-dot { background: var(--ok); }
.ss-sent_today { border-color: var(--ok); background: #F7FBF8; }
.ss-submitted .ss-dot, .ss-draft .ss-dot { background: var(--warn); }
.ss-submitted, .ss-draft { background: #FBF7EC; border-color: var(--gold-soft); }
.ss-txt { min-width: 0; overflow-wrap: anywhere; }
.ss-link { margin-left: auto; color: var(--accent-deep); text-decoration: none; white-space: nowrap; min-height: 32px; display: inline-flex; align-items: center; }
.sjcard .ss { margin: 0; }
#app-version-foot { margin-top: 4px; }

/* 5.4.3: toujours en copie */
.cc-fixed { display: flex; flex-direction: column; gap: 2px; margin: -4px 0 12px; padding: 8px 10px; border-left: 3px solid var(--gold); background: var(--card, #FBF8F1); border-radius: 4px; overflow-wrap: anywhere; }
.cc-fixed-l { font-weight: 600; }

/* 5.5: les votes */
body[data-role="concierge"] a[data-section="votes"] { display: none !important; }
.vt-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.vt-card { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vt-card.vt-closed { border-left-color: var(--line-strong); }
.vt-card-title { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.vt-card-title:hover { color: var(--accent); }
.vt-k { font-weight: 600; }
.vt-k-cs { color: var(--ink); border-color: var(--ink); }
.vt-k-consult { color: var(--gold); border-color: var(--gold); }
.vt-k-ag { color: var(--accent); border-color: var(--accent); }
.vt-sum { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.vt-sum.vt-ok, .vt-out.vt-ok { color: var(--ok); }
.vt-sum.vt-ko, .vt-out.vt-ko { color: var(--crit); }
.vt-sum.vt-mid, .vt-out.vt-mid { color: var(--muted); }
.vt-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.vt-choice { min-height: 52px; min-width: 120px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 17px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; flex: 1 1 120px; }
.vt-choices-s .vt-choice { min-height: 44px; min-width: 96px; font-size: 15px; flex: 0 1 auto; }
.vt-choice:disabled { opacity: 0.5; cursor: default; }
.vt-choice.selected { color: #fff; border-color: transparent; }
.vt-choice.vt-c-pour.selected { background: var(--ok); }
.vt-choice.vt-c-contre.selected { background: var(--crit); }
.vt-choice.vt-c-abstention.selected { background: var(--none); }
.vt-choice.vt-c-opt.selected { background: var(--ink); }
.vt-check { font-size: 15px; }
.vt-frames { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; margin-bottom: 14px; }
.vt-frame { background: var(--paper); border: 1px solid var(--line); padding: 12px 14px; }
.vt-frame p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.vt-frame-k, .vt-res-k { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.vt-meta { margin: -6px 0 14px; }
.vt-frame-note { font-size: 14px; }
.vt-vote { display: flex; flex-direction: column; gap: 10px; }
.vt-bars { display: grid; gap: 8px; margin: 4px 0 10px; }
.vt-bar { display: grid; grid-template-columns: minmax(70px, 140px) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.vt-bar-l { overflow-wrap: anywhere; }
.vt-bar-track { height: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.vt-bar-fill { display: block; height: 100%; background: var(--ink); }
.vt-bar-pour .vt-bar-fill { background: var(--ok); }
.vt-bar-contre .vt-bar-fill { background: var(--crit); }
.vt-bar-abstention .vt-bar-fill { background: var(--none); }
.vt-bar-v { font-size: 13px; min-width: 3ch; text-align: right; }
.vt-res-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.vt-out { font-family: var(--display); font-weight: 700; font-size: 18px; margin: 6px 0; }
.vt-who { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.vt-who li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; min-width: 0; }
.vt-who li > span:first-child { overflow-wrap: anywhere; min-width: 0; }
.vt-who-c { font-weight: 600; white-space: nowrap; }
.vt-c-pour.vt-who-c { color: var(--ok); } .vt-c-contre.vt-who-c { color: var(--crit); } .vt-c-abstention.vt-who-c { color: var(--muted); }
.vt-proj { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.vt-proj ul { margin: 0 0 6px; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.vt-voted summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.vt-form .vt-opt-row { display: flex; gap: 8px; align-items: center; }
.vt-form .vt-opt-row input { flex: 1 1 auto; min-width: 0; }
.vt-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 16px; }
.vt-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 0 16px; }
.vt-fs { border: 1px solid var(--line); padding: 8px 12px 10px; margin: 0 0 14px; }
.vt-fs legend { font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 0 4px; }
.vt-radio, .vt-check-l { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 0; line-height: 1.4; cursor: pointer; }
.vt-radio input, .vt-check-l input { width: 20px; height: 20px; flex: 0 0 20px; margin: 0; }
.vt-check-l.small { min-height: 40px; padding: 8px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* registre */
.vt-reg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vt-reg-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) 90px minmax(0, 2fr) auto; gap: 8px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.vt-reg-row input, .vt-reg-row select { width: 100%; min-width: 0; min-height: 44px; }
.vt-reg-ro { align-items: center; font-size: 14px; }
.vt-reg-ro > span { overflow-wrap: anywhere; min-width: 0; }
.vt-reg-m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.vt-mchip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: 16px; padding: 2px 4px 2px 10px; font-size: 13px; background: #fff; max-width: 100%; overflow-wrap: anywhere; }
.vt-mchip button { border: 0; background: transparent; font-size: 18px; min-width: 40px; min-height: 40px; cursor: pointer; color: var(--muted); }
.vt-reg-lab { display: block; font-size: 11.5px; color: var(--muted); margin: 0 0 2px; font-family: var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.vt-paste { margin-top: 12px; }
.vt-paste summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.vt-sum-line { font-size: 14px; }
/* assemblée */
.vt-dates ul { margin: 0; padding-left: 18px; line-height: 1.55; font-size: 14.5px; }
.vt-dates li + li { margin-top: 6px; }
.vt-att-tot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 14.5px; }
.vt-att-bulk { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.vt-att-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); column-gap: 28px; }
.vt-att-details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--accent-deep); font-weight: 600; }
.vt-att-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.vt-att-who { display: flex; flex-direction: column; min-width: 0; }
.vt-att-name { font-weight: 600; overflow-wrap: anywhere; }
.vt-att-seg { flex-wrap: wrap; }
.vt-att-seg button { min-height: 40px; padding: 0 10px; font-size: 13px; }
.vt-att-seg button.vt-att-present.active, .vt-att-seg button.vt-att-visio.active { background: var(--ok); }
.vt-att-seg button.vt-att-rep.active { background: var(--gold); }
.vt-att-seg button.vt-att-mail.active { background: var(--ink-2); }
.vt-att-seg button.vt-att-absent.active { background: var(--none); }
.vt-att-extra { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vt-att-extra select, .vt-att-extra input[type="text"] { min-height: 44px; max-width: 100%; flex: 1 1 200px; min-width: 0; }
.vt-att-extra input[type="date"] { min-height: 40px; }
.vt-mand { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.vt-mand ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vt-mand li { display: flex; flex-direction: column; gap: 2px; font-size: 14px; padding: 6px 10px; border-left: 3px solid var(--ok); background: var(--paper); }
.vt-mand li.vt-bad { border-left-color: var(--crit); }
.vt-resols { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.vt-resol { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 12px 14px; min-width: 0; }
.vt-resol-head { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: start; }
.vt-resol-head input, .vt-resol-head textarea { min-height: 44px; min-width: 0; width: 100%; }
.vt-resol-head textarea { resize: vertical; font: inherit; line-height: 1.35; padding: 8px 10px; }
.vt-res-title { font-weight: 600; }
.vt-resol-opts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 4px; }
.vt-resol-opts select { min-height: 44px; max-width: 100%; flex: 1 1 220px; min-width: 0; }
.vt-resol-t { font-weight: 600; overflow-wrap: anywhere; margin-bottom: 4px; }
.vt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.vt-chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 48px; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; cursor: pointer; text-align: left; max-width: 100%; font-family: var(--sans); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.vt-chip-n { font-size: 13.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.vt-chip-v { font-size: 11.5px; color: var(--muted); }
.vt-chip-c { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.vt-chip-pour { border-color: #b7c9b1; } .vt-chip-pour .vt-chip-c { color: var(--ok); }
.vt-chip-contre { border-color: var(--crit); background: #f8e7e9; } .vt-chip-contre .vt-chip-c { color: var(--crit); }
.vt-chip-abst { border-color: var(--none); background: #f1efea; } .vt-chip-abst .vt-chip-c { color: var(--muted); }
.vt-chip-def { border-style: dashed; opacity: 0.75; } .vt-chip-def .vt-chip-c { color: var(--muted); }
.vt-second { border-top: 1px dashed var(--line-strong); padding-top: 8px; margin-top: 4px; }
.vt-resol-out { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 6px; }
.vt-why { margin: 0 0 6px; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.vt-resol-out p { margin: 4px 0; overflow-wrap: anywhere; }
.vt-savebar { position: static; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; margin: 16px -12px 0; background: var(--bg); border-top: 1px solid var(--line-strong); }
.vt-savebar.dirty { background: #fbf1df; position: sticky; bottom: 0; }
.vt-pouvoir { margin-top: 16px; }
.vt-pouvoir summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.vt-pv-text { min-height: 280px; font-size: 14px; }
@media (max-width: 760px) {
  .vt-reg-row { grid-template-columns: minmax(0, 1fr) 96px; }
  .vt-reg-name { grid-column: 1 / -1; }
  .vt-reg-m { grid-column: 1 / -1; }
  .vt-reg-del { grid-column: 1 / -1; justify-self: start; }
  .vt-reg-ro { grid-template-columns: minmax(0, 1fr) auto; }
  .vt-att-row { grid-template-columns: minmax(0, 1fr); }
  .vt-bar { grid-template-columns: minmax(60px, 96px) minmax(0, 1fr) auto; }
  .vt-savebar { margin: 16px -16px 0; padding: 10px 16px; }
  .vt-savebar.dirty { bottom: calc(62px + env(safe-area-inset-bottom)); }
}

@media (max-width: 400px) { .topbar .settings-link { width: 34px; } }

/* 5.5.1: tâches, étapes et navigation */
.task-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; margin: 0 0 8px; background: #fff; }
.task-step { min-height: 44px; padding: 4px 4px; border: 0; border-left: 1px solid var(--line-strong); background: transparent; color: var(--muted); font-family: var(--display); font-weight: 600; font-size: 12.5px; line-height: 1.15; cursor: pointer; overflow-wrap: anywhere; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.task-step:first-child { border-left: 0; }
.task-step:hover:not(:disabled) { background: var(--panel); color: var(--ink); }
.task-step.past { color: var(--ink-2); background: rgba(26, 34, 56, 0.04); }
.task-step.on { cursor: default; color: #fff; background: var(--ink); }
.task-step-doing.on { background: var(--gold); }
.task-step-waiting.on { background: var(--accent); }
.task-step-done.on { background: var(--ok); }
.task-step:disabled { opacity: 1; }
.task-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.task-go { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--panel); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.task-go::after { content: "→"; color: var(--accent); }
.task-go:hover { border-color: var(--accent); color: var(--accent-deep); }
.task-card[draggable="true"] { cursor: grab; }
.task-card.dragging { opacity: 0.45; }
.task-col.drop-on { outline: 2px dashed var(--gold); outline-offset: -4px; background: rgba(168, 132, 62, 0.08); }
.task-objf { display: inline-flex; }
.task-objf select { min-height: 44px; max-width: 100%; border-radius: 22px; padding: 0 14px; }
.task-ctx { margin: -4px 0 10px; }
.task-drag-hint { margin: 0 0 10px; }
@media (hover: none) { .task-drag-hint { display: none; } }
.mt-tasks li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.nav-flash { animation: task-flash 1.8s ease-out; }
@media (max-width: 640px) { .task-go { min-height: 40px; } }

/* 5.5.2: vérifier les documents à la suite */
.vf-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rv-ctx { border-left: 3px solid var(--gold); }
.rv-ctx .letter-pre, .rv-ctx-text pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--sans); font-size: 13.5px; line-height: 1.5; background: var(--paper); border: 1px solid var(--line); padding: 10px 12px; margin: 6px 0 0; max-height: 320px; overflow: auto; }
.rv-ctx-text summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; }

/* 5.5.3: la boîte du conseil */
.mb-head { display: grid; gap: 6px; padding: 12px 16px; }
.mb-head-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 14px; min-width: 0; }
.mb-head-row .mono { overflow-wrap: anywhere; }
.mb-filter { margin: 0 0 12px; flex-wrap: wrap; }
.mb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mb-item { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); padding: 12px 14px; min-width: 0; }
.mb-item.mb-o-system { border-left-color: var(--ok); }
.mb-item.mb-o-post { border-left-color: var(--gold); }
.mb-item.mb-in { border-left-color: var(--ink-2); }
.mb-item.mb-todo { border-left-color: var(--accent); background: #fbf4ec; }
.mb-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: flex-start; }
.mb-item .item-title { margin: 6px 0 4px; overflow-wrap: anywhere; }
.mb-src { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; border: 1px solid var(--line-strong); color: var(--ink-2); background: #fff; }
.mb-src-system { color: #fff; background: var(--ok); border-color: var(--ok); }
.mb-src-post { color: #fff; background: var(--gold); border-color: var(--gold); }
.mb-src-outside, .mb-src-doc, .mb-src-manual, .mb-src-unknown { color: var(--ink-2); background: var(--bg); border-style: dashed; }
.mb-src-in { color: #fff; background: var(--ink-2); border-color: var(--ink-2); }
.mb-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 4px 0 6px; font-size: 13.5px; }
.mb-dl dt { font-family: var(--display); font-weight: 600; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.mb-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.mb-st { margin-top: 6px; }
.mb-suspect { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--accent); background: #fbf1f1; color: var(--accent-deep); }
.mb-thread { margin-top: 8px; }
.mb-thread > summary { cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; color: var(--accent-deep); font-weight: 600; }
.mb-conv { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.mb-conv li { padding: 8px 10px; border: 1px solid var(--line); background: var(--paper); border-radius: 4px; max-width: 92%; }
.mb-conv .mb-conv-out { justify-self: end; border-left: 3px solid var(--ok); }
.mb-conv .mb-conv-in { justify-self: start; border-left: 3px solid var(--ink-2); }
.mb-conv .mb-conv-focus { box-shadow: 0 0 0 2px rgba(168, 132, 62, 0.5); }
.mb-dir { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
@media (max-width: 640px) { .mb-conv li { max-width: 100%; } .mb-top .btn { width: 100%; } }
.mb-sort { display: inline-flex; align-items: center; min-height: 40px; }

/* 5.5.4: un message reçu, collé tel quel */
.qi { border-left: 3px solid var(--accent); }
.qi-head h3 { margin: 0 0 2px; font-family: var(--serif); font-size: 22px; }
.qi-head p { margin: 0 0 10px; }
.qi textarea { width: 100%; min-height: 110px; }
.qi-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px; }
.qi-k { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); min-width: 72px; }
.qi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qi-chips .lchip { min-height: 40px; }
.qi-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.qi-name { max-width: 360px; }
.qi-actions { margin-top: 6px; }
.dash-kpis + .qi { margin-top: 16px; }
