/* Bouge ton Caillou : ciel bleu, lagon, sable, flamboyant. */
:root {
  --sky-1: #CFEAF8;        /* haut du ciel */
  --sky-2: #EAF6FC;        /* horizon */
  --lagoon: #0FA3B1;       /* turquoise du lagon, couleur principale */
  --lagoon-deep: #0B7A86;
  --ocean: #0B4F6C;        /* bleu profond, titres */
  --ink: #12303F;          /* texte */
  --ink-soft: #4A6572;
  --sand: #FBF6EE;         /* fond des panneaux */
  --sand-line: #EADFCB;
  --flamboyant: #E4572E;   /* accent (fleur du flamboyant) */
  --white: #FFFFFF;
  --shadow: 0 10px 30px rgba(11, 79, 108, .18);
  --radius: 22px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--sky-2);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
[hidden] { display: none !important; }

#map { position: fixed; inset: 0; }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* ── Boutons ─────────────────────────────────────────────── */
.btn {
  font: 600 16px/1 var(--sans);
  border: 0; border-radius: 999px;
  padding: 15px 22px; min-height: 50px;
  cursor: pointer; transition: transform .12s ease, background .2s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--lagoon); color: var(--white); box-shadow: 0 6px 18px rgba(15,163,177,.35); }
.btn--primary:hover { background: var(--lagoon-deep); }
.btn--ghost { background: transparent; color: var(--ocean); box-shadow: inset 0 0 0 1.5px rgba(11,79,108,.25); }
.btn--big { font-size: 19px; padding: 18px 48px; }
.btn--wide { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.85); color: var(--ocean); cursor: pointer;
}
.icon-btn--big { width: 60px; height: 60px; background: var(--lagoon); color: var(--white); }

