/* Reprend les écrans de l'app (subscribe.tsx, super-likes.tsx, PaySheet.tsx, login.tsx) et ses tokens (theme/tokens.ts). */
:root {
  --primary: #1c0716;
  --primary-pressed: #3a1530;
  --accent: #d3124a;
  --accent-pressed: #a80e3b;
  --premium: #b07a2a;
  --bg: #fbf4ec;
  --bg-subtle: #f5eae0;
  --white: #ffffff;
  --text: #1c0716;
  --text2: #3a2632;
  --text-secondary: #5b4651;
  --text-muted: #7a6670;
  --text-faint: #a8949c;
  --border: #e7d8cf;
  --border-soft: #efe2d9;
  --border-strong: #cdb9af;
  --blush: #f6e3dc;
  --success: #1e7f55;
  --success-tint: #e3f2ea;
  --error: #c0262d;
  --warning: #a86200;
  --disabled-bg: #e3d6cf;
  --disabled-fg: #9c8c93;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Figtree', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.35 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* Colonne au format téléphone, centrée sur grand écran. */
.phone-col { max-width: 440px; min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; }
.page { flex: 1; display: flex; flex-direction: column; }
.page.blush { background: linear-gradient(180deg, #f8cfc6 0%, #fbe4dc 38%, #fbf4ec 70%); }
.scroll { flex: 1; padding: calc(env(safe-area-inset-top) + 16px) 0 24px; }
.px { padding-left: 20px; padding-right: 20px; }

/* Typo de l'app : serif = Newsreader, sans = Figtree */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.t30 { font-size: 30px; line-height: 1.12; }
.t36 { font-size: 36px; line-height: 1.1; }
.t26 { font-size: 26px; line-height: 1.15; }
.muted { color: var(--text-secondary); }
.center { text-align: center; }
h1, h2, p { margin: 0; }

/* En-tête : logo + bascule CLEEQ+ / Super Likes */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { width: 104px; height: auto; display: block; }
.chips { display: flex; gap: 8px; }
.chip { height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--white); font-size: 14px; font-weight: 500; }
.chip[aria-selected='true'] { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* Pastille d'icône (couronne, étoile) */
.halo { flex: none; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: rgba(211, 18, 74, 0.12); }
.halo > span { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); box-shadow: 0 10px 22px rgba(211, 18, 74, 0.6); }
.halo.gold { background: rgba(176, 122, 42, 0.14); }
.halo.gold > span { background: var(--premium); box-shadow: 0 10px 22px rgba(176, 122, 42, 0.55); }

/* Formules CLEEQ+ : cartes horizontales */
.plans { display: flex; gap: 12px; overflow-x: auto; padding: 14px 20px 22px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.plans::-webkit-scrollbar { display: none; }
.plan {
  flex: none; width: 232px; height: 200px; scroll-snap-align: center;
  display: flex; flex-direction: column; padding: 16px 18px; text-align: left;
  border-radius: 24px; border: 2.5px solid var(--border-soft); background: var(--white);
}
.plan[aria-checked='true'], .pack[aria-checked='true'] { border-color: var(--accent); box-shadow: 0 14px 22px rgba(211, 18, 74, 0.3); }
.plan .row { height: 26px; display: flex; align-items: center; }
.tag { height: 26px; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; color: var(--white); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.tick { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); }
.plan .dur { margin-top: 14px; font: 400 46px/1 var(--serif); letter-spacing: -0.01em; }
.plan .tot { margin-top: 6px; color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.plan .month { margin-top: auto; align-self: flex-end; font-size: 18px; font-weight: 600; }
.plan .month small { color: var(--text-secondary); font-size: 14px; font-weight: 500; }

/* Avantages */
.perks { position: relative; margin: 8px 20px 0; padding: 30px 20px 8px; border-radius: 24px; background: var(--white); border: 1px solid var(--border-soft); }
.perks .badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); height: 26px; padding: 0 14px; border-radius: 999px; background: var(--primary); color: var(--bg); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; display: flex; align-items: center; white-space: nowrap; }
.perk { display: flex; align-items: center; gap: 14px; padding: 11px 0; color: var(--text2); font-size: 15.5px; line-height: 1.35; }
.perk b { color: var(--text); font-weight: 600; }
.perk .ic { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--blush); display: grid; place-items: center; }

/* Packs de Super Likes : 3 cartes côte à côte */
.packs { display: flex; gap: 10px; padding: 26px 20px 0; }
.pack {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center;
  padding: 12px 6px 16px; border-radius: 24px; border: 2.5px solid var(--border-soft); background: var(--white);
}
.pack .row { height: 24px; align-self: stretch; display: flex; justify-content: flex-end; padding-right: 4px; }
.pack .tick { width: 24px; height: 24px; }
.pack .n { font: 400 44px/1 var(--serif); }
.pack .lbl { margin-top: 4px; color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.pack .price { margin-top: 14px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.pack .save { height: 24px; margin-top: 8px; display: flex; align-items: center; }
.pack .save span { height: 24px; padding: 0 8px; border-radius: 8px; background: var(--blush); color: var(--accent); font-size: 11px; font-weight: 700; display: flex; align-items: center; }
.pack .unit { margin-top: 8px; color: var(--text-muted); font-size: 12.5px; font-weight: 500; line-height: 16px; text-align: center; }

.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); font-size: 13.5px; font-weight: 500; text-align: left; }
.info { margin: 26px 20px 0; padding: 14px 18px; border-radius: 24px; background: var(--white); border: 1px solid var(--border-soft); color: var(--text2); font-size: 14.5px; line-height: 1.45; }
.info b { color: var(--text); font-weight: 600; }
.info button { padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; }

/* Compte connecté + déconnexion (comme « Se déconnecter » dans Réglages) */
.account { margin: 28px 20px 0; text-align: center; color: var(--text-muted); font-size: 13.5px; }
.danger { margin-top: 2px; padding: 10px 16px; border: 0; background: none; color: var(--error); font-size: 15px; font-weight: 600; }

/* Barre du bas */
.bar {
  position: sticky; bottom: 0;
  display: grid; gap: 14px; padding: 14px 22px calc(env(safe-area-inset-bottom) + 16px);
  background: var(--white); border-top: 1px solid var(--border-soft);
  box-shadow: 0 -12px 24px rgba(28, 7, 22, 0.1);
}
.legal { color: var(--text-secondary); font-size: 11.5px; line-height: 17px; }
.legal a { color: var(--accent); }

/* Boutons (Btn de l'app) */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 56px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--primary); color: var(--white); font-size: 17px; font-weight: 600;
  transition: transform 0.08s, background 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn.accent { background: var(--accent); }
