/* Parcours « Protéger mon domaine » — composants propres à cet écran.
   Palette : variables globales de style.css (--indigo, --surface, --text…).
   Maquette de référence validée par Amre le 2026-10-06. */

.pd-page {
  padding-top: 120px; /* dégage la barre fixe (comme .auth-page) */
  padding-bottom: 60px;
}

.pd-intro {
  max-width: 640px;
  margin: 0 auto 28px;
  text-align: center;
}

.pd-intro h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 8px;
}

.pd-intro p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.pd-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px var(--shadow);
  overflow: hidden;
}

.pd-wizard-inner {
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

/* ---------- Jauge d'étapes ---------- */
.pd-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}
.pd-dots span {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--border);
}
.pd-dots span.done {
  background: var(--indigo);
}
.pd-dots span.current {
  background: var(--indigo-light, var(--indigo));
}

/* ---------- Icône d'état ---------- */
.pd-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 14px;
}
.pd-icon.accent {
  background: var(--indigo-50);
  color: var(--indigo);
}
.pd-icon.success {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
}
.pd-icon.warning {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
}
.pd-icon.danger {
  background: rgba(218, 31, 31, 0.1);
  color: var(--red);
}

.pd-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.pd-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 18px;
}

/* ---------- Champ domaine (réutilise .form-group de style.css) ---------- */
.pd-field-error {
  color: var(--red);
  font-size: 0.8rem;
  margin-top: 6px;
  display: none;
}
.pd-field-error.show {
  display: block;
}

select.pd-select {
  width: 100%;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: 10px 36px 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%2364748B'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* ---------- Boutons additionnels (en plus de .btn/.btn-primary/.btn-secondary/.btn-ghost) ---------- */
.pd-btn-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
}
.pd-link-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 0;
  text-align: left;
  cursor: pointer;
  align-self: flex-start;
}
.pd-link-btn:hover {
  color: var(--indigo);
}

.pd-spacer {
  flex: 1;
}

/* ---------- Case à cocher d'avancement (détection / vérification) ---------- */
.pd-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 6px 0 10px;
}
.pd-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}
.pd-check-row.muted {
  color: var(--text-secondary);
}
.pd-check-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 2px solid var(--border);
  color: transparent;
}
.pd-check-dot.pending {
  border-color: var(--border);
}
.pd-check-dot.spin {
  border: 2px solid var(--border);
  border-top-color: var(--indigo);
  animation: pd-spin 0.8s linear infinite;
}
.pd-check-dot.ok {
  background: #059669;
  border-color: #059669;
  color: #fff;
}
@keyframes pd-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Carte hébergeur détecté ---------- */
.pd-host-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: var(--surface);
  margin-bottom: 14px;
}
.pd-host-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--indigo);
}
.pd-host-name {
  font-weight: 700;
  font-size: 0.98rem;
}
.pd-host-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.pd-override {
  display: none;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.pd-override.show {
  display: block;
}

/* ---------- Informations et réassurance ---------- */
.pd-info-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface);
  margin-bottom: 14px;
}
.pd-info-card .row {
  display: flex;
  gap: 10px;
  font-size: 0.84rem;
  line-height: 1.5;
  margin-bottom: 8px;
}
.pd-info-card .row:last-child {
  margin-bottom: 0;
}
.pd-info-card .row svg {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  color: #059669;
}

.pd-reassure {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--indigo-50);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.8rem;
  color: var(--text);
  margin-top: 16px;
  line-height: 1.5;
}
.pd-reassure svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--indigo);
}

/* ---------- Valeurs DNS à copier ---------- */
.pd-record-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  background: var(--surface);
}
.pd-record-title {
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.pd-record-note {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-top: 6px;
}
.pd-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pd-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 6px 6px 12px;
  font-size: 0.8rem;
}
.pd-chip b {
  font-weight: 600;
  word-break: break-all;
}
.pd-chip-copy {
  border: none;
  background: var(--indigo-50);
  color: var(--indigo);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.pd-chip-copy.copied {
  background: #059669;
  color: #fff;
}

/* ---------- Récapitulatif de la configuration automatique (avant écriture) ---------- */
.pd-recap-label {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.pd-recap-change {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.84rem;
}
.pd-recap-change .old {
  color: var(--text-secondary);
  text-decoration: line-through;
}
.pd-recap-change .arrow {
  color: var(--text-secondary);
}
.pd-recap-note {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.pd-reassure.warn {
  background: rgba(217, 119, 6, 0.12);
  color: var(--text);
}
.pd-reassure.warn svg {
  color: var(--warning);
}

/* ---------- Récapitulatif final ---------- */
.pd-recap-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface);
  margin: 16px 0;
}
.pd-recap-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.pd-recap-row:last-child {
  border-bottom: none;
}
.pd-recap-row b {
  font-weight: 600;
}
/* Phrase courante (avec du gras au milieu) : en flex, chaque morceau deviendrait une colonne. */
.pd-recap-row.pd-recap-texte {
  display: block;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.pd-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  border-radius: 50px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

@media (max-width: 560px) {
  .pd-card {
    max-width: none;
    border-radius: var(--radius);
  }
  .pd-wizard-inner {
    padding: 22px 18px 18px;
    overflow-wrap: anywhere;
  }
  .pd-link-btn {
    min-height: 44px;
  }
  .pd-chip-copy {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
  .pd-page .btn {
    min-height: 44px;
  }
  select.pd-select {
    font-size: 16px;
  }
}
