/* ── Survey Module Styles ─────────────────────────────
   Design System: Teal/Primary + Warm Accent
   Primary #0D9488 | Secondary #2DD4BF | Accent #D97706
   Dark #134E4A | Surface #FFFFFF | Base #F8FAFC
   ──────────────────────────────────────────────────── */

:root {
  --ong-primary: #0D9488;
  --ong-primary-hover: #0f766e;
  --ong-primary-light: #f0fdfa;
  --ong-secondary: #2DD4BF;
  --ong-accent: #D97706;
  --ong-accent-hover: #b45309;
  --ong-dark: #134E4A;
  --ong-surface: #ffffff;
  --ong-base: #f8fafc;
  --ong-border: #e2e8f0;
  --ong-border-strong: #cbd5e1;
  --ong-text: #1e293b;
  --ong-text-secondary: #475569;
  --ong-text-muted: #64748b;
  --ong-text-light: #94a3b8;
  --ong-error: #dc2626;
  --ong-error-bg: #fef2f2;
  --ong-error-border: #fecaca;
  --ong-warning-bg: #fffbeb;
  --ong-warning-border: #fde68a;
  --ong-warning-text: #92400e;
  --ong-info-bg: #eff6ff;
  --ong-info-border: #bfdbfe;
  --ong-info-text: #1e40af;
  --ong-success-bg: #f0fdfa;
  --ong-success-border: #5eead4;
  --ong-radius: 8px;
  --ong-radius-lg: 12px;
  --ong-radius-xl: 16px;
  --ong-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --ong-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --ong-transition: 0.2s ease;
}

/* ── Wizard Layout ─────────────────────────────────── */
.ong-wizard {
  max-width: 720px;
  margin: 2rem auto;
}

/* ── Progress Bar ──────────────────────────────────── */
.ong-wizard-progress {
  margin-bottom: 2rem;
}

.ong-wizard-progress-bar {
  height: 6px;
  background: var(--ong-border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.ong-wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ong-primary), var(--ong-secondary));
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ong-wizard-progress__steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.25rem;
}

.ong-wizard-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  flex: 1;
  position: relative;
  min-width: 0;
}

.ong-wizard-progress__step:disabled {
  cursor: default;
  opacity: 0.4;
}

.ong-wizard-progress__step:focus-visible {
  outline: 2px solid var(--ong-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.ong-wizard-progress__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--ong-border);
  color: var(--ong-text-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.ong-wizard-progress__step.is-done .ong-wizard-progress__num::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ong-primary);
  border-radius: 50%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/60% no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/60% no-repeat;
  animation: ongCheckPop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes ongCheckPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.ong-wizard-progress__step.is-done .ong-wizard-progress__num {
  background: var(--ong-primary);
  color: transparent;
}

.ong-wizard-progress__step.is-active .ong-wizard-progress__num {
  background: var(--ong-primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.2);
  transform: scale(1.05);
}

.ong-wizard-progress__label {
  font-size: 0.7rem;
  color: var(--ong-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
  text-align: center;
  line-height: 1.2;
  transition: color var(--ong-transition);
}

.ong-wizard-progress__step.is-active .ong-wizard-progress__label {
  color: var(--ong-dark);
  font-weight: 600;
}

.ong-wizard-progress-text {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ong-text-muted);
  margin-top: 0.5rem;
  font-variant-numeric: tabular-nums;
}

/* ── Steps ──────────────────────────────────────────── */
.ong-wizard-step {
  display: none;
}

.ong-wizard-step.is-active {
  display: block;
  animation: ongStepIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@keyframes ongShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .ong-wizard-step.is-active { animation: none; }
  .ong-wizard-progress-fill { transition: none; }
  .ong-wizard-progress__num { transition: none; }
  .ong-wizard-confirmation.is-visible { animation: none; }
  .ong-wizard-confirmation__icon { animation: none; }
  .ong-wizard-progress__step.is-done .ong-wizard-progress__num::after { animation: none; }
}

/* ── Form Sections ─────────────────────────────────── */
.ong-form-section {
  background: var(--ong-surface);
  border: 1px solid var(--ong-border);
  border-radius: var(--ong-radius-lg);
  padding: 1.75rem;
  transition: box-shadow var(--ong-transition);
}

.ong-form-section:focus-within {
  box-shadow: var(--ong-shadow);
}

.ong-form-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ong-dark);
  margin: 0 0 0.25rem;
}

