/* =====================================================
   RAWAN Tranche 5 — feuille de style partagée
   (index.html, dashboard.html, admin.html)
===================================================== */

:root {
  --g900: #0e2a19;
  --g800: #123a21;
  --g700: #174526;
  --g600: #1f5c34;
  --g500: #2e7d4a;
  --g100: #e3f1e8;
  --g50:  #f3f8f5;
  --gold: #c8a24a;
  --bg:   #f2f5f3;
  --ink:  #14201a;
  --muted:#6b7a72;
  --line: #e3e9e5;
  --danger:#dc2626;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(14, 42, 25, .06), 0 8px 24px rgba(14, 42, 25, .07);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(900px 400px at 100% -10%, rgba(46, 125, 74, .10), transparent 60%),
    var(--bg);
}

/* ---------- En-tête ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--g900), var(--g700));
  box-shadow: 0 4px 18px rgba(14, 42, 25, .28);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .2px;
  line-height: 1.15;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.brand small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  opacity: .75;
  letter-spacing: .04em;
  text-transform: uppercase;
}

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

.btn {
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font: 600 13px/1 inherit;
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.btn:active { transform: scale(.97); }

.btn.secondary {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .28);
  backdrop-filter: blur(4px);
}
.btn.secondary:hover { background: rgba(255, 255, 255, .24); }

/* ---------- Conteneur & cartes ---------- */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 14px 40px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
  animation: rise .45s ease both;
}
.card:nth-child(2) { animation-delay: .05s; }
.card:nth-child(3) { animation-delay: .10s; }
.card:nth-child(4) { animation-delay: .15s; }
.card:nth-child(5) { animation-delay: .20s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.title, .card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--g600);
}
.title::before, .card h3::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(var(--g500), var(--gold));
}

.info { font-size: 17px; color: var(--ink); line-height: 1.55; }

/* ---------- Copropriétaire ---------- */
.owner { display: flex; align-items: center; gap: 14px; }
.avatar {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--g500), var(--g800));
  box-shadow: 0 4px 12px rgba(23, 69, 38, .35);
}
.owner-name { font-weight: 700; font-size: 19px; line-height: 1.2; }
.owner-lot {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--g100);
  color: var(--g700);
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Situation financière ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border-radius: 14px;
}
.stat-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  opacity: .8;
}
.stat-value { font-size: 24px; font-weight: 800; line-height: 1.15; }
.stat-sub { font-size: 13px; opacity: .8; }
.stat-bad  { background: #fef2f2; color: #b91c1c; }
.stat-good { background: #f0fdf4; color: #15803d; }
.stat-wide { grid-column: 1 / -1; background: var(--g50); color: var(--g700); }
.stat-wide .stat-value { font-size: 20px; }

/* ---------- Historique ---------- */
.scroll-box {
  max-height: 320px;
  overflow-y: auto;
  margin-top: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--g500) transparent;
}
.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.pay-row:last-child { border-bottom: 0; }
.pay-date { color: var(--muted); font-size: 15px; }
.pay-amount {
  padding: 3px 12px;
  border-radius: 999px;
  background: #f0fdf4;
  color: #15803d;
  font-weight: 700;
  font-size: 15px;
}

/* ---------- Recherche véhicule ---------- */
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; }
.hint {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid var(--gold);
  background: #fbf7ec;
  color: #6b5a28;
  font-size: 14px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.call-btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--g700);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* ---------- Informations utiles ---------- */
.info-block { padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-block:first-of-type { padding-top: 0; }
.info-block:last-child { border-bottom: 0; padding-bottom: 0; }
.info-label { font-weight: 700; margin-bottom: 6px; }
.plain { margin: 0; padding-left: 20px; color: #3b4a42; }
.muted { color: var(--muted); font-size: 14px; margin-top: 6px; }
.rib {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--g50);
  border: 1px dashed #b9d6c2;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--g700);
  word-break: break-all;
}
.copy-btn {
  flex: none;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--g700);
  color: #fff;
  font: 600 12px/1 inherit;
  font-family: inherit;
  cursor: pointer;
}
.contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-top: 8px;
  border-radius: 12px;
  background: var(--g50);
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}
.contact b { color: var(--g700); white-space: nowrap; }

