/* Styles de la page Profil Utilisateur */

.profile-hero {
  background: linear-gradient(135deg, #0B2447 0%, #15436b 60%, #1B6B82 100%);
  color: #fff;
  padding: 50px 0 40px;
  position: relative;
  z-index: 2;
  overflow-x: clip;
  overflow-y: visible;
}

.profile-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 40px solid rgba(28, 200, 216, 0.15);
  clip-path: inset(60px 0 0);
  pointer-events: none;
}

.profile-header-card {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.profile-avatar-control {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-large {
  position: relative;
  width: 90px;
  height: 90px;
  padding: 0;
  border-radius: 50%;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  cursor: pointer;
  font-family: inherit;
}

.profile-avatar-large:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.profile-avatar-large img {
  display: none;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar-large.has-image img {
  display: block;
}

.profile-avatar-large.has-image #profile-avatar-initials {
  display: none;
}

.profile-avatar-large .profile-avatar-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(55, 65, 81, 0.68);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.profile-avatar-large:hover .profile-avatar-overlay,
.profile-avatar-large:focus-visible .profile-avatar-overlay {
  opacity: 1;
}

.profile-avatar-actions {
  position: absolute;
  z-index: 5;
  top: calc(100% + 10px);
  left: 50%;
  width: 190px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  transform: translateX(-50%);
}

.profile-avatar-actions[hidden] {
  display: none;
}

.profile-avatar-action,
.profile-avatar-actions-close {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
}

.profile-avatar-action:hover,
.profile-avatar-actions-close:hover {
  background: #f1f6fa;
}

.profile-avatar-action.delete {
  color: #b42318;
}

.profile-avatar-action.delete[hidden] {
  display: none;
}

.profile-avatar-actions-close {
  margin-top: 4px;
  border-top: 1px solid #e5edf3;
  border-radius: 0;
  color: #64748b;
}

.profile-image-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn-avatar-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-avatar-pill:hover {
  background: rgba(255, 255, 255, 0.38);
  transform: translateY(-1px);
}

.profile-edit-avatar-container {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}
.profile-edit-avatar-preview {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--grad);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  border: 2px solid #cbd5e1;
}
.profile-edit-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-edit-avatar-inputs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-edit-avatar-btn-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.btn-upload-avatar-file {
  cursor: pointer;
  padding: 7px 14px !important;
  font-size: 0.85rem !important;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.profile-field-hint {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
  display: block;
}

.profile-feedback-text.error {
  color: #b42318;
}

.profile-header-details h1 {
  font-size: 1.8rem;
  margin: 0 0 6px;
}

.profile-header-details p {
  margin: 0 0 10px;
  color: #c7dbe8;
  font-size: 0.95rem;
}

.profile-badge-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-profile-logout {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.25);
}

.btn-profile-logout:hover {
  background: #c0392b;
  transform: translateY(-1px);
}

.status-account-banner {
  margin-top: 24px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-account-banner.approved {
  background: #eafaf1;
  color: #1e824c;
  border: 1px solid #b7ebd0;
}

.status-account-banner.pending {
  background: #fef9e7;
  color: #b7791f;
  border: 1px solid #f9e79f;
}

.status-account-banner.rejected {
  background: #fdedec;
  color: #c0392b;
  border: 1px solid #fadbd8;
}

/* Grille principale du profil */
.profile-content-section {
  padding: 50px 0 80px;
  background: #f8fbfe;
  position: relative;
  z-index: 1;
}

.profile-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.profile-box {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 6px 20px rgba(16, 43, 78, 0.04);
}

.profile-box h2 {
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.profile-box p.intro-sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.profile-project-item {
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.profile-project-item strong {
  color: var(--navy);
  font-size: 0.95rem;
}

.profile-project-item p {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.admin-callout-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #0B2447, #1B6B82);
  color: #fff;
  border-radius: 18px;
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-callout-card h3 {
  margin: 0 0 6px;
  font-size: 1.3rem;
  color: #fff;
}

.admin-callout-card p {
  margin: 0;
  color: #c7e0f2;
  font-size: 0.92rem;
}

@media (max-width: 800px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

/* Affichage Informations Personnelles en lecture seule */
.profile-info-display-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #fbfdff;
  border: 1px solid #e5eff6;
  border-radius: 10px;
}

.profile-info-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #64748b;
}

.profile-info-value {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--navy);
  text-align: right;
}

.profile-info-bio {
  padding: 12px 14px;
  background: #fbfdff;
  border: 1px solid #e5eff6;
  border-radius: 10px;
  margin-bottom: 20px;
}

.profile-info-bio .profile-info-label {
  display: block;
  margin-bottom: 6px;
}

.profile-info-bio .profile-info-value {
  font-weight: 400;
  color: #334e68;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: left;
}

.btn-toggle-edit-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle-edit-profile:hover {
  background: var(--teal);
}

.profile-edit-form-wrap {
  display: none;
}

.profile-edit-form-wrap.is-editing {
  display: block;
}

.profile-info-display-wrap.is-editing {
  display: none;
}

.profile-form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.profile-form-group {
  margin-bottom: 14px;
  flex: 1;
}

.profile-form-group label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.profile-form-group input,
.profile-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d5e3ed;
  border-radius: 8px;
  background: #fbfdff;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--navy);
  box-sizing: border-box;
}

.profile-form-group input:read-only {
  background: #f1f5f9;
  color: #7f8c8d;
}

.profile-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.profile-col-stacked {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-box-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.profile-box-header-flex h2 {
  margin: 0;
}

.admin-card-btn {
  background: #1CC8D8;
  color: var(--navy);
  font-weight: 700;
}

.profile-pill-master {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.profile-pill-role {
  background: var(--cyan);
  color: var(--navy);
  font-weight: 700;
}

.btn-nav-dash {
  background: var(--teal);
}

.btn-nav-logout {
  background: #e74c3c;
}

.btn-save-profile {
  width: 100%;
}

.empty-state-card {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  background: #f9fbfd;
  border-radius: 12px;
  border: 1px dashed #dbe5ed;
}

.empty-state-card p {
  margin: 0 0 12px;
  font-size: 0.9rem;
}
