/* Variables globales pour les couleurs et polices */
:root {
    --primary-color: #F57C00; /* Orange principal */
    --primary-color-dark: #E65100; /* Orange foncé */
    --secondary-color: #333333; /* Gris foncé */
    --secondary-color-light: #555555; /* Gris moyen */
    --secondary-color-ultra-light: #CCCCCC; /* Gris clair */
    --background-color: #f4f4f4; /* Fond clair */
    --white: #ffffff; /* Blanc */
    --text-color: #cccccc; /* Texte clair */
    --text-color-dark: #ffffff; /* Texte sur fond foncé */
    --font-family: 'Roboto', sans-serif;
}

/* Reset global */
body, html {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    height: 100vh;
    background-color: var(--background-color);
    overflow: hidden;
}
/**********************************************/
/* Message flash */
/**********************************************/

.alert-success {
    background-color: #d4edda;
    color: #155724;
}
.alert-error {
    background-color: #f8d7da;
    color: #721c24;
}
.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}


/**********************************************/
/* Page login */
/**********************************************/
/* Police principale d'AQ-Tech */
#login {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#login .login-container {
    text-align: center;
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 300px;
}

#login .logo {
    width: 150px;
    margin-bottom: 20px;
}

#login .login-form {
    display: flex;
    flex-direction: column;
}

#login .login-form h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

#login .login-form label {
    color: var(--secondary-color);
    text-align: left;
    margin-bottom: 5px;
}

#login .login-form input {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
}

#login .login-form button {
    background-color: var(--primary-color);
    color: var(--blanc-aqtech);
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#login .login-form button:hover {
    background-color: var(--primary-color-dark);
}


/**********************************************/
/* Partie principale */
/**********************************************/
/* Conteneur principal */
.container {
    display: flex;
    width: 100%;
    height: 100%;/* Pour le conteneur parent */
    overflow-x: hidden; /* Barre de défilement horizontale */
    overflow-y: hidden; /* Masque la barre verticale (si nécessaire) */
}


/**********************************************/
/* Sidebar */
/**********************************************/

/* Sidebar */
#sidebar {
    width: 200px;
    background-color: var(--secondary-color);
    color: var(--text-color-dark);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: width 0.3s ease;
}

#sidebar #nom_accueil
{
    margin-left: 20px;
    margin-top: 20px;
    font-size : 1.2em;
    font-weight: bold
}

/* Menu principal */
#sidebar .sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 20px 0 0;
    flex-grow: 1;
}

#sidebar .menu-item > a {
    display: flex;
    align-items: center;
    padding: 15px;
    color: var(--text-color-dark);
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease;    
    
}
#sidebar .sidebar-menu > li  
{  
    border-top: 3px solid var(--secondary-color-light); /* Ajout du trait de séparation */
}


#sidebar .menu-item > a:hover {
    background-color: var(--secondary-color-light);
}

#sidebar .menu-item .icon {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
}

/* Sous-menus */
#sidebar .submenu {
    list-style: none;
    padding-left: 20px;
    display: none;
}

#sidebar .sidebar-menu .submenu > li  
{  
    border-top: 1px solid var(--secondary-color-light); /* Ajout du trait de séparation */
}

#sidebar .menu-item.active > .submenu {
    display: block;
}

#sidebar .submenu li a {
    color: var(--text-color);
    font-size: 14px;
    padding: 10px;
    display: block;
    text-decoration: none;
}

#sidebar .submenu li a:hover,
#sidebar .submenu li.active a {
    color: var(--text-color-dark);
    font-weight: bold;
}

/* Logo en bas */
#sidebar .sidebar-logo {
    text-align: center;
    padding: 0px;
    background-color: var(--secondary-color);
}

#sidebar .sidebar-logo img {
    width: 70%;
    height: auto;
    max-width: 150px;
}

#sidebar .sidebar-version
{
    Text-align: center; 
    padding: 10px; 
    font-size: 0.8em;
}


/* Icônes */
.dashboard-icon {
    background-image: url('../images/icons/employe.png');
}
.projet-icon {
    background-image: url('../images/icons/employe.png');
}
.admin-icon {
    background-image: url('../images/icons/employe.png');
}
.profil-icon {
    background-image: url('../images/icons/employe.png');
}



/**********************************************/
/* Zone de contenu principal */
/**********************************************/

/* boite modal */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.modal-content button {
    margin: 10px;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#confirm-btn {
    background-color: #4CAF50; /* Vert */
    color: white;
}

#cancel-btn {
    background-color: #f44336; /* Rouge */
    color: white;
}
/*****************/




.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.table-detail tbody td {
    vertical-align: middle; /* Pour aligner correctement les textes */
}

.small {
    font-size: 0.85em; /* Réduction de la taille du texte pour les sous-totaux */
    color: #666; /* Optionnel : Couleur plus claire */
}

#couts-phases td, #couts-phases th {
    padding: 8px; /* Espacement pour plus de lisibilité */
    vertical-align: top;
}


