/* ******************************************************* */
/* BODY                           */
/* ******************************************************* */

body {
    font-family: Roboto, 'Segoe UI', verdana, arial, sans-serif;
    font-size: 1.2em;
}

/* ******************************************************* */
/* MODE DEBUG                         */
/* ******************************************************* */

div#container-mode-debug {
    position: absolute;
    top: 0px;
    height: 25px;
    width: 99%;
}

div#mode-debug {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1em;
    background-color: #17aa0c;
    border-left: 2px solid #fff;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    color: #FFF;
    font-weight: bold;
    width: 250px;
    text-align: center;
    padding-right: 10px;
    z-index: 10;
}

/* ******************************************************* */
/* TOOLTIP                            */
/* ******************************************************* */

.tooltip.show {
    opacity: 1;
    color: #fff;
}

/* ******************************************************* */
/* LOGOUT                             */
/* ******************************************************* */

div#logout {
    font-size: 1.3em;
}

div#logout a {
    padding-left: 20px;
}

div#logout a,
div#logout a:visited,
div#logout a:hover {
    color: #0F5132;
}

/* ******************************************************* */
/* VIEW ENTITIES                      */
/* ******************************************************* */

div.mainContent {
    margin-bottom: 30px
}

div.mainContent table {
    font-size: 1.2em;
}

div.mainContent div.table-responsive {
    margin-bottom: 20px;
}

div.mainContent table.viewEntities {
    margin-top: 20px;
}

div.mainContent table.viewEntities th {
    border-left: 1px solid #fff;
    font-weight: normal;
}

div.mainContent table.viewEntities th:first-child {
    border-left: 1px solid #000;
}

div.mainContent table.viewEntities th a,
div.mainContent table.viewEntities th a:active div.mainContent table.viewEntities th a:visited {
    color: #fff;
    text-decoration: none;
}

div.mainContent table.viewEntities th a svg {
    margin-bottom: 5px;
    margin-left: 20px;
}

div.mainContent table.viewEntities td.actions {
    width: 55px;
    text-align: center;
}

div.mainContent a.btn-add-entity {
    margin-bottom: 20px;
}

label.label-filter {
    color: #808080;
    font-style: italic;
    margin-left: 2px;
}

/* BOUTON RETOUR EN HAUT */
#scrollUp {
    position: fixed;
    bottom: 20px;
    left: 10px;
    z-index: 100000;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #c0144f 0%, #a00c45 100%);
    color: white;
    border: none;
    border-radius: 30%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2),
        0 6px 10px 0 rgba(0, 0, 0, 0.14),
        0 1px 18px 0 rgba(0, 0, 0, 0.12);
    visibility: hidden;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#scrollUp.active {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
}

#scrollUp:hover {
    background: linear-gradient(135deg, #AA0C4F 0%, #8a0a3f 100%);
    box-shadow: 0 5px 8px -2px rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
}

#scrollUp:active {
    transform: scale(0.95);
}

/* ==================== */
/* PAGINATION      */
/* ==================== */

.pagination-minimal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 1rem;
}

.pagination-minimal .minimal-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-minimal .minimal-info {
    white-space: nowrap;
}

.pagination-minimal .form-select {
    width: auto;
    min-width: 70px;
}

.pagination-minimal .results-badge {
    background: #c8c8c8;
    padding: 0.4rem 0.9rem;
    border-radius: 10px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #000 !important;
}

.fw-bold {
    font-weight: bold;
}

/* ******************************************************* */
/* AJOUT / MODIFICATION                     */
/* ******************************************************* */

div#divManageEntity form#manageEntity {
    border: 1px solid #808080;
    border-radius: 10px;
    padding: 10px;
    margin: 0 0.02rem;
    text-align: left;
    background-color: #FFF;
}

div#divManageEntity form#manageEntity div.row {
    margin-top: 20px;
}

div#divManageEntity form#manageEntity label.form-label {
    color: #808080;
    font-size: 1.1em;
}

div#divManageEntity form#manageEntity label.form-label-required:after {
    color: red;
    content: "*";
    padding-left: 5px;
}

div#divManageEntity form#manageEntity div.img {
    margin: 15px 0 0 0;
    padding: 6px;
    width: fit-content;
    block-size: fit-content;
    border: 1px solid #808080;
    border-radius: 5px;
}

div#divManageEntity form#manageEntity input[type="checkbox"]:hover,
div#divManageEntity form#manageEntity label.form-check-label:hover,
div#divManageEntity form#manageEntity div.img {
    cursor: pointer;
}

div#divManageEntity form#manageEntity .btnInvalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + .75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

div#divManageEntity form#manageEntity .btnValid {
    border-color: #198754;
    padding-right: calc(1.5em + .75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

div#divManageEntity form#manageEntity .checkBoxValid {
    color: #198754;
    border-color: #198754;
}

div#divManageEntity form#manageEntity .checkBoxInValid {
    color: #dc3545;
    border-color: #dc3545;
}

div#divManageEntity form#manageEntity .icon-calendar {
    cursor: pointer;
}

div#divManageEntity form#manageEntity .icon-calendar .input-group-text {
    border-radius: 0;
    border-top-right-radius: 0.375em !important;
    border-bottom-right-radius: 0.375em !important;
}

div#divManageEntity form#manageEntity .icon-calendar .fa {
    line-height: unset;
}

