/* ───────── Nav (statique, pages légales) ───────── */
.nav {
  padding: 16px 0;
  border-bottom: 1px solid #5C403310;
  position: relative;
  z-index: 10;
}
.nav .container {
  max-width: 760px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-back {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--primary); }

/* ───────── Conteneur légal ───────── */
.legal {
  padding: 3rem 0 5rem;
  position: relative;
  z-index: 1;
}
.legal .container { max-width: 760px; }
.legal h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.legal .last-updated {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
}
.legal h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.legal p { margin-bottom: 1rem; color: var(--text); }
.legal ul { margin: 0.5rem 0 1rem 1.25rem; color: var(--text); }
.legal ul li { margin-bottom: 0.4rem; }
.legal strong { font-weight: 600; }
.legal a { color: var(--primary); border-bottom: 1px solid #D4481220; transition: border-color 0.2s; }
.legal a:hover { border-color: var(--primary); }

/* ───────── Page formulaire (suppression-compte) ───────── */
.page { padding: 3rem 0 5rem; position: relative; z-index: 1; }
.page .container { max-width: 520px; }
.page-header { margin-bottom: 2rem; }
.page-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.page-header p { font-size: 0.9rem; color: var(--text-light); }

/* Bannière d'avertissement */
.warning {
  background: #FFF1EE;
  border: 1px solid #D448121A;
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.6;
}
.warning strong { font-weight: 600; display: block; margin-bottom: 0.25rem; }

/* Carte formulaire */
.form-card {
  background: var(--bg-card);
  border: 1px solid #5C403312;
  border-radius: 16px;
  padding: 2rem;
}
.form-group { margin-bottom: 1.25rem; }
.form-group:last-of-type { margin-bottom: 0; }

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.4rem;
}
input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #5C403320;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
input::placeholder { color: var(--text-light); opacity: 0.7; }
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px #D4481214; }
input[aria-invalid="true"] { border-color: var(--primary); }

textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #5C403320;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 140px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
textarea::placeholder { color: var(--text-light); opacity: 0.7; }
textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px #D4481214; }
textarea[aria-invalid="true"] { border-color: var(--primary); }

.char-counter {
  font-size: 0.78rem;
  color: var(--text-light);
  text-align: right;
  margin-top: 0.3rem;
}
.char-counter.near-limit { color: var(--primary); }

.label-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 400;
  margin-left: 0.35rem;
}

.field-error {
  font-size: 0.8rem;
  color: var(--primary);
  margin-top: 0.35rem;
  display: none;
}
.field-error.visible { display: block; }

/* Bouton de soumission */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.8rem 1.5rem;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-submit:hover:not(:disabled) { opacity: 0.92; transform: translateY(-1px) scale(1.02); }
.btn-submit:active:not(:disabled) { transform: scale(0.98); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Spinner */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn-submit.loading .spinner { display: block; }
.btn-submit.loading .btn-label { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Alertes */
.alert {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-top: 1.25rem;
  line-height: 1.5;
}
.alert.visible { display: block; }
.alert-success { background: #EDFAF3; border: 1px solid #22C55E30; color: #166534; }
.alert-error   { background: #FFF1EE; border: 1px solid #D448121A; color: #9B1A00; }
.alert strong  { font-weight: 600; display: block; margin-bottom: 0.2rem; }

/* ───────── Footer (pages légales) ───────── */
.footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid #5C403310;
  position: relative;
  z-index: 1;
}
.footer .container { max-width: 760px; }
.footer p { font-size: 0.78rem; color: var(--text-light); }
