:root {
    scroll-behavior: auto !important;
    /* Identité bellonteaviation.com (kit Adobe Fonts ypb3uex) */
    --brand-blue: #0365A5;
    --font-headings: "magistral", sans-serif;
    --tblr-font-sans-serif: "optima-lt-pro", Optima, serif;

    /* Tabler dérive tout le reste (liens, boutons, badges, hover) de ces deux-là
       via color-mix : --tblr-primary-darken, --tblr-primary-lt, --tblr-link-color. */
    --tblr-primary: var(--brand-blue);
    --tblr-primary-rgb: 3, 101, 165;
    --tblr-blue: var(--brand-blue);
    --tblr-blue-rgb: 3, 101, 165;
}

/* Tabler ne déclare pas de font-family sur les titres : ils héritent de body.
   On l'applique explicitement. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.page-title, .page-pretitle, .card-title, .navbar-brand,
.nav-link {
    font-family: var(--font-headings);
}

tr, .card, li {
    scroll-margin-top: 30vh !important;
}


.logo-lg, .logo-mini {
    color: lightgrey;
}

section.content {
    min-height: 1000px;
}


div.page-body {
    margin-bottom: 100px;
}

span.label-tag {
    background-color: #e4e4e4;
    border: 1px solid #aaa;
    margin-right: 5px;
    font-size: 12px;
    font-weight: 400;
    padding: 2px 3px;
    color: black;
}

.logo-lg b, .logo-mini b {
    color: white
}

.text-muted {
    color: lightgray;
}

section.content {
    margin-top: 20px;
}

section.article img {
    max-width: 100%;
}

.content-header > .breadcrumb > li > a.btn {
    color: white;
    text-decoration: none;
    display: inline-block;
}

.content-header > .breadcrumb > li > a.btn.btn-default {
    color: #00a6d9;
}

section.article {
    padding: 20px;
}

pre {
    background-color: #fafafa;
}

.content-header > .breadcrumb > li > a {
    color: #72afd2;
    /* display: inline-block; */
}

.label-default {
    color: white;
}

.info-box-icon {
    font-size: 40px;
}

p.resource-description {
    color: black;
    margin: 0;
    max-height: 40px;
    overflow-y: hidden;
}

.resource-title {
    margin: 2px 0 5px 0;
}

.resource-title img {
    width: 20px;
}

input.form-control.active {
    background-color: var(--tblr-bg-forms) !important;
}

/* ---- Select2 : même rendu que .form-control / .form-select de Tabler ---- */
/* hauteur 40px = padding .5625rem x2 + line-height 1.25rem + bordures */

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    height: auto;
    min-height: 40px;
    font-family: var(--tblr-body-font-family);
    font-size: .875rem;
    font-weight: 400;
    color: var(--tblr-body-color);
    background-color: var(--tblr-bg-forms);
    border: var(--tblr-border-width) solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    box-shadow: var(--tblr-shadow-input);
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.select2-container--default.select2-container--focus .select2-selection,
.select2-container--default.select2-container--open .select2-selection {
    border-color: rgb(130.5, 183, 232);
    outline: 0;
    box-shadow: var(--tblr-shadow-input), 0 0 0 .25rem rgba(var(--tblr-primary-rgb), .25);
}

/* Single */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: .5625rem 3rem .5625rem 1rem;
    line-height: 1.25rem;
    color: var(--tblr-body-color);
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--tblr-tertiary);
}

/* flèche : même chevron que .form-select */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 0;
    right: 1rem;
    width: 16px;
    height: 100%;
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat center / 16px 12px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    height: 38px;
    margin-right: 2.5rem;
    color: var(--tblr-tertiary);
}

/* Multiple : choix de 24px, marges de 7px -> 40px sur une ligne ; texte aligné à 1rem comme un input */
.select2-container--default .select2-selection--multiple {
    padding: 0 5px 7px calc(1rem - 6px);
    cursor: text;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    height: 24px;
    line-height: 22px;
    margin: 7px 6px 0 0;
    background-color: var(--tblr-bg-forms);
    color: var(--tblr-body-color);
    border: 1px solid var(--tblr-border-color);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    height: 100%;
    border-right: 1px solid var(--tblr-border-color);
}

.select2-container--default .select2-selection--multiple .select2-selection__clear {
    margin-top: 10px;
    color: var(--tblr-tertiary);
}

