/* =========================================================================
   Sondage Design & Usages — feuille de style principale
   Identité volontairement neutre (graphite + argent) pour ne pas influencer
   le vote sur les 6 propositions de design présentées plus loin.
   ========================================================================= */

:root {
  --bg:            #0a0b0f;
  --bg-2:          #0e1015;
  --surface:       #14161d;
  --surface-2:     #191c24;
  --card:          #12141a;
  --border:        #262a35;
  --border-soft:   #1c1f28;
  --text:          #e9ecf3;
  --text-strong:   #ffffff;
  --muted:         #8d95a8;
  --muted-2:       #666e80;
  --accent:        #8b7dfb;
  --accent-2:      #4fc3f7;
  --accent-soft:   rgba(139, 125, 251, 0.14);
  --ok:            #3ecf8e;
  --warn:          #eab308;
  --danger:        #f87171;
  --radius:        16px;
  --radius-sm:     10px;
  --radius-lg:     24px;
  --shadow:        0 24px 60px -30px rgba(0, 0, 0, 0.9);
  --shadow-soft:   0 8px 24px -12px rgba(0, 0, 0, 0.7);
  --font:          'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head:     'Sora', 'Inter', system-ui, sans-serif;
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(139, 125, 251, 0.12), transparent 65%),
    radial-gradient(800px 500px at 90% 8%, rgba(79, 195, 247, 0.09), transparent 60%),
    radial-gradient(700px 600px at 50% 110%, rgba(139, 125, 251, 0.06), transparent 60%);
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin: 0;
  line-height: 1.2;
}

a { color: inherit; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

::selection { background: rgba(139, 125, 251, 0.35); }

/* Scrollbars ------------------------------------------------------------ */
* { scrollbar-width: thin; scrollbar-color: #2c313d transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #2c313d; border-radius: 99px; border: 3px solid var(--bg); }
*::-webkit-scrollbar-thumb:hover { background: #3a4150; }

/* ======================================================= Structure ===== */

.shell { position: relative; z-index: 1; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 780px; }
.container-wide   { max-width: 1400px; }

.stack   { display: flex; flex-direction: column; }
.row     { display: flex; align-items: center; }
.gap-8   { gap: 8px; }  .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.gap-20  { gap: 20px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.wrap    { flex-wrap: wrap; }
.grow    { flex: 1 1 auto; min-width: 0; }
.center  { justify-content: center; }
.between { justify-content: space-between; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.hidden { display: none !important; }

/* ============================================================ Cartes === */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-soft { background: var(--surface); }
.card-flush { padding: 0; overflow: hidden; }

/* ========================================================== Boutons ==== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.16s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: #22262f; border-color: #333947; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6f5ef5);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 28px -14px rgba(139, 125, 251, 0.85);
}
.btn-primary:hover { background: linear-gradient(135deg, #9b8ffc, #7a6af6); border-color: transparent; }

.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-soft); }

.btn-danger { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.35); color: #fca5a5; }
.btn-danger:hover { background: rgba(248, 113, 113, 0.2); border-color: rgba(248, 113, 113, 0.55); color: #fecaca; }

.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: 13px; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }

.btn svg { width: 17px; height: 17px; flex: none; }

/* ============================================================ Champs === */

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }

.input, .textarea, .select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 15px;
  color: var(--text);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
  outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.input-lg { padding: 16px 20px; font-size: 17px; border-radius: 14px; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d95a8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 17px;
  padding-right: 40px;
  cursor: pointer;
}
.select option { background: var(--surface); color: var(--text); }

/* Cases à cocher / radios personnalisées */
.choice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  user-select: none;
}
.choice:hover { border-color: #353b4a; background: var(--surface-2); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .mark {
  width: 19px; height: 19px; flex: none; margin-top: 1px;
  border: 2px solid #3a4150; border-radius: 6px;
  display: grid; place-items: center;
  transition: all 0.15s var(--ease);
}
.choice[data-type="radio"] .mark { border-radius: 50%; }
.choice .mark svg { width: 12px; height: 12px; opacity: 0; transform: scale(0.6); transition: all 0.15s var(--ease); color: #fff; }
.choice input:checked ~ .mark { background: var(--accent); border-color: var(--accent); }
.choice input:checked ~ .mark svg { opacity: 1; transform: scale(1); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice .choice-label { font-size: 14px; font-weight: 500; }
.choice input:focus-visible ~ .mark { box-shadow: 0 0 0 3px var(--accent-soft); }

.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ======================================================== Page d'accueil */

.landing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 60px 24px 110px;
  position: relative;
  z-index: 1;
}

.landing-inner { width: 100%; max-width: 640px; text-align: center; }

.brand-mark {
  width: 68px; height: 68px;
  margin: 0 auto 26px;
  border-radius: 20px;
  background: linear-gradient(140deg, rgba(139, 125, 251, 0.22), rgba(79, 195, 247, 0.14));
  border: 1px solid rgba(139, 125, 251, 0.32);
  display: grid; place-items: center;
  color: var(--accent);
  box-shadow: 0 18px 44px -20px rgba(139, 125, 251, 0.7);
}
.brand-mark svg { width: 32px; height: 32px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.2); }

.landing h1 { font-size: clamp(30px, 5.4vw, 46px); margin-bottom: 16px; }
.landing .lead { color: var(--muted); font-size: 16px; max-width: 520px; margin: 0 auto 34px; }

.name-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow);
  text-align: left;
}

.landing-meta {
  display: flex; gap: 22px; justify-content: center; flex-wrap: wrap;
  margin-top: 30px; font-size: 13px; color: var(--muted-2);
}
.landing-meta span { display: inline-flex; align-items: center; gap: 7px; }
.landing-meta svg { width: 15px; height: 15px; }

.admin-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 17px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(20, 22, 29, 0.9);
  backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}
