/* The New Life — App web (sous /app) */

:root {
  --gold: #C9A063; --gold-light: #E8D4A0; --gold-dark: #8A6831; --gold-deep: #6E4F1F; --bronze: #4A330F;
  --cream: #FBF6EB; --cream-soft: #F4ECDC;
  --ink: #2A1E0F; --muted: #7A6A4F; --line: #E7DCC6;
  --serieux: #E11D48; --casual: #F97316; --amitie: #16A34A; --activite: #2563EB;
  --grad-gold: linear-gradient(135deg, #8A6831 0%, #C9A063 45%, #E8D4A0 100%);
  --grad-bronze: linear-gradient(160deg, #4A330F 0%, #6E4F1F 50%, #8A6831 100%);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--cream); color: var(--ink); min-height: 100vh; }
.wordmark { font-family: 'Italianno', cursive; line-height: 1; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font-family: inherit; }

/* Onboarding stages (welcome, age, verif, quiz) */
.stage { min-height: 100vh; background: var(--grad-bronze); color: white; display: flex; flex-direction: column; }
.stage-inner { margin: auto; max-width: 540px; width: 100%; padding: 48px 28px; text-align: center; }
.stage-inner.left { text-align: left; }

.brand-lockup { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 36px; }
.brand-lockup .name { font-family: 'Italianno', cursive; font-size: 60px; color: white; line-height: 1; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.brand-lockup .slog { font-style: italic; opacity: .75; font-size: 13px; }

.stage-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.stage-helper { opacity: .85; font-size: 14px; line-height: 1.6; margin-bottom: 28px; }

/* SSO buttons */
.ssobtn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px; width: 100%; border-radius: 14px; font-weight: 700; font-size: 14.5px; transition: .15s; }
.ssobtn:hover { transform: translateY(-1px); }
.ssobtn.apple { background: #000; color: white; }
.ssobtn.google { background: white; color: var(--ink); border: 1px solid #DADCE0; }
.ssobtn.facebook { background: #1877F2; color: white; }
.ssobtn.email { background: rgba(255,255,255,.12); color: white; border: 1px solid rgba(255,255,255,.4); }
.ssolist { display: flex; flex-direction: column; gap: 10px; }
.ssodiv { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.55); font-size: 11px; margin: 4px 0; }
.ssodiv::before, .ssodiv::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.18); }

.btn-gold { background: var(--gold); color: var(--ink); font-weight: 800; font-size: 14.5px; padding: 14px 24px; border-radius: 14px; width: 100%; }
.btn-gold:hover { background: var(--gold-light); }
.btn-gold:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost-light { background: transparent; color: white; border: 1px solid rgba(255,255,255,.4); padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 13.5px; }
.btn-link { background: transparent; color: rgba(255,255,255,.75); font-size: 13px; text-decoration: underline; }

.micro { font-size: 11px; opacity: .7; line-height: 1.6; margin-top: 16px; }
.error { background: rgba(225, 29, 72, .15); border: 1px solid rgba(225, 29, 72, .4); color: #FCA5A5; padding: 12px 14px; border-radius: 10px; font-size: 13px; margin-top: 14px; display: none; }
.error.show { display: block; }

/* Date of birth */
.dobcard { display: flex; gap: 8px; justify-content: center; padding: 22px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: 18px; margin: 18px 0; }
.dobcard input { width: 60px; height: 54px; border-radius: 12px; text-align: center; background: rgba(255,255,255,.12); color: white; font-size: 22px; font-weight: 700; border: none; outline: none; }
.dobcard input.wide { width: 80px; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; opacity: .9; text-align: left; line-height: 1.55; margin: 22px 0; }
.consent input { margin-top: 4px; flex: none; width: 16px; height: 16px; }

/* Verification (selfie) */
.liveness-ring { width: 220px; height: 220px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.4); display: flex; align-items: center; justify-content: center; margin: 28px auto; position: relative; overflow: hidden; }
.liveness-ring video { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.liveness-ring .placeholder { width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #f7c9a4 0% 26%, #e8a87a 27% 44%, transparent 45%), linear-gradient(135deg, var(--gold), var(--gold-dark)); }
.liveness-ring .pill { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6); color: white; padding: 6px 14px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.verif-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 10px; margin-top: 22px; text-align: left; }
.verif-card .box { width: 40px; height: 40px; border-radius: 10px; background: var(--gold); display: flex; align-items: center; justify-content: center; color: var(--ink); font-weight: 800; }
.verif-card .lbl { font-weight: 700; font-size: 13px; }
.verif-card .sm { font-size: 11px; opacity: .85; margin-top: 2px; }

/* Questionnaire */
.quiz-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 12px; }
.quiz-head .step { font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-light); }
.quiz-head .time { opacity: .7; font-size: 11px; }
.progress-bar { height: 5px; background: rgba(255,255,255,.16); border-radius: 99px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--gold-light); transition: width .4s; }
.quiz-q { margin-top: 28px; font-size: 21px; font-weight: 800; line-height: 1.3; text-align: left; }
.quiz-q .sub { display: block; font-size: 13px; font-weight: 500; opacity: .8; margin-top: 6px; }
.quiz-options { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.opt { background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.18); border-radius: 14px; padding: 14px 16px; font-size: 15px; font-weight: 600; cursor: pointer; text-align: left; display: flex; align-items: center; justify-content: space-between; transition: .15s; color: white; }
.opt:hover { border-color: var(--gold-light); background: rgba(255,255,255,.13); }
.opt.selected { border-color: var(--gold); background: rgba(201,160,99,.25); }
.opt .circle { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); flex: none; }
.opt.selected .circle { background: var(--gold); border-color: var(--gold); }

