body {
    font-family: Arial, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #333;
}

.kanban-board {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-top: 30px;
}

.column {
    background-color: #e9ecef;
    border-radius: 8px;
    width: 30%;
    min-width: 250px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.column h2 {
    margin-top: 0;
    text-align: center;
    color: #495057;
}

.tasks-container {
    min-height: 200px; /* Espace pour glisser-déposer */
    padding: 10px;
    border-radius: 5px;
    background-color: #fff; /* Fond blanc pour la zone des tâches */
}

.task {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: grab; /* Indique qu'on peut saisir */
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    position: relative; /* Contexte pour le positionnement absolu du bouton */
    padding-right: 30px; /* Laisse de la place pour le bouton X */
    padding-bottom: 35px; /* Plus d'espace pour l'icône pièces jointes */
}

.task:active {
    cursor: grabbing; /* Pendant le déplacement */
}

/* Effet visuel quand on survole une colonne avec une tâche */
.tasks-container.drag-over {
    background-color: #d6e9ff;
    border: 2px dashed #007bff;
}

/* Styles pour le nouveau formulaire d'ajout */
#add-task-form {
    display: flex; /* Aligne le champ et le bouton sur une ligne */
    gap: 5px;      /* Espace entre le champ et le bouton */
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
}

#add-task-form input[type="text"] {
    flex-grow: 1; /* Le champ prend toute la place disponible */
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 8px;
    font-size: 14px;
}

#add-task-form button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    padding: 0 12px;
}

#add-task-form button:hover {
    background-color: #0056b3;
}

.delete-btn {
    position: absolute;
    top: 5px;
    right: 8px;
    background: none;
    border: none;
    color: #aaa; /* Couleur grise discrète */
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.delete-btn:hover {
    color: #d9534f; /* Rouge au survol */
}

/* === NOUVEAU BLOC POUR LA MODIFICATION === */
.task-edit-input {
    width: 95%; /* Prend presque toute la largeur de la carte */
    font-family: Arial, sans-serif;
    font-size: 14px;
    padding: 6px;
    border: 1px solid #007bff; /* Met en surbrillance le champ */
    border-radius: 3px;
    box-sizing: border-box; /* Assure que le padding ne casse pas la largeur */
    margin: -6px 0; /* Compense le padding de la carte pour bien s'aligner */
}

.task-edit-input {
    width: 95%; 
    font-family: Arial, sans-serif;
    font-size: 14px;
    padding: 6px;
    border: 1px solid #007bff; 
    border-radius: 3px;
    box-sizing: border-box; 
    margin: -6px 0; 
}

/* === NOUVEAU BLOC POUR LES PRIORITÉS === */
/* Tâche priorité moyenne (Jaune) */
.task.priority-medium {
    background-color: #FFFACD; /* Jaune pâle (LemonChiffon) */
    border-color: #F0E68C; /* Jaune plus foncé */
}

/* Tâche priorité élevée (Rouge) */
.task.priority-high {
    background-color: #FFE4E1; /* Rouge pâle (MistyRose) */
    border-color: #FA8072; /* Rouge-saumon */
}

/* Optionnel : garde la couleur au survol du bouton X */
.task.priority-medium .delete-btn:hover {
    background-color: #FFFACD;
}
.task.priority-high .delete-btn:hover {
    background-color: #FFE4E1;
}

/* === STYLES POUR LES PIÈCES JOINTES === */

/* Icône pièces jointes */
.attachment-icon {
    position: absolute;
    bottom: 8px;
    right: 35px;  /* À gauche du bouton X */
    font-size: 16px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
}

.attachment-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

.attachment-icon.has-attachments {
    opacity: 1;
}

.attachment-icon.has-attachments::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Modal principal */
.attachment-modal {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Header du modal */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

/* Section upload */
.upload-section {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
}

.upload-btn {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.upload-btn:hover {
    background-color: #218838;
}

.upload-hint {
    margin-top: 10px;
    font-size: 12px;
    color: #6c757d;
}

/* Liste des pièces jointes */
.attachments-list {
    padding: 20px;
    min-height: 150px;
}

.no-attachments,
.loading,
.error {
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.error {
    color: #dc3545;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.attachment-item:hover {
    background-color: #e9ecef;
}

.file-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.file-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-weight: 500;
    color: #333;
    word-break: break-word;
}

.file-meta {
    font-size: 12px;
    color: #6c757d;
}

.file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.download-btn,
.delete-file-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.download-btn:hover {
    background-color: #d1e7fd;
}

.delete-file-btn:hover {
    background-color: #f8d7da;
}

/* === STYLES POUR GIT SAUVEGARDE === */

/* Header container */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.header-container h1 {
    margin: 0;
}

/* Bouton de sauvegarde */
.save-git-button {
    position: relative;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.save-git-button:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.save-git-button.has-changes {
    background-color: #007bff;
    animation: pulse 2s infinite;
}

.save-git-button.has-changes:hover {
    background-color: #0056b3;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    }
}

/* Badge du bouton */
.save-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Modale Git */
.git-modal {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.git-modal-content {
    padding: 20px;
}

/* Récapitulatif */
.git-summary {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.git-summary h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.git-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.git-summary li {
    padding: 6px 0;
    font-size: 14px;
    color: #555;
}

/* Section commit */
.git-commit-section {
    margin-bottom: 20px;
}

.git-commit-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.git-commit-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

.git-commit-section textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Boutons d'action Git */
.git-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.git-commit-btn,
.git-ignore-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.git-commit-btn {
    background-color: #28a745;
    color: white;
}

.git-commit-btn:hover:not(:disabled) {
    background-color: #218838;
}

.git-commit-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.git-ignore-btn {
    background-color: #6c757d;
    color: white;
}

.git-ignore-btn:hover {
    background-color: #5a6268;
}

/* Messages de statut Git */
.git-status {
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
}

.git-status.loading {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.git-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.git-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
/* === MODAL DE PRÉVISUALISATION === */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.preview-modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.preview-modal-header {
    padding: 20px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3em;
}

.preview-modal-body {
    flex: 1;
    overflow: auto;
    padding: 30px;
    background-color: #f8f9fa;
}

#preview-body {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 100%;
}

/* Style pour le contenu Word converti */
#preview-body p {
    margin-bottom: 1em;
    line-height: 1.6;
}

#preview-body h1, #preview-body h2, #preview-body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* Style pour les images dans la prévisualisation */
#preview-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Canvas pour PDF */
#preview-body canvas {
    display: block;
    margin: 0 auto 20px auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1em;
}

.preview-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    font-size: 1.1em;
}
