/* ================================================
   Diagnostic Com'Claire Créations
   Styles scopés à #cccq — aucun conflit avec le thème
   ================================================ */

#cccq {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: transparent;
  border-radius: 20px;
  padding: 32px 16px 48px;
  --v:  #5A46FF;
  --vl: #EDE9FE;
  --vm: #7C3AED;
  --tx: #1F2937;
  --gr: #6B7280;
  --bd: #E5E7EB;
}
#cccq * { box-sizing: border-box; margin: 0; padding: 0; }

/* Autorise chaque élément à rétrécir et à couper les mots longs */
#cccq, #cccq * {
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

#cccq .cq-wrap { max-width: 660px; width: 100%; margin: 0 auto; }

#cccq .cq-screen { display: none; }
#cccq .cq-screen.active { display: block; animation: cqFadeUp .35s ease; }
@keyframes cqFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  #cccq .cq-screen.active { animation: none; }
  #cccq * { transition: none !important; }
}

#cccq .cq-card {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 4px 28px rgba(107,33,168,.1);
}

/* ── INTRO ────────────────────────────────────── */
#cccq .cq-logo {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--v);
  margin-bottom: 24px;
}
#cccq .cq-intro-card h1 {
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 800;
  color: var(--tx);
  line-height: 1.2;
  margin-bottom: 14px;
}
#cccq .cq-intro-card p {
  font-size: 16px;
  color: var(--gr);
  line-height: 1.6;
  margin-bottom: 28px;
}
#cccq .cq-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
#cccq .cq-badge {
  background: var(--vl);
  color: var(--v);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  white-space: normal;
}

/* ── BOUTONS ──────────────────────────────────── */
#cccq .cq-btn {
  display: inline-block;
  background: var(--v);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background .2s, transform .1s;
  text-align: center;
  white-space: normal;
  line-height: 1.35;
  font-family: inherit;
}
#cccq .cq-btn:hover  { background: var(--vm); transform: translateY(-1px); }
#cccq .cq-btn:active { transform: translateY(0); }
#cccq .cq-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
#cccq .cq-btn:focus-visible,
#cccq .cq-answer:focus-visible,
#cccq .cq-btn-ghost:focus-visible { outline: 3px solid var(--vm); outline-offset: 2px; }

#cccq .cq-btn-ghost {
  background: none;
  color: var(--gr);
  font-size: 14px;
  border: none;
  cursor: pointer;
  padding: 10px 0;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color .2s, text-decoration-color .2s;
  white-space: normal;
  font-family: inherit;
}
#cccq .cq-btn-ghost:hover { color: var(--v); text-decoration-color: var(--v); }
#cccq .cq-back-wrap { margin-top: 18px; text-align: center; }
#cccq .cq-back-wrap[hidden] { display: none; }

/* ── BARRE DE PROGRESSION ─────────────────────── */
#cccq .cq-progress-zone { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
#cccq .cq-progress-track {
  flex: 1;
  height: 6px;
  background: var(--vl);
  border-radius: 100px;
  overflow: hidden;
}
#cccq .cq-progress-fill {
  height: 100%;
  background: var(--v);
  border-radius: 100px;
  transition: width .4s ease;
  width: 0%;
}
#cccq .cq-progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gr);
  white-space: nowrap;
  min-width: 42px;
  text-align: right;
}

/* ── QUESTION ─────────────────────────────────── */
#cccq .cq-q-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--v);
  margin-bottom: 12px;
}
#cccq .cq-q-text {
  font-size: clamp(16px, 3.5vw, 20px);
  font-weight: 700;
  color: var(--tx);
  line-height: 1.4;
  margin-bottom: 28px;
  white-space: normal;
}
#cccq .cq-answers { display: flex; flex-direction: column; gap: 10px; }

/* grid plutôt que flex : un <button> flex ne replie pas son texte sur iOS */
#cccq .cq-answer {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: start;
  gap: 12px;
  background: #fff;
  border: 2px solid var(--bd);
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  color: var(--tx);
  line-height: 1.45;
  transition: border-color .2s, background .2s, transform .1s;
  width: 100%;
  white-space: normal;
  font-family: inherit;
}
#cccq .cq-answer:hover:not(.disabled) {
  border-color: var(--v);
  background: var(--vl);
  transform: translateX(3px);
}
#cccq .cq-answer.sel {
  border-color: var(--v);
  background: var(--vl);
  transform: translateX(3px);
}
#cccq .cq-answer.disabled { cursor: default; }

#cccq .cq-letter {
  width: 30px;
  height: 30px;
  margin-top: 1px;
  background: var(--vl);
  color: var(--v);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}
