/* files.css - Styles pour la gestion des fichiers */

/* Page d'accueil */
.welcome-container {
    text-align: center;
    padding: 40px 20px;
}

.welcome-logo {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
}

.welcome-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.welcome-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.welcome-button i {
    margin-right: 8px;
}

.welcome-button:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.welcome-button.primary {
    background-color: #4CAF50;
    color: white;
}

.welcome-button.secondary {
    background-color: #3498db;
    color: white;
}

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

/* Page des fichiers */
.file-upload-section, .file-list-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.file-input-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    vertical-align: middle;
    margin-bottom: 15px;
}

.file-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.file-label {
    display: inline-block;
    padding: 10px 15px;
    background-color: #2c3e50;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 0;
    margin-bottom: 10px;
    transition: background-color 0.3s;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-label:hover {
    background-color: #1a252f;
}

.file-label i {
    margin-right: 5px;
}

#file-chosen {
    color: #666;
    margin-top: 8px;
}

/* Style pour les boutons d'action de même largeur */
.fixed-width-button {
    width: 180px; /* Largeur fixe pour tous les boutons */
    text-align: center;
    justify-content: center;
    padding: 10px 15px;
}

.action-buttons-row {
    display: flex;
    justify-content: flex-start; /* Alignement à gauche */
    margin-top: 15px;
    gap: 15px; /* Espace entre les boutons */
}

/* Tableau de fichiers */
.file-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.file-table th, .file-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.file-table th {
    background-color: #f2f2f2;
    font-weight: 600;
}

.file-table tr:hover {
    background-color: #f5f5f5;
}

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

.file-action {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.file-action.download {
    background-color: #3498db;
    color: white;
}

.file-action.download:hover {
    background-color: #2980b9;
}

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

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

.no-files {
    text-align: center;
    color: #666;
    padding: 20px;
    font-style: italic;
}

/* Style pour le bouton supprimer tout */
.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.delete-all-button {
    width: 200px;
    height: 40px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    margin-left: auto;
    justify-content: center;
}

.delete-all-button i {
    margin-right: 5px;
}

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

.delete-all-button:disabled {
    background-color: #e74c3c;
    opacity: 0.5;
    cursor: not-allowed;
}

/* Styles pour les informations de compilation */
.compilation-info {
    padding: 20px 20px 0 20px;
}

.compilation-info h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.compilation-stats {
    margin-bottom: 20px;
}

.compilation-item {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px solid #eee;
}

.compilation-item:last-child {
    border-bottom: none;
}

.compilation-label {
    font-weight: bold;
    color: #555;
}

.compilation-value {
    color: #333;
}

.no-compilation {
    text-align: center;
    color: #666;
    margin-bottom: 10px;
}

.compilation-tip {
    text-align: center;
    color: #888;
    font-style: italic;
}

/* Pour assurer que le bouton de compilation dans l'onglet a le même style */
.compilation-actions .compile-button {
    width: 180px; /* Même largeur fixe */
    margin: 15px auto 0 auto; /* Centré */
}

/******************************************************************************/
/* Nouveau conteneur aligné horizontalement */
.file-input-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Pour le conteneur du bouton et du texte */
.file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Pour déplacer le texte à droite */
.file-chosen-right {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

/* Ligne contenant upload à gauche, compilation à droite */
.upload-action-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

/* Style uniforme pour tous les boutons "fichier", y compris <label> */
.file-button {
    width: 200px;
    height: 40px;
    padding: 0 15px;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: background-color 0.3s ease;
    gap: 5px;
}

.file-button:hover {
    background-color: #1a252f;
}

/* Bouton compilation avec couleur différente */
.compile-button {
    background-color: #4CAF50;
}

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

.download-button {
    background-color: #3498db;
}

.download-button:hover {
    background-color: #2670a1;
}

/*******************************************************************/
/* Assurer que les boutons ont la même taille et sont alignés */
.upload-action-row {
    display: flex;
    justify-content: space-between; /* Change de flex-start à space-between */
    align-items: center;
    width: 100%;
    gap: 15px;
}

/* S'assurer que tous les boutons dans cette ligne ont la même taille */
.upload-action-row .file-button {
    width: 200px;
    height: 40px;
}

.upload-action-row .compile-button {
    margin-left: auto;
}

/* TABLES **********************************************************************/
.flexible-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    border: none;
}

.flexible-table td {
    padding: 0;
    border: none;
    vertical-align: top;
}

.flexible-table .col-left,
.flexible-table .col-right {
    width: 1%;
    white-space: nowrap;
}


/* disabled for button */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: gray;
}

.progress-label {
    margin-bottom: -10px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* pour view */
.file-actions .file-action.view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #28a745;  /* vert */
  color: #fff;
  margin-right: 5px;          /* petit espace avec les autres icônes */
  text-decoration: none;
}

.file-actions .file-action.view i {
  font-size: 14px;
}

.file-actions .file-action.view:hover {
  background-color: #218838;  /* vert un peu plus foncé au survol */
}