/* ASL Les Jardins de l'Hippodrome – feuille de style
   Identité : la tour en ruine du pictogramme — ciel de Provence, pierre calcaire, collines bleutées, ocre d'automne.
   Mobile d'abord ; mode sombre automatique selon le réglage de l'appareil. */

/* ---------------------------------------------------------------- tokens */
:root {
  --bg: #f3efe7;
  --surface: #fffdf9;
  --surface-2: #f8f4ec;
  --line: #e6dfd2;
  --line-strong: #d2c8b5;
  --ink: #1f2428;
  --muted: #66635b;
  --canal: #2c6b9e;
  --canal-deep: #1d3c55;
  --canal-soft: #e2edf6;
  --canal-ink: #22557e;
  --ocre: #a35a17;
  --ocre-soft: #f8ead6;
  --olive: #4d6a2a;
  --olive-soft: #e8eedb;
  --red: #b03a2e;
  --red-soft: #f9e5e0;
  --focus: rgba(44, 107, 158, .35);
  --shadow: 0 1px 2px rgba(40, 34, 24, .05), 0 4px 16px rgba(40, 34, 24, .06);
  --radius-l: 18px;
  --radius: 12px;
  --radius-s: 8px;
  --side: 264px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: "Inter Display", "Segoe UI Variable Display", "SF Pro Display", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10171e;
    --surface: #17212a;
    --surface-2: #1c2832;
    --line: #26343f;
    --line-strong: #344552;
    --ink: #ebe6dc;
    --muted: #a39e93;
    --canal: #7fb3de;
    --canal-deep: #13283a;
    --canal-soft: #1b3245;
    --canal-ink: #a9cdea;
    --ocre: #e0a25a;
    --ocre-soft: #3a2a17;
    --olive: #a4c27a;
    --olive-soft: #232f1a;
    --red: #f08a7a;
    --red-soft: #3d201c;
    --focus: rgba(127, 179, 222, .45);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--canal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--canal-ink); }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.1rem); font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: 1.15rem; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .88em; }