/* ── Accueil ─────────────────────────────────────────────── */
.screen { position: fixed; inset: 0; z-index: 10; }
.welcome {
  /* Contenu calé en bas, mais jamais coupé en haut sur un petit écran : la page défile (margin-top: auto) */
  display: flex; flex-direction: column; overflow-y: auto;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 55%, var(--sand) 100%);
  padding: calc(24px + var(--safe-top)) 24px calc(28px + var(--safe-bottom));
}
.welcome__sky { position: absolute; inset: 0 0 auto 0; height: 58%; overflow: hidden; }
.sun {
  position: absolute; top: 14%; right: 16%;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, #FFF6D6 0%, #FFE59A 45%, rgba(255,229,154,0) 70%);
  animation: glow 6s ease-in-out infinite;
}
@keyframes glow { 50% { transform: scale(1.08); opacity: .85; } }
.waves { position: relative; z-index: 0; display: block; width: calc(100vw + 24px); height: 56px; margin: -40px calc(50% - 50vw - 12px) 14px; }
.welcome { overflow-x: hidden; }
.waves path:first-child { fill: rgba(15,163,177,.35); animation: drift 9s ease-in-out infinite; }
.waves path:last-child { fill: rgba(15,163,177,.6); animation: drift 7s ease-in-out infinite reverse; }
@keyframes drift { 50% { transform: translateX(-18px); } }
.welcome__body { position: relative; max-width: 440px; margin: auto auto 0; width: 100%; text-align: center; }
.wordmark {
  font: 600 clamp(40px, 11.5vw, 58px)/1.05 var(--serif);
  color: var(--ocean); margin: 0; letter-spacing: -.02em; text-wrap: balance;
}
.logo { position: relative; z-index: 1; display: block; width: min(170px, 42vw, 24svh); height: auto; margin: 0 auto; transform-origin: 44% 8%; }
/* ── Animation d'ouverture (web/js/intro.js) : scène 9:16 au centre de l'écran, coordonnées en % ── */
.intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--sky-2); cursor: pointer; overflow: hidden; }
.intro__stage { position: relative; width: min(100vw, calc(100svh * 9 / 16)); aspect-ratio: 9 / 16; container-type: inline-size; }
.intro__map { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro__abs { position: absolute; }
.intro__hang { transform-origin: 44% 8%; }
.intro__hang img { width: 100%; display: block; }
.intro__glint { position: absolute; width: 13%; height: auto; opacity: 0; }
.intro__pose2 svg, .intro__pose3 svg, .intro__stone svg { width: 100%; height: auto; display: block; overflow: visible; }
.intro-wing { animation: intro-flap .3s ease-in-out infinite; }
@keyframes intro-flap { 50% { transform: scaleY(-.35); } }
.intro__pin { position: absolute; width: 4.2cqw; height: 4.2cqw; margin: -2.1cqw 0 0 -2.1cqw; border-radius: 50%; background: #FF7B4C; border: .9cqw solid #FDF4E5; box-shadow: 0 .6cqw 1.2cqw rgba(0,0,0,.5); }
.intro__ring { position: absolute; width: 0; height: 0; }
.intro__ring i { position: absolute; left: 0; top: 0; width: 22cqw; height: 22cqw; border: .7cqw solid #FF7B4C; border-radius: 50%; transform: translate(-50%,-50%) scale(0); opacity: 0; }
.intro__bang { position: absolute; display: grid; place-items: center; width: 10cqw; height: 10cqw; border-radius: 50%; background: #FF7B4C; color: #FDF4E5; font: 800 7cqw/1 var(--sans); transform: translate(-50%,-50%) scale(0); }
.intro__puff { position: absolute; width: 0; height: 0; }
.intro__puff i { position: absolute; aspect-ratio: 1; border-radius: 50%; background: #FDF4E5; transform: translate(-50%,-50%) scale(0); }
.intro__tag { position: absolute; left: 0; right: 0; top: 14%; margin: 0; padding: 0 6cqw; text-align: center; font: 600 6.2cqw/1.2 var(--serif); color: var(--ocean); opacity: 0; text-wrap: balance; }
.tagline { font: italic 20px/1.3 var(--serif); color: var(--lagoon-deep); margin: 6px 0 22px; }
.pitch { font-size: 16px; line-height: 1.5; color: var(--ink-soft); margin: 0 auto 26px; max-width: 34ch; }
.welcome .btn { display: block; margin: 0 auto 12px; }
.pitch-more { font-size: 15px; line-height: 1.45; color: var(--ink-soft); margin: -14px auto 22px; max-width: 34ch; }
.create-event--home { display: flex; width: fit-content; margin: 0 auto 12px; }
.fineprint { font-size: 12.5px; color: var(--ink-soft); margin: 10px 0 0; }
.legal-link { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.legal-link--settings { display: block; text-align: center; font-size: 14px; margin: 14px 0 10px; }
.settings-btn { position: absolute; top: calc(14px + var(--safe-top)); right: 14px; }

/* ── Recherche (anneaux, repris de Pilgrim) ──────────────── */
.seeking {
  display: grid; place-items: center; align-content: center; gap: 28px;
  background: radial-gradient(circle at 50% 45%, rgba(234,246,252,.85), rgba(207,234,248,.95));
  backdrop-filter: blur(2px);
}
.rings { position: relative; width: 140px; height: 140px; }
.rings span {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--lagoon); opacity: 0;
  animation: ring 1.6s ease-out infinite;
}
.rings span:nth-child(2) { animation-delay: .8s; }
.rings i {
  position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px;
  border-radius: 50%; background: var(--lagoon); box-shadow: 0 0 0 5px rgba(15,163,177,.2);
}
@keyframes ring { from { transform: scale(.2); opacity: .9; } to { transform: scale(1); opacity: 0; } }
.seeking__text { font: italic 20px var(--serif); color: var(--ocean); margin: 0; }

/* ── Feuille de proposition ──────────────────────────────── */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--sand); border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow);
  padding: 10px 22px calc(22px + var(--safe-bottom));
  max-width: 560px; margin: 0 auto;
  animation: rise .35s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes rise { from { transform: translateY(100%); } }
.sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--sand-line); margin: 0 auto 14px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--lagoon-deep); margin: 0 0 6px; display: flex; gap: 10px; align-items: center; }
.badge { background: var(--flamboyant); color: var(--white); border-radius: 999px; padding: 3px 9px; font-size: 11px; letter-spacing: .04em; }
.place-name { font: 600 28px/1.15 var(--serif); color: var(--ocean); margin: 0 0 8px; }
.place-desc { font-size: 16px; line-height: 1.45; color: var(--ink-soft); margin: 0 0 6px; }
.reward { font: italic 15px var(--serif); color: var(--lagoon-deep); margin: 0 0 10px; }
.stars { display: flex; gap: 4px; margin-bottom: 18px; color: #F2B33D; font-size: 18px; }
.stars span { animation: twinkle 2.4s ease-in-out infinite; }
.stars span:nth-child(2) { animation-delay: .3s; } .stars span:nth-child(3) { animation-delay: .6s; }
.stars span.off { color: var(--sand-line); animation: none; }
@keyframes twinkle { 50% { opacity: .45; } }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── Navigation ──────────────────────────────────────────── */
.navpill {
  position: fixed; z-index: 20; top: calc(12px + var(--safe-top)); left: 12px; right: 12px;
  max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.94); border-radius: 999px;
  padding: 8px 8px 8px 10px; box-shadow: var(--shadow);
}
.compass { width: 44px; height: 44px; border-radius: 50%; background: var(--lagoon); display: grid; place-items: center; flex: none; }
.compass svg { fill: var(--white); transition: transform .25s linear; }
.compass.no-heading svg { opacity: .5; }
.navpill__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.navpill__text strong { font-size: 20px; color: var(--ocean); }
.navpill__text span { font-size: 14px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-footer {
  position: fixed; z-index: 20; left: 12px; right: 12px; bottom: calc(14px + var(--safe-bottom));
  max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; align-items: center;
}
/* Mentions de la carte en haut à droite, sous le bandeau de navigation */
.maplibregl-ctrl-bottom-right { bottom: auto; top: calc(84px + var(--safe-top)); }
.nav-status { background: rgba(255,255,255,.92); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; color: var(--ink-soft); margin: 0; box-shadow: var(--shadow); }
.nav-status:empty { display: none; }

/* Marqueurs */
.me { width: 20px; height: 20px; border-radius: 50%; background: var(--lagoon); border: 3px solid var(--white); box-shadow: 0 0 0 6px rgba(15,163,177,.25); }
.maplibregl-marker:has(> .me) { pointer-events: none; }   /* laisse passer le toucher vers les points d'agenda */
.target { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--flamboyant); border: 3px solid var(--white); box-shadow: var(--shadow); }

