/* Smart EPDC — Église Porte Des Cieux */
:root {
  --bg: #edeeef;
  --card: #ffffff;
  --soft: #f4f5f6;
  --ink: #1b1d1f;
  --dark: #232628;
  --dark-2: #33373a;
  --muted: #8a8f95;
  --line: #e3e5e7;
  --gold: #f4b860;
  --green: #2f9e6a;
  --red: #d9534f;
  --orange: #e8883a;
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --shadow: 0 10px 30px rgba(20, 22, 24, .08);
  --shadow-lg: 0 20px 50px rgba(20, 22, 24, .16);
  --sky: linear-gradient(165deg, #1f3a5f 0%, #3f6e95 38%, #8fb3c9 62%, #f2b36b 84%, #e2774a 100%);
  --nav-h: 76px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0; }

.splash { min-height: 100vh; display: grid; place-items: center; }
.splash-logo svg { width: 72px; height: 72px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }

/* ---------- Layout ---------- */
.layout { min-height: 100vh; }
.page {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 20px calc(var(--nav-h) + 48px + env(safe-area-inset-bottom));
}
.page.no-nav { padding-bottom: 40px; }
.page.flush { padding-top: 0; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.hide { display: none !important; }

/* ---------- Header ---------- */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 20px; }
.hello h1 { font-size: 26px; font-weight: 700; }
.hello p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: var(--sky); color: #fff; font-weight: 700; font-size: 17px;
  display: grid; place-items: center; border: 3px solid #fff; box-shadow: var(--shadow);
  text-decoration: none;
}
.avatar.lg { width: 84px; height: 84px; font-size: 28px; }

.topbar { display: flex; align-items: center; gap: 12px; margin: 6px 0 18px; }
.topbar .title { flex: 1; text-align: center; min-width: 0; }
.topbar .title h1 { font-size: 20px; font-weight: 700; }
.topbar .title p { color: var(--muted); font-size: 13px; }
.topbar .spacer { width: 48px; flex: none; }

.icon-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; flex: none;
  background: #fff; display: grid; place-items: center; box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink);
}
.icon-btn.dark { background: var(--dark); color: #fff; }
.icon-btn.ghost { background: rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(8px); box-shadow: none; border: 1px solid rgba(255,255,255,.35); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- Search ---------- */
.search {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow);
}
.search > svg { width: 22px; height: 22px; color: var(--ink); flex: none; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; padding: 10px 0; min-width: 0; }
.search input::placeholder { color: var(--muted); }

/* ---------- Section titles ---------- */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 14px; }
.section-title h2 { font-size: 22px; font-weight: 700; }
.section-title a, .link { color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; background: none; border: 0; padding: 0; }

/* ---------- Chips / tabs ---------- */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 2px 20px 6px; margin: 0 -20px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 0; background: #fff; color: var(--dark-2); border-radius: 999px;
  padding: 11px 20px; font-weight: 500; font-size: 15px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.chip.active { background: var(--dark); color: #fff; }
.chip .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 700; margin-left: 6px; padding: 0 5px; }

