/* ==========================================================================
   DA CercleMDB — CSS self-hosted, zéro dépendance CDN, compatible CSP stricte
   ========================================================================== */

:root {
  --bg:            #080b18;
  --bg-surface:    #0d1127;
  --bg-card:       #111631;
  --bg-card-2:     #151a3a;
  --gold:          #956A1B;
  --gold-mid:      #b8893a;
  --gold-bright:   #d4a74e;
  --gold-light:    #F8F1A1;
  --white:         #f1f1f3;
  --text-2:        #b0b3c6;
  --text-3:        #8b90ad;
  --border:        rgba(255, 255, 255, 0.06);
  --border-gold:   rgba(180, 130, 50, 0.22);
  --danger-bg:     rgba(239, 68, 68, 0.08);
  --danger-border: rgba(239, 68, 68, 0.30);
  --danger-text:   #fca5a5;
  --radius:        12px;
  --radius-lg:     16px;
  --radius-xl:     20px;
  --shadow-lg:     0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-xl:     0 20px 60px rgba(0, 0, 0, 0.45);
  --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                   Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Reset + base
   -------------------------------------------------------------------------- */

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

body { position: relative; overflow-x: hidden; }

h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 300; color: var(--white); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--gold-bright); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold-light); }

img { max-width: 100%; display: block; }

::selection { background: var(--gold); color: var(--white); }
::-moz-selection { background: var(--gold); color: var(--white); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-card-2); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-mid); }

:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--white);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-card-2) inset;
  caret-color: var(--white);
}

/* --------------------------------------------------------------------------
   Background décoratif — blobs dorés blurés
   -------------------------------------------------------------------------- */

.bg-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bg-blobs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .9;
}
.bg-blobs .blob-1 {
  top: -180px; left: -180px;
  width: 520px; height: 520px;
  background: rgba(149, 106, 27, 0.18);
}
.bg-blobs .blob-2 {
  top: -160px; right: -180px;
  width: 520px; height: 520px;
  background: rgba(212, 167, 78, 0.14);
}
.bg-blobs .blob-3 {
  bottom: -200px; left: 50%;
  width: 700px; height: 400px;
  background: rgba(149, 106, 27, 0.10);
  transform: translateX(-50%);
}

/* --------------------------------------------------------------------------
   Layout général
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 2;
  padding: 40px 16px 24px;
  text-align: center;
}
.site-header .logo-link { display: inline-block; }
.site-header .logo { height: 44px; width: auto; margin: 0 auto; }

.site-main {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 20px 64px;
}

.site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 28px 16px 40px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
  font-weight: 300;
}
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--gold-bright); }
.site-footer .sep { margin: 0 10px; opacity: .5; }

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, transform .08s ease, box-shadow .2s ease;
  box-shadow: var(--shadow-lg);
}
.btn-primary {
  background: var(--gold);
  color: #0a0d1a;
}
.btn-primary:hover { background: var(--gold-bright); color: #0a0d1a; }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
  background: transparent;
  color: var(--gold-bright);
  border: 1px solid var(--border-gold);
  box-shadow: none;
}
.btn-secondary:hover {
  background: rgba(180, 130, 50, 0.08);
  color: var(--gold-light);
  border-color: var(--gold-mid);
}
.btn-secondary:active { transform: translateY(1px); }

.btn-block { display: block; width: 100%; text-align: center; }

/* --------------------------------------------------------------------------
   Hero (landing)
   -------------------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: 56px 8px 40px;
}
.hero-title {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 200;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--white);
}
.hero-lead {
  color: var(--text-2);
  font-size: 17px;
  font-weight: 300;
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Progress (pilier)
   -------------------------------------------------------------------------- */

.progress {
  position: relative;
  height: 5px;
  background: var(--bg-card);
  border-radius: 999px;
  margin: 24px 0 36px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-bright) 100%);
  border-radius: 999px;
  transition: width .4s ease;
}
.progress-label {
  position: absolute;
  right: 0;
  top: -22px;
  font-size: 12px;
  color: var(--text-2);
  font-weight: 300;
  letter-spacing: .02em;
}

.pilier-title {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 28px;
  text-align: left;
}

/* --------------------------------------------------------------------------
   Errors (inline form errors)
   -------------------------------------------------------------------------- */

.errors {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 300;
}
.errors p { margin: 2px 0; }

/* --------------------------------------------------------------------------
   Questions (fieldsets + Likert cards)
   -------------------------------------------------------------------------- */

.pilier-form { display: flex; flex-direction: column; gap: 28px; }

.question {
  border: 0;
  padding: 0;
  margin: 0;
}
.question-legend {
  display: block;
  font-size: 15px;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 12px;
  padding: 0;
}

/* Likert slider — ligne fine gold + pill horizontal, drag natif iOS
   (CSP-safe : zéro JS, s'appuie sur <input type="range">) */

.likert-slider {
  --lk-track-h: 2px;
  --lk-thumb-w: 44px;
  --lk-thumb-h: 18px;
  padding: 4px 0 2px;
}

