/* ═══════════════════════════════════════════════════════════
   KnowMe — style.css  (partagé create + play)
   Poppins | Dark-first | Hush purple-cyan gradient
   Zero emoji dans l'UI — SVG only
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

/* ─────────────────────────────────────────────────────────
   VARIABLES
───────────────────────────────────────────────────────── */
:root {
  --g1: #7B2FBE;
  --g2: #00D4FF;
  --grad: linear-gradient(135deg, var(--g1), var(--g2));

  --bg: #090914;
  --bg2: #0F0B22;
  --surface: rgba(255, 255, 255, 0.045);
  --surface2: rgba(255, 255, 255, 0.08);
  --surface3: rgba(255, 255, 255, 0.13);
  --border: rgba(255, 255, 255, 0.09);
  --border2: rgba(255, 255, 255, 0.17);
  --text: #F0EEFF;
  --text2: rgba(240, 238, 255, 0.60);
  --text3: rgba(240, 238, 255, 0.32);
  --card-bg: rgba(16, 10, 38, 0.96);
  --card-border: rgba(123, 47, 190, 0.22);
  --input-bg: rgba(255, 255, 255, 0.055);
  --input-focus: rgba(123, 47, 190, 0.22);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.40);
  --shadow-md: 0 8px 40px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 70px rgba(0, 0, 0, 0.65);
  --pill-bg: rgba(255, 255, 255, 0.07);
  --toggle-off: rgba(255, 255, 255, 0.18);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font: 'Poppins', -apple-system, sans-serif;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F0EDFF;
  --bg2: #E6E1FF;
  --surface: rgba(123, 47, 190, 0.05);
  --surface2: rgba(123, 47, 190, 0.09);
  --surface3: rgba(123, 47, 190, 0.15);
  --border: rgba(123, 47, 190, 0.12);
  --border2: rgba(123, 47, 190, 0.22);
  --text: #1A0E3A;
  --text2: rgba(26, 14, 58, 0.58);
  --text3: rgba(26, 14, 58, 0.32);
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-border: rgba(123, 47, 190, 0.18);
  --input-bg: rgba(123, 47, 190, 0.05);
  --input-focus: rgba(123, 47, 190, 0.14);
  --shadow-sm: 0 2px 12px rgba(80, 40, 160, 0.12);
  --shadow-md: 0 8px 40px rgba(80, 40, 160, 0.16);
  --shadow-lg: 0 20px 70px rgba(80, 40, 160, 0.20);
  --pill-bg: rgba(123, 47, 190, 0.08);
  --toggle-off: rgba(0, 0, 0, 0.18);
  color-scheme: light;
}

/* ─────────────────────────────────────────────────────────
   RESET
───────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: background .35s var(--ease-smooth), color .35s var(--ease-smooth);
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font-family: var(--font);
}

/* ─────────────────────────────────────────────────────────
   BACKGROUND ORBS
───────────────────────────────────────────────────────── */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.bg-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(123, 47, 190, .22) 0%, transparent 70%);
  top: -160px;
  left: -120px;
  filter: blur(60px);
  animation: orbFloat1 18s ease-in-out infinite;
}

.bg-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 212, 255, .14) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  filter: blur(50px);
  animation: orbFloat2 22s ease-in-out infinite;
}

[data-theme="light"] .bg-orb-1 {
  opacity: .50;
}

[data-theme="light"] .bg-orb-2 {
  opacity: .35;
}

@keyframes orbFloat1 {

  0%,
  100% {
    transform: translate(0, 0)
  }

  50% {
    transform: translate(30px, 40px)
  }
}

@keyframes orbFloat2 {

  0%,
  100% {
    transform: translate(0, 0)
  }

  50% {
    transform: translate(-25px, -30px)
  }
}

/* ─────────────────────────────────────────────────────────
   HEADER
───────────────────────────────────────────────────────── */
.hush-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  height: 60px;
  background: rgba(9, 9, 20, .82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .hush-header {
  background: rgba(240, 237, 255, .88);
}

.hush-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}