#cccq .cq-answer.sel .cq-letter,
#cccq .cq-answer:hover:not(.disabled) .cq-letter { background: var(--v); color: #fff; }

/* ── FORMULAIRE ───────────────────────────────── */
#cccq .cq-score-badge {
  display: inline-block;
  background: var(--vl);
  color: var(--v);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 100px;
  margin-bottom: 20px;
}
#cccq .cq-form-screen h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--tx);
  margin-bottom: 8px;
  line-height: 1.3;
}
#cccq .cq-form-screen p {
  font-size: 15px;
  color: var(--gr);
  margin-bottom: 28px;
  line-height: 1.5;
}
#cccq .cq-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#cccq .cq-field { margin-bottom: 16px; }
#cccq .cq-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--tx);
  margin-bottom: 6px;
}
#cccq .cq-field input {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  font-size: 16px;   /* 16px minimum : évite le zoom automatique sur iPhone */
  color: var(--tx);
  border: 2px solid var(--bd);
  border-radius: 10px;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
  background: #fff;
}
#cccq .cq-field input:focus { border-color: var(--v); }
#cccq .cq-field input::placeholder { color: #C0C4CC; }
#cccq .cq-field input.cq-invalid { border-color: #DC2626; }

/* Honeypot : masqué sans display:none (certains bots l'ignorent) */
#cccq .cq-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#cccq .cq-error {
  color: #DC2626;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.45;
}
#cccq .cq-error:empty { display: none; }

#cccq .cq-submit-wrap { margin-top: 8px; }
#cccq .cq-privacy {
  font-size: 12px;
  color: var(--gr);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

/* ── RÉSULTAT ─────────────────────────────────── */
#cccq .cq-result-top {
  border-radius: 16px 16px 0 0;
  padding: 36px 32px 28px;
  text-align: center;
  color: #fff;
  background: var(--v);
}
#cccq .cq-result-top h2 {
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 800;
  line-height: 1.3;
  margin-top: 12px;
  white-space: normal;
  color: #fff;
}
#cccq .cq-score-circle { display: inline-flex; align-items: baseline; gap: 4px; }
#cccq .cq-score-big { font-size: clamp(56px, 12vw, 80px); font-weight: 900; line-height: 1; }
#cccq .cq-score-denom { font-size: 24px; font-weight: 600; opacity: .85; }
#cccq .cq-result-body { border-radius: 0 0 16px 16px; box-shadow: 0 4px 28px rgba(107,33,168,.1); }
#cccq .cq-result-section { margin-bottom: 28px; }
#cccq .cq-result-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--tx);
  margin-bottom: 10px;
}
#cccq .cq-result-section p { font-size: 15px; color: #374151; line-height: 1.65; }
#cccq .cq-offers { display: flex; flex-direction: column; gap: 12px; }
#cccq .cq-offer-a {
  display: block;
  background: var(--v);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 16px 24px;
  border-radius: 12px;
  text-decoration: none;
  text-align: center;
  transition: background .2s, transform .1s;
  white-space: normal;
  line-height: 1.35;
}
#cccq .cq-offer-a:hover { background: var(--vm); transform: translateY(-1px); color: #fff; }
#cccq .cq-offer-b {
  display: block;
  border: 2px solid var(--v);
  color: var(--v);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 12px;
  text-decoration: none;
  text-align: center;
  transition: background .2s, color .2s;
  white-space: normal;
  line-height: 1.35;
}
#cccq .cq-offer-b:hover { background: var(--vl); color: var(--v); }
#cccq .cq-restart-wrap {
  text-align: center;
  margin-top: 24px;
  border-top: 1px solid var(--bd);
  padding-top: 24px;
}

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 560px) {
  #cccq { padding: 20px 12px 32px; }
  #cccq .cq-card { padding: 20px 16px; }
  #cccq .cq-result-top { padding: 28px 16px 20px; }
  #cccq .cq-result-body { padding: 20px 16px; }
  #cccq .cq-row { grid-template-columns: 1fr; }
  #cccq .cq-intro-card h1 br { display: none; }
  #cccq .cq-answer { padding: 12px 14px; font-size: 14px; grid-template-columns: 26px 1fr; gap: 10px; }
  #cccq .cq-letter { width: 26px; height: 26px; font-size: 12px; }
  #cccq .cq-answer:hover:not(.disabled),
  #cccq .cq-answer.sel { transform: none; }
  #cccq .cq-btn { padding: 15px 18px; font-size: 15px; }
  #cccq .cq-offer-a, #cccq .cq-offer-b { padding: 14px 16px; font-size: 14px; }
}
