/* --- Styles Globaux & Reset --- */
body {
    margin: 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: #007bff;
}

a:hover {
    text-decoration: underline;
}

/* --- Page de Connexion --- */
.login-page {
    background: url('https://145929077.fs1.hubspotusercontent-eu1.net/hubfs/145929077/background/background.png') no-repeat center center fixed; /* Image de fond similaire */
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 360px;
    text-align: center;
}

.login-box h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-weight: 500;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.login-btn:hover {
    background-color: #0056b3;
}

.forgot-password {
    display: block;
    margin-top: 15px;
    font-size: 12px;
}

.login-footer, .app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 8px 20px;
    font-size: 12px;
    color: #6c757d;
    text-align: right;
    box-sizing: border-box;
}

/* --- Layout Principal de l'Application --- */
.main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 35px); /* Hauteur de l'écran moins le footer */
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    height: 60px;
}

.main-header h1 {
    font-size: 18px;
    color: #007bff;
    font-weight: 700;
}

.header-center input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 300px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right span {
    margin-left: 15px;
    cursor: pointer;
    font-size: 18px;
}

.main-nav {
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
}

.main-nav ul {
    margin: 0;
    padding: 0 20px;
    list-style: none;
    display: flex;
}

.main-nav li a {
    display: block;
    padding: 15px 20px;
    color: #333;
    font-weight: 500;
}

.main-nav li.active a, .main-nav li a:hover {
    color: #007bff;
    border-bottom: 3px solid #007bff;
    text-decoration: none;
}

.content {
    padding: 20px;
    flex-grow: 1;
}

.content-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
}

.content-header p {
    margin: 0;
    color: #6c757d;
}

/* Sous-navigation (page Materials) */
.sub-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}
.sub-nav li.active a {
    font-weight: bold;
    color: #333;
    border: none;
}


/* --- Composants Spécifiques --- */
.welcome-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.welcome-bar h2 {
    margin: 0;
    font-weight: 500;
}

.card {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 20px;
}
.card-header {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}
.card-header h3 { margin: 0; }
.card-actions span { margin-left: 10px; cursor: pointer; }
.card-body { padding: 15px; }
.card-body h4, .card-body h5 { margin-top: 0; margin-bottom: 10px; }
.card-body ul { padding-left: 20px; }
.card-body li { margin-bottom: 8px; }

/* Tableaux de données */
.view-controls {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.filter-btn, .action-btn {
    padding: 8px 16px;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
}
.action-btn {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.data-table-container {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    white-space: nowrap;
    vertical-align: middle; /* <-- AJOUTEZ CETTE LIGNE */
}
thead th {
    background-color: #f8f9fa;
    font-weight: 500;
}
tbody tr:hover {
    background-color: #f1f1f1;
}
.icon-check {
    color: #007bff;
    font-size: 18px;
    font-weight: bold;
}
.icon-action {
    cursor: pointer;
    margin-right: 8px;
    font-size: 16px;
}

/* Styles pour les statuts des tâches */
.status-pending {
    background-color: #f8d7da;
    color: #721c24;
    padding: 5px 10px;
    border-radius: 12px;
    font-weight: 500;
    text-align: center;
    display: inline-block;
}

.status-in-progress {
    background-color: #fff3cd;
    color: #856404;
    padding: 5px 10px;
    border-radius: 12px;
    font-weight: 500;
    text-align: center;
    display: inline-block;
}
    
.status-done {
    background-color: #d4edda;
    color: #155724;
    padding: 5px 10px;
    border-radius: 12px;
    font-weight: 500;
    text-align: center;
    display: inline-block;
}

.table-footer {
    padding: 12px 15px;
    color: #6c757d;
    font-size: 12px;
}

/* --- Styles pour la Modale --- */
.modal {
    display: none; /* Cachée par défaut */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* Fond semi-transparent */
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Styles pour le formulaire dans la modale */
#taskForm {
    display: flex;
    flex-direction: column;
}

#taskForm h2 {
    margin-top: 0;
    text-align: center;
}

#taskForm label {
    margin-top: 12px;
    font-weight: 500;
    font-size: 14px;
}

#taskForm input, #taskForm select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-sizing: border-box; /* Important pour que le padding ne change pas la largeur */
}

#taskForm button {
    margin-top: 20px;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

#taskForm button:hover {
    background-color: #0056b3;
}