.admin-fab:hover { color: var(--text); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.admin-fab svg { width: 15px; height: 15px; }

/* ============================================================= Modales = */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 24px;
  opacity: 0;
  animation: fadeIn 0.18s var(--ease) forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

.modal {
  width: 100%; max-width: 460px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transform: translateY(12px) scale(0.98);
  animation: modalIn 0.22s var(--ease) forwards;
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
}
@keyframes modalIn { to { transform: translateY(0) scale(1); } }

.modal-head {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-head h3 { font-size: 18px; }
.modal-head p { margin: 5px 0 0; font-size: 13px; color: var(--muted); }
.modal-body { padding: 22px 24px; overflow-y: auto; }
.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--border-soft);
}
.modal-close {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); cursor: pointer; transition: all 0.15s var(--ease);
}
.modal-close:hover { color: var(--text); border-color: #3a4150; }
.modal-close svg { width: 16px; height: 16px; }

.modal-xl { max-width: min(1500px, 96vw); height: min(94vh, 1000px); }

/* Modale de démonstration (iframe) */
.demo-modal-head {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  flex: none;
}
.demo-swatch { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); flex: none; }
.demo-frame-wrap { flex: 1; min-height: 0; position: relative; background: #000; }
.demo-frame-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.demo-modal-foot {
  flex: none; display: flex; gap: 10px; align-items: center; justify-content: space-between;
  padding: 13px 18px; border-top: 1px solid var(--border-soft); flex-wrap: wrap;
}

/* ============================================================== Toasts = */

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 400; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast {
  display: flex; align-items: center; gap: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 12px 17px;
  box-shadow: var(--shadow-soft);
  font-size: 14px; max-width: 380px;
  animation: toastIn 0.24s var(--ease);
}
.toast.ok    { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--danger); }
.toast svg { width: 17px; height: 17px; flex: none; }
.toast.ok svg { color: var(--ok); }
.toast.error svg { color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ======================================================= Sondage : shell */

.survey-top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 11, 15, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.survey-top-inner {
  max-width: 1120px; margin: 0 auto; padding: 13px 24px;
  display: flex; align-items: center; gap: 18px;
}
.survey-who {
  display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); flex: none;
}
.survey-who .avatar {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(140deg, var(--accent), #4fc3f7);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px;
}

.progress-wrap { flex: 1; min-width: 0; }
.progress-line { height: 5px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress-line > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 99px; transition: width 0.4s var(--ease);
}
.progress-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted-2); margin-top: 6px; }

