.profil-page {
  width: 100%;
  min-height: calc(100vh - 150px);
  box-sizing: border-box;
}

.profil-page[hidden] {
  display: none !important;
}

.profil-page .profil-page-card {
  width: 100%;
  max-width: none;
  max-height: none;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.profil-page .profil-form {
  min-height: auto;
  flex: initial;
  display: block;
}

.profil-page .profil-body {
  min-height: auto;
  flex: initial;
  overflow: visible;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
  padding: 0;
  background: transparent;
}

.profil-page .profil-header {
  min-height: 0;
  margin: 0 0 20px;
  padding: 0 0 16px;
  border-bottom: 1px solid #e5eaf1;
  background: transparent;
  color: #263247;
  font-size: 1.35rem;
}

.profil-page .profil-header span {
  font-size: inherit;
}

.profil-page .profil-fermer {
  color: #526174;
  background: #edf1f6;
}

.profil-page .profil-fermer:hover {
  background: #dfe6ef;
}

.profil-page .profil-section {
  margin-bottom: 0;
}

.profil-page #profilMessage {
  grid-column: 1 / -1;
}

.profil-page .profil-footer {
  justify-content: flex-end;
  padding: 16px 0 0;
  border-top: 0;
  background: transparent;
}

.profil-form {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.profil-header {
  flex-shrink: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: #82c91e;
  color: #fff;
  font-weight: 600;
}

.profil-header span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.profil-fermer {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.profil-fermer:hover {
  background: rgba(255, 255, 255, 0.16);
}

.profil-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px max(16px, calc((100% - 760px) / 2));
  background: #f7f8fa;
}

.profil-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
}

.profil-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #333;
}

.profil-champ {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #ccd3dc;
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

.profil-champ:focus {
  outline: 2px solid #82c91e;
  border-color: #82c91e;
}

.profil-ligne {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profil-logo-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px dashed #b8c2cf;
  border-radius: 8px;
  text-align: center;
  font-size: 0.85rem;
  color: #444;
}

.profil-logo-zone[hidden] {
  display: none;
}

.profil-logo-zone > i {
  font-size: 1.6rem;
  color: #82c91e;
}

.profil-logo-zone small,
.profil-aide {
  font-size: 0.74rem;
  color: #777;
}

.profil-logo-zone img {
  max-width: 180px;
  max-height: 120px;
  object-fit: contain;
}

.profil-actions {
  display: flex;
  gap: 8px;
}

.profil-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  padding: 12px max(16px, calc((100% - 760px) / 2));
  background: #fff;
  border-top: 1px solid #e5e5e5;
}

.profil-btn {
  min-height: 38px;
  padding: 7px 18px;
  border: 1px solid #82c91e;
  border-radius: 4px;
  background: #82c91e;
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.profil-btn:hover {
  background: #74b816;
}

.profil-btn.secondaire {
  background: #fff;
  color: #444;
  border-color: #ccd3dc;
}

.profil-btn.secondaire:hover {
  background: #f2f4f7;
}

.profil-message {
  min-height: 18px;
  margin: 0;
  font-size: 0.8rem;
}

.profil-message.succes {
  color: #2b8a3e;
}

.profil-message.erreur {
  color: #c92a2a;
}

@media (max-width: 520px) {
  .profil-page .profil-page-card {
    border-radius: 0;
  }

  .profil-page .profil-body {
    grid-template-columns: 1fr;
  }

  .profil-ligne {
    grid-template-columns: 1fr;
  }

  .profil-footer .profil-btn {
    width: 100%;
  }
}

@media (min-width: 521px) and (max-width: 760px) {
  .profil-page .profil-body {
    grid-template-columns: 1fr;
  }
}