/* ── Narration ───────────────────────────────────────────── */
.narration { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; justify-content: flex-end; }
.narration__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(251,246,238,0) 0%, rgba(251,246,238,.75) 28%, var(--sand) 42%);
}
.narration__body {
  position: relative; max-width: 620px; margin: 0 auto; width: 100%;
  max-height: 70vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 24px calc(24px + var(--safe-bottom));
}
.story { font: 19px/1.7 var(--serif); color: var(--ink); margin: 8px 0 18px; }
.story::first-letter {
  float: left; font: 600 3.4em/.82 var(--serif); color: var(--lagoon-deep);
  margin: .06em .1em 0 0;
}
.story .w { cursor: pointer; border-radius: 4px; transition: background .15s; }
.story .w.on { background: rgba(15,163,177,.22); box-shadow: 0 0 0 2px rgba(15,163,177,.22); }
.story .w.done { color: var(--ink); }
.player {
  display: flex; align-items: center; gap: 14px; margin: 0 -24px 16px; padding: 12px 24px;
  position: sticky; bottom: calc(-24px - var(--safe-bottom)); z-index: 1;
  background: linear-gradient(180deg, rgba(251,246,238,0) 0%, var(--sand) 28%);
}
.hint { font-size: 13px; color: var(--ink-soft); margin: 0; }
.partner-info { background: var(--white); border-left: 4px solid var(--flamboyant); border-radius: 10px; padding: 12px 14px; font-size: 15px; line-height: 1.45; margin: 0 0 16px; }

