/* =============================================================
   TUNNEL SOUSCRIPTION MRH — MOST
   À ajouter à votre style.css existant (ou charger séparément)
   Réutilise les variables et classes déjà définies dans main.css
   ============================================================= */

/* ── Container du tunnel (modal ET dashboard) ──────────────────── */
.mrh-tunnel {
  font-family: var(--font-body);
  color: var(--text);
}

/* ── Barre de progression ──────────────────────────────────────── */
.mrh-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding: 0 4px;
  position: relative;
}

.mrh-progress::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 28px;
  right: 28px;
  height: 2px;
  background: var(--line);
  z-index: 0;
}

.mrh-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 1;
  flex: 1;
}

.mrh-progress__dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.25s ease;
}

.mrh-progress__label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.mrh-progress__step.is-active .mrh-progress__dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(69, 96, 203, 0.15);
}

.mrh-progress__step.is-active .mrh-progress__label { color: var(--primary); }

.mrh-progress__step.is-completed .mrh-progress__dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.mrh-progress__step.is-completed .mrh-progress__dot span { display: none; }
.mrh-progress__step.is-completed .mrh-progress__dot::after { content: '✓'; }

/* ── Étapes ─────────────────────────────────────────────────────── */
.mrh-step { display: none; }
.mrh-step.is-active { display: block; }

.mrh-step__title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--text);
}

.mrh-step__subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px;
}

/* ── Grille de champs (réutilise most-form-grid) ───────────────── */
.mrh-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 16px;
  margin: 20px 0;
}

.mrh-grid--full { grid-column: 1 / -1; }

.mrh-field { display: flex; flex-direction: column; gap: 6px; }
.mrh-field label { font-size: 13px; font-weight: 600; color: var(--text); }
.mrh-field label .req { color: #ff4d6d; margin-left: 2px; }
.mrh-field small { font-size: 11px; color: var(--muted); }

/* Inputs : on réutilise most-form-input pour rester identique au reste du site */
.mrh-field input,
.mrh-field select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: var(--font-body);
  color: var(--text);
  background: #f8f9fb;
  transition: border-color 0.22s, background 0.22s;
  box-sizing: border-box;
}

.mrh-field input:focus,
.mrh-field select:focus {
  outline: none;
  background: #fff;
  border-color: var(--primary);
}

.mrh-field input.has-error,
.mrh-field select.has-error { border-color: #ff4d6d; }

/* ── Radio cards (choix visuels) ────────────────────────────────── */
.mrh-radio-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mrh-radio-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  background: #f8f9fb;
  transition: all 0.2s;
  user-select: none;
}

.mrh-radio-card input { position: absolute; opacity: 0; width: 0; height: 0; }

.mrh-radio-card:has(input:checked) {
  border-color: var(--primary);
  background: rgba(69, 96, 203, 0.06);
  color: var(--primary);
}

.mrh-radio-card:hover { border-color: var(--primary); }

/* ── Checkbox simple ─────────────────────────────────────────────── */
.mrh-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text);
}

.mrh-checkbox-row input { width: auto; cursor: pointer; accent-color: var(--primary); }

/* ── Boutons (réutilise .btn / .btn-primary du thème) ──────────── */
.mrh-step__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.mrh-btn-back {
  margin-right: auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 14px;
  padding: 11px 20px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.mrh-btn-back:hover { border-color: var(--muted); color: var(--text); }

/* ── Comparateur de formules ────────────────────────────────────── */
.mrh-compare-wrap { overflow-x: auto; margin: 16px 0; }

.mrh-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mrh-compare-table th,
.mrh-compare-table td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: center;
}

.mrh-compare-row-label {
  text-align: left !important;
  font-weight: 600;
  color: var(--text);
  background: #f8f9fb;
  white-space: nowrap;
  min-width: 160px;
  font-size: 12.5px;
}

.mrh-compare-col { background: #f8f9fb; min-width: 130px; transition: background 0.15s; }
.mrh-compare-col.is-selected { background: rgba(69, 96, 203, 0.06) !important; }

.mrh-compare-formule-nom { font-family: var(--font-heading); font-weight: 500; font-size: 13px; }
.mrh-compare-formule-code {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  font-family: var(--font-heading);
  background: var(--primary);
  color: #fff;
  padding: 2px 9px;
  border-radius: 999px;
}

.mrh-compare-row-tarif td { font-family: var(--font-heading); font-size: 17px; font-weight: 500; color: var(--primary); }
.mrh-compare-row-tarif td span { font-size: 11px; font-weight: 400; color: var(--muted); }

.mrh-compare-cell-incluse { color: #166534; font-weight: 600; background: #ecfdf3; font-size: 12px; }
.mrh-compare-cell-absent { color: #c4c9d3; }

.mrh-compare-row-tarifant td { background: #fffaf0; }
.mrh-compare-row-tarifant select { width: 100%; font-size: 12px; padding: 6px 8px; border-radius: 8px; border: 1.5px solid var(--line); }

.mrh-option-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 10px;
  cursor: pointer;
  background: #eef1f4;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 500;
  transition: background 0.15s;
}

.mrh-option-toggle:hover { background: #e2e6ed; }
.mrh-option-toggle input { width: auto; margin: 0; cursor: pointer; }
.mrh-option-toggle:has(input:checked) { background: var(--primary); color: #fff; }

.mrh-btn-choisir {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.mrh-btn-choisir:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ── Récap formule choisie ──────────────────────────────────────── */
.mrh-recap-box {
  background: rgba(69, 96, 203, 0.06);
  border: 1.5px solid var(--primary);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.mrh-recap-box strong { font-family: var(--font-heading); }

.mrh-recap-change {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 12.5px;
  text-decoration: underline;
  padding: 0;
}

/* ── Loading ─────────────────────────────────────────────────────── */
.mrh-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 0;
  gap: 14px;
  color: var(--muted);
}

.mrh-loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: mrh-spin 0.8s linear infinite;
}

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

/* ── Confirmation finale ─────────────────────────────────────────── */
.mrh-confirmation { text-align: center; padding: 40px 20px; }
.mrh-confirmation__icon { font-size: 48px; margin-bottom: 14px; }
.mrh-confirmation h2 { font-family: var(--font-heading); font-size: 22px; font-weight: 500; margin: 0 0 10px; }
.mrh-confirmation p { color: var(--muted); font-size: 14.5px; }

.mrh-confirmation__details {
  margin-top: 18px;
  padding: 16px 20px;
  background: #f8f9fb;
  border-radius: 14px;
  display: inline-block;
  text-align: left;
  font-size: 13.5px;
}

/* ── Fallback (exclusion / pas de devis en ligne) ───────────────── */
.mrh-fallback { text-align: center; padding: 44px 20px; }
.mrh-fallback__icon { font-size: 40px; margin-bottom: 12px; }
.mrh-fallback p { font-size: 15px; line-height: 1.6; max-width: 440px; margin: 0 auto; color: var(--text); }
.mrh-fallback strong { color: var(--primary); }

/* ── Modale spécifique MRH (taille différente du login) ─────────── */
#most-overlay-mrh .most-modal {
  max-width: 760px;
}

@media (max-width: 720px) {
  .mrh-grid { grid-template-columns: 1fr; }
  .mrh-grid--full { grid-column: 1; }
  .mrh-progress__label { display: none; }
  #most-overlay-mrh .most-modal { padding: 24px 18px; }
}

/* ── Intégration dashboard (page non-modale) ────────────────────── */
.mrh-dashboard-page {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 820px;
}

@media (max-width: 720px) {
  .mrh-dashboard-page { padding: 20px; border-radius: var(--radius-md); }
}
