/* ───── Psy Profile — liquid glass / pastel geometric ───── */
:root {
  --bg: #f5f8fb;
  --ink: #1f2b3a;
  --ink-soft: #5a6b80;
  --ink-faint: #8fa0b5;
  --accent: #4f7df0;
  --accent-soft: #dce7fd;
  --blob-1: #bcd9f2;
  --blob-2: #c6ece3;
  --blob-3: #dcd3f2;
  --blob-4: #f2d9e3;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.75);
  --glass-blur: 22px;
  --shadow: 0 18px 50px -18px rgba(48, 72, 110, 0.25), 0 4px 14px -6px rgba(48, 72, 110, 0.12);
  --shadow-soft: 0 10px 30px -14px rgba(48, 72, 110, 0.18);
  --ok: #4cab7d;
  --warn: #e3a23c;
  --danger: #e06767;
  --radius: 26px;
  --font-display: "Sora", sans-serif;
  --font-body: "Albert Sans", sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .display { font-family: var(--font-display); }

/* ── animated pastel geometric background ── */
.shapes-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.shapes-bg .grid-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(95, 125, 165, 0.14) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 75%);
}
.shape {
  position: absolute; opacity: 0.85;
  animation: floaty 14s ease-in-out infinite;
  will-change: transform;
}
.shape.blob { border-radius: 50%; filter: blur(2px); }
.shape.sq { border-radius: 24%; }
.shape.tri {
  width: 0; height: 0; background: transparent !important; filter: none;
}
@keyframes floaty {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33% { transform: translate(18px, -26px) rotate(6deg) scale(1.04); }
  66% { transform: translate(-14px, 16px) rotate(-5deg) scale(0.98); }
}
@media (prefers-reduced-motion: reduce) {
  .shape { animation: none; }
}

/* ── layout ── */
.app-root { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.page {
  width: 100%; max-width: 1080px; margin: 0 auto; padding: 36px 28px 80px;
  flex: 1; display: flex; flex-direction: column;
}
body.anim .page { animation: page-in 0.55s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes page-in {
  from { opacity: 0.2; transform: translateY(18px) scale(0.992); }
  to { opacity: 1; transform: none; }
}

/* ── glass primitives ── */
.glass {
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.35);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.35);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.glass.strong { background: var(--glass-strong); box-shadow: var(--shadow); }
.glass-pill {
  background: var(--glass-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
}

/* ── buttons ── */
.btn {
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  border: none; cursor: pointer; border-radius: 999px;
  padding: 14px 30px; letter-spacing: 0.01em;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s, background 0.25s, opacity 0.2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #7b9cf5);
  color: #fff;
  box-shadow: 0 10px 26px -10px rgba(79, 125, 240, 0.65);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -10px rgba(79, 125, 240, 0.7); }
.btn-ghost {
  background: var(--glass-strong); color: var(--ink);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}
.btn-ghost:hover { transform: translateY(-2px); background: #fff; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }
.btn.small { padding: 9px 20px; font-size: 13.5px; }

/* ── inputs ── */
.text-input {
  font-family: var(--font-body); font-size: 17px; color: var(--ink);
  background: var(--glass-strong); border: 1px solid var(--glass-border);
  border-radius: 18px; padding: 15px 22px; outline: none; width: 100%;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.text-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ── option cards (quiz answers) ── */
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%;
  text-align: left; cursor: pointer; font-family: var(--font-body);
  font-size: 15.5px; line-height: 1.45; color: var(--ink);
  background: var(--glass); border: 1.5px solid var(--glass-border);
  border-radius: 18px; padding: 15px 19px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.opt:hover { transform: translateY(-2px); background: rgba(255,255,255,0.8); box-shadow: var(--shadow-soft); }
.opt.selected {
  border-color: var(--accent); background: rgba(255,255,255,0.92);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-soft);
}
.opt .opt-key {
  flex: none; width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 12.5px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}
.opt.selected .opt-key { background: var(--accent); color: #fff; }

/* ── progress ── */
.progress-track {
  height: 7px; border-radius: 999px; background: rgba(120, 145, 180, 0.18);
  overflow: hidden; flex: 1;
}
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #9db9f7);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── chips & badges ── */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em;
  padding: 6px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--font-display); text-transform: uppercase;
}

/* ── slide transitions for quiz items ── */
body.anim .q-slide { animation: q-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
body.anim .hub-item { animation: page-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: var(--d, 0s); }
body.anim .flash-in { animation: page-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes q-in {
  from { opacity: 0; transform: translateX(26px); }
  to { opacity: 1; transform: none; }
}

/* ── balloon (BART) ── */
.balloon-stage { position: relative; display: grid; place-items: center; }
.balloon-wrap { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); transform-origin: 50% 100%; }
.balloon-wrap.popping { animation: pop-out 0.45s ease-out both; }
@keyframes pop-out {
  0% { transform: scale(1); opacity: 1; }
  18% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(0.2); opacity: 0; }
}
.pop-burst { position: absolute; inset: 0; pointer-events: none; }
.pop-burst span {
  position: absolute; left: 50%; top: 42%;
  width: 10px; height: 10px; border-radius: 3px;
  animation: burst 0.7s ease-out both;
}
@keyframes burst {
  from { transform: translate(-50%, -50%) rotate(0deg); opacity: 1; }
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(220deg); opacity: 0; }
}

/* ── dashboard ── */
.stat-bar-track { height: 9px; border-radius: 999px; background: rgba(120,145,180,0.16); overflow: hidden; }
.stat-bar-fill { height: 100%; border-radius: 999px; transition: width 1s cubic-bezier(0.22, 1, 0.36, 1); }

.flag-card {
  border-radius: 20px; padding: 18px 20px;
  border: 1.5px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), box-shadow 0.25s;
}
.flag-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }

.reveal { opacity: 1; }
body.anim .reveal { transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22,1,0.36,1); }
body.anim .reveal:not(.in) { opacity: 0; transform: translateY(24px); }

/* footer disclaimer */
.disclaimer {
  text-align: center; font-size: 12px; color: var(--ink-faint);
  padding: 18px 24px 26px; position: relative; z-index: 1;
}

/* ── jauges liquides (SVO) ── */
.gauge-tube {
  position: relative; overflow: hidden; border-radius: 17px;
  background: rgba(120, 145, 180, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 2px 6px rgba(48, 72, 110, 0.08);
}
.gauge-liquid {
  position: absolute; left: 0; right: 0; bottom: 0;
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.gauge-wave {
  position: absolute; top: -8px; left: 0; width: 300%; height: 9px;
  animation: wave-x 4s linear infinite; display: block;
}
@keyframes wave-x {
  from { transform: translateX(0); }
  to { transform: translateX(-33.3333%); }
}
.gauge-poss {
  position: absolute; left: 0; right: 0;
  transition: bottom 0.5s cubic-bezier(0.22,1,0.36,1), height 0.5s cubic-bezier(0.22,1,0.36,1);
}
.gauge-cap {
  position: absolute; left: 4px; right: 4px; height: 0;
  border-top: 2px dashed rgba(60, 85, 120, 0.4);
  transition: bottom 0.5s cubic-bezier(0.22,1,0.36,1);
}
@media (prefers-reduced-motion: reduce) {
  .gauge-wave { animation: none; }
}

/* tooltips on dashboard radar */
.radar-dot { cursor: pointer; transition: r 0.2s; }

::selection { background: var(--accent-soft); }

@media (max-width: 720px) {
  .page { padding: 22px 16px 64px; }
}

/* ───────────────── IMPRESSION / PDF ───────────────── */
@media print {
  @page { margin: 13mm; }
  html, body { background: #fff !important; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  /* masquer chrome & éléments interactifs */
  .shapes-bg, .disclaimer, [data-omelette-chrome], [data-print-hide] { display: none !important; }

  .app-root { display: block !important; }
  .page {
    max-width: none !important; width: 100% !important;
    padding: 0 !important; margin: 0 !important; animation: none !important;
  }

  /* verre → carton blanc net */
  .glass, .glass.strong, .flag-card, .glass-pill {
    background: #fff !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: 1px solid #dfe5ee !important;
  }

  /* tout révélé, aucune animation d'entrée */
  .reveal, .q-slide, .hub-item { opacity: 1 !important; transform: none !important; animation: none !important; }
  .reveal { transition: none !important; }

  /* éviter les coupures disgracieuses */
  .glass.strong, .flag-card, .glass { break-inside: avoid; page-break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; page-break-after: avoid; }
  .print-section { break-inside: avoid; }

  /* le héros (archétype + radar) tient sur la 1re page */
  .dash-hero { break-inside: avoid; page-break-inside: avoid; }

  /* en-tête d'impression */
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* ── porte-étendard : infobulles + drapeaux ── */
.bs-tip {
  position: absolute;
  background: rgba(28, 38, 52, 0.95);
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.45;
  white-space: nowrap;
  pointer-events: none;
  z-index: 6;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.sigil-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.sigil-tip {
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.sigil-wrap:hover .sigil-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.pennant { transform-box: fill-box; transform-origin: left center; }
@keyframes flag-sway {
  0%, 100% { transform: skewY(0deg); }
  50% { transform: skewY(-3.5deg); }
}
body.anim .pennant { animation: flag-sway 3.6s ease-in-out infinite; }


/* liens vers les références scientifiques (accueil) */
.ref-link {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dotted var(--ink-faint);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.ref-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}


