/* ============================================================
   register-patient.css — page /register/patient (Variant C)
   Préfixe .rp-* — zéro collision avec custom.css / style.css
   ============================================================ */

/* ---------- Page wrapper — carte arrondie centrée ---------- */
.rp-page {
  background: #f4f4f4;
  padding: 24px 32px;
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rp-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  width: 100%;
  max-width: 980px;
  min-height: 580px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 32px rgba(0, 0, 0, .10);
}

/* ---------- Brand panel (gauche) ---------- */
.rp-brand-panel {
  position: relative;
  background: linear-gradient(160deg, #a03863 0%, #6e1f44 100%);
  color: #fff;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rp-brand-body {
  margin-top: 0;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}
.rp-brand-title {
  font-family: 'lane_-_narrowregular', Oswald, 'Open Sans', sans-serif;
  font-weight: 500;
  font-size: 25px;
  line-height: 1.1;
  margin: 0 0 10px;
  color: #fff;
}
.rp-brand-lead {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .85);
  margin: 0;
}

.rp-brand-features {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rp-brand-features li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.rp-brand-features li > div {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .88);
}
.rp-brand-features li strong {
  color: #fff;
  font-weight: 700;
  display: block;
  margin-bottom: 1px;
  font-size: 12px;
}
.rp-feat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rp-feat-icon .fa { font-size: 14px; }

/* ---------- Form panel (gauche) ---------- */
.rp-form-panel {
  padding: 22px 44px 18px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.rp-form-head { margin-bottom: 12px; max-width: 520px; }
.rp-form-head h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1b2734;
  margin: 0;
}
.rp-form-head p {
  font-size: 12px;
  color: #979797;
  margin: 4px 0 0;
}

/* ---------- Segmented switch ---------- */
.rp-segmented {
  display: inline-flex;
  padding: 3px;
  background: #f5f5f5;
  border-radius: 999px;
  gap: 2px;
  margin-bottom: 14px;
}
.rp-seg-btn {
  background: transparent;
  border: 0;
  padding: 7px 16px;
  font-size: 11px;
  font-weight: 700;
  color: #555;
  cursor: pointer;
  border-radius: 999px;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.rp-seg-btn.active {
  background: #a03863;
  color: #fff;
  box-shadow: 0 1px 3px rgba(160, 56, 99, .3);
}
.rp-seg-btn .fa { margin-right: 5px; font-size: 11px; }

/* ---------- Mode panels ---------- */
.rp-mode-panel { max-width: 520px; }

/* ---------- Labels & champs ---------- */
.rp-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #555;
  margin-bottom: 4px;
  text-transform: none;
  letter-spacing: 0;
}
.rp-req { color: #dd4b39; }

.rp-input,
.rp-select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: #fff;
  color: #414141;
  border: 1px solid #d2d6de;
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  box-sizing: border-box;
}
.rp-input::placeholder { color: #bdbdbd; }
.rp-input:focus,
.rp-select:focus {
  border-color: #a03863;
  box-shadow: 0 0 0 3px rgba(160, 56, 99, .12);
}
.rp-input:disabled,
.rp-input[readonly] {
  background: #f7f7f7;
  color: #979797;
}

/* ---------- Grille de champs ---------- */
.rp-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 520px;
}
.rp-field-full { grid-column: 1 / -1; }
.rp-field { display: flex; flex-direction: column; }

