.auth{
    background-image: url('images/background.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    min-height: 100vh;
    background-position: center;
    background-attachment: fixed;
}

.auth h1 {
    font-size: 1.75rem;
}

@media (max-width: 425px) {
    .captcha-line {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

/* Version desktop */
.menu-left {
    height: calc(100vh - 3px);
    background-color: #156db9;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 768px) {
    .menu-left {
        height: auto !important;
        padding-bottom: 20px;
    }
    .menu-left img.menu-logo {
        margin-top: 10px;
        margin-bottom: 10px;
    }
}

@media (min-width: 769px) and (max-width: 990px) {
    .menu-left {
        height: auto !important;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .menu-left img.menu-logo {
        margin-top: 15px;
        margin-bottom: 15px;
    }
}

@media (min-width: 991px) {
    .menu-left {
        height: auto !important;
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

.menu-left hr {
    border-color: white;
}

/* Menu items hover */
.menu-left ul li a {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0.75rem 1rem;
    color: #000;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

/* Icône + texte */
.menu-left ul li i.menu-icon {
    min-width: 24px;
    text-align: center;
    margin-right: 10px; /* Espace entre icône et texte */
}

/* Hover gris clair qui couvre toute la largeur du lien */
.menu-link:hover {
    background-color: #b0b0b0; /* gris clair plus visible */
    color: #000;
    text-decoration: none;
}

/* Ajout d'un petit margin à l'icône pour éviter qu'elle colle à gauche */
.menu-link .menu-icon {
    margin-left: 0.25rem;
    margin-right: 0.5rem;
}

/* Sidebar normale */
#sidebar {
    transition: width 0.3s;
    min-width: 70px;
}

#sidebar .menu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    width: 100%;
    transition: padding 0.3s;
}

/* Quand le sidebar est réduit */
#sidebar.collapsed {
    width: 70px;
}

#sidebar.collapsed .menu-logo {
    display: none;
}

#sidebar.collapsed .menu-text {
    display: none; /* cache le texte mais garde le lien cliquable */
}

#sidebar.collapsed .menu-link {
    justify-content: center; /* centre l'icône */
    padding-left: 0.5rem;    /* espace gauche */
    padding-right: 0.5rem;   /* espace droite */
}

.btn-custom {
    background-color: #156db9;
    color: white;
    border: none;
}
.btn-custom:hover {
    background-color: #4a89c0;
}

@media (max-width: 725px) {
    thead {
        display: none;
    }
}

.list-group-item a {
    width: 100%;
    height: 100%;
    padding: 0.75rem 1.25rem;
    transition: background-color 0.3s ease;
}

.list-group-item {
    padding: 0;
}

.list-group-item a:hover {
    background-color: #d6d8db;
    color: #000;
    text-decoration: none;
}

.flash-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.flash-message {
    display: inline-block;
    text-align: center;
    padding: 0.5rem 1rem; 
    border-radius: 0.25rem;
    white-space: normal;
    word-wrap: break-word; 
}

.btn-dark-grey {
    background-color: #6c757d !important;
    color: #fff !important;
    border: none !important;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.btn-dark-grey:hover {
    background-color: #dc3545 !important;
    color: #fff !important;
}

.actions-group {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
}

.actions-left {
    display: flex;
    gap: 0.3rem;
    overflow-x: auto;
    flex-shrink: 1;
}

.actions-right {
    flex-shrink: 1;
    white-space: nowrap;
}

.actions-group .btn {
    min-width: 80px;
}

@media (max-width: 575px) {
    .actions-group .btn {
        min-width: 75px;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Empêcher les actions de passer à la ligne sur desktop */
@media (min-width: 576px) {

    .actions-left {
        flex-grow: 1;
        justify-content: flex-start;
        flex-wrap: nowrap;
    }

    .actions-right {
        flex-shrink: 0 !important;
        margin-left: auto;
    }

    .actions-group .btn {
        white-space: nowrap;
    }
}

/* Empêche les doubles bordures quand les lignes passent en flex */
.table tr.d-flex td {
    border-bottom: none !important;
    border-top: none !important;
}

/* Et on applique une bordure unique sur la ligne */
.table tr.d-flex {
    border-bottom: 1px solid #dee2e6 !important;
}

.text-custom {
    color: #156db9;
}

.btn-action {
    min-width: 110px !important; /* même largeur pour Quitter/Servir, Monter, Descendre */
    text-align: center;
}

.card-header-primary {
    background-color: #156db9;
    color: white;
}

/* Quand le sidebar est réduit, la colonne de droite doit prendre toute la largeur */
#sidebar.collapsed + .dashboard-right-side {
    width: calc(100% - 70px) !important;
    flex: none !important;
}

/* Star button for fidelity rating system (consolidated) */
.star-btn {
    font-size: 3rem !important;
    padding: 0.25rem !important;
    border: none !important;
    background: none !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
    color: #ddd !important;
    line-height: 1 !important;
}

.star-btn:hover {
    color: #ffc107 !important;
    transform: scale(1.1) !important;
}

.star-btn.active {
    color: #ffc107 !important;
}

.star-btn i {
    font-size: 2rem !important;
    display: inline-block !important;
    color: inherit !important;
}

#starsContainer {
    flex-wrap: wrap !important;
    overflow: hidden !important;
}

@media (max-width: 576px) {
    #starsContainer {
        gap: 0.25rem !important;
        justify-content: flex-start !important;
    }
    .star-btn {
        padding: 0.1rem !important;
        font-size: 3rem !important;
    }
    .star-btn i {
        font-size: 2rem !important;
    }
}