/* ---------- Formulaires ---------- */
label {
  display: block;
  margin: 10px 0 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 13px 14px;
  margin: 6px 0;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus {
  outline: none;
  border-color: var(--g500);
  box-shadow: 0 0 0 4px rgba(46, 125, 74, .16);
}

button { font-family: inherit; }

.btn-primary, .btn-dark, .btn-ghost, .btn-whatsapp {
  width: 100%;
  margin-top: 8px;
  padding: 13px 16px;
  border: 0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--g600), var(--g800)); color: #fff; box-shadow: 0 6px 16px rgba(23, 69, 38, .28); }
.btn-dark    { background: #1f2937; color: #fff; }
.btn-ghost   { background: #f1f4f2; color: var(--ink); }
.btn-whatsapp{ background: #25d366; color: #fff; box-shadow: 0 6px 16px rgba(37, 211, 102, .3); }
.btn-primary:hover, .btn-dark:hover, .btn-ghost:hover, .btn-whatsapp:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-primary:active, .btn-dark:active, .btn-ghost:active, .btn-whatsapp:active { transform: scale(.98); }

.btn-inline { width: auto; margin-top: 0; padding: 13px 20px; }

.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1; margin: 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.lot-info:not(:empty) {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--g50);
  border-left: 4px solid var(--g500);
  line-height: 1.7;
}

/* ---------- Modal PIN ---------- */
#pinModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background: rgba(14, 42, 25, .55);
  backdrop-filter: blur(4px);
}
#pinModal .box {
  width: 100%;
  max-width: 360px;
  padding: 22px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
  animation: rise .25s ease both;
}
#pinModal h3 { margin: 0 0 10px; font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--ink); }
#pinModal h3::before { display: none; }
#pinModal input { letter-spacing: .3em; text-align: center; font-size: 20px; }
#pinMsg { min-height: 20px; font-size: 14px; }

