/* Nouvel An 2027 — mobile d'abord, identité nuit / or / crème */
:root {
  --night: #0d1530;
  --night-2: #16214a;
  --gold: #e8b64c;
  --gold-soft: #fdf1d6;
  --cream: #f7f2e7;
  --ink: #1d2233;
  --muted: #6b7187;
  --line: #e7e1d3;
  --card: #ffffff;
  --ok: #1e6b33; --ok-bg: #e3f3e6;
  --warn: #6d4b00; --warn-bg: #fdf1d6;
  --bad: #8c1d18; --bad-bg: #fbe4e2;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(13,21,48,.05), 0 4px 14px rgba(13,21,48,.05);
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { font-family: "Fraunces", Georgia, serif; line-height: 1.15; margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; flex: none; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small, small { font-size: .82rem; }
.gold { color: var(--gold); }
.gold-text { color: #b5841f; }
.warn-text { color: var(--warn); font-family: "Inter", sans-serif; font-weight: 500; }
.big { font-size: 1.35rem; font-weight: 600; margin: .15rem 0; font-family: "Fraunces", serif; }
.empty { color: var(--muted); list-style: none; padding: 16px 0; text-align: center; }
.spacer { flex: 1; }

/* ---------- Boutons & contrôles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  background: var(--card); color: var(--night); font-weight: 600; font-size: .92rem;
  cursor: pointer; text-decoration: none; transition: transform .1s, background .15s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--night); color: #fff; }
.btn.ghost { background: transparent; border-color: rgba(13,21,48,.25); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger-ghost { background: transparent; color: var(--bad); border-color: rgba(140,29,24,.3); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: .85rem; }
.btn.small svg { width: 16px; height: 16px; }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 4px 0; color: var(--night); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: .88rem; }
.link.danger { color: var(--bad); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #f1ede4; cursor: pointer; font-size: 1rem; }
.x { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 8px; line-height: 1; }
.x:hover { color: var(--bad); background: var(--bad-bg); }
.pill { display: inline-block; font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #eef0f6; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--gold-soft); color: #7a5300; }
.tag { font-style: normal; font-size: .72rem; font-weight: 600; background: var(--gold-soft); color: #7a5300; padding: 2px 8px; border-radius: 999px; }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--night); font: 600 .75rem "Inter", sans-serif; vertical-align: middle; }
.badge.muted { background: #e6e2d8; color: var(--muted); }

.field { display: grid; gap: 6px; font-size: .85rem; font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea, .quick-add input {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .quick-add input:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,182,76,.25);
}
.num { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.num button { width: 44px; height: 44px; border: 0; background: #f6f3ec; font-size: 1.2rem; cursor: pointer; }
.num input { border: 0 !important; box-shadow: none !important; text-align: center; padding: 0 !important; -moz-appearance: textfield; }
.num input::-webkit-outer-spin-button, .num input::-webkit-inner-spin-button { -webkit-appearance: none; }
.form-error { color: var(--bad); font-size: .88rem; margin: 0; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--night); color: #fff; border-color: var(--night); }
.chip-sep { flex: none; width: 1px; background: var(--line); margin: 4px 2px; }

.segmented { display: flex; background: #ebe6da; border-radius: 12px; padding: 4px; margin: 0 0 14px; }
.segmented button { flex: 1; min-height: 38px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--muted); }
.segmented button[aria-selected="true"] { background: #fff; color: var(--night); box-shadow: var(--shadow); }

.progress { height: 8px; background: #ebe6da; border-radius: 999px; overflow: hidden; margin: 10px 0 14px; }
.progress span { display: block; height: 100%; background: var(--gold); border-radius: inherit; transition: width .5s; }

/* ---------- Démarrage, connexion ---------- */
.boot { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--night); }
.boot .logo { font-size: 1.6rem; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(232,182,76,.25); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { padding: 24px; text-align: center; }

.auth-screen {
  min-height: 100svh; display: grid; place-items: center; padding: 24px 16px calc(24px + var(--safe-b));
  background:
    radial-gradient(circle at 15% 15%, rgba(232,182,76,.22), transparent 42%),
    radial-gradient(circle at 85% 80%, rgba(120,140,255,.18), transparent 45%),
    linear-gradient(160deg, var(--night), var(--night-2));
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--card); border-radius: 24px; padding: 28px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); display: grid; gap: 14px;
}
.auth-card h1 { font-size: 2.4rem; }
.auth-card h2 { font-size: 1.6rem; }
.auth-card .eyebrow { color: var(--muted); }
.auth-lead { color: var(--muted); margin: 0; }
.auth-form { display: grid; gap: 12px; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.btn.google { border-color: var(--line); background: #fff; color: var(--ink); width: 100%; min-height: 48px; }
.btn.google svg { width: 20px; height: 20px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pending-icon { font-size: 2.6rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 600; margin: 0; }

/* ---------- Coque : barre haute, onglets ---------- */
.app { min-height: 100svh; padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(13,21,48,.96); backdrop-filter: blur(10px); color: #fff;
}
.logo { font-family: "Fraunces", serif; font-weight: 700; letter-spacing: .08em; color: var(--gold); text-decoration: none; font-size: 1.15rem; }
.avatar-btn {
  margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(232,182,76,.6);
  background: var(--night-2); color: var(--gold); font-weight: 700; cursor: pointer; overflow: hidden; padding: 0;
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.tabs-top { display: none; }
.tab { position: relative; display: flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer; border: 0; background: none; }
.dot-badge {
  position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--gold); color: var(--night); font: 700 .68rem/18px "Inter", sans-serif; font-style: normal; text-align: center;
}
.tabs-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.tabs-bottom .tab { flex: 1; flex-direction: column; justify-content: center; gap: 3px; color: var(--muted); font-size: .68rem; font-weight: 600; min-width: 0; }
.tabs-bottom .tab svg { width: 22px; height: 22px; }
.tabs-bottom .tab.active { color: var(--night); }
.tabs-bottom .tab.active svg { color: #b5841f; }

#views { max-width: 1100px; margin: 0 auto; padding: 16px; }
.view { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.view-head { margin: 4px 0 16px; }
.view-head h2 { font-size: 1.75rem; margin-bottom: 4px; }
.view-head p { margin: 0; }
.block { margin: 26px 0; }
.block > h2 { font-size: 1.4rem; margin-bottom: 12px; }
.block-title { font-size: 1.15rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer { text-align: center; color: var(--muted); font-size: .78rem; padding: 8px 16px 20px; }
.footer p { margin: 0; }

.card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 600 .75rem "Inter", sans-serif; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.card h3 svg { width: 16px; height: 16px; }
.card h4 { font-size: 1.02rem; margin-bottom: 6px; }
.card p { margin: 0 0 6px; }
.card.accent { background: linear-gradient(150deg, var(--night), var(--night-2)); color: #fff; }
.card.accent h3, .card.accent .muted { color: rgba(255,255,255,.7); }
.card.accent .progress { background: rgba(255,255,255,.15); }
.price { font: 700 2rem "Fraunces", serif; margin: 2px 0 4px; }
.info-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.info-grid .btn { margin-top: 8px; }

/* ---------- Accueil ---------- */
.hero-card {
  border-radius: 22px; padding: 22px 18px; color: #fff; margin-bottom: 14px;
  background:
    radial-gradient(circle at 20% 20%, rgba(232,182,76,.22), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(120,140,255,.18), transparent 45%),
    linear-gradient(160deg, var(--night), var(--night-2));
}
.hero-card .eyebrow { color: rgba(255,255,255,.7); }
.hero-sub { margin: 14px 0 0; opacity: .8; font-size: .9rem; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.countdown div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 10px 4px; text-align: center; }
.countdown strong { display: block; font: 700 1.7rem "Fraunces", serif; color: var(--gold); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; opacity: .7; }
.stats { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.stats::-webkit-scrollbar { display: none; }
.stat { flex: 1 0 104px; background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); text-decoration: none; }
.stat strong { display: block; font: 700 1.35rem "Fraunces", serif; color: var(--night); }
.stat span { font-size: .74rem; color: var(--muted); }
.stat.warn strong { color: #b5841f; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); background: #ddd; scroll-snap-align: start; }
.features { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.features li { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.features .emoji { font-size: 1.4rem; }
.features strong { display: block; font-size: .88rem; }
.features small { color: var(--muted); font-size: .75rem; }
.checklist { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.checklist label { display: flex; gap: 12px; align-items: center; background: var(--card); padding: 14px 16px; border-radius: 14px; cursor: pointer; box-shadow: var(--shadow); }
.checklist input { width: 20px; height: 20px; accent-color: var(--night); flex: none; }
.checklist input:checked + span { text-decoration: line-through; color: var(--muted); }
.checklist .tag { margin-left: auto; }

/* ---------- Contrat ---------- */
.contract-top { display: grid; gap: 12px; }
.ticks { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.ticks li::before { content: "✓"; color: var(--gold); font-weight: 700; margin-right: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline li { display: flex; gap: 14px; padding: 0 0 16px; position: relative; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.timeline .dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: #fff; border: 2px solid var(--line); z-index: 1; }
.timeline .done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.timeline .todo .dot { border-color: var(--gold); }
.timeline .past .dot { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.timeline strong { display: block; font-size: .95rem; }
.timeline small { color: var(--muted); }
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.rules li { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.rules li.strong { background: var(--bad-bg); }
.rules li.strong strong { color: var(--bad); }
.rules .emoji { font-size: 1.4rem; line-height: 1.2; }
.rules strong { display: block; font-size: .95rem; }
.rules small { color: var(--muted); }
.card.ticks { margin: 0; padding: 16px 18px; }
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.table tfoot td { font-weight: 700; border-bottom: 0; }

/* ---------- Chambres ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.kpis div { background: var(--card); border-radius: 12px; padding: 10px 4px; text-align: center; box-shadow: var(--shadow); min-width: 0; }
.kpis strong { display: block; font: 700 1.15rem "Fraunces", serif; color: var(--night); }
.kpis span { display: block; font-size: .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; }
.kpis .bad strong { color: var(--bad); }
.alerts { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 14px; }
.alerts summary { padding: 14px 16px; font-weight: 600; cursor: pointer; list-style: none; }
.alerts summary::-webkit-details-marker { display: none; }
.alerts summary::after { content: "▾"; float: right; color: var(--muted); }
.alerts[open] summary::after { content: "▴"; }
.alerts ul { list-style: none; margin: 0; padding: 0 12px 12px; display: grid; gap: 6px; }
.alert { padding: 9px 12px; border-radius: 10px; font-size: .88rem; background: #eef0f6; margin: 0 0 14px; }
.alerts .alert { margin: 0; }
.alert.error { background: var(--bad-bg); color: var(--bad); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.lodging[data-seg-active="rooms"] .families-col, .lodging[data-seg-active="families"] .rooms-col { display: none; }
.col-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.col-head h3 { font-size: 1.15rem; }
.families { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; min-height: 60px; border-radius: var(--radius); }
.family { min-width: 0; display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 12px 12px 12px 14px; box-shadow: var(--shadow); border-left: 4px solid #5aa36a; }
.family.todo { border-left-color: var(--gold); }
.family-main { flex: 1; min-width: 0; cursor: pointer; }
.family-main strong { font-size: .98rem; }
.family-main small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.where { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.where i { font-style: normal; font-size: .72rem; font-weight: 600; background: var(--ok-bg); color: var(--ok); padding: 2px 8px; border-radius: 999px; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.room { background: var(--card); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); border: 2px solid transparent; display: flex; flex-direction: column; gap: 8px; min-width: 0; overflow: hidden; }
.room-photo { margin: -14px -14px 2px; aspect-ratio: 16/9; background: linear-gradient(150deg, var(--night), var(--night-2)); display: grid; place-items: center; color: rgba(232,182,76,.7); cursor: pointer; position: relative; }
.room-photo.empty { aspect-ratio: auto; height: 56px; background: #f3efe6; color: #c9bfa8; }
.room-photo.empty svg { width: 24px; height: 24px; }
.room-photo { overflow: hidden; }
.room-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.room-photo svg { width: 34px; height: 34px; }
.room-photo .add-photo { position: absolute; bottom: 8px; right: 8px; font-size: .72rem; font-weight: 600; background: rgba(255,255,255,.92); color: var(--night); padding: 4px 10px; border-radius: 999px; }
.room-specs { display: flex; flex-wrap: wrap; gap: 4px; }
.room-specs span { font-size: .72rem; background: #f3efe6; color: #4a5068; padding: 3px 8px; border-radius: 999px; }
.room-desc { margin: 0; font-size: .84rem; color: #4a5068; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.photo-field { display: grid; gap: 8px; }
.photo-field .preview { aspect-ratio: 16/9; border-radius: 12px; background: #ebe6da center/cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: .85rem; }
.photo-field .row { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-field input[type=file] { display: none; }
.room header { display: flex; justify-content: space-between; gap: 8px; cursor: pointer; }
.room h4 { font-size: 1.05rem; }
.room header small { color: var(--muted); }
.room .count { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.room.full .count { color: var(--ok); }
.room.over { border-color: #e8a19b; }
.room.over .count { color: var(--bad); }
.meter { height: 5px; border-radius: 999px; background: #efebe2; overflow: hidden; }
.meter span { display: block; height: 100%; background: #5aa36a; border-radius: inherit; }
.room.over .meter span { background: var(--bad); }
.occupants { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.occupant { display: flex; align-items: center; gap: 8px; background: var(--cream); border-radius: 10px; padding: 6px 6px 6px 12px; font-size: .9rem; }
.occupant > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1rem; }
.stepper b { min-width: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.add-in { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; border: 1.5px dashed #d8d1c1; border-radius: 10px; background: transparent; color: var(--muted); font-size: .85rem; cursor: pointer; }
.add-in svg { width: 16px; height: 16px; }
.add-in:hover { border-color: var(--gold); color: var(--night); }
.drop-over { outline: 2px dashed var(--gold); outline-offset: 2px; background-color: #fff8e6 !important; }

/* ---------- Calendrier ---------- */
.day-chips { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-bottom: 12px; }
.day-chips button { position: relative; display: grid; justify-items: center; gap: 0; padding: 8px 0; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.day-chips small { font-size: .62rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.day-chips b { font: 700 1.05rem "Fraunces", serif; }
.day-chips .nye b { color: #b5841f; }
.day-chips button[aria-selected="true"] { background: var(--night); border-color: var(--night); color: #fff; }
.day-chips button[aria-selected="true"] small { color: rgba(255,255,255,.7); }
.day-chips button[aria-selected="true"] b { color: var(--gold); }
.day-chips .has { position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.calendar-wrap { margin-bottom: 22px; }
.calendar { display: grid; gap: 8px; }
.cal-corner, .cal-day, .cal-slot-label { display: none; }
.cal-cell { display: none; background: var(--card); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); gap: 8px; flex-direction: column; min-height: 64px; }
.calendar[data-day="2026-12-26"] [data-col="2026-12-26"], .calendar[data-day="2026-12-27"] [data-col="2026-12-27"],
.calendar[data-day="2026-12-28"] [data-col="2026-12-28"], .calendar[data-day="2026-12-29"] [data-col="2026-12-29"],
.calendar[data-day="2026-12-30"] [data-col="2026-12-30"], .calendar[data-day="2026-12-31"] [data-col="2026-12-31"],
.calendar[data-day="2027-01-01"] [data-col="2027-01-01"], .calendar[data-day="2027-01-02"] [data-col="2027-01-02"] { display: flex; }
.calendar .cal-day[data-col] { display: none !important; }
.slot-name { font: 600 .72rem "Inter", sans-serif; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.cal-cell.closed { background: repeating-linear-gradient(45deg, #efece4, #efece4 6px, #f7f2e7 6px, #f7f2e7 12px); box-shadow: none; color: var(--muted); font-size: .85rem; }
.cal-item { display: flex; gap: 6px; align-items: center; background: var(--gold-soft); border-radius: 10px; padding: 8px 6px 8px 12px; font-size: .92rem; font-weight: 500; }
.cal-item span { flex: 1; }

/* ---------- Boîte à idées ---------- */
.ideas-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.ideas-head h3 { font-size: 1.25rem; }
.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 10px; min-height: 60px; border-radius: var(--radius); }
.idea { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.idea.scheduled { background: #fffdf7; }
.idea-top { display: flex; gap: 12px; align-items: flex-start; }
.idea-top > div { flex: 1; min-width: 0; }
.idea-top h4 { font-size: 1.02rem; }
.idea-top small { color: var(--muted); }
.idea .emoji { font-size: 1.7rem; line-height: 1; }
.idea-desc { margin: 0; font-size: .9rem; color: #3b4157; }
.votes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vote { min-height: 40px; border: 1px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer; font-size: .86rem; font-weight: 500; transition: background .15s, border-color .15s; }
.vote b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.vote.hot.on { background: #ffe4d1; border-color: #f0904a; }
.vote.cold.on { background: #dceaff; border-color: #6d97d6; }
.voters { margin: -2px 0 0; color: var(--muted); }
.schedule { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px dashed #d8d1c1; background: transparent; cursor: pointer; font-size: .86rem; color: var(--muted); }
.schedule svg { width: 16px; height: 16px; }
.schedule.set { border-style: solid; border-color: transparent; background: var(--ok-bg); color: var(--ok); font-weight: 600; }

/* ---------- Courses ---------- */
.quick-add { display: flex; gap: 8px; margin-bottom: 12px; }
.quick-add input { flex: 1; }
.quick-add .btn { width: 48px; padding: 0; min-height: 46px; }
.group-title { font: 600 .78rem "Inter", sans-serif; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 18px 0 8px; display: flex; gap: 6px; align-items: center; }
.group-title small { background: #e6e2d8; border-radius: 999px; padding: 1px 8px; }
.shop { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.shop li { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 12px; padding: 8px 10px; box-shadow: var(--shadow); }
.shop li.orphan { box-shadow: inset 4px 0 0 var(--gold), var(--shadow); }
.check { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #d8d1c1; background: #fff; display: grid; place-items: center; cursor: pointer; color: transparent; padding: 0; }
.check svg { width: 16px; height: 16px; }
.check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.shop-main { flex: 1; min-width: 0; cursor: pointer; }
.shop-main span { display: block; overflow: hidden; text-overflow: ellipsis; }
.shop-main small { color: var(--muted); }
.shop li.done .shop-main span { text-decoration: line-through; color: var(--muted); }
.who { flex: none; max-width: 42%; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: #eef0f6; font-size: .8rem; font-weight: 600; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who.empty { background: var(--gold-soft); color: #7a5300; }

/* ---------- Budget ---------- */
.budget-grid { display: grid; gap: 12px; }

/* ---------- Accueil : itinéraire et liens rapides ---------- */
.lieu-route { margin-top: 12px; width: 100%; }
.lieu-route svg { width: 18px; height: 18px; }
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qlink { display: flex; gap: 10px; align-items: center; text-decoration: none; padding: 14px; }
.qlink .emoji { font-size: 1.6rem; }
.qlink strong { display: block; font-size: .95rem; }
.qlink small { color: var(--muted); font-size: .76rem; }
.qlink.wa { box-shadow: inset 4px 0 0 #25d366, var(--shadow); }
.qlink.tc { box-shadow: inset 4px 0 0 #3b82c4, var(--shadow); }
@media (min-width: 760px) { .lieu-route { width: auto; } }

/* ---------- Page Familles ---------- */
.fam-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.fam-card { position: relative; width: 100%; min-height: 200px; border: 0; border-radius: 18px; padding: 14px; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(150deg, var(--night), var(--night-2)) center 30% / cover no-repeat;
  color: #fff; box-shadow: var(--shadow); transition: transform .15s; }
.fam-card:active { transform: scale(.985); }
.fam-badges { display: flex; gap: 6px; min-height: 22px; }
.fam-badges .tag { background: var(--gold); color: var(--night); }
.fam-info { display: grid; gap: 6px; }
.fam-info strong { font: 700 1.3rem "Fraunces", serif; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.fam-members { display: flex; flex-wrap: wrap; gap: 4px; }
.fam-members i { font-style: normal; font-size: .76rem; font-weight: 600; background: rgba(255,255,255,.9); color: var(--night); padding: 3px 9px; border-radius: 999px; }
.fam-info small { color: rgba(255,255,255,.85); font-size: .8rem; }
.fam-rooms ul { gap: 8px; }
.fam-room { display: grid !important; grid-template-columns: 56px 1fr auto !important; gap: 10px !important; align-items: center; }
.fam-room img { width: 56px; height: 42px; border-radius: 8px; object-fit: cover; }
.fam-room small { color: var(--muted); }
.trip-line { margin: -4px 0 10px; }
.rooms-page .col-head { margin-bottom: 10px; }

/* ---------- Familles : photo de fond, fiche, identité, journal ---------- */
.family.has-photo { background-size: cover; background-position: center 30%; color: #fff; min-height: 86px; border-left-color: var(--gold); }
.family.has-photo .family-main small { color: rgba(255,255,255,.82); }
.family.has-photo .where i { background: rgba(255,255,255,.9); }
.family.has-photo .pill { background: rgba(255,255,255,.9); color: var(--night); }
.family.has-photo .tag { background: var(--gold); color: var(--night); }
.fam-photo { position: relative; height: 170px; border-radius: 14px; background: #ebe6da center 30% / cover no-repeat; display: grid; place-items: center; color: var(--muted); margin-bottom: 12px; }
.fam-photo-actions { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; }
.fam-photo-actions .btn { margin: 0; background: rgba(255,255,255,.92); }
.members { background: #fff; border-radius: 14px; padding: 12px; box-shadow: var(--shadow); margin: 4px 0 12px; }
.members-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.members-head small { color: var(--muted); }
.members ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.members li { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; }
.members li > span { font-weight: 500; }
.members li > small { color: var(--muted); }
.members input, .members select { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 0; }
.members select { max-width: 150px; }
.identity-screen { position: fixed; inset: 0; z-index: 90; overflow-y: auto; }
.identity h2 { font-size: 1.8rem; }
.id-fams { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-height: 52svh; overflow-y: auto; }
.id-fam { width: 100%; min-height: 72px; border: 0; border-radius: 14px; padding: 12px 14px; text-align: left; cursor: pointer;
  background: var(--night) center 30% / cover no-repeat; color: #fff; display: grid; align-content: end; gap: 2px; }
.id-fam strong { font: 700 1.05rem "Fraunces", serif; }
.id-fam small { opacity: .85; }
.id-members { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.big { min-height: 48px; padding: 0 20px; font-size: 1rem; font-weight: 600; }
.log { list-style: none; margin: 8px 0 0; padding: 4px 14px; }
.log li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f0ece3; font-size: .88rem; }
.log li:last-child { border-bottom: 0; }
.log-when { color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.log small { display: block; color: var(--muted); }
.user-main .seen { color: var(--ok); }
.user-main .seen.never { color: var(--muted); }
.user-main .inline { display: inline; }

/* ---------- Panneaux avec photo (choix de chambre) ---------- */
.pick.with-img { flex-direction: row; align-items: center; gap: 12px; }
.pick.with-img img { width: 72px; height: 54px; border-radius: 8px; object-fit: cover; flex: none; background: #ebe6da; }
.pick.app-logo img { width: 36px; height: 36px; border-radius: 9px; background: none; box-shadow: 0 0 0 1px rgba(13,21,48,.08); }
.pick-txt { display: grid; gap: 2px; min-width: 0; }
.field-img { display: grid; grid-template-columns: 76px 1fr; grid-template-rows: auto auto; gap: 6px 12px; align-items: center;
  background: #fff; border-radius: 12px; padding: 10px; box-shadow: var(--shadow); }
.field-img > img, .field-img > .ph { grid-row: 1 / span 2; width: 76px; height: 76px; border-radius: 10px; object-fit: cover; background: #ebe6da; }
.field-img-txt { display: grid; gap: 2px; color: var(--ink); }
.field-img-txt > span { font-weight: 600; font-size: .9rem; }
.field-img-txt small { color: var(--muted); font-weight: 400; font-size: .76rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.field-img .num { grid-column: 2; max-width: 170px; }
.admin-note { margin-bottom: 14px; box-shadow: inset 4px 0 0 var(--gold), var(--shadow); }
.admin-note p { margin: 4px 0 10px; }

/* ---------- Cartes & lieux ---------- */
.map-box { height: 360px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #e8e4d8; margin-bottom: 16px; z-index: 0; }
.map-box.france { height: 420px; }
.map-pin { background: none; border: 0; }
.map-pin span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(13,21,48,.3); font-size: 17px; border: 2px solid var(--gold); }
.map-pin.home span { background: var(--night); border-color: var(--gold); font-size: 19px; width: 40px; height: 40px; }
.map-pin.shop span { width: 28px; height: 28px; font-size: 14px; border-color: #9aa3bd; }
.map-pin.market span { border-color: #5aa36a; }
.map-pin.family span { border-color: var(--night); }
.leaflet-popup-content { font: .86rem/1.4 "Inter", sans-serif; }
.places { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.place { display: flex; gap: 12px; padding: 12px; }
.place img { width: 88px; height: 88px; border-radius: 10px; object-fit: cover; flex: none; background: #ebe6da; }
.place-main { min-width: 0; }
.place-main strong { display: block; font-size: .95rem; }
.place-main small { color: var(--muted); }
.place-main p { margin: 6px 0; font-size: .86rem; }
.place-links { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.place-links .btn { margin: 0; }
.shops { list-style: none; margin: 10px 0 6px; padding: 4px 14px; }
.shops li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0ece3; flex-wrap: wrap; }
.shops li:last-child { border-bottom: 0; }
.shops strong { display: block; font-size: .94rem; }
.shops small { display: block; color: var(--muted); }
.shops .hours { font-size: .74rem; }
.shop-links { display: flex; gap: 8px; align-items: center; }
.shop-links .btn { margin: 0; }
.idea.has-img { padding-top: 0; overflow: hidden; }
.idea-img { margin: 0 -14px 2px; aspect-ratio: 16/9; background: #ebe6da; position: relative; }
.idea-img img { width: 100%; height: 100%; object-fit: cover; }
.idea-km { position: absolute; left: 8px; bottom: 8px; background: rgba(13,21,48,.78); color: #fff; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.idea-info { margin: 0; font-size: .82rem; color: #4a5068; background: #f7f4ec; border-radius: 8px; padding: 6px 9px; }
.idea-links { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Modes Prépa / Séjour, sous-onglets ---------- */
.mode-switch { margin-left: auto; display: flex; align-items: center; gap: 2px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 3px; }
.mode-switch button { border: 0; background: transparent; color: rgba(255,255,255,.7); font-size: .76rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.mode-switch button[aria-pressed="true"] { background: var(--gold); color: var(--night); }
.mode-switch .mode-info { width: 22px; height: 22px; padding: 0; margin-left: 2px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); font: italic 700 .72rem Georgia, serif; color: #fff; }
.mode-switch.forced [aria-pressed="true"] { box-shadow: 0 0 0 2px rgba(232,182,76,.35); }
.topbar .avatar-btn { margin-left: 8px; }
.subnav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -4px 0 14px; padding: 2px 0; position: sticky; top: 56px; z-index: 20; background: var(--cream); }
.subnav::-webkit-scrollbar { display: none; }
.subnav .chip { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.chip-badge { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: var(--night); font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; }

/* ---------- Accueil allégé ---------- */
.arrival { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-radius: 18px; padding: 14px 16px; color: #fff;
  background: radial-gradient(circle at 15% 20%, rgba(232,182,76,.22), transparent 45%), linear-gradient(150deg, var(--night), var(--night-2)); }
.arrival .eyebrow { color: rgba(255,255,255,.65); font-size: .68rem; }
.arrival strong { display: block; font: 700 1.2rem "Fraunces", serif; }
.arrival small { color: rgba(255,255,255,.65); }
.arrival { flex-wrap: nowrap; }
.arrival-txt { min-width: 0; }
.arrival strong { font-size: 1.05rem; white-space: nowrap; }
.countdown-mini { display: flex; gap: 4px; flex: none; }
.countdown-mini span { display: grid; justify-items: center; min-width: 38px; padding: 5px 3px; border-radius: 10px; background: rgba(255,255,255,.08); font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.65); }
.countdown-mini b { font: 700 1.15rem "Fraunces", serif; color: var(--gold); font-variant-numeric: tabular-nums; }
.lieu-desc { margin: 12px 0 8px; color: #3b4157; font-size: .95rem; }
.lieu-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.lieu-tags span { font-size: .78rem; background: var(--card); box-shadow: var(--shadow); border-radius: 999px; padding: 5px 10px; }
.cta-photos { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.cta-photos .emoji { font-size: 1.8rem; }
.cta-photos strong { display: block; }
.cta-photos small { color: var(--muted); }
.today-list { padding: 14px 16px 14px 32px; margin: 0; }
.mine { grid-template-columns: repeat(2, 1fr); }

/* ---------- Accueil : blocs ---------- */
.h-small { font-size: 1.2rem; margin-bottom: 10px; }
.block .ideas-head .h-small { margin: 0; }
.deadlines { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.deadlines li { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.deadlines li div { min-width: 0; }
.deadlines strong { display: block; font-size: .95rem; }
.deadlines small { color: var(--muted); }
.dl-days { flex: none; width: 58px; text-align: center; border-radius: 12px; padding: 6px 0; background: #f3efe6; }
.dl-days b { display: block; font: 700 1.05rem "Fraunces", serif; color: var(--night); }
.dl-days small { font-size: .68rem; text-transform: uppercase; }
.deadlines li.near .dl-days { background: var(--gold-soft); }
.deadlines li.soon .dl-days { background: var(--bad-bg); }
.deadlines li.soon .dl-days b { color: var(--bad); }
.mine { display: grid; gap: 10px; }
.mine-card { text-decoration: none; display: block; }
.mine-card.warn { box-shadow: inset 4px 0 0 var(--gold), var(--shadow); }
.mine-card p { margin: 0; }
.mine-empty p { margin: 6px 0 0; }
.mine-rooms { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mine-rooms li { display: flex; gap: 10px; align-items: center; }
.mine-rooms img, .mine-rooms .ph { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; background: #ebe6da; flex: none; }
.mine-rooms b { display: block; font-size: .92rem; }
.mine-rooms small { color: var(--muted); }
.mine-list { margin: 0; padding-left: 18px; font-size: .92rem; display: grid; gap: 2px; }
.reminders { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.reminders .alert { margin: 0; }
.days-grid, .hot-grid { display: grid; gap: 10px; }
.day-card.nye { background: linear-gradient(150deg, var(--night), var(--night-2)); color: #fff; }
.day-card.nye h3, .day-card.nye .muted { color: rgba(255,255,255,.75); }
.day-card h3 { text-transform: none; letter-spacing: 0; font: 600 .95rem "Fraunces", serif; }
.day-rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.day-rows li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; font-size: .9rem; }
.day-rows span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.day-card.nye .day-rows span { color: rgba(255,255,255,.6); }
.hot-card { text-decoration: none; }
.hot-card ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; counter-reset: hot; }
.hot-card li { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; counter-increment: hot; }
.hot-card li span::before { content: counter(hot) ". "; color: var(--muted); font-weight: 600; }
.hot-card li b { white-space: nowrap; color: #c2621a; }
.trips { list-style: none; margin: 0; padding: 6px 14px; display: grid; }
.trips li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0ece3; }
.trips li:last-child { border-bottom: 0; }
.trips strong { display: block; font-size: .95rem; }
.trips small { color: var(--muted); }
.trip-km { font-weight: 600; font-size: .88rem; font-variant-numeric: tabular-nums; text-align: right; }
.trips .btn { grid-column: 1 / -1; justify-self: start; }
.carpool { margin-top: 10px; display: grid; gap: 6px; }
.carpool p { margin: 0; background: var(--ok-bg); color: var(--ok); border-radius: 10px; padding: 9px 12px; font-size: .88rem; }
.weather .wx { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(64px, 1fr); gap: 6px; overflow-x: auto; scrollbar-width: none; }
.weather .wx::-webkit-scrollbar { display: none; }
.wx li { display: grid; justify-items: center; gap: 2px; background: #f7f4ec; border-radius: 12px; padding: 8px 4px; text-align: center; }
.wx small { color: var(--muted); font-size: .7rem; }
.wx .wx-ico { font-size: 1.5rem; }
.wx b { font-size: .95rem; }
.wx .rain { color: #3c6fb0; }
.update-banner {
  position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 64px); z-index: 70;
  display: flex; gap: 12px; align-items: center; background: var(--card); color: var(--ink); padding: 10px 12px 10px 16px;
  border-radius: 14px; box-shadow: 0 10px 30px rgba(13,21,48,.25); font-size: .9rem; max-width: calc(100vw - 32px);
}
@media (min-width: 760px) {
  .mine { grid-template-columns: repeat(4, 1fr); }
  .subnav { top: 64px; }
  .tabs-top { flex: 1; }
  .lieu .gallery figure:nth-child(n+7) { display: none; }
  .mode-switch { margin-left: 12px; }
  .days-grid, .hot-grid { grid-template-columns: repeat(2, 1fr); }
  .trips li { grid-template-columns: 1fr auto auto; }
  .trips .btn { grid-column: auto; }
}

/* ---------- Tricount ---------- */
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kpis.tri { grid-template-columns: repeat(3, 1fr); }
.balances { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; background: var(--card); border-radius: 14px; padding: 8px 12px; box-shadow: var(--shadow); }
.balances li { display: grid; grid-template-columns: minmax(80px, 1fr) 1.2fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid #f0ece3; font-size: .9rem; }
.balances li:last-child { border-bottom: 0; }
.who-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-wrap { position: relative; height: 8px; background: #f3efe6; border-radius: 999px; }
.bar-wrap::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: #d8d1c1; }
.bar { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
.bar.pos { left: 50%; background: #5aa36a; }
.bar.neg { right: 50%; background: #d27a72; }
.balances b { font-variant-numeric: tabular-nums; text-align: right; min-width: 82px; }
b.pos { color: var(--ok); } b.neg { color: var(--bad); }
.cost-now { margin: 10px 0 4px; }
.cost-now .per-adult { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.15); }
.cost-now .per-adult b { color: var(--gold); font-size: 1.1rem; }
.split-bars { list-style: none; margin: 0; padding: 14px 16px; display: grid; gap: 12px; }
.split-bars .progress { margin: 6px 0 0; height: 7px; }
.split-head { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; }
.split-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-head b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.split-head small { color: var(--muted); font-weight: 500; margin-left: 4px; }
details.fold { margin-top: 18px; padding: 0; }
details.fold summary { padding: 14px 16px; font-weight: 600; cursor: pointer; list-style: none; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: "▾"; float: right; color: var(--muted); }
details.fold[open] summary::after { content: "▴"; }
details.fold .balances { box-shadow: none; padding-top: 0; }
details.fold > p { padding: 0 16px 14px; margin: 0; }
.cats { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-pill { background: var(--card); box-shadow: var(--shadow); border-radius: 999px; padding: 6px 12px; font-size: .85rem; }
.tx { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tx li { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
.tx-date { flex: none; width: 48px; font-size: .74rem; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.tx-main { flex: 1; min-width: 0; }
.tx-main strong { display: block; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-main small { color: var(--muted); }
.tx b { font-variant-numeric: tabular-nums; }

/* ---------- Photos ---------- */
.tile { padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #e6e1d6; cursor: zoom-in; aspect-ratio: 1; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tile:hover img { transform: scale(1.04); }
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mosaic .tile.big { grid-column: span 2; grid-row: span 2; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 38%; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip .tile { scroll-snap-align: start; }
.empty-album { text-align: center; }
.empty-album p { margin: 4px 0; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100svh; width: 100vw; height: 100svh; display: grid; place-items: center; }
dialog.lightbox::backdrop { background: rgba(5,8,20,.92); }
dialog.lightbox img { max-width: 96vw; max-height: 90svh; object-fit: contain; border-radius: 10px; }
.lieu .gallery figure { margin: 0; position: relative; scroll-snap-align: start; cursor: zoom-in; }
.lieu .gallery figure img { scroll-snap-align: none; }
.lieu .gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px; border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(transparent, rgba(13,21,48,.75)); color: #fff; font-size: .82rem; line-height: 1.3; }
.gallery-box figure { margin: 0; display: grid; justify-items: center; gap: 10px; }
.gallery-box figcaption { color: #fff; text-align: center; max-width: 90vw; font-size: .92rem; }
.gallery-box figcaption small { display: block; opacity: .6; margin-top: 4px; }
.gallery-box img { max-height: 78svh; }
.gallery-box .nav { position: fixed; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.14); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.gallery-box .prev { left: 10px; } .gallery-box .next { right: 10px; }
dialog.lightbox .icon-btn { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; background: rgba(255,255,255,.15); color: #fff; }

/* ---------- Admin ---------- */
.users { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.user { display: grid; grid-template-columns: 44px 1fr; gap: 6px 12px; align-items: center; background: var(--card); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.user img, .user .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.user .avatar { display: grid; place-items: center; background: var(--night); color: var(--gold); font-weight: 700; }
.user-main { min-width: 0; }
.user-main small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.user-main .note { margin: 4px 0 0; font-size: .86rem; font-style: italic; }
.user-actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.user-actions .who { max-width: none; }

/* ---------- Panneaux (bottom sheet) ---------- */
dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 100%; max-height: 88svh;
  border-radius: 22px 22px 0 0; background: var(--cream); color: var(--ink);
  box-shadow: 0 -10px 40px rgba(0,0,0,.25); animation: up .22s ease;
}
dialog.sheet::backdrop { background: rgba(13,21,48,.5); animation: fadein .2s; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadein { from { opacity: 0; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 999px; background: #d4cdbd; margin: 8px auto 0; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 18px 6px; }
.sheet-head h3 { font-size: 1.25rem; }
.sheet-head p { margin: 2px 0 0; }
.sheet-body { padding: 8px 18px calc(18px + var(--safe-b)); overflow-y: auto; max-height: calc(88svh - 80px); }
.pick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.pick { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 13px 16px; border: 0; border-radius: 12px; background: #fff; cursor: pointer; box-shadow: var(--shadow); font-weight: 500; }
.pick small { color: var(--muted); font-weight: 400; }
.pick:active { background: var(--gold-soft); }
.pick:disabled { opacity: .5; }
.pick.muted { color: var(--muted); }
.pick.danger { color: var(--bad); }
.sheet-form .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sheet-form .field.wide { grid-column: 1 / -1; }
.sheet-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 16px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s;
  background: var(--night); color: #fff; padding: 12px 18px; border-radius: 14px; max-width: calc(100vw - 32px);
  box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: .9rem;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: var(--bad); }
.auth-screen ~ .toast, body:not(:has(.tabs-bottom)) .toast { bottom: 24px; }

/* ---------- Tablette & ordinateur ---------- */
@media (min-width: 760px) {
  .app { padding-bottom: 0; }
  .tabs-bottom { display: none; }
  .tabs-top { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .tabs-top .tab { color: rgba(255,255,255,.7); padding: 8px 12px; border-radius: 10px; font-size: .9rem; font-weight: 500; white-space: nowrap; }
  .tabs-top .tab svg { width: 18px; height: 18px; }
  .tabs-top .tab:hover { color: #fff; background: rgba(255,255,255,.06); }
  .tabs-top .tab.active { color: var(--night); background: var(--gold); }
  .tabs-top .dot-badge { position: static; margin-left: 2px; }
  .tabs-top .tab.active .dot-badge { background: var(--night); color: var(--gold); }
  .topbar { padding: 12px 24px; }
  #views { padding: 28px 24px; }
  .view-head h2 { font-size: 2.2rem; }
  .toast { bottom: 24px; }

  .hero-card { padding: 34px 32px; }
  .countdown { max-width: 520px; }
  .countdown strong { font-size: 2.4rem; }
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .contract-top, .budget-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .mosaic { grid-template-columns: repeat(5, 1fr); }
  .strip { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); overflow: visible; }

  .segmented { display: none; }
  .lodging { display: grid; grid-template-columns: minmax(280px, 1fr) 2fr; gap: 22px; align-items: start; }
  .lodging .families-col, .lodging .rooms-col { display: block !important; min-width: 0; }
  .lodging .families-col { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; padding: 2px; }
  .family, .occupant, .idea, .cal-item { cursor: grab; }

  .day-chips { display: none; }
  .calendar-wrap { overflow-x: auto; padding-bottom: 6px; }
  .calendar { grid-template-columns: 92px repeat(var(--days, 8), minmax(118px, 1fr)); gap: 6px; min-width: 1040px; }
  .cal-corner, .cal-slot-label, .calendar .cal-day[data-col] { display: block !important; }
  .cal-cell { display: flex !important; padding: 6px; min-height: 92px; box-shadow: none; border: 1px solid var(--line); border-radius: 10px; }
  .cal-cell .slot-name { display: none; }
  .cal-day { text-align: center; font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 4px; background: var(--card); border-radius: 10px; }
  .cal-day.nye { background: var(--night); color: var(--gold); }
  .cal-slot-label { font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); align-self: center; }
  .cal-item { font-size: .8rem; padding: 6px 4px 6px 8px; }
  .cal-cell .add-in { min-height: 28px; margin-top: auto; opacity: 0; transition: opacity .15s; font-size: .78rem; }
  .cal-cell:hover .add-in { opacity: 1; }

  dialog.sheet { margin: auto; max-width: 480px; border-radius: 22px; max-height: 80vh; animation: pop .18s ease; }
  .sheet-grip { display: none; }
  @keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---------- Arrivée & départ (fiche famille) et « À faire » (Accueil) ---------- */
.stay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stay-grid .field.wide { grid-column: 1 / -1; }
.stay-grid input, .stay-grid select { width: 100%; min-width: 0; }
@media (max-width: 480px) { .stay-grid { grid-template-columns: 1fr; } }
.todo-list { list-style: none; margin: 0; padding: 4px; }
.todo-list li + li { border-top: 1px solid rgba(13,21,48,.07); }
.todo-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 10px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--night); font: inherit; }
.todo-item > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.todo-item small { color: #6b7080; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-check { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--gold); color: var(--night); font-weight: 700; }
.todo-item.ok .todo-check { background: var(--gold); }
.todo-item.ok strong { color: #6b7080; }
.todo-go { flex: none; font-size: .8rem; font-weight: 600; color: var(--night); }
.todo-item:not(.ok) .todo-go { background: var(--gold-soft); color: #7a5300; padding: 4px 10px; border-radius: 999px; }

/* ---------- Accueil de connexion : première connexion, confirmation d'adresse ---------- */
.auth-card .big-cta { padding: 16px; font-size: 1.05rem; background: var(--gold); color: var(--night); }
.auth-card .first-hint { text-align: center; margin: 6px 0 0; }
.auth-card .auth-step { font-size: 1.3rem; margin: 6px 0 4px; }
.auth-card .btn.ghost.block { margin-top: 10px; }
.name-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.verify-state { margin: 4px 0 14px; padding: 12px; border-radius: 12px; background: var(--gold-soft); color: #7a5300; font-size: .88rem; text-align: left; }
.verify-state.ok { background: #e6f4ea; color: #1e6b34; }
.verify-actions { display: flex; gap: 8px; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