.hush-logo img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
}

.hush-logo-text {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.4px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Help button */
.help-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1.5px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}

.help-btn:hover {
  background: var(--surface3);
  transform: scale(1.08);
}

.help-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--text2);
}

/* Menu button */
.menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}

.menu-btn:hover {
  background: var(--surface3);
}

.menu-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--text2);
}

/* Dropdown */
.nav-dropdown-wrap {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 8px;
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
  display: none;
  z-index: 300;
}

.nav-dropdown.open {
  display: block;
  animation: dropIn .2s var(--ease-spring);
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.96);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.nav-drop-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
  color: var(--text3);
  padding: 7px 10px 4px;
  text-transform: uppercase;
}

.nav-drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: background .15s;
  text-decoration: none;
}

.nav-drop-item:hover {
  background: var(--surface2);
}

.nav-drop-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* Lang grid */
.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px 0;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  background: none;
  border: none;
  transition: all .15s;
  text-align: left;
}

.lang-item:hover,
.lang-item.active {
  background: var(--surface2);
  color: var(--text);
}

.lang-item.active {
  color: var(--g1);
  font-weight: 700;
}

.lang-flag {
  font-size: 15px;
  width: 18px;
  text-align: center;
}

/* ─────────────────────────────────────────────────────────
   HELP OVERLAY
───────────────────────────────────────────────────────── */
.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(5, 3, 18, .75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 12px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-smooth);
}

.help-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.help-panel {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-lg) var(--radius-lg);
  padding: 28px 24px 24px;
  transform: translateY(40px);
  transition: transform .35s var(--ease-spring);
  max-height: 75dvh;
  overflow-y: auto;
}

.help-overlay.open .help-panel {
  transform: translateY(0);
}

.help-panel-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.help-panel-sub {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 20px;
}

.help-step {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  align-items: flex-start;
}

.help-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin-top: 1px;
}

.help-step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.help-step-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
}

.help-close-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.help-close-btn:hover {
  background: var(--surface3);
}

/* ─────────────────────────────────────────────────────────
   PAGE & STEP TRANSITIONS
───────────────────────────────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  padding: 28px 16px 100px;
  max-width: 480px;
  margin: 0 auto;
}

.step-view {
  animation: stepEnter .38s var(--ease-spring);
}

@keyframes stepEnter {
  from {
    opacity: 0;
    transform: translateY(22px) scale(.97)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.step-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 24px;
  padding: 0 2px;
}

.step-dot {
  height: 3px;
  border-radius: 3px;
  flex: 1;
  background: var(--border);
  transition: background .4s var(--ease-smooth), flex .4s var(--ease-smooth);
}

.step-dot.done {
  background: var(--grad);
}

.step-dot.active {
  background: var(--g1);
  flex: 2;
}

/* ─────────────────────────────────────────────────────────
   CARDS
───────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 14px;
}

.card-header {
  padding: 30px 24px 22px;
  background: var(--grad);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, .18) 0%, transparent 60%);
  pointer-events: none;
}

.card-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.card-header-icon svg {
  width: 40px;
  height: 40px;
  stroke: rgba(255, 255, 255, .90);
}

.card-header-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.4px;
  line-height: 1.2;
}

.card-header-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, .78);
  margin-top: 5px;
  font-weight: 400;
}

.card-body {
  padding: 22px 20px;
}

/* ─────────────────────────────────────────────────────────
   INPUTS
───────────────────────────────────────────────────────── */
.field {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--text3);
  margin-bottom: 7px;
  text-transform: uppercase;
}

.field-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: border-color .22s, box-shadow .22s, background .22s;
}

.field-input:focus {
  border-color: var(--g1);
  box-shadow: 0 0 0 3px var(--input-focus);
}

.field-input::placeholder {
  color: var(--text3);
}

textarea.field-input {
  resize: none;
  line-height: 1.5;
}

