/* Sortie famille: soft, warm pastels. No plain white: every surface has a gentle tint. */
:root {
  --bg: #f8efe4;            /* warm sand page */
  --surface: #fffaf3;       /* cream cards */
  --surface-2: #f1ecf8;     /* pale lavender: "Your kids" */
  --surface-3: #ebf4ee;     /* pale mint: search and filters */
  --text: #3b3640;          /* soft charcoal */
  --muted: #776f7c;
  --border: #eadccb;
  --shadow: 0 2px 12px rgba(140, 100, 70, 0.08);

  --primary: #e48a73;       /* soft peach-coral */
  --on-primary: #3a2019;    /* dark text reads well on it */
  --primary-soft: #fbe3da;
  --primary-ink: #a4513c;

  --sun: #fbefcd;  --sun-ink: #7a5c16;
  --mint: #dfefe8; --mint-ink: #36705f;
  --lilac: #e9e4f6; --lilac-ink: #5b4ca0;
  --sky: #e2ecf6;  --sky-ink: #3c6289;
  --pink: #f7e2ea; --pink-ink: #94435f;
  --leaf: #e6efdc; --leaf-ink: #4d6f35;
  --sand: #efe7dc; --sand-ink: #6b6156;

  --radius: 18px;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* Dark colours: used when the visitor picks Dark, or picks Auto and their device is in dark mode. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e1d26;
    --surface: #282733;
    --surface-2: #2c2a3c;
    --surface-3: #25302d;
    --text: #efebe6;
    --muted: #b3adb6;
    --border: #3b3946;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    --primary: #f0a590;
    --on-primary: #2f1a14;  /* dark text on the lighter coral */
    --primary-soft: #45302b;
    --primary-ink: #f6c0b0;
    --sun: #4a3d14;  --sun-ink: #ffd978;
    --mint: #163f39; --mint-ink: #8ee3cf;
    --lilac: #2f2a55; --lilac-ink: #c5bcff;
    --sky: #1b3550;  --sky-ink: #9fcbf5;
    --pink: #4a2033; --pink-ink: #f7a8c8;
    --leaf: #24391a; --leaf-ink: #a9dc8c;
    --sand: #34343f; --sand-ink: #cfcbc3;
  }
}
:root[data-theme="dark"] {
  --bg: #1e1d26;
  --surface: #282733;
  --surface-2: #2c2a3c;
  --surface-3: #25302d;
  --text: #efebe6;
  --muted: #b3adb6;
  --border: #3b3946;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  --primary: #f0a590;
  --on-primary: #2f1a14;  /* dark text on the lighter coral */
  --primary-soft: #45302b;
  --primary-ink: #f6c0b0;
  --sun: #4a3d14;  --sun-ink: #ffd978;
  --mint: #163f39; --mint-ink: #8ee3cf;
  --lilac: #2f2a55; --lilac-ink: #c5bcff;
  --sky: #1b3550;  --sky-ink: #9fcbf5;
  --pink: #4a2033; --pink-ink: #f7a8c8;
  --leaf: #24391a; --leaf-ink: #a9dc8c;
  --sand: #34343f; --sand-ink: #cfcbc3;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* the hidden attribute always wins over display rules */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
}
a { color: var(--primary-ink); }
button, select, input { font: inherit; color: inherit; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.top { padding: 18px 0 8px; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.3px; }
.logo { width: 48px; height: 48px; flex: none; }
.brand-accent { color: var(--primary-ink); }
.hero { margin: 14px 0 4px; }
.hero h2 { margin: 0; font-size: clamp(22px, 4.5vw, 32px); font-weight: 800; line-height: 1.2; }
.hero h2 .hl { color: var(--primary-ink); }
.hero p { margin: 6px 0 0; color: var(--muted); }

.top-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.top-row { flex-wrap: wrap; }
.brand { white-space: nowrap; }
@media (max-width: 520px) {   /* phones: name on its own line, switches underneath */
  .brand { font-size: 22px; }
  .top-controls { width: 100%; justify-content: space-between; }
}
#theme-group button { padding: 5px 9px; }
.pill-group { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.pill-group button {
  border: 0; background: transparent; border-radius: 999px; padding: 5px 12px;
  font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer;
}
.pill-group button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }

/* ---------- panels ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin: 14px 0;
}
.panel h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.panel .hint { margin: 0 0 12px; font-size: 14px; color: var(--muted); }

/* My kids */
.kids-panel { background: var(--surface-2); }
.filters-panel { background: var(--surface-3); }
.kids { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.kid {
  display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 6px 6px 6px 10px;
}
.kid .face { font-size: 20px; }
.kid input {
  width: 110px; border: 0; background: transparent; padding: 4px; border-bottom: 1px dashed var(--border);
}
.kid input:focus { outline: none; border-bottom-color: var(--primary); }
.kid select { border: 1px solid var(--border); border-radius: 10px; padding: 4px 6px; background: var(--surface); }
.icon-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  color: var(--muted); font-size: 18px; line-height: 1;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary-ink); }
.add-kid {
  border: 2px dashed var(--primary); color: var(--primary-ink); background: transparent; border-radius: 14px;
  padding: 8px 14px; font-weight: 800; cursor: pointer;
}
.add-kid:hover { background: var(--primary-soft); }
.kids-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.kids-mode .pill-group button { white-space: nowrap; font-size: 13px; padding: 5px 10px; }