.likert-track-wrap {
  position: relative;
  height: 36px;              /* zone de hit confortable pour doigt */
  display: flex;
  align-items: center;
}

/* Ligne fine dorée — centrée verticalement dans la piste */
.likert-line {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: var(--lk-track-h);
  margin-top: calc(var(--lk-track-h) / -2);
  background: var(--gold-bright);
  border-radius: calc(var(--lk-track-h) / 2);
  pointer-events: none;
}

/* Repères : 5 petits points alignés sous la ligne, centrés sur les positions
   du thumb (insets = demi-thumb car le navigateur contraint le thumb dans la piste) */
.likert-ticks {
  position: absolute;
  top: calc(50% + 14px);
  left: calc(var(--lk-thumb-w) / 2);
  right: calc(var(--lk-thumb-w) / 2);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.likert-ticks span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(184, 137, 58, 0.55);
}

/* Input range natif — piste transparente, on garde que le thumb */
.likert-range {
  position: relative;
  width: 100%;
  height: 36px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  margin: 0;
  padding: 0;
  z-index: 2;
  cursor: pointer;
  touch-action: manipulation;
}
.likert-range:focus { outline: none; }

/* WebKit : piste invisible */
.likert-range::-webkit-slider-runnable-track {
  height: 36px;
  background: transparent;
  border: 0;
}
/* WebKit : thumb liquid glass — pill translucide + specular highlights */
.likert-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--lk-thumb-w);
  height: var(--lk-thumb-h);
  border-radius: 999px;
  background:
    linear-gradient(150deg,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0.6) 45%,
      rgba(255, 255, 255, 0.75) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 1),      /* highlight haut (reflet) */
    inset 0 -1px 0.5px rgba(255, 255, 255, 0.25),  /* highlight bas */
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 8px 22px rgba(0, 0, 0, 0.45);
  /* centrage vertical dans la piste de 36px */
  margin-top: calc((36px - var(--lk-thumb-h)) / 2);
  cursor: grab;
  transition:
    transform .16s cubic-bezier(.22, 1, .36, 1),
    background .2s ease,
    box-shadow .2s ease,
    border-color .2s ease;
}
/* État drag : plus translucide, halo plus large, scale up, comme liquid glass qui "respire" */
.likert-range:active::-webkit-slider-thumb {
  transform: scale(1.08);
  background:
    linear-gradient(150deg,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0.25) 45%,
      rgba(255, 255, 255, 0.4) 100%);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.95),
    inset 0 -1px 0.5px rgba(255, 255, 255, 0.15),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 14px 36px rgba(0, 0, 0, 0.55),
    0 0 0 6px rgba(255, 255, 255, 0.04);
  cursor: grabbing;
}
.likert-range:focus-visible::-webkit-slider-thumb {
  box-shadow:
    0 0 0 3px rgba(212, 167, 78, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.35),
    0 4px 14px rgba(0, 0, 0, 0.4);
}

/* Firefox : piste invisible */
.likert-range::-moz-range-track {
  height: 36px;
  background: transparent;
  border: 0;
}
.likert-range::-moz-range-thumb {
  width: var(--lk-thumb-w);
  height: var(--lk-thumb-h);
  border-radius: 999px;
  background:
    linear-gradient(150deg,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0.6) 45%,
      rgba(255, 255, 255, 0.75) 100%);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 1),
    inset 0 -1px 0.5px rgba(255, 255, 255, 0.25),
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 8px 22px rgba(0, 0, 0, 0.45);
  cursor: grab;
  transition: transform .16s cubic-bezier(.22, 1, .36, 1),
              background .2s ease, box-shadow .2s ease;
}
.likert-range:active::-moz-range-thumb {
  transform: scale(1.08);
  background:
    linear-gradient(150deg,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0.25) 45%,
      rgba(255, 255, 255, 0.4) 100%);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.95),
    inset 0 -1px 0.5px rgba(255, 255, 255, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 14px 36px rgba(0, 0, 0, 0.55);
  cursor: grabbing;
}

/* Labels sous la piste — grille 5 colonnes, premier/dernier alignés aux bords */
.likert-labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-top: 4px;
}
.likert-labels span {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-3);
  text-align: center;
  line-height: 1.25;
}
.likert-labels span:first-child { text-align: left; }
.likert-labels span:last-child  { text-align: right; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.form-actions .btn-secondary { margin-right: auto; }

@media (max-width: 520px) {
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-actions .btn-secondary { margin-right: 0; }
  .form-actions .btn { text-align: center; }
}

/* --------------------------------------------------------------------------
   Gate (preview floutté + formulaire lead)
   -------------------------------------------------------------------------- */

.gate-title {
  font-size: 22px;
  font-weight: 300;
  text-align: center;
  margin-bottom: 24px;
}

.gate-locked-preview {
  position: relative;
  height: 240px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gate-locked-shape {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(149, 106, 27, 0.28) 0%, transparent 62%),
    repeating-radial-gradient(circle, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 22%);
  position: relative;
  filter: blur(12px);
  opacity: .45;
}
.gate-locked-shape::before {
  content: "";
  position: absolute;
  inset: 14%;
  background: linear-gradient(135deg, rgba(212, 167, 78, 0.38), rgba(212, 167, 78, 0.1));
  clip-path: polygon(50% 8%, 88% 30%, 80% 78%, 28% 86%, 14% 44%);
}
.gate-locked-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(13, 17, 39, 0.92);
  border: 1px solid var(--border-gold);
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}
.lock-icon {
  width: 18px;
  height: 18px;
  color: var(--gold-bright);
  flex-shrink: 0;
}