.ong-form-section .description {
  font-size: 0.9rem;
  color: var(--ong-text-secondary);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

/* ── Fields ─────────────────────────────────────────── */
.ong-field {
  margin-bottom: 1.25rem;
}

.ong-field > label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ong-text);
  margin-bottom: 0.35rem;
}

.ong-field input[type="text"],
.ong-field input[type="email"],
.ong-field input[type="tel"],
.ong-field input[type="date"],
.ong-field textarea,
.ong-field select {
  width: 100%;
  padding: 0.675rem 0.8rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ong-text);
  background: var(--ong-surface);
  border: 1.5px solid var(--ong-border-strong);
  border-radius: var(--ong-radius);
  transition: border-color var(--ong-transition), box-shadow var(--ong-transition);
  box-sizing: border-box;
  line-height: 1.5;
}

.ong-field input:focus,
.ong-field textarea:focus,
.ong-field select:focus {
  outline: none;
  border-color: var(--ong-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.ong-field input.error,
.ong-field textarea.error,
.ong-field select.error {
  border-color: var(--ong-error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.ong-field textarea {
  resize: vertical;
  min-height: 100px;
}

.ong-field select {
  cursor: pointer;
  appearance: auto;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

/* ── Helper text ────────────────────────────────────── */
.ong-field .ong-helper-text {
  display: block;
  font-size: 0.78rem;
  color: var(--ong-text-muted);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* ── Required asterisk ──────────────────────────────── */
.ong-field .required-star {
  color: var(--ong-error);
  font-weight: 700;
}

/* ── Radio & Checkbox ──────────────────────────────── */
.ong-radio-group {
  border: none;
  padding: 0;
  margin: 0;
}

.ong-radio-group__label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ong-text);
  margin-bottom: 0.5rem;
}

.ong-radio,
.ong-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--ong-radius);
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 0.25rem;
  border: 1.5px solid transparent;
}

.ong-radio:hover,
.ong-checkbox:hover {
  background: var(--ong-primary-light);
}

.ong-radio:focus-within,
.ong-checkbox:focus-within {
  border-color: var(--ong-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.ong-radio input[type="radio"],
.ong-checkbox input[type="checkbox"] {
  margin-top: 0.15rem;
  accent-color: var(--ong-primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.ong-radio span,
.ong-checkbox span {
  font-size: 0.9rem;
  color: var(--ong-text-secondary);
  line-height: 1.45;
}

.ong-radio input[type="radio"]:checked + span,
.ong-checkbox input[type="checkbox"]:checked + span {
  color: var(--ong-text);
  font-weight: 500;
}

/* ── File Field ─────────────────────────────────────── */
.ong-file-field {
  position: relative;
}

.ong-file-dropzone {
  position: relative;
  width: 100%;
}

.ong-file-dropzone .ong-file-field__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.ong-file-dropzone__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  background: var(--ong-base);
  border: 2px dashed var(--ong-border-strong);
  border-radius: var(--ong-radius);
  color: var(--ong-text-muted);
  font-size: 0.85rem;
  transition: all 0.2s ease;
  pointer-events: none;
}

.ong-file-dropzone__text svg {
  color: var(--ong-text-light);
  transition: color var(--ong-transition);
  width: 28px;
  height: 28px;
}

.ong-file-dropzone:hover .ong-file-dropzone__text,
.ong-file-dropzone.is-dragover .ong-file-dropzone__text {
  border-color: var(--ong-primary);
  background: var(--ong-primary-light);
  color: var(--ong-primary);
}

.ong-file-dropzone:hover .ong-file-dropzone__text svg,
.ong-file-dropzone.is-dragover .ong-file-dropzone__text svg {
  color: var(--ong-primary);
}

.ong-file-dropzone.is-dragover .ong-file-dropzone__text {
  border-style: solid;
  background: #ccfbf1;
}

.ong-file-dropzone:focus-within .ong-file-dropzone__text {
  border-color: var(--ong-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.ong-file-field .ong-file-name {
  display: block;
  font-size: 0.8rem;
  color: var(--ong-text-muted);
  margin-top: 0.35rem;
  font-style: italic;
}

.ong-file-field .ong-file-name.is-filled {
  color: var(--ong-primary);
  font-style: normal;
  font-weight: 600;
}

.ong-file-field .ong-file-name.is-error {
  color: var(--ong-error);
  font-style: normal;
  font-weight: 500;
}

/* ── Wizard Actions ─────────────────────────────────── */
.ong-wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.ong-wizard-actions .mss-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--ong-radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--ong-transition);
  font-family: inherit;
  line-height: 1.4;
  min-height: 44px;
}

.ong-wizard-actions .mss-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ong-wizard-actions .mss-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.ong-wizard-actions .mss-btn--primary {
  background: var(--ong-primary);
  color: #fff;
  border-color: var(--ong-primary);
}

.ong-wizard-actions .mss-btn--primary:hover:not(:disabled) {
  background: var(--ong-primary-hover);
  border-color: var(--ong-primary-hover);
}

.ong-wizard-actions .mss-btn--primary:focus-visible {
  outline: 2px solid var(--ong-primary);
  outline-offset: 2px;
}

.ong-wizard-actions .mss-btn--outline {
  background: transparent;
  color: var(--ong-text-secondary);
  border-color: var(--ong-border-strong);
}

.ong-wizard-actions .mss-btn--outline:hover:not(:disabled) {
  background: var(--ong-base);
  border-color: var(--ong-text-light);
}

.ong-wizard-actions .mss-btn--outline:focus-visible {
  outline: 2px solid var(--ong-text-muted);
  outline-offset: 2px;
}

/* ── Spinner dans le bouton submit ──────────────────── */
.ong-wizard-actions .mss-btn .ong-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ongSpin 0.6s linear infinite;
}

.ong-wizard-actions .mss-btn.is-loading .ong-spinner {
  display: inline-block;
}

.ong-wizard-actions .mss-btn.is-loading .ong-btn-text {
  opacity: 0.7;
}

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

/* ── Recap ──────────────────────────────────────────── */
.ong-wizard-recap {
  margin: 1rem 0;
}

.ong-wizard-recap-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
}

.ong-wizard-recap-list dt {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ong-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.75rem;
}

.ong-wizard-recap-list dt:first-child {
  margin-top: 0;
}

.ong-wizard-recap-list dd {
  font-size: 0.95rem;
  color: var(--ong-text);
  margin: 0;
  padding: 0.6rem 0.85rem;
  background: var(--ong-base);
  border-radius: 6px;
  border-left: 3px solid var(--ong-primary);
  line-height: 1.4;
}

/* ── Autosave Note ──────────────────────────────────── */
.ong-wizard-autosave-note {
  font-size: 0.8rem;
  color: var(--ong-primary);
  background: var(--ong-success-bg);
  border: 1px solid var(--ong-success-border);
  border-radius: var(--ong-radius);
  padding: 0.7rem 0.9rem;
  margin-bottom: 1rem;
  display: none;
  line-height: 1.5;
}

.ong-wizard-autosave-note:not(:empty) {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ong-wizard-clear-draft-btn {
  background: none;
  border: none;
  color: var(--ong-error);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  margin-left: 0.35rem;
  white-space: nowrap;
}

.ong-wizard-clear-draft-btn:hover {
  color: #b91c1c;
}

/* ── Confirmation ───────────────────────────────────── */
.ong-wizard-confirmation {
  display: none;
}

.ong-wizard-confirmation.is-visible {
  display: block;
  animation: ongFadeSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.ong-wizard-confirmation__inner {
  text-align: center;
  padding: 3.5rem 2rem;
  background: linear-gradient(135deg, var(--ong-success-bg), #ccfbf1);
  border: 1px solid var(--ong-success-border);
  border-radius: var(--ong-radius-xl);
}

.ong-wizard-confirmation__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 1.25rem;
  background: var(--ong-primary);
  color: #fff;
  font-size: 1.5rem;
  border-radius: 50%;
  animation: ongScalePop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

@keyframes ongScalePop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.ong-wizard-confirmation__inner h2 {
  font-size: 1.5rem;
  color: var(--ong-dark);
  margin: 0 0 0.75rem;
}

.ong-wizard-confirmation__inner p {
  font-size: 0.95rem;
  color: var(--ong-text-secondary);
  margin: 0.5rem 0;
  line-height: 1.6;
}

.ong-wizard-confirmation__ref {
  font-size: 0.85rem;
  color: var(--ong-text-muted);
  margin-top: 1rem !important;
}

.ong-wizard-confirmation__ref strong {
  color: var(--ong-primary);
}

/* ── Survey Intro ────────────────────────────────────── */
.ong-survey-intro {
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--ong-success-bg);
  border: 1px solid var(--ong-success-border);
  border-radius: var(--ong-radius-lg);
  color: var(--ong-dark);
  font-size: 0.95rem;
  line-height: 1.7;
}

.ong-survey-intro p:last-child {
  margin-bottom: 0;
}

.ong-survey-intro p:first-child {
  margin-top: 0;
}

/* ── Alerts ─────────────────────────────────────────── */
.ong-survey-form .mss-alert {
  padding: 0.875rem 1rem;
  border-radius: var(--ong-radius-lg);
  font-size: 0.9rem;
  border: 1px solid;
  line-height: 1.5;
}

.ong-survey-form .mss-alert--info {
  background: var(--ong-info-bg);
  border-color: var(--ong-info-border);
  color: var(--ong-info-text);
}

.ong-survey-form .mss-alert--warning {
  background: var(--ong-warning-bg);
  border-color: var(--ong-warning-border);
  color: var(--ong-warning-text);
}

.ong-survey-form .mss-alert--error {
  background: var(--ong-error-bg);
  border-color: var(--ong-error-border);
  color: var(--ong-error);
}

/* ── Error shake ────────────────────────────────────── */
.ong-error-shake {
  animation: ongShake 0.4s ease;
}

/* ── Response container (post-submit) ───────────────── */
#ong-survey-response {
  margin-top: 1rem;
}

/* ── Results Page ──────────────────────────────────── */
.ong-survey-results {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ong-survey-result-block {
  background: var(--ong-surface);
  border: 1px solid var(--ong-border);
  border-radius: var(--ong-radius-lg);
  padding: 1.5rem;
}

.ong-survey-result-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ong-dark);
  margin: 0 0 0.25rem;
}

.ong-survey-result-type {
  font-size: 0.8rem;
  color: var(--ong-text-light);
  margin: 0 0 1rem;
}

.ong-survey-result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ong-survey-result-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ong-text-muted);
  border-bottom: 2px solid var(--ong-border);
  font-weight: 700;
}

.ong-survey-result-table th:not(:first-child) {
  text-align: right;
}

.ong-survey-result-table td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--ong-border);
  color: var(--ong-text-secondary);
}