.select2-container .select2-search--inline .select2-search__field {
    height: 24px;
    line-height: 24px;
    margin: 7px 0 0 6px;
}

/* select2.min.css force font-family: sans-serif sur ce champ, qui porte aussi le placeholder */
.select2-container .select2-search--inline .select2-search__field,
.select2-search--dropdown .select2-search__field {
    font-family: var(--tblr-body-font-family);
    font-size: .875rem;
    color: var(--tblr-body-color);
}

.select2-container .select2-search--inline .select2-search__field::placeholder,
.select2-search--dropdown .select2-search__field::placeholder {
    color: var(--tblr-tertiary);
    opacity: 1;
}

/* Dropdown */
.select2-dropdown {
    font-family: var(--tblr-body-font-family);
    font-size: .875rem;
    background-color: var(--tblr-bg-forms) !important;
    color: var(--tblr-body-color) !important;
    border-color: var(--tblr-border-color);
}

.select2-search--dropdown .select2-search__field {
    padding: .375rem .75rem;
    background-color: var(--tblr-bg-forms);
    border: var(--tblr-border-width) solid var(--tblr-border-color) !important;
    border-radius: var(--tblr-border-radius);
}

.select2-container--default .select2-results__option--selected {
    opacity: 0.5;
    background-color: rgb(0, 0, 0, 0.2) !important;
    color: var(--tblr-body-color) !important;
}


.select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: var(--tblr-bg-surface-secondary) !important;
    cursor: not-allowed !important;
}

.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__rendered {
    color: var(--tblr-secondary) !important;
}

.select2-container--default.select2-container--disabled .select2-selection--multiple {
    background-color: var(--tblr-bg-surface-secondary) !important;
    cursor: not-allowed !important;
}

.select2-container--default.select2-container--disabled .select2-selection--multiple .select2-selection__choice {
    color: var(--tblr-secondary) !important;
    border-color: var(--tblr-border-color) !important;
}

img.img-flag {
    width: 20px;
}

.flatpickr-calendar {
    background-color: var(--tblr-bg-forms) !important;
}

.flatpickr-day, .flatpickr-weekday {
    color: var(--tblr-body-color) !important;
}

.daterangepicker {
    background-color: var(--tblr-bg-forms) !important;
    color: var(--tblr-body-color) !important;
}

.daterangepicker .calendar-table {
    background-color: var(--tblr-bg-forms) !important;
}

.daterangepicker .calendar-table .next span, .daterangepicker .calendar-table .prev span {
    border-color: var(--tblr-body-color) !important;
}

.daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date {
    background-color: var(--tblr-bg-forms) !important;
}

.info-box {
    position: relative;
}


th.sorting {
    position: relative;
    cursor: pointer;
    color: #3f9ce8;
}

th.sorting:after {
    content: "";
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    background: url("data:image/svg+xml,<svg xmlns= 'http://www.w3.org/2000/svg' viewBox= '0 0 16 16' width= '16' height= '16' fill= 'none' stroke= 'currentColor' stroke-linecap= 'round' stroke-linejoin= 'round' stroke-width= '1' ><path d= 'M5 7l3 -3l3 3' /><path d= 'M5 10l3 3l3 -3' /></svg>") no-repeat center;
    opacity: .3;
    position: relative;
    left: 3px;
    bottom: -3px;
    font-weight: 900;
    font-size: 12px;
}


th.sorting.sorting_asc:after {
    background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'><path fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1' d='M5 10l3 -3l3 3'/></svg>") no-repeat center;
    opacity: 1;
}


th.sorting.sorting_desc:after {
    background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'><path fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1' d='M5 7l3 3l3 -3'/></svg>") no-repeat center;
    opacity: 1;
}

.layout-top-nav .wrapper .main-header .brand-image {
    height: 45px;
}

#logo {
    height: 80px;
}

.py-100 {
    padding: 100px 0;
}


.clickable-row {
    cursor: pointer;
}

.clickable-row td a {
    padding: 5px;
}

/* lien vide injecté dans la 1re cellule : pas de padding, sinon il crée une ligne en plus */
.clickable-row td a:empty {
    padding: 0;
}


.badge-used {
    color: #fff;
    background-color: #ffca28;
}

.badge-available {
    color: #fff;
    background-color: #9ccc65;
}


@media (min-width: 767.98px) {
    .unitinput {
        max-width: 250px;
    }

    div.input-group:has(.datepicker),
    div.input-group:has(.datetimepicker) {
        width: 250px !important;
    }
}


