/* =====================================================================
   Surtea — Parcours de souscription (wizard multi-étapes)
   Inspiré Acheel, en mieux : sidebar live, conditionnels, mobile-first
   ===================================================================== */

/* ─── 1. Layout global ─── */
.souscription-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #F7FAFF 0%, #EEF4FE 100%);
  padding: 6rem 0 4rem;
}

@media (max-width: 768px) {
  .souscription-shell { padding: 4.5rem 0 2rem; }
}

.souscription-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 980px) {
  .souscription-wrap { grid-template-columns: 1fr; }
}

/* ─── 2. Header progress ─── */
.sub-progress {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}

.sub-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.sub-progress-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub-progress-title svg { color: var(--blue); }

.sub-progress-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.sub-progress-count strong {
  color: var(--blue);
  font-size: 1rem;
}

.sub-progress-bar {
  height: 8px;
  background: var(--bg-gray);
  border-radius: var(--r-full);
  overflow: hidden;
  position: relative;
}

.sub-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 100%);
  border-radius: var(--r-full);
  width: 0%;
  transition: width 0.5s cubic-bezier(.65,.05,.36,1);
  box-shadow: 0 0 12px rgba(30,150,252,0.4);
}

/* ─── 3. Carte étape principale ─── */
.sub-card {
  background: var(--white);
  border-radius: var(--r-2xl);
  padding: 2.25rem 2.5rem;
  box-shadow: var(--shadow-card);
  min-height: 480px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 640px) {
  .sub-card { padding: 1.5rem 1.25rem; border-radius: var(--r-xl); }
}

.sub-step {
  display: none;
  animation: stepIn 0.45s cubic-bezier(.32,.72,0,1);
}

.sub-step.is-active { display: block; }

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

.sub-step-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: var(--blue-tint);
  color: var(--blue);
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
}

.sub-step-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.4rem, 3.5vw, 1.85rem);
  color: var(--navy);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.sub-step-help {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
  line-height: 1.55;
}

.sub-step-help a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed var(--blue);
}

/* ─── 4. Cards de sélection (radios visuels) ─── */
.sub-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.sub-choices.cols-2 { grid-template-columns: repeat(2, 1fr); }
.sub-choices.cols-3 { grid-template-columns: repeat(3, 1fr); }
.sub-choices.cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 640px) {
  .sub-choices, .sub-choices.cols-3, .sub-choices.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

.sub-choice {
  position: relative;
  border: 2px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
}

.sub-choice:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.sub-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sub-choice.is-checked,
.sub-choice input:checked + * {
  /* placeholder */
}

.sub-choice:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-tint);
  box-shadow: var(--shadow-blue);
}

.sub-choice:has(input:checked)::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M3 8 L7 12 L13 4'/%3E%3C/svg%3E") center/14px no-repeat;
  border-radius: 50%;
}

.sub-choice-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.sub-choice-label {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.3;
}

.sub-choice-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Variante "ligne" pour réponses courtes oui/non */
.sub-choices.compact .sub-choice {
  padding: 0.85rem 1rem;
}
.sub-choices.compact .sub-choice-icon { display: none; }

/* ─── 5. Champs classiques (text/number/date) ─── */
.sub-field {
  margin-bottom: 1.1rem;
}

.sub-field-label {
  display: block;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}

.sub-field-label .req {
  color: var(--danger);
  margin-left: 2px;
}

.sub-field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  margin-bottom: 0;
}

.sub-input,
.sub-select,
.sub-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  background: var(--white);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.sub-input:focus,
.sub-select:focus,
.sub-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(30,150,252,0.12);
}

.sub-input.is-invalid,
.sub-select.is-invalid,
.sub-textarea.is-invalid {
  border-color: var(--danger);
  background: var(--danger-tint);
}

.sub-choice.is-invalid,
.sub-check.is-invalid {
  border-color: var(--danger);
  background: var(--danger-tint);
}

.sub-input::placeholder { color: var(--text-muted); }

.sub-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.sub-field-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

@media (max-width: 640px) {
  .sub-field-row, .sub-field-row-3 { grid-template-columns: 1fr; }
}

/* ─── 6. Stepper "number" custom ─── */
.sub-stepper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub-stepper-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  border: 2px solid var(--border-light);
  background: var(--white);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sub-stepper-btn:hover {
  border-color: var(--blue);
  background: var(--blue-tint);
}

.sub-stepper-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sub-stepper-input {
  width: 70px;
  text-align: center;
  padding: 0.7rem 0.3rem;
  border: 2px solid var(--border-light);
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
}

