:root {
    --primary-custom: #003f78 !important;
    --primary-custom-contrast: #002d5c !important;
    --secondary: #99B52B !important;
    --secondary-contrast: #7a8b1a !important;
    --green: #38ada9 !important;
    --green-contrast: #079992 !important;
    --blue: #1289A7 !important;
    --blue-contrast: #1d6577 !important;
    --bleu-samaritain: #3c6382 !important;
    --bleu-samaritain-contrast: #193f5c !important;
    --bordeaux: #cf6a87 !important;
    --bordeaux-contrast: #b64a6a !important;
    --violet-c64: #706fd3 !important;
    --violet-c64-contrast: #4343a5 !important;
    --light: #fbfbfb !important;
    --light-contrast: #e0e0e0 !important;
}

html, body {
    height: 100vh;
    background-color: #f5f6fa !important;
}

.fill {
    min-height: 100%;
    height: 100%;
}

a {
    text-decoration: none !important;
}

a:hover {
    text-decoration: none !important;
}

.nav-link:hover, .nav-link:active, a:hover, a:focus, a:active {
    text-decoration: none !important;
    background-color: transparent !important;
    color: var(--primary-custom) !important;
}

/*r*
  CKEditor
*/
.cke_contents {
    height: 900px !important;
}

/**
   Datatable
 */

.dt-search {
    margin: 2rem 0;
}

.dt-buttons {
    margin: 15px 0;
}

.dt-button-collection .dropdown-item.active, .dropdown-item:active {
    background: transparent !important;
}

.buttons-columnVisibility {
    color: #fff !important;
}

.buttons-columnVisibility .active {
    color: #212529 !important;
}

.page-item.active .page-link {
    background-color: #95a5a6 !important;
}

#listingRessourcesTable p {
    display: none;
}

.dt-button-collection a:hover {
    background: #516080 !important;
}

.pagination {
    display: flex;
    justify-content: end;
    align-items: center;
}

.pagination button {
    background-color: var(--primary-custom) !important;
    color: #fff !important;
}

.table-responsive {
    display: block !important;
}

table th {
    text-align: center !important;
}

/**
  Custom Navbar
 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #fff;
    box-shadow: 0 6px 9px #d2d2d2;
}

.navbar-logo img {
    max-height: 100px;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.menu-btn {
    font-size: 26px;
    border: none;
    background: var(--primary-custom);
    color: #fff;
    border-radius: 4px;
    padding: 0 15px;
}

.menu-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 87px;
    left: 66px;
    background-color: #fff;
    border: 1px solid #ededed;
    padding: 20px;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    z-index: 1;
}

.menu-links.active, .welcome-links.active {
    opacity: 1;
}

.menu-links a, .dropdown-item {
    text-decoration: none;
    color: var(--primary-custom) !important;
    margin: 10px 0;
}

.menu-links a:hover, .dropdown-item:hover {
    color: var(--secondary) !important;
    background-color: transparent !important;
}

.submenu {
    display: none;
    flex-direction: column;
    padding: 0 0 0 20px;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    overflow: hidden;
}

.submenu a {
    color: var(--primary-custom);
    text-decoration: none;
    display: block;
}

.submenu a:hover {
    color: var(--secondary);
}

.submenu.active {
    display: flex;
    opacity: 1;
}

.navbar-logo {
    text-align: center;
}

.navbar-right {
    display: flex;
    align-items: center;
    position: relative;
}

.navbar-right span {
    margin-right: 10px;
    color: var(--primary-custom);
}

.chevron-btn {
    font-size: 20px;
    background: none;
    border: none;
    color: var(--primary-custom);
    cursor: pointer;
}

.welcome-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 40px;
    right: 0;
    background-color: #fff;
    border: 1px solid #ededed;
    padding: 20px;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    z-index: 1;
}

.welcome-links a {
    text-decoration: none;
    color: var(--primary-custom);
    margin: 10px 0;
}

.welcome-links a:hover {
    color: var(--secondary);
}

.dropdown-menu li {
    position: relative;
}

.dropdown-menu .dropdown-submenu {
    display: none;
    position: absolute;
    right: 100%;
    top: -7px;
}

.dropdown-menu .dropdown-submenu-right {
    left: 100%;
    right: auto;
}

.dropdown-menu > li:hover > .dropdown-submenu {
    display: block;
}

@media (max-width: 768px) {
    .navigation {
        flex-direction: column;
        gap: 15px;
    }

    .navbar-logo img {
        max-height: 100px;
    }

    .navbar-right {
        margin-top: 10px;
    }

    .menu-links {
        left: 25%;
    }

    .welcome-links {
        right: 15px;
    }
}

/*
    DatePicker
*/
.today, .datepicker-title {
    background-color: var(--primary-custom) !important;
    border-color: var(--primary-custom) !important;
    color: #fff !important;
}

/**
    Extras
 */

.logo {
    max-width: 128px !important;
}

.title {
    font-size: 20px !important;
    font-weight: bold !important;
    margin: 0 !important;
}

.card hr {
    height: 2px;
}

.pointer {
    cursor: pointer
}

.filigrane::after {
    content: " ";
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 1200px;
    background-image: url("/filigrane/filigrane.png");
    background-repeat: repeat-y;
    background-position: center;
    background-size: cover;
    pointer-events: none;
}

#filigrane-preview {
    max-height: 200px;
    display: block;
    margin: auto;
}

#listingSearchRessource {
    position: absolute;
    z-index: 1;
    width: 250px;
    margin-top: 35px;
}