/* Slider bidimensionnel (questionnaire Session 2) */
.slider-group { margin-top: 24px; }
.slider-label { font-size: 13px; color: rgba(255,255,255,.85); margin-bottom: 8px; }
.slider-input { width: 100%; -webkit-appearance: none; appearance: none; height: 6px; background: rgba(255,255,255,.18); border-radius: 99px; outline: none; }
.slider-input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; background: var(--gold); border-radius: 50%; cursor: pointer; }
.slider-input::-moz-range-thumb { width: 22px; height: 22px; background: var(--gold); border-radius: 50%; border: none; cursor: pointer; }

/* Archetype card */
.arche-card { margin-top: 24px; background: var(--grad-gold); color: var(--ink); border-radius: 16px; padding: 16px; text-align: left; }
.arche-card .label { font-size: 11px; opacity: .8; font-weight: 700; letter-spacing: 1px; }
.arche-card .name { font-weight: 800; font-size: 18px; margin-top: 4px; }
.arche-card .note { font-size: 11.5px; opacity: .85; margin-top: 4px; }

.quiz-actions { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quiz-back { font-size: 13px; color: rgba(255,255,255,.7); }
.quiz-next { background: var(--gold); color: var(--ink); font-weight: 800; padding: 12px 22px; border-radius: 12px; font-size: 14px; }
.quiz-next:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================
   App principale (Découvrir, Rituel, Events, Messages, Profil)
   ============================================ */
.app-shell { display: grid; grid-template-columns: 260px 1fr; height: 100vh; overflow: hidden; }
@media (max-width: 760px) { .app-shell { grid-template-columns: 1fr; grid-template-rows: 1fr 64px; } }

.sidebar { background: var(--grad-bronze); color: white; padding: 24px 18px; display: flex; flex-direction: column; overflow-y: auto; }
@media (max-width: 760px) {
  .sidebar { order: 2; padding: 0; flex-direction: row; align-items: stretch; height: 64px; border-top: 1px solid rgba(255,255,255,.1); }
  .sidebar .brand-side, .sidebar .upgrade, .sidebar .me-pill { display: none; }
  .sidebar nav { flex-direction: row; flex: 1; gap: 0; padding: 0; }
  .sidebar nav button { flex: 1; border-radius: 0; padding: 8px; flex-direction: column; gap: 2px; font-size: 10px; }
}
.brand-side { font-family: 'Italianno', cursive; font-size: 30px; color: white; line-height: 1; margin-bottom: 2px; }
.brand-side + .tag { font-style: italic; opacity: .7; font-size: 11px; margin-bottom: 28px; }
.sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.sidebar nav button { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: rgba(255,255,255,.7); font-weight: 600; font-size: 14px; text-align: left; transition: .15s; }
.sidebar nav button:hover { background: rgba(255,255,255,.07); color: white; }
.sidebar nav button.active { background: rgba(255,255,255,.13); color: white; }
.sidebar nav .ic { width: 20px; height: 20px; display: inline-flex; flex-shrink: 0; }
.upgrade { margin-top: auto; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.22); font-size: 11.5px; line-height: 1.5; }
.upgrade b { color: var(--gold-light); }
.upgrade button { margin-top: 8px; background: var(--gold); color: var(--ink); font-size: 12px; font-weight: 800; padding: 7px 12px; border-radius: 10px; }
.me-pill { margin-top: 14px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(255,255,255,.08); border-radius: 12px; }
.me-pill .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.me-pill .info b { font-size: 13px; display: block; }
.me-pill .info span { font-size: 11px; opacity: .7; }