/* ─── 7. Checkboxes en cartes (multi-select dépendances/options) ─── */
.sub-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.sub-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--r-md);
  cursor: pointer;
  background: var(--white);
  transition: all 0.2s ease;
}

.sub-check:hover { border-color: var(--blue); }

.sub-check input { display: none; }

.sub-check-box {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-mid);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.sub-check:has(input:checked) {
  background: var(--blue-tint);
  border-color: var(--blue);
}

.sub-check:has(input:checked) .sub-check-box {
  background: var(--blue);
  border-color: var(--blue);
}

.sub-check:has(input:checked) .sub-check-box::after {
  content: '';
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M3 8 L7 12 L13 4'/%3E%3C/svg%3E") center/contain no-repeat;
}

.sub-check-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.sub-check-text {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.92rem;
  line-height: 1.3;
}

.sub-check-sub {
  display: block;
  font-weight: 500;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── 8. Toggle Franchise modulable ─── */
.franchise-toggle {
  background: linear-gradient(135deg, #F0F7FF 0%, #E6F1FE 100%);
  border: 1px solid var(--border-blue);
  border-radius: var(--r-lg);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.franchise-toggle-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 240px;
  flex: 1;
}

.franchise-toggle-label {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.franchise-toggle-label svg { color: var(--blue); }

.franchise-toggle-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.franchise-toggle-buttons {
  display: inline-flex;
  background: var(--white);
  border-radius: var(--r-md);
  padding: 4px;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

.franchise-btn {
  position: relative;
  cursor: pointer;
}

.franchise-btn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.franchise-btn-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: var(--r-sm);
  transition: all 0.2s ease;
  min-width: 110px;
  text-align: center;
}

.franchise-btn-content strong {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--navy);
  font-size: 1.1rem;
}

.franchise-btn-content small {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 1px;
}

.franchise-btn:has(input:checked) .franchise-btn-content {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-hover) 100%);
  box-shadow: var(--shadow-cta);
}

.franchise-btn:has(input:checked) .franchise-btn-content strong,
.franchise-btn:has(input:checked) .franchise-btn-content small {
  color: white;
}

@media (max-width: 540px) {
  .franchise-toggle { flex-direction: column; align-items: stretch; }
  .franchise-toggle-buttons { justify-content: stretch; }
  .franchise-btn { flex: 1; }
  .franchise-btn-content { min-width: 0; }
}

/* ─── Cards formule (Essentielle / Sérénité) ─── */
.sub-formules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}

.sub-formules.cols-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 860px) {
  .sub-formules,
  .sub-formules.cols-2 { grid-template-columns: 1fr; }
}

.sub-formule {
  position: relative;
  border: 2px solid var(--border-light);
  border-radius: var(--r-xl);
  padding: 1.75rem 1.5rem 1.5rem;
  background: var(--white);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.sub-formule:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.sub-formule input { display: none; }

.sub-formule:has(input:checked) {
  border-color: var(--blue);
  background: linear-gradient(180deg, var(--blue-tint) 0%, var(--white) 100%);
  box-shadow: var(--shadow-blue);
}

.sub-formule.featured::before {
  content: '★ Le + choisi';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: white;
  padding: 0.3rem 0.85rem;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-cta);
  white-space: nowrap;
}

.sub-formule-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0 0 0.25rem;
}

.sub-formule-tag {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.sub-formule-price {
  font-family: var(--font-heading);
  margin-bottom: 0.4rem;
}

.sub-formule-price strong {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.sub-formule-price-suffix {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 4px;
}

.sub-formule-annual {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.sub-formule-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  flex: 1;
}

.sub-formule-list li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.88rem;
  padding: 0.4rem 0;
  color: var(--navy);
}

.sub-formule-list li::before {
  content: '';
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: var(--green-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2335C593' stroke-width='3'%3E%3Cpath d='M3 8 L7 12 L13 4'/%3E%3C/svg%3E") center/10px no-repeat;
  border-radius: 50%;
  margin-top: 1px;
}

.sub-formule-list li.no::before {
  background: var(--bg-gray) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23B0BACA' stroke-width='3'%3E%3Cpath d='M4 4 L12 12 M12 4 L4 12'/%3E%3C/svg%3E") center/10px no-repeat;
}

.sub-formule-list li.no { color: var(--text-muted); }

/* Icône emoji devant chaque garantie */
.sub-formule-list .g-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  font-size: 0.95rem;
  line-height: 1;
  background: var(--blue-tint);
  border-radius: 6px;
  margin-right: 2px;
}

.sub-formule-list li.no .g-ico {
  background: var(--bg-gray);
  filter: grayscale(0.7);
  opacity: 0.6;
}

/* ─── Bouton "Aucun" pour étapes multi-select sans rien à cocher ─── */
.sub-skip-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}