.field-input[type="number"] {
  -moz-appearance: textfield;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}

.field-input[type="number"]::-webkit-outer-spin-button,
.field-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.field-char {
  font-size: 11px;
  color: var(--text3);
  text-align: right;
  margin-top: 5px;
  font-weight: 500;
}

.field-char.warn {
  color: #FF7070;
}

/* ─────────────────────────────────────────────────────────
   BUTTONS — correspondance exacte avec le JS
───────────────────────────────────────────────────────── */

/* Bouton principal (gradient) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all .22s var(--ease-smooth);
  width: 100%;
  letter-spacing: -.1px;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(.975);
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 24px rgba(123, 47, 190, .38);
}

.btn-primary:hover {
  box-shadow: 0 6px 32px rgba(123, 47, 190, .50);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: .38;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Bouton ghost (fond surface) */
.btn-ghost {
  background: var(--surface2);
  color: var(--text2);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface3);
  color: var(--text);
}

/* Bouton retour — CARRÉ, SVG flèche, NE s'étire PAS */
.btn-back {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  padding: 0;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
  color: var(--text2);
  flex-shrink: 0;
}

.btn-back:hover {
  background: var(--surface3);
  color: var(--text);
}

.btn-back svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  display: block;
}

/* Rangée bouton retour + bouton suivant */
.btn-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.btn-row .btn-back {
  align-self: stretch;
  height: auto;
  min-height: 48px;
}

.btn-row .btn {
  flex: 1;
}

/* ─────────────────────────────────────────────────────────
   SECTION LABEL
───────────────────────────────────────────────────────── */
.section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.3px;
  color: var(--text3);
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ─────────────────────────────────────────────────────────
   PILLS
───────────────────────────────────────────────────────── */
.pill-group {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.pill {
  padding: 9px 16px;
  border-radius: 50px;
  background: var(--pill-bg);
  border: 1.5px solid var(--border);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s var(--ease-spring);
}

.pill.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 16px rgba(123, 47, 190, .35);
  transform: scale(1.04);
}

.pill:not(.active):hover {
  background: var(--surface3);
  color: var(--text);
}

/* ─────────────────────────────────────────────────────────
   TOGGLE SWITCH
───────────────────────────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 12px;
}

.toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.toggle-sub {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}

.toggle-switch {
  width: 46px;
  height: 27px;
  border-radius: 14px;
  background: var(--toggle-off);
  border: none;
  cursor: pointer;
  position: relative;
  transition: background .28s;
  flex-shrink: 0;
}

.toggle-switch.on {
  background: linear-gradient(135deg, var(--g1), var(--g2));
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  transition: transform .28s var(--ease-spring);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

.toggle-switch.on::after {
  transform: translateX(19px);
}

/* ─────────────────────────────────────────────────────────
   TOLERANCE FIELDS
───────────────────────────────────────────────────────── */
.tol-wrap {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 10px;
  animation: fadeSlideDown .25s var(--ease-spring);
}

.tol-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.tol-row .field {
  flex: 1;
  margin-bottom: 0;
}

.tol-sep {
  color: var(--text3);
  font-size: 20px;
  font-weight: 300;
  padding-top: 22px;
  flex-shrink: 0;
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

/* ─────────────────────────────────────────────────────────
   QUESTION LIST (créateur)
───────────────────────────────────────────────────────── */
.q-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.q-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color .22s, box-shadow .22s;
}

.q-item.selected {
  border-color: rgba(123, 47, 190, .40);
  box-shadow: 0 0 0 3px rgba(123, 47, 190, .08);
}

.q-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  font-size: 12px;
  font-weight: 800;
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all .25s var(--ease-spring);
}

.q-item.selected .q-num {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
}

.q-content {
  flex: 1;
  min-width: 0;
}

.q-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 7px;
  line-height: 1.4;
}

.q-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
}

.q-type-tag svg {
  width: 11px;
  height: 11px;
}

