/* ═══════════════════════════════════════════════
   HEXALTO — LEAD CSS
   Fichier CSS unique partagé entre toutes les pages /lead/
   Version 1.0 — Mai 2026
═══════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   VARIABLES
───────────────────────────────────────────── */
:root {
  --hx-blue:           #305694;
  --hx-blue-dark:      #1e3a6e;
  --hx-blue-light:     #e8eef7;
  --hx-gold:           #E6B422;
  --hx-gold-light:     #fdf8e8;
  --hx-sand:           #F5F0E8;
  --hx-white:          #ffffff;
  --hx-text-title:     #1A1A2E;
  --hx-text-body:      #1A1A2E;
  --hx-text-secondary: #666666;
  --hx-border:         rgba(0,0,0,0.10);
  --hx-danger:         #c0392b;

  --font-title: 'Inter', sans-serif;
  --font-body:  'Roboto', sans-serif;
  --font-ui:    'Inter', sans-serif;

  --radius:     12px;
  --radius-sm:  8px;
  --radius-btn: 10px;
  --radius-pill:99px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--hx-sand);
  color: var(--hx-text-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────────
   TYPOGRAPHIE
───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  color: var(--hx-text-title);
  line-height: 1.25;
}

h1 { font-size: clamp(22px, 4vw, 30px); font-weight: 700; }
h2 { font-size: clamp(18px, 3vw, 24px); font-weight: 600; }
h3 { font-size: clamp(15px, 2vw, 19px); font-weight: 600; }

p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  color: var(--hx-text-body);
}

/* ─────────────────────────────────────────────
   LAYOUT
───────────────────────────────────────────── */
.page-wrap {
  max-width: 660px;
  margin: 0 auto;
  width: 100%;
  background: var(--hx-white);
  flex: 1;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(48,86,148,0.10);
}

.page-content {
  padding: 36px 32px 48px;
  flex: 1;
  background: #fffdf8;
}

/* ─────────────────────────────────────────────
   HEADER
───────────────────────────────────────────── */
.site-header {
  background: var(--hx-blue);
  border-bottom: 3px solid var(--hx-gold);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-logo {
  height: 36px;
  width: auto;
  display: block;
}

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
.site-footer {
  background: var(--hx-text-body);
  padding: 14px 32px;
  text-align: center;
}

.site-footer p {
  font-family: var(--font-ui);
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
}

/* ─────────────────────────────────────────────
   BOUTONS
───────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 500;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition: background 0.2s, transform 0.1s;
  text-align: center;
  text-decoration: none;
  line-height: 1;
}

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

.btn-primary {
  background: var(--hx-gold);
  color: var(--hx-text-title);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
}
.btn-primary:hover { background: #c9a016; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-gold {
  background: var(--hx-gold);
  color: var(--hx-text-title);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
}
.btn-gold:hover { background: #c9a016; }

.btn-link {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--hx-blue);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

/* ─────────────────────────────────────────────
   LABELS
───────────────────────────────────────────── */
.section-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--hx-gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: block;
  text-align: center;
  margin-bottom: 10px;
}

/* ─────────────────────────────────────────────
   PROGRESS BAR
───────────────────────────────────────────── */
.progress-bar {
  background: #ece8e0;
  border-radius: var(--radius-pill);
  height: 4px;
  margin-bottom: 2rem;
}

.progress-fill {
  background: var(--hx-gold);
  height: 4px;
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

/* ─────────────────────────────────────────────
   QUIZ — QUESTIONS
───────────────────────────────────────────── */
.step { display: none; }
.step.active { display: block; }

.question-label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--hx-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  display: block;
}

.question-text {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 600;
  color: var(--hx-text-title);
  line-height: 1.45;
  margin-bottom: 1.5rem;
}

/* ─────────────────────────────────────────────
   QUIZ — OPTIONS
───────────────────────────────────────────── */
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 0.5px solid var(--hx-border);
  border-radius: var(--radius);
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  transition: border-color 0.2s, background 0.2s;
  background: var(--hx-white);
}

.option:hover { border-color: var(--hx-gold); background: var(--hx-gold-light); }
.option.selected { border-color: var(--hx-gold); background: var(--hx-gold-light); }

.option-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.25);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}

.option.selected .option-radio { border-color: var(--hx-gold); background: var(--hx-gold); }
.option.selected .option-radio::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: white;
  display: block;
}

.option-text { font-size: 15px; color: var(--hx-text-body); line-height: 1.4; }

/* ─────────────────────────────────────────────
   QUIZ — QUESTIONS OUVERTES
───────────────────────────────────────────── */
.open-question textarea {
  width: 100%;
  min-height: 110px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--hx-text-body);
  background: var(--hx-white);
  border: 0.5px solid var(--hx-border);
  border-radius: var(--radius);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.5;
}
.open-question textarea:focus { border-color: var(--hx-gold); }

