/* ===== FONTS ===== */

/* Roboto */
@font-face {
    font-family: 'Roboto';
    font-weight: 200;
    src: url('../fonts/Roboto/Roboto-Light.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/Roboto/Roboto-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto';
    font-weight: 500;
    src: url('../fonts/Roboto/Roboto-Medium.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto';
    font-weight: 700;
    src: url('../fonts/Roboto/Roboto-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto';
    font-weight: 900;
    src: url('../fonts/Roboto/Roboto-Black.ttf') format('truetype');
}

/* Merriweather */
@font-face {
    font-family: 'Merriweather';
    font-weight: 400;
    src: url('../fonts/Merriweather/Merriweather-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Merriweather';
    font-weight: 300;
    src: url('../fonts/Merriweather/Merriweather-Light.ttf') format('truetype');
}

@font-face {
    font-family: 'Merriweather';
    font-style: italic;
    font-weight: 300;
    src: url('../fonts/Merriweather/Merriweather-LightItalic.ttf') format('truetype');
}

@font-face {
    font-family: 'Merriweather';
    font-style: italic;
    font-weight: 400;
    src: url('../fonts/Merriweather/Merriweather-Italic.ttf') format('truetype');
}

@font-face {
    font-family: 'Merriweather';
    font-weight: 700;
    src: url('../fonts/Merriweather/Merriweather-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Merriweather';
    font-weight: 700;
    font-style: italic;
    src: url('../fonts/Merriweather/Merriweather-BoldItalic.ttf') format('truetype');
}

@font-face {
    font-family: 'Merriweather';
    font-weight: 900;
    src: url('../fonts/Merriweather/Merriweather-Black.ttf') format('truetype');
}

@font-face {
    font-family: 'Merriweather';
    font-style: italic;
    font-weight: 900;
    src: url('../fonts/Merriweather/Merriweather-BlackItalic.ttf') format('truetype');
}


.cke_notifications_area {
    display: none !important;
}
.label-required-empty {
    color: #dc3545 !important;
}

.label-required-filled {
    color: #28a745 !important;
}

.input-required-empty {
    border-color: #dc3545 !important;
}

.input-required-filled {
    border-color: #28a745 !important;
}

.input-group-text.check-valid {
    background-color: #fff !important;
    color: #28a745 !important;
    border: 1px solid #28a745 !important;
}
input[type=checkbox][disabled]{
    outline:1px solid red;
    color:red;
}
input[type=checkbox][disabled]:checked{
    outline:3px solid red;
}

.connect_error {
    background-color: #d9534f;
    color: #fff;
    font-weight: bold;
    padding: 10px 15px;
    text-align: center;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid #d43f3a;
}

.login-box-body {
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-box-msg img {
    max-width: 100%;
    height: auto;
}
.card {
    border-top: solid 2px #f39c12;
}
.media-dropzone {
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.media-dropzone.dragover {
    border-color: #00a65a;
    background-color: #f0f9f4;
}

.media-placeholder {
    padding: 40px 20px;
}

.media-preview img {
    display: block;
    margin: 0 auto;
}

.media-actions {
    text-align: center;
}

.media-metadata {
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.media-metadata label {
    font-weight: 600;
    margin-bottom: 5px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.media-item {
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.media-item:hover {
    border-color: #00a65a;
    box-shadow: 0 2px 8px rgba(0, 166, 90, 0.2);
    transform: translateY(-2px);
}

.media-item-image {
    width: 100%;
    height: 140px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f5f5f5;
}

.media-item-title {
    padding: 8px;
    background-color: #f8f9fa;
    font-size: 12px;
    text-align: center;
    height: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

.pagination-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
}

.autocomplete-tags {
    min-height: 40px;
    margin-top: 10px;
}
.ui-autocomplete {
    max-height:200px;
    overflow-y:auto;
}
.tag_value {
    display: inline-block;
    border-radius: 5px;
    padding: 5px 10px;
    background-color: #00a65a;
    color: #ffffff;
    margin: 0 5px 5px 0;
    font-size: 13px;
}

.tag_value .remove {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
}

.tag_value .remove:hover {
    color: #ffcccc;
}
.select2-container--default .select2-selection--multiple {
    border: 1px solid var(--gray-border);
    border-radius: 4px;
    min-height: 32px;
    padding: 3px;
    background-color: #fff;
}
.select2-container--default.select2-container--focus
.select2-selection--multiple {
    border-color: var(--green-main);
    box-shadow: 0 0 0 0.15rem rgba(46, 125, 50, 0.2);
}
.select2-container--default
.select2-selection--multiple
.select2-selection__choice {
    background-color: var(--green-light);
    border: 1px solid var(--green-border);
    color: var(--green-main);
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 12px;
}
.select2-selection__choice__remove {
    color: var(--green-main);
    margin-right: 4px;
}

.select2-selection__choice__remove:hover {
    color: #b71c1c;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--green-main);
    color: #fff;
}
.select2-container .select2-selection--multiple {
    max-height: 64px;
    overflow-y: auto;
}


.main-footer {
    text-align: right;
    font-size: 14px;
}
#resultlist {
    font-size: 14px;
}
#resultlist tr td {
    padding-bottom: 5px;
    line-height: 14px;
}
.toolbar {
    width: 100%;
    padding: 0 10px;
}

.toolbar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-row-main {
    min-height: 50px;
}

/* Gauche */
.toolbar-left {
    flex-shrink: 0;
}

/* Espace extensible */
.toolbar-spacer {
    display: flex;
    justify-content: space-between;
    width: 100%;

}

/* Pagination */
.toolbar-pages {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

élément {
}
.pagination-sm .page-item:first-child .page-link {
    border-top-left-radius: .2rem;
    border-bottom-left-radius: .2rem;
}
.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;

}
.page-item:first-child .page-link {
    margin-left: 0;
    border-top-left-radius: .25rem;
    border-bottom-left-radius: .25rem;
}
.pagination-sm .page-link {
    padding: .25rem 1rem;

    font-size: .875rem;
    line-height: 2;
}
/* Recherche */
.toolbar-search {
    width: 250px;
    flex-shrink: 0;
}

/* Ligne secondaire */
.toolbar-row-secondary {
    margin-top: 10px;
    padding-left: 100px;
}
/* Conteneur des filtres */
.toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px 25px;
}

/* Un couple label + input */
.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Label */
.filter-label {
    font-weight: bold;
    white-space: nowrap;
}

/* Input */
.filter-control select,
.filter-control input {
    min-width: 150px;
}

/* Variante large (date, search, etc.) */
.filter-item-wide .filter-control {
    min-width: 230px;
}

/* Scroll personnalisé */
.card-body > div {
    scrollbar-width: thin;
    scrollbar-color: #00a65a #f4f4f4;
}

.card-body > div::-webkit-scrollbar {
    width: 8px;
}

.card-body > div::-webkit-scrollbar-track {
    background: #f4f4f4;
}

.card-body > div::-webkit-scrollbar-thumb {
    background: #00a65a;
    border-radius: 4px;
}

.card-body > div::-webkit-scrollbar-thumb:hover {
    background: #008d4c;
}

/* En-tête fixe */
.thead-light {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6;
}

/* Scroll personnalisé */
.card-body > div {
    scrollbar-width: thin;
    scrollbar-color: #f39c12 #f4f4f4;
}

.card-body > div::-webkit-scrollbar {
    width: 8px;
}

.card-body > div::-webkit-scrollbar-track {
    background: #f4f4f4;
}

.card-body > div::-webkit-scrollbar-thumb {
    background: #f39c12;
    border-radius: 4px;
}

.card-body > div::-webkit-scrollbar-thumb:hover {
    background: #e08e0b;
}

/* Scroll personnalisé */
.card-body > div {
    scrollbar-width: thin;
    scrollbar-color: #007bff #f4f4f4;
}

.card-body > div::-webkit-scrollbar {
    width: 8px;
}

.card-body > div::-webkit-scrollbar-track {
    background: #f4f4f4;
}

.card-body > div::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 4px;
}

.card-body > div::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Styles pour les stats */
.stat-block {
    margin-bottom: 1.5rem;
}

.stat-block:last-child {
    margin-bottom: 0;
}

.stat-block h6 {
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.stat-block ul li {
    padding: 0.25rem 0;
}

/* Pagination custom */
.pagination .page-link {
    border-radius: 0.25rem;
    margin: 0 0.125rem;
}

/* Badges dans tableaux */
.table .badge {
    font-size: 0.875rem;
}

/* Responsive table improvements */
.table-responsive {
    border-radius: 0.25rem;
}

.table th {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

/* Cards stats */
.card-header h5 {
    font-size: 1.1rem;
}

/* Formulaires */
.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}


@media (max-width: 768px) {
    /* Labels à gauche au lieu de droite sur mobile */
    .text-sm-right {
        text-align: left !important;
    }

    /* Boutons pleine largeur */
    .btn {
        margin-bottom: 10px;
    }

    /* Cards moins de padding */
    .card-body {
        padding: 10px;
    }

    /* Cacher colonnes non essentielles dans tableaux */
    .table .d-none-mobile {
        display: none !important;
    }
    .toolbar-row-secondary {
        display: none !important;
    }
    .toolbar-filters {
        display: none !important;
    }
    .toolbar-pages span {
        display: none !important;

    }

    /* Forcer le tableau à ne pas wrapper */
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        display: block;
        width: 100%;
    }

    .table-responsive .table {
        width: max-content;
        min-width: 100%;
        white-space: nowrap;
    }

    /* Empêcher le retour à la ligne dans les cellules */
    .table td,
    .table th {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Réduire padding pour gagner de la place */
    .table td,
    .table th {
        padding: 0.5rem 0.25rem;
        font-size: 0.85rem;
    }

    .toolbar btn {
        width: 50px;
    }

    .toolbar-row-main {
        display: flex;
        flex-wrap: wrap;
    }

    /* Ligne 1 : Retour à gauche */
    .toolbar-left {
        order: 1;
        flex: 0 0 auto;
    }

    /* Ligne 1 : Enregistrer à droite */
    .toolbar-right {
        order: 2;
        flex: 0 0 auto;
        margin-left: auto;
    }

    /* Ligne 2 : Boutons du milieu en dessous, pleine largeur */
    .toolbar-spacer {
        order: 3;
        flex: 0 0 100%;
        display: flex;
        gap: 10px;
        margin-top: 10px;
        justify-content: center;
        align-items: center;
    }

    .toolbar-spacer > div {
        flex: 1;
        max-width: 50%;
    }

    .toolbar-spacer .btn {
        width: 100%;
        font-size: 0.85rem;
        padding: 0.5rem;
    }
}