/* Styles pour la page d'édition des utilisateurs */
/* Adapté au style global du site, en harmonisation avec admin.css et files.css */

/* Styles généraux */
.body {
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
}

/* Styles pour l'en-tête administratif */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 20px;
}

.admin-title {
  color: #59cbc5;
  font-family: "Minecraft", sans-serif;
  margin-right: auto; /* Pousse les éléments suivants vers la droite */
}

.admin-navigation {
  display: flex;
  gap: 10px;
}

.admin-navigation a {
  color: #ffffff;
  text-decoration: none;
  padding: 8px 12px;
  background-color: #39938e;
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap; /* Empêche le bouton de prendre toute la largeur */
  display: inline-block;
  text-align: center;
  font-size: 0.9em; /* Taille de texte légèrement réduite */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-navigation a:hover {
  background-color: #2a6865;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.admin-navigation a.nav-button {
  display: flex;
  align-items: center;
  gap: 5px;
}

.admin-navigation a.nav-button i {
  font-size: 0.9em;
}

.admin-navigation a.logout {
  background-color: #e74c3c;
}

.admin-navigation a.logout:hover {
  background-color: #c0392b;
}

/* Messages de notification */
.messages {
  margin-bottom: 20px;
}

.message {
  padding: 12px 15px;
  border-radius: 4px;
  margin-bottom: 10px;
  color: #ffffff;
  border-left: 4px solid transparent;
}

.message.success {
  background-color: rgba(46, 204, 113, 0.2);
  border-left-color: #2ecc71;
}

.message.error {
  background-color: rgba(231, 76, 60, 0.2);
  border-left-color: #e74c3c;
}

.message.warning {
  background-color: rgba(243, 156, 18, 0.2);
  border-left-color: #f39c12;
}

.message.info {
  background-color: rgba(52, 152, 219, 0.2);
  border-left-color: #3498db;
}

/* Container d'édition */
.edit-user-container {
  max-width: 800px;
  margin: 0 auto;
}

.edit-user-card {
  background-color: #0b1321;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
  overflow: hidden;
}

.edit-user-header {
  background-color: #39938e;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-user-header h4 {
  color: white;
  margin: 0;
  font-family: "Minecraft", sans-serif;
}

.edit-user-body {
  padding: 20px;
}

/* Table d'informations utilisateur */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  color: #ecf0f1;
}

.info-table th,
.info-table td {
  padding: 10px 15px;
  border-bottom: 1px solid #34495e;
  text-align: left;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
  border-bottom: none;
}

.info-table th {
  color: #59cbc5;
  font-weight: bold;
  width: 40%;
}

/* Styles pour les formulaires */
.form-group {
  margin-bottom: 20px;
  padding: 15px;
  background-color: rgba(52, 73, 94, 0.2);
  border-radius: 4px;
}

.form-text {
  color: #bbb;
  font-size: 0.85em;
  margin-top: 5px;
  display: block;
}

/* Styles pour les interrupteurs (switches) */
.custom-control {
  position: relative;
  display: block;
  min-height: 1.5rem;
  padding-left: 2.5rem;
}

.custom-control-label {
  position: relative;
  margin-bottom: 0;
  vertical-align: top;
  cursor: pointer;
  color: #ecf0f1;
}

.custom-control-label::before {
  position: absolute;
  top: 0.25rem;
  left: -2.5rem;
  display: block;
  width: 2rem;
  height: 1rem;
  pointer-events: none;
  content: "";
  background-color: #3a4a65;
  border-radius: 0.5rem;
  transition: background-color 0.15s ease-in-out;
}

.custom-control-label::after {
  position: absolute;
  top: 0.25rem;
  left: -2.5rem;
  display: block;
  width: 1rem;
  height: 1rem;
  content: "";
  background-color: #ecf0f1;
  border-radius: 0.5rem;
  transition: transform 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.custom-control-input {
  position: absolute;
  left: 0;
  z-index: -1;
  width: 1rem;
  height: 1.25rem;
  opacity: 0;
}

.custom-control-input:checked ~ .custom-control-label::before {
  background-color: #39938e;
}

.custom-control-input:checked ~ .custom-control-label::after {
  background-color: #ecf0f1;
  transform: translateX(1rem);
}

.custom-control-input:focus ~ .custom-control-label::before {
  box-shadow: 0 0 0 0.2rem rgba(89, 203, 197, 0.25);
}

.custom-control-input:disabled ~ .custom-control-label {
  color: #7f8c8d;
  cursor: not-allowed;
}

.custom-control-input:disabled ~ .custom-control-label::before {
  background-color: #34495e;
}

/* Boutons d'action */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.action-button {
  display: inline-block;
  padding: 10px 15px;
  background-color: #39938e;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 1em;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-button:hover {
  background-color: #2a6865;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.action-button.secondary {
  background-color: #7f8c8d;
}

.action-button.secondary:hover {
  background-color: #95a5a6;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-navigation {
    position: static;
    margin-top: 15px;
    flex-wrap: wrap;
  }

  .form-actions {
    flex-direction: column;
  }

  .action-button {
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
  }
}
