/* ==========================================================================
   Simulateur d'obligations — D'un Seul Geste
   Styles extraits du HTML original, scopés sous #dsg-simu pour isolation
   (évite les collisions avec le thème / Breakdance sur les classes
   génériques .card, .field, .badge, .nav, etc.). Rendu visuel identique.
   ========================================================================== */

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

#dsg-simu {
  --blue: #1840FF;
  --blue-dark: #0D1F8C;
  --blue-light: #EEF1FF;
  --blue-mid: #C7D2FF;
  --orange: #E8620A;
  --orange-light: #FEF0E7;
  --red: #C62828;
  --red-light: #FEECEC;
  --amber: #B45309;
  --amber-light: #FEF3C7;
  --green: #15803D;
  --green-light: #DCFCE7;
  --text: #111827;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --bg: #EEF1FF;
}

#dsg-simu {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  padding: 48px 16px 56px;
  color: var(--text);
  /* Dégagement pour le header sticky du thème lors du scroll auto entre étapes. */
  scroll-margin-top: 110px;
  /* Centre le formulaire dans le fond bleu (vertical + horizontal).
     margin:auto sur .quiz-wrap (plus bas) est "overflow-safe" : quand les
     résultats dépassent 100vh, le contenu revient en haut et reste scrollable
     (contrairement à justify-content:center qui rendrait le haut inaccessible). */
  display: flex;
  flex-direction: column;
  align-items: center;
}

#dsg-simu .quiz-wrap {
  width: 100%;
  max-width: 680px;
  margin: auto; /* centrage vertical+horizontal, overflow-safe (cf. #dsg-simu). */
}

/* Progress */
#dsg-simu .progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
#dsg-simu .progress-track {
  flex: 1;
  height: 6px;
  background: var(--blue-mid);
  border-radius: 99px;
  overflow: hidden;
}
#dsg-simu .progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 99px;
  transition: width 0.4s ease;
}
#dsg-simu .progress-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: .04em;
}

/* Card */
#dsg-simu .card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 40px 32px;
  box-shadow: 0 2px 20px rgba(24,64,255,.08);
}
@media(max-width:520px) {
  #dsg-simu .card { padding: 28px 20px 24px; }
}

#dsg-simu .step-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

#dsg-simu h2.q-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--blue-dark);
  line-height: 1.3;
  margin-bottom: 6px;
}

#dsg-simu .q-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

/* Section separator within a step */
#dsg-simu .q-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

#dsg-simu .q-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.4;
}
#dsg-simu .q-label small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Option buttons */
#dsg-simu .opt-grid {
  display: grid;
  gap: 10px;
}
#dsg-simu .opt-grid.cols2 { grid-template-columns: 1fr 1fr; }
#dsg-simu .opt-grid.cols1 { grid-template-columns: 1fr; }
@media(max-width:480px) {
  #dsg-simu .opt-grid.cols2 { grid-template-columns: 1fr; }
}

#dsg-simu .opt {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  transition: border-color .15s, background .15s;
  width: 100%;
}
#dsg-simu .opt:hover { border-color: var(--blue); background: var(--blue-light); }
#dsg-simu .opt.on { border-color: var(--blue); background: var(--blue); color: #fff; }
#dsg-simu .opt .ico { font-size: 18px; flex-shrink: 0; line-height: 1.3; }
#dsg-simu .opt .opt-main { font-weight: 700; display: block; }
#dsg-simu .opt .opt-sub { font-size: 12px; opacity: .75; display: block; margin-top: 2px; }

/* Yes/No */
#dsg-simu .yn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 0;
}
#dsg-simu .yn {
  padding: 13px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, background .15s, color .15s;
}
#dsg-simu .yn:hover { border-color: var(--blue); background: var(--blue-light); }
#dsg-simu .yn.on { border-color: var(--blue); background: var(--blue); color: #fff; }

/* Form inputs */
#dsg-simu .field { margin-bottom: 14px; }
#dsg-simu .field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
#dsg-simu .field input, #dsg-simu .field select {
  width: 100%;
  padding: 13px 15px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
#dsg-simu .field input:focus, #dsg-simu .field select:focus { border-color: var(--blue); }
#dsg-simu .field label .req { color: var(--red); }
#dsg-simu .field--invalid input { border-color: var(--red); background: var(--red-light); }
#dsg-simu .field-error {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--red);
}
#dsg-simu .field-error:empty { display: none; }

/* Navigation */
#dsg-simu .nav {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  align-items: center;
}
#dsg-simu .btn-back {
  padding: 13px 20px;
  border: 2px solid var(--border);
  border-radius: 99px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .15s, color .15s;
  flex-shrink: 0;
}
#dsg-simu .btn-back:hover { border-color: var(--blue); color: var(--blue); }
#dsg-simu .btn-next {
  flex: 1;
  padding: 14px 24px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 99px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
#dsg-simu .btn-next:hover:not(:disabled) { background: var(--blue-dark); transform: translateY(-1px); }
#dsg-simu .btn-next:disabled { opacity: .35; cursor: not-allowed; transform: none; }

/* Intro */
#dsg-simu .intro {
  text-align: center;
  padding: 52px 36px 48px;
}
#dsg-simu .intro .badge {
  display: inline-block;
  padding: 5px 14px;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 22px;
}
#dsg-simu .intro h1 {
  font-size: 30px;
  font-weight: 800;
  color: var(--blue-dark);
  line-height: 1.2;
  margin-bottom: 14px;
}
#dsg-simu .intro p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 28px;
}
#dsg-simu .intro .pills {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
#dsg-simu .intro .pill {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
#dsg-simu .intro-stats {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
#dsg-simu .intro-stat { text-align: center; }
#dsg-simu .intro-stat strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--blue-dark);
  line-height: 1.2;
}
#dsg-simu .intro-stat span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

