/* ============================================
   AgendaNumérique365 — Quiz Tunnel
   style.css — Styles partagés
   ============================================ */

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

/* --- Variables --- */
:root {
  --color-primary: #635FBE;        /* violet — logo, progress, accents */
  --color-primary-dark: #4e4a9e;
  --color-cta: #2FCC71;            /* vert — boutons CTA (cohérent avec le site + checkout) */
  --color-cta-dark: #27AE60;
  --color-accent: #F5A623;         /* orange — urgence, badges */
  --color-success: #2FCC71;
  --color-bg: #FAFAFA;
  --color-card: #FFFFFF;
  --color-bg-blue-light: #F0ECFF;  /* violet très pâle — fond inter1, cards sélectionnées */
  --color-text: #273C63;           /* bleu-gris foncé — titres */
  --color-text-secondary: #707B8E; /* gris — texte secondaire */
  --color-border: #E5E7EB;
  --color-bg-grey: #F5F4FA;        /* gris-violet très léger */
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
  min-height: 100vh;
}

h1, h2, h3, .display {
  font-family: 'Raleway', sans-serif;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Layout --- */
.container {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 20px 100px;
}

/* --- Logo --- */
.logo {
  text-align: center;
  padding: 20px 0 8px;
}

.logo-img {
  height: 32px;
  width: auto;
  display: inline-block;
}

/* --- Barre de progression --- */
.progress-bar-container {
  margin-bottom: 28px;
  margin-top: 8px;
}

.progress-bar-track {
  height: 6px;
  background: var(--color-border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 8px;
  text-align: center;
}

/* --- Titre de question --- */
.question-title {
  font-family: 'Raleway', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
  line-height: 1.3;
}

@media (min-width: 480px) {
  .question-title { font-size: 28px; }
}

.question-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

/* --- Cartes réponse --- */
.answers-list {
  margin-top: 20px;
}

.card-answer {
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.card-answer:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 95, 190, 0.12);
}

.card-answer:active {
  transform: scale(0.99);
}

.card-answer.selected {
  border: 2px solid var(--color-primary);
  background: var(--color-bg-blue-light);
  transform: scale(1.02);
}

.card-answer.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.card-emoji {
  font-size: 24px;
  flex-shrink: 0;
  line-height: 1;
}

.card-text {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text);
}