.q-type-tag.bool {
  background: rgba(123, 47, 190, .14);
  color: var(--g1);
}

.q-type-tag.num {
  background: rgba(0, 212, 255, .10);
  color: var(--g2);
}

.q-actions {
  flex-shrink: 0;
}

.q-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .22s var(--ease-spring);
}

.q-toggle-btn svg {
  width: 14px;
  height: 14px;
  stroke: var(--text2);
  transition: stroke .2s, transform .3s;
}

.q-toggle-btn:hover {
  border-color: var(--g1);
}

.q-item.selected .q-toggle-btn {
  background: rgba(255, 80, 80, .12);
  border-color: rgba(255, 80, 80, .30);
}

.q-item.selected .q-toggle-btn svg {
  stroke: #FF6B6B;
  transform: rotate(45deg);
}

/* Custom builder */
.q-builder {
  background: var(--card-bg);
  border: 2px dashed rgba(123, 47, 190, .35);
  border-radius: var(--radius-lg);
  padding: 18px;
  animation: fadeSlideDown .25s var(--ease-spring);
}

.q-builder-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--g1);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.q-builder-title svg {
  width: 14px;
  height: 14px;
  stroke: var(--g1);
}

/* ─────────────────────────────────────────────────────────
   BOOL ANSWER BUTTONS
───────────────────────────────────────────────────────── */
.bool-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.bool-btn {
  padding: 16px 10px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all .2s var(--ease-spring);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text2);
}

.bool-btn-icon {
  width: 28px;
  height: 28px;
}

.bool-btn-icon svg {
  width: 28px;
  height: 28px;
}

.bool-btn span {
  font-size: 14px;
  font-weight: 700;
}

.bool-btn.true:hover,
.bool-btn.true.selected {
  background: rgba(0, 210, 100, .12);
  border-color: #00D264;
  color: #00D264;
}

.bool-btn.false:hover,
.bool-btn.false.selected {
  background: rgba(255, 80, 80, .10);
  border-color: #FF5050;
  color: #FF5050;
}

/* ─────────────────────────────────────────────────────────
   NUMPAD
───────────────────────────────────────────────────────── */
.numpad-display {
  text-align: center;
  font-size: 40px;
  font-weight: 900;
  padding: 18px 0 12px;
  min-height: 80px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.numpad-display.empty {
  -webkit-text-fill-color: var(--text3);
  background: none;
  font-size: 22px;
  font-weight: 400;
  padding-top: 26px;
}

.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 10px;
}

.numpad-key {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: var(--surface2);
  border: 1.5px solid var(--border);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.numpad-key:hover {
  background: var(--surface3);
  transform: scale(1.04);
}

.numpad-key:active {
  transform: scale(.93);
}

.numpad-key.del svg {
  width: 22px;
  height: 22px;
  stroke: var(--text2);
}

.numpad-key.confirm {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 18px rgba(123, 47, 190, .35);
}

.numpad-key.confirm svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
}

/* ─────────────────────────────────────────────────────────
   STYLE SELECTOR (cercle / demi-cercle / barre / badge)
───────────────────────────────────────────────────────── */
.style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.style-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 10px;
  cursor: pointer;
  background: var(--surface);
  text-align: center;
  transition: all .22s var(--ease-spring);
  /* important : pas de width:100% ni flex-grow ici */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.style-card:hover {
  border-color: rgba(123, 47, 190, .38);
  transform: translateY(-2px);
}

.style-card.active {
  border-color: var(--g1);
  background: rgba(123, 47, 190, .09);
  box-shadow: 0 0 0 3px rgba(123, 47, 190, .14);
}

.style-preview {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.style-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.style-desc {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
  line-height: 1.4;
}

/* Mini previews dans les cards de style */
.mini-circle-svg {
  width: 48px;
  height: 48px;
  display: block;
}

.mini-half-svg {
  width: 64px;
  height: 38px;
  overflow: visible;
}

.mini-bar-wrap {
  width: 75px;
}

.mini-bar-track {
  height: 11px;
  border-radius: 6px;
  background: var(--surface2);
}

.mini-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: var(--grad);
  width: 72%;
}