.ong-survey-result-table td:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ong-survey-result-table tr:last-child td {
  border-bottom: none;
}

.ong-survey-result-table tr:hover td {
  background: var(--ong-base);
}

/* ── Empty State ────────────────────────────────────── */
.mss-card--empty {
  text-align: center;
  padding: 3.5rem 1.5rem !important;
  background: var(--ong-base);
  border: 2px dashed var(--ong-border);
  border-radius: var(--ong-radius-lg);
}

.mss-card--empty__icon {
  margin-bottom: 1rem;
  opacity: 0.4;
}

.mss-card--empty .mss-empty {
  font-size: 0.95rem;
  color: var(--ong-text-light);
  margin: 0;
  max-width: 360px;
  margin: 0 auto;
}

/* ── Notice Box ─────────────────────────────────────── */
.mss-page .notice-box {
  padding: 1rem 1.25rem;
  background: var(--ong-warning-bg);
  border: 1px solid var(--ong-warning-border);
  border-radius: var(--ong-radius-lg);
  color: var(--ong-warning-text);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ── Chart Canvas ───────────────────────────────────── */
.ong-survey-chart {
  max-height: 260px;
  margin-bottom: 1rem;
}

/* ── Back Link ──────────────────────────────────────── */
.mss-back-link {
  margin-top: 1.5rem;
}

.mss-back-link a {
  color: var(--ong-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--ong-transition);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.mss-back-link a:hover {
  color: var(--ong-primary-hover);
  text-decoration: underline;
}

/* ── No Data Text ──────────────────────────────────── */
.ong-survey-no-data {
  color: var(--ong-text-light);
  font-size: 0.9rem;
  font-style: italic;
  margin: 0.5rem 0;
}

/* ── Text Responses ─────────────────────────────────── */
.ong-survey-text-responses {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ong-survey-text-response {
  padding: 0.75rem 1rem;
  background: var(--ong-base);
  border-radius: var(--ong-radius);
  border-left: 3px solid var(--ong-primary);
  font-size: 0.9rem;
  color: var(--ong-text-secondary);
  line-height: 1.45;
}

.ong-survey-text-response small {
  color: var(--ong-text-light);
  font-size: 0.82rem;
}

/* ── Consent Checkbox ───────────────────────────────── */
.ong-survey-form .ong-checkbox.ong-survey-consent {
  margin-top: 1rem;
  padding: 0.85rem;
  background: var(--ong-base);
  border-radius: var(--ong-radius);
  border: 1px solid var(--ong-border);
}

.ong-survey-form .ong-checkbox.ong-survey-consent span {
  font-size: 0.85rem;
  color: var(--ong-text-secondary);
  line-height: 1.55;
}

.ong-survey-form .ong-checkbox.ong-survey-consent a {
  color: var(--ong-primary);
  text-decoration: underline;
}

.ong-survey-form .ong-checkbox.ong-survey-consent a:hover {
  color: var(--ong-primary-hover);
}

/* ── Condition animations ──────────────────────────── */
.ong-field-conditioned {
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.35s ease, margin 0.25s ease;
}

/* ── Focus styles for headings ──────────────────────── */
.ong-form-section h3:focus {
  outline: none;
}

/* ── Print styles ───────────────────────────────────── */
@media print {
  .ong-wizard-actions,
  .ong-wizard-progress,
  .ong-wizard-autosave-note,
  .mss-back-link { display: none !important; }
  .ong-form-section { border: 1px solid #ccc; break-inside: avoid; }
  .ong-wizard-confirmation__inner { border: 1px solid #ccc; }
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 640px) {
  .ong-wizard { margin: 1rem auto; }

  .ong-form-section { padding: 1.25rem; border-radius: var(--ong-radius); }

  .ong-wizard-progress__label { display: none; }

  .ong-wizard-progress__num { width: 30px; height: 30px; font-size: 0.75rem; }

  .ong-wizard-progress__steps { gap: 0.15rem; }

  .ong-wizard-actions { flex-wrap: wrap; }

  .ong-wizard-actions .mss-btn {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.625rem 0.75rem;
    min-height: 44px;
  }

  .ong-wizard-confirmation__inner { padding: 2rem 1.25rem; }

  .ong-wizard-confirmation__inner h2 { font-size: 1.25rem; }

  .ong-wizard-confirmation__icon { width: 50px; height: 50px; font-size: 1.25rem; }

  .ong-radio, .ong-checkbox { padding: 0.5rem; }

  .ong-survey-result-block { padding: 1rem; }

  .ong-survey-result-table { font-size: 0.82rem; }
  .ong-survey-result-table th,
  .ong-survey-result-table td { padding: 0.4rem; }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .ong-wizard { max-width: 100%; }
}

/* ── Mise en page lignes / colonnes (éditeur visuel) ─────────────────────
   Une ligne = grille 12 colonnes. Chaque .ong-form-col occupe le nombre de
   colonnes défini par --ong-col-span (généré par l'éditeur visuel). */
.ong-form-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 14px;
}

.ong-form-col {
  grid-column: span var(--ong-col-span, 12);
  min-width: 0;
}

@media (max-width: 640px) {
  .ong-form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ong-form-col {
    grid-column: span 1;
  }
}
