/*
 * Modale de creation de compte (particulier/societe) — account_modal.php, incluse site-wide depuis
 * menu_site.php. Namespace sf-account-* ; reutilise les boutons .sf-assist-btn* (assistant-modal.css,
 * charge sur les memes pages) pour une charte identique entre les deux modales.
 */

.sf-account-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(var(--brand-ink-rgb, 25, 25, 29), 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.sf-account-overlay.is-open { display: flex; }

.sf-account-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: min(90vh, 720px);
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius, 1rem);
  box-shadow: 0 2px 8px rgb(24 24 27 / 0.06), 0 30px 60px -24px rgb(24 24 27 / 0.35);
  padding: 1.6rem 1.5rem;
  animation: sf-account-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes sf-account-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.sf-account-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  background: var(--brand-surface, #f6f7f9);
  color: var(--brand-ink, #19191d);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.sf-account-close:hover { background: var(--brand-border, #e9eaee); }
.sf-account-close svg { width: 1.05rem; height: 1.05rem; }

.sf-account-pane[hidden] { display: none; }

.sf-account-head { padding-right: 1.5rem; margin-bottom: 1.2rem; }
.sf-account-head-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 0.85rem; margin-bottom: 0.6rem;
  background: var(--brand-yellow, #fed530); color: var(--brand-ink, #19191d);
}
.sf-account-head-icon svg { width: 1.3rem; height: 1.3rem; }
.sf-account-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; color: var(--brand-ink, #19191d); }
.sf-account-head p { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--brand-muted, #6f7280); line-height: 1.5; }

.sf-account-type-choices { display: flex; flex-direction: column; gap: 0.65rem; }
.sf-account-type-btn {
  display: flex; align-items: center; gap: 0.85rem; width: 100%; text-align: left;
  border: 2px solid var(--brand-border, #e9eaee); background: #fff; border-radius: 1rem;
  padding: 0.85rem 1rem; cursor: pointer; transition: border-color 0.2s ease, background-color 0.2s ease;
}
.sf-account-type-btn:hover { border-color: rgba(var(--brand-yellow-rgb, 254, 213, 48), 0.5); }
.sf-account-type-btn.is-active { border-color: var(--brand-yellow, #fed530); background: rgba(var(--brand-yellow-rgb, 254, 213, 48), 0.08); }
.sf-account-type-icon {
  flex: 0 0 auto; width: 2.5rem; height: 2.5rem; border-radius: 0.7rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-surface, #f6f7f9); color: var(--brand-ink, #19191d);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.sf-account-type-icon svg { width: 1.15rem; height: 1.15rem; }
.sf-account-type-btn.is-active .sf-account-type-icon { background: var(--brand-yellow, #fed530); }
.sf-account-type-info { flex: 1 1 auto; min-width: 0; }
.sf-account-type-info strong { display: block; font-family: var(--font-display); font-size: 0.95rem; color: var(--brand-ink, #19191d); }
.sf-account-type-info span { display: block; margin-top: 0.15rem; font-size: 0.78rem; color: var(--brand-muted, #6f7280); }
.sf-account-type-check {
  flex: 0 0 auto; width: 1.5rem; height: 1.5rem; border-radius: 999px; border: 1.5px solid var(--brand-border, #e9eaee);
  display: flex; align-items: center; justify-content: center; color: transparent; transition: all 0.2s ease;
}
.sf-account-type-check svg { width: 0.85rem; height: 0.85rem; }
.sf-account-type-btn.is-active .sf-account-type-check { border-color: var(--brand-yellow, #fed530); background: var(--brand-yellow, #fed530); color: var(--brand-ink, #19191d); }

.sf-account-continue-btn { width: 100%; justify-content: center; margin-top: 1.2rem; }

.sf-account-form { display: flex; flex-direction: column; gap: 0.85rem; }
.sf-account-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.sf-account-field label { display: block; margin-bottom: 0.3rem; font-family: var(--font-sans); font-size: 0.78rem; font-weight: 600; color: var(--brand-muted, #6f7280); }
.sf-account-field input {
  width: 100%; padding: 0.65rem 0.85rem; border-radius: 0.65rem; border: 1.5px solid var(--brand-border, #e9eaee);
  font-family: var(--font-sans); font-size: 0.88rem; outline: none; background: #fff; color: inherit;
}
.sf-account-field input:focus { border-color: var(--brand-yellow, #fed530); }
.sf-account-form-hint { margin: -0.4rem 0 0; font-size: 0.74rem; color: var(--brand-muted, #6f7280); }

.sf-account-rgpd { display: flex; align-items: flex-start; gap: 0.55rem; font-size: 0.8rem; color: var(--brand-muted, #6f7280); line-height: 1.5; }
.sf-account-rgpd input { margin-top: 0.2rem; accent-color: var(--brand-yellow, #fed530); }

.sf-account-form-error { margin: 0; font-size: 0.82rem; color: #b3261e; }

.sf-account-submit-btn { width: 100%; justify-content: center; }
.sf-account-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.sf-account-back-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem; width: 100%;
  border: none; background: transparent; color: var(--brand-muted, #6f7280);
  font-family: var(--font-sans); font-weight: 600; font-size: 0.78rem; padding: 0.3rem; cursor: pointer;
}
.sf-account-back-btn svg { width: 0.85rem; height: 0.85rem; }
.sf-account-back-btn:hover { color: var(--brand-ink, #19191d); }

@media (max-width: 640px) {
  .sf-account-modal { max-height: 92vh; border-radius: 1.1rem 1.1rem 0 0; align-self: flex-end; }
  .sf-account-overlay { align-items: flex-end; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sf-account-modal { animation: none; }
}
