/* --- RESET DE BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- GLOBAL --- */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
}

/* --- MENU PRINCIPAL --- */
.menu-principal {
    background: linear-gradient(90deg, #333, #444);
    padding: 10px 0;
    box-shadow: 0 4px 80px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.menu-principal ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.menu-principal li {
    display: inline-block;
}

.menu-principal a {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 16px;
    transition: background 0.3s ease, transform 0.3s ease;
    gap: 10px;
    border-radius: 5px;
}

.menu-principal a i {
    font-size: 18px;
}

.menu-principal a:hover {
    background: #575757;
    transform: scale(1.05);
}

.menu-principal a.active {
    background: #04AA6D;
    color: white;
    font-weight: bold;
}

/* --- CONTAINER GLOBAL POUR LE CONTENU --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 50px auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* --- TABLEAU DE BORD --- */
.dashboard-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 100px); /* Hauteur totale moins le menu */
}

.dashboard-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.dashboard-box h1 {
    font-size: 2em;
    color: #04AA6D;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.dashboard-box .welcome-message {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #555;
}

.dashboard-box .role-info {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #04AA6D;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.dashboard-box .btn-logout {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1em;
    color: white;
    background-color: #04AA6D;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dashboard-box .btn-logout:hover {
    background-color: #038857;
}

/* --- FORMULAIRES --- */
form {
    margin: 20px 0;
}

form label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

form input, form select, form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

form button {
    padding: 10px 20px;
    border: none;
    background: #04AA6D;
    color: white;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

form button:hover {
    background: #038857;
}

/* --- TABLES --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

table th {
    background-color: #f4f4f9;
    color: #333;
    font-weight: bold;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #f1f1f1;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .menu-principal ul {
        flex-direction: column;
        align-items: center;
    }

    .menu-principal a {
        font-size: 14px;
        padding: 8px 10px;
    }

    .dashboard-box h1 {
        font-size: 1.8em;
    }

    .dashboard-box .welcome-message,
    .dashboard-box .role-info {
        font-size: 1em;
    }

    .dashboard-box .btn-logout {
        font-size: 0.9em;
        padding: 8px 15px;
    }

    table th, table td {
        font-size: 0.9em;
        padding: 8px;
    }
}

/* --- ONGLETS --- */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    margin: 0 5px;
    border: none;
    background-color: #ddd;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 5px;
}

.tab-btn.active {
    background-color: #04AA6D;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* --- TABLE STYLÉE --- */
.styled-table {
    width: 100%;
    border-collapse: collapse;
}

.styled-table th, .styled-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

.styled-table th {
    background-color: #f4f4f4;
}

.styled-table td input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* --- BOUTONS PERSONNALISÉS --- */
.btn-primary {
    background-color: #04AA6D;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #038857;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-danger:hover {
    background-color: #b02a37;
}

.btn-secondary {
    background-color: #ffc107;
    color: black;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #e0a800;
}
/* Tableau de bord */
/* Tableau de bord */
/* Grille de statistiques : Affichage en colonnes */
.dashboard-grid {
    display: flex; /* Utiliser Flexbox pour organiser les cartes horizontalement */
    flex-wrap: wrap; /* Permet aux cartes de passer à la ligne si l'espace est insuffisant */
    gap: 20px; /* Espacement entre les cartes */
    justify-content: center; /* Centrer les cartes horizontalement */
    margin-top: 20px;
}

/* Cartes des statistiques */
.stat-card {
    flex: 1 1 calc(33.33% - 40px); /* Prendre 1/3 de l'espace disponible, moins les marges */
    max-width: 300px; /* Limite maximale pour chaque carte */
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.stat-card h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #04AA6D;
    text-transform: uppercase;
}

.stat-card .stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stat-card {
        flex: 1 1 100%; /* Chaque carte occupe toute la largeur sur les petits écrans */
        max-width: none;
    }

    .dashboard-grid {
        gap: 10px; /* Réduire l'espacement entre les cartes sur les écrans étroits */
    }
}
/* Couleurs différenciées pour les cartes */
.stat-card.total {
    background-color: #04AA6D; /* Vert pour Colis Total */
    color: white;
}

