:root {
  --ink: #1E1F1C;
  --ink-2: #3A3B38;
  --grey: #6B6D68;
  --grey-2: #9A9C97;
  --line: #E2E3DF;
  --bg: #F4F4F2;
  --card: #FFFFFF;
  --green: #4F7A45;
  --green-2: #7FA36E;
  --green-3: #A9C79A;
  --green-4: #E4EEDF;
  --forest: #2F4A3A;
  --alert: #B3261E;
  --r: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-family: "Arial Nova Light", "Arial Nova", Arial, system-ui, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; padding-bottom: calc(68px + var(--safe-b)); }
h1, h2, h3, strong, b { font-weight: 600; }
h1 { font-size: 26px; margin: 4px 0 2px; letter-spacing: -.01em; }
h2 { font-size: 19px; margin: 22px 0 10px; }
h3 { font-size: 16px; margin: 0; }
p { line-height: 1.5; }
a { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: var(--ink); color: #F2F2EE; }
.brand { display: flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; font-weight: 600; font-size: 17px; }
.brand img { border-radius: 7px; }
.top-sub { margin-left: auto; color: var(--grey-2); font-size: 14px; }

main { max-width: 760px; margin: 0 auto; padding: 14px 16px 30px; outline: none; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; background: #fff;
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px;
  color: var(--grey); text-decoration: none; font-size: 11.5px; }
.tabs svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.tabs a.on { color: var(--forest); font-weight: 600; }
.tabs a.on svg { stroke-width: 2.2; }

.muted { color: var(--grey); }
.small { font-size: 13.5px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack > * + * { margin-top: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line);
  background: #fff; border-radius: 999px; padding: 9px 16px; cursor: pointer; text-decoration: none; color: var(--ink);
  font-size: 15px; min-height: 40px; }
.btn.pri { background: var(--forest); border-color: var(--forest); color: #fff; font-weight: 600; }
.btn.soft { background: var(--green-4); border-color: var(--green-4); color: var(--forest); }
.btn.sm { padding: 6px 12px; min-height: 32px; font-size: 14px; }
.btn.block { display: flex; width: 100%; }
.btn.danger { color: var(--alert); }
.btn:disabled { opacity: .5; }

.card { background: var(--card); border-radius: var(--r); padding: 14px 16px; border: 1px solid var(--line); }
.card + .card { margin-top: 10px; }
.empty { text-align: center; padding: 28px 16px; color: var(--grey); background: #fff; border: 1px dashed var(--line); border-radius: var(--r); }
.empty .btn { margin-top: 12px; }

/* accueil */
.hero { position: relative; border-radius: 18px; overflow: hidden; min-height: 210px; color: #fff; display: flex;
  align-items: flex-end; background: var(--forest) center/cover no-repeat; text-decoration: none; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(20,22,18,.78)); }
.hero > div { position: relative; z-index: 1; padding: 18px; width: 100%; }
.hero .count { font-size: 40px; font-weight: 600; line-height: 1; }
.hero .count small { font-size: 16px; font-weight: 300; margin-left: 6px; }
.hero h2 { margin: 8px 0 2px; font-size: 22px; }
.hero p { margin: 0; opacity: .9; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; text-align: center; }
.stat b { display: block; font-size: 24px; }
.stat span { font-size: 12.5px; color: var(--grey); }

/* listes de voyages */
.seg { display: flex; background: #E9EAE6; border-radius: 999px; padding: 3px; margin: 6px 0 14px; }
.seg a { flex: 1; text-align: center; padding: 7px 0; border-radius: 999px; color: var(--grey); text-decoration: none; font-size: 14.5px; }
.seg a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tcard { display: flex; gap: 12px; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; color: inherit; text-decoration: none; }
.tcard + .tcard { margin-top: 10px; }
.tc-img { width: 96px; flex: none; background: var(--green-4) center/cover no-repeat; display: flex; align-items: flex-end;
  justify-content: flex-start; padding: 6px; font-size: 18px; }
.tc-b { padding: 11px 12px 11px 0; min-width: 0; }
.tc-b h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-b p { margin: 3px 0 0; font-size: 14px; color: var(--grey); }
.tc-b .when { color: var(--forest); font-weight: 600; }
.past, .past * { color: var(--grey-2) !important; font-style: italic; }
.past .tc-img { filter: saturate(.35) opacity(.8); }
.year-h { font-size: 15px; color: var(--grey); margin: 18px 2px 8px; font-weight: 600; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: #EDEEEA;
  font-size: 13.5px; color: var(--ink-2); }
.chip.kid { background: var(--green-4); color: var(--forest); }
.chip.priv { background: var(--ink); color: #fff; }
.chip button { border: 0; background: none; padding: 0 0 0 2px; cursor: pointer; color: var(--grey); font-size: 15px; line-height: 1; }

/* page voyage */
.tp-head { margin: -14px -16px 0; padding: 50px 16px 16px; min-height: 190px; color: #fff; position: relative;
  background: var(--forest) center/cover no-repeat; display: flex; align-items: flex-end; }
.tp-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(20,22,18,.15), rgba(20,22,18,.8)); }
.tp-head > div { position: relative; z-index: 1; width: 100%; }
.tp-head h1 { color: #fff; }
.tp-head p { margin: 2px 0 0; opacity: .92; }
.tp-head .back { position: absolute; top: 12px; left: 12px; z-index: 2; }
.tp-head .edit { position: absolute; top: 12px; right: 12px; z-index: 2; }
.round { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 19px; cursor: pointer; }
.subtabs { display: flex; gap: 4px; overflow-x: auto; margin: 12px -16px 14px; padding: 0 16px; scrollbar-width: none; }
.subtabs a { flex: none; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--grey); background: #fff;
  border: 1px solid var(--line); font-size: 14.5px; }
.subtabs a.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

.day { display: grid; grid-template-columns: 54px 1fr; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px; cursor: pointer; }
.day + .day { margin-top: 8px; }
.day .d { text-align: center; border-right: 1px solid var(--line); padding-right: 10px; }
.day .d b { display: block; font-size: 22px; line-height: 1.1; }
.day .d span { font-size: 12px; color: var(--grey); }
.day h3 { margin-bottom: 4px; }
.day p { margin: 3px 0 0; font-size: 14.5px; white-space: pre-line; }
.day .lbl { color: var(--grey); font-size: 12.5px; }
.day.today { border-color: var(--green-2); box-shadow: 0 0 0 2px var(--green-4); }

.bk { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; cursor: pointer; }
.bk + .bk { margin-top: 8px; }
.bk .k { font-size: 12.5px; color: var(--green); font-weight: 600; }
.bk p { margin: 3px 0 0; font-size: 14.5px; }
.bk .todo { color: var(--alert); }
.total { background: var(--green-4); color: var(--forest); border-radius: var(--r); padding: 10px 14px; margin-bottom: 10px; }

.cl-group h3 { font-size: 14px; color: var(--grey); margin: 16px 2px 6px; }
.item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); padding: 10px 12px; }
.item:first-of-type { border-radius: var(--r) var(--r) 0 0; }
.item:last-child { border-radius: 0 0 var(--r) var(--r); }
.item:only-of-type { border-radius: var(--r); }
.item + .item { border-top: 0; }
.item .t { flex: 1; min-width: 0; }
.item .t small { display: block; color: var(--grey); font-size: 12.5px; }
.item.done .t { text-decoration: line-through; color: var(--grey-2); }
.check { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; border-radius: 7px; border: 1.6px solid var(--grey-2);
  flex: none; display: grid; place-content: center; cursor: pointer; margin: 0; background: #fff; }
.check:checked { background: var(--green); border-color: var(--green); }
.check:checked::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.4px 2.4px 0; transform: rotate(45deg) translate(-1px,-1px); }
.edit-ln { border: 0; background: none; color: var(--grey); font-size: 18px; cursor: pointer; padding: 4px; }
.quick { display: flex; gap: 8px; margin-top: 12px; }
.quick input { flex: 1; }
.progress { height: 6px; background: var(--line); border-radius: 9px; overflow: hidden; margin: 6px 0 4px; }
.progress i { display: block; height: 100%; background: var(--green-2); }