.step-dots { display: flex; gap: 5px; align-items: center; overflow-x: auto; padding: 2px 0; }
.step-dots::-webkit-scrollbar { display: none; }
.step-dot {
  flex: none; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--border-soft); background: transparent; color: var(--muted-2);
  cursor: pointer; transition: all 0.15s var(--ease); white-space: nowrap;
}
.step-dot:hover { color: var(--text); border-color: var(--border); }
.step-dot.current { background: var(--accent-soft); border-color: var(--accent); color: #cfc7ff; }
.step-dot.done { color: var(--ok); border-color: rgba(62, 207, 142, 0.3); }

/* ================================================== Sondage : contenus = */

.survey-main { padding: 40px 0 120px; }

/* L'en-tête est collant : on réserve sa hauteur pour que rien ne se retrouve
   caché dessous lors d'un défilement automatique (erreur, ancre, focus clavier). */
.step, .question, .skip-bar, .qgroup, [data-error] { scroll-margin-top: 96px; }

.step { display: none; animation: stepIn 0.3s var(--ease); }
.step.active { display: block; }
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.step-head { margin-bottom: 30px; }
.step-kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.step-kicker .ico {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid rgba(139, 125, 251, 0.28);
}
.step-kicker svg { width: 16px; height: 16px; }
.step-head h2 { font-size: clamp(24px, 3.6vw, 32px); margin-bottom: 10px; }
.step-head p { color: var(--muted); margin: 0; max-width: 70ch; }
.step-tag {
  display: inline-block; margin-top: 12px; font-size: 12px; color: var(--muted-2);
  border: 1px solid var(--border-soft); border-radius: 7px; padding: 3px 9px;
  font-family: ui-monospace, monospace;
}

.skip-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 26px;
  border: 1px dashed var(--border); border-radius: 13px; background: var(--surface);
}
.skip-bar .grow { font-size: 13.5px; color: var(--muted); }

.section-skipped .qgroup { opacity: 0.32; pointer-events: none; filter: grayscale(0.6); }

.qgroup { margin-bottom: 34px; }
.qgroup-title {
  display: flex; align-items: center; gap: 11px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
}
.qgroup-title::after { content: ''; flex: 1; height: 1px; background: var(--border-soft); }
.qgroup-title .badge {
  padding: 3px 9px; border-radius: 7px; font-size: 10.5px; letter-spacing: 0.06em;
  background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--muted-2);
}

