/* Variables CSS pour faciliter les changements de thème */
:root {
    /*--primary-color: #007bff; /* Bleu typique pour les actions principales */
	--primary-color: #007aba;
    --secondary-color: #6c757d; /* Gris pour les actions secondaires */
    --success-color: #28a745; /* Vert pour succès */
    --error-color: #dc3545; /* Rouge pour erreur */
    --text-color: #333;
    --bg-color: #f8f9fa; /* Arrière-plan léger */
    --card-bg: #ffffff;
    --border-color: #dee2e6;
    --header-bg: #343a40; /* Sombre pour l'entête */
    --header-text: #fbfbfb;
    --font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- En-tête de l'application --- */
.app-header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.app-title {
    margin: 0;
    font-size: 1.8em;
    float: left; /* Aligne le titre à gauche */
}

.main-nav {
    float: right; /* Aligne la navigation à droite */
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    display: inline-block;
    margin-left: 20px;
}

.main-nav ul li a {
    color: var(--header-text);
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover {
    color: var(--primary-color);
}

/* Nettoie le flottement après l'entête */
.app-header .container::after {
    content: "";
    display: table;
    clear: both;
	/*position: relative;*/
}

/* --- Section principale (Contenu) --- */
.app-main {
    padding: 20px 0;
}

.app-logo {
	background-image: url("../img/new_logo.png");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: left;
	height: 100px; /* Ajustez la taille du logo sur la page de login */
}

.section-title {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.content-block {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

/* --- Messages d'alerte --- */
.alert {
    padding: 15px;
    /*margin-bottom: 20px;*/
    border-radius: 4px;
    font-weight: bold;
	position: absolute;
	/*width: 40%;*/
	min-width:300px;
	text-align: center;
    left: 50%;
    transform: translate(-50%, 0);
}

.alert.success {
    background-color: #d4edda;
    color: var(--success-color);
    border: 2px solid #c3e6cb;
}

.alert.error {
    background-color: #f8d7da;
    color: var(--error-color);
    border: 2px solid #f5c6cb;
}

/* --- Boutons --- */
.button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.button.primary {
    background-color: var(--primary-color);
    color: var(--header-text);
}

.button.primary:hover {
    background-color: #0056b3;
    /*transform: translateY(-1px);*/
}

.button.secondary {
    background-color: var(--secondary-color);
    color: var(--header-text);
}

.button.secondary:hover {
    background-color: #5a6268;
    /*transform: translateY(-1px);*/
}

/* --- Formulaires --- */
.data-form .form-group {
    margin-bottom: 20px;
}

.data-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.data-form input[type="text"],
.data-form input[type="date"],
.data-form select,
.data-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box; /* Inclut le padding dans la largeur totale */
    transition: border-color 0.3s ease;
}

.data-form input[type="text"]:focus,
.data-form input[type="date"]:focus,
.data-form select:focus,
.data-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.data-form select[multiple] {
    min-height: 120px; /* Hauteur minimale pour les select multiples */
}

.data-form small {
    display: block;
    color: var(--secondary-color);
    font-size: 0.85em;
    margin-top: 5px;
}

/* --- Tableaux Responsives --- */
.responsive-table {
    list-style: none;
    padding: 0;
    margin: 0;
}

.responsive-table li {
    border-radius: 3px;
    /*padding: 25px 30px;*/
	padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    align-items: center; /* Aligne verticalement les éléments */
}

.responsive-table .table-header {
    background-color: var(--primary-color);
    color: var(--header-text);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: bold;
}

.responsive-table .table-row {
    background-color: var(--card-bg);
    box-shadow: 0px 0px 9px 0px rgba(0,0,0,0.1);
}

.responsive-table .col {
    flex-basis: 25%; /* Par défaut, 4 colonnes */
    padding: 10px 0;
    text-align: left;
}

.responsive-table .col-1 { flex-basis: 35%; }
.responsive-table .col-2 { flex-basis: 30%; }
.responsive-table .col-3 { flex-basis: 15%; }
.responsive-table .col-4 { flex-basis: 5%; } 

.title-container {
	display: flex;
	align-items: center;
	width: 100%;
}
.half-title {
	flex: 1;
}

/* Liens dans les actions de tableau */
.action-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    margin-right: 15px; /* Espacement entre les liens */
    transition: color 0.2s ease;
	cursor: pointer;
}

.action-link:hover {
    color: #0056b3;
}

.action-link i {
    margin-right: 5px; /* Espace entre icône et texte */
}

/* Images d'action (comme delete.png) */
.action-link img {
    height: 20px; /* Ajustez la taille selon vos images */
    vertical-align: middle;
    margin-right: 5px;
}

/* --- Pied de page --- */
.app-footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    color: var(--secondary-color);
    font-size: 0.9em;
    border-top: 1px solid var(--border-color);
}

/* --- Media Queries pour le Responsive Design (Mobile-first) --- */
@media all and (max-width: 767px) {
    .app-header .container {
        text-align: center;
    }
    .app-title {
        float: none;
        margin-bottom: 10px;
    }
    .main-nav {
        float: none;
    }
    .main-nav ul li {
        display: block;
        margin: 5px 0;
    }

    .responsive-table .table-header {
        display: none; /* Cache l'en-tête du tableau sur mobile */
    }

    .responsive-table li {
        display: block; /* Empile les lignes sur mobile */
        margin-bottom: 20px;
        box-shadow: 0px 0px 9px 0px rgba(0,0,0,0.1);
    }

    .responsive-table .col {
        flex-basis: 100%; /* Chaque colonne prend toute la largeur */
        text-align: right;
        padding-left: 50%; /* Espace pour le label */
        position: relative;
    }

    .responsive-table .col::before {
        content: attr(data-label); /* Utilise l'attribut data-label pour afficher le titre de colonne */
        position: absolute;
        left: 10px;
        width: 45%; /* Place le label à gauche */
        text-align: left;
        font-weight: bold;
        color: var(--primary-color);
    }

    .action-link {
        display: block;
        margin-right: 0;
        margin-bottom: 10px;
        text-align: left;
        padding-left: 50%; /* Aligne avec les valeurs */
    }
}