/*
 * needlyapp.com — feuille unique.
 * Tokens repris de docs/DESIGN_BRIEF.md (fond brun nocturne, crème chaud, or de la cloche) ;
 * la cloche est celle de docs/specs/Bell.dc.html, dessinée en CSS, à l'identique.
 * Aucune ressource tierce : les polices sont servies d'ici (une police Google chargée depuis
 * Google transmettrait l'adresse IP du visiteur — et, sur /i/<code>, l'adresse de la page).
 */

@font-face { font-family: 'Playfair Display'; src: url('/fonts/PlayfairDisplay_400Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('/fonts/BricolageGrotesque_700Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('/fonts/HankenGrotesk_400Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('/fonts/HankenGrotesk_600SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'DM Serif Display'; src: url('/fonts/DMSerifDisplay_400Regular_Italic.ttf') format('truetype'); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  color-scheme: dark;
  --bg-0: #1c1512;
  --bg-1: #120d0b;
  --text: #f5ece3;
  --text-2: #a99c8f;
  --muted: #8c8079;
  --card: rgba(255, 255, 255, 0.04);
  --card-line: rgba(255, 255, 255, 0.07);
  --chip: rgba(255, 255, 255, 0.06);
  --chip-line: rgba(255, 255, 255, 0.12);
  --cta: #fdf3ea;
  --cta-text: #161210;
  --brand: linear-gradient(135deg, #ef6f5f, #e86a9b);

  /* Humeur courante — « Coquin », la cloche du logo, par défaut. site.js les change au ding. */
  --dome: radial-gradient(ellipse 82% 80% at 40% 22%, #fff7ea 0%, #f7dcb0 18%, #e8b878 40%, #cf9050 60%, #a96a34 80%, #7d4a22 100%);
  --dome-shadow: inset 0 -18px 30px rgba(80,46,12,0.6), inset 0 10px 20px rgba(255,255,255,0.55), inset 14px 0 26px rgba(120,72,28,0.4), inset -14px 0 26px rgba(120,72,28,0.4), 0 18px 44px -8px rgba(0,0,0,0.5);
  --glow: rgba(217, 154, 82, 0.5);
  --wave: rgba(232, 184, 120, 0.85);
  --accent: #e8b878;
  --tint: #241a0d;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-1);
  background-image:
    radial-gradient(70% 45% at 50% 16%, color-mix(in srgb, var(--tint) 90%, transparent) 0%, transparent 70%),
    radial-gradient(120% 90% at 50% 10%, var(--bg-0) 0%, var(--bg-1) 55%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.9s var(--ease-out);
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }

.page {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 56px 22px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── Cloche ──────────────────────────────────────────────────────────────────────────────── */

.stage {
  position: relative;
  width: 260px;
  height: 250px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}

.glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 55%, var(--glow) 0%, transparent 62%);
  animation: glow 3s ease-in-out infinite alternate;
  transition: background 0.9s var(--ease-out);
  pointer-events: none;
}
@keyframes glow { from { opacity: 0.5; } to { opacity: 0.95; } }

.waves { position: absolute; inset: 0; pointer-events: none; }
.waves span {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 180px;
  height: 180px;
  margin: -90px 0 0 -90px;
  border-radius: 50%;
  border: 2px solid var(--wave);
  opacity: 0;
}
.ringing .waves span { animation: wave 1.1s var(--ease-out) forwards; }
.ringing .waves span:nth-child(2) { animation-delay: 0.14s; }
.ringing .waves span:nth-child(3) { animation-delay: 0.28s; }
@keyframes wave {
  0% { transform: scale(0.55); opacity: 0.9; }
  100% { transform: scale(1.55); opacity: 0; }
}

.bell-btn {
  position: relative;
  width: 200px;
  height: 184px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: float 4.5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(-7px); }
  50% { transform: translateY(7px); }
}

.bell {
  position: absolute;
  inset: 0;
  transform-origin: 50% 90%;
  transition: transform 0.12s ease-out;
}
.bell-btn:active .bell { transform: scale(0.96); }
.ringing .bell { animation: ding 0.6s var(--ease-out); }
@keyframes ding {
  0% { transform: scale(0.96) rotate(0); }
  20% { transform: scale(1.05) rotate(-7deg); }
  40% { transform: scale(1.03) rotate(5deg); }
  60% { transform: scale(1.01) rotate(-3deg); }
  80% { transform: scale(1) rotate(1.2deg); }
  100% { transform: scale(1) rotate(0); }
}

.bell > i { position: absolute; left: 50%; transform: translateX(-50%); display: block; }
.b-foot { bottom: 0; width: 194px; height: 20px; border-radius: 50%; background: linear-gradient(#3a2818, #22150c); box-shadow: 0 16px 28px -8px rgba(0,0,0,0.55); }
.b-band { bottom: 10px; width: 194px; height: 26px; background: linear-gradient(#7c5736 0%, #5c3f25 55%, #3e2916 100%); }
.b-top { bottom: 26px; width: 194px; height: 24px; border-radius: 50%; background: radial-gradient(ellipse at 50% 42%, #a3744a 0%, #6e4a2b 60%, #463017 100%); box-shadow: inset 0 2px 5px rgba(255,224,176,0.35), inset 0 -3px 6px rgba(0,0,0,0.45); }
.b-contact { bottom: 36px; width: 166px; height: 13px; border-radius: 50%; background: rgba(0,0,0,0.4); filter: blur(2px); }
.b-dome { bottom: 36px; width: 184px; height: 110px; border-radius: 92px 92px 16px 16px; background: var(--dome); box-shadow: var(--dome-shadow); transition: background 0.5s ease; }
.b-nut { bottom: 138px; width: 24px; height: 12px; border-radius: 50%; background: linear-gradient(90deg, #7a7a86, #f4f4f9 50%, #7a7a86); }
.b-post { bottom: 144px; width: 13px; height: 22px; border-radius: 4px; background: linear-gradient(90deg, #7a7a86, #f4f4f9 50%, #7a7a86); transition: transform 0.12s ease-out; }
/* Bouton chromé à plat, comme l'app (BellShape.tsx) : tranche + face. Reflets et bande du dôme
   retirés comme dans l'app (RD-08) — le site ne dessine rien que la cloche de l'app n'a plus. */
.b-knob { bottom: 161px; width: 38px; height: 9px; border-radius: 5px; background: linear-gradient(90deg, #6e6e7a, #e8e8f0 50%, #6e6e7a); box-shadow: 0 5px 10px rgba(0,0,0,0.5); transition: transform 0.12s ease-out; }
.b-cap { bottom: 166px; width: 38px; height: 10px; border-radius: 50%; background: radial-gradient(ellipse at 42% 30%, #ffffff, #dcdce4 55%, #8e8e99); transition: transform 0.12s ease-out; }
.bell-btn:active .b-knob, .bell-btn:active .b-cap, .bell-btn:active .b-post { transform: translate(-50%, 6px); }

.b-engrave {
  bottom: 76px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  line-height: 0.95;
  mix-blend-mode: multiply;
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
}
.b-engrave b { font-weight: 400; font-size: 19px; letter-spacing: 0.5px; color: rgba(52,26,8,0.52); text-shadow: 0 1px 0.5px rgba(255,255,255,0.5); }
.b-engrave em { font-size: 13px; letter-spacing: 1.5px; color: rgba(52,26,8,0.44); text-shadow: 0 1px 0.5px rgba(255,255,255,0.45); margin-top: 1px; }

.moods { display: flex; gap: 10px; justify-content: center; margin: 4px 0 28px; }
.moods i { width: 7px; height: 7px; border-radius: 50%; background: var(--chip-line); transition: background 0.4s ease, transform 0.4s var(--ease-out); }
.moods i.on { background: var(--accent); transform: scale(1.35); }

/* ── Texte ───────────────────────────────────────────────────────────────────────────────── */

.wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.5px;
  margin: 0 0 18px;
}

.tagline {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.08;
  letter-spacing: -1.2px;
  margin: 0 0 18px;
  text-wrap: balance;
}

.lead { color: var(--text-2); margin: 0 auto 36px; max-width: 30em; text-wrap: pretty; }
.lead em { display: block; font-style: italic; color: var(--muted); margin-bottom: 6px; }

.cards { display: grid; gap: 12px; width: 100%; margin: 0 0 32px; text-align: left; }
.card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 20px;
  padding: 18px 20px;
}
.card h2 { font-size: 16px; font-weight: 600; margin: 0 0 4px; letter-spacing: 0; }
.card p { margin: 0; color: var(--text-2); font-size: 15.5px; line-height: 1.5; }

.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 30px;
  background: var(--chip);
  border: 1px solid var(--chip-line);
  font-size: 15px;
  color: var(--text);
  margin: 0 0 14px;
}
.soon::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

.adults { color: var(--muted); font-size: 14px; margin: 0; }

/* ── Invitation ──────────────────────────────────────────────────────────────────────────── */

.cta {
  display: block;
  width: 100%;
  max-width: 360px;
  padding: 17px 24px;
  border-radius: 18px;
  background: var(--cta);
  color: var(--cta-text);
  font: 600 17px/1.2 'Hanken Grotesk', system-ui, sans-serif;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  margin: 0 auto 28px;
  transition: transform 0.12s ease-out;
}
.cta:active { transform: scale(0.98); }

.code-box {
  width: 100%;
  max-width: 360px;
  margin: 0 auto 28px;
  padding: 18px 20px 20px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--card-line);
}
.code-box p { margin: 0 0 12px; color: var(--text-2); font-size: 15px; }
.code-row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 24px;
  letter-spacing: 3px;
  color: var(--text);
  user-select: all;
  -webkit-user-select: all;
}
.copy {
  padding: 8px 14px;
  border-radius: 30px;
  background: var(--chip);
  border: 1px solid var(--chip-line);
  color: var(--text);
  font: 600 14px/1 'Hanken Grotesk', system-ui, sans-serif;
  cursor: pointer;
}

.fine { color: var(--muted); font-size: 14px; margin: 0 0 6px; }

[hidden] { display: none !important; }

/* ── Pied de page ────────────────────────────────────────────────────────────────────────── */

.foot {
  margin-top: auto;
  padding-top: 48px;
  font-size: 14px;
  color: var(--muted);
}
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-bottom: 10px; }
.foot a { color: var(--text-2); text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ── Page de texte : /delete-account (exigée par Google Play) ─────────────────────────────── */

.doc { text-align: left; align-items: stretch; }
.doc .wordmark { text-align: center; }
.doc-switch { text-align: right; font-size: 14px; margin: 0 0 8px; }
.doc-title { font-family: 'Playfair Display', Georgia, serif; font-weight: 400; font-size: 28px; line-height: 1.2; margin: 0 0 4px; }
.doc-sub { color: var(--muted); font-size: 15px; margin: 0 0 8px; }
.doc h3 { font-size: 16px; font-weight: 600; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--text-2); }
.doc strong { color: var(--text); font-weight: 600; }
.doc ol, .doc ul { padding-left: 1.2em; margin: 0 0 12px; }
.doc li { margin: 4px 0; }
.doc a { color: var(--accent); }
.doc-note { background: var(--card); border: 1px solid var(--card-line); border-radius: 16px; padding: 14px 16px; }
.doc .foot { text-align: center; }
.doc .foot a { color: var(--text-2); }

/* ── Entrée « l'écran se pose » (RD-78) ──────────────────────────────────────────────────── */

.rise { animation: rise 0.7s var(--ease-out) both; }
.rise.d1 { animation-delay: 0.08s; }
.rise.d2 { animation-delay: 0.16s; }
.rise.d3 { animation-delay: 0.24s; }
.rise.d4 { animation-delay: 0.32s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (min-width: 640px) {
  .page { padding-top: 88px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card { padding: 20px 18px; }
  .wordmark { font-size: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .bell-btn, .glow { animation: none; }
  .glow { opacity: 0.75; }
  .ringing .bell, .ringing .waves span { animation: none; }
  .rise { animation: none; }
  body, .b-dome, .glow { transition: none; }
}