/* ─────────────────────────────────────────────
   QUIZ — NAVIGATION
───────────────────────────────────────────── */
.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
  gap: 12px;
}

#btn-next { margin-left: auto; }

.btn-back {
  padding: 11px 22px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: 0.5px solid var(--hx-border);
  background: var(--hx-white);
  color: var(--hx-text-body);
  font-family: var(--font-ui);
  transition: background 0.2s;
}
.btn-back:hover { background: var(--hx-sand); }

/* ─────────────────────────────────────────────
   QUIZ — CAPTURE EMAIL
───────────────────────────────────────────── */
.step-capture { text-align: center; }

.capture-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 600;
  color: var(--hx-text-title);
  margin-bottom: 6px;
}

.capture-sub {
  font-size: 14px;
  color: var(--hx-text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

.capture-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }

.field-label {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--hx-text-secondary);
  margin-bottom: 4px;
  display: block;
}

.capture-form input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font-body);
  border: 0.5px solid var(--hx-border);
  border-radius: var(--radius);
  background: var(--hx-white);
  color: var(--hx-text-body);
  outline: none;
  transition: border-color 0.2s;
}
.capture-form input:focus { border-color: var(--hx-gold); }

.spam-note {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--hx-text-secondary);
  text-align: center;
  margin-top: 6px;
}

.error-msg { color: var(--hx-danger); font-size: 13px; }

/* ─────────────────────────────────────────────
   QUIZ — LOADING
───────────────────────────────────────────── */
.step-loading { text-align: center; padding: 3rem 0; }

.loader { display: inline-flex; gap: 6px; margin-bottom: 1rem; }
.loader span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--hx-blue);
  animation: pulse 1.2s infinite;
}
.loader span:nth-child(2) { animation-delay: 0.2s; }
.loader span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1;   }
}

.loading-text { font-size: 15px; color: var(--hx-text-secondary); }

/* ─────────────────────────────────────────────
   QUIZ — RÉSULTAT (page résultat confirmation)
───────────────────────────────────────────── */
.result-profile {
  display: inline-block;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  background: var(--hx-blue-light);
  color: var(--hx-blue);
  margin-bottom: 10px;
}

.result-name {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 600;
  color: var(--hx-text-title);
  margin-bottom: 6px;
}

.result-content {
  background: var(--hx-sand);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 1rem 0;
  font-size: 15px;
  color: var(--hx-text-body);
  line-height: 1.75;
}

.result-reassurance {
  font-size: 13px;
  color: var(--hx-text-secondary);
  text-align: center;
  margin-top: 10px;
}

/* ─────────────────────────────────────────────
   PAGE RÉSULTAT (resultat.php)
───────────────────────────────────────────── */
.profil-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  background: rgba(230,180,34,0.15);
  color: #b8920a;
  border: 1px solid rgba(230,180,34,0.4);
  margin-bottom: 16px;
}

.greeting {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  color: var(--hx-text-title);
  margin-bottom: 6px;
}

.greeting-sub {
  font-size: 14px;
  color: var(--hx-text-secondary);
  margin-bottom: 28px;
}

.diagnostic-block {
  background: var(--hx-sand);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 28px;
  border-left: 4px solid var(--hx-gold);
}

.diagnostic-text {
  font-size: 15px;
  color: var(--hx-text-body);
  line-height: 1.8;
}

.diagnostic-text b,
.diagnostic-text strong {
  font-weight: 500;
  color: var(--hx-blue);
}

.diagnostic-text h3 {
  font-weight: 700;
  font-size: 16px;
  color: var(--hx-text-title);
  margin-bottom: 8px;
  margin-top: 26px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cta-block {
  background: var(--hx-blue);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}

.cta-block h2 { color: white; margin-bottom: 10px; }

.cta-block p {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.65;
}

.cta-reassurance {
  font-family: var(--font-ui);
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin-top: 12px;
  display: block;
}

/* ─────────────────────────────────────────────
   PAGE ERREUR
───────────────────────────────────────────── */
.error-block { text-align: center; padding: 48px 0; }
.error-icon  { font-size: 40px; margin-bottom: 16px; display: block; }
.error-block h2 { margin-bottom: 10px; }
.error-block p  { color: var(--hx-text-secondary); }

/* ─────────────────────────────────────────────
   QUIZ HEADER TITRE
───────────────────────────────────────────── */
.quiz-title-block { text-align: center; margin-bottom: 1.5rem; }

.quiz-title-block h1 { margin-bottom: 6px; }

.quiz-meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.quiz-meta-item {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--hx-text-secondary);
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 660px) {
  .page-content { padding: 24px 16px 36px; }
  .site-header  { padding: 14px 16px; }
  .site-footer  { padding: 14px 16px; }
  .diagnostic-block { padding: 18px; }
  .cta-block    { padding: 22px 16px; }
}
