/* Palette : #78AEAA (Bleu-Vert), #F4F7F9 (Arrière-plan clair), #2c3e50 (Texte foncé) */

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #F4F7F9;
    padding: 20px;
    color: #2c3e50;
    line-height: 1.6;
}

/* --- Global Layout --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px;
}

/* --- Header & Navigation --- */
.header {
    background-color: #78AEAA; 
    color: white;
    padding: 20px 30px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.logo-section h1 {
    display: inline-block;
    margin: 0;
    font-size: 2em;
    vertical-align: middle;
}

.logo-section .fas {
    font-size: 2em;
    margin-right: 15px;
    vertical-align: middle;
}

.main-nav {
    margin-top: 20px;
    display: flex; 
    gap: 15px;
}

.nav-button {
    background-color: #5d9a97; 
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
    flex-grow: 1; 
    text-align: center;
}

.nav-button:hover {
    background-color: #4a7d7a;
}

.nav-button.active {
    background-color: white;
    color: #78AEAA;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-button i {
    margin-right: 8px;
}

/* --- Cards (Widgets) --- */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 25px;
    display: flex;
    flex-direction: column;
    min-height: 400px; /* Assure une uniformité de hauteur */
}

.card-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.card-header h2 {
    font-size: 1.4em;
    margin: 0;
    font-weight: 600;
}

.icon-lg {
    font-size: 1.5em;
    color: #78AEAA;
    margin-right: 10px;
}

.card-body {
    flex-grow: 1;
}

.card-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: right;
}

.card-footer a {
    color: #007BFF;
    text-decoration: none;
    font-weight: 500;
}

/* --- Utilisation FTP (Card 1) --- */
.progress-bar {
    height: 15px;
    width: 100%;
    background: #ddd;
    border-radius: 7px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    background: #78AEAA;
    transition: width 0.5s ease;
}

.percentage {
    font-size: 1.1em;
    font-weight: bold;
    color: #4a7d7a;
}

/* --- Logs (Card 2, 3) --- */
.log-entry {
    border: 1px solid #e1e1e1;
    background: #fafafa;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-size: 0.9em;
}

.log-entry p {
    margin: 3px 0;
}

.filter-form select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 100%;
    margin-bottom: 10px;
}

/* --- Statut Client (Card 4) --- */
.client-status-list {
    list-style: none;
    padding: 0;
}

.client-status-list li {
    padding: 8px 0;
    border-bottom: 1px dotted #e1e1e1;
    font-size: 0.95em;
}

.status-ok { color: #2ecc71; font-weight: 600; } 
.status-nok { color: #e74c3c; font-weight: 600; } 
.status-ok .fas, .status-nok .fas { margin-right: 8px; }

/* --- Heure Système (Card 5) --- */
.time-display p {
    margin: 10px 0;
}
.time-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #34495e;
}
.separator {
    border: none;
    border-top: 1px solid #ccc;
    margin: 15px 0;
}
.countdown {
    font-size: 1.1em;
}

/* --- Purge (Card 6) --- */
.select-field {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 100%;
    margin-top: 5px;
}
.log-size-display {
    margin-top: 25px;
    font-size: 1.3em;
    font-weight: bold;
    color: #34495e;
}
.btn-danger {
    background: #e74c3c; 
    color: white; 
    padding: 10px 15px; 
    border: none; 
    border-radius: 5px; 
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}
.btn-danger:hover {
    background: #c0392b;
}
.form-action-button {
    margin-top: 15px;
}

/* --- Statistiques (Card 7) --- */
.bar-chart-container {
    background:#ddd; 
    border-radius:4px; 
    overflow:hidden; 
    height:10px; 
    margin-bottom:15px; 
    display:flex;
}
.bar-chart-ok {
    background:#2ecc71;
}
.bar-chart-nok {
    background:#e74c3c;
}

/* --- Infos Système (Card 8) --- */
.system-card p i {
    margin-right: 8px;
    color: #78AEAA;
}
.env-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8em;
    text-transform: uppercase;
}
/* --- Header & Navigation - Ajustements pour le Logo --- */

.header-logo {
    /* Styles pour la nouvelle image de logo */
    height: 40px; /* Ajustez cette valeur pour contrôler la hauteur du logo */
    width: auto;
    margin-right: 15px;
    /* Utiliser 'vertical-align: middle' pour aligner l'image et le texte H1 */
    vertical-align: middle; 
}

.logo-section h1 {
    /* S'assurer que le titre est bien aligné */
    display: inline-block;
    margin: 0;
    font-size: 2em;
    vertical-align: middle; /* Ajout/Maintien de l'alignement vertical */
}

/* * Optionnel : Si vous aviez l'ancienne règle .logo-section .fas, 
* vous pouvez la laisser comme commentaire ou la supprimer. 
*/

.env-production { background: #2ecc71; color: white; }
.env-dev { background: #f1c40f; color: #333; }
.env-preprod { background: #95a5a6; color: white; }

/* --- Alertes --- */
.alert-warning, .alert-info, .alert-success {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-weight: 500;
}
.alert-warning { background: #fcf8e3; border: 1px solid #faebcc; color: #8a6d3b; }
.alert-info { background: #d9edf7; border: 1px solid #bce8f1; color: #31708f; }
.alert-success { background: #dff0d8; border: 1px solid #d6e9c6; color: #3c763d; }