
/* Généralités du body */
body {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    text-align: right;
    /* background: linear-gradient(to left, #f3f4f6, #e5e7eb); */
    margin: 0;
    padding: 0;
}

/* Conteneur principal */
.container {
    width: 90%;
    margin: 40px auto;
    background-color: #ffffff;
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.main-header {
  /* background-color: #014479 !important; */
  color: white;
  /* padding: 15px 30px; */
  display: flex;
  justify-content: space-between;
  /* align-items: center; */
  border-bottom: 4px solid orange;

  width: 100%;      /* largeur */
  height: 225px;     /* hauteur */
}

.header-center {
    flex-grow: 1;
    background-color: #014479 !important;
    padding: 2%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.header-title {
    flex-grow: 1;
    /* background-color: #014479 !important; */
    /* padding: 2%; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: underline; 
}
.logo-img {
    width: 40px; /* Ajustez la taille de l'image */
    height: 40px;
}

.header-right {
    border-bottom: 4px solid #014479 !important;
    padding: 1.65%;
    display: flex
;
    justify-content: flex-end;
    align-items: center;
}
.header-center h1 {
    margin: 0;
    /* font-size: 45px; */
    font-weight: bolder;
    color: orange;
}
.header-center h2 {
    margin: 0;
    font-size: 45px;
    font-weight: bolder;
    color: white;
}

.logout {
    /* display: flex; */
    position: absolute;
    margin-right: 90%;
    justify-content: flex-start;
    align-items: center;
    background-color: #e74c3c;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
    width: fit-content;       /* adapte à la taille du bouton */
    max-width: 200px;
    margin-left: 0;           /* aligne à gauche */
    align-self: flex-start;   /* pour les conteneurs flex en colonne */
}

.logout-btn {
    
    background-color: #e74c3c;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    font-size: 22px;
    cursor: pointer;
    font-weight: bold;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* Style pour la section des boutons */
.button-container {
    display: flex;
    justify-content: center;  /* Centre les boutons horizontalement */
    align-items: center;     /* Centre les boutons verticalement */
    gap: 20px;               /* Espacement entre les boutons */
    margin: 20px 0;          /* Marge autour des boutons */
    flex-direction: row;
}

.button-container2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* espace entre les boutons */
    margin: auto;
    padding: 3%;
}
.btn_suiv {
    background-color: #014479;
    color: white;
    border: none;
    padding: 12px 20px;
    margin: 20px auto 0 auto;
    display: block;
    width: 30%;
    font-size: 22px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: bolder;
    margin: auto;
    transition: background-color 0.3s ease;

}
.btn_suiv:hover {
    background-color: #014479;
    color: orange;
    
}

.button-container2 button {
    width: 30%; /* ou un pourcentage comme 40% */
    padding: 10px;
    font-size: 25px;
    cursor: pointer;
    font-weight: bolder;
}
.btn_upload_file, .btn_download_file {
    background-color: orange;
    color: #014479;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 25px;
    cursor: pointer;
    font-weight: bolder;
    font-family: 'Tajawal', sans-serif;
    transition: background-color 0.3s ease;
}
.btn_entrer {
    background-color: orange;
    color: #014479;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 35px;
    cursor: pointer;
    font-weight: bolder;
    font-family: monospace;
    transition: background-color 0.3s ease;
}
.btn_entrer:hover {
    background-color: #014479;
    color: white;
    
}

.btn_upload_file:hover, .btn_download_file:hover {
    background-color: #014479;
    color: orange;
}

/* Titre de la page */
h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
}

/* Liste des fichiers et dossiers */
.file-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* Style pour chaque élément fichier/dossier */
.file-item {
    display: grid;
    grid-template-columns: 1fr auto; /* 1 colonne pour le texte, 1 pour le bouton */
    align-items: center;  /* Aligner les éléments verticalement au centre */
    background-color: #fafafa;
    border: 1px solid #dcdde1;
    padding: 14px 20px;
    border-radius: 6px;
    margin-bottom: 10px;
    text-align: left;  /* Aligner le texte à gauche */
    transition: background-color 0.3s ease;
    gap: 10px; /* Espacement entre les colonnes */
}

/* Affichage des éléments lors du survol */
.file-item:hover {
    background-color: #f1f2f6;
}

/* Style des liens dans les éléments */
.file-item a {
    text-decoration: none;
    /* color: rgb(2, 129, 149); */
    font-size: 18px;
    font-weight: bolder;
    text-align: right;
}

.titreFile-btn {
    text-decoration: none;
    color: rgb(2, 129, 149);
    font-size: 18px;
    font-weight: bolder;
    text-align: right;
}

.titreFile-btn:hover {  /* Pas d'espace ici */
    color: rgb(4, 184, 213);
}
/* Effet de survol pour les liens */
.file-item a:hover {
    text-decoration: underline;
    /* color: rgb(4 184 213); */
}

.download-btn {
    background-color: rgb(2, 129, 149);
    color: white;
    padding: 8px 14px;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
    font-weight: bolder;
    text-align: center;
}

.download-btn:hover {
    background-color: rgb(4 184 213);
    color: white;
}

/* Style pour les dossiers (affichage horizontal des dossiers) */
.folder-list {
    display: flex;
    gap: 15px; /* Espacement entre les éléments */
    flex-wrap: wrap;
}

/* Style pour les titres de dossiers */
.folder-list .file-item {
    font-weight: bold;
    color: #34495e;
}

/* Styles généraux pour la section des dossiers vides */
.folder-list-empty {
    text-align: center;
    font-size: 16px;
    color: #95a5a6;
}

/* Style pour les éléments vides */
.folder-list-empty p {
    margin: 10px 0;
}

/* Styles pour la pagination ou les autres éléments au besoin */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    padding: 10px 15px;
    margin: 0 5px;
    background-color: #3498db;
    color: white;
    border-radius: 5px;
    text-decoration: none;
}