pre.code { background: var(--surface-2); border: 1px solid var(--line); padding: 12px 14px; border-radius: var(--radius-s); overflow-x: auto; font-size: .85rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 20px; height: 20px; flex: none; }
.logo { width: 40px; height: 40px; flex: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: var(--radius-s); }
.skip:focus { left: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ------------------------------------------------- structure de l'application */
.appbar { display: none; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 40;
  display: flex; flex-direction: column;
  background: var(--canal-deep); color: #eef2f6;
  /* Motif discret : la tour et les collines du pictogramme */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='264' height='260' viewBox='0 0 264 260'%3E%3Cg fill='%23ffffff' fill-opacity='.045'%3E%3Cpath transform='translate%28-30 40%29 scale%286.4%29' d='M16.4 32.5L19.3 27.6L21.1 25.2L21.4 21.4L22.7 19.4L22.9 15.8L24.2 14.2L24.5 10.8L25.1 8.9L26 8.5L26.3 7.2L26.5 7.15V10.1H25.8V14.9H26.6V18.1H25.8V22.9H26.6V26.1H25.8V32.5ZM29.4 32.5V8.4L29.1 6H27.7L27.5 6.9L27.3 6.95V10.9H26.6V14.1H27.4V18.9H26.6V22.1H27.4V26.9H26.6V32.5Z'/%3E%3Cpath d='M0 203Q79 172 164 192T264 187V260H0Z'/%3E%3Cpath d='M0 234Q119 208 264 224V260H0Z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: bottom center;
  overflow-y: auto;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 18px 10px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand .logo { color: #f1e3c3; }
.brand strong { display: block; font: 650 1rem/1.25 var(--font-display); letter-spacing: -.01em; }
.brand small { display: block; font-size: .78rem; color: rgba(238, 242, 246, .65); margin-top: 2px; }
.menu-close { display: none; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 20px; flex: 1; }
.nav-group { margin: 18px 12px 6px; font-size: .78rem; font-weight: 600; color: rgba(238, 242, 246, .55); }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: rgba(238, 242, 246, .86); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.side-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-nav a.on { background: rgba(255, 255, 255, .13); color: #fff; box-shadow: inset 3px 0 0 #f1e3c3; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 14px 16px 18px; border-top: 1px solid rgba(255, 255, 255, .1); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #f1e3c3; color: var(--canal-deep); font-weight: 700; flex: none; }
.who { flex: 1; min-width: 0; line-height: 1.25; }
.who strong { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { color: rgba(238, 242, 246, .6); font-size: .78rem; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.scrim { display: none; }

.content { margin-left: var(--side); padding: 36px clamp(20px, 4vw, 48px) 40px; max-width: calc(var(--side) + 1040px); }
.content.wide { max-width: calc(var(--side) + 1280px); }
.foot { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.tabbar { display: none; }

/* -------------------------------------------------------- en-têtes de page */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1, .page-head h2 { margin: 0; }
.page-head > div:first-child { min-width: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 6px; font-size: .9rem; font-weight: 600; color: var(--canal); }
.crumbs { font-size: .88rem; margin: 0 0 10px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--canal); text-decoration: underline; }
.subhead { font-size: 1rem; font-weight: 650; color: var(--canal-ink); margin: 22px 0 12px; }

/* ------------------------------------------------------------------ blocs */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px 24px; margin-bottom: 20px; box-shadow: var(--shadow); }
.panel > h2:first-child, .panel > .page-head:first-child { margin-top: 0; }
.panel.emphasis { border-color: var(--canal); box-shadow: 0 0 0 1px var(--canal), var(--shadow); }
.panel.empty { text-align: center; color: var(--muted); padding: 44px 24px; border-style: dashed; box-shadow: none; background: transparent; }
details.panel > summary { cursor: pointer; font-weight: 600; list-style-position: inside; padding: 8px 0; }
details.panel[open] > summary { margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid2.wide-left { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.grid2 > .panel, .grid2 > div > .panel { margin-bottom: 20px; }

/* ------------------------------------------------------------ indicateurs */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.stat span { display: block; font-size: .88rem; font-weight: 500; color: var(--muted); }
.stat strong { display: block; font: 700 clamp(1.5rem, 1.25rem + 1vw, 1.95rem)/1.15 var(--font-display); letter-spacing: -.02em; margin: 6px 0 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat small { color: var(--muted); font-size: .84rem; }
.stat.ok strong { color: var(--olive); }
.stat.danger strong { color: var(--red); }
/* Le chiffre à retenir : ce qu'il reste à régler */
.stat.accent { background: var(--canal); border-color: var(--canal); color: #fff; }
.stat.accent span, .stat.accent small { color: rgba(255, 255, 255, .78); }
.stat.accent strong { color: #fff; }
@media (prefers-color-scheme: dark) { .stat.accent { background: var(--canal-soft); border-color: var(--canal); } .stat.accent strong { color: var(--canal-ink); } }

.progress { display: flex; align-items: center; gap: 12px; margin: 4px 0 20px; }
.progress progress { flex: 1; height: 10px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress progress::-webkit-progress-bar { background: var(--line); border-radius: 99px; }
.progress progress::-webkit-progress-value { background: var(--olive); border-radius: 99px; }
.progress progress::-moz-progress-bar { background: var(--olive); border-radius: 99px; }
.progress em { font-style: normal; font-size: .86rem; color: var(--muted); white-space: nowrap; }
.progress.compact { margin: 0; min-width: 120px; }
.progress.compact progress { height: 6px; }

/* ---------------------------------------------------- badges et messages */
.badge { display: inline-flex; align-items: center; gap: 4px; font: 600 .76rem/1 var(--font); padding: 5px 9px; border-radius: 99px; white-space: nowrap; vertical-align: middle; }
.badge.ok { background: var(--olive-soft); color: var(--olive); }
.badge.warn { background: var(--ocre-soft); color: var(--ocre); }
.badge.info { background: var(--canal-soft); color: var(--canal-ink); }
.badge.danger { background: var(--red-soft); color: var(--red); }
.badge.neutral { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }

.flash { padding: 12px 16px 12px 40px; border-radius: var(--radius); margin: 0 0 20px; position: relative; font-size: .95rem; }
.flash::before { content: ""; position: absolute; left: 16px; top: 19px; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.flash ul { margin: 0; padding-left: 18px; }
.flash.ok { background: var(--olive-soft); color: var(--olive); }
.flash.warn { background: var(--ocre-soft); color: var(--ocre); }
.flash.error { background: var(--red-soft); color: var(--red); }
.alerts { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.alerts li { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ocre); padding: 12px 16px; border-radius: var(--radius); font-size: .93rem; }

/* --------------------------------------------------------------- tableaux */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); margin-bottom: 20px; box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.table-wrap.flat { border: 0; background: none; box-shadow: none; border-radius: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { font-size: .82rem; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tfoot th, .table tfoot td { border-top: 2px solid var(--line); border-bottom: 0; font-weight: 650; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table.compact th, .table.compact td { padding: 9px 12px; }
.panel .table thead th { background: none; }
/* En-têtes de tableaux triables (public/app.js) */
.th-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 28px; }
.th-sort:focus-visible { outline: 2px solid var(--canal); outline-offset: 2px; border-radius: 4px; }
.th-sort::after { content: "↕"; opacity: .35; font-size: .9em; }
[aria-sort="ascending"] .th-sort::after { content: "↑"; opacity: 1; }
[aria-sort="descending"] .th-sort::after { content: "↓"; opacity: 1; }
th.num .th-sort { flex-direction: row-reverse; }
tr.inactive td { opacity: .55; }
tr.missing td { background: var(--ocre-soft); }
.tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; }
.tabs a { padding: 7px 16px; border-radius: 99px; text-decoration: none; color: var(--muted); font-size: .9rem; font-weight: 500; }
.tabs a.on { background: var(--canal); color: #fff; }

/* -------------------------------------------------------------- formulaires */
.field { display: block; margin-bottom: 16px; flex: 1; min-width: 0; border: 0; padding: 0; }
.field > span, .field > legend { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.field em { color: var(--red); font-style: normal; }
.field small { display: block; color: var(--muted); font-size: .82rem; margin-top: 5px; }
.field.narrow { flex: 0 0 170px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; min-height: 44px; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--canal); box-shadow: 0 0 0 4px var(--focus); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--canal); flex: none; margin: 2px 0 0; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 14px; font-size: .94rem; cursor: pointer; }
.check small { color: var(--muted); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 16px; max-height: 280px; overflow: auto; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.checks .check { margin: 6px 0; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.search { display: flex; gap: 8px; margin-bottom: 18px; max-width: 560px; }
form.inline { display: inline; }
.quickpay { display: flex; gap: 6px; align-items: center; }
.quickpay input[type=date] { width: 150px; min-height: 36px; padding: 5px 8px; font-size: .85rem; }
input.m3 { width: 110px; min-height: 38px; padding: 6px 10px; text-align: right; }

/* ------------------------------------------------------------------ boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px;
  font: 600 .92rem/1.1 var(--font); padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--canal); color: var(--canal-ink); }
.btn.primary { background: var(--canal); border-color: var(--canal); color: #fff; }
.btn.primary:hover { background: var(--canal-ink); border-color: var(--canal-ink); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary, .btn.primary:hover { color: #12283a; } .btn.primary:hover { background: var(--canal-ink); } }
.btn.warn { background: var(--ocre-soft); border-color: transparent; color: var(--ocre); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); color: var(--red); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: .84rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.page-head + .raison-action { margin: -16px 0 20px; text-align: right; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--muted); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- listes clé/valeur */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0 0 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.log { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.log li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; }
.log li:last-child { border-bottom: 0; }
.log time { color: var(--muted); flex: none; min-width: 120px; }

/* ------------------------------------------------------ espace coloti : accueil */
.a-regler .table-wrap { margin-bottom: 18px; }
.a-regler .subhead { margin-top: 0; }
.reglements { margin-top: 14px; }
.reglements summary { cursor: pointer; color: var(--canal); font-weight: 600; padding: 6px 0; min-height: 44px; display: flex; align-items: center; }
.reglements .table { margin-top: 6px; }

/* ------------------------------------------------------------ eau du canal */
.water-panel .page-head { margin-bottom: 12px; align-items: center; }
.water-panel h2 { margin: 0; }
.releve .field.narrow { flex-basis: 230px; }

/* ------------------------------------------------------------ adresses e-mail */
.contacts { display: grid; gap: 8px; margin-bottom: 14px; }
.contact { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; background: var(--surface); }
.contact.principal { background: var(--surface-2); overflow-wrap: anywhere; }
.contact > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.contact > summary::-webkit-details-marker { display: none; }
.contact > summary > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.contact[open] > summary { margin-bottom: 14px; }
.contact form + form { margin-top: 8px; }
.add-contact > summary { list-style: none; display: inline-flex; margin-bottom: 12px; }
.add-contact > summary::-webkit-details-marker { display: none; }
.add-contact[open] { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 14px 16px; }
.inline-pref { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.inline-pref .check { margin: 0; }

/* ------------------------------------------------------------ informations */
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px 28px; margin-bottom: 18px; box-shadow: var(--shadow); }
.info-card.important { border-color: var(--red); box-shadow: inset 4px 0 0 var(--red), var(--shadow); }
.info-card header .eyebrow { color: var(--muted); font-weight: 500; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.info-card h2 { font-size: 1.35rem; margin-bottom: 12px; }
.info-card h2 a { color: inherit; text-decoration: none; }
.info-card h2 a:hover { color: var(--canal); }
.info-body { max-width: 68ch; }
.info-body ul { padding-left: 20px; margin: 0 0 1em; }
.news .page-head { margin-bottom: 6px; align-items: baseline; }
.news h2 { margin: 0; }
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.news-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.news-list li.important { border-left: 3px solid var(--red); padding-left: 12px; }
.news-list a { text-decoration: none; }
.news-list a:hover strong { text-decoration: underline; }
.lot-picker { margin-top: 8px; }
.cibles { border: 0; padding: 0; margin: 0; min-width: 0; }
/* Liste des lots visible seulement pour « Une sélection de lots » (app.js désactive aussi les cases). */
.cibles:has(input[name="cible"][value="lots"]:not(:checked)) .lot-picker, .lot-picker[hidden] { display: none; }

/* ------------------------------------------------- connexion (pages publiques) */
.auth-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(320px, 44%) 1fr; }
.auth-side {
  background: var(--canal-deep); color: #eef2f6; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='600' viewBox='0 0 800 600'%3E%3Cg fill='%23ffffff' fill-opacity='.06'%3E%3Cpath transform='translate%28-40 90%29 scale%2815%29' d='M16.4 32.5L19.3 27.6L21.1 25.2L21.4 21.4L22.7 19.4L22.9 15.8L24.2 14.2L24.5 10.8L25.1 8.9L26 8.5L26.3 7.2L26.5 7.15V10.1H25.8V14.9H26.6V18.1H25.8V22.9H26.6V26.1H25.8V32.5ZM29.4 32.5V8.4L29.1 6H27.7L27.5 6.9L27.3 6.95V10.9H26.6V14.1H27.4V18.9H26.6V22.1H27.4V26.9H26.6V32.5Z'/%3E%3Cpath d='M0 468Q240 396 496 444T800 432V600H0Z'/%3E%3Cpath d='M0 540Q360 480 800 516V600H0Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover; background-position: bottom left;
}
.auth-brand { display: flex; align-items: center; gap: 14px; font: 650 1.15rem/1.25 var(--font-display); color: #fff; }
.auth-brand .logo { width: 60px; height: 60px; color: #f1e3c3; }
.auth-pitch { font: 600 clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem)/1.2 var(--font-display); letter-spacing: -.02em; color: #fff; max-width: 18ch; margin: 0; }
.auth-place { color: rgba(238, 242, 246, .7); margin: 0; }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 32px clamp(20px, 5vw, 64px); }
.auth-main > .flash { max-width: 420px; width: 100%; margin-left: auto; margin-right: auto; }
.auth-card { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-card h1 { font-size: 1.75rem; margin-bottom: 22px; }
.auth-card .btn.block { min-height: 48px; font-size: 1rem; }

/* ------------------------------------------------------------- impression */
@media print {
  .sidebar, .appbar, .tabbar, .scrim, .foot, .actions, form, .btn { display: none !important; }
  .content { margin: 0; padding: 0; max-width: none; }
  body { background: #fff; color: #000; }
  .panel, .stat, .table-wrap { box-shadow: none; }
}

/* ============================================================ responsive */

/* Petits écrans d'ordinateur et tablettes paysage */
@media (max-width: 1180px) {
}

/* Tablette portrait et mobile : barre supérieure + menu en tiroir */
@media (max-width: 1000px) {
  .appbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 30; padding: 10px 12px 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
    background: var(--canal-deep); color: #fff;
  }
  .appbar-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 650 1rem/1.2 var(--font-display); min-width: 0; }
  .appbar-brand:hover { color: #fff; }
  .appbar-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .appbar-brand .logo { width: 34px; height: 34px; color: #f1e3c3; }
  .menu-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #fff; flex: none; }
  .menu-btn .ico { width: 24px; height: 24px; }
  .menu-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .sidebar { width: min(86vw, 320px); transform: translateX(-102%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .25); padding-bottom: env(safe-area-inset-bottom); visibility: hidden; }
  .menu-close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #fff; }
  .menu-close:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .sidebar:target, .menu-open .sidebar { transform: none; visibility: visible; }
  .scrim { position: fixed; inset: 0; z-index: 35; background: rgba(10, 20, 30, .5); opacity: 0; pointer-events: none; transition: opacity .25s; display: block; }
  .sidebar:target ~ .scrim, .menu-open .scrim { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
  .content, .content.wide { margin-left: 0; max-width: none; padding: 22px 20px 32px; }
  .grid2, .grid2.wide-left { grid-template-columns: minmax(0, 1fr); }
  .auth-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-side { padding: 24px 22px 28px; gap: 14px; }
  .auth-pitch { font-size: 1.3rem; max-width: none; }
  .auth-place { display: none; }
  .auth-main { justify-content: flex-start; padding-top: 28px; }

  /* Espace coloti : barre d'onglets en bas de l'écran */
  .role-coloti .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px; padding-bottom: max(6px, env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .75rem; font-weight: 600; }
  .tabbar a .ico { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--canal); background: var(--canal-soft); }
  .role-coloti .content { padding-bottom: 104px; }
}

/* Mobile */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .content, .content.wide { padding: 18px 14px 32px; }
  .role-coloti .content { padding-bottom: 104px; }
  .panel { padding: 18px 16px; border-radius: var(--radius); }
  .info-card { padding: 20px 18px; border-radius: var(--radius); }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; border-radius: var(--radius); }
  .stat strong { font-size: 1.35rem; }
  .stats .stat:nth-child(3):last-child { grid-column: 1 / -1; }
  .page-head { margin-bottom: 18px; }
  .page-head + .raison-action { margin-top: -10px; text-align: left; }
  .page-head .actions { width: 100%; }
  .page-head .actions > .btn, .page-head .actions > form { flex: 1 1 auto; }
  .page-head .actions > form .btn, .page-head > form .btn { width: 100%; }
  .page-head > .btn, .page-head > form { width: 100%; }
  .field.narrow { flex: 1 1 100%; }
  .row { gap: 0 12px; }
  .row > .field { flex-basis: 100%; }
  .kv { grid-template-columns: minmax(90px, auto) minmax(0, 1fr); gap: 6px 14px; }
  .search { max-width: none; }
  .form-actions .btn { flex: 1 1 auto; }
  .tabs { display: flex; }
  .tabs a { flex: 1; text-align: center; }
  .log li { flex-direction: column; gap: 2px; }
  .flash { font-size: .92rem; }

  /* Tableaux → cartes empilées (libellés de colonnes posés par app.js) */
  .table-wrap { overflow: visible; background: none; border: 0; box-shadow: none; border-radius: 0; }
  table.stackable, table.stackable tbody, table.stackable tfoot, table.stackable tr, table.stackable td, table.stackable th { display: block; width: 100%; }
  table.stackable thead { display: none; }
  table.stackable tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
  .panel table.stackable tr { box-shadow: none; background: var(--surface-2); }
  table.stackable tbody tr:hover td { background: none; }
  table.stackable td, table.stackable tfoot th { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); text-align: right; white-space: normal; }
  table.stackable td:last-child, table.stackable tfoot th:last-child { border-bottom: 0; }
  table.stackable td::before, table.stackable tfoot th::before { content: attr(data-label); color: var(--muted); font-size: .84rem; font-weight: 500; text-align: left; flex: none; max-width: 45%; }
  table.stackable td[data-label=""]::before { display: none; }
  table.stackable td:empty { display: none; }
  table.stackable tr.missing, table.stackable tr.missing td { background: var(--ocre-soft); }
  table.stackable tfoot tr { background: var(--surface-2); }
  .quickpay { justify-content: flex-end; flex-wrap: wrap; }
}

@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
  .appbar-brand span { font-size: .92rem; }
}

/* Ajustements */
.auth-card form + p { margin-top: 18px; }
@media (max-width: 1000px) { .sidebar { background-image: none; } }

/* ------------------------------------------------------------ documents */
.doc-group { margin-bottom: 26px; }
.doc-group > h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-bottom: 10px; }
.doc-group .count { font: 600 .75rem/1 var(--font); color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 4px 8px; }
.doc-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow); overflow: hidden; }
.doc { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.doc:last-child { border-bottom: 0; }
.doc-type { flex: none; width: 44px; height: 52px; border-radius: 8px; display: grid; place-items: end center; padding-bottom: 8px; font: 700 .66rem/1 var(--font); letter-spacing: .03em;
  background: var(--canal-soft); color: var(--canal-ink); position: relative; clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%); }
.doc-type.pdf { background: var(--red-soft); color: var(--red); }
.doc-type.excel, .doc-type.opendocument { background: var(--olive-soft); color: var(--olive); }
.doc-type.image { background: var(--ocre-soft); color: var(--ocre); }
.doc-main { flex: 1; min-width: 0; }
.doc-title { font-weight: 650; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.doc-title:hover { color: var(--canal); text-decoration: underline; }
.doc-meta { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.doc-desc { margin: 6px 0 0; font-size: .9rem; max-width: 70ch; }
.doc-actions { display: flex; gap: 6px; flex: none; }
input[type=file].file { width: 100%; font: inherit; padding: 14px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--muted); cursor: pointer; }
input[type=file].file:hover { border-color: var(--canal); }
input[type=file].file::file-selector-button { font: 600 .88rem var(--font); margin-right: 12px; padding: 8px 14px; border-radius: 8px; border: 0; background: var(--canal); color: #fff; cursor: pointer; }
fieldset.field .check { margin: 6px 0; }
@media (max-width: 720px) {
  .doc { flex-wrap: wrap; align-items: flex-start; padding: 14px; }
  .doc-type { width: 38px; height: 46px; }
  .doc-actions { width: 100%; padding-left: 54px; }
  .doc-actions .btn { flex: 1; }
  .tabbar a span { font-size: .7rem; }
}

/* Personnes du foyer */
.person { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.person-name { font-weight: 650; }
.person-mail { overflow-wrap: anywhere; font-size: .93rem; }
.person-mail em { font-style: normal; }
.contact.principal .person > .badge { align-self: flex-start; margin: 2px 0; }
.contact .person > .badge { display: none; }
.contact.principal .person > .badge { display: inline-flex; }
.inline-hint { display: inline; font-weight: 400; color: var(--muted); font-size: .8rem; margin-left: 4px; }
.field-label { font-size: .88rem; font-weight: 600; margin: 4px 0 0; }

/* Envois groupés en cours */
.jobs { display: grid; gap: 6px; margin: 0 0 18px; }
.job { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: .9rem; }
.job progress { margin-left: auto; width: 120px; height: 6px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 99px; background: var(--line); overflow: hidden; flex: none; }
.job progress::-webkit-progress-bar { background: var(--line); }
.job progress::-webkit-progress-value { background: var(--canal); }
.job progress::-moz-progress-bar { background: var(--canal); }
.job-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--olive); flex: none; }
.job.run .job-dot { background: var(--canal); animation: pulse 1.2s ease-in-out infinite; }
.job.warn .job-dot { background: var(--ocre); }
@keyframes pulse { 50% { opacity: .3; } }
@media (max-width: 720px) { .job { flex-wrap: wrap; } .job progress { width: 100%; margin-left: 0; } }

/* Bascule bureau / foyer (membres du bureau) */
.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 4px 16px 6px; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, .22); }
.switch button { border: 0; border-radius: 9px; padding: 8px 6px; font: 600 .85rem/1 var(--font); color: rgba(238, 242, 246, .75); background: transparent; cursor: pointer; }
.switch button:hover { color: #fff; }
.switch button.on { background: #f1e3c3; color: var(--canal-deep); }
.badges { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; }
.acces { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.acces .actions { margin-top: 6px; }

/* Mention sur le pointage des règlements */
.notice { margin: -6px 0 22px; padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--canal); font-size: .9rem; color: var(--muted); }
.notice strong { color: var(--ink); }

/* Photo du lotissement */
.auth-side.with-photo { position: relative; overflow: hidden; background-image: none; isolation: isolate; }
.auth-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.auth-photo.photo-defaut { object-position: 78% 30%; }
.auth-side.with-photo::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(29, 60, 85, .82) 0%, rgba(29, 60, 85, .35) 45%, rgba(29, 60, 85, .88) 100%); }
.credit { display: block; font-size: .75rem; opacity: .75; margin-top: 4px; }
/* En-tête de « Mes échéances » : salutation et chiffres clés, photo dans un cadre presque carré à droite
   (la photo par défaut est en portrait : un bandeau large n'en montrait qu'un quart). */
.hero { display: grid; gap: 20px; margin-bottom: 22px; }
.hero.with-photo { grid-template-columns: minmax(0, 1fr) clamp(240px, 32%, 340px); }
.hero-main { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.hero .stats { margin-bottom: 0; }
.hero-photo { position: relative; margin: 0; min-height: 260px; border-radius: var(--radius-s); overflow: hidden; background: var(--canal-deep); border: 1px solid var(--line); }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo img.photo-defaut { object-position: 72% 30%; }
.hero-photo figcaption { position: absolute; inset: auto 0 0 0; padding: 32px 14px 10px; display: flex; flex-direction: column; gap: 2px;
  color: #fff; background: linear-gradient(180deg, transparent, rgba(14, 30, 44, .6)); font: 600 .82rem/1.25 var(--font); letter-spacing: .01em; }
.hero-photo figcaption small { font: 400 .7rem/1.2 var(--font); opacity: .8; }
.photo-apercu { display: block; width: 100%; max-width: 480px; aspect-ratio: 16 / 7; object-fit: cover; border-radius: var(--radius); margin: 0 0 14px; }
@media (max-width: 1000px) { .auth-side.with-photo { min-height: 260px; } }
@media (max-width: 900px) { .hero.with-photo { grid-template-columns: minmax(0, 1fr); } .hero-photo { order: -1; min-height: 0; aspect-ratio: 16 / 10; } }
@media (max-width: 720px) { .hero { gap: 14px; margin-bottom: 18px; } }

/* Ajustement des montants d'un appel */
.groupes { margin: 6px 0 14px; }
.groupe { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.groupe span { flex: 1; min-width: 180px; }
.groupe input { width: 130px; min-height: 40px; text-align: right; }
.detail-lots > summary { cursor: pointer; font-weight: 600; margin: 6px 0 10px; }

/* Réseau d'eau du canal */
.poste { padding: 12px 0; border-top: 1px solid var(--line); }
.poste h3 { margin: 0 0 2px; }
.poste p { margin: 2px 0; }
.postes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 28px; }
.postes-grid .poste { border-top: 0; }
.gerer { margin-top: 12px; }
.gerer > summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.communs-liste { list-style: none; padding: 0; margin: 8px 0; }
.communs-liste li { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.ecart-fort { color: var(--red); font-weight: 650; }
.field.narrow-wide { max-width: 420px; }

/* --------------------------------------------------- relevé bancaire (pointage) */
.tab-n { display: inline-block; min-width: 1.6em; padding: 1px 6px; margin-left: 4px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: .78rem; text-align: center; }
.tabs a.on .tab-n { background: rgba(255, 255, 255, .22); color: inherit; }
.tabs { flex-wrap: wrap; border-radius: 18px; }
.ops { list-style: none; margin: 0; padding: 0; }
.op { padding: 16px 0; border-top: 1px solid var(--line); }
.op:first-child { border-top: 0; padding-top: 4px; }
.op-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.op-head time { color: var(--muted); font-size: .88rem; }
.op-montant { font: 700 1.05rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.op-montant.credit { color: var(--olive); }
.op-montant.debit { color: var(--ink); }
.op-em { margin: 4px 0 2px; overflow-wrap: anywhere; }
.op-libelle { margin: 0 0 10px; font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }
td.op-libelle { margin: 0; }
.op-type { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.op-lib { display: block; color: var(--ink); }
.op-prop { background: var(--canal-soft); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 8px; }
.op-prop-titre { margin: 0 0 4px; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--canal-ink); }
.op-prop .small { margin: 4px 0 10px; }
.op-items { list-style: none; margin: 0; padding: 0; }
.op-items li { margin: 2px 0; }
.op-more > summary { cursor: pointer; color: var(--canal); font-size: .9rem; font-weight: 600; margin: 4px 0; }
.op-more[open] > summary { margin-bottom: 10px; }
.op-form { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: flex-end; padding: 12px 14px 4px; margin-bottom: 8px; background: var(--surface-2); border-radius: var(--radius); }
.op-form .field { margin-bottom: 10px; min-width: 180px; }
.op-form .check { flex-basis: 100%; margin: 0 0 10px; }
.op-form .form-actions { margin: 0 0 10px; }
.nowrap { white-space: nowrap; }

/* Page « Le lotissement » */
.stat strong.stat-mail { font-size: 1.05rem; letter-spacing: 0; }
.stat-mail a { color: inherit; }
.tabbar a span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Blocs titrés (« **Titre** » en 1re ligne d'un paragraphe) : encadrés pleine largeur, les uns sous les autres */
.rubrique-texte { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: none; }
.rubrique-texte > p, .rubrique-texte > ul { grid-column: 1 / -1; max-width: 68ch; margin: 0; }
.bloc { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px 16px; min-width: 0; overflow-wrap: anywhere; }
.bloc h3 { margin: 0 0 8px; font-size: 1rem; }
.bloc p { margin: 0 0 8px; }
.bloc ul { margin: 0; padding-left: 18px; }
.bloc li + li { margin-top: 4px; }
.bloc > :last-child { margin-bottom: 0; }
.info-body .bloc { margin-bottom: 14px; }
.rubrique-texte .bloc { margin-bottom: 0; }

/* Assemblées générales */
.odj { margin: 0 0 14px; padding-left: 22px; }
.odj > li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.odj > li:last-child { border-bottom: 0; }
.odj details > summary { cursor: pointer; min-height: 32px; }
.odj .actions { margin-top: 8px; display: flex; gap: 8px; }
.ajout > summary { list-style: none; display: inline-flex; }
.ajout[open] > summary { margin-bottom: 12px; }
details.vote { border-top: 1px solid var(--line); padding: 10px 0; }
details.vote > summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.radio { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; cursor: pointer; }

/* ------------------------------------------------------- plan du lotissement */
.plan-zone { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.js .plan-zone { grid-template-columns: minmax(0, 1fr) 300px; }
.plan-zone > .panel { margin-bottom: 20px; }
.plan-detail { position: sticky; top: 20px; }
.plan-panneau { padding: 12px; }
.plan-svg { display: block; width: 100%; height: auto; touch-action: pan-x pan-y pinch-zoom; }
.plan-route { fill: var(--line-strong); fill-rule: evenodd; }
.plan-chemin { fill: var(--ocre-soft); fill-rule: evenodd; stroke: var(--ocre); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.plan-vert { fill: var(--olive-soft); fill-rule: evenodd; stroke: var(--olive); stroke-width: 1; stroke-opacity: .4; }
.plan-jardins { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 8 8; }
.plan-bassin { fill: var(--canal-soft); fill-rule: evenodd; stroke: var(--canal); stroke-width: 1.5; stroke-opacity: .6; }
.plan-repere { fill: var(--muted); font: 500 24px var(--font); text-anchor: middle; }
.plan-lot polygon { fill: var(--surface-2); stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; transition: fill .15s; }
.plan-lot.renseigne polygon { fill: var(--canal-soft); stroke: var(--canal); }
.plan-lot.chez-moi polygon { fill: var(--ocre-soft); stroke: var(--ocre); stroke-width: 5; }
.plan-lot text { fill: var(--ink); font: 650 24px var(--font); text-anchor: middle; pointer-events: none; }
.plan-lot:hover polygon, .plan-lot:focus-visible polygon { fill: var(--canal); }
.plan-lot:hover text, .plan-lot:focus-visible text, .plan-lot.choisi text { fill: var(--surface); }
.plan-lot.choisi polygon { fill: var(--canal-ink); stroke: var(--canal-ink); stroke-width: 5; }
.plan-lot:focus { outline: none; }
.plan-lot.estompe { opacity: .3; }
.plan-legende { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 4px 2px; }
.plan-legende span { display: inline-flex; align-items: center; gap: 6px; }
.plan-pastille { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--muted); background: var(--surface-2); }
.plan-pastille.renseigne { background: var(--canal-soft); border-color: var(--canal); }
.plan-pastille.chez-moi { background: var(--ocre-soft); border-color: var(--ocre); }
.plan-trait { display: inline-block; width: 22px; height: 0; border-top: 6px solid var(--line-strong); border-radius: 3px; }
.plan-trait.chemin { height: 8px; border: 1.5px dotted var(--ocre); background: var(--ocre-soft); border-radius: 2px; }
.plan-trait.entree { width: 22px; height: 0; border-top: 3px solid var(--red); border-radius: 0; position: relative; }
.plan-trait.entree::after { content: ""; position: absolute; right: -2px; top: -6.5px; border: 5px solid transparent; border-left: 7px solid var(--red); }
.plan-entree path { fill: none; stroke: var(--red); stroke-width: 11; stroke-linecap: round; }
.plan-entree polygon { fill: var(--red); }
.plan-entree text { fill: var(--red); font: 700 34px var(--font); }
.plan-boussole-legende { margin-right: 4px; }
.plan-boussole { width: 52px; height: 52px; flex: none; }
.plan-boussole circle { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.plan-boussole path { fill: var(--muted); }
.plan-boussole path.nord { fill: var(--red); }
.plan-boussole text { fill: var(--ink); font: 700 10px var(--font); text-anchor: middle; }
.plan-adresse { margin-top: 2px; color: var(--ink); }
.plan-detail h2 { margin: 0 0 6px; }
.plan-detail ul { margin: 6px 0 0; padding-left: 18px; }
.plan-liste-tete { margin-bottom: 14px; align-items: center; }
.plan-recherche { max-width: 320px; }
.plan-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.plan-carte { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); scroll-margin-top: 80px; cursor: pointer; }
.plan-carte p { margin: 0; }
.plan-carte .plan-foyer { font-weight: 600; margin-top: 2px; }
.plan-carte.libre { background: var(--surface-2); }
.plan-carte.chez-moi { border-color: var(--ocre); }
.plan-carte:target, .plan-carte.choisi { border-color: var(--canal); box-shadow: 0 0 0 2px var(--canal); }
.plan-carte-lien { color: inherit; text-decoration: none; }
.plan-carte-lien:hover { color: var(--canal); text-decoration: underline; }
.plan-carte-tete { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
@media (max-width: 1000px) {
  .js .plan-zone { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .plan-detail { position: static; }
  .plan-recherche { max-width: none; width: 100%; }
}
@media (max-width: 1000px) { .plan-detail.vide { display: none; } }
.plan-aide { display: none; }
@media (max-width: 720px) {
  .plan-panneau { padding: 6px; }
  .plan-cadre { overflow: auto; max-height: 60vh; border-radius: var(--radius); background: var(--surface-2); }
  .plan-cadre .plan-svg { width: 1200px; max-width: none; }
  .plan-aide { display: block; margin: 8px 4px 0; }
  .plan-lot text { font-size: 28px; }
}
@media print { .plan-zone, .js .plan-zone { grid-template-columns: minmax(0, 1fr); } .plan-detail, .plan-recherche { display: none !important; } .plan-carte { break-inside: avoid; } }

/* ------------------------------------------------------------- annuaire */
.annu-sommaire { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.annu-sommaire a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: .88rem; }
.annu-sommaire a:hover { border-color: var(--canal); color: var(--canal-ink); }
.annu-groupe { margin-bottom: 22px; scroll-margin-top: 80px; }
.annu-groupe > h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-bottom: 8px; }
.annu-groupe .count, .annu-sommaire .count { font: 600 .75rem/1 var(--font); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 3px 7px; }
.annu-liste { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow); overflow: hidden; }
.annu-item + .annu-item { border-top: 1px solid var(--line); }
.annu-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.annu-item:has(.annu-ligne[open]) { background: var(--surface-2); }
.annu-ligne { scroll-margin-top: 80px; }
.annu-ligne > summary { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; min-height: 52px; padding: 8px 16px 8px 40px; cursor: pointer; list-style: none; position: relative; }
.annu-ligne > summary::-webkit-details-marker { display: none; }
.annu-ligne > summary::before { content: ""; position: absolute; left: 18px; top: 50%; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(-45deg); transition: transform .15s; }
.annu-ligne[open] > summary::before { transform: translateY(-60%) rotate(45deg); }
.annu-ligne > summary:hover { background: var(--surface-2); }
.annu-ligne:target > summary { box-shadow: inset 3px 0 0 var(--canal); }
.annu-titre { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; }
.annu-titre small { color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.annu-ligne[open] .annu-titre small { white-space: normal; }
.annu-rapide { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 9px 16px 9px 0; }
.annu-rapide .btn { min-height: 36px; padding: 5px 12px; }
.annu-rapide .ico { width: 15px; height: 15px; }
.annu-numero { display: inline-flex; align-items: center; min-height: 34px; color: var(--muted); font-size: .88rem; }
.annu-detail { padding: 4px 16px 14px 40px; }
.annu-detail .kv { margin: 6px 0 0; }
.annu-detail a { overflow-wrap: anywhere; }
.annu-multi { white-space: pre-line; }
.annu-notes { margin-top: 8px; font-size: .92rem; color: var(--muted); }
.annu-notes > :first-child { margin-top: 0; }
.annu-modifier { margin: 10px 0 0; }
.annu-personnes { list-style: none; margin: 6px 0 8px; padding: 0; }
.annu-personnes li { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.annu-personnes li strong { flex: 0 0 200px; }
@media (max-width: 720px) {
  .annu-item { grid-template-columns: minmax(0, 1fr); }
  .annu-rapide { justify-content: flex-start; padding: 0 12px 12px 34px; }
  .annu-item:has(.annu-ligne[open]) .annu-rapide { display: none; } /* le détail déplié donne déjà les numéros */
  .annu-ligne > summary { padding: 10px 12px 10px 34px; }
  .annu-ligne > summary::before { left: 14px; }
  .annu-detail { padding: 4px 12px 14px 34px; }
  .annu-personnes li { flex-direction: column; }
  .annu-personnes li strong { flex: none; }
}

/* ------------------------------------------------- écrans tactiles et étroits */
@media (pointer: coarse) {
  .check { padding: 10px 0; margin: 0 0 4px; }
  .checks .check { margin: 0; }
  .btn.small, .annu-rapide .btn, .annu-sommaire a { min-height: 44px; }
  details > summary:not(.btn) { padding-block: 10px; }
  .foot a { display: inline-block; padding: 12px 0; }
}
@media (max-width: 720px) { .btn { white-space: normal; text-align: center; } }