/* search + filters */
.search { position: relative; }
.search input {
  width: 100%; padding: 12px 14px 12px 42px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); font-size: 16px;
}
.search input:focus, select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 14px;
  font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer;
}
.chip:hover { border-color: var(--primary); }
.chip[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary-ink); border-color: var(--primary); }
details.more { margin-top: 12px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--primary-ink); font-size: 14px; }
.select-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; margin-top: 10px; }
.select-row label { display: grid; gap: 3px; font-size: 13px; font-weight: 700; color: var(--muted); }
.select-row select {
  min-width: 170px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text);
}
.select-row .check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--text) !important; padding-bottom: 8px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
@media (min-width: 760px) { details.more > summary { display: none; } }

/* ---------- results ---------- */
.view-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 18px 0 6px; }
.view-row p { margin: 0; font-weight: 700; }
.status { padding: 12px 14px; border-radius: 14px; background: var(--sun); color: var(--sun-ink); font-weight: 700; }
.group-title { font-size: 18px; font-weight: 800; margin: 20px 0 10px; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px;
         grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px;
}
.card-top { display: flex; align-items: center; gap: 10px; }
.cat-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; flex: none; }
.date-pill { font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--sun); color: var(--sun-ink); }
.card h4 { margin: 2px 0 0; font-size: 17px; font-weight: 800; line-height: 1.3; }
.card .line { margin: 0; font-size: 14px; color: var(--muted); }
.card .desc { margin: 2px 0 0; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .desc.open { display: block; }
.read-more { align-self: start; border: 0; background: transparent; padding: 0; color: var(--primary-ink); font-weight: 700; font-size: 14px; cursor: pointer; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: var(--sand); color: var(--sand-ink); }
.tag.free { background: var(--leaf); color: var(--leaf-ink); }
.tag.full { background: var(--pink); color: var(--pink-ink); }
.fit { font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 10px; }
.fit.good { background: var(--mint); color: var(--mint-ink); }
.fit.unknown { background: var(--sun); color: var(--sun-ink); }
.fit.partial { background: var(--sky); color: var(--sky-ink); }
.more-link { margin-top: 4px; font-size: 14px; font-weight: 800; text-decoration: none; }
.more-link:hover { text-decoration: underline; }
.fav-btn {
  margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--primary-ink); font-size: 20px; line-height: 1; cursor: pointer; flex: none;
}
.fav-btn:hover { background: var(--primary-soft); }
.fav-btn[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); }
.gone-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gone {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px dashed var(--border); border-radius: 14px; color: var(--muted); font-size: 14px;
}
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty .big { font-size: 34px; display: block; }

/* category colours */
.c-reading    { background: var(--lilac); color: var(--lilac-ink); }
.c-crafts     { background: var(--primary-soft); color: var(--primary-ink); }
.c-show       { background: var(--pink); color: var(--pink-ink); }
.c-sport      { background: var(--mint); color: var(--mint-ink); }
.c-festival   { background: var(--sun); color: var(--sun-ink); }
.c-exhibition { background: var(--sky); color: var(--sky-ink); }
.c-games      { background: var(--leaf); color: var(--leaf-ink); }
.c-other      { background: var(--sand); color: var(--sand-ink); }

/* interests: big tiles + indoor/outdoor */
.interests { margin: 18px 0 4px; }
.int-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.int-head h3 { margin: 0; font-size: 19px; font-weight: 800; }
#place-group button { white-space: nowrap; }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  text-align: left; border: 2px solid transparent; border-radius: 16px; padding: 10px 12px; cursor: pointer;
  box-shadow: var(--shadow); font-weight: 800;
}
.tile:hover { border-color: currentColor; }
.tile[aria-pressed="true"] { border-color: currentColor; box-shadow: 0 0 0 3px var(--primary-soft); }
.tile-ico { grid-row: 1 / 3; font-size: 28px; }
.tile-name { font-size: 14px; line-height: 1.2; }
.tile-count { font-size: 12px; font-weight: 700; opacity: 0.8; }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr 1fr; } }