.main-content {
    flex-grow: 1;
    padding: 0px;
    background-color: var(--background-color);
    overflow-x: auto;
    overflow-y: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    height: 100%;    
    width: 100%;
    white-space: nowrap; /* Empêche le retour à la ligne */
}

.main-content #main-content-int
{
    /*min-width: 1600px;*/
    padding: 10px;
}

.main-content #main-content-int::after {
    content: "";
    display: table;
    clear: both;
}

.main-content label {
    color: var(--secondary-color);
    text-align: left;
    margin-bottom: 5px;
}

.main-content input, .main-content select, .main-content textarea  
{
    padding: 5px;
    margin-bottom: 5px;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
}


.main-content td input, .main-content td select, .main-content td textarea  
{
    width: 90%;
}

.main-content .formulaire .liste_coche input
{
    width: auto;
}

.main-content td textarea  
{
    min-height: 100px;
}

.main-content .btn, .main-content button {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: inline-block;
    text-decoration: none;
}
.main-content .btn.btn-danger {
    background-color: red;
}

.main-content .btn:hover {
    background-color: var(--primary-color-dark);
}
.main-content td .btn, .main-content td button {
    padding: 5px;
}



.main-content .boite
{
    padding: 20px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    margin-bottom: 20px;
}

.main-content .boite.complet
{
width: calc(100%-40px);
}
.main-content .boite.moitier
{
    width: 47.5%;
}
.main-content .boite.tiers
{
width: 50%;
float: left;
}

.main-content .blocfloatdroite
{
    float: right;
    width: 47.5%;
    margin-left: 1%;
}

.main-content .blocfloatdroite .boite.moitier
{
    width: 95%;
    margin-bottom: 10px;
}

.main-content .boite h1 {
    font-size: 24px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    text-align: left;
}

/* Style général du tableau */
.main-content .boite table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Style pour les en-têtes */
.main-content .boite table thead tr {
    background-color: var(--primary-color);
    color: var(--white);
}

.main-content .boite table thead th {
    padding: 10px 5px;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 2px solid var(--primary-color-dark);
}

/* Style pour les lignes */
.main-content .boite table tbody tr {
    transition: background-color 0.3s ease;
}

.main-content .boite table tbody tr:nth-child(even) {
    background-color: var(--background-color);
}

.main-content .boite table tbody tr:hover {
    background-color: var(--secondary-color-ultra-light);
    color: var(--white);
}
.main-content .boite table tbody th {
    padding: 10px 15px;
}


.main-content .boite table.formulaire td:first-child,.main-content .boite table.table-detail td:first-child 

{
    width: 30%; /* Ajustez la largeur selon vos besoins */
}

/* Style pour les cellules */
.main-content .boite table tbody td {
    padding: 5px 5px;
    border-bottom: 1px solid var(--secondary-color-light);
    color: var(--secondary-color);
}


/* Style pour les cellules */
.main-content .boite table tbody td.tabul {
    padding: 10px 25px;
}

/* Style pour les cellules version compact*/
.main-content .boite table.compact tbody td {
    padding-top: 5px;
    padding-bottom: 5px;
}


/* Liens dans les actions */
.main-content .boite table tbody td a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 10px;
    transition: color 0.3s ease;
}

.main-content .boite table tbody td a:hover {
    color: var(--primary-color-dark);
}

.main-content .boite .comment
{
    width: 97%;
    background-color: var(--secondary-color-ultra-light);
    padding: 5px;
    border-radius: 10px;
    
    max-height: 200px;
    overflow-y: auto; /* Ajoute une scroll bar si nécessaire */
}

.main-content .boite .legend_comment
{
    margin-left: 15px;
    font-size: 0.85em;
}

.main-content .boite#commentaires #text-comment,.main-content .boite#commentaires .comment-edit-text
{
    width: 100%;
}

.main-content .boite#commentaires .lien-modif
{
    font-size: 14px; 
    color: var(--primary-color);
    text-decoration: underline; 
    float: right; 
    margin-right: 15px;
}

.main-content .boite#commentaires #commentaires-textes {
    max-height: 600px;
    overflow-y: auto; /* Ajoute une scroll bar si nécessaire */

}

/* Formulaire */
.formulaire-employe label,.formulaire-client label
{
    width: 200px;
    display: inline-block;
}

.input-wrapper {
    display: inline-block;
}


.btn-visibility {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    color: var(--secondary-color-light);
    transition: color 0.3s ease;
}

.btn-visibility:hover {
    color: var(--primary-color);
}

#liste-perm
{
    margin-left: 200px;
}

.action-buttons {
    display: flex;
    justify-content: space-between; /* Place un bouton à gauche et l'autre à droite */
    align-items: center; /* Aligne verticalement si les boutons ont des hauteurs différentes */
    margin-top: 20px; /* Ajoute de l'espace au-dessus des boutons */
}

.action-buttons .btn {
    margin: 0 10px; /* Optionnel : Ajoute un peu d'espace latéral */
}

.filter-form {
    display: flex;
    gap: 10px; /* Espacement entre les éléments */
    align-items: center; /* Aligner les éléments verticalement */
}

