/* ============================================================
   Pratiques trompeuses – Glassmorphism theme
   Font: DM Sans + Playfair Display
   ============================================================ */

:root {
  --navy:        #0a1628;
  --navy-mid:    #0f2240;
  --indigo:      #1a3a6e;
  --blue:        #2563eb;
  --blue-light:  #60a5fa;
  --cyan:        #06b6d4;
  --emerald:     #10b981;
  --amber:       #f59e0b;
  --rose:        #f43f5e;

  --glass-bg:    rgba(255,255,255,0.07);
  --glass-border:rgba(255,255,255,0.13);
  --glass-hover: rgba(255,255,255,0.11);
  --glass-strong:rgba(255,255,255,0.12);

  --text-primary:  rgba(255,255,255,0.95);
  --text-secondary:rgba(255,255,255,0.60);
  --text-muted:    rgba(255,255,255,0.38);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-glass: 0 8px 32px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.2);
  --shadow-glow:  0 0 40px rgba(37,99,235,0.15);

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--navy);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 32px 20px 64px;
  overflow-x: hidden;
  position: relative;
}

/* ---- Background ---- */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.5;
  animation: floatOrb 12s ease-in-out infinite alternate;
}
.orb-1 {
  width: 480px; height: 480px;
  top: -120px; left: -80px;
  background: radial-gradient(circle, rgba(37,99,235,0.6), transparent 70%);
  animation-delay: 0s;
}
.orb-2 {
  width: 360px; height: 360px;
  bottom: 5%; right: -80px;
  background: radial-gradient(circle, rgba(6,182,212,0.5), transparent 70%);
  animation-delay: -4s;
}
.orb-3 {
  width: 280px; height: 280px;
  top: 45%; left: 55%;
  background: radial-gradient(circle, rgba(16,185,129,0.35), transparent 70%);
  animation-delay: -8s;
}
@keyframes floatOrb {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(30px,20px) scale(1.08); }
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

/* ---- Wrapper ---- */
.wrapper {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

/* ---- Top Bar ---- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 0 4px;
}
.top-bar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.top-bar-logo svg { color: var(--blue-light); }
.top-bar-step {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ---- Step Track ---- */
.step-track {
  margin-bottom: 24px;
}
.step-track-inner {
  display: flex;
  align-items: center;
  gap: 0;
}
.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.step-node-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}
.step-node.active .step-node-icon {
  border-color: var(--blue-light);
  background: rgba(37,99,235,0.25);
  color: var(--blue-light);
  box-shadow: 0 0 20px rgba(96,165,250,0.3);
}
.step-node.done .step-node-icon {
  border-color: var(--emerald);
  background: rgba(16,185,129,0.2);
  color: var(--emerald);
}
.step-node span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.4px;
  transition: var(--transition);
}
.step-node.active span { color: var(--blue-light); }
.step-node.done span { color: var(--emerald); }

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.1);
  margin: 0 8px;
  margin-bottom: 20px;
  border-radius: 2px;
  transition: background 0.5s ease;
  position: relative;
  overflow: hidden;
}
.step-line.done {
  background: rgba(16,185,129,0.5);
}
.step-line.done::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--emerald), transparent);
  animation: lineFill 0.5s ease forwards;
}
@keyframes lineFill {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}

/* ---- Glass Card ---- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glass), var(--shadow-glow);
  overflow: hidden;
  position: relative;
}
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, transparent 60%);
  pointer-events: none;
}

/* ---- Step Panel ---- */
.step-panel {
  animation: slideIn 0.4s cubic-bezier(0.34,1.3,0.64,1) forwards;
}
.step-panel.hidden {
  display: none;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slideOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-16px) scale(0.98); }
}

/* ---- Card Header ---- */
.card-header {
  padding: 36px 40px 28px;
  border-bottom: 1px solid var(--glass-border);
  position: relative;
}
.card-header-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37,99,235,0.18);
  border: 1px solid rgba(96,165,250,0.3);
  color: var(--blue-light);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 5px 12px;
  border-radius: 50px;
  margin-bottom: 16px;
}
.card-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 8px;
}
.card-header p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 520px;
}

