a {
  color: #ffffff;
  text-decoration: none;
}

/* Styles pour l'en-tête de la page */
.page-header {
  display: flex;
  flex-direction: row;
  padding: 15px 25px;
  margin-bottom: 2em;
  width: calc(100% - 50px);
  box-sizing: border-box;
  align-items: center;
}

.user-welcome {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  font-size: 1.1em;
  color: #ffffff;
}

.user-welcome p {
  margin: 0;
  padding: 0;
}

.user-controls {
  display: flex;
  gap: 15px;
  margin-left: auto;
}

/* Styles pour les éléments de formulaire (restaurés de l'ancien login.css) */
.input {
  display: flex;
  flex-direction: column;
  align-items: center; /* Centrer horizontalement les enfants */
}

label {
  margin-top: 0.5rem;
}

#connection {
  width: 400px;
  align-items: center;
}

/* Styles pour les champs de formulaire */
input {
  background-color: #3a4a65;
  margin: 5px;
  height: 1.8em;
  border: none;
}

input,
label,
h1,
p {
  color: #d9d9d9;
  border: none;
}

.submit_button_form {
  margin-top: 0.7rem;
  height: 38px;
  color: #d9d9d9;
  font-size: 16px;
  border: none;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 22px;
  transition: 0.3s;
  width: 50%;
  margin-left: auto; /* Ces deux lignes centrent le bouton */
  margin-right: auto;
  font-family: "Minecraft", sans-serif;
}

#guest {
  color: #d9d9d9;
  border: 20px;
  border-radius: 20px;
}

#username_div,
#password_div {
  display: flex;
  flex-direction: column;
  width: 80%;
}

#error_form {
  text-decoration: underline;
  color: red;
}

/* Ancien style - gardé pour compatibilité */
.connexion {
  display: flex;
  flex-direction: column;
  margin-bottom: 2em;
  position: relative;
}

.fileslist {
  padding-top: 2em;
  padding-left: 8vw;
  padding-right: 8vw;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2em;
  justify-content: center;
}

.file {
  width: 10em;
  height: 10em;
  border: solid;
  border-color: #39938e;
  border-radius: 10px;
  background-color: #39938e;
  overflow-wrap: break-word;
  text-align: center;
  padding: 0.8em; /* Ajoute un padding pour éviter que le texte touche les bords */
  box-sizing: border-box; /* Inclut le padding dans la largeur et la hauteur */
  transition: 0.3s;
}

.file:hover {
  background-color: #0b1321;
  border-color: #ffffff;
  color: #59cbc5;
}

/* Styles pour le formulaire d'upload */
.upload-container {
  padding: 15px;
  margin-bottom: 20px;
}

.upload-container h3 {
  margin-top: 0;
  color: #eee;
  font-size: 18px;
}

.upload-input {
  margin: 10px 0;
}

.upload-button {
  background-color: #4caf50;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: "Minecraft", sans-serif;
  transition: background-color 0.3s;
}

.upload-button:hover {
  background-color: #45a049;
}

/* Styles pour les sections de fichiers */
.files-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.files-section {
  padding: 15px;
}

.files-section h3 {
  margin-top: 0;
  color: #eee;
  font-size: 18px;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
  margin-bottom: 10px;
}

/* Styles pour les différents types de fichiers */
.user-file {
  border-left: 3px solid #4caf50;
}

.no-owner-file {
  border-left: 3px solid #ffc107; /* Jaune */
}

.other-user-file {
  border-left: 3px solid #2196f3; /* Bleu */
}

/* Style pour le bouton "Uploader un fichier" */
.upload-file {
  background-color: #4caf50;
  border-color: #45a049;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-file:hover {
  background-color: #45a049;
  transform: scale(1.05);
}

/* Style spécifique pour l'upload privé */
.private-upload {
  background-color: #2196f3; /* Bleu */
  border-color: #1976d2;
}

.private-upload:hover {
  background-color: #1976d2;
}

/* Style spécifique pour l'upload public */
.public-upload {
  background-color: #ffc107; /* Jaune */
  border-color: #ffb300;
  color: #333; /* Texte plus foncé pour contraste */
}

.public-upload:hover {
  background-color: #ffb300;
}

.upload-file span {
  font-weight: bold;
}

/* Styles pour le formulaire dans la fenêtre modale */
.form-buttons {
  display: flex;
  margin-top: 15px;
  justify-content: center;
}

#fileInputContainer {
  width: 80%;
  max-width: 500px;
  margin: 0 auto;
  background-color: #2d2d2d;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.file-upload-btn {
  margin-right: 10px;
  margin-top: 10px;
}

/* 
 * styles.css - Feuille de style principale pour la page des fichiers
 */

/* Styles pour la section des fichiers */
.file-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 20px;
}

.file-heading {
  color: #59cbc5;
  margin-bottom: 15px;
  font-family: "Minecraft", sans-serif;
  text-align: center;
}

.file-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  width: 100%;
  max-width: 1200px;
  margin-bottom: 20px;
}

.file-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(11, 19, 33, 0.7);
  padding: 15px;
  border-radius: 8px;
  width: 180px;
  min-height: 150px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}

.file-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  background-color: rgba(26, 42, 66, 0.8);
}

.file-icon {
  font-size: 40px;
  margin-bottom: 10px;
  color: #59cbc5;
}

.file-name {
  text-align: center;
  font-size: 14px;
  margin-bottom: 10px;
  color: #ffffff;
  word-break: break-word;
  width: 100%;
  height: 40px;
  overflow: hidden;
}

.file-owner {
  font-size: 12px;
  color: #aaaaaa;
  margin-bottom: 5px;
}

.file-actions {
  display: flex;
  gap: 10px;
}

.file-actions a {
  text-decoration: none;
}

.file-type-tag {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: bold;
}

.private-tag {
  background-color: #2196f3;
  color: white;
}

.public-tag {
  background-color: #ffc107;
  color: #333;
}

/* Responsive design pour les fichiers */
@media (max-width: 768px) {
  .file-container {
    gap: 10px;
  }

  .file-box {
    width: 150px;
    min-height: 130px;
    padding: 10px;
  }

  .file-icon {
    font-size: 30px;
  }

  .file-name {
    font-size: 12px;
  }

  .page-header {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .file-container {
    gap: 8px;
  }

  .file-box {
    width: 130px;
    min-height: 120px;
    padding: 8px;
  }

  .file-actions {
    flex-direction: column;
    gap: 5px;
  }

  .user-controls {
    flex-direction: column;
    gap: 10px;
  }
}

/* Styles pour les actions de l'utilisateur (déconnexion, admin) */
.user-actions {
  display: flex;
  gap: 12px;
  z-index: 1000;
  height: 50%;
}

.admin-action {
  z-index: 1000;
}

.action-button {
  color: #ffffff;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 6px;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
  font-weight: 500;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.action-button.admin-link {
  background: linear-gradient(135deg, #3498db, #2980b9);
  border: none;
  transition: all 0.3s ease;
}

.action-button.admin-link:hover {
  background: linear-gradient(135deg, #2980b9, #1f618d);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.action-button.logout {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border: none;
}

.action-button.logout:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
}

.action-button i {
  font-size: 1em;
}

/* Message pour aucun fichier */
.no-files-message {
  color: #aaa;
  font-style: italic;
  text-align: center;
  padding: 20px;
  width: 100%;
}

.home-button {
  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);
}

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