div#divManageEntity #formButtonsSubmitCancel .col-md-12 {
    display: flex;
    gap: 25px;
    margin-top: 20px;
}

/* ROW-BLOC DE SAISIE */
div.row-block {
    border-radius: 7px;
    border: 1px solid #6b6b6b;
    background-color: #f1f1f1;
    padding: 10px 10px 15px 10px;
    margin: 10px;
    width: 98%;
}

/* COMMENT-BLOCK */
div.form-readonly-block {
    font-size: 1.1em;
}

/* CASES A COCHER */
.checklist-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.checklist-item {
    padding-right: 40px;
}

/* COUNTER du TEXTAREA */
span.textarea-counter {
    display: inline-block;
    margin-bottom: 20px;
}

/* ******************************************************* */
/* SUPPRESSION - NO REMOVABLE                 */
/* ******************************************************* */

div#noRemovableEntity {
    margin-top: 100px;
}

div#noRemovableEntity .alert-danger {
    border: 1px solid #AA0C4F;
    padding-top: 30px;
    font-weight: bold;
}

div#noRemovableEntity a.button {
    margin: 40px auto 25px auto;
    display: block;
    width: 50%;
}

/* ******************************************************* */
/* MODIFICATION - NO UPDATABLE                */
/* ******************************************************* */

div#noUpdatableEntity {
    margin-top: 100px;
}

div#noUpdatableEntity .alert-danger {
    border: 1px solid #AA0C4F;
    padding-top: 30px;
    font-weight: bold;
}

div#noUpdatableEntity a.button {
    margin: 40px auto 25px auto;
    display: block;
    width: 50%;
}

/* ******************************************************* */
/* VIEW ENTITY                        */
/* ******************************************************* */

div#viewEntity {
    border: 1px solid #808080;
    border-radius: 10px;
    margin: 20 0.02rem;
    padding: 20px;
    background-color: #FFF;
    font-size: 1.2em;
}

div#viewEntity div.data-block {
    margin-bottom: 30px;
    border: 1px solid #808080;
    background-color: #eae8e8;
    border-radius: 10px;
    padding: 10px;
}

div#viewEntity span.label {
    font-weight: bold;
    color: #808080;
}

/* ------------------------------------------ */
/* RETOUR A LA LISTE DE RESULTATS */

div.div-btn-nav-entity {
    margin-top: 40px;
}

button.btn-nav-entity {
    width: 50px;
    font-weight: bold;
    font-size: 1.3em;
}

div.return-list {
    margin-top: 20px;
}

/* ------------------------------------------ */

/* ******************************************************* */
/* PAGE DE MAINTENANCE                     */
/* ******************************************************* */

div.maintenance-app {
    width: 50%;
    margin: auto;
}

div.maintenance-app h2 {
    margin-bottom: 30px;
}

div.maintenance-app div.signature {
    margin-top: 25px;
    font-style: italic;
}

/* ******************************************************* */
/* LOGOUT                             */
/* ******************************************************* */

div.logout {
    margin: 100px auto 0 auto;
    width: 50%;
    text-align: center;
}

/* ******************************************************* */
/* MSG EXCEPTION                         */
/* ******************************************************* */

div.msg-exception {
    z-index: 5;
    margin: 20px;
    text-align: left;
}

div.msg-exception h4 {
    font-size: 1.5em;
    font-weight: bold;
}

div.msg-exception p {
    font-size: 1.1em;
}

/* ******************************************************* */
/* STYLE PERSONNALISÉ POUR JQUERY UI AUTOCOMPLETE       */
/* ******************************************************* */

/* Container de la liste autocomplete */
.ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    /* Style Bootstrap moderne */
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175) !important;
    font-size: 1rem !important;
    background-color: #fff !important;
    padding: 0 !important;
    z-index: 1050 !important;
}

/* Items de la liste - RÉDUIRE L'ESPACE */
.ui-menu-item {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border-bottom: 1px solid #f8f9fa;
}

.ui-menu-item:last-child {
    border-bottom: none;
}

/* Lien dans chaque item - CONTRÔLER LE PADDING */
.ui-menu-item-wrapper {
    display: block !important;
    padding: 0.5rem 1rem !important;
    /* Ajustez ici : 0.5rem = moins d'espace, 1rem = plus d'espace */
    color: #212529 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease-in-out !important;
    border: none !important;
}

/* Hover et état actif - Style Bootstrap bleu */
.ui-menu-item-wrapper:hover,
.ui-menu-item-wrapper.ui-state-active {
    background-color: #4f8fef !important;
    color: #fff !important;
    border: none !important;
    font-weight: normal !important;
}

/* Retirer les styles par défaut de jQuery UI */
.ui-state-active,
.ui-state-focus {
    margin: 0 !important;
    border: none !important;
}

/* Style pour texte en surbrillance (match de recherche) */
.ui-menu-item-wrapper strong {
    font-weight: 600;
}

/* ==================== */
/* FILTRES         */
/* ==================== */

/* Masquer COMPLÈTEMENT le contenu jusqu'à initialisation */
#collapseFilters:not(.js-initialized) * {
    display: none !important;
}

/* Forcer l'absence totale d'animation au chargement */
.accordion-collapse:not(.js-initialized) {
    transition: none !important;
    -webkit-transition: none !important;
}