.mini-badge {
  padding: 7px 14px;
  border-radius: 11px;
  background: var(--grad);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

/* ─────────────────────────────────────────────────────────
   ANIM SELECTOR
───────────────────────────────────────────────────────── */
.anim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.anim-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 10px;
  cursor: pointer;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all .22s var(--ease-spring);
}

.anim-card:hover {
  border-color: rgba(123, 47, 190, .38);
  transform: translateY(-2px);
}

.anim-card.active {
  border-color: var(--g1);
  background: rgba(123, 47, 190, .09);
  box-shadow: 0 0 0 3px rgba(123, 47, 190, .14);
}

.anim-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  width: 100%;
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: 8px;
}

.anim-box {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--grad);
  flex-shrink: 0;
}

/* L'animation du preview ne se déclenche QUE sur hover ou active */
.anim-card.active .anim-box,
.anim-card:hover .anim-box {
  animation: var(--preview-anim, none) .9s ease-in-out infinite;
}

@keyframes prev-fade {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .08
  }
}

@keyframes prev-slide {

  0%,
  100% {
    transform: translateX(0)
  }

  50% {
    transform: translateX(20px)
  }
}

@keyframes prev-zoom {

  0%,
  100% {
    transform: scale(1)
  }

  50% {
    transform: scale(.52)
  }
}

@keyframes prev-flip {

  0%,
  100% {
    transform: rotateY(0deg)
  }

  50% {
    transform: rotateY(80deg)
  }
}

.anim-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.anim-desc {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
  line-height: 1.4;
  text-align: center;
}

/* ─────────────────────────────────────────────────────────
   COLOR PICKER
───────────────────────────────────────────────────────── */
.color-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.color-swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  outline: 3px solid transparent;
  transition: all .2s var(--ease-spring);
  flex-shrink: 0;
}

.color-swatch:hover {
  transform: scale(1.12);
}

.color-swatch.active {
  outline-color: var(--text);
  transform: scale(1.18);
}

/* ─────────────────────────────────────────────────────────
   EXPIRY
───────────────────────────────────────────────────────── */
.expiry-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.expiry-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 50px;
  background: rgba(123, 47, 190, .12);
  color: var(--g1);
  font-size: 12px;
  font-weight: 600;
}

.expiry-chip svg {
  width: 13px;
  height: 13px;
  stroke: var(--g1);
}

/* ─────────────────────────────────────────────────────────
   GENERATED LINK BOX
───────────────────────────────────────────────────────── */
.link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
}

.link-text {
  flex: 1;
  font-size: 11.5px;
  color: var(--text2);
  word-break: break-all;
  font-weight: 500;
}

.link-copy-btn {
  flex-shrink: 0;
  background: var(--grad);
  border: none;
  cursor: pointer;
  border-radius: 8px;
  padding: 8px 14px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  transition: opacity .2s;
  white-space: nowrap;
}

.link-copy-btn:hover {
  opacity: .85;
}

/* ─────────────────────────────────────────────────────────
   SHARE BUTTONS (step 6 créateur + step C répondeur)
   .share-btn  = petit carré icône+texte
   .share-btn.primary = pleine largeur
───────────────────────────────────────────────────────── */
.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 16px 10px;
  border-radius: var(--radius-md);
  background: var(--surface2);
  border: 1.5px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all .2s;
  width: 100%;
}

.share-btn:hover {
  background: var(--surface3);
  color: var(--text);
  transform: translateY(-2px);
}

.share-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  flex-shrink: 0;
}

/* Bouton primary plein-largeur dans share-actions */
.share-btn.primary {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 10px;
  padding: 18px 20px;
  font-size: 14px;
  font-weight: 700;
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 24px rgba(123, 47, 190, .38);
}