/* ── Dialogues, toast ────────────────────────────────────── */
.dialog { border: 0; border-radius: var(--radius); padding: 22px; width: min(92vw, 420px); background: var(--sand); color: var(--ink); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(11,79,108,.35); }
.dialog h2 { font: 600 24px var(--serif); color: var(--ocean); margin: 0 0 16px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; font-size: 15px; }
.field select { font: 16px var(--sans); padding: 10px; border-radius: 12px; border: 1px solid var(--sand-line); background: var(--white); }
.field input[type=range] { accent-color: var(--lagoon); }
.steps { padding-left: 20px; line-height: 1.9; margin: 0 0 18px; }
.steps li svg { vertical-align: middle; color: var(--lagoon-deep); }
.toast {
  position: fixed; z-index: 50; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translateX(-50%);
  background: var(--ocean); color: var(--white); padding: 12px 18px; border-radius: 14px;
  font-size: 14.5px; max-width: 88vw; box-shadow: var(--shadow);
}
.demo-badge {
  position: fixed; z-index: 40; top: calc(70px + var(--safe-top)); left: 50%; transform: translateX(-50%);
  background: var(--flamboyant); color: var(--white); font-size: 12px; padding: 5px 12px; border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Agenda autour de moi ────────────────────────────────── */
.agenda-top {
  position: fixed; z-index: 20; top: calc(12px + var(--safe-top)); left: 12px; right: 12px;
  max-width: 620px; margin: 0 auto; display: flex; align-items: center; gap: 8px;
}
.agenda-top .icon-btn { flex: none; box-shadow: var(--shadow); background: var(--white); }
.agenda__chips {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px;
  -webkit-overflow-scrolling: touch; min-width: 0;
}
.agenda__chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; font: 600 14px var(--sans); border: 0; border-radius: 999px; padding: 10px 14px; min-height: 40px;
  background: rgba(255,255,255,.96); color: var(--ocean); border: 1px solid rgba(11,79,108,.14); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ocean); color: var(--white); }
