.profile-page {
  min-height: 100vh;
  min-height: 100svh;
}

.profile-main {
  display: grid;
  gap: 28px;
}

.profile-hero,
.profile-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    rgba(10, 10, 18, 0.76);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.profile-hero::before,
.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(60, 242, 255, 0.08), transparent 32%),
    radial-gradient(circle at bottom left, rgba(255, 122, 184, 0.08), transparent 28%);
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 34px;
}

.profile-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.04;
}

.profile-lead {
  max-width: 62ch;
  margin: 0;
  font-size: 1.06rem;
}

.profile-session-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
}

.profile-session-dot {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--cyan));
  box-shadow:
    0 0 10px rgba(255, 122, 184, 0.34),
    0 0 16px rgba(60, 242, 255, 0.22);
}

.profile-session-card strong,
.profile-session-card p {
  margin: 0;
}

.profile-session-card strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.profile-session-card p {
  color: var(--muted);
  font-size: 0.94rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.profile-card {
  padding: 28px 24px 24px;
}

.profile-card-head {
  margin-bottom: 20px;
}

.profile-card-head .section-kicker {
  margin-bottom: 18px;
}

.profile-card-head h2 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.08;
}

.profile-card-head p {
  margin: 0;
}

.profile-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  gap: 8px;
}

.form-row label {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text);
}

.form-row input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(2, 7, 18, 0.85), rgba(4, 9, 22, 0.95)),
    rgba(0, 0, 0, 0.28);
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--cyan);
  font: inherit;
  font-weight: 650;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.form-row input::placeholder {
  color: rgba(185, 177, 190, 0.68);
  -webkit-text-fill-color: rgba(185, 177, 190, 0.68);
  font-weight: 500;
}

.form-row input:focus {
  outline: none;
  border-color: rgba(60, 242, 255, 0.35);
  box-shadow:
    0 0 0 1px rgba(60, 242, 255, 0.14),
    0 0 18px rgba(60, 242, 255, 0.08);
}

.form-row input:-webkit-autofill,
.form-row input:-webkit-autofill:hover,
.form-row input:-webkit-autofill:focus,
.form-row input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--cyan);
  box-shadow: 0 0 0 1000px rgba(5, 12, 24, 0.98) inset !important;
  border-color: rgba(60, 242, 255, 0.18);
  transition: background-color 9999s ease-in-out 0s;
}

.profile-field-hint {
  margin: -2px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.profile-readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-readonly-item {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.profile-readonly-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-readonly-item strong {
  color: var(--text);
  font-size: 0.98rem;
}

.profile-actions {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.profile-actions .portfolio-btn {
  width: 100%;
  justify-content: center;
}

.profile-status {
  min-height: 0;
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.profile-status:empty {
  display: none;
}

.profile-status:not(:empty) {
  display: block;
  min-height: 24px;
  margin-top: 2px;
}

.profile-status.is-error {
  color: #ff8ea2;
}

.profile-status.is-success {
  color: #8ef3ff;
}

.profile-status.is-loading {
  color: var(--cyan);
}

@media (max-width: 980px) {
  .profile-hero,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-session-card {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .profile-hero,
  .profile-card {
    border-radius: 22px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .profile-hero {
    padding: 24px 18px;
  }

  .profile-card {
    padding: 22px 16px 18px;
  }

  .profile-card-head h2 {
    font-size: 1.65rem;
  }

  .profile-readonly-grid {
    grid-template-columns: 1fr;
  }

  .form-row input {
    min-height: 50px;
    border-radius: 14px;
  }
}

/* =========================================================
   PROFILE NAVBAR — logout action
   ========================================================= */

.profile-logout-btn {
  appearance: none;
  border: 1px solid rgba(255, 77, 77, 0.18);
  background: rgba(255, 77, 77, 0.075);
  color: #ff5d6f;
  font: inherit;
  cursor: pointer;
}

.profile-logout-btn:hover {
  color: #ff7b8a;
  border-color: rgba(255, 77, 77, 0.34);
  background: rgba(255, 77, 77, 0.13);
  box-shadow: 0 0 14px rgba(255, 77, 77, 0.08);
}

.profile-logout-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 640px) {
  .profile-topnav {
    justify-content: center;
  }

  .profile-logout-btn {
    order: -1;
  }
}

/* Self-service : alignement des nouveaux contrôles et zone sensible. */
.profile-email-card, .profile-danger-zone { min-width:0; }
.profile-danger-zone { border-color:rgba(235,108,130,.48); }
.profile-danger-button { background:#652536!important; border:1px solid #e7899a!important; color:#fff!important; }
.profile-danger-button:disabled { background:#36323c!important; border-color:#6a5964!important; color:#a6a2aa!important; cursor:not-allowed; opacity:.55; }
.profile-delete-dialog { margin:auto; max-height:90vh; overflow-y:auto; }
.profile-delete-dialog .profile-form { margin-top:15px; }
.profile-card .account-form { margin-top:15px; }
.profile-card .account-recovery { overflow-wrap:anywhere; }
.profile-card .account-hidden { display:none!important; }
.profile-card .account-form input { box-sizing:border-box; }
.profile-card a { color:#89eaff; }