.share-btn.primary:hover {
  opacity: .92;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(123, 47, 190, .50);
}

.share-btn.primary svg {
  stroke: #fff;
}

/* ─────────────────────────────────────────────────────────
   SCORE DISPLAY (play — step C)
───────────────────────────────────────────────────────── */
.score-wrap {
  text-align: center;
  padding: 28px 20px 18px;
}

/* Cercle */
.score-circle-svg {
  width: 160px;
  height: 160px;
  display: block;
  margin: 0 auto;
}

.score-circle-track {
  fill: none;
  stroke: var(--border2);
  stroke-width: 9;
}

.score-circle-fill {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transform-origin: center;
  transform: rotate(-90deg);
}

/* Demi-cercle */
.score-half-svg {
  width: 200px;
  height: 112px;
  display: block;
  margin: 0 auto;
  overflow: visible;
}

/* Barre */
.score-bar-track {
  height: 22px;
  border-radius: 11px;
  background: var(--surface2);
  overflow: hidden;
  margin: 16px 0 8px;
}

.score-bar-fill {
  height: 100%;
  border-radius: 11px;
  background: var(--grad);
  width: 0;
}

.score-bar-pct {
  font-size: 36px;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.score-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text3);
}

/* Badge */
.score-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 36px;
  border-radius: 22px;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 36px rgba(123, 47, 190, .42);
}

.score-badge-num {
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
}

.score-badge-den {
  font-size: 18px;
  opacity: .82;
}

/* Grade & message communs */
.score-grade {
  font-size: 22px;
  font-weight: 800;
  margin: 12px 0 5px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.score-msg {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────
   RESULT DETAIL LIST (play)
───────────────────────────────────────────────────────── */
.result-list {
  display: flex;
  flex-direction: column;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  transition: background .15s;
}

.result-item:last-child {
  border-bottom: none;
}

.result-item:hover {
  background: var(--surface);
}

.result-num {
  font-size: 11px;
  color: var(--text3);
  width: 22px;
  text-align: right;
  flex-shrink: 0;
  font-weight: 600;
}

.result-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.result-icon svg {
  width: 18px;
  height: 18px;
}

.result-text {
  flex: 1;
}

.result-item.found {
  color: var(--text);
}

/* ─────────────────────────────────────────────────────────
   QUIZ PROGRESS + COUNTER (play)
───────────────────────────────────────────────────────── */
.quiz-progress {
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  margin-bottom: 22px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 3px;
  transition: width .5s var(--ease-smooth);
}

.quiz-counter {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.quiz-counter-cur {
  font-size: 13px;
  color: var(--text2);
  font-weight: 600;
}

/* Question card */
.question-card {
  transition: none;
}

.q-type-badge-play {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 12px;
}

.q-type-badge-play svg {
  width: 12px;
  height: 12px;
}

.q-type-badge-play.bool {
  background: rgba(123, 47, 190, .14);
  color: var(--g1);
}

.q-type-badge-play.num {
  background: rgba(0, 212, 255, .10);
  color: var(--g2);
}

.q-question-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 20px;
}

/* ─────────────────────────────────────────────────────────
   TRANSITIONS ENTRE QUESTIONS (play)
───────────────────────────────────────────────────────── */
.q-anim-slide-enter {
  animation: qSlideIn .38s var(--ease-spring) both;
}

.q-anim-slide-exit {
  animation: qSlideOut .25s var(--ease-smooth) both;
}

.q-anim-fade-enter {
  animation: qFadeIn .32s var(--ease-smooth) both;
}

.q-anim-fade-exit {
  animation: qFadeOut .20s var(--ease-smooth) both;
}

.q-anim-zoom-enter {
  animation: qZoomIn .35s var(--ease-spring) both;
}

.q-anim-zoom-exit {
  animation: qZoomOut .22s var(--ease-smooth) both;
}

.q-anim-flip-enter {
  animation: qFlipIn .40s var(--ease-spring) both;
}

.q-anim-flip-exit {
  animation: qFlipOut .25s var(--ease-smooth) both;
}

@keyframes qSlideIn {
  from {
    transform: translateX(55px);
    opacity: 0
  }

  to {
    transform: none;
    opacity: 1
  }
}

@keyframes qSlideOut {
  from {
    transform: none;
    opacity: 1
  }

  to {
    transform: translateX(-55px);
    opacity: 0
  }
}

@keyframes qFadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes qFadeOut {
  from {
    opacity: 1
  }

  to {
    opacity: 0
  }
}

@keyframes qZoomIn {
  from {
    transform: scale(.85);
    opacity: 0
  }

  to {
    transform: none;
    opacity: 1
  }
}

@keyframes qZoomOut {
  from {
    transform: none;
    opacity: 1
  }

  to {
    transform: scale(.85);
    opacity: 0
  }
}

@keyframes qFlipIn {
  from {
    transform: perspective(400px) rotateY(90deg);
    opacity: 0
  }

  to {
    transform: perspective(400px) rotateY(0);
    opacity: 1
  }
}

@keyframes qFlipOut {
  from {
    transform: perspective(400px) rotateY(0);
    opacity: 1
  }

  to {
    transform: perspective(400px) rotateY(-90deg);
    opacity: 0
  }
}

/* ─────────────────────────────────────────────────────────
   STATE SCREENS (expired / loading)
───────────────────────────────────────────────────────── */
.state-card {
  text-align: center;
  padding: 52px 24px;
}

.state-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.state-icon svg {
  width: 52px;
  height: 52px;
}

.state-title {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 8px;
}

.state-sub {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.55;
}

/* ─────────────────────────────────────────────────────────
   REPLAY BANNER
───────────────────────────────────────────────────────── */
.replay-banner {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

.replay-banner strong {
  color: var(--text);
}

/* ─────────────────────────────────────────────────────────
   HUSH FOOTER
───────────────────────────────────────────────────────── */
.hush-footer {
  margin-top: 28px;
  padding: 22px 20px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}

.hush-footer-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 5px;
}

.hush-footer-sub {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 16px;
}

.hush-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  background: var(--grad);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 22px rgba(123, 47, 190, .32);
  transition: all .22s;
}

.hush-download-btn svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
}