.agenda {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-width: 620px; margin: 0 auto;
  /* Verre dépoli : la carte se devine derrière, le texte reste lisible en plein soleil */
  background: rgba(251, 246, 238, .55); -webkit-backdrop-filter: blur(5px) saturate(1.2); backdrop-filter: blur(5px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .5); border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow);
  padding: 10px 16px calc(12px + var(--safe-bottom)); max-height: 42vh; display: flex; flex-direction: column;
  animation: rise .35s cubic-bezier(.2,.9,.3,1.1);
}
.agenda__status { font: italic 16px var(--serif); color: var(--ocean); margin: 0 4px 8px; touch-action: none; }
/* Poignée : glisser pour agrandir ou réduire la liste (téléphone) */
.agenda__handle { display: block; width: 100%; border: 0; background: none; padding: 6px 0 4px; margin: -10px 0 2px; cursor: grab; touch-action: none; }
.agenda__handle .sheet__grip { display: block; margin: 0 auto; width: 44px; height: 5px; background: rgba(11, 79, 108, .28); }
.agenda { transition: height .25s cubic-bezier(.2,.9,.3,1); }
.agenda.is-dragging { transition: none; }
.agenda[style*="height"] { max-height: none; }
.agenda.is-min .agenda__list, .agenda.is-min .agenda__legend, .agenda.is-min .create-event { display: none; }
.agenda__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.agenda__list .ev button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left;
  background: rgba(255, 255, 255, .82); border: 0; border-left: 4px solid var(--ocean); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer; font: inherit; color: inherit;
}
.agenda__list .ev--now button { border-left-color: var(--flamboyant); }
.agenda__list .ev--today button { border-left-color: var(--lagoon); }
/* Tuile partenaire vendue : la carte blanche, c'est la ligne entière (visuel, texte, bouton du lien) */
.agenda__list .ev--paid {
  position: relative; background: rgba(255, 255, 255, .9); border-left: 4px solid var(--flamboyant);
  border-radius: 12px; margin-bottom: 8px; overflow: hidden;
}
.agenda__list .ev--paid button { background: none; border: 0; margin: 0; border-radius: 0; }
.agenda__list .ev--paid .ev__img { display: block; padding: 0; aspect-ratio: 16 / 9; width: 100%;
  background: linear-gradient(135deg, #0FA3B1, #0B4F6C 60%, #E4572E); }
.ev__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev__badge { position: absolute; top: 8px; left: 8px; background: var(--flamboyant); color: var(--white); font-size: 11px;
  font-weight: 700; letter-spacing: .04em; padding: 4px 8px; border-radius: 999px; text-transform: uppercase; pointer-events: none; }
.ev__desc { font-size: 13.5px; color: var(--ink); margin: 4px 0 0; overflow-wrap: anywhere; }
.ev__cta { display: inline-block; align-self: flex-start; background: var(--lagoon); color: var(--white); border-radius: 999px;
  padding: 8px 14px; font-weight: 700; font-size: 14px; text-decoration: none; }
.agenda__list .ev__cta { margin: -2px 12px 12px; }
.ev-pop .ev__cta { margin-top: 6px; }
/* Marqueurs des vendus (mêmes formes que l'aperçu du portail) : jamais regroupés.
   Pas de position: relative, qui écraserait le position: absolute de .maplibregl-marker (marqueurs décalés) */
.mk { border: 0; padding: 0; cursor: pointer; background: none; }
.mk-free { width: 18px; height: 18px; border-radius: 50%; background: var(--lagoon); border: 3px solid var(--white); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.mk-link { width: 30px; height: 30px; }
.mk-link::before { content: ""; position: absolute; inset: 0; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--flamboyant); border: 3px solid var(--white); box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.mk-link::after { content: ""; position: absolute; left: 50%; top: 45%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--white); }
.mk-une { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #0FA3B1, #0B4F6C 60%, #E4572E) center / cover; border: 3px solid var(--white); box-shadow: 0 0 0 3px var(--flamboyant), 0 6px 14px rgba(0,0,0,.3); }
.mk-une em { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px); white-space: nowrap; font: 700 10px var(--sans); font-style: normal; letter-spacing: .04em; text-transform: uppercase; color: var(--white); background: var(--flamboyant); padding: 2px 6px; border-radius: 999px; }
.ev__when { font-size: 12.5px; font-weight: 600; color: var(--lagoon-deep); margin: 0; }
.ev__when::first-letter { text-transform: uppercase; }
.ev__title { font: 600 17px/1.25 var(--serif); color: var(--ocean); }
.ev__where { font-size: 13.5px; color: var(--ink-soft); margin: 0; }
.agenda__legend { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 11.5px; color: var(--ink-soft); margin: 6px 4px 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: -6px; }
.dot--now { background: var(--flamboyant); } .dot--today { background: var(--lagoon); } .dot--later { background: var(--ocean); }
.dot--approx { background: var(--white); box-shadow: inset 0 0 0 2px var(--ocean); }
.ev-pop { font-family: var(--sans); display: flex; flex-direction: column; gap: 4px; padding-right: 8px; }
.ev__approx { font-size: 12.5px; color: var(--flamboyant); margin: 2px 0 0; }
.ev__link { font-weight: 600; color: var(--lagoon-deep); margin-top: 4px; }
.ev__source { font-size: 11.5px; color: var(--ink-soft); margin: 2px 0 0; }
/* Bulle « plusieurs rendez-vous au même endroit » */
.ev__count { font: italic 15px var(--serif); color: var(--ocean); margin: 0 0 2px; }
.ev-pop__list { list-style: none; margin: 0; padding: 0; max-height: min(240px, 22vh); overflow-y: auto; }
.ev-pop__list button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left;
  background: none; border: 0; border-top: 1px solid rgba(11,79,108,.1); padding: 8px 0; cursor: pointer; font: inherit; color: inherit;
}
.ev__title--small { font-size: 15px; }
/* Ordinateur : la liste passe sur le côté, la carte garde toute sa hauteur */
@media (min-width: 900px) and (pointer: fine) {
  .agenda-top { left: 16px; right: auto; width: 520px; max-width: none; margin: 0; }
  .agenda {
    left: 16px; right: auto; top: calc(80px + var(--safe-top)); bottom: 16px; width: 400px;
    max-height: none; margin: 0; border-radius: var(--radius); border-bottom: 1px solid rgba(255, 255, 255, .5);
  }
  .agenda__handle { display: none; }
}
/* La fiche d'un événement passe au-dessus des mentions de la carte */
.maplibregl-popup { z-index: 3; }
.maplibregl-popup-content { border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }

/* ── QR code « ouvrir sur le téléphone » (ordinateur uniquement) ── */
.phone-qr {
  position: absolute; z-index: 2; left: 24px; bottom: calc(24px + var(--safe-bottom));
  display: flex; align-items: center; gap: 14px; max-width: 360px;
  background: var(--white); border-radius: 18px; padding: 12px 16px 12px 12px; box-shadow: var(--shadow);
}
.phone-qr img { width: 150px; height: 150px; image-rendering: pixelated; border-radius: 8px; flex: none; }
.phone-qr p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.phone-qr strong { font: 600 18px var(--serif); color: var(--ocean); }
.phone-qr__url { font-weight: 600; color: var(--lagoon-deep); }
@media (max-width: 899px), (pointer: coarse) { .phone-qr { display: none !important; } }
/* « Créer un événement » : même bouton partout où l'on consulte (accueil, fiche, agenda, réglages) */
.create-event {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px;
  border-radius: 999px; background: rgba(228, 87, 46, .1); color: var(--flamboyant); font: 700 15px var(--sans); text-decoration: none;
}
.create-event:active { transform: scale(.97); }
.create-event--block { display: flex; margin-top: 10px; }
.create-event--small { min-height: 40px; padding: 8px 14px; font-size: 14px; margin-top: 10px; align-self: center; }

/* « Partager l'appli » : menu de partage du téléphone, ou Facebook / WhatsApp / copier sur ordinateur */
.share-app {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px;
  border-radius: 999px; border: 0; background: rgba(15, 163, 177, .12); color: var(--lagoon-deep); font: 700 15px var(--sans); cursor: pointer;
}
.share-app:active { transform: scale(.97); }
.share-app--home { margin: 4px auto 0; display: flex; }
.share-app--settings { width: 100%; margin: 4px 0 12px; }
.agenda__actions { display: flex; gap: 8px; margin-top: 10px; }
.agenda__actions .create-event--block { flex: 1; margin-top: 0; }
.agenda__actions .share-app span { display: none; }                 /* icône seule à côté de « Créer un événement » */
.agenda__actions .share-app { padding: 10px 14px; }
.agenda.is-min .agenda__actions { display: none; }
.share-list { display: grid; gap: 8px; margin-bottom: 12px; }
.share-fb { background: #1877F2; color: #fff; text-decoration: none; text-align: center; }
.share-wa { background: #25D366; color: #fff; text-decoration: none; text-align: center; }

/* ── Thème du soir : <html data-theme="nuit"> du coucher au lever du soleil (js/theme.js), maquette validée le 2026-11-24.
   Mêmes couleurs que la marque : bleu nuit, crème, corail, lagon lumineux. */
:root[data-theme="nuit"] {
  --sky-1: #011a35;
  --sky-2: #01264a;
  --lagoon: #2ec4cf;
  --lagoon-deep: #6fd9e0;
  --ocean: #fdf4e5;
  --ink: #fdf4e5;
  --ink-soft: #a9bccd;
  --sand: #0a3159;
  --sand-line: #1d4a75;
  --flamboyant: #ff7b4c;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
[data-theme="nuit"] body { background: var(--sky-2); }
[data-theme="nuit"] .welcome { background: linear-gradient(180deg, #011a35 0%, #01264a 55%, #0a3159 100%); }
[data-theme="nuit"] .welcome__sky {
  background-image: radial-gradient(circle, #fff 0 1px, transparent 1.6px), radial-gradient(circle, #fdf4e5 0 1px, transparent 1.6px);
  background-size: 67px 53px, 113px 89px; background-position: 13px 9px, 41px 33px; opacity: .9;
}
[data-theme="nuit"] .sun {
  width: 74px; height: 74px; top: 12%; right: 14%;
  background: radial-gradient(circle at 38% 38%, #fffaf0 0%, #f6e7c8 55%, #e9d3a6 100%);
  box-shadow: 0 0 40px 10px rgba(246, 231, 200, .25);
}
[data-theme="nuit"] .waves path:first-child { fill: rgba(46, 196, 207, .16); }
[data-theme="nuit"] .waves path:last-child { fill: rgba(46, 196, 207, .3); }
/* Le soir, la Calédonie faite de cailloux remplace la lune et les vagues ; la roussette la regarde aux jumelles */
[data-theme="nuit"] .sun, [data-theme="nuit"] .waves { visibility: hidden; }
[data-theme="nuit"] .welcome::before {
  content: ""; position: absolute; z-index: 0; left: 0; right: 0; top: calc(4px + var(--safe-top)); height: min(34svh, 62vw);
  background: url(../icons/carte-nuit.webp) no-repeat 50% 0 / contain; pointer-events: none;
}
@media (min-width: 900px) and (pointer: fine) {
  [data-theme="nuit"] .welcome::before { left: 56%; right: 3%; top: 14%; height: 66%; background-position: 50% 50%; }
}
[data-theme="nuit"] .tagline { color: #f1b48a; }
[data-theme="nuit"] .btn--primary { background: var(--lagoon); color: #01264a; box-shadow: 0 6px 22px rgba(46, 196, 207, .35); }
[data-theme="nuit"] .btn--primary:hover { background: #5fd6de; }
[data-theme="nuit"] .btn--ghost { color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(253, 244, 229, .3); }
[data-theme="nuit"] .icon-btn,
[data-theme="nuit"] .agenda-top .icon-btn { background: rgba(10, 49, 89, .94); color: var(--ink); }
[data-theme="nuit"] .icon-btn--big { background: var(--lagoon); color: #01264a; }
[data-theme="nuit"] .chip { background: rgba(10, 49, 89, .94); color: var(--ink); border-color: rgba(253, 244, 229, .16); }
[data-theme="nuit"] .chip[aria-pressed="true"] { background: var(--ink); color: #01264a; }
[data-theme="nuit"] .agenda { background: rgba(1, 30, 60, .78); border-color: rgba(253, 244, 229, .08); }
[data-theme="nuit"] .navpill,
[data-theme="nuit"] .nav-status { background: rgba(10, 49, 89, .94); }
[data-theme="nuit"] .phone-qr { background: #0a3159; }
[data-theme="nuit"] .phone-qr img { background: #fff; padding: 6px; }
[data-theme="nuit"] .partner-info,
[data-theme="nuit"] .field select { background: #0a3159; color: var(--ink); }
[data-theme="nuit"] .create-event { background: rgba(255, 123, 76, .16); color: var(--flamboyant); }
[data-theme="nuit"] .maplibregl-popup-content { background: #0a3159; color: var(--ink); }
[data-theme="nuit"] .maplibregl-popup-tip { border-top-color: #0a3159 !important; border-bottom-color: #0a3159 !important; }
[data-theme="nuit"] .maplibregl-ctrl-attrib { background: rgba(1, 30, 60, .7); color: #a9bccd; }
[data-theme="nuit"] .maplibregl-ctrl-attrib a { color: #a9bccd; }
[data-theme="nuit"] .agenda__list .ev button { background: rgba(10, 49, 89, .9); border-left-color: #6fa8d8; }
[data-theme="nuit"] .agenda__list .ev--now button { border-left-color: var(--flamboyant); }
[data-theme="nuit"] .agenda__list .ev--today button { border-left-color: var(--lagoon); }
[data-theme="nuit"] .agenda__list .ev--paid { background: rgba(10, 49, 89, .95); }
[data-theme="nuit"] .agenda__list .ev--paid button { background: none; }
[data-theme="nuit"] .ev__cta { color: #01264a; }
[data-theme="nuit"] .dot--approx { background: #01264a; box-shadow: inset 0 0 0 2px var(--ink); }