.ai { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.ai h3 { margin-bottom: 4px; }
.ai .row { margin-top: 10px; }

/* carte */
.world { width: 100%; height: auto; display: block; background: #fff; border-radius: var(--r); border: 1px solid var(--line); }
.world .ct { fill: #E2E3DF; stroke: #fff; stroke-width: .5; }
.world .ct.done { fill: var(--green); }
.world .ct.plan { fill: var(--green-3); }
.world .ct.sel { stroke: var(--ink); stroke-width: 1.4; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--grey); margin: 8px 2px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.who { display: flex; gap: 6px; overflow-x: auto; margin: 4px -16px 12px; padding: 0 16px; scrollbar-width: none; }
.who a { flex: none; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: 14.5px; }
.who a.on { background: var(--forest); border-color: var(--forest); color: #fff; font-weight: 600; }
.clist { display: flex; flex-wrap: wrap; gap: 6px; }
.map-tip { min-height: 22px; font-size: 14px; color: var(--ink-2); margin: 8px 2px 0; }
.map-wait { padding: 50px 10px; text-align: center; color: var(--grey); background: #fff; border-radius: var(--r); border: 1px solid var(--line); }

/* envies */
.wish { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.wish + .wish { margin-top: 8px; }
.wish p { margin: 4px 0 0; font-size: 14.5px; }
.months { display: flex; gap: 3px; margin-top: 8px; }
.months span { flex: 1; text-align: center; font-size: 11px; padding: 3px 0; border-radius: 5px; background: #EDEEEA; color: var(--grey-2); }
.months span.on { background: var(--green-3); color: var(--forest); font-weight: 600; }

/* plus */
.menu a, .menu button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff;
  border: 1px solid var(--line); padding: 14px; text-decoration: none; color: inherit; cursor: pointer; }
.menu > * + * { border-top: 0 !important; }
.menu > :first-child { border-radius: var(--r) var(--r) 0 0; }
.menu > :last-child { border-radius: 0 0 var(--r) var(--r); }
.menu > :only-child { border-radius: var(--r); }
.menu .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--green-4); color: var(--forest); display: grid; place-items: center; flex: none; font-size: 17px; }
.menu span small { display: block; color: var(--grey); font-size: 13px; }
.member { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; flex: none; }
.avatar.kid { background: var(--green-2); }
.note { background: var(--green-4); color: var(--forest); padding: 12px 14px; border-radius: var(--r); font-size: 14.5px; }
.note.warn { background: #F3EFE4; color: #5E5130; }

/* feuille (formulaires) */
dialog#sheet { border: 0; padding: 0; width: 100%; max-width: 560px; max-height: 92vh; border-radius: 20px 20px 0 0;
  margin: auto auto 0; background: var(--bg); color: var(--ink); }
@media (min-width: 640px) { dialog#sheet { border-radius: 20px; margin: auto; } }
dialog#sheet::backdrop { background: rgba(20,22,18,.45); }
.sh { display: flex; flex-direction: column; max-height: 92vh; }
.sh header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.sh header h2 { margin: 0; font-size: 18px; }
.sh .body { overflow-y: auto; padding: 14px 16px; }
.sh footer { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: #fff; }
.sh footer .btn.danger { margin-right: auto; }
.f { margin-bottom: 13px; }
.f > label, .f > .lb { display: block; font-size: 13.5px; color: var(--grey); margin-bottom: 5px; }
.f input[type=text], .f input[type=date], .f input[type=time], .f input[type=number], .f input[type=url], .f select, .f textarea,
.quick input, .inp { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; font-size: 16px; }
.f textarea { min-height: 84px; resize: vertical; }
.f .hint { font-size: 12.5px; color: var(--grey); margin-top: 4px; }
.f .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opts label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14.5px; cursor: pointer; }
.opts input { accent-color: var(--green); margin: 0; }
.opts label:has(input:checked) { background: var(--green-4); border-color: var(--green-3); color: var(--forest); }
.mgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.mgrid label { justify-content: center; padding: 7px 0; border-radius: 8px; }
.mgrid input { display: none; }
.cpick .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }

#toast { position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14.5px; transition: .25s; pointer-events: none;
  z-index: 20; max-width: 90vw; text-align: center; }
#toast.on { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--alert); }

.welcome { text-align: center; padding-top: 18px; }
.welcome img { width: 96px; height: 96px; border-radius: 22px; }
.welcome h1 { font-size: 30px; margin-top: 14px; }
.welcome .card { text-align: left; margin-top: 18px; }

@media (min-width: 760px) {
  .tabs { justify-content: center; }
  .tabs a { flex: none; width: 120px; }
  .tc-img { width: 130px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.hello { margin: 0 2px 10px; font-size: 15px; }
.hello b { font-size: 18px; margin-right: 4px; }