/* ---------- Page de connexion ---------- */
body.login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(600px 400px at 10% 0%, rgba(200, 162, 74, .25), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(46, 125, 74, .55), transparent 60%),
    linear-gradient(160deg, var(--g900), var(--g700));
}
.login-card {
  width: 100%;
  max-width: 380px;
  padding: 30px 26px 26px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  text-align: center;
  animation: pop .5s cubic-bezier(.2, .9, .3, 1.2) both;
}
@keyframes pop {
  from { opacity: 0; transform: scale(.88) translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.login-card .logo {
  width: 120px;
  height: 120px;
  border-radius: 26px;
  object-fit: contain;
  margin-bottom: 6px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 8px 22px rgba(23, 69, 38, .22);
}
.login-card h2 { margin: 6px 0 2px; font-size: 23px; color: var(--g700); }
.login-card .sub { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.login-card input { text-align: center; font-size: 18px; }
.login-card .btn-primary { margin-top: 12px; }
#result { margin-top: 12px; min-height: 18px; font-size: 14px; color: var(--danger); line-height: 1.5; }

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
  .stat-value { font-size: 21px; }
  .btn-row, .grid2 { grid-template-columns: 1fr; }
  .grid2.keep { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* =====================================================
   Vue d'ensemble (impayes.html) + compléments admin
===================================================== */
.container.wide { max-width: 1000px; }

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.kpis .stat { box-shadow: var(--shadow); border: 1px solid var(--line); }
.stat-neutral { background: #fff; color: var(--g700); }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input { flex: 1 1 200px; margin: 0; }
.toolbar .btn-dark { margin-top: 0; }

select {
  padding: 13px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}
select:focus { outline: none; border-color: var(--g500); box-shadow: 0 0 0 4px rgba(46, 125, 74, .16); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--g50); }
th {
  position: sticky;
  top: 0;
  background: var(--g50);
  color: var(--g700);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}
th[data-dir="1"]::after  { content: " ▲"; font-size: 10px; }
th[data-dir="-1"]::after { content: " ▼"; font-size: 10px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
td.bad  { color: #b91c1c; font-weight: 700; }
td.good { color: #15803d; font-weight: 700; }
td.empty { text-align: center; color: var(--muted); padding: 24px; }
.acts { display: flex; gap: 6px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--g100);
  text-decoration: none;
  font-size: 15px;
}
.icon-btn.wa { background: #fef3c7; }
button.icon-btn { border: 0; cursor: pointer; font-family: inherit; }
.icon-btn:hover { filter: brightness(.95); }

/* ---------- Reçus dans l'historique (dashboard) ---------- */
.pay-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-num  { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; word-break: break-all; }
.pay-side { display: flex; align-items: center; gap: 10px; flex: none; }
.pdf-btn {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--g100);
  color: var(--g700);
  font: 600 13px/1 inherit;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.pdf-btn:hover { background: #cfe7d8; transform: translateY(-1px); }
.pdf-btn:active { transform: scale(.97); }
.pdf-btn[disabled] { opacity: .6; cursor: wait; }
@media (max-width: 480px) { .pay-side { flex-direction: column; align-items: flex-end; gap: 6px; } }

/* =====================================================
   Onglets, rapport financier, pages admin (contacts, dépenses)
===================================================== */
.tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  padding: 11px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--g700);
  font: 600 14px/1 inherit;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.tab:hover { background: var(--g50); }
.tab:active { transform: scale(.97); }
.tab.active, .tab[aria-current="page"] {
  background: linear-gradient(135deg, var(--g600), var(--g800));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(23, 69, 38, .28);
}

/* ----- rapport financier ----- */
.report-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-head select { min-width: 110px; }
.rep-sub { margin: -6px 0 14px; color: var(--muted); font-size: 14px; }
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi { padding: 12px 14px; border-radius: 14px; background: var(--g50); }
.kpi.wide { grid-column: 1 / -1; }
.kpi-label { font-size: 13px; color: var(--muted); }
.kpi-value { margin-top: 2px; font-size: 22px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-value.warn { color: #b45309; }
.kpi-value.bad  { color: #b91c1c; }
.kpi-value.good { color: #15803d; }
.kpi.pos { background: #f0fdf4; }
.kpi.pos .kpi-value { color: #15803d; }
.kpi.neg { background: #fef2f2; }
.kpi.neg .kpi-value { color: #b91c1c; }

.cat { padding: 9px 0; }
.cat.clickable { cursor: pointer; border-radius: 10px; }
.cat.clickable:hover { background: var(--g50); }
.cat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cat-name { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.cat-amt { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cat-bar { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.bar-track { flex: 1; height: 9px; border-radius: 999px; background: #f1f3f2; overflow: hidden; }
.bar-fill { height: 100%; min-width: 3px; border-radius: 999px; }
.cat-pct { width: 56px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chev { display: inline-block; font-size: 10px; color: var(--muted); transition: transform .2s ease; }
.cat-wrap.open .chev { transform: rotate(90deg); }
.cat-detail { display: none; margin: 4px 0 8px; padding: 6px 12px; border-radius: 12px; background: var(--g50); }
.cat-wrap.open .cat-detail { display: block; }
.det-row { display: grid; grid-template-columns: max-content 1fr auto; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #cfe0d5; font-size: 14px; }
.det-row:last-child { border-bottom: 0; }
.det-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.det-amt { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.month-row { margin-bottom: 12px; }
.month-row select { width: 100%; }

/* ----- pages admin ----- */
.pay-amount.exp { background: #fff7ed; color: #c2410c; }
.status { display: none; margin-top: 12px; padding: 11px 14px; border-radius: 12px; font-size: 15px; line-height: 1.45; }
.status.show { display: block; }
.status.ok  { background: #f0fdf4; color: #15803d; }
.status.err { background: #fef2f2; color: #b91c1c; }

table.edit { min-width: 860px; }
.cell-input { min-width: 120px; margin: 0; padding: 9px 10px; border-radius: 10px; font-size: 15px; }
tr.dirty td { background: #fffbeb; }
.save-btn {
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--g700);
  color: #fff;
  font: 600 13px/1 inherit;
  font-family: inherit;
  cursor: pointer;
}
.save-btn[disabled] { background: #cbd5cf; cursor: default; }
.save-btn.saved { background: #15803d; }
.bar-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.bar-actions .btn-primary { width: auto; margin-top: 0; padding: 11px 18px; }
@media (max-width: 480px) { .det-row { gap: 8px; font-size: 13px; } }

.pay-amount { white-space: nowrap; }

/* ---------- Téléphone : textes plus compacts, montants sur une seule ligne ---------- */
.kpi-value, .stat-value, .cat-amt, .det-amt, .pay-amount { white-space: nowrap; }
@media (max-width: 480px) {
  body { font-size: 15px; }
  .card { padding: 16px 14px; }
  .kpi-grid { gap: 8px; }
  .kpi { padding: 10px 11px; }
  .kpi-label { font-size: 11.5px; line-height: 1.25; }
  .kpi-value { font-size: clamp(14px, 4.7vw, 18px); }
  .stat-value { font-size: clamp(15px, 5vw, 19px); }
  .stat-wide .stat-value { font-size: 16px; }
  .stat-label, .stat-sub { font-size: 11.5px; }
  .cat-name { font-size: 14px; }
  .cat-amt { font-size: 14px; }
  .cat-pct { width: 48px; font-size: 11px; }
  .det-row { font-size: 12.5px; }
  .pay-amount { font-size: 14px; }
  .tab { font-size: 13.5px; padding: 9px 10px; }
}

/* ---------- Propositions AG ---------- */
textarea {
  width: 100%; padding: 13px 14px; margin: 6px 0; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; font: inherit; color: var(--ink); resize: vertical; min-height: 110px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea:focus { outline: none; border-color: var(--g500); box-shadow: 0 0 0 4px rgba(46, 125, 74, .16); }
.prop { padding: 12px 14px; border-radius: 14px; background: var(--g50); margin-bottom: 10px; }
.prop-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.prop-lot { font-weight: 800; color: var(--g700); }
.prop-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; font-size: 15px; }
.prop-budget { margin-top: 8px; font-size: 13.5px; color: #b45309; }

/* ---------- Choix de langue (propositions) ---------- */
.lang-switch { display: flex; gap: 8px; margin: 0 0 12px; }
.lang-btn {
  flex: 1; padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff;
  font: inherit; font-weight: 700; color: var(--g700); cursor: pointer;
}
.lang-btn.active { background: var(--g700); border-color: var(--g700); color: #fff; }
#propRoot.rtl { font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", Arial, sans-serif; }
#propRoot.rtl .title::before, #propRoot.rtl .card h3::before { margin-left: 10px; margin-right: 0; }
#propRoot.rtl label { text-align: right; }
#propRoot.rtl .prop-head { flex-direction: row; }

/* ---------- Suivi des décisions de l'AG (arabe, RTL) ---------- */
.rtl-tab { font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", Arial, sans-serif; }
.rtl-tab .title::before { margin-left: 10px; margin-right: 0; }
.dec-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.dec-date { font-size: 12.5px; color: var(--muted); }
.badge { padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.st-done { background: #dcfce7; color: #166534; }
.st-run  { background: #fef3c7; color: #92400e; }
.st-plan { background: #e0e7ff; color: #3730a3; }
.dec-text { font-size: 16px; line-height: 1.7; font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.dec-amounts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 14px; color: #b45309; }
.dec-amounts span { white-space: nowrap; }
.dec-amounts .dec-real { color: #166534; }
.dec-suivi { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--g50); font-size: 14.5px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.dec-suivi-label { font-size: 12px; font-weight: 800; color: var(--g700); margin-bottom: 2px; }
.dec-toggle { margin-top: 12px; width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-weight: 700; color: var(--g700); cursor: pointer; display: flex; justify-content: space-between; }
.dec-coms { margin-top: 10px; }
.com { padding: 8px 12px; border-radius: 12px; background: #f6f8f7; margin-bottom: 8px; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.com-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.com-head b { color: var(--g700); }
.com-form { display: flex; gap: 8px; align-items: center; }
.com-form input { margin: 0; flex: 1; }
.com-form .btn-primary { width: auto; margin: 0; padding: 12px 18px; }

/* ---------- Votes sur les propositions ---------- */
.vote-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.vote-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 8px;
  border-radius: 12px; border: 1.5px solid var(--line); background: #fff; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 14px; color: var(--ink);
  transition: transform .1s ease, background .15s ease, border-color .15s ease;
}
.vote-btn:active { transform: scale(.97); }
.vote-btn:disabled { opacity: .6; }
.vote-n { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: rgba(0,0,0,.07); font-size: 13px; font-variant-numeric: tabular-nums; }
.vote-btn.v-for     { color: #15803d; border-color: #bbf7d0; }
.vote-btn.v-against { color: #b91c1c; border-color: #fecaca; }
.vote-btn.v-neutral { color: #475569; border-color: #cbd5e1; }
.vote-btn.v-for.sel     { background: #16a34a; border-color: #16a34a; color: #fff; box-shadow: 0 4px 12px rgba(22,163,74,.3); }
.vote-btn.v-against.sel { background: #dc2626; border-color: #dc2626; color: #fff; box-shadow: 0 4px 12px rgba(220,38,38,.3); }
.vote-btn.v-neutral.sel { background: #64748b; border-color: #64748b; color: #fff; box-shadow: 0 4px 12px rgba(100,116,139,.3); }
.vote-btn.sel .vote-n { background: rgba(255,255,255,.25); }
@media (max-width: 480px) { .vote-btn { padding: 9px 4px; gap: 5px; font-size: 13px; } }
.own-note { margin-top: 10px; font-size: 13px; color: var(--muted); font-style: italic; }
.vote-btn:disabled { cursor: not-allowed; }

/* ---------- Annonces (admin) ---------- */
.ann-row { padding: 12px 14px; border-radius: 14px; background: var(--g50); margin-bottom: 10px; }
.ann-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; color: var(--muted); }
.ann-meta b { color: var(--g700); }
.ann-text { margin: 6px 0 8px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.ann-btns { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.ann-btns .btn-ghost { margin-top: 0; padding: 9px 14px; }

.warn-btn { background: #b45309; margin-right: 6px; }
.warn-btn[disabled] { background: #cbd5cf; }
td.act { white-space: nowrap; }

.plate-demo { background: #f6faf7; border: 1px dashed #b7cbbd; border-radius: 16px; padding: 14px 12px; margin-bottom: 14px; text-align: center; }
.plate-cap { font-weight: 700; color: #174526; margin-bottom: 10px; }
.plate { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 3px solid #1f2a24; border-radius: 12px; padding: 8px 16px; font: 800 28px/1 "Inter", system-ui, sans-serif; letter-spacing: 1px; color: #1f2a24; }
.plate-box { border: 3px solid #dc2626; border-radius: 8px; padding: 4px 8px; color: #dc2626; background: #fef2f2; }
.plate-rest { opacity: .55; }
.plate-arrow { color: #dc2626; font-size: 22px; margin-top: 4px; line-height: 1; }
.plate-note { font-size: 14px; color: #44524a; margin-top: 4px; line-height: 1.5; }
@media (max-width: 480px) { .plate { font-size: 22px; gap: 8px; padding: 7px 12px; } }