/* ---------- Téléphone ---------- */
.rp-phone-row { display: flex; gap: 6px; }
.rp-phone-row .rp-input { flex: 1; min-width: 0; }
.rp-phone-cc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  height: 38px;
  background: #f5f5f5;
  border: 1px solid #d2d6de;
  border-radius: 7px;
  color: #555;
  font-size: 12px;
  font-weight: 600;
  min-width: 72px;
  white-space: nowrap;
}
.rp-phone-cc .fa { color: #a03863; font-size: 14px; }
.rp-phone-cc .js-phone-flag { width: 18px; height: 18px; border-radius: 2px; flex-shrink: 0; }

.rp-help {
  color: #979797;
  font-size: 10px;
  margin: 4px 0 0;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.rp-help .fa { color: #a03863; margin-top: 1px; }

/* ---------- Wrapper œil mot de passe ---------- */
.rp-pw-wrap {
  position: relative;
}
.rp-pw-wrap .rp-input {
  padding-right: 38px;
}
.rp-pw-eye {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #979797;
  font-size: 14px;
  line-height: 1;
  transition: color .15s;
}
.rp-pw-eye:hover { color: #a03863; }
.rp-pw-eye.is-visible { color: #a03863; }

/* ---------- Jauge mot de passe ---------- */
.rp-pw-strength {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}
.rp-pw-strength span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: #eee;
  transition: background .2s ease;
}
.rp-pw-strength.lvl-1 span:nth-child(-n+1) { background: #dd4b39; }
.rp-pw-strength.lvl-2 span:nth-child(-n+2) { background: #f39c12; }
.rp-pw-strength.lvl-3 span:nth-child(-n+3) { background: #a03863; }
.rp-pw-strength.lvl-4 span                  { background: #00a65a; }

/* ---------- Actions & CGU ---------- */
.rp-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  max-width: 520px;
}
.rp-checks { display: flex; flex-direction: column; gap: 6px; }
.rp-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: #414141;
  line-height: 1.4;
  cursor: pointer;
}
.rp-check input {
  margin-top: 2px;
  accent-color: #a03863;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.rp-check a { color: #a03863; font-weight: 600; }

.rp-btn-primary {
  background: #a03863;
  color: #fff;
  border: 0;
  border-radius: 7px;
  padding: 10px 24px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .15s ease;
  font-family: inherit;
}
.rp-btn-primary:hover  { background: #872f57; }
.rp-btn-primary:disabled { background: #d2c2ca; cursor: not-allowed; }
.rp-btn-large { padding: 11px 24px; font-size: 13px; width: 228px; display: block; margin: 0 auto; }

.rp-recaptcha-notice {
  color: #979797;
  font-size: 10px;
  text-align: center;
  margin: 2px 0 0;
}
.rp-recaptcha-notice a { color: #555; text-decoration: underline; }

/* ---------- Bloc référence ---------- */
.rp-ref-block {
  background: #fdf3f7;
  border: 1px dashed #a03863;
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 520px;
}
.rp-ref-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.rp-ref-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #a03863;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.rp-ref-title {
  font-size: 14px;
  font-weight: 700;
  color: #1b2734;
  margin: 0 0 3px;
}
.rp-ref-sub {
  font-size: 11px;
  color: #555;
  margin: 0;
  line-height: 1.4;
}
.rp-ref-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.rp-ref-row .rp-input {
  flex: 1;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  letter-spacing: .05em;
}
.rp-ref-alt {
  font-size: 11px;
  color: #979797;
  margin-top: 6px;
  max-width: 520px;
}
.rp-ref-alt a { color: #a03863; font-weight: 700; cursor: pointer; }

/* Slot pour le form injecté via AJAX (mode référence) */
.reference-register-patient-form-wrapper {
  margin-top: 12px;
  max-width: 520px;
}

/* ---------- Erreurs flash ---------- */
.rp-flash-error {
  background: #fdf3f7;
  border-left: 3px solid #dd4b39;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: #dd4b39;
  margin-bottom: 10px;
  max-width: 520px;
}

/* ---------- Erreurs Symfony form ---------- */
.rp-field-error { color: #dd4b39; font-size: 10px; margin-top: 3px; }
.rp-input.error, .rp-select.error { border-color: #dd4b39; }

/* ---------- reCAPTCHA — réduit au minimum visuel ---------- */
.g-recaptcha { transform: scale(0.88); transform-origin: left top; }

/* ============================================================
   Modal d'activation — États 1 & 2
   ============================================================ */
.rp-activation-modal .modal-dialog {
  max-width: 400px;
  margin: 60px auto;
}
.rp-activation-modal .modal-content {
  border: none;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .18);
  padding: 0;
  background: #fff;
}
.rp-activation-modal .message-content-wrapper { padding: 0; }

/* Header wine gradient */
.rp-modal-hdr {
  background: linear-gradient(135deg, #a03863 0%, #6e1f44 100%);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
}
.rp-modal-hdr .fa { margin-right: 6px; font-size: 15px; }
.rp-modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, .75);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
  font-family: inherit;
}
.rp-modal-close:hover { color: #fff; }

/* Corps */
.rp-modal-body { padding: 18px 20px 22px; }

/* Bloc référence patient */
.rp-modal-ref-box {
  background: #fdf3f7;
  border: 1px solid rgba(160, 56, 99, .2);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.rp-modal-ref-label {
  font-size: 11px;
  font-weight: 700;
  color: #a03863;
  margin: 0 0 3px;
}
.rp-modal-ref-label .fa { margin-right: 4px; }
.rp-modal-ref-num {
  font-size: 14px;
  font-weight: 700;
  color: #1b2734;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  letter-spacing: .04em;
  margin: 0 0 3px;
  word-break: break-all;
}
.rp-modal-ref-hint {
  font-size: 11px;
  color: #a03863;
  margin: 0;
  line-height: 1.4;
}

/* Texte explicatif */
.rp-modal-text {
  font-size: 13px;
  color: #414141;
  line-height: 1.55;
  margin: 0 0 14px;
}
.rp-modal-text strong { color: #1b2734; }

/* Bouton SMS (état 1) */
.rp-modal-sms-btn {
  display: block;
  width: 100%;
  background: #a03863;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background .15s;
  font-family: inherit;
  letter-spacing: .03em;
}
.rp-modal-sms-btn .fa { margin-right: 8px; }
.rp-modal-sms-btn:hover { background: #872f57; }

/* Ligne code + confirmer (état 2) */
.rp-modal-code-form { margin-bottom: 10px; }
.rp-modal-code-row { display: flex; gap: 8px; }
.rp-modal-code-row .rp-input { flex: 1; min-width: 0; letter-spacing: .08em; font-size: 15px; }
.rp-modal-code-row .rp-btn-primary { white-space: nowrap; flex-shrink: 0; }

/* Lien renvoyer */
.rp-modal-resend { font-size: 12px; color: #979797; margin: 8px 0 0; }
.rp-modal-resend a { color: #a03863; font-weight: 600; cursor: pointer; text-decoration: none; }
.rp-modal-resend a:hover { text-decoration: underline; }
.rp-modal-resend .fa { margin-right: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .rp-page { padding: 16px; }
  .rp-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    max-width: 520px;
  }
  .rp-brand-panel {
    padding: 24px 28px;
    min-height: 180px;
    order: 2;
  }
  .rp-form-panel { order: 1; }
}
@media (max-width: 600px) {
  .rp-page { padding: 12px; align-items: flex-start; }
  .rp-grid { border-radius: 12px; max-width: 100%; }
  .rp-form-panel { padding: 18px 16px; }
  .rp-fields { grid-template-columns: 1fr; gap: 10px; }
  .rp-form-head h2 { font-size: 19px; }
  .rp-segmented { width: 100%; }
  .rp-seg-btn { flex: 1; padding: 7px 4px; font-size: 10px; }
}