.gate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-xl);
}
.gate-badge-urgency {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gold-bright);
  background: rgba(212, 167, 78, 0.1);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 14px;
  letter-spacing: .02em;
}
.gate-badge-urgency::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 8px var(--gold-bright);
  animation: gate-pulse 1.6s ease-in-out infinite;
}
@keyframes gate-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}
.gate-card h3 {
  font-size: 20px;
  font-weight: 300;
  margin-bottom: 8px;
}
.gate-card .gate-intro {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 300;
  margin-bottom: 20px;
}
.gate-unlock-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
.gate-unlock-list li {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}
.gate-unlock-list li::before {
  content: "✓";
  color: var(--gold-bright);
  font-weight: 500;
  flex-shrink: 0;
}

.gate-form { display: flex; flex-direction: column; gap: 16px; }
.gate-form label { display: block; }
.gate-form .field-label {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.gate-form input[type="email"],
.gate-form input[type="tel"] {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 300;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gate-form input[type="email"]::placeholder,
.gate-form input[type="tel"]::placeholder { color: var(--text-3); }
.gate-form input[type="email"]:focus,
.gate-form input[type="tel"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(149, 106, 27, 0.22);
}

.rgpd {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 300;
  margin-top: 6px;
  line-height: 1.5;
}
.rgpd a { color: var(--text-2); text-decoration: underline; }
.rgpd a:hover { color: var(--gold-bright); }

.honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Results (score hero, radar frame, breakdown, video, CTA)
   -------------------------------------------------------------------------- */

.results-title {
  font-size: 22px;
  font-weight: 300;
  text-align: center;
  margin-bottom: 4px;
}

.score-hero {
  text-align: center;
  margin: 24px 0 32px;
}
.score-pct {
  font-size: clamp(64px, 14vw, 104px);
  font-weight: 200;
  color: var(--gold-bright);
  line-height: 1;
  letter-spacing: -0.03em;
  text-shadow: 0 0 40px rgba(212, 167, 78, 0.18);
}
.profil {
  font-size: 18px;
  color: var(--text-2);
  font-weight: 300;
  margin-top: 12px;
}

.radar-frame {
  background: rgba(17, 22, 49, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin: 32px 0;
  text-align: center;
}
.radar-frame svg { max-width: 100%; height: auto; display: inline-block; }

.breakdown {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 32px 0;
}
@media (min-width: 640px) {
  .breakdown { grid-template-columns: 1fr 1fr; }
}
.breakdown-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.breakdown-card h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--gold-bright);
  margin-bottom: 10px;
  letter-spacing: .01em;
}
.breakdown-card ul {
  list-style: disc;
  padding-left: 20px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 300;
}
.breakdown-card li + li { margin-top: 4px; }

.video-frame {
  margin: 32px auto;
  max-width: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.video-frame video { width: 100%; display: block; }

.cta {
  text-align: center;
  margin: 40px 0 16px;
}

/* --------------------------------------------------------------------------
   Card générique (not-found, errors)
   -------------------------------------------------------------------------- */

.card-centered {
  background: rgba(17, 22, 49, 0.6);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  max-width: 460px;
  margin: 48px auto 0;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.card-centered h1,
.card-centered h2 {
  font-size: 22px;
  font-weight: 300;
  margin-bottom: 12px;
  color: var(--white);
}
.card-centered p {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 300;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Pages légales (prose)
   -------------------------------------------------------------------------- */

.legal-prose { padding: 16px 0 32px; }
.legal-prose h1,
.legal-prose h2,
.legal-prose h3 {
  color: var(--white);
  font-weight: 400;
  margin: 28px 0 12px;
}
.legal-prose h1 { font-size: 28px; }
.legal-prose h2 { font-size: 22px; }
.legal-prose h3 { font-size: 18px; }
.legal-prose p,
.legal-prose li {
  color: var(--text-2);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 12px;
}
.legal-prose ul,
.legal-prose ol { padding-left: 22px; margin-bottom: 12px; }
.legal-prose a { color: var(--gold-bright); text-decoration: underline; }
.legal-prose em { color: var(--text-3); font-style: italic; }

/* --------------------------------------------------------------------------
   Responsive ajustements
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {
  .site-header { padding: 28px 16px 16px; }
  .site-header .logo { height: 38px; }
  .site-main { padding: 8px 16px 48px; }
  .hero { padding: 32px 4px 24px; }
  .gate-card { padding: 24px 18px; }
  .card-centered { padding: 28px 20px; }
}