.unitinput input[type=number]::-webkit-inner-spin-button,
.unitinput input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}


#notifications {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 4001;
    min-width: 300px;
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;

}

span.highlight {
    background-color: #fdeccc;
}

/* En haut à droite : en bas, la notification gênait la barre de navigation mobile et les boutons flottants */
#hijack-notification {
    position: fixed;
    top: 0;
    right: 0;
    max-width: calc(100% - 2rem);
    margin: 1rem;
    z-index: 4000;
    background: #ffe761;
    padding: .375rem .5rem .375rem .875rem;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    font-size: .8125rem;
    line-height: 1.2;
}

#hijack-notification form {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
}

#hijack-notification .hijack-release {
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    padding: .2rem .6rem;
    background: transparent;
    color: #5c4b00;
    font-size: .75rem;
    text-decoration: underline;
}

#hijack-notification .hijack-release:hover {
    background: rgba(0, 0, 0, .08);
}


.has-error input {
    border: 1px solid #d63939;
}


th.sorting:after {
    content: "";
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    background: url("data:image/svg+xml,<svg xmlns= 'http://www.w3.org/2000/svg' viewBox= '0 0 16 16' width= '16' height= '16' fill= 'none' stroke= 'currentColor' stroke-linecap= 'round' stroke-linejoin= 'round' stroke-width= '1' ><path d= 'M5 7l3 -3l3 3' /><path d= 'M5 10l3 3l3 -3' /></svg>") no-repeat center;
    opacity: .3;
}


th.sorting.sorting_asc:after {
    background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'><path fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1' d='M5 10l3 -3l3 3'/></svg>") no-repeat center;
    opacity: 1;
}


th.sorting.sorting_desc:after {
    background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'><path fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1' d='M5 7l3 3l3 -3'/></svg>") no-repeat center;
    opacity: 1;
}

.dataTables_info {
    padding: 10px;
}

#sidebar-menu .nav-main-heading {
    color: #7186a3;
    padding: 1.375rem 1rem 0.375rem;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .0625rem;
}

.input[type=range].form-control {
    width: 100%;

}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 50%, 90% {
        transform: translateX(-10px);
    }
    30%, 70% {
        transform: translateX(10px);
    }
}


.nowrap {
    white-space: nowrap;
}

.sticky-col {
    position: sticky !important;
    left: 0;
    z-index: 1000;
}


input.table-input {
    -moz-appearance: textfield;
    font-size: 0.8rem;
    border: none;
    box-shadow: none;
    min-width: 65px;
}

input.table-input:focus {
    outline: none;
    box-shadow: none;
}


input.table-input::-webkit-outer-spin-button,
input.table-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/* magistral n'existe qu'en 300/500/800 : un 600 remonterait sur le 800 (trop lourd
   pour de la navigation). 500 tombe pile sur le Medium du kit. */
.nav .nav-link {
    font-weight: 500;
}


.card.hover:hover {
    border-color: #3f9ce8;
}

.btn-md {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
}


.card-table tr td:first-child, .card-table tr th:first-child {
    padding-left: 0.75rem;
}

#loader > div {
    background: var(--tblr-bg-forms) !important;
}

body.dark input.form-control.disabled, body.dark input.form-control:disabled {
    color: var(--tblr-gray-300) !important;
    cursor: not-allowed;
}

/* Panneau de recherche mobile : champs empilés, hauteur selon le contenu */
@media (max-width: 767.98px) {
    .list-search-panel.offcanvas-bottom {
        height: auto;
        max-height: 85vh;
    }

    .list-search-panel #searchfields {
        flex-direction: column;
        align-items: stretch !important;
        gap: .5rem !important;
    }

    .list-search-panel #searchfields > .btn {
        width: 100%;
    }
}


#searchfields .mb-3 {
    margin-bottom: 0.2rem !important;
}

#searchfields div {
    min-width: 250px;
}

.modal-content {
    border: 1px solid #F5F8FB;
}

.hover-light:hover {
    background-color: #F5F8FB;
}

body.dark .hover-light:hover {
    background-color: #466082;
}

#th_projet {
    width: 400px;
}

/** flash background color for 1 second then fade it back to white **/
.flash {
    animation: flash 1.5s;
}

@keyframes flash {
    from {
        background-color: #fdeccc;
    }
    to {
        background-color: white;
    }
}

.z-1000 {
    z-index: 1000 !important;
}