.filter-form div {
    display: flex;
    flex-direction: column; /* Empile les labels au-dessus des selects */
    justify-content: center;
    align-items: flex-start;
}

/*************************************/
/* Page profil */
/***************************************/
.profil-info p {
    font-size: 16px;
    margin: 10px 0;
}

#profil-container table
{
    max-width: 700px;
    margin-bottom: 20px;
}

.formulaire-mot-de-passe {
    margin-top: 20px;
}

.formulaire-mot-de-passe .form-group {
    margin-bottom: 15px;
}

.formulaire-mot-de-passe input {
    min-width: 200px;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid var(--secondary-color-light);
    border-radius: 4px;
}

.form-actions {
    margin-top: 20px;
    text-align: center;
}

#profil-mdp
{
    background-color: var(--secondary-color-ultra-light);
    width: 90%;    
    max-width: 700px;
    padding: 10px;    
    border-radius: 8px;
}

#profil-mdp label
{
    display: inline-block;
    width: 250px;
}

.main-content #employe-modifier td input.permission
{
    width: 50px;
}


#achats-table tr.highlight td:first-child
{
    background-color: yellow;
}

#temps-calendrier #semaine-navigation {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

#temps-calendrier #semaine-navigation .btn {
    margin: 0; /* Assurez-vous qu'il n'y a pas d'espacement interne inutile */
}

#temps-calendrier #time-form label
{
    min-width: 150px;
    display: inline-block;
}

/* Tableau des jours de la semaine */
#temps-calendrier #semaine-table {
    width: 100%;
    table-layout: fixed;
}

#temps-calendrier #semaine-table th, #semaine-table td {
    padding: 10px;
    vertical-align: top;
    text-align: center;
}

/* Styles pour chaque cellule */
#temps-calendrier #semaine-table td {
    width: 20%;
    overflow-x: hidden;
}

/* Style de la date */
#temps-calendrier #semaine-table td .date {
    font-weight: bold;
    margin-bottom: 10px;
}

/* Style du bouton "Ajouter un temps" */
#temps-calendrier #semaine-table td .btn {
    margin-bottom: 10px;
}

/* Trait horizontal sous le bouton */
#temps-calendrier #semaine-table td hr {
    margin: 10px 0;
}

/* Liste des temps enregistrés */
#temps-calendrier #semaine-table td ul {
    list-style-type: none;
    padding-left: 0;
    text-align: left;
}

#temps-calendrier #semaine-table td ul li {
    padding: 5px 0;
}

#temps-calendrier .total_time
{
    width: 100%;
    font-weight: bold;
    color: black;
    padding-top: 5px;
    padding-bottom: 5px;
}
#temps-calendrier .total_time.orange
{
    background-color: orange;
}
#temps-calendrier .total_time.green
{
    background-color: green;
}
#temps-calendrier .total_time.red
{
    background-color: red;
}

/* Styles pour chaque cellule */
.colonne-titre-cout {
    width: 10%;
    white-space: nowrap; /* Empêcher les sauts de ligne */
    overflow-x: hidden; /* Masquer le texte qui dépasse */
    text-overflow: ellipsis; /* Ajouter "..." pour indiquer un dépassement */
}

.ReelVsCout
{
    font-weight: bold;
    padding: 3px;

}
.deriveProjet, .Marge0
{
    background-color: red;
}
.Marge60
{
    background-color: green;
}
.Marge40
{
    background-color: greenyellow;
}
.Marge20
{
    background-color: orange;
}

#list_projets_suivi div
{
    padding-right: 3px;
    padding-bottom: 5px;
    padding-top: 5px;
}

#list_projets_suivi .cout-estime
{
    background-color: #4A90E2; /* Bleu clair */
    text-align: center;
    font-weight: bold;
}

#list_projets_suivi .cout-reel
{
    background-color: #5AA469; /* Bleu clair */
    text-align: center;
    font-weight: bold;  
}
.main-content .boite table#list_projets_suivi thead th
{
    border-bottom: none;
}

#list_projets_suivi .bord_gauche
{
    border-left: 3px solid black; /* Bordure épaisse à gauche */
}
#list_projets_suivi .bord_droit
{
    border-right: 3px solid black; /* Bordure épaisse à gauche */
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}


/* Partie remarque en affichage */

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 100%; 
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.stat_temps.red
{
    background-color: red;
}
.stat_temps.green
{
    background-color: green;
}

#statut_filter_list {
    display: flex;
    flex-wrap: wrap;
    gap: 0px;  /* Espacement entre les statuts */
}

.statut-checkbox {
    display: flex;
    align-items: center;
    gap: 0px;  /* Espacement entre la case et le texte */
    white-space: nowrap; /* Empêche les retours à la ligne */
}

.facture_statut.afacturer
{
    background-color: orange;
    font-weight: bold;
}

.facture_echeance.retard
{
    background-color: red;
    font-weight: bold;
}

/* Partie responsive */
@media screen and (max-width: 1600px) {
    body {
      font-size: 12px;
    }
    .main-content .boite.moitier {
        width: 47%;
    }
    .main-content .boite {
        padding: 10px;
    }
  }