/* --- Bouton principal --- */
.btn-primary {
  background: var(--color-cta);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 18px 32px;
  font-size: 17px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover {
  background: var(--color-cta-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(47, 204, 113, 0.35);
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* --- Micro-validation toast --- */
.micro-validation {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--color-success);
  color: white;
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  max-width: 360px;
  width: calc(100% - 40px);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(47, 204, 113, 0.3);
  pointer-events: none;
}

.micro-validation.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* --- Bouton continuer sticky (Q4) --- */
.sticky-btn {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: white;
  border-top: 1px solid var(--color-border);
  z-index: 100;
  display: none;
}

.sticky-btn .btn-primary {
  max-width: 520px;
  margin: 0 auto;
  display: block;
}

/* --- Domain items (inter2 + recap) --- */
.domain-item {
  border-left: 3px solid var(--color-primary);
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: 0 12px 12px 0;
  background: var(--color-bg-grey);
}

.domain-header {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 15px;
}

.domain-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* --- Intercalaire styles --- */
.inter-icon {
  font-size: 64px;
  text-align: center;
  margin-bottom: 16px;
  display: block;
}

.inter-title {
  font-family: 'Raleway', sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

.inter-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  margin-bottom: 16px;
}

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

.stat-block {
  background: white;
  border-left: 4px solid var(--color-primary);
  padding: 16px;
  border-radius: 0 12px 12px 0;
  margin: 24px 0;
  font-style: italic;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
}

.cloture-block {
  background: var(--color-bg-blue-light);
  padding: 16px;
  border-radius: 12px;
  margin: 24px 0;
  font-size: 15px;
  line-height: 1.6;
}

/* --- Loading page --- */
.loading-page {
  background: linear-gradient(135deg, #2D6BE4, #1a4db5);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.loader-circle {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 40px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-step {
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
  color: white;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 14px;
}

.loading-step:nth-child(1) { animation-delay: 0.3s; }
.loading-step:nth-child(2) { animation-delay: 1.1s; }
.loading-step:nth-child(3) { animation-delay: 1.9s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Email page --- */
.email-icon {
  font-size: 48px;
  text-align: center;
  display: block;
  margin-bottom: 16px;
}

.email-input {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg-grey);
  font-family: 'Poppins', sans-serif;
  margin-bottom: 8px;
  transition: border-color 0.2s ease;
  color: var(--color-text);
}

.email-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: white;
}

.email-input.error {
  border-color: #EF4444;
}

.email-error {
  color: #EF4444;
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
}

.email-privacy {
  font-size: 13px;
  color: var(--color-text-secondary);
  text-align: center;
  margin-top: 12px;
}

/* --- Recap page --- */
.urgency-banner {
  background: var(--color-accent);
  color: white;
  padding: 12px 20px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.recap-h1 {
  font-family: 'Raleway', sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
  margin: 24px 0 20px;
  color: var(--color-text);
}

@media (min-width: 480px) {
  .recap-h1 { font-size: 34px; }
}

.profile-card {
  background: var(--color-bg-blue-light);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 16px 16px 0;
  padding: 20px;
  margin-bottom: 24px;
}

.profile-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}

.profile-intro {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.profile-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-bullets li {
  font-size: 14px;
  line-height: 1.5;
}

.product-block {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.product-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 10px;
}

.product-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text-secondary);
}

.section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-text);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.stat-item {
  background: var(--color-bg-grey);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
}

.stat-number {
  font-family: 'Raleway', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.reviews-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.review-card {
  background: white;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.review-stars {
  font-size: 14px;
  margin-bottom: 6px;
}

.review-author {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

.review-text {
  font-size: 14px;
  color: var(--color-text-secondary);
  font-style: italic;
  line-height: 1.6;
}

.bonus-block {
  background: #FFF8EC;
  border: 1px solid var(--color-accent);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.bonus-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}

.bonus-price {
  font-size: 15px;
  margin-bottom: 6px;
}

.bonus-price s {
  color: var(--color-text-secondary);
}

.bonus-price strong {
  color: var(--color-success);
}

.bonus-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.guarantee-block {
  background: white;
  border: 1.5px solid var(--color-success);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.guarantee-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}

.guarantee-text {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.checklist-block {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.checklist-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 14px;
}

.checklist-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-list li {
  font-size: 15px;
  line-height: 1.4;
}

.checklist-list li s {
  color: var(--color-text-secondary);
  font-size: 13px;
}

.price-block {
  text-align: center;
  padding: 24px 20px;
  margin-bottom: 20px;
}

.price-old {
  text-decoration: line-through;
  color: var(--color-text-secondary);
  font-size: 18px;
}

.price-new {
  font-family: 'Raleway', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: var(--color-primary);
  display: block;
  margin: 6px 0;
}

.price-sub {
  font-size: 14px;
  color: var(--color-text-secondary);
  font-style: italic;
}

/* CTA sticky sur mobile */
.cta-sticky-wrapper {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--color-border);
  margin: 0 -20px -100px;
  z-index: 100;
}

.btn-cta {
  font-size: 18px;
  font-weight: 700;
  border-radius: 10px;
  padding: 18px 32px;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 204, 113, 0.5); }
  50%       { box-shadow: 0 0 0 12px rgba(47, 204, 113, 0); }
}

.btn-cta { animation: pulse 2.5s ease infinite; }

.cta-sub {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 8px;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 32px 20px 40px;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.site-footer a {
  color: var(--color-text-secondary);
  text-decoration: underline;
}

/* --- Responsive desktop --- */
@media (min-width: 640px) {
  .container { padding: 32px 24px 120px; }
  .question-title { font-size: 28px; }
  .card-text { font-size: 16px; }
}