.main { display: flex; flex-direction: column; overflow-y: auto; background: var(--cream); }
.topbar { height: 60px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 24px; gap: 14px; flex-shrink: 0; }
.topbar h1 { font-size: 17px; font-weight: 800; color: var(--ink); }
.topbar .verified { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--gold-dark); font-weight: 700; }

/* Discover */
.discover-head { padding: 18px 24px; background: white; border-bottom: 1px solid var(--line); }
.modes { display: flex; gap: 8px; flex-wrap: wrap; }
.mode-btn { display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--muted); background: white; border: 1px solid var(--line); transition: .15s; }
.mode-btn:hover { border-color: var(--gold); }
.mode-btn.active { background: rgba(201,160,99,.12); border-color: var(--gold); color: var(--gold-dark); }
.grid-cards { padding: 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.discovery-card { background: white; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 2px 8px rgba(110,79,31,.06); }
.discovery-card .photo { position: relative; height: 220px; overflow: hidden; background: var(--grad-bronze); }
.discovery-card .photo .verified-pill { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 700; background: var(--gold-dark); color: white; padding: 4px 10px; border-radius: 99px; }
.discovery-card .photo .compat-pill { position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.95); color: var(--gold-dark); padding: 4px 10px; border-radius: 99px; }
.discovery-card .body { padding: 14px; }
.discovery-card .body h3 { font-size: 15px; font-weight: 800; }
.discovery-card .body .archetype { font-size: 12px; color: var(--muted); margin-top: 2px; }
.discovery-card .body .signals { font-size: 11.5px; color: var(--muted); margin: 8px 0 12px; }
.discovery-card .body .actions { display: flex; gap: 8px; }
.discovery-card .body .actions .engage { flex: 1; height: 38px; border-radius: 11px; background: var(--gold-dark); color: white; font-weight: 700; font-size: 13px; }
.discovery-card .body .actions .pass { width: 60px; height: 38px; border-radius: 11px; border: 1.5px solid var(--gold-dark); color: var(--gold-dark); font-weight: 700; font-size: 13px; background: white; }

/* PalierAware avatar (alternance gemme ↔ photo) */
.pal-avatar { position: relative; width: 100%; height: 100%; background: #1a1208; overflow: hidden; }
.pal-avatar .layer { position: absolute; inset: 0; transition: opacity 600ms ease-in-out; }
.pal-avatar .layer.gem { display: flex; align-items: center; justify-content: center; }
.pal-avatar .layer.gem svg { width: 60%; height: 60%; }
.pal-avatar .layer.photo { background-size: cover; background-position: center; }
.pal-avatar .layer.photo.blur3 { filter: blur(18px); }
.pal-avatar .layer.photo.blur2 { filter: blur(10px); }
.pal-avatar .layer.photo.blur1 { filter: blur(4px); }
.pal-avatar .layer.photo.blur0 { filter: blur(0); }
.pal-avatar .layer.hidden { opacity: 0; }

/* Empty state */
.empty { padding: 60px 30px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.empty p { font-size: 14px; line-height: 1.6; max-width: 380px; margin: 0 auto; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; margin: 60px auto; display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