.btn.accent:active { background: var(--accent-pressed); }
.btn:disabled { background: var(--disabled-bg); color: var(--disabled-fg); transform: none; cursor: default; }
.btn.tertiary { background: transparent; color: var(--text); height: 48px; }
.demo { align-self: center; padding: 4px; border: 0; background: none; color: var(--text-faint); font-size: 12.5px; font-weight: 500; text-decoration: underline; }

/* Champs (Field de l'app) */
.label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 14px; font-weight: 600; }
.field { display: flex; align-items: center; height: 56px; border-radius: 16px; border: 1.5px solid var(--border-strong); background: var(--white); overflow: hidden; }
.field:focus-within { border-color: var(--primary); }
.field input, .field select { flex: 1; min-width: 0; height: 100%; padding: 0 16px; border: 0; outline: none; background: transparent; font-size: 17px; }
.field select { appearance: none; font-size: 16px; font-weight: 500; }
.field .end { display: grid; place-items: center; width: 52px; height: 100%; border: 0; background: none; color: var(--text-secondary); }
.field .dial { display: flex; align-items: center; height: 100%; padding: 0 14px; border-right: 1px solid var(--border-soft); font-weight: 600; }
.forgot { display: block; margin: 6px 0 0 auto; padding: 6px 0; border: 0; background: none; color: var(--accent); font-size: 14px; font-weight: 600; }
.err { color: var(--error); font-size: 13.5px; font-weight: 500; line-height: 19px; }
.hint { color: var(--text-secondary); font-size: 14px; line-height: 20px; }

/* Fenêtre de paiement (Sheet de l'app) */
.overlay { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; background: rgba(28, 7, 22, 0.45); animation: fade 0.2s ease-out; }
.sheet {
  width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto;
  padding: 10px 20px calc(env(safe-area-inset-bottom) + 22px);
  border-radius: 28px 28px 0 0; background: #fffbf7;
  animation: up 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.grip { width: 40px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: var(--border); }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .overlay, .sheet { animation: none; } }
.stack { display: grid; gap: 16px; align-content: start; }
.ops { display: flex; flex-wrap: wrap; gap: 10px; }
.op { flex: 1 1 calc(50% - 5px); display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 14px; border-radius: 16px; border: 2px solid var(--border-soft); background: var(--white); font-size: 15px; font-weight: 600; text-align: left; }
.op[aria-checked='true'] { border-color: var(--primary); }
.op i { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.round { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--blush); }
.round.ok { background: var(--success-tint); }
.spinner { width: 22px; height: 22px; margin: 0 auto; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
