/* =============================================
   ORIENTATION POSTBAC — style.css
   Style : cartes empilées visibles, boutons
   ronds, fond crème chaud, barre de progression
   ============================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #FAFAF0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 1rem;
}

#app { width: 100%; max-width: 460px; padding: 1.5rem 1rem; }

.screen { display: none; }
.screen.on { display: block; }

/* ── Palette pastels ── */
:root {
  --lav: #E8E4FF; --lav-d: #7B6FD4; --lav-t: #4A3FA0;
  --men: #D6F5EC; --men-d: #3DB889; --men-t: #1A7A57;
  --pec: #FFE8DC; --pec-d: #F08060; --pec-t: #B04020;
  --sol: #FFF3CC; --sol-d: #D4A820; --sol-t: #806010;
}

/* ── ACCUEIL ── */
.welcome-wrap { text-align: center; padding: .5rem 0; }
.welcome-emoji { font-size: 44px; margin-bottom: .75rem; display: block; }
.welcome-badge {
  display: inline-block; font-size: 12px; font-weight: 500;
  padding: 5px 14px; border-radius: 20px;
  background: var(--lav); color: var(--lav-t); margin-bottom: .75rem;
}
.welcome-h { font-size: 22px; font-weight: 500; color: #1a1a2e; line-height: 1.35; margin-bottom: .6rem; }
.welcome-sub { font-size: 14px; color: #555; line-height: 1.6; margin-bottom: 1.25rem; }
.promise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 1.4rem; }
.promise-tile { border-radius: 20px; padding: .85rem .9rem; }
.promise-tile-icon { font-size: 20px; margin-bottom: .35rem; display: block; }
.promise-tile-txt { font-size: 12px; line-height: 1.45; }

.start-btn {
  width: 100%; padding: 15px;
  background: var(--lav-d); color: #fff;
  border: none; border-radius: 50px;
  font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background .15s, transform .1s;
}
.start-btn:hover { background: var(--lav-t); }
.start-btn:active { transform: scale(.98); }
.disclaimer { font-size: 11px; color: #888; text-align: center; margin-top: .7rem; line-height: 1.5; }

/* ── QUIZ ── */
.prog-wrap { margin-bottom: 1rem; }
.prog-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.prog-label { font-size: 12px; font-weight: 500; color: #666; }
.prog-cat { font-size: 11px; padding: 2px 9px; border-radius: 20px; font-weight: 500; }
.prog-segs { display: flex; gap: 2px; }
.seg { height: 4px; flex: 1; border-radius: 2px; background: #ddd; transition: background .3s; }
.seg.done { background: var(--lav-d); }
.seg.maybe { background: #D4A820; }
.seg.active { background: var(--lav); border: 1px solid var(--lav-d); }

/* ── CARTES EMPILÉES ── */
.stack { position: relative; height: 310px; margin-bottom: 1rem; }

/* 3ème carte tout en bas */
.scard-back-2 {
  position: absolute; inset: 0;
  border-radius: 28px;
  transform: scale(.88) translateY(24px) rotate(2.5deg);
  opacity: .35;
  pointer-events: none;
}

/* 2ème carte */
.scard-back {
  position: absolute; inset: 0;
  border-radius: 28px;
  transform: scale(.93) translateY(13px) rotate(-1.5deg);
  opacity: .6;
  pointer-events: none;
}

/* Carte principale */
.scard {
  position: absolute; inset: 0;
  border-radius: 28px;
  padding: 1.4rem;
  display: flex; flex-direction: column; justify-content: space-between;
  cursor: grab; user-select: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.scard.drag { cursor: grabbing; transition: none; }
.scard.away { transition: transform .28s, opacity .28s; }

.vote-tag {
  position: absolute; top: 1rem;
  padding: 6px 14px; border-radius: 50px;
  font-size: 13px; font-weight: 500;
  opacity: 0; transition: opacity .1s; pointer-events: none;
}
.vtag-y { right: 1rem; background: #D6F5EC; color: #1A7A57; }
.vtag-n { left: 1rem; background: #FFE8DC; color: #B04020; }

.card-cat-pill {
  display: inline-block; font-size: 11px; font-weight: 500;
  padding: 4px 12px; border-radius: 50px;
  margin-bottom: .7rem; background: rgba(255,255,255,.55);
}
.card-q { font-size: 16px; font-weight: 500; line-height: 1.45; margin-bottom: .45rem; }
.card-sub { font-size: 13px; line-height: 1.55; opacity: .75; }
.swipe-hint { font-size: 11px; text-align: center; opacity: .4; }

/* ── BOUTONS RONDS ── */
.btn-row { display: flex; gap: 10px; margin-bottom: .6rem; }
.btn-c {
  flex: 1; padding: 14px 6px;
  border: none; border-radius: 50px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: transform .1s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.btn-c:active { transform: scale(.95); box-shadow: none; }
.btn-n { background: var(--pec); color: var(--pec-t); }
.btn-n:hover { background: #FFD5C5; }
.btn-m { background: var(--sol); color: var(--sol-t); }
.btn-m:hover { background: #FFE898; }
.btn-y { background: var(--men); color: var(--men-t); }
.btn-y:hover { background: #C0EEE0; }

.btn-back {
  width: 100%; padding: 7px;
  border: none; border-radius: 50px;
  background: transparent; font-size: 12px;
  color: #888; cursor: pointer;
}
.btn-back:hover { background: rgba(0,0,0,.04); }
.btn-back:disabled { opacity: .3; cursor: default; }

/* ── FEEDBACK ── */
.feedback-wrap { text-align: center; padding: .5rem 0; }
.fb-emoji { font-size: 40px; margin-bottom: .75rem; display: block; }
.fb-h { font-size: 18px; font-weight: 500; color: #1a1a2e; margin-bottom: .4rem; }
.fb-sub { font-size: 13px; color: #666; margin-bottom: 1.25rem; line-height: 1.5; }
.fb-stars { display: flex; justify-content: center; gap: 10px; margin-bottom: 1.25rem; }
.fb-star { font-size: 28px; cursor: pointer; opacity: .3; transition: opacity .15s, transform .1s; color: #D4A820; }
.fb-star.on { opacity: 1; }
.fb-star:hover { transform: scale(1.2); }
.fb-comment {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid #e8e8e8; border-radius: 16px;
  background: #fff; font-size: 13px; color: #333;
  resize: none; font-family: inherit; margin-bottom: 1rem;
}
.fb-comment:focus { outline: none; border-color: var(--lav-d); }
.fb-submit {
  width: 100%; padding: 14px;
  background: var(--lav-d); color: #fff;
  border: none; border-radius: 50px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.fb-submit:hover { background: var(--lav-t); }
.fb-skip {
  width: 100%; padding: 8px;
  border: none; background: transparent;
  font-size: 12px; color: #888; cursor: pointer; margin-top: .5rem;
}

/* ── RÉSULTATS ── */
.res-h { font-size: 20px; font-weight: 500; color: #1a1a2e; margin-bottom: .2rem; }
.res-s { font-size: 13px; color: #666; margin-bottom: 1rem; }

.profil-card {
  border-radius: 24px; padding: 1.1rem 1.2rem;
  margin-bottom: 1.1rem; background: var(--lav);
}
.profil-title {
  font-size: 11px; font-weight: 500; color: var(--lav-t);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: .3rem;
}
.profil-name { font-size: 15px; font-weight: 500; color: var(--lav-t); margin-bottom: .35rem; }
.profil-desc { font-size: 13px; color: var(--lav-t); opacity: .85; line-height: 1.55; margin-bottom: .6rem; }
.profil-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.ptag {
  font-size: 11px; padding: 4px 12px; border-radius: 50px;
  background: rgba(255,255,255,.6); color: var(--lav-t); font-weight: 500;
}

.comp-wrap { background: #f5f5ee; border-radius: 20px; padding: .85rem; margin-bottom: 1rem; }
.comp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.comp-table th {
  font-weight: 500; padding: 6px 8px;
  border-bottom: 1px solid #e0e0d8; color: #888; text-align: center;
}
.comp-table th:first-child { text-align: left; }
.comp-table td {
  padding: 6px 8px; border-bottom: 0.5px solid #eeeee6;
  text-align: center; color: #333;
}
.comp-table td:first-child { text-align: left; font-size: 11px; color: #888; font-weight: 500; }
.comp-table tr:last-child td { border-bottom: none; }
.bar-wrap { display: flex; align-items: center; gap: 4px; justify-content: center; }
.bar-bg { width: 44px; height: 6px; background: #e0e0d8; border-radius: 3px; overflow: hidden; }
.bar-fg { height: 100%; border-radius: 3px; }

/* ── Tooltip source ── */
.stat-w { position: relative; display: inline-flex; align-items: center; gap: 3px; }
.src-icon { font-size: 10px; cursor: pointer; opacity: .5; flex-shrink: 0; }
.src-icon:hover { opacity: 1; }
.src-tip {
  display: none; position: absolute; bottom: calc(100% + 4px); left: 50%;
  transform: translateX(-50%); background: #fff;
  border: 1px solid #e8e8e8; border-radius: 10px;
  padding: 5px 9px; font-size: 11px; color: #666;
  white-space: nowrap; z-index: 99;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.src-icon:hover + .src-tip { display: block; }

/* ── Fiche filière ── */
.fc { border-radius: 24px; padding: 1.1rem; margin-bottom: .8rem; }
.fc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .45rem; }
.fc-name { font-size: 14px; font-weight: 500; }
.fc-badge {
  font-size: 11px; padding: 4px 12px; border-radius: 50px;
  font-weight: 500; background: rgba(255,255,255,.55);
}
.score-row { display: flex; align-items: center; gap: 8px; margin-bottom: .55rem; }
.score-bar-wrap { flex: 1; height: 6px; border-radius: 3px; background: rgba(0,0,0,.08); overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 3px; }
.score-pct { font-size: 12px; font-weight: 500; min-width: 28px; text-align: right; }
.fc-truth {
  font-size: 12px; line-height: 1.6; padding: 9px 12px;
  background: rgba(255,255,255,.45); border-radius: 16px; margin-bottom: .65rem;
}
.section-label { font-size: 11px; font-weight: 500; opacity: .7; margin-bottom: 4px; }
.stats-row { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: .65rem; }
.stat-p {
  font-size: 11px; padding: 4px 12px; border-radius: 50px;
  background: rgba(255,255,255,.45); font-weight: 500;
}
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: .55rem; }
.chip {
  font-size: 11px; padding: 4px 12px; border-radius: 50px;
  background: rgba(255,255,255,.5); font-weight: 500;
}
.chip.match { background: rgba(255,255,255,.8); }

/* ── Spécialités dépliables ── */
.specs-list { display: flex; flex-direction: column; gap: 5px; margin-top: .4rem; }
.spec-row { background: rgba(255,255,255,.4); border-radius: 16px; overflow: visible; }
.spec-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; cursor: pointer; border-radius: 16px; transition: background .15s;
}
.spec-header:hover { background: rgba(255,255,255,.65); }
.spec-header-left { display: flex; align-items: center; gap: 8px; }
.spec-icon { font-size: 15px; }
.spec-name { font-size: 13px; font-weight: 500; }
.spec-arrow { font-size: 10px; opacity: .55; transition: transform .2s; }
.spec-arrow.open { transform: rotate(180deg); }
.spec-body { display: none; padding: 0 14px 10px; border-top: 1px solid rgba(255,255,255,.35); }
.spec-body.on { display: block; }
.truth-block { margin-top: 8px; margin-bottom: 5px; }
.truth-label {
  font-size: 10px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .05em; opacity: .55; margin-bottom: 4px;
}
.truth-item {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 12px; line-height: 1.5; margin-bottom: 4px; opacity: .9;
}
.t-icon { font-size: 12px; flex-shrink: 0; margin-top: 1px; }
.alt-paths {
  margin-top: 6px; padding: 8px 10px;
  background: rgba(255,255,255,.35); border-radius: 12px;
  font-size: 12px; line-height: 1.5;
}
.alt-paths-label {
  font-size: 10px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .04em; opacity: .55; margin-bottom: 3px;
}
.m-stats-row { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.m-stat {
  font-size: 11px; padding: 4px 10px; border-radius: 50px;
  background: rgba(255,255,255,.5); font-weight: 500;
}

.restart {
  width: 100%; margin-top: .65rem; padding: 13px;
  border: none; border-radius: 50px;
  background: #eeede4; font-size: 13px; cursor: pointer; color: #666;
}
.restart:hover { background: #e4e3da; }

.btn-share {
  width: 100%;
  margin-top: .65rem;
  padding: 13px;
  border: none;
  border-radius: 50px;
  background: var(--lav-d);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn-share:hover { background: var(--lav-t); }
.btn-share:active { transform: scale(.98); }