.stat-card.total h2,
.stat-card.total .stat-number {
    color: white;
}

.stat-card.en-agence {
    background-color: #007BFF; /* Bleu pour En Agence */
    color: white;
}

.stat-card.en-agence h2,
.stat-card.en-agence .stat-number {
    color: white;
}

.stat-card.en-livraison {
    background-color: #FFC107; /* Jaune pour En Livraison */
    color: #333;
}

.stat-card.en-livraison h2,
.stat-card.en-livraison .stat-number {
    color: #333;
}

.stat-card.livres {
    background-color: #17A2B8; /* Cyan pour Livrés */
    color: white;
}

.stat-card.disponible {
    background-color: #9f9ee2; /* Cyan pour Disponible */
    color: white;
}

.stat-card.livres h2,
.stat-card.livres .stat-number {
    color: white;
}

.stat-card.utilisateurs {
    background-color: #6C757D; /* Gris pour Utilisateurs */
    color: white;
}

.stat-card.utilisateurs h2,
.stat-card.utilisateurs .stat-number {
    color: white;
}

.stat-card.agences {
    background-color: #DC3545; /* Rouge pour Agences */
    color: white;
}

.stat-card.agences h2,
.stat-card.agences .stat-number {
    color: white;
}
.stat-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.dashboard-header {
    text-align: center;
    margin-bottom: 20px;
    background-color: #f4f4f4;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #333;
}

.dashboard-header .dashboard-agency {
    font-size: 1.2em;
    color: #04AA6D;
    font-weight: bold;
}

@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .tab-btn {
        font-size: 14px;
        padding: 10px;
        width: 100%;
        text-align: center;
    }
}


/* Styles généraux pour les boutons avec icônes */
.btn-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;       /* Largeur du bouton */
    height: 40px;      /* Hauteur du bouton */
    border-radius: 50%; /* Boutons ronds */
    text-decoration: none;
    font-size: 18px;   /* Taille de l'icône */
    transition: background-color 0.3s ease, color 0.3s ease;
    color: white;      /* Couleur par défaut de l'icône */
}

/* Bouton d'impression avec un fond jaune */
.btn-icon.print-icon {
    background-color: #FFC107; /* Jaune */
    color: black; /* Icône noire ou contrastée sur jaune */
}

.btn-icon.print-icon:hover {
    background-color: #E0A800; /* Jaune plus foncé au survol */
}

/* Bouton de facture avec un fond vert */
.btn-icon.pdf-icon {
    background-color: #04AA6D; /* Vert */
    color: white;
}

.btn-icon.pdf-icon:hover {
    background-color: #038857; /* Vert plus foncé au survol */
}

/* Style des messages */
.message-box {
    padding: 15px;
    margin: 20px auto;
    max-width: 500px;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
}

.message-box.success {
    background-color: #e6f9ed; /* Fond vert clair */
    color: #2e7d32; /* Texte vert */
    border: 1px solid #2e7d32; /* Bordure verte */
}

.message-box.error {
    background-color: #fdecea; /* Fond rouge clair */
    color: #c62828; /* Texte rouge */
    border: 1px solid #c62828; /* Bordure rouge */
}

.message-box:hover {
    transform: translateY(-5px);
}
/*******************************************************************************/
/* Style de la plaque d'immatriculation */
.license-plate {
    display: inline-block;
    background-color: #333; /* Fond noir */
    color: white; /* Texte blanc */
    padding: 10px 20px;
    font-size: 24px;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    border-radius: 8px; /* Coins arrondis */
    border: 2px solid #FFD700; /* Bordure jaune */
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* Ombre */
    letter-spacing: 2px; /* Espacement entre les lettres */
    width: fit-content; /* Ajuste la largeur au contenu */
}

/* Ajout d'un effet au survol */
.license-plate:hover {
    background-color: #555;
    transform: scale(1.05); /* Zoom léger */
    transition: 0.3s ease-in-out;
}