/* ============================================================
   Happy Ménopause · Espace membre (hub + onboarding)
   S'appuie sur les tokens de ../style.css
   ============================================================ */

body.app-body { background: var(--cream-dark); min-height: 100vh; }

.app-shell { max-width: 1080px; margin: 0 auto; padding: 40px 28px 70px; }

.app-topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; row-gap: 14px; margin-bottom: 40px; }
.app-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-brand img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.app-brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.app-brand-text span { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.app-brand-text strong { font-family: 'Cormorant Garamond', serif; font-size: 20px; color: var(--brown); white-space: nowrap; }
.app-brand-text strong em { color: var(--orange); font-style: italic; }

.app-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-user-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--peach), var(--orange));
  color: var(--white); display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 15px;
}
.app-user-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; max-width: 200px; }
.app-user-text strong { font-size: 14px; color: var(--brown); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-user-text span { font-size: 12px; color: var(--muted); }

@media (max-width: 480px) {
  .app-brand-text strong { font-size: 17px; }
  .app-user-text { max-width: 150px; }
}

.app-demo-note {
  font-size: 12.5px; color: var(--orange-dark); background: rgba(249,179,138,.22);
  border: 1px dashed var(--peach); border-radius: 12px; padding: 8px 14px;
  margin-bottom: 22px; display: inline-block;
}

.app-hero h1 { font-size: 30px; color: var(--brown); margin-bottom: 8px; }
.app-hero h1 em { color: var(--orange); font-style: italic; }
.app-hero p { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.app-hero-link { font-size: 13px; color: var(--orange); font-weight: 600; }
.app-hero-link:hover { text-decoration: underline; }

/* ---------- Protocol cards ---------- */
.app-protocols { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; margin-top: 30px; }

.app-pcard {
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: 26px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden;
}
.app-pcard-tag { position: absolute; top: 22px; right: 22px; font-size: 11px; padding: 5px 12px; border-radius: 99px; background: var(--cream-dark); color: var(--muted); }
.app-pcard-tag--active { background: rgba(93,168,120,.16); color: #3E8A5C; }
.app-pcard-icon { width: 46px; height: 46px; border-radius: 14px; background: rgba(213,85,11,.1); display: flex; align-items: center; justify-content: center; }
.app-pcard-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--orange); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-pcard h3 { font-size: 19px; color: var(--brown); }
.app-pcard p { font-size: 13px; color: var(--muted); line-height: 1.6; flex: 1; }
.app-pcard .dash-progress-track { height: 7px; border-radius: 99px; background: rgba(213,85,11,.15); overflow: hidden; margin-bottom: 4px; }
.app-pcard .dash-progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--peach), var(--orange)); }
.app-pcard-meta { font-size: 12px; color: var(--muted); }

.app-pcard.is-locked { opacity: .68; }
.app-pcard.is-locked .app-pcard-icon { background: var(--cream-dark); }
.app-pcard.is-locked .app-pcard-icon svg { stroke: var(--muted); }

.app-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-pill); padding: 12px 22px; font-weight: 500; font-size: 14px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark)); color: var(--white);
  box-shadow: 0 10px 22px rgba(213,85,11,.25); transition: transform .3s var(--ease);
}
.app-btn:hover { transform: translateY(-2px); }
.app-btn--ghost { background: transparent; color: var(--muted); box-shadow: none; border: 1.4px solid var(--cream-dark); cursor: not-allowed; }
.app-btn--ghost:hover { transform: none; }

/* ============================================================
   Onboarding / Quiz
   ============================================================ */
.quiz-intro { max-width: 620px; margin: 0 auto 34px; text-align: center; }
.quiz-intro h1 { font-size: 30px; color: var(--brown); margin: 10px 0; }
.quiz-intro h1 em { color: var(--orange); font-style: italic; }
.quiz-intro p { color: var(--muted); font-size: 14.5px; }
.quiz-meta { display: flex; justify-content: center; gap: 20px; margin-top: 16px; font-size: 12.5px; color: var(--orange-dark); }

.quiz-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 30px 32px; max-width: 680px; margin: 0 auto 20px; }
.quiz-q { padding: 22px 0; border-bottom: 1px solid var(--cream-dark); }
.quiz-q:first-child { padding-top: 0; }
.quiz-q:last-child { border-bottom: none; padding-bottom: 6px; }
.quiz-q-num { font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--orange); margin-bottom: 6px; display: block; }
.quiz-q h3 { font-size: 16.5px; color: var(--brown); font-family: 'Poppins', sans-serif; font-weight: 600; margin-bottom: 14px; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border-radius: 14px; border: 1.6px solid var(--cream-dark); cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.quiz-option:hover { background: var(--cream-dark); }
.quiz-option input { margin-top: 3px; accent-color: var(--orange); flex-shrink: 0; }
.quiz-option input:checked ~ span { color: var(--brown); font-weight: 500; }
.quiz-option:has(input:checked) { border-color: var(--orange); background: rgba(249,179,138,.14); }
.quiz-option span { font-size: 13.5px; color: var(--text); line-height: 1.5; }

.quiz-submit-row { display: flex; justify-content: center; margin-top: 10px; }
.quiz-submit-row button { border: none; cursor: pointer; font-family: 'Poppins', sans-serif; }
.quiz-submit-row .app-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.quiz-result { display: none; max-width: 620px; margin: 0 auto; text-align: center; }
.quiz-result.is-visible { display: block; }
.quiz-result-badge { width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 18px; background: rgba(213,85,11,.1); display: flex; align-items: center; justify-content: center; }
.quiz-result-badge svg { width: 34px; height: 34px; fill: none; stroke: var(--orange); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.quiz-result h2 { font-size: 27px; color: var(--brown); margin-bottom: 10px; }
.quiz-result h2 em { color: var(--orange); font-style: italic; }
.quiz-result p { color: var(--text); font-size: 14.5px; line-height: 1.7; margin-bottom: 18px; }
.quiz-result-gesture { background: rgba(249,179,138,.18); border-radius: 16px; padding: 18px 22px; margin-bottom: 24px; text-align: left; }
.quiz-result-gesture strong { display: block; color: var(--orange-dark); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.quiz-result-gesture span { font-size: 14px; color: var(--text); }