/* overview: one short row per interest */
.cat-row { margin: 18px 0 6px; }
.cat-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cat-row-head h3 { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; }
.mini {
  flex: 0 0 220px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 12px; cursor: pointer;
}
.mini:hover { border-color: var(--primary); }
.mini strong { font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-line { font-size: 13px; color: var(--muted); }
.mini .date-pill { font-size: 12px; }
.back-chip { margin-top: 6px; }
.card.flash { outline: 3px solid var(--primary); outline-offset: 2px; transition: outline-color 0.4s; }

/* one activity's own page */
.card-title { color: inherit; text-decoration: none; }
.card-title:hover { color: var(--primary-ink); text-decoration: underline; }
body.no-scroll { overflow: hidden; }
.detail {
  position: fixed; inset: 0; z-index: 1000; background: rgba(30, 20, 15, 0.45);
  display: flex; justify-content: center; align-items: flex-start;
}
.detail-sheet {
  background: var(--bg); width: 100%; max-width: 640px; height: 100%; overflow-y: auto; outline: none;
  padding: 12px 16px 32px; display: flex; flex-direction: column; gap: 12px;
}
.detail-sheet > * { flex-shrink: 0; }   /* scroll instead of squashing the photo and map */
@media (min-width: 700px) {
  .detail { align-items: center; padding: 24px; }
  .detail-sheet { height: auto; max-height: 100%; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0,0,0,0.25); }
}
.d-bar { display: flex; align-items: center; gap: 8px; position: sticky; top: -12px; z-index: 2;
         background: var(--bg); padding: 8px 0; margin-top: -8px; }
.d-bar .fav-btn { margin-left: auto; }
.d-photo { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.d-photo img { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.d-photo figcaption { font-size: 12px; color: var(--muted); padding: 4px 10px; }
.d-illus svg { display: block; width: 100%; height: auto; max-height: 300px; }
.d-illus figcaption { font-style: italic; }
.d-head { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-sheet h2 { margin: 0; font-size: 23px; font-weight: 800; line-height: 1.25; }
.d-about { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.d-about h3 { margin: 0 0 4px; font-size: 15px; font-weight: 800; color: var(--primary-ink); }
.d-about p { margin: 0; }
.d-about .d-note { margin-top: 8px; font-size: 12px; color: var(--muted); }
.d-info { display: grid; gap: 10px; background: var(--surface-3); border-radius: var(--radius); padding: 12px 16px; }
.d-row { display: flex; gap: 12px; align-items: flex-start; }
.d-ico { font-size: 20px; width: 26px; text-align: center; }
.d-label { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.d-dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.d-dates li.on { font-weight: 800; }
.d-map { height: 180px; border-radius: var(--radius); border: 1px solid var(--border); }
.d-visit {
  display: block; text-align: center; background: var(--primary); color: var(--on-primary); text-decoration: none;
  font-weight: 800; padding: 14px 18px; border-radius: 14px; font-size: 16px;
}
.d-visit:hover { filter: brightness(1.05); }
.detail-sheet .report-link { margin: 0 auto; }

/* feedback */
.fb-open-row { text-align: center; margin: 28px 0 0; }
.fb-open {
  border: 2px dashed var(--primary); background: transparent; color: var(--primary-ink); border-radius: 14px;
  padding: 10px 18px; font-weight: 800; cursor: pointer;
}
.fb-open:hover { background: var(--primary-soft); }
.feedback-panel { background: var(--surface-2); }
.fb-field { display: grid; gap: 4px; margin-top: 12px; font-size: 14px; font-weight: 700; color: var(--muted); }
.fb-field textarea, .fb-field input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text); font-weight: 400;
}
.fb-field textarea:focus, .fb-field input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.fb-about { margin: 10px 0 0; font-size: 14px; padding: 8px 12px; border-radius: 10px; background: var(--sun); color: var(--sun-ink); }
.fb-error { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--pink-ink); }
.fb-actions { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.fb-actions .read-more { align-self: center; }
.fb-send {
  border: 0; background: var(--primary); color: var(--on-primary); border-radius: 12px; padding: 10px 20px;
  font-weight: 800; cursor: pointer;
}
.fb-send:disabled { opacity: 0.6; cursor: wait; }
.fb-thanks { margin: 8px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--mint); color: var(--mint-ink); font-weight: 700; }
.fb-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.report-link { border: 0; background: transparent; padding: 0; margin-left: auto; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; }
.card-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

.map { height: 560px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.foot { font-size: 13px; padding-top: 24px; padding-bottom: 36px; text-align: center; }
