/* MSPharma Stripe — Formulaire inscription
   Aesthetic: Clean medical / institutional — deep navy + mint accent
   Font: Système + custom via @import */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
  --msph-navy:      #0f2240;
  --msph-navy-mid:  #1a3560;
  --msph-mint:      #00c4a1;
  --msph-mint-light:#e6faf7;
  --msph-border:    #d4dce8;
  --msph-bg:        #f7f9fc;
  --msph-white:     #ffffff;
  --msph-text:      #1a2a40;
  --msph-muted:     #6b7b94;
  --msph-error:     #e03e52;
  --msph-error-bg:  #fdf0f2;
  --msph-success:   #00a882;
  --msph-success-bg:#e6faf7;
  --msph-warn:      #f59e0b;
  --msph-warn-bg:   #fffbeb;
  --msph-radius:    10px;
  --msph-shadow:    0 2px 16px rgba(15,34,64,0.10);
  --msph-transition: 0.18s ease;
}

/* ---------- Wrapper ---------- */
.msph-wrap {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--msph-text);
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Steps ---------- */
.msph-step {
  background: var(--msph-white);
  border: 1.5px solid var(--msph-border);
  border-radius: var(--msph-radius);
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color var(--msph-transition), box-shadow var(--msph-transition);
}
.msph-step:focus-within {
  border-color: var(--msph-mint);
  box-shadow: var(--msph-shadow);
}
.msph-step--locked {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.3);
}
.msph-step--unlocked {
  opacity: 1;
  pointer-events: auto;
  filter: none;
}

/* ---------- Step header ---------- */
.msph-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--msph-bg);
  border-bottom: 1px solid var(--msph-border);
}
.msph-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--msph-navy);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.msph-step--locked .msph-step-num {
  background: var(--msph-muted);
}
.msph-step-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--msph-navy);
}

/* ---------- Step body ---------- */
.msph-step-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- Labels ---------- */
.msph-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--msph-navy);
  margin-bottom: 4px;
}
.msph-req { color: var(--msph-error); }
.msph-hint {
  font-weight: 400;
  color: var(--msph-muted);
  font-size: 12px;
}

/* ---------- Inputs ---------- */
.msph-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--msph-border);
  border-radius: 7px;
  font-family: inherit;
  font-size: 15px;
  color: var(--msph-text);
  background: var(--msph-white);
  transition: border-color var(--msph-transition), box-shadow var(--msph-transition);
  box-sizing: border-box;
  outline: none;
}
.msph-input:focus {
  border-color: var(--msph-mint);
  box-shadow: 0 0 0 3px rgba(0,196,161,0.15);
}
.msph-input[readonly] {
  background: var(--msph-bg);
  color: var(--msph-muted);
  cursor: default;
}
.msph-input::placeholder { color: #b0bbc9; }

/* ---------- Row ---------- */
.msph-row {
  display: flex;
  gap: 10px;
}
.msph-row .msph-input { flex: 1; }

/* ---------- Buttons ---------- */
.msph-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 7px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--msph-transition), transform 0.1s, opacity var(--msph-transition);
  white-space: nowrap;
  background: var(--msph-navy);
  color: #fff;
}
.msph-btn:hover:not(:disabled) {
  background: var(--msph-navy-mid);
}
.msph-btn:active:not(:disabled) { transform: scale(0.98); }
.msph-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.msph-btn--primary {
  background: var(--msph-mint);
  color: var(--msph-navy);
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  margin-top: 4px;
}
.msph-btn--primary:hover:not(:disabled) {
  background: #00b090;
  color: #fff;
}

/* spinner dans le bouton */
.msph-btn--loading .msph-btn-icon { display: none; }
.msph-btn--loading::after {
  content: '';
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: msph-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes msph-spin { to { transform: rotate(360deg); } }

/* ---------- Messages ---------- */
.msph-msg {
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 13.5px;
  line-height: 1.5;
}
.msph-msg--error {
  background: var(--msph-error-bg);
  color: var(--msph-error);
  border: 1px solid rgba(224,62,82,0.2);
}
.msph-msg--success {
  background: var(--msph-success-bg);
  color: var(--msph-success);
  border: 1px solid rgba(0,168,130,0.2);
}
.msph-msg--warn {
  background: var(--msph-warn-bg);
  color: #92400e;
  border: 1px solid rgba(245,158,11,0.25);
}

/* ---------- Pharmacy card ---------- */
.msph-pharmacy-card {
  background: var(--msph-mint-light);
  border: 1.5px solid var(--msph-mint);
  border-radius: 8px;
  padding: 14px 16px;
}
.msph-pharmacy-card-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--msph-navy);
  margin-bottom: 4px;
}
.msph-pharmacy-card-detail {
  font-size: 13px;
  color: var(--msph-navy-mid);
  font-family: 'DM Mono', monospace;
}
.msph-pharmacy-card-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.msph-badge--active {
  background: var(--msph-success-bg);
  color: var(--msph-success);
}
.msph-badge--inactive {
  background: #f3f4f6;
  color: var(--msph-muted);
}
.msph-badge--already {
  background: var(--msph-warn-bg);
  color: #92400e;
}

/* ---------- Support ---------- */
.msph-support {
  font-size: 13px;
  color: var(--msph-muted);
  text-align: center;
  margin-top: 4px;
}
.msph-support a {
  color: var(--msph-navy);
  text-decoration: none;
  font-weight: 500;
}
.msph-support a:hover { text-decoration: underline; }

/* ---------- Secure notice ---------- */
.msph-secure-notice {
  font-size: 12px;
  color: var(--msph-muted);
  text-align: center;
  margin: 0;
  padding: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .msph-row { flex-direction: column; }
  .msph-btn { width: 100%; }
  .msph-step-body { padding: 14px; }
}