/* ---------- Hero card (accueil) ---------- */
.hero-wrap { position: relative; margin-top: 4px; }
.hero-wrap::before, .hero-wrap::after {
  content: ""; position: absolute; top: 18px; bottom: 18px; width: 40px; border-radius: var(--r-lg); z-index: 0;
  background: var(--sky); opacity: .55;
}
.hero-wrap::before { left: -10px; }
.hero-wrap::after { right: -10px; background: linear-gradient(170deg, #f2b36b, #e2774a); }
.hero {
  position: relative; z-index: 1; display: block; text-decoration: none; color: #fff;
  border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 5; max-height: 480px; width: 100%;
  background: var(--sky) center / cover no-repeat; box-shadow: var(--shadow-lg);
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 35%, rgba(0,0,0,.72) 100%); }
.hero .hero-top { position: absolute; top: 18px; left: 18px; right: 18px; display: flex; justify-content: space-between; z-index: 2; }
.hero .hero-body { position: absolute; left: 22px; right: 22px; bottom: 22px; z-index: 2; }
.hero .kicker { font-size: 14px; opacity: .85; }
.hero h3 { font-size: 26px; font-weight: 700; margin: 4px 0 10px; text-shadow: 0 2px 12px rgba(0,0,0,.3); }
.hero .meta { display: flex; gap: 10px; align-items: center; font-size: 13px; opacity: .92; flex-wrap: wrap; }
.pill-outline { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.pill-outline svg { width: 15px; height: 15px; }
.see-more {
  margin-top: 16px; display: flex; align-items: center; justify-content: center; position: relative;
  background: rgba(40, 42, 44, .72); backdrop-filter: blur(10px); border-radius: 999px; height: 62px; font-weight: 500; font-size: 16px;
}
.see-more .go { position: absolute; right: 6px; top: 6px; width: 50px; height: 50px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; }
.see-more .go svg { width: 22px; height: 22px; }

.placeholder-art { position: absolute; inset: 0; display: grid; place-items: center; }
.placeholder-art svg { width: 46%; max-width: 220px; opacity: .9; }
.hero .placeholder-art { place-items: start center; padding-top: 18%; }
.hero .placeholder-art svg { width: 38%; opacity: .75; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 11px;
  font-size: 12px; font-weight: 600; background: var(--soft); color: var(--dark-2); white-space: nowrap;
}
.badge.live { background: #e7f6ee; color: var(--green); }
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.2s infinite; }
.badge.soon { background: #fff4e5; color: #b26a12; }
.badge.done { background: var(--soft); color: var(--muted); }
.badge.ok { background: #e7f6ee; color: var(--green); }
.badge.ko { background: #fdecec; color: var(--red); }
.badge.dark { background: var(--dark); color: #fff; }
.badge.glass { background: rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(8px); }
.badge svg { width: 14px; height: 14px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
.card.soft { background: var(--soft); box-shadow: none; }
.card.dark { background: var(--dark); color: #fff; }
.card h3 { font-size: 18px; font-weight: 700; }
.card + .card { margin-top: 14px; }

.tour-scroll { display: flex; gap: 14px; overflow-x: auto; padding: 4px 20px 14px; margin: 0 -20px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.tour-scroll::-webkit-scrollbar { display: none; }
.tour-card {
  flex: none; width: 78%; max-width: 330px; scroll-snap-align: start; background: #fff; border-radius: var(--r-lg);
  padding: 8px 8px 16px; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block;
}
.tour-card .img { position: relative; aspect-ratio: 16 / 10; border-radius: 18px; background: var(--sky) center / cover; overflow: hidden; }
.tour-card .img .badge { position: absolute; top: 10px; left: 10px; }
.tour-card .body { padding: 12px 10px 0; display: flex; gap: 10px; align-items: flex-end; }
.tour-card h4 { font-size: 17px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tour-card .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.round-go { width: 46px; height: 46px; border-radius: 50%; background: var(--dark); color: #fff; display: grid; place-items: center; flex: none; }
.round-go svg { width: 20px; height: 20px; }

.list-card {
  display: flex; gap: 14px; align-items: center; background: #fff; border-radius: var(--r-lg);
  padding: 10px 14px 10px 10px; box-shadow: var(--shadow); text-decoration: none; color: inherit;
}
.list-card + .list-card { margin-top: 12px; }
.list-card .thumb { width: 92px; height: 92px; border-radius: 18px; flex: none; background: var(--sky) center / cover; position: relative; overflow: hidden; }
.list-card .thumb .placeholder-art svg { width: 54%; }
.list-card h4 { font-size: 16px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-card .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.list-card .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.list-card > svg { width: 20px; height: 20px; flex: none; color: var(--muted); }

/* ---------- Détail culte ---------- */
.detail-hero {
  position: relative; height: 46vh; min-height: 300px; max-height: 460px; margin: 0 -20px;
  background: var(--sky) center top / cover no-repeat;
}
.detail-hero .hero-bar { position: absolute; top: calc(16px + env(safe-area-inset-top)); left: 20px; right: 20px; display: flex; justify-content: space-between; z-index: 2; }
.detail-hero .hero-bar .icon-btn { background: #fff; }
.sheet {
  position: relative; background: var(--bg); border-radius: var(--r-xl) var(--r-xl) 0 0; margin: -48px -20px 0; padding: 22px 20px 0; z-index: 3;
}
.sheet::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 4px; background: #cfd2d5; margin: -8px auto 16px; }
.sheet h1 { font-size: 26px; font-weight: 700; }
.info-line { display: flex; align-items: center; gap: 8px; color: var(--dark-2); font-size: 14px; margin-top: 8px; }
.info-line svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.speakers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.speaker { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 6px 14px 6px 6px; font-size: 14px; font-weight: 500; }
.speaker .ini { width: 28px; height: 28px; border-radius: 50%; background: var(--dark); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.actions .btn { padding: 0 14px; }
.actions .btn.sm { white-space: normal; line-height: 1.2; font-size: 13px; padding: 6px 12px; gap: 8px; }
.choice .box .opt { color: var(--ink); font-size: 15px; font-weight: 500; }

.tabs { display: flex; gap: 8px; overflow-x: auto; margin: 22px -20px 16px; padding: 0 20px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: 0; background: #fff; border-radius: 999px; padding: 11px 18px; font-weight: 500; color: var(--dark-2); white-space: nowrap; }
.tab.active { background: var(--dark); color: #fff; }
.tab .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-left: 6px; vertical-align: middle; }
.tab .dot.todo { background: var(--orange); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 999px;
  min-height: 54px; padding: 0 24px; font-weight: 600; font-size: 16px; text-decoration: none; transition: transform .1s, opacity .2s; white-space: nowrap;
  background: var(--dark); color: #fff;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 20px; height: 20px; }
.btn.block { width: 100%; }
.btn.light { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.btn.soft { background: var(--soft); color: var(--ink); }
.btn.whatsapp { background: #1fa855; color: #fff; }
.btn.danger { background: #fdecec; color: var(--red); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn.xs { min-height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn.xs svg { width: 16px; height: 16px; }
.sticky-cta { position: sticky; bottom: calc(var(--nav-h) + 26px + env(safe-area-inset-bottom)); z-index: 5; margin-top: 18px; }
.sticky-cta .btn { box-shadow: var(--shadow-lg); }

/* ---------- Forms ---------- */
.form > * + * { margin-top: 14px; }
.field label, .label { display: block; font-size: 13px; font-weight: 600; color: var(--dark-2); margin: 0 0 7px 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin: 6px 0 0 6px; }
.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid transparent; background: #fff; border-radius: var(--r-md);
  padding: 15px 18px; font-size: 16px; outline: 0; transition: border-color .15s; -webkit-appearance: none; appearance: none;
}
.card .input, .modal .input { background: var(--soft); }
.input:focus { border-color: var(--dark); }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23232628' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row .input { flex: 1; }

.choice { display: block; position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .box {
  display: flex; gap: 14px; align-items: center; background: #fff; border: 1.5px solid transparent; border-radius: var(--r-md);
  padding: 15px 16px; cursor: pointer; transition: border-color .15s, background .15s;
}
.card .choice .box { background: var(--soft); }
.choice .box .ic { width: 42px; height: 42px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; flex: none; }
.card .choice .box .ic { background: #fff; }
.choice .box .ic svg { width: 20px; height: 20px; }
.choice .box strong { display: block; font-weight: 600; font-size: 15px; color: var(--ink); }
.choice .box span { display: block; color: var(--muted); font-size: 13px; }
.choice .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c7cacd; flex: none; margin-left: auto; position: relative; }
.choice input:checked + .box { border-color: var(--dark); background: #fff; }
.choice input:checked + .box .radio { border-color: var(--dark); background: var(--dark); box-shadow: inset 0 0 0 4px #fff; }
.choice input:focus-visible + .box { outline: 2px solid var(--gold); }
.choices > * + * { margin-top: 10px; }

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 15px; background: #cfd2d5; position: relative; transition: background .2s; flex: none; margin: 0; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(20px); }

.upload {
  position: relative; border: 2px dashed #c9ccd0; border-radius: var(--r-lg); background: #fff; min-height: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; cursor: pointer; color: var(--muted);
}
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload img { width: 100%; max-height: 360px; object-fit: cover; }
.upload .up-ph svg { width: 34px; height: 34px; margin: 0 auto 6px; }

/* ---------- Accordions (programme) ---------- */
.acc { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.acc + .acc { margin-top: 12px; }
.acc summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .chev { margin-left: auto; transition: transform .2s; flex: none; }
.acc summary .chev svg { width: 22px; height: 22px; }
.acc[open] summary .chev { transform: rotate(180deg); }
.acc .acc-body { padding: 0 18px 18px; }
.acc .acc-body .label-sm { color: var(--muted); font-size: 13px; margin-top: 12px; }
.acc .acc-body .label-sm:first-child { margin-top: 0; }
.acc .acc-body p { white-space: pre-wrap; font-size: 15px; }

.person-ini { width: 46px; height: 46px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; font-weight: 700; flex: none; color: var(--dark-2); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { background: #fff; border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); }
.stat .v { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.stat .v small { font-size: 14px; color: var(--muted); font-weight: 600; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 2px; }
.stat.dark { background: var(--dark); color: #fff; }
.stat.dark .l, .stat.dark .v small { color: rgba(255,255,255,.65); }
.bar { height: 8px; background: var(--soft); border-radius: 8px; overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; background: var(--dark); border-radius: 8px; }
.stat.dark .bar { background: rgba(255,255,255,.15); }
.stat.dark .bar > i { background: var(--gold); }

.group-card { background: #fff; border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); }
.group-card + .group-card { margin-top: 12px; }
.group-card .gstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.group-card .gstats div { background: var(--soft); border-radius: 14px; padding: 10px 8px; text-align: center; }
.group-card .gstats b { display: block; font-size: 17px; }
.group-card .gstats span { font-size: 11px; color: var(--muted); }

.chart { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 10px; overflow-x: auto; }
.chart .col { flex: 1; min-width: 34px; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .bars { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.chart .bars i { width: 10px; border-radius: 6px 6px 3px 3px; background: var(--dark); min-height: 3px; }
.chart .bars i.b { background: var(--gold); }
.chart .bars i.c { background: #8fb3c9; }
.chart .lbl { font-size: 11px; color: var(--muted); white-space: nowrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--dark); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tbl td { padding: 12px 8px; border-bottom: 1px solid var(--line); }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.tbl-wrap { overflow-x: auto; }

/* ---------- Citations ---------- */
.quote { position: relative; background: #fff; border-radius: var(--r-lg); padding: 22px 20px 16px; box-shadow: var(--shadow); }
.quote + .quote { margin-top: 12px; }
.quote .mark { font-family: Georgia, serif; font-size: 54px; line-height: .6; color: var(--gold); height: 22px; }
.quote blockquote { margin: 6px 0 10px; font-size: 17px; font-weight: 500; line-height: 1.5; }
.quote .by { color: var(--muted); font-size: 13px; }
.quote .tools { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- Bottom nav ---------- */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40;
  width: calc(100% - 40px); max-width: 520px; height: var(--nav-h); background: var(--dark); border-radius: 999px;
  display: flex; align-items: center; justify-content: space-around; padding: 0 8px; box-shadow: var(--shadow-lg);
}
.nav a {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: #fff; text-decoration: none; position: relative;
  transition: background .2s, color .2s;
}
.nav a svg { width: 25px; height: 25px; }
.nav a.active { background: #fff; color: var(--ink); }
.nav a .lbl { display: none; }
.nav a .count { position: absolute; top: 8px; right: 8px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--gold); color: var(--ink); font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }

/* ---------- Auth ---------- */
.auth-hero {
  position: relative; padding: calc(40px + env(safe-area-inset-top)) 28px 70px; background: var(--sky); color: #fff;
  border-radius: 0 0 var(--r-xl) var(--r-xl); overflow: hidden;
}
.auth-hero .logo { width: 58px; height: 58px; }
.auth-hero .logo svg { width: 100%; height: 100%; }
.auth-hero h1 { font-size: 32px; font-weight: 800; margin-top: 18px; }
.auth-hero p { opacity: .88; margin-top: 6px; max-width: 34ch; }
.auth-hero .door { position: absolute; right: -30px; bottom: -40px; width: 200px; opacity: .18; }
.auth-card { position: relative; margin-top: -40px; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20, 22, 24, .45); z-index: 80; display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s ease;
}
.modal {
  background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 14px 20px calc(24px + env(safe-area-inset-bottom)); animation: up .25s ease;
}
.modal::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 4px; background: #cfd2d5; margin: 0 auto 16px; }
.modal .modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.modal .modal-head h2 { font-size: 21px; }
.modal .input { background: #fff; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translate(-50%, -140%); z-index: 100;
  background: var(--dark); color: #fff; border-radius: 999px; padding: 12px 20px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg); transition: transform .3s ease, opacity .3s; max-width: calc(100% - 32px); text-align: center;
  opacity: 0; pointer-events: none;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#toast.error { background: var(--red); }

/* ---------- Divers ---------- */
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; margin: 0 auto 10px; color: #b9bdc1; }
.empty h3 { color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: var(--r-md); padding: 14px 16px; font-size: 14px; }
.notice svg { width: 22px; height: 22px; flex: none; color: var(--orange); }
.notice.ok svg { color: var(--green); }
.notice.pending { background: #fff6e8; }
.notice.pending svg { color: #b26a12; }
.phone-field { display: flex; gap: 8px; }
.phone-field .cc { flex: 0 0 122px; padding-left: 14px; padding-right: 34px; }
.phone-field [data-num] { flex: 1; min-width: 0; letter-spacing: .02em; }
.todo { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.todo:last-child { border-bottom: 0; padding-bottom: 0; }
.todo .tick { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #cfd2d5; display: grid; place-items: center; flex: none; }
.todo .tick svg { width: 16px; height: 16px; }
.todo.done .tick { background: var(--green); border-color: var(--green); color: #fff; }
.todo.done .t { color: var(--muted); text-decoration: line-through; }
.todo .chev svg { width: 18px; height: 18px; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.qcard { background: #fff; border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }
.qcard + .qcard { margin-top: 12px; }
.qcard .qn { font-size: 13px; color: var(--muted); font-weight: 600; }
.qcard .qt { font-size: 17px; font-weight: 600; margin: 4px 0 14px; }
.qcard .choice .box { padding: 12px 14px; background: var(--soft); }
.qcard .choice input:checked + .box { background: #fff; }
.opt-row { display: flex; align-items: center; gap: 8px; }
.opt-row + .opt-row { margin-top: 8px; }
.opt-row .input { padding: 12px 14px; }
.opt-row .ok-toggle { width: 42px; height: 42px; border-radius: 50%; border: 2px solid #cfd2d5; background: #fff; display: grid; place-items: center; flex: none; color: transparent; }
.opt-row .ok-toggle.on { background: var(--green); border-color: var(--green); color: #fff; }
.opt-row .ok-toggle svg { width: 18px; height: 18px; }
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 4px; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.active { background: var(--dark); color: #fff; }
.mini-select { border: 0; background: var(--soft); border-radius: 999px; padding: 8px 30px 8px 12px; font-size: 13px; font-weight: 600; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23232628' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.brand-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 28px; }

/* ---------- Impression (rapport PDF) ---------- */
@media print {
  body { background: #fff; }
  .nav, .no-print, .icon-btn, #toast { display: none !important; }
  .page { max-width: none; padding: 0 !important; }
  .card, .stat, .group-card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}

/* ---------- Tablette / desktop ---------- */
@media (min-width: 900px) {
  body { font-size: 15.5px; }
  .layout.with-nav { padding-left: 116px; }
  .page { max-width: 1080px; padding: 36px 40px 60px; }
  .page.flush { padding-top: 36px; }
  .nav {
    left: 20px; top: 20px; bottom: 20px; transform: none; width: 84px; height: auto; max-width: none;
    flex-direction: column; justify-content: center; gap: 14px; border-radius: 42px; padding: 20px 0;
  }
  .nav a .lbl { display: block; position: absolute; left: 74px; background: var(--dark); color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 8px;
    white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
  .nav a:hover .lbl { opacity: 1; }
  .home-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: start; }
  .home-grid .section-title:first-child { margin-top: 0; }
  .hero { aspect-ratio: auto; height: 520px; max-height: none; }
  .tour-scroll { flex-wrap: wrap; overflow: visible; margin: 0; padding: 4px 0 14px; }
  .tour-card { width: calc(50% - 7px); max-width: none; }
  .list-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .list-grid .list-card + .list-card { margin-top: 0; }
  .detail { display: grid; grid-template-columns: 420px 1fr; gap: 36px; align-items: start; }
  .detail-hero { margin: 0; height: auto; aspect-ratio: 4 / 5; max-height: none; border-radius: var(--r-xl); overflow: hidden; position: sticky; top: 36px; }
  .sheet { margin: 0; padding: 0; border-radius: 0; background: transparent; }
  .sheet::before { display: none; }
  .tabs { margin: 22px 0 16px; padding: 0; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .groups-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .groups-grid .group-card + .group-card { margin-top: 0; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .sticky-cta { bottom: 20px; }
  .modal-backdrop { align-items: center; }
  .modal { border-radius: var(--r-xl); max-height: 86vh; }
  .chips, .tour-scroll { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
  .auth-wrap .auth-hero { margin: 0; border-radius: 0; display: flex; flex-direction: column; justify-content: center; padding: 60px; }
  .auth-wrap .auth-hero h1 { font-size: 46px; }
  .auth-wrap .auth-hero .door { width: 380px; }
  .auth-wrap .auth-side { display: grid; place-items: center; padding: 40px; }
  .auth-wrap .auth-side .page { padding: 0; width: 100%; max-width: 460px; }
  .auth-wrap .auth-card { margin-top: 0; }
}