#dsg-simu .btn-cta {
  display: inline-block;
  padding: 16px 36px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 99px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s;
}
#dsg-simu .btn-cta:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(24,64,255,.28);
}

/* "Le saviez-vous ?" callout */
#dsg-simu .callout-fact {
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin-bottom: 20px;
}
#dsg-simu .callout-fact-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--blue);
  margin-bottom: 4px;
}
#dsg-simu .callout-fact p {
  font-size: 14px;
  color: var(--blue-dark);
  line-height: 1.5;
}

/* Results */
#dsg-simu .res-header {
  text-align: center;
  margin-bottom: 24px;
}
#dsg-simu .res-header .badge {
  display: inline-block;
  padding: 5px 14px;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
#dsg-simu .res-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: 6px;
}
#dsg-simu .res-header p { font-size: 14px; color: var(--text-muted); }

#dsg-simu .summary-chip {
  background: var(--blue-light);
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 13px;
  color: var(--blue-dark);
  margin-bottom: 22px;
  line-height: 1.5;
}

/* Legal preamble */
#dsg-simu .legal-preamble {
  background: #022eed;
  border: none;
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #fff;
  line-height: 1.7;
}
#dsg-simu .legal-preamble-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.7);
  margin-bottom: 10px;
}
#dsg-simu .legal-preamble p { margin-top: 6px; font-weight: 700; }
#dsg-simu .legal-preamble p:first-of-type { margin-top: 0; }

/* Info actu */
#dsg-simu .info-actu {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
}
#dsg-simu .info-actu-icon { font-size: 18px; flex-shrink: 0; line-height: 1.4; }
#dsg-simu .info-actu-body { flex: 1; }
#dsg-simu .info-actu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
#dsg-simu .info-actu-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #92400e;
  background: #fde68a;
  padding: 2px 8px;
  border-radius: 4px;
}
#dsg-simu .info-actu-logo { line-height: 0; }
#dsg-simu .info-actu-body p { font-size: 13px; color: #92400e; line-height: 1.5; font-weight: 500; margin-top: 0; }

/* Section preamble (per thematic) */
#dsg-simu .section-preamble {
  background: var(--blue-light);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--blue-dark);
  line-height: 1.6;
}

/* Blocs formation D'un Seul Geste */
#dsg-simu .gps-block {
  background: linear-gradient(135deg, #f0f3ff 0%, var(--blue-light) 100%);
  border: 2px solid var(--blue);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 28px;
  box-shadow: 0 4px 16px rgba(24,64,255,.10);
}
#dsg-simu .gps-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
#dsg-simu .gps-icon {
  width: 40px; height: 40px;
  background: var(--blue);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
#dsg-simu .gps-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--blue); }
#dsg-simu .gps-name { font-size: 16px; font-weight: 800; color: var(--blue-dark); margin-top: 1px; }
#dsg-simu .gps-body { font-size: 14px; color: var(--blue-dark); line-height: 1.6; margin-bottom: 14px; }
#dsg-simu .gps-pills {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
#dsg-simu .gps-pill {
  font-size: 12px; font-weight: 600;
  padding: 5px 11px;
  background: rgba(24,64,255,.1);
  color: var(--blue);
  border-radius: 99px;
}
#dsg-simu .btn-gps {
  display: inline-block;
  padding: 11px 22px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 99px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
#dsg-simu .btn-gps:hover { background: var(--blue-dark); transform: translateY(-1px); }

/* Obligation sections */
#dsg-simu .ob-section { margin-bottom: 28px; }
#dsg-simu .ob-section-title {
  font-size: 15px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  color: var(--blue-dark);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue-light);
}
#dsg-simu .ob-item {
  display: flex;
  gap: 12px;
  padding: 13px 8px;
  border-bottom: 1px solid #F3F4F6;
  align-items: flex-start;
  border-radius: 8px;
  transition: background .12s;
}
#dsg-simu .ob-item:hover { background: #F9FAFB; }
#dsg-simu .ob-item:last-child { border-bottom: none; }
#dsg-simu .ob-badge {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
#dsg-simu .b-obl { background: var(--red-light); color: var(--red); }
#dsg-simu .b-rec { background: var(--amber-light); color: var(--amber); }
#dsg-simu .b-ok  { background: var(--green-light); color: var(--green); }
#dsg-simu .ob-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
#dsg-simu .ob-detail { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
#dsg-simu .ob-art { font-size: 11px; color: var(--blue); font-weight: 700; margin-top: 4px; }

#dsg-simu .res-footer {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
#dsg-simu .res-footer p { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
#dsg-simu .btn-cta-res {
  display: inline-block;
  padding: 14px 30px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 99px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
#dsg-simu .btn-cta-res:hover { background: var(--blue-dark); }

/* Page résultats (contenu > 100vh, donc top-alignée) : léger décalage
   du haut pour ne pas coller au header du thème. Sans effet sur l'intro
   et les étapes (centrées verticalement). */
#dsg-simu .card.dsg-results { margin-top: 28px; }

#dsg-simu .hidden { display: none !important; }

@keyframes dsg-fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
#dsg-simu .card { animation: dsg-fadeUp .28s ease; }