.sub-skip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--white);
  border: 2px dashed var(--border-mid);
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.sub-skip:hover {
  border-color: var(--blue);
  background: var(--blue-tint);
  color: var(--blue);
}

.sub-skip svg { opacity: 0.6; }
.sub-skip:hover svg { opacity: 1; }

/* ─── 9. Navigation footer (Précédent / Suivant) ─── */
.sub-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  gap: 1rem;
}

.sub-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.2rem;
  background: transparent;
  border: 2px solid var(--border-light);
  border-radius: var(--r-md);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.sub-back:hover { border-color: var(--blue); color: var(--blue); }

.sub-back[disabled],
.sub-back.is-hidden {
  visibility: hidden;
}

.sub-next {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.75rem;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-hover) 100%);
  color: white;
  border: 0;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  box-shadow: var(--shadow-cta);
}

.sub-next:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(30,150,252,0.45); }
.sub-next:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ─── 10. Sidebar live (récap + prix) ─── */
.sub-sidebar {
  position: sticky;
  top: 100px;
  background: var(--white);
  border-radius: var(--r-2xl);
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
}

@media (max-width: 980px) {
  .sub-sidebar {
    position: static;
    margin-top: 1.25rem;
  }
}

.sub-sidebar-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub-sidebar-title svg { color: var(--blue); }

.sub-sidebar-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 1.1rem;
}

.sub-price-box {
  background: linear-gradient(135deg, var(--navy) 0%, var(--ink-2) 100%);
  color: white;
  border-radius: var(--r-lg);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.sub-price-box::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(30,150,252,0.25), transparent 70%);
  pointer-events: none;
}

.sub-price-label {
  font-size: 0.78rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.sub-price-amount {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0.2rem 0;
  line-height: 1;
}

.sub-price-amount.is-pending {
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0.8;
  padding: 0.6rem 0;
}

/* CRO : state "estimate" — fourchette indicative dès l'étape 1.
   Visuellement plus discret que le prix réel mais déjà concret (chiffre lisible). */
.sub-price-amount.is-estimate {
  font-size: 1.05rem;
  font-weight: 700;
  opacity: 0.95;
  padding: 0.3rem 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
  line-height: 1.2;
}
.sub-price-amount.is-estimate .sub-price-anchor-label {
  font-size: 0.85rem;
  font-weight: 500;
  font-style: italic;
  opacity: 0.85;
}
.sub-price-amount.is-estimate .sub-price-anchor-amount {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.sub-price-amount.is-estimate .sub-price-suffix {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.85;
}
.sub-price-annual em {
  font-style: italic;
  opacity: 0.8;
}
@media (max-width: 640px) {
  .sub-price-amount.is-estimate .sub-price-anchor-amount {
    font-size: 1.7rem;
  }
}

.sub-price-suffix {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.8;
}

.sub-price-annual {
  font-size: 0.78rem;
  opacity: 0.7;
  margin-top: 0.3rem;
}

.sub-recap {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sub-recap li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 0.86rem;
}

.sub-recap li:last-child { border-bottom: 0; }

.sub-recap-key {
  color: var(--text-muted);
  font-weight: 500;
}

.sub-recap-val {
  color: var(--navy);
  font-weight: 700;
  text-align: right;
}

.sub-recap-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
  padding: 1rem 0;
}

.sub-sidebar-trust {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-light);
}

.sub-sidebar-trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.sub-sidebar-trust-item svg {
  color: var(--green);
  flex-shrink: 0;
}

/* ─── 11. Récap final / confirmation ─── */
.sub-recap-block {
  background: var(--blue-tint);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.sub-recap-block h4 {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--navy);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub-recap-block dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.25rem;
  font-size: 0.88rem;
}

.sub-recap-block dt { color: var(--text-muted); font-weight: 500; }
.sub-recap-block dd { margin: 0; color: var(--navy); font-weight: 700; }

.sub-recap-edit {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px dashed var(--blue);
  cursor: pointer;
  background: none;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  padding: 0;
}

