/* kikivaou — feuille de style (même langage visuel qu'AquaSaison) */
:root {
  --side: #1c3441; --side-active: #2f5862; --side-text: #d3e0e1; --side-muted: #8aa3a8;
  --bg: #f1f4f4; --card: #fff; --line: #e3e9e9; --line-2: #eef2f2;
  --ink: #16252e; --muted: #6a7e86; --soft: #9aabb0;
  --teal: #3e8e7e; --teal-d: #2f7366; --teal-l: #e4f3ee;
  --slate: #3d6480; --violet: #7b5ea7; --rust: #a4582b; --gold: #c08a2e; --red: #b5475f;
  --r-card: 22px; --shadow: 0 1px 2px rgba(20, 40, 50, .04), 0 10px 28px rgba(20, 40, 50, .05);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --dw: 42px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
svg.i { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }

/* ---------- structure */
.shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--side) 300px, transparent 300px); }
.sidebar { background: var(--side); color: var(--side-text); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 30px 18px 18px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 14px; padding: 0 4px 26px; }
.logo { width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(150deg, #66bba8, #3e8e7e 70%); display: grid; place-items: center; color: #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .25); flex: none; }
.logo svg.i { width: 28px; height: 28px; stroke-width: 2.1; }
.brand-name { font-size: 29px; font-weight: 800; letter-spacing: -.035em; color: #fff; }
.nav-label { font-size: 12.5px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--side-muted); padding: 20px 16px 10px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 18px; padding: 15px 18px; border-radius: 16px; text-decoration: none; color: var(--side-text); font-weight: 600; font-size: 17px; transition: background .15s; }
.nav-item:hover { background: rgba(255, 255, 255, .05); }
.nav-item.active { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 #6cc3b0; }
.nav-ico { color: #b9c9cc; } .nav-item.active .nav-ico { color: #fff; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .09); padding: 16px 4px 0; display: flex; align-items: center; gap: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; font-size: 18px; }
.avatar.sm { width: 36px; height: 36px; font-size: 14px; }
.who { display: flex; flex-direction: column; min-width: 0; flex: 1; } .who b { color: #fff; font-size: 17px; } .who span { color: var(--side-muted); font-size: 14px; }
.icon-btn { border: 0; background: transparent; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.icon-btn:hover { background: rgba(0, 0, 0, .05); }
.logout { background: rgba(255, 255, 255, .12); color: #fff; } .logout:hover { background: rgba(255, 255, 255, .2); }
.mobilebar, .scrim { display: none; }
.main { padding: 44px 52px 70px; min-width: 0; }

/* ---------- en-tête de page */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.eyebrow { color: var(--teal); font-weight: 800; font-size: 13.5px; letter-spacing: .32em; text-transform: uppercase; margin-bottom: 10px; }
h1 { font-size: 50px; line-height: 1.05; margin: 0; font-weight: 800; letter-spacing: -.04em; }
.head-right { display: flex; align-items: center; gap: 16px; }
.pill-role { background: var(--teal-l); color: var(--teal-d); font-weight: 700; font-size: 15px; padding: 10px 18px; border-radius: 999px; }

/* ---------- boutons */
.btn { border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 14px 24px; font-weight: 700; font-size: 16.5px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: #cbd6d6; }
.btn svg.i { width: 19px; height: 19px; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-d); border-color: var(--teal-d); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-ghost { color: var(--red); border-color: #efd3da; }
.btn.sm { padding: 9px 15px; font-size: 14.5px; border-radius: 12px; }
.btn.full { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.actions { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 44px; }

/* ---------- cartes */
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; margin-bottom: 30px; }
.grid3.grid4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid3.grid4 .stat-value { font-size: 50px; }
.stat-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid3.users { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.stat { padding: 32px 34px; min-height: 230px; display: flex; flex-direction: column; }
.card-label { display: flex; align-items: center; gap: 14px; color: var(--muted); font-weight: 650; font-size: 18px; }
.ring { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #a9b8bc; display: grid; place-items: center; flex: none; }
.ring::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--rc, #7d9298); }
.stat-value { font-size: 62px; font-weight: 800; letter-spacing: -.045em; margin: auto 0 16px; padding-top: 28px; line-height: 1; }
.stat-value small { font-size: 20px; font-weight: 600; letter-spacing: 0; margin-left: 6px; opacity: .8; }
.stat-sub { color: var(--muted); font-size: 16px; line-height: 1.55; }
.section { padding: 28px 32px; margin-bottom: 28px; }
.section-title { font-weight: 800; font-size: 21px; letter-spacing: -.015em; margin: 0 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.empty { color: var(--muted); padding: 16px 0 4px; }

/* ---------- liste de séjours */
.stay-row { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; background: transparent; padding: 15px 4px; border-top: 1px solid var(--line-2); text-align: left; border-radius: 0; }
.stay-row:first-of-type { border-top: 0; }
.stay-row:hover .stay-main b { color: var(--teal-d); }
.stay-main { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; min-width: 0; }
.stay-main b { font-size: 16px; }
.stay-meta { flex-basis: 100%; color: var(--muted); font-size: 14.5px; }
.chev { color: var(--soft); font-size: 22px; }
.house-pill { background: color-mix(in srgb, var(--c) 13%, white); color: var(--c); font-weight: 700; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge { font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #eef2f2; color: var(--muted); }
.badge.option { background: #fbf1df; color: #94650f; }
.badge.admin { background: var(--teal-l); color: var(--teal-d); }
.badge.off { background: #f6e8eb; color: #94374d; }

/* ---------- barre d'outils */
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.toolbar .grow { flex: 1; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav .icon-btn { background: #fff; border: 1px solid var(--line); font-size: 20px; }
.month-label { font-size: 23px; font-weight: 800; min-width: 190px; text-align: center; letter-spacing: -.025em; }
.seg { display: inline-flex; background: #e7eded; border-radius: 14px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 9px 16px; border-radius: 10px; font-weight: 700; color: var(--muted); font-size: 15px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .09); }
.seg.full { display: flex; } .seg.full button { flex: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 16px 6px 28px; color: var(--muted); font-size: 14px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 13px; height: 13px; border-radius: 4px; display: inline-block; background: var(--c); }
.legend i.hatch { background: repeating-linear-gradient(135deg, #8aa0a6 0 3px, #d6dfe1 3px 6px); }
.legend .sep { width: 1px; height: 16px; background: var(--line); }

/* ---------- calendrier consolidé */
.cal { overflow: hidden; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); background: #fafcfc; }
.cal-head div { padding: 13px 12px; font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--soft); }
.cal-week { position: relative; border-bottom: 1px solid var(--line); }
.cal-week:last-child { border-bottom: 0; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); height: 100%; }
.cal-day { border-right: 1px solid var(--line-2); padding: 8px 10px; cursor: pointer; transition: background .12s; }
.cal-day:last-child { border-right: 0; }
.cal-day:hover { background: #f5faf9; }
.cal-day.weekend { background: #fafbfb; }
.cal-day.out .num { color: #c5cfd2; }
.num { font-weight: 700; font-size: 14px; color: var(--muted); display: inline-block; min-width: 26px; text-align: center; padding: 2px 6px; border-radius: 999px; }
.cal-day.today .num { background: var(--teal); color: #fff; }
.cal-bars { position: absolute; inset: 0; pointer-events: none; }
.bar { position: absolute; height: 22px; border: 0; border-radius: 7px; background: var(--c); color: #fff; font-size: 12.5px; font-weight: 700; padding: 0 8px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: auto; display: flex; align-items: center; gap: 6px; box-shadow: inset 4px 0 0 var(--h, transparent), 0 1px 2px rgba(0, 0, 0, .12); transition: transform .1s, filter .1s; }
.bar:hover { filter: brightness(1.08); }
.bar.option { background: repeating-linear-gradient(135deg, var(--c) 0 7px, color-mix(in srgb, var(--c) 62%, white) 7px 14px); }
.bar .tag { font-style: normal; background: rgba(255, 255, 255, .24); border-radius: 4px; padding: 0 5px; font-size: 10.5px; letter-spacing: .04em; flex: none; }
.bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* ---------- planning par maison */
.plan { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.plan-inner { min-width: max-content; }
.plan-row { display: flex; border-bottom: 1px solid var(--line); }
.plan-row:last-child { border-bottom: 0; }
.plan-label { position: sticky; left: 0; z-index: 3; background: #fff; width: 220px; flex: none; padding: 12px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.plan-label b { font-size: 15.5px; } .plan-label span { font-size: 12.5px; color: var(--muted); }
.plan-head .plan-label { background: #fafcfc; }
.plan-track { position: relative; display: flex; }
.plan-cell { width: var(--dw); flex: none; border-right: 1px solid var(--line-2); cursor: pointer; }
.plan-cell:hover { background: #f3f9f8; }
.plan-cell.weekend { background: #f8fafa; }
.plan-cell.today { background: var(--teal-l); }
.plan-head .plan-cell { text-align: center; padding: 8px 0; cursor: default; font-size: 11.5px; color: var(--soft); font-weight: 700; background: #fafcfc; }
.plan-head .plan-cell b { display: block; font-size: 15px; color: var(--ink); margin-top: 2px; }
.plan-head .plan-cell.today b { color: var(--teal-d); }
.plan-head .plan-cell.weekend b { color: var(--muted); }
.plan .bar { height: 26px; font-size: 13px; }

/* ---------- formulaires */
.form .field, .field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field > span { font-weight: 700; font-size: 13.5px; color: var(--muted); }
.field > span em { font-weight: 500; font-style: normal; color: var(--soft); }
input, select, textarea { font: inherit; font-size: 16px; border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; background: #fbfcfc; width: 100%; color: var(--ink); -webkit-appearance: none; appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input[type="color"] { padding: 4px; height: 46px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--teal) 45%, transparent); border-color: var(--teal); background: #fff; }
textarea { resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { color: var(--muted); font-size: 14px; margin: -8px 0 16px; }
.form-error { background: #fbedf0; color: #8e2f45; border-radius: 13px; padding: 12px 15px; font-size: 14.5px; line-height: 1.5; margin-bottom: 12px; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.room-chip { border: 1px solid var(--line); background: #fff; border-radius: 13px; padding: 10px 12px; text-align: left; display: flex; flex-direction: column; gap: 3px; }
.room-chip b { font-size: 14.5px; } .room-chip small { color: var(--muted); font-size: 12.5px; }
.room-chip.on { border-color: var(--teal); background: var(--teal-l); box-shadow: inset 0 0 0 1px var(--teal); }
.room-chip.busy { background: #f6f8f8; cursor: not-allowed; } .room-chip.busy b { color: var(--soft); }
.room-chip.clash { border-color: var(--red); background: #fbedf0; box-shadow: inset 0 0 0 1px var(--red); }
.swatches { display: flex; gap: 9px; flex-wrap: wrap; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); background: var(--c); padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 18px; }
.check input { width: 20px; height: 20px; -webkit-appearance: checkbox; appearance: auto; accent-color: var(--teal); }
.copy-line { display: flex; gap: 8px; margin-bottom: 12px; } .copy-line input { font-size: 13px; color: var(--muted); }
.room-edit { display: grid; grid-template-columns: 1fr 150px 90px 42px; gap: 8px; margin-bottom: 8px; align-items: center; }
.room-edit-head { font-size: 12.5px; font-weight: 700; color: var(--soft); margin-bottom: 6px; }

/* ---------- 1.2 : inscription, bannières, agenda */
.login-alt { text-align: center; margin-top: 18px; color: var(--muted); font-size: 15px; }
.link-btn { border: 0; background: none; color: var(--teal-d); font-weight: 700; padding: 4px; text-decoration: underline; text-underline-offset: 3px; }
.nav-count { margin-left: auto; background: #e0a43a; color: #1c3441; font-size: 12.5px; font-weight: 800; min-width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; padding: 0 7px; }
.mobilebar [data-nav-open] { position: relative; }
.dot-alert { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: #e0a43a; box-shadow: 0 0 0 2px var(--side); }
.banners { display: flex; flex-direction: column; gap: 10px; margin: -12px 0 26px; }
.banner { display: flex; align-items: center; gap: 14px; background: var(--teal-l); color: var(--teal-d); border-radius: 16px; padding: 14px 18px; text-decoration: none; font-size: 15px; line-height: 1.4; }
.banner.warn { background: #fbf1df; color: #7d560f; }
.banner span:nth-child(2) { flex: 1; }
.agenda-box { background: #f4f8f8; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 2px 0 18px; }
.agenda-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.agenda-title svg.i { width: 18px; height: 18px; }
.agenda-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pending-box { border-color: #f0dcb4; background: #fffdf8; }
.muted { color: var(--soft); font-style: normal; font-weight: 500; }

/* ---------- 1.3 : participants */
.avatar.xs { width: 30px; height: 30px; font-size: 13px; }
.avatar.guest { background: #e3eaea; color: var(--muted); } .avatar.guest svg.i { width: 16px; height: 16px; }
.parts { display: flex; flex-direction: column; gap: 8px; }
.part-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1.25fr) 38px; gap: 10px; align-items: center; background: #f7fafa; border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 10px; }
.part-name { display: flex; flex-direction: column; min-width: 0; } .part-name b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.part-name small { color: var(--teal-d); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.part-row select, .part-row .part-guest { padding: 9px 34px 9px 11px; font-size: 15px; border-radius: 11px; background-color: #fff; }
.part-row .part-guest { padding-right: 11px; }
.part-row select.clash { border-color: var(--red); background-color: #fbedf0; }
.part-rm { width: 36px; height: 36px; color: var(--muted); } .part-rm svg.i { width: 18px; height: 18px; }
.add-zone { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.chips { display: contents; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px dashed #c4d2d2; background: #fff; border-radius: 999px; padding: 8px 14px 8px 11px; font-weight: 650; font-size: 14px; color: var(--ink); }
.chip::before { content: "+"; font-weight: 800; color: var(--teal-d); }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); order: -1; }
.chip.guest-chip::before { content: none; } .chip.guest-chip svg.i { width: 15px; height: 15px; color: var(--teal-d); }
.chip:hover { border-color: var(--teal); background: var(--teal-l); }
.chip.masked { opacity: .5; } .chip small { font-size: 11px; color: var(--muted); }
.parts-line { color: var(--ink) !important; opacity: .75; font-size: 13.5px !important; }
.grp { line-height: 1.55; } .grp span { color: var(--muted); }

/* ---------- 1.3 : météo */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 4px 14px; }
.section-head h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.wx-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
/* tableau de bord : un logement par colonne, sa météo dessous (remplissage par colonne) */
.dash { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 26px; margin-bottom: 26px; }
.dash-houses.with-wx { grid-auto-flow: column; grid-template-rows: auto auto; }
.dash .stat-value { font-size: 50px; }
.dash .wx-now .stat-value { font-size: 50px; }
.dash-houses > .stat:not(.wx) .stat-value, .dash-me .stat-value { margin-top: 0; }
.wx-src { color: var(--muted); font-size: 13px; margin: -12px 4px 26px; text-align: right; }

/* ---------- piscine */
.house-tabs { display: inline-flex; gap: 4px; background: #e7eded; border-radius: 14px; padding: 4px; margin: -18px 0 26px; }
.house-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 10px; font-weight: 700; color: var(--muted); text-decoration: none; font-size: 15px; }
.house-tabs a svg.i { width: 18px; height: 18px; }
.house-tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .09); }
.pool-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.pool-tabs a { padding: 11px 14px; font-weight: 700; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; font-size: 15px; white-space: nowrap; }
.pool-tabs a.on { color: var(--teal-d); border-bottom-color: var(--teal); }
.pool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 26px; }
.pool-grid .stat { min-height: 0; padding: 26px 28px; }
.pool-grid .stat-value { font-size: 44px; padding-top: 18px; margin-bottom: 12px; }
.pool-grid .stat-sub { font-size: 14.5px; }
.toolbar-title { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.pchart-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 26px; }
.pchart-card.wide { grid-column: 1 / -1; }
.pchart { width: 100%; height: auto; display: block; margin-top: 8px; }
.pchart .cg { stroke: #e9eeee; stroke-width: 1; }
.pchart .ct { stroke: #c9a46f; stroke-width: 1.5; stroke-dasharray: 6 5; }
.pchart .cl { font-size: 12px; fill: #8aa0a6; font-family: var(--font); }
.pchart .ctl { fill: #a88049; font-weight: 600; }
.chart-empty { color: var(--muted); padding: 40px 0; text-align: center; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 14px; height: 4px; border-radius: 2px; background: var(--c); display: inline-block; }
.chart-legend i.ldash { background: none; height: 0; border-top: 2px dashed #c9a46f; border-radius: 0; }
.ptable-wrap { overflow-x: auto; margin: 6px -4px 0; }
.ptable { width: 100%; border-collapse: collapse; font-size: 15px; }
.ptable th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 700; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td { padding: 12px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.ptable td.pn { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ptable .meta { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.muted { color: var(--muted); }
.drop { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; border: 2px dashed #c4d2d2; border-radius: 18px; padding: 34px 20px; cursor: pointer; color: var(--muted); margin-top: 8px; }
.drop:hover { border-color: var(--teal); background: var(--teal-l); }
.drop svg.i { width: 34px; height: 34px; color: var(--teal); }
.drop b { color: var(--ink); font-size: 17px; }
.ocr-grid { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 26px; margin-top: 10px; }
.ocr-img img { width: 100%; border-radius: 14px; border: 1px solid var(--line); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 10px; }
.shot { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 10px; font-size: 14px; line-height: 1.5; }
.shot:hover { border-color: var(--teal); }
.shot img { width: 64px; height: 110px; object-fit: cover; object-position: top; border-radius: 10px; flex: none; background: #eef3f3; }
.shot em { color: var(--muted); font-style: normal; }
.ptask .grow b { margin-right: 8px; }
.ptask.done .grow b { color: var(--muted); text-decoration: line-through; }
.pstatus { width: auto; padding: 8px 32px 8px 12px; font-size: 14px; border-radius: 11px; background-color: #fff; }
.season-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.season-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-align: left; box-shadow: var(--shadow); }
.season-tile span { font-weight: 700; color: var(--muted); font-size: 14px; }
.season-tile b { font-size: 30px; font-weight: 800; color: var(--teal-d); letter-spacing: -.03em; }
.season-tile small { color: var(--soft); font-size: 12.5px; }
.season-tile.empty-m b { color: var(--soft); }
.season-tile:hover { border-color: var(--teal); }
.asset .card-label { color: var(--ink); }
.asset-spec { color: var(--muted); margin: 10px 0 6px; font-weight: 600; }
.pool-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; text-decoration: none; }
.pool-pills svg.i { width: 18px; height: 18px; color: #2f7d9a; }
.pool-pills span { background: #e6f1f6; color: #22617a; font-weight: 700; font-size: 12.5px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.pool-pills span.old { background: #fbf1df; color: #7d560f; }
.pool-pills span.todo { background: #eef2f2; color: var(--muted); }
.pool-pills:hover span { background: #d6e9f1; }

/* ---------- énergie */
.en-pills svg.i { color: #b07a1e; } .en-pills span { background: #faf0dc; color: #7d560f; } .en-pills:hover span { background: #f3e3c2; }
.en-live .stat { min-height: 0; } .en-live .stat-value { padding-top: 20px; font-size: 42px; }
.en-day-label { min-width: 280px; font-size: 20px; }
.pchart .hit { fill: transparent; } .pchart .hit:hover { fill: rgba(22, 37, 46, .05); }
.pchart .prevtick { stroke: #16252e; stroke-width: 2; }
.en-table td.pn, .en-table th { text-align: right; } .en-table td:first-child, .en-table th:first-child { text-align: left; }
.en-table tr.mute td { color: var(--soft); } .en-table tr.tot td { border-top: 2px solid var(--line); border-bottom: 0; font-weight: 700; }
.en-help { margin-top: 16px; } .en-help summary { cursor: pointer; font-weight: 700; color: var(--teal-d); }
.en-help ol { padding-left: 20px; margin: 10px 0 0; line-height: 1.6; } .en-help code { font-size: 13px; background: #eef3f3; padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.en-paste { display: flex; gap: 10px; } .en-paste input { flex: 1; }
.month-nav .icon-btn[disabled] { opacity: .35; cursor: default; }

/* ---------- statistiques */
.stat-toolbar { gap: 14px 18px; margin-bottom: 30px; }
.stat-kpis .stat, .stat-seasons .stat { min-height: 0; }
.stat-kpis .stat-value { padding-top: 22px; }
.delta { font-weight: 700; font-size: 13.5px; color: var(--muted); }
.delta.up { color: var(--teal-d); } .delta.down { color: #94374d; }
.stat-note { color: var(--muted); font-size: 14px; margin: 14px 0 0; line-height: 1.5; }
.dotc { width: 11px; height: 11px; border-radius: 50%; background: var(--c); display: inline-block; flex: none; }
.hbars { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.hbar { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) minmax(150px, 240px); align-items: center; gap: 16px; padding: 9px 6px; border-radius: 12px; }
.hbar:hover { background: #f5f8f8; }
.hbar-label { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; min-width: 0; }
.hbar-label b { font-size: 15.5px; }
.hbar-track { height: 14px; background: #eef3f3; border-radius: 4px; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--c); border-radius: 0 4px 4px 0; }
.hbar-val { display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; color: var(--muted); }
.hbar-val b { font-size: 17px; color: var(--ink); }
.heat-wrap { overflow-x: auto; margin: 14px -4px 0; }
.heatmap { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 640px; table-layout: fixed; }
.heatmap th { font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 4px 2px; text-align: center; }
.heatmap th.cur { color: var(--teal-d); }
.heatmap tr > th:first-child { text-align: left; width: 128px; font-size: 14.5px; color: var(--ink); white-space: nowrap; }
.heatmap tr > th:first-child .dotc { margin-right: 8px; }
.heatmap tr.all > th:first-child { color: var(--muted); }
.heatmap tr > th:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; }
.stat-toolbar .seg button { white-space: nowrap; }
.heat { height: 46px; border-radius: 8px; text-align: center; font-weight: 750; font-size: 15px; color: var(--ink); cursor: default; }
.heat small { font-size: 10.5px; font-weight: 600; margin-left: 1px; opacity: .75; }
.heat.dark { color: #fff; } .heat.zero { color: var(--soft); font-weight: 600; }
.heat:hover { outline: 2px solid var(--ink); outline-offset: -2px; }
.heatmap tr.all .heat { height: 38px; }
.season .card-label { justify-content: space-between; }
.season.top { border-color: #b9ddd2; }
.season .stat-value { padding-top: 18px; margin-bottom: 12px; color: var(--teal-d); }
.season-bar { height: 8px; border-radius: 4px; background: #eef3f3; overflow: hidden; margin-bottom: 12px; }
.season-bar span { display: block; height: 100%; background: var(--teal); border-radius: 0 4px 4px 0; }
.stat-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; }
.stat-two .section { margin-bottom: 28px; }
.vbars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; margin-top: 14px; }
.vbar { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vbar-col { width: 100%; max-width: 44px; height: 150px; display: flex; align-items: flex-end; background: #f4f7f7; border-radius: 4px; }
.vbar-col > div { width: 100%; background: var(--slate); border-radius: 4px 4px 0 0; min-height: 0; }
.vbar:hover .vbar-col > div { background: #2d4d63; }
.vbar-val { font-weight: 750; font-size: 14px; } .vbar-lab { font-size: 13px; color: var(--muted); font-weight: 650; }
.facts { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }
.fact { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: baseline; }
.fact b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); white-space: nowrap; }
.fact span { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.rec-label { width: 170px; flex: none; color: var(--muted); font-weight: 650; font-size: 14px; }
.stay-row.static { cursor: default; }
.wx { min-height: 0; }
.wx-now { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.wx-now .stat-value { margin: 0; padding: 0; }
.wx-big .wx-svg { width: 66px; height: 66px; display: block; }
.wx .stat-sub { margin-top: 12px; }
.wx-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 16px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.wx-day { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; color: var(--muted); }
.wx-day .wx-svg { width: 30px; height: 30px; } .wx-day b { font-size: 15px; } .wx-day small { font-size: 12.5px; }
.wx-empty { color: var(--muted); margin-top: 24px; }
.plan-wx .plan-track { height: 56px; }
.wx-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: default; }
.wx-cell .wx-svg { width: 24px; height: 24px; } .wx-cell b { font-size: 12px; }
.plan-wx .plan-cell:hover { background: inherit; }

/* ---------- 1.4 : sécurité */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.chk { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; }
.chk.ok { background: var(--teal-l); color: var(--teal-d); } .chk.ko { background: #fbf1df; color: #94650f; }
.sev { width: 10px; height: 10px; border-radius: 50%; background: #c9d4d6; flex: none; }
.sev.ok { background: var(--teal); } .sev.warn { background: #e0a43a; } .sev.bad { background: var(--red); }

/* ---------- visibilité des logements */
.vis-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.vis-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 13px; padding: 10px 12px; cursor: pointer; background: #fff; }
.vis-item input { width: 20px; height: 20px; flex: none; -webkit-appearance: checkbox; appearance: auto; accent-color: var(--teal); }
.vis-item span { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; min-width: 0; }
.vis-item i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.vis-item b { font-size: 14.5px; } .vis-item small { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.vis-item:has(input:not(:checked)) { background: #f6f8f8; } .vis-item:has(input:not(:checked)) b { color: var(--soft); text-decoration: line-through; }
.vis-item.locked { cursor: default; opacity: .8; }
.dimmed { opacity: .45; pointer-events: none; }
.vis-summary { font-size: 13.5px; color: var(--teal-d); font-weight: 600; }
.vis-summary.restricted { color: #94650f; }

/* ---------- utilisateurs / logements / sauvegardes */
.user-card { padding: 22px 24px; display: flex; gap: 14px; align-items: center; }
.user-card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.user-card .info b { font-size: 17px; } .user-card .info span { color: var(--muted); font-size: 14px; }
.user-card .badges { display: flex; gap: 6px; flex-wrap: wrap; }
.house-card { padding: 28px 30px; display: flex; flex-direction: column; gap: 14px; }
.house-card h3 { margin: 0; font-size: 26px; letter-spacing: -.03em; display: flex; align-items: center; gap: 12px; }
.house-card h3 i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
.house-card .loc { color: var(--muted); }
.room-list { display: flex; flex-wrap: wrap; gap: 8px; }
.room-list span { background: #f1f5f5; border-radius: 10px; padding: 6px 11px; font-size: 13.5px; color: var(--muted); }
.room-list span b { color: var(--ink); font-weight: 650; }
.table-row { display: flex; align-items: center; gap: 14px; padding: 13px 2px; border-top: 1px solid var(--line-2); }
.table-row:first-of-type { border-top: 0; }
.table-row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; } .table-row .meta { color: var(--muted); font-size: 14px; }

/* ---------- connexion */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #244452 0, var(--side) 55%); }
.login-card { width: min(440px, 100%); background: #fff; border-radius: 28px; padding: 38px 36px 34px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.login-card .brand { padding: 0 0 26px; } .login-card .brand-name { color: var(--ink); }
.login-card h1 { font-size: 36px; margin-bottom: 26px; }

/* ---------- fenêtres modales & notifications */
.modal-wrap { position: fixed; inset: 0; background: rgba(14, 28, 36, .48); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; z-index: 100; overflow-y: auto; animation: fade .15s ease; }
.modal { background: #fff; border-radius: 26px; width: min(580px, 100%); box-shadow: 0 30px 80px rgba(0, 0, 0, .28); max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .18s ease; }
.modal.wide { width: min(780px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 24px 28px 8px; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.modal-body { padding: 12px 28px 6px; overflow-y: auto; }
.modal-body p { line-height: 1.55; }
.modal-foot { display: flex; gap: 10px; padding: 16px 28px 24px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line-2); }
.spacer { flex: 1; }
.detail { display: grid; grid-template-columns: 130px 1fr; gap: 10px 16px; margin: 6px 0 14px; }
.detail dt { color: var(--muted); font-weight: 650; } .detail dd { margin: 0; }
#toast-root { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; width: min(520px, calc(100% - 32px)); }
.toast { background: var(--side); color: #fff; padding: 14px 18px; border-radius: 15px; font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); transition: opacity .4s, transform .4s; line-height: 1.45; }
.toast.warn { background: #8a5b12; } .toast.err { background: #8e2f45; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }

/* ---------- mobile & tablette */
@media (max-width: 1100px) {
  .main { padding: 36px 30px 60px; }
  h1 { font-size: 42px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 290px; transform: translateX(-102%); transition: transform .22s ease; z-index: 60; padding-top: calc(24px + env(safe-area-inset-top)); }
  .nav-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .3); }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 55; }
  .mobilebar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; background: var(--side); color: #fff; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }
  .mobilebar .icon-btn { color: #fff; } .mobilebar .icon-btn:hover { background: rgba(255, 255, 255, .1); }
  .mobilebar .brand { padding: 0; flex: 1; gap: 10px; } .mobilebar .logo { width: 34px; height: 34px; border-radius: 10px; } .mobilebar .logo svg.i { width: 19px; height: 19px; }
  .mobilebar .brand-name { font-size: 20px; }
  .main { padding: 22px 16px 50px; }
  .page-head { margin-bottom: 22px; } .page-head .head-right { display: none; }
  .eyebrow { font-size: 11.5px; letter-spacing: .24em; }
  h1 { font-size: 34px; }
  .actions { margin-bottom: 26px; gap: 12px; } .actions .btn { flex: 1; padding: 13px 14px; font-size: 15.5px; }
  .grid3, .grid3.grid4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid3.users { grid-template-columns: 1fr; }
  .grid3.grid4 .stat-value { font-size: 40px; }
  .stat { padding: 20px; min-height: 0; } .card-label { font-size: 14.5px; gap: 9px; } .ring { width: 18px; height: 18px; } .ring::after { width: 8px; height: 8px; }
  .stat-value { font-size: 40px; padding-top: 18px; margin-bottom: 10px; } .stat-value small { font-size: 15px; }
  .stat-sub { font-size: 13.5px; }
  .section { padding: 20px 18px; }
  .month-label { font-size: 19px; min-width: 150px; }
  .toolbar .grow { display: none; } .toolbar > .btn.primary { width: 100%; }
  .cal-head div { padding: 10px 4px; text-align: center; letter-spacing: .05em; font-size: 11px; }
  .cal-day { padding: 5px 2px; text-align: center; }
  .num { font-size: 12.5px; min-width: 22px; padding: 1px 4px; }
  .bar { font-size: 11px; padding: 0 4px; height: 20px; border-radius: 5px; gap: 3px; }
  .bar .tag { display: none; }
  .plan-label { width: 128px; padding: 10px 10px; } .plan-label b { font-size: 13.5px; } .plan-label span { font-size: 11px; }
  :root { --dw: 36px; }
  .modal-wrap { place-items: end center; padding: 0; }
  .modal, .modal.wide { width: 100%; border-radius: 24px 24px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
  .modal-head, .modal-body, .modal-foot { padding-left: 20px; padding-right: 20px; }
  .room-edit { grid-template-columns: 1fr 104px 64px 38px; gap: 6px; }
  .part-row { grid-template-columns: 28px minmax(0, 1fr) 36px; grid-template-areas: "a n x" "s s s"; row-gap: 8px; }
  .part-row > .avatar { grid-area: a; } .part-row > .part-name, .part-row > .part-guest { grid-area: n; } .part-row > select { grid-area: s; } .part-row > :last-child { grid-area: x; }
  .wx-grid { grid-template-columns: 1fr; }
  .dash { gap: 12px; margin-bottom: 14px; }
  .dash-houses.with-wx { grid-auto-flow: row; grid-template-columns: 1fr; grid-template-rows: none; }
  .dash-houses.with-wx > .wx { margin-bottom: 10px; }
  .dash-houses:not(.with-wx), .dash-me { grid-template-columns: 1fr 1fr; }
  .dash .stat-value, .dash .wx-now .stat-value { font-size: 40px; }
  .wx-src { margin: -4px 4px 18px; text-align: left; }
  .house-tabs { margin: -6px 0 18px; display: flex; } .house-tabs a { flex: 1; justify-content: center; }
  .pool-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 20px; padding: 0 12px; scrollbar-width: none; }
  .pool-tabs a { padding: 10px 10px; font-size: 14px; }
  .pool-grid { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .pool-grid .stat { padding: 14px 12px; } .pool-grid .stat-value { font-size: 26px; padding-top: 10px; margin-bottom: 6px; } .pool-grid .stat-sub { font-size: 12px; }
  .pool-grid .card-label { font-size: 12.5px; } .pool-grid .ring { display: none; }
  .pchart-grid { grid-template-columns: 1fr; }
  .ocr-grid { grid-template-columns: 1fr; } .ocr-img img { max-height: 320px; width: auto; max-width: 100%; }
  .season-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ptask { flex-wrap: wrap; } .ptask .grow { flex-basis: 100%; }
  .toolbar-title { font-size: 21px; }
  .en-day-label { min-width: 0; font-size: 16px; } .en-paste { flex-direction: column; }
  .en-bilan { grid-template-columns: 1fr 1fr; }
  .house-tabs a { padding: 9px 6px; gap: 5px; font-size: 14px; } .house-tabs a svg.i { width: 16px; height: 16px; }
  .pchart .cl { font-size: 15px; }
  .pchart .cl { font-size: 19px; } .pchart circle { r: 6; }
  .section-title { flex-wrap: wrap; }
  .stat-toolbar { gap: 10px; } .stat-toolbar .seg { width: 100%; flex-wrap: nowrap; } .stat-toolbar .seg button { flex: 1; padding: 8px 6px; font-size: 13.5px; }
  .hover-hint { display: none; }
  .heatmap tr > th:first-child { width: 96px; font-size: 13px; }
  .hbar-label .badge { display: none; }
  .hbar { grid-template-columns: 1fr auto; grid-template-areas: "l v" "t t"; gap: 6px 12px; padding: 8px 2px; }
  .hbar-label { grid-area: l; } .hbar-val { grid-area: v; text-align: right; } .hbar-track { grid-area: t; height: 10px; }
  .stat-two { grid-template-columns: 1fr; gap: 0; }
  .stat-two .section { margin-bottom: 14px; }
  .vbar-col { height: 110px; } .vbars { gap: 6px; }
  .fact { grid-template-columns: 96px 1fr; } .fact b { font-size: 21px; }
  .rec-label { width: 100%; flex-basis: 100%; font-size: 12.5px; }
  .stay-row:has(.rec-label) { flex-wrap: wrap; row-gap: 4px; }
  .section-head h2 { font-size: 21px; }
  .detail { grid-template-columns: 110px 1fr; }
}
@media (max-width: 520px) {
  .stat { padding: 16px 15px; } .card-label { font-size: 13.5px; align-items: flex-start; } .ring { margin-top: 1px; }
  .stat-value, .grid3.grid4 .stat-value, .dash .stat-value, .dash .wx-now .stat-value { font-size: 32px; } .stat-sub { font-size: 12.5px; }
  .modal-foot { gap: 8px; } .modal-foot .spacer { display: none; }
  .modal-foot .btn { flex: 1; padding: 12px 8px; font-size: 15px; }
  .row2 { gap: 10px; }
  .seg button { padding: 8px 12px; font-size: 14px; }
}