.z-2000 {
    z-index: 2000 !important;
}

.z-3000 {
    z-index: 3000 !important;
}

.alert-danger {
    background: #FAEDED !important;
    color: #d63939 !important;
}

.alert-info {
    background: #F6FAFE !important;
    color: #4299E1 !important;
}

.alert-success {
    background: #F5FCF6 !important;
    color: #5CC577 !important;
}

.alert-warning {
    background: #FEFBF2 !important;
    color: #F59F00 !important;
}

body.dark .alert-danger {
    background: #632E2E !important;
    color: #F08080 !important;
}

body.dark .alert-info {
    background: #2A4365 !important;
    color: #63B3ED !important;
}

body.dark .alert-success {
    background: #26432C !important;
    color: #9AE6B4 !important;
}

body.dark .alert-warning {
    background: #665C2B !important;
    color: #D69E2E !important;
}


#stickyButtonBar {
    display: none;
    position: fixed;
    /* posée au-dessus de la tabbar mobile quand elle existe (hauteur mesurée en JS),
       collée au bas de l'écran sinon */
    bottom: var(--mobile-tabbar-height, 0px);
    left: 0;
    right: 0;
    background: var(--tblr-bg-surface);
    border-top: 1px solid var(--tblr-border-color);
    padding: 0.5rem;
    z-index: 1000;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

/* Miniatures d'images dans les tableaux */
img.table-img {
    display: inline-block;
    vertical-align: middle;
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--tblr-border-radius, 4px);
    border: 1px solid var(--tblr-border-color);
    background-color: var(--tblr-bg-surface-secondary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
    cursor: zoom-in;
    transition: transform .15s ease, box-shadow .15s ease;
}

a:hover > img.table-img {
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}

td:has(> a > img.table-img) {
    width: 1%;
    white-space: nowrap;
}


/* Cartes des avions (accueil client, fiche client) */
/* Planes horizontal scroll — peek for next card */
.planes-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 18px;
    margin: 0;
    padding-left: 16px;
    padding-right: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.planes-scroll::-webkit-scrollbar {
    display: none;
}

.plane-card {
    flex: 0 0 calc(100% - 48px);
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid #eaeef4;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px -14px rgba(15, 23, 42, 0.3);
}

@media (min-width: 768px) {
    .plane-card {
        flex: 0 0 calc(50% - 28px);
    }
}

@media (min-width: 1200px) {
    .plane-card {
        flex: 0 0 calc(33.333% - 30px);
    }
}

.plane-photo {
    height: 280px;
    background-size: cover;
    background-position: center;
    position: relative;
}

@media (max-width: 575.98px) {
    .plane-photo {
        height: 200px;
    }
}

.plane-status {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.plane-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.plane-status.ok {
    color: #16a34a;
}

.plane-status.ok::before {
    background: #16a34a;
}

.plane-status.warn {
    color: #d97706;
}

.plane-status.warn::before {
    background: #d97706;
}

.plane-status.busy {
    color: #2563eb;
}

.plane-status.busy::before {
    background: #2563eb;
}

.plane-status.danger {
    color: #DC3545;
}

.plane-status.danger::before {
    background: #DC3545;
}

.plane-body {
    padding: 22px 24px 24px;
}

/* .plane-reg {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--brand-blue);
    text-transform: uppercase;
} */

.plane-model {
    color: #6b7a8f;
    font-size: 13px;
    margin-top: 2px;
}

.plane-specs {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 24px;
}

.plane-spec {
    border-top: 1px dashed #eaeef4;
    padding-top: 10px;
}

.plane-spec .label {
    /* font-family: 'Montserrat', sans-serif; */
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: #6b7a8f;
    text-transform: uppercase;
    white-space: nowrap;
}

.plane-spec .value {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-top: 2px;
}

.plane-photo--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tblr-primary-lt);
    color: var(--tblr-primary);
}


/* Pied de carte cliquable mis en avant (ex. « Request an appointment » sur l'accueil client) */
.card-footer-cta {
    display: block;
    color: var(--brand-blue);
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(90deg, rgba(3, 101, 165, .06) 0%, rgba(3, 101, 165, .16) 100%);
}

.card-footer-cta:hover {
    color: var(--brand-blue);
    text-decoration: none;
    background: linear-gradient(90deg, rgba(3, 101, 165, .12) 0%, rgba(3, 101, 165, .26) 100%);
}