.pagination a:hover {
    background-color: #2980b9;
}

/* Affichage du bouton de retour ou de navigation */
.back-button {
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    display: inline-block;
}

.back-button:hover {
    background-color: #c0392b;
}

/* Conteneur principal upload */
#uploadContainer {
    background-color: #f9f9f9;
    border: 2px solid #ccc;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    width: 55%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    direction: rtl;
    font-family: 'Tajawal', sans-serif;
}

/* Titre du bloc */
#uploadContainer h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* Style du champ fichier */
#uploadContainer input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #aaa;
    border-radius: 8px;
    background-color: #fff;
    font-size: 16px;
}

/* Bouton de soumission */
.upload-btn {
    display: inline-block;
    margin-top: 15px;
    background-color: #014479;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    font-weight: bolder;
    transition: background-color 0.3s ease;
}

.upload-btn:hover {
    background-color: orange;
    color: #014479;
}

/* Full-width input fields */
input[type=text], input[type=password] {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #ccc;
    box-sizing: border-box;
  }
  
  /* Set a style for all buttons */
  button {
    background-color: #04AA6D;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    cursor: pointer;
    width: 100%;
  }
  
  button:hover {
    opacity: 0.8;
  }
  
  .cancelbtn {
      background-color: #f44336;
      color: white;
      border: none;
      padding: 12px 20px;
      margin: 20px auto 0 auto;
      display: block;
      width: 30%;
      font-size: 22px;
      cursor: pointer;
      border-radius: 8px;
      font-weight: bolder;
      margin: auto;
      transition: background-color 0.3s ease;
  }
  .cancelbtn:hover {
    background-color: #d32f2f; /* Rouge plus foncé au survol */
  }
  
  
  /* Center the image and position the close button */
  .imgcontainer {
    text-align: center;
    margin: 24px 0 12px 0;
    position: relative;
  }
  
  img.avatar {
    width: 40%;
    border-radius: 50%;
  }
  
  
  span.psw {
    float: left; /* Placer le lien "forgot password?" à gauche pour l'adapter au RTL */
    padding-top: 16px;
  }
  
  /* The Modal (background) */
  .modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    padding-top: 60px;
  }
  
  /* Modal Content/Box */
  .modal-content {
    background-color: #fefefe;
    margin: 5% auto 15% auto; /* 5% from the top, 15% from the bottom and centered */
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
  }
  
  /* The Close Button (x) */
  .close {
    /* position: absolute; */
    right: 25px;
    top: 0;
    color: wheat;
    font-size: 35px;
    font-weight: bolder;
  }
  
  .close:hover,
  .close:focus {
    color: red;
    cursor: pointer;
  }
  
  /* Add Zoom Animation */
  .animate {
    -webkit-animation: animatezoom 0.6s;
    animation: animatezoom 0.6s
  }
  
  @-webkit-keyframes animatezoom {
    from {-webkit-transform: scale(0)} 
    to {-webkit-transform: scale(1)}
  }
    
  @keyframes animatezoom {
    from {transform: scale(0)} 
    to {transform: scale(1)}
  }
  
  /* Change styles for span and cancel button on extra small screens */
  @media screen and (max-width: 300px) {
    span.psw {
       display: block;
       float: none;
    }
    .cancelbtn {
       width: 100%;
    }



    /* RTL Container */
#listeUsers {
    direction: rtl;
    padding: 20px;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    font-family: "Arial", sans-serif;
  }
  
  /* Table styles */
  #listeUsers table {
    width: 100%;
    border-collapse: collapse;
  }
  
  #listeUsers th,
  #listeUsers td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
    white-space: nowrap;
  }
  
  #listeUsers thead {
    background-color: #f5f5f5;
  }
  
  /* Add user button */
  #listeUsers a img {
    vertical-align: middle;
    margin-left: 5px;
  }
  
  #listeUsers a {
    text-decoration: none;
    font-weight: bold;
    color: #007bff;
  }
  
  #listeUsers a:hover {
    text-decoration: underline;
  }
  
  /* Pagination styles */
  .pagination {
    margin-top: 15px;
    text-align: center;
  }
  
  .pagination button {
    background-color: #007bff;
    color: white;
    border: none;
    margin: 3px;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
  }
  
  .pagination button.active {
    background-color: #0056b3;
    font-weight: bold;
  }
  
  .pagination button:hover {
    background-color: #0056b3;
  }
  
  /* Responsive */
  @media screen and (max-width: 768px) {
    #listeUsers table, 
    #listeUsers thead, 
    #listeUsers tbody, 
    #listeUsers th, 
    #listeUsers td, 
    #listeUsers tr {
      display: block;
    }
  
    #listeUsers thead {
      display: none;
    }
  
    #listeUsers td {
      position: relative;
      padding-left: 50%;
      text-align: right;
    }
  
    #listeUsers td::before {
      content: attr(data-label);
      position: absolute;
      left: 10px;
      width: 45%;
      font-weight: bold;
      text-align: left;
      direction: ltr;
    }
  }
  
  }