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

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

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

.admin-title {
  color: #59cbc5;
  font-family: "Minecraft", sans-serif;
}

.admin-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.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;
}

/* Styles pour les messages */
.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;
}

/* Styles pour la barre de recherche */
.search-bar {
  background-color: #0b1321;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
}

.search-bar form {
  display: flex;
  width: 100%;
  gap: 10px;
}

.search-bar input {
  flex: 1;
  padding: 10px 15px;
  background-color: #3a4a65;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-family: inherit;
}

.search-bar input::placeholder {
  color: #8891a0;
}

.search-bar button {
  padding: 10px 15px;
  background-color: #39938e;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Minecraft", sans-serif;
}

.search-bar button:hover {
  background-color: #2a6865;
  transform: translateY(-2px);
}

.search-bar .reset-button {
  background-color: #7f8c8d;
  color: white;
  padding: 10px 15px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.search-bar .reset-button:hover {
  background-color: #95a5a6;
  transform: translateY(-2px);
}

/* Styles pour le tableau */
.table-container {
  margin-bottom: 20px;
  overflow-x: auto;
}

.files-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: #0b1321;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.files-table th {
  background-color: #39938e;
  color: white;
  text-align: center;
  padding: 12px 15px;
  font-family: "Minecraft", sans-serif;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.files-table th a {
  color: white;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.files-table th a:hover {
  color: #d9d9d9;
}

.files-table td {
  border-top: 1px solid #2a6865;
  padding: 10px 15px;
  color: #eee;
  text-align: center;
}

.files-table tr:hover {
  background-color: #162943;
}

/* Styles pour les indicateurs de visibilité */
.file-visibility {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 0.85em;
  gap: 5px;
}

.file-visibility.public {
  background-color: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
}

.file-visibility.private {
  background-color: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

/* Styles pour les actions */
.file-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #34495e;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-icon:hover {
  transform: translateY(-2px);
}

.action-icon.edit {
  background-color: #3498db;
}

.action-icon.edit:hover {
  background-color: #2980b9;
}

.action-icon.delete {
  background-color: #e74c3c;
}

.action-icon.delete:hover {
  background-color: #c0392b;
}

/* Styles pour la pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background-color: #34495e;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination a.active {
  background-color: #39938e;
}

.pagination a:hover:not(.disabled):not(.active) {
  background-color: #2c3e50;
  transform: translateY(-2px);
}

.pagination a.disabled {
  background-color: #2c3e50;
  opacity: 0.5;
  cursor: not-allowed;
}

/* Styles pour les modales */
.modal-content {
  background-color: #1a2a3f;
  color: #ffffff;
  border-radius: 8px;
  border: none;
}

/* Styles pour le modal caché */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}

/* Style pour l'affichage du modal */
.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 30px auto;
}

.modal-header {
  background-color: #39938e;
  color: white;
  border-bottom: none;
  padding: 15px 20px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header .close {
  color: white;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

.modal-title {
  font-family: "Minecraft", sans-serif;
  margin: 0;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  border-top: none;
  padding: 15px 20px;
}

.btn-cancel {
  background-color: #7f8c8d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  background-color: #95a5a6;
}

.btn-delete {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-delete:hover {
  background-color: #c0392b;
}

.form-check {
  margin-top: 15px;
}

.form-check-input {
  margin-right: 10px;
}

.text-muted {
  color: #7f8c8d;
}

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

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

  .search-bar form {
    flex-direction: column;
  }

  .search-bar button,
  .search-bar .reset-button {
    width: 100%;
  }

  .files-table {
    display: block;
    overflow-x: auto;
  }

  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .file-actions {
    flex-direction: column;
    align-items: center;
  }
}
