* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.bodyAdmin {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    padding: 20px;
    text-align: center;
}

.containerAdmin {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
}

/* Alignement et style des onglets */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
    flex-wrap: wrap; /* Les boutons se replieront en plusieurs lignes sur les petits écrans */
}

.tab-button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
    font-size: 1rem;
    flex: 1; /* Les boutons prennent la largeur disponible */
    text-align: center;
    margin-bottom: 5px;
}

.tab-button:last-child {
    margin-right: 0;
}

.tab-button.active {
    background-color: #0056b3;
}

/* Conteneur pour chaque onglet */
.tab-container {
    margin-top: 20px;
    position: relative;
}

/* Contenu des onglets */
.tab-content {
    display: none;
    background-color: white;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 0 5px 5px 5px;
    position: relative;
    top: 0;
    z-index: 1;
    text-align: left;
}

.tab-content.active {
    display: block;
}

/* Style pour les tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-spacing: 0;
    background-color: white;
    overflow-x: auto;
}

table th, table td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: left;
    font-size: 14px;
}

/* Boutons d'actions dans les tables */
button.edit-btn, button.delete-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    margin-right: 5px;
}

button.delete-btn {
    background-color: #dc3545;
}

button.add-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 2%;
    width: 100%; /* Prend la largeur totale sur petit écran */
    display: block;
    text-align: center;
}

/* Responsive styles using media queries */
@media (max-width: 768px) {
    .containerAdmin {
        padding: 15px;
        max-width: 100%; /* Utilise toute la largeur de l'écran */
    }

    table th, table td {
        font-size: 12px; /* Réduit la taille du texte dans les tableaux */
        padding: 8px;
    }

    .tab-button {
        flex: 100%; /* Les boutons prennent toute la largeur sur mobile */
        margin-bottom: 5px;
        padding: 10px;
    }

    button.add-btn {
        width: 100%; /* Le bouton Ajouter prend toute la largeur sur mobile */
    }
}

@media (max-width: 480px) {
    /* Styles spécifiques pour les très petits écrans */
    .tab-content {
        padding: 15px; /* Réduit le padding pour plus d'espace */
    }

    table th, table td {
        font-size: 11px; /* Réduit encore plus la taille du texte */
    }

    button.edit-btn, button.delete-btn {
        padding: 5px 8px; /* Réduit les tailles de bouton pour les petits écrans */
    }
}

.category-separator {
    background-color: #f0f0f0;
    font-weight: bold;
    text-align: center;
}