#listingSearchRessource ul {
    list-style: none;
}

.bg-primary-custom {
    background-color: var(--primary-custom) !important;
}

.bg-primary-custom-dark {
    background-color: var(--primary-custom-contrast) !important;
    color: white !important;
}

.bg-blue {
    background-color: var(--blue) !important;
    color: white !important;
}

.bg-blue-dark {
    background-color: var(--blue-contrast) !important;
    color: white !important;
}

.bg-green {
    background-color: var(--green) !important;
    color: white !important;
}

.bg-green-dark {
    background-color: var(--green-contrast) !important;
    color: white !important;
}

.bg-bleu-samaritain {
    background-color: var(--bleu-samaritain) !important;
    color: white !important;
}

.bg-bleu-samaritain-dark {
    background-color: var(--bleu-samaritain-contrast) !important;
    color: white !important;
}

.bg-bordeaux {
    background-color: var(--bordeaux) !important;
    color: white !important;
}

.bg-bordeaux-dark {
    background-color: var(--bordeaux-contrast) !important;
    color: white !important;
}

.bg-violet-c64 {
    background-color: var(--violet-c64) !important;
    color: white !important;
}

.bg-violet-c64-dark {
    background-color: var(--violet-c64-contrast) !important;
    color: white !important;
}

.bg-light {
    background-color: var(--light) !important;
}

.bg-light-dark {
    background-color: var(--light-contrast) !important;
    color: white !important;
}

.bg-primary-custom:hover {
    background-color: var(--primary-custom-contrast) !important;
}

.bg-blue:hover {
    background-color: var(--blue-contrast) !important;
}

.bg-green:hover {
    background-color: var(--green-contrast) !important;
}

.bg-bleu-samaritain:hover {
    background-color: var(--bleu-samaritain-contrast) !important;
}

.bg-bordeaux:hover {
    background-color: var(--bordeaux-contrast) !important;
}

.bg-violet-c64:hover {
    background-color: var(--violet-c64-contrast) !important;
}

.card-anim {
    opacity: 0;
    translate: 0 10px;
    animation: fadeInUp 0.4s ease forwards;
    transition: transform 0.3s ease-in-out;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        translate: 0 0;
    }
}

.card-anim:hover {
    transform: translateY(-15px);
}

.card-dashboard p {
    font-weight: 700 !important;
}

.table thead th {
    border-color: #fff !important;
}

.nav-tabs .nav-link {
    border: none !important;
    color: var(--primary-custom) !important;
    background-color: #fff !important;
}

.nav-tabs .nav-link:focus {
    outline: none !important;
}

.nav-tabs .active {
    background-color: var(--primary-custom) !important;
    color: #FFF !important;
}

.select2-container {
    width: 100% !important;
    z-index: 1099 !important;
}

.form-control, table a {
    color: var(--primary-custom) !important;
}

.flex-basis-50 {
    flex-basis: 50% !important;
}

.btn {
    color: #fff !important;
}

.btn-edit {
    background-color: var(--secondary) !important;
}

.custom-file-label::after {
    content: "Joindre" !important;
}

.text-black {
    color: #000 !important;
}

.modal {
    z-index: 1079 !important;
}

.modal-loading {
    z-index: 1080 !important;
}

/**
    Full Calendar
 */
.fc-center {
    text-transform: uppercase !important;
}

.fc-title {
    color: white !important;
}

/*
   QuillJS
*/
form .ql-editor {
    width: 100% !important;
    height: 600px !important;
}

.ql-align-right {
    text-align: right !important;
}

.ql-align-center {
    text-align: center !important;
}

.ql-align-left {
    text-align: left !important;
}

.ql-tooltip {
    display: none !important;
}

/**
  Medias
*/
@media (min-width: 992px) {
    .nav-item .submenu {
        display: none;
        position: absolute;
        left: 100%;
        top: -7px;
    }

    .nav-item .submenu-left {
        right: 100%;
        left: auto;
    }
}

@media (max-width: 768px) {
    div.dataTables_wrapper div.dataTables_filter input {
        display: block !important;
    }

    .fc-toolbar {
        flex-direction: column
    }

    .navbar-toggler {
        margin: 1rem 0;
    }
}

.vote-feedback {
    position: absolute;
    font-weight: bold;
    font-size: 1.2rem;
    animation: floatUp 0.7s ease-out forwards;
    pointer-events: none;
    z-index: 999;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

.btn-like:active i,
.btn-dislike:active i {
    transform: scale(1.2);
    transition: transform 0.2s;
}

#globalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#globalOverlay.d-none {
    display: none;
}

#globalOverlay .overlay-content {
    text-align: center;
    color: #fff;
}

/* Spinner CSS (clean, sans image) */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* wrapper neutre : ne casse pas Bootstrap */
.dropdown-item-wrapper {
    position: relative;
}

/* sous-menu uniquement */
.dropdown-menu-sub {
    top: 0;
    left: 100%;
    margin-left: .25rem;
    display: none;
}

/* affichage uniquement au hover du LI */
.dropdown-item-wrapper:hover > .dropdown-menu-sub {
    display: block;
}

.setting-sidebar .nav-link {
    text-align: left;
    border-radius: .5rem;
    padding: .65rem .9rem;
    color: #495057;
    transition: background .15s ease, color .15s ease;
}

.setting-sidebar .nav-link:hover {
    background: #f1f3f5;
}

.setting-sidebar .nav-link.active {
    background: #0d6efd;
    color: #fff;
    box-shadow: 0 4px 12px rgba(13, 110, 253, .25);
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    width: 100%;
}