/* ---- Card Body ---- */
.card-body {
  padding: 32px 40px;
}

/* ---- Card Footer ---- */
.card-footer {
  padding: 24px 40px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255,255,255,0.03);
}

/* ---- Question ---- */
.question { margin-bottom: 32px; }
.question:last-child { margin-bottom: 0; }

.q-label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.5;
}
.q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  background: rgba(37,99,235,0.25);
  border: 1px solid rgba(96,165,250,0.35);
  color: var(--blue-light);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.q-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  font-style: italic;
}

/* ---- Options Grid ---- */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.options-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.options-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.opt { position: relative; }
.opt input[type="radio"],
.opt input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.opt label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  user-select: none;
  position: relative;
  overflow: hidden;
}
.opt label svg {
  flex-shrink: 0;
  opacity: 0.6;
  transition: var(--transition);
}
.opt label:hover {
  border-color: rgba(96,165,250,0.4);
  background: var(--glass-hover);
  color: var(--text-primary);
}
.opt label:hover svg { opacity: 0.9; }

.opt input:checked + label {
  border-color: rgba(96,165,250,0.6);
  background: rgba(37,99,235,0.18);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 0 20px rgba(37,99,235,0.12), inset 0 1px 0 rgba(255,255,255,0.08);
}
.opt input:checked + label svg {
  color: var(--blue-light);
  opacity: 1;
}
.opt label::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.opt input:checked + label::before { opacity: 1; }

/* ---- Rating Scale ---- */
.rating-scale {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rating-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 0 2px;
}
.rating-buttons {
  display: flex;
  gap: 10px;
}
.rating-btn {
  flex: 1;
  height: 48px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.rating-btn:hover {
  border-color: rgba(96,165,250,0.4);
  background: var(--glass-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}
.rating-btn.selected {
  border-color: rgba(96,165,250,0.7);
  background: rgba(37,99,235,0.25);
  color: var(--blue-light);
  box-shadow: 0 0 20px rgba(37,99,235,0.2);
  transform: translateY(-2px);
}

/* ---- Other Input ---- */
.other-input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  transition: var(--transition);
  outline: none;
  resize: vertical;
}
.other-input:focus {
  border-color: rgba(96,165,250,0.5);
  background: var(--glass-hover);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.other-input::placeholder { color: var(--text-muted); }

/* ---- Divider ---- */
.q-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 28px 0;
}

/* ---- Buttons ---- */
.btn-next, .btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 28px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--cyan) 100%);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37,99,235,0.4);
  transition: var(--transition);
  letter-spacing: 0.2px;
  position: relative;
  overflow: hidden;
}
.btn-next::before, .btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-next:hover::before, .btn-submit:hover::before { opacity: 1; }
.btn-next:hover, .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,99,235,0.5);
}
.btn-next:active, .btn-submit:active { transform: translateY(0); }
.btn-next svg, .btn-submit svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}
.btn-back:hover {
  border-color: rgba(255,255,255,0.25);
  color: var(--text-primary);
  background: var(--glass-bg);
}
.btn-back svg { width: 16px; height: 16px; }

/* ---- Submit loading ---- */
.btn-submit.loading {
  opacity: 0.7;
  pointer-events: none;
}
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 30px; right: 30px;
  background: rgba(15,34,64,0.9);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 16px 22px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34,1.4,0.64,1);
  z-index: 1000;
  max-width: 380px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error   { border-color: rgba(244,63,94,0.4); }
.toast-icon {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}
.toast.success .toast-icon { background: rgba(16,185,129,0.2); color: var(--emerald); }
.toast.error   .toast-icon { background: rgba(244,63,94,0.2); color: var(--rose); }

/* ---- Page Footer ---- */
.page-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.3px;
}
.page-footer svg { color: rgba(255,255,255,0.25); }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .card-header, .card-body, .card-footer { padding-left: 24px; padding-right: 24px; }
  .options-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .rating-buttons { gap: 6px; }
  .rating-btn { height: 42px; font-size: 14px; }
  .card-header h2 { font-size: 19px; }
}