.question {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 12px;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.question:hover { border-color: #2f3441; }
.question.answered { border-color: rgba(62, 207, 142, 0.28); }
.question.invalid { border-color: rgba(248, 113, 113, 0.5); background: rgba(248, 113, 113, 0.04); }

.q-label {
  display: flex; align-items: flex-start; gap: 11px;
  font-size: 15px; font-weight: 600; color: var(--text-strong); margin-bottom: 16px;
}
.q-num {
  flex: none; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  display: grid; place-items: center; font-size: 11.5px; color: var(--muted-2); font-weight: 700;
  font-family: ui-monospace, monospace;
}

/* Échelle 0 → 10 */
.scale { display: flex; flex-direction: column; gap: 9px; }
.scale-track { display: flex; gap: 6px; }
.scale-btn {
  flex: 1 1 0; min-width: 0; height: 42px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface);
  color: var(--muted); font-weight: 700; font-size: 14px;
  cursor: pointer; transition: all 0.13s var(--ease);
  display: grid; place-items: center;
}
.scale-btn:hover { transform: translateY(-2px); border-color: #3d4453; color: var(--text); }
.scale-btn.filled { background: var(--accent-soft); border-color: rgba(139, 125, 251, 0.4); color: #c6bdff; }
.scale-btn.selected {
  background: linear-gradient(135deg, var(--accent), #6f5ef5);
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 20px -10px rgba(139, 125, 251, 0.9);
  transform: translateY(-2px);
}
.scale-legend { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted-2); }
.scale-value { font-weight: 700; color: var(--accent); }

/* Boîte "note globale" avec code couleur */
.scale.grade-bad .scale-btn.selected  { background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 8px 20px -10px rgba(248,113,113,0.8); }
.scale.grade-mid .scale-btn.selected  { background: linear-gradient(135deg, #eab308, #ca8a04); box-shadow: 0 8px 20px -10px rgba(234,179,8,0.7); }
.scale.grade-good .scale-btn.selected { background: linear-gradient(135deg, #3ecf8e, #16a34a); box-shadow: 0 8px 20px -10px rgba(62,207,142,0.7); }

.step-nav {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
}

.inline-error {
  display: none; align-items: center; gap: 9px;
  color: #fca5a5; font-size: 13.5px; font-weight: 500;
  background: rgba(248, 113, 113, 0.09); border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 11px; padding: 11px 15px; margin-top: 16px;
}
.inline-error.show { display: flex; }
.inline-error svg { width: 17px; height: 17px; flex: none; }

/* ==================================== Étape designs : galerie + podium = */

.demo-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  margin-bottom: 34px;
}

.demo-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--card); overflow: hidden;
  cursor: pointer; transition: all 0.2s var(--ease);
  display: flex; flex-direction: column;
  text-align: left; padding: 0; color: inherit;
}
.demo-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 26px 50px -28px rgba(0,0,0,0.9); }
.demo-card.chosen { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Le design actuel : repéré d'un coup d'œil pour servir de point de comparaison. */
.demo-card.is-current { border-color: rgba(249, 115, 22, 0.45); }
.demo-card.is-current:hover { border-color: #f97316; }
.demo-card.is-current.chosen { border-color: #f97316; box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18); }
.current-ribbon {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 16px;
  background: rgba(249, 115, 22, 0.13);
  border-bottom: 1px solid rgba(249, 115, 22, 0.3);
  color: #fdba74; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.current-ribbon svg { width: 14px; height: 14px; }

.demo-preview { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.demo-preview .mini { position: absolute; inset: 0; display: flex; }
.demo-preview .open-hint {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(6, 7, 10, 0.62); opacity: 0; transition: opacity 0.2s var(--ease);
  backdrop-filter: blur(2px);
}
.demo-card:hover .open-hint { opacity: 1; }
.open-hint span {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25);
  color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  backdrop-filter: blur(6px);
}
.open-hint svg { width: 16px; height: 16px; }

.mode-chip {
  position: absolute; top: 11px; right: 11px; z-index: 2;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 7px;
  background: rgba(0,0,0,0.55); color: #fff; border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
}
.mode-chip.light { background: rgba(255,255,255,0.85); color: #1b1b1f; border-color: rgba(0,0,0,0.12); }

.demo-body { padding: 17px 19px 19px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.demo-body h3 { font-size: 17px; display: flex; align-items: center; gap: 9px; }
.demo-body .swatch-row { display: flex; gap: 5px; }
.demo-body .sw { width: 15px; height: 15px; border-radius: 5px; border: 1px solid rgba(255,255,255,0.12); }
.demo-body p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }
.demo-traits { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.demo-traits span {
  font-size: 11px; color: var(--muted-2); border: 1px solid var(--border-soft);
  background: var(--surface); padding: 3px 8px; border-radius: 6px;
}
.demo-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }

/* Combinaison couleurs / polices retenue sur ce design */
.demo-variant {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px; padding: 8px 11px;
  border: 1px solid rgba(139, 125, 251, 0.3);
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 12px; color: #c6bdff; font-weight: 600;
}
.demo-variant[hidden] { display: none; }
.demo-variant svg { width: 14px; height: 14px; flex: none; }

/* Encart d'explication (astuce, précision) */
.hint-box {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 15px 18px;
  border: 1px solid rgba(139, 125, 251, 0.28);
  background: var(--accent-soft);
  border-radius: var(--radius);
  font-size: 13.5px; line-height: 1.6;
}
.hint-box > svg { width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 1px; }
.hint-box strong { color: var(--text-strong); }

/* Podium / classement */
.podium { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.podium-slot {
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 16px;
  display: flex; flex-direction: column; gap: 11px;
}
.podium-slot.filled { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.podium-rank { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.podium-medal {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #0a0b0f;
}
.podium-slot:nth-child(1) .podium-medal { background: linear-gradient(140deg, #fde68a, #f59e0b); }
.podium-slot:nth-child(2) .podium-medal { background: linear-gradient(140deg, #e5e7eb, #9ca3af); }
.podium-slot:nth-child(3) .podium-medal { background: linear-gradient(140deg, #fdba74, #c2703a); }

.pill-check {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-size: 13.5px; font-weight: 600;
  transition: all 0.15s var(--ease);
}
.pill-check:hover { border-color: #3a4150; }
.pill-check .dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }

/* ======================================================= Page de merci = */

.thanks { min-height: 100vh; display: grid; place-items: center; padding: 60px 24px; position: relative; z-index: 1; }
.thanks-inner { max-width: 620px; text-align: center; }
.thanks-check {
  width: 82px; height: 82px; margin: 0 auto 28px; border-radius: 26px;
  background: linear-gradient(140deg, rgba(62,207,142,0.2), rgba(62,207,142,0.06));
  border: 1px solid rgba(62,207,142,0.35);
  display: grid; place-items: center; color: var(--ok);
  animation: pop 0.5s var(--ease);
}
.thanks-check svg { width: 40px; height: 40px; }
@keyframes pop { 0% { transform: scale(0.5); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

/* ================================================================ Admin */

.admin-shell { min-height: 100vh; position: relative; z-index: 1; }
.admin-top {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(10, 11, 15, 0.9);
  backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 50;
}
.admin-top-inner {
  max-width: 1400px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.admin-logo { display: flex; align-items: center; gap: 11px; font-family: var(--font-head); font-weight: 700; }
.admin-logo .sq {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), #4fc3f7); color: #fff;
}
.admin-logo .sq svg { width: 17px; height: 17px; }
.admin-nav { display: flex; gap: 5px; }
.admin-nav a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); text-decoration: none; transition: all 0.15s var(--ease);
  border: 1px solid transparent; white-space: nowrap;
}
.admin-nav a svg { width: 16px; height: 16px; flex: none; }
.admin-nav a:hover { color: var(--text); background: var(--surface); }
.admin-nav a.active { color: var(--text-strong); background: var(--accent-soft); border-color: rgba(139,125,251,0.3); }

.admin-main { max-width: 1400px; margin: 0 auto; padding: 32px 24px 80px; }

.page-title { margin-bottom: 26px; }
.page-title h1 { font-size: 27px; margin-bottom: 6px; }
.page-title p { color: var(--muted); margin: 0; }

.kpi-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 28px; }
.kpi {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px;
}
.kpi .k-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.kpi .k-value { font-family: var(--font-head); font-size: 30px; font-weight: 700; margin-top: 7px; line-height: 1; }
.kpi .k-sub { font-size: 12px; color: var(--muted-2); margin-top: 7px; }

.score-great { color: #3ecf8e; } .score-good { color: #a3e635; }
.score-mid   { color: #eab308; } .score-bad  { color: #f87171; }
.score-none  { color: var(--muted-2); }

.bar-row { display: flex; align-items: center; gap: 14px; padding: 9px 0; }
.bar-row .bl { flex: 0 0 clamp(160px, 32%, 380px); font-size: 13.5px; color: var(--text); }
.bar-row .bt { flex: 1; height: 9px; border-radius: 99px; background: var(--surface-2); overflow: hidden; min-width: 60px; }
.bar-row .bt > i { display: block; height: 100%; border-radius: 99px; transition: width 0.5s var(--ease); }
.bar-row .bv { flex: none; width: 62px; text-align: right; font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.bar-row .bc { flex: none; width: 46px; text-align: right; font-size: 11.5px; color: var(--muted-2); }
.bfill-great { background: linear-gradient(90deg, #3ecf8e, #16a34a); }
.bfill-good  { background: linear-gradient(90deg, #a3e635, #65a30d); }
.bfill-mid   { background: linear-gradient(90deg, #eab308, #ca8a04); }
.bfill-bad   { background: linear-gradient(90deg, #f87171, #dc2626); }
.bfill-none  { background: #2c313d; }
.bfill-accent{ background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left; padding: 12px 16px; font-size: 11.5px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted); background: var(--surface);
  border-bottom: 1px solid var(--border); font-weight: 700; white-space: nowrap;
}
table.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--surface); }
table.tbl td.num { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--muted);
}
.tag.ok { background: rgba(62,207,142,0.12); border-color: rgba(62,207,142,0.3); color: #6ee7b7; }
.tag.warn { background: rgba(234,179,8,0.12); border-color: rgba(234,179,8,0.3); color: #fde047; }
.tag.accent { background: var(--accent-soft); border-color: rgba(139,125,251,0.3); color: #c6bdff; }

.section-block { margin-bottom: 34px; }
.section-block > h2 {
  font-size: 19px; margin-bottom: 4px;
  display: flex; align-items: center; gap: 11px;
}
.section-block > h2 .ico {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid rgba(139,125,251,0.25); color: var(--accent);
}
.section-block > h2 .ico svg { width: 17px; height: 17px; }
.section-block > .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 16px 43px; }

.comment {
  border-left: 2px solid var(--border); padding: 4px 0 4px 15px; margin-bottom: 14px;
}
.comment .c-meta { font-size: 11.5px; color: var(--muted-2); margin-bottom: 4px; display: flex; gap: 9px; align-items: center; }
.comment .c-text { font-size: 14px; white-space: pre-wrap; line-height: 1.6; }
.comment-group { margin-bottom: 22px; }
.comment-group > h4 { font-size: 13.5px; color: var(--accent); margin-bottom: 11px; font-family: var(--font); }

.dist { display: flex; gap: 3px; align-items: flex-end; height: 40px; }
.dist i { flex: 1; background: var(--surface-2); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.dist i.has { background: linear-gradient(180deg, var(--accent), rgba(139,125,251,0.35)); }

.empty {
  text-align: center; padding: 60px 24px; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface);
}
.empty svg { width: 42px; height: 42px; color: var(--muted-2); margin-bottom: 16px; }

.answer-block { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); margin-bottom: 16px; overflow: hidden; }
.answer-block > header {
  padding: 14px 18px; border-bottom: 1px solid var(--border-soft); background: var(--surface);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.answer-block > header h3 { font-size: 15.5px; }
.answer-block > .body { padding: 16px 18px; }
.answer-row { display: flex; gap: 14px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.answer-row:last-child { border-bottom: 0; }
.answer-row .a-q { flex: 1; font-size: 13.5px; color: var(--muted); }
.answer-row .a-v { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.answer-open { padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.answer-open:last-child { border-bottom: 0; }
.answer-open .a-q { font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.answer-open .a-v { font-size: 14px; white-space: pre-wrap; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filters .input, .filters .select { width: auto; min-width: 200px; }

/* ================================================== Aperçus miniatures = */
/* Rendus CSS des 6 thèmes affichés dans la galerie (aucune image). */

.mini {
  font-size: 6px;
  background: var(--mini-bg);
  transition: background 0.25s var(--ease);
}
/* Décors : reprennent la palette courante, donc changent avec elle. */
.mini-decor-aurora {
  background:
    radial-gradient(60% 60% at 20% 0%, color-mix(in srgb, var(--mini-accent) 22%, transparent), transparent 70%),
    radial-gradient(50% 50% at 100% 100%, color-mix(in srgb, var(--mini-accent-2) 16%, transparent), transparent 70%),
    var(--mini-bg);
}
.mini-decor-blobs {
  background:
    radial-gradient(50% 70% at 85% 10%, color-mix(in srgb, var(--mini-accent) 20%, transparent), transparent 70%),
    radial-gradient(60% 60% at 0% 100%, color-mix(in srgb, var(--mini-accent-2) 14%, transparent), transparent 70%),
    var(--mini-bg);
}
.mini-decor-grid {
  background-color: var(--mini-bg);
  background-image: linear-gradient(var(--mini-border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--mini-border) 1px, transparent 1px);
  background-size: 14px 14px;
}
.mini-decor-dots {
  background-color: var(--mini-bg);
  background-image: radial-gradient(var(--mini-border) 1px, transparent 1px);
  background-size: 9px 9px;
}
.mini-decor-sun {
  background: radial-gradient(70% 60% at 90% -10%, color-mix(in srgb, var(--mini-accent) 18%, transparent), transparent 70%),
              var(--mini-bg);
}
.mini-decor-paper { background: linear-gradient(160deg, var(--mini-card), var(--mini-bg)); }

.mini-side {
  width: 26%; padding: 8px 6px; display: flex; flex-direction: column; gap: 5px;
  background: var(--mini-card); border-right: 1px solid var(--mini-border);
}
.mini-side.mini-rail { width: 13%; align-items: center; }
.mini-side .logo { height: 9px; border-radius: var(--mini-radius); margin-bottom: 4px; }
.mini-side .item { height: 6px; border-radius: 3px; background: var(--mini-muted); opacity: 0.5; }
.mini-side .item.on { opacity: 1; background: var(--mini-accent); }
.mini-body { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.mini-topbar {
  height: 11px; border-radius: var(--mini-radius); display: flex; align-items: center; gap: 4px; padding: 0 5px;
  background: var(--mini-card); border: 1px solid var(--mini-border);
}
.mini-topbar .tb { width: 14px; height: 4px; border-radius: 2px; background: var(--mini-muted); opacity: 0.45; }
.mini-topbar .tb.on { opacity: 1; width: 18px; background: var(--mini-accent); }
.mini-h { height: 8px; width: 45%; border-radius: 3px; background: var(--mini-text); opacity: 0.85; }
.mini-cards { display: flex; gap: 5px; }
.mini-cards .c {
  flex: 1; height: 26px; border-radius: var(--mini-radius); padding: 4px;
  display: flex; flex-direction: column; gap: 3px;
  background: var(--mini-card); border: 1px solid var(--mini-border);
}
.mini-cards .c .l1 { height: 3px; width: 60%; border-radius: 2px; background: var(--mini-muted); opacity: 0.4; }
.mini-cards .c .l2 { height: 6px; width: 40%; border-radius: 2px; }
.mini-wide {
  flex: 1; border-radius: var(--mini-radius); padding: 6px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--mini-card); border: 1px solid var(--mini-border);
}
.mini-wide .r { height: 5px; border-radius: 2px; background: var(--mini-text); opacity: 0.28; }
.mini-wide .r:first-child { opacity: 0.55; width: 70%; }
.mini-foot { margin-top: auto; display: flex; gap: 4px; align-items: center; }
.mini-btn { height: 8px; width: 34px; border-radius: var(--mini-radius); background: var(--mini-accent); }
.mini-btn.ghost { width: 24px; background: transparent; border: 1px solid var(--mini-border); }

/* ================================================= Page Configuration = */

/* Interrupteur — aucune case du navigateur, comme partout ailleurs. */
.switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 46px; height: 26px; border-radius: 99px; display: block;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.switch .thumb {
  position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--muted); transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.switch input:checked ~ .track { background: var(--accent-soft); border-color: var(--accent); }
.switch input:checked ~ .track .thumb { transform: translateX(20px); background: var(--accent); }
.switch input:focus-visible ~ .track { box-shadow: 0 0 0 3px var(--accent-soft); }

.switch-row { display: flex; align-items: center; gap: 16px; padding: 4px 0; }
.switch-title { font-weight: 600; font-size: 15px; color: var(--text-strong); }

.divider { height: 1px; background: var(--border-soft); margin: 22px 0; }

/* Le bloc « message de fermeture » reste lisible quand la réception est
   ouverte : on prépare souvent le message AVANT de fermer. Il est seulement
   mis en retrait — jamais masqué, ce qui le rendrait introuvable. */
.closed-block.is-idle { opacity: 0.62; }
.closed-block.is-idle:focus-within { opacity: 1; }
#closed-fields.is-off .field,
#closed-fields.is-off .preview-box { opacity: 0.4; pointer-events: none; }

.preview-box {
  border: 1px dashed var(--border); border-radius: var(--radius); padding: 16px;
  background: var(--bg-2);
}
.preview-label {
  display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px;
}
.preview-label svg { width: 14px; height: 14px; }
.preview-card { text-align: center; padding: 22px 16px; }
.preview-lock {
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(234, 179, 8, 0.12); border: 1px solid rgba(234, 179, 8, 0.3); color: var(--warn);
}
.preview-lock svg { width: 22px; height: 22px; }
.preview-card h3 { font-size: 20px; margin-bottom: 9px; }
.preview-card p { margin: 0; color: var(--muted); font-size: 14px; max-width: 46ch; margin-inline: auto; }

/* Pastille d'initiale d'un compte, dans le tableau des administrateurs. */
.avatar-sq {
  width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; font-size: 14px;
}

/* Identité du compte connecté, dans la barre d'administration. */
.admin-me {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px;
  border-radius: 9px; border: 1px solid var(--border-soft); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--muted); max-width: 200px;
}
.admin-me svg { width: 15px; height: 15px; flex: none; }
.admin-me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bandeau d'accueil quand la réception est fermée. */
.eyebrow.closed { color: var(--warn); border-color: rgba(234, 179, 8, 0.3); background: rgba(234, 179, 8, 0.08); }
.eyebrow.closed .dot { background: var(--warn); box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2); }

/* ====================================================== Pages d'erreur = */

.err-page { min-height: 100vh; display: grid; place-items: center; padding: 60px 24px; position: relative; z-index: 1; }
.err-inner { max-width: 560px; text-align: center; }
.err-code {
  font-family: var(--font-head); font-size: clamp(72px, 18vw, 132px); font-weight: 800;
  line-height: 1; letter-spacing: -0.05em; margin-bottom: 10px;
  background: linear-gradient(140deg, var(--text-strong), var(--muted-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.err-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); margin-bottom: 22px;
}
.err-badge svg { width: 14px; height: 14px; }
.err-badge.warn { color: var(--warn); border-color: rgba(234, 179, 8, 0.3); background: rgba(234, 179, 8, 0.08); }
.err-badge.danger { color: var(--danger); border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.08); }
.err-inner h1 { font-size: clamp(22px, 4vw, 30px); margin-bottom: 14px; }
.err-inner p { color: var(--muted); margin: 0 auto 28px; max-width: 44ch; }
.err-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.err-ref {
  margin-top: 32px; font-size: 11.5px; color: var(--muted-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all;
}

/* ========================================================= Responsive = */

@media (max-width: 860px) {
  .survey-top-inner { flex-wrap: wrap; gap: 12px; }
  .progress-wrap { order: 3; width: 100%; }
  .step-dots { display: none; }
  .bar-row { flex-wrap: wrap; }
  .bar-row .bl { flex: 1 1 100%; }
  .modal-xl { max-width: 100vw; height: 100vh; border-radius: 0; }
  .modal-backdrop { padding: 0; }
}

@media (max-width: 620px) {
  .container { padding: 0 16px; }
  .scale-track { flex-wrap: wrap; }
  .scale-btn { flex: 1 1 calc(100% / 6 - 6px); height: 40px; }
  .card, .question { padding: 16px; }
  .name-card { padding: 22px; }
  .step-nav { flex-direction: column-reverse; align-items: stretch; }
  .step-nav .btn { width: 100%; }
  .admin-main { padding: 22px 16px 60px; }
  .table-wrap { overflow-x: auto; }
  table.tbl { min-width: 640px; }
  .admin-fab { right: 14px; bottom: 14px; }
}

@media print {
  body::before, .admin-top, .btn, .admin-fab { display: none !important; }
  body { background: #fff; color: #000; }
}