.hush-download-btn:hover {
  opacity: .90;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(123, 47, 190, .45);
}

/* ─────────────────────────────────────────────────────────
   TOAST
───────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(70px);
  background: rgba(20, 12, 50, .96);
  color: #fff;
  padding: 13px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 28px rgba(0, 0, 0, .45);
  backdrop-filter: blur(16px);
  z-index: 9999;
  white-space: nowrap;
  transition: transform .32s var(--ease-spring), opacity .32s;
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .10);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ─────────────────────────────────────────────────────────
   RTL
───────────────────────────────────────────────────────── */
[dir="rtl"] .hush-logo {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .q-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .bool-btns {
  direction: rtl;
}

/* ─────────────────────────────────────────────────────────
   SCROLLBAR
───────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .12);
  border-radius: 4px;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .15);
}

/* ─────────────────────────────────────────────────────────
   REDUCED MOTION
───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }

  .bg-orb {
    animation: none !important;
  }
}

/* ─────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────── */
@media (max-width: 400px) {
  .page {
    padding: 20px 12px 100px;
  }

  .card-body {
    padding: 18px 16px;
  }

  .style-grid,
  .anim-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bool-btns {
    grid-template-columns: 1fr 1fr;
  }
}




/* Force les boutons seuls en fin de grille à prendre toute la largeur */
.share-actions>.share-btn:last-child:nth-child(odd):not(.primary) {
  grid-column: 1 / -1;
}

/* Bouton ghost en pleine largeur */
.card-body>.btn-ghost,
.card-body>a.btn-ghost {
  width: 100%;
  margin-top: 4px;
}