/* Charte « Nos Parcelles » issue du logo : bordeaux (lettres NP, nom), vert olive (vignes), cuivre (contour, village), crème (fond).
   Les noms historiques des variables sont conservés : --nuit = couleur principale (bordeaux), --ocre = accent (cuivre), --prune = liens (olive foncé). */
:root {
  --nuit: #7a0c23; --nuit-2: #5e0a1b; --ocre: #8a5a35; --ocre-fonce: #6f4628; --ocre-soft: #f1e8d8;
  --prune: #5e5a33; --prune-soft: #eeedde; --creme: #fbf9ec; --sable: #c3b88f;
  --olive: #857d4b; --olive-fonce: #6c673c; --olive-soft: #eceadb;
  --bg: #f8f6ec; --surface: #fffefa; --ink: #2b211e; --muted: #6f675c; --line: #e7e0cd;
  --accent: var(--nuit); --accent-2: var(--nuit-2); --accent-soft: var(--ocre-soft);
  --ok: #4f6b2f; --ok-soft: #ecf0df; --warn: #8a5a35; --warn-soft: #f5ebdc; --bad: #a11d2e; --bad-soft: #f8e6e7;
  --radius: 10px; --shadow: 0 1px 2px rgba(122,12,35,.06), 0 2px 10px rgba(122,12,35,.05);
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--prune); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, .brand-nom { font-family: "Lora", Georgia, serif; color: var(--nuit); }
h1 { font-size: 25px; margin: 0 0 4px; font-weight: 600; }
h2 { font-size: 18px; margin: 28px 0 10px; font-weight: 600; }
h3 { font-size: 14px; margin: 18px 0 8px; color: var(--nuit); }
.muted { color: var(--muted); }
.small { font-size: 12px; }

header.top { background: var(--creme); border-bottom: 3px solid var(--ocre); }
header.top .in { max-width: 1320px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 22px; min-height: 66px; flex-wrap: wrap; }
header.top .brand { display: flex; align-items: center; gap: 10px; color: var(--nuit); text-decoration: none; }
header.top .brand img { height: 50px; width: auto; display: block; }
header.top .brand-nom { font-size: 19px; font-weight: 600; line-height: 1.1; }
header.top .brand-nom small { display: block; font-family: "Segoe UI", system-ui, sans-serif; font-size: 11px; font-weight: 600; color: var(--ocre-fonce); letter-spacing: .8px; text-transform: uppercase; }
header.top nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
header.top nav a { color: var(--nuit); padding: 21px 10px 18px; border-bottom: 3px solid transparent; margin-bottom: -3px; font-weight: 500; }
header.top nav a:hover { text-decoration: none; border-bottom-color: var(--sable); }
header.top nav a.on { border-bottom-color: var(--nuit); font-weight: 700; }
header.top .who { font-size: 13px; color: var(--muted); max-width: 320px; text-align: right; line-height: 1.7; }
header.top .who form.inline { display: block; margin: 4px 0 0 !important; }   /* périmètre au-dessus du nom : le menu tient sur une ligne */
header.top nav a { padding-left: 9px; padding-right: 9px; }
header.top .who a { color: var(--prune); text-decoration: underline; }
/* téléphone : logo compact, nom et déconnexion à droite, menu sur une ligne qui défile horizontalement */
@media (max-width: 700px) {
  header.top .in { gap: 4px 10px; padding: 6px 12px 0; min-height: 0; }
  header.top .brand img { height: 34px; }
  header.top .brand-nom { font-size: 16px; }
  header.top .who { margin-left: auto; max-width: none; font-size: 12px; line-height: 1.4; }
  header.top nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  header.top nav::-webkit-scrollbar { display: none; }
  header.top nav a { padding: 10px 9px 9px; white-space: nowrap; font-size: 14px; }
}
.banner { background: var(--warn-soft); color: var(--warn); text-align: center; padding: 6px; font-size: 13px; }
.banner a { color: var(--prune); }
main { max-width: 1320px; margin: 0 auto; padding: 24px 20px 60px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi .v { font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1.2; }
.kpi .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.two { grid-template-columns: 2fr 1fr; }
.cards { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }

table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; background: #f6f2e4; position: sticky; top: 0; }
td.r, th.r { text-align: right; white-space: nowrap; }
td.c, th.c { text-align: center; }
tr:hover td { background: #fbf7ec; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.tablewrap table { border: 0; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.neutral { background: #eeeadc; color: #5f584c; }
.dot { font-weight: 700; }
.dot.ok { color: var(--ok); } .dot.bad { color: #cfc5b0; }

.alerts { list-style: none; margin: 0; padding: 0; }
.alerts li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: baseline; }
.alerts li:last-child { border-bottom: 0; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.erreur { background: var(--bad-soft); color: var(--bad); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 18px 0 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--nuit); border-color: var(--ocre); font-weight: 600; text-decoration: none; }
.tab { display: none; } .tab.on { display: block; }

form.inline { display: inline; }
input, select, textarea { font: inherit; padding: 6px 8px; border: 1px solid #d6cdb6; border-radius: 6px; background: #fff; color: var(--ink); max-width: 100%; }
textarea { width: 100%; min-height: 60px; }
label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 3px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 16px; }
.form-grid input, .form-grid select { width: 100%; }
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: 13px; }
.btn:hover { background: var(--accent-2); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.btn.link { background: none; color: var(--accent); padding: 0; font-weight: 400; }

.map { height: 460px; border-radius: var(--radius); border: 1px solid var(--line); }
.map.small { height: 320px; }
details summary { cursor: pointer; color: var(--accent); }
.login { max-width: 380px; margin: 80px auto; }
.login input { width: 100%; }
.doclist a.doc { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.doclist a.doc:hover { color: var(--accent); text-decoration: none; }
.struct-card h3 { margin: 0 0 4px; }
.struct-card .big { font-size: 20px; font-weight: 700; color: var(--accent); }
.note { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--ocre); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.domaine { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.domaine img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; background: var(--accent-soft); }
.domaine .ph { width: 120px; height: 120px; border-radius: 10px; background: var(--prune-soft); display: flex; align-items: center; justify-content: center; color: var(--prune); font-weight: 700; font-size: 28px; }
.fil .item { border-radius: 10px; padding: 10px 14px; margin: 8px 0; max-width: 760px; }
.fil .associe { background: #f3efe2; }
.fil .admin { background: var(--ok-soft); margin-left: auto; }
.multiples { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.spark { width: 100%; height: 150px; display: block; overflow: visible; }
.spark .grid line { stroke: var(--line); }
.spark text { font-size: 10.5px; fill: var(--muted); }
.spark .ligne { fill: none; stroke: var(--prune); stroke-width: 2; }
.spark .pt { fill: var(--prune); stroke: #fff; stroke-width: 2; }
.spark .hit { fill: transparent; cursor: crosshair; }
.tip { position: fixed; pointer-events: none; background: var(--ink); color: #fff; padding: 5px 8px; border-radius: 6px; font-size: 12px; display: none; z-index: 1000; }
.doc-cle { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* Mot des gérants (portail) */
.mot { display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: start; background: var(--surface); border: 1px solid var(--line);
       border-left: 4px solid var(--ocre); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 18px; }
.mot img { width: 96px; height: auto; }
.mot h2 { margin: 0 0 8px; }
.mot .texte { white-space: pre-line; line-height: 1.6; }
.mot .sign { margin-top: 10px; font-family: "Lora", Georgia, serif; font-style: italic; color: var(--nuit); }
@media (max-width: 640px) { .mot { grid-template-columns: 1fr; } .mot img { width: 72px; } }
.login-logo { display: block; width: 230px; max-width: 80%; margin: 0 auto 12px; }
.btn.ocre { background: var(--ocre); } .btn.ocre:hover { background: var(--ocre-fonce); }
/* sous-navigation de section (Vie sociale : Assemblées | Comptes | Modifications) */
.section-nav { display: inline-flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin: 4px 0 6px; }
.section-nav a { padding: 6px 16px; border-radius: 7px; color: var(--muted); font-weight: 600; text-decoration: none; }
.section-nav a.on { background: var(--nuit); color: #fff; }
.section-nav a:hover:not(.on) { background: var(--creme); }