/* ─── 12. Étape de fin (success) ─── */
.sub-success {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.sub-success-icon {
  width: 80px;
  height: 80px;
  background: var(--green-tint);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  animation: popIn 0.5s cubic-bezier(.34,1.56,.64,1);
}

.sub-success-icon svg {
  color: var(--green);
  width: 38px;
  height: 38px;
}

@keyframes popIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.sub-success h2 {
  font-family: var(--font-heading);
  color: var(--navy);
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
}

.sub-success p {
  color: var(--text-body);
  font-size: 1.05rem;
  margin: 0 auto 1.5rem;
  max-width: 520px;
  line-height: 1.55;
}

.sub-success-next {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  max-width: 600px;
  margin: 1.25rem auto 0;
  padding: 1.25rem;
  background: var(--bg-cream);
  border-radius: var(--r-lg);
  text-align: left;
}

.sub-success-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.sub-success-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.sub-success-step-text {
  font-size: 0.85rem;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.4;
}

.sub-success-step-text small {
  display: block;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

/* ─── 13. Loader / placeholders ─── */
.sub-loading {
  text-align: center;
  padding: 3rem 0;
}

.sub-loader {
  display: inline-block;
  width: 48px;
  height: 48px;
  border: 4px solid var(--blue-tint);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── 14. Tooltip d'info ─── */
.sub-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  margin-left: 5px;
  cursor: help;
  position: relative;
}

.sub-info:hover::after {
  content: attr(data-info);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: normal;
  width: 240px;
  text-align: left;
  z-index: 10;
  box-shadow: var(--shadow-card);
}

/* ─── 15. Hidden helper + utilities ─── */
.sub-hidden { display: none !important; }

.sub-error {
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sub-error::before {
  content: '⚠';
  font-size: 0.9rem;
}

.sub-row-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Mobile fixes */
@media (max-width: 640px) {
  .sub-nav { flex-direction: row-reverse; justify-content: space-between; }
  .sub-next { padding: 0.85rem 1.25rem; font-size: 0.95rem; }
  .sub-back { padding: 0.75rem 1rem; font-size: 0.85rem; }
}

/* ─── 16. Autocomplete BAN (api-adresse.data.gouv.fr) ─── */
.sub-adresse-autocomplete {
  position: relative;
}

.adresse-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--white, #fff);
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: var(--r-md, 8px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.10);
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
}

.adresse-suggestion {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.9rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-light, #EDF2F7);
  font: inherit;
  font-size: 0.92rem;
  color: var(--text-body, #1E293B);
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.adresse-suggestion:last-child { border-bottom: 0; }

.adresse-suggestion:hover,
.adresse-suggestion.is-active,
.adresse-suggestion:focus {
  background: var(--blue-tint, #EBF4FF);
  color: var(--blue, #1E96FC);
  outline: none;
}

/* ─── 17. Toasts (remplace alert() — UX pro) ─── */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 280px;
  max-width: 380px;
  padding: 12px 14px 12px 16px;
  background: #fff;
  border-left: 4px solid var(--blue, #1E96FC);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.15);
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-body, #1E293B);
  animation: toastSlideIn 0.25s ease-out;
}

.toast.is-leaving {
  animation: toastSlideOut 0.25s ease-in forwards;
}

.toast-msg {
  flex: 1;
  white-space: pre-line;  /* respecte les \n du message */
  font-weight: 500;
}

.toast-close {
  flex-shrink: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-muted, #64748B);
  padding: 0 4px;
  margin-left: 4px;
}
.toast-close:hover { color: var(--text-body, #1E293B); }

.toast-error   { border-left-color: #DC2626; }
.toast-success { border-left-color: #10B981; }
.toast-warning { border-left-color: #F59E0B; }
.toast-info    { border-left-color: var(--blue, #1E96FC); }

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes toastSlideOut {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(110%); opacity: 0; }
}

@media (max-width: 640px) {
  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 12px;
    align-items: stretch;
  }
  .toast { max-width: none; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .toast, .toast.is-leaving { animation: none; }
}

/* ─── CRO 2026-05-25 — Layout fusion 2 colonnes pour "biens-a-assurer" ─── */
.sub-merge-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.sub-merge-col { min-width: 0; }
.sub-merge-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.65rem;
  letter-spacing: -0.01em;
}
/* Variante compacte pour les listes de checkboxes dans la fusion */
.sub-checks-compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}
.sub-checks-compact .sub-check {
  padding: 0.55rem 0.7rem;
  font-size: 0.86rem;
}
.sub-checks-compact .sub-check-icon { font-size: 1rem; }
.sub-checks-compact .sub-check-text small { display: none; }

/* Mobile : repasse en 1 colonne */
@media (max-width: 880px) {
  .sub-merge-row {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}
