@import url('https://fonts.googleapis.com/css2?family=Exo:ital,wght@0,100..900;1,100..900&display=swap');

html, body {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
}


body {
    background: var(--background);
    color: var(--primary-text);
    font-family: "Exo", serif;
    user-select: none;
}

a {
    text-decoration: none;
    color: var(--primary-text);
}

.fw-bold {
    font-weight: bold;
}

.card {
    background: var(--card-background) !important;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}

textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="file"], select {
    background-color: transparent !important;
    color: var(--primary-text) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0.5rem;
    padding: 10px;
    width: 100%;
    resize: vertical;
    box-sizing: border-box;
}

select {
    height: 44px;
}

input[type="file"] {
    padding: 0 !important;
    padding-right: 10px !important;
    min-height: 44px;
    display: flex;
    align-items: center;
}

input[type="file"]::file-selector-button {
    background-color: var(--border-color) !important;
    color: var(--primary-text) !important;
    border: none !important;
    border-right: 1px solid var(--border-color) !important;
    padding: 12px 16px;
    margin-right: 10px;
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
    background-color: var(--border-color) !important;
    color: var(--primary-text) !important;
}

input[type="color"] {
    -webkit-appearance: none; /* Désactive le style natif Chrome/Safari */
    appearance: none;         /* Pour Firefox et autres */
    background-color: transparent !important;
    padding: 0 !important;
    margin: 5px;
    border: 1px solid var(--border-color) !important;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 1px;
}


input[type="color"]::-webkit-color-swatch {
    border-color: var(--text-white);
    border: 1px solid var(--text-white) !important;
}

option {
    background-color: var(--card-background);
    color: var(--primary-text);
}

textarea::placeholder, input[type="text"]::placeholder, input[type="email"]::placeholder, input[type="password"]::placeholder, input[type="number"]::placeholder {
    color: var(--placeholder) !important;
}

.text-success {
    color: var(--success)
}

.text-white {
    color: var(--text-white);
}

.text-secondary {
    color: var(--secondary-text);
}

.text-primary {
    color: var(--primary-text) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.border-success {
    border-color: var(--success);
}
.border-danger {
    border-color: var(--danger);
}
.border-warning {
    border-color: var(--warning);
}
.border-info {
    border-color: var(--info);
}

.border-bottom {
    border-radius: 0.5rem;
    border-bottom: 2px solid;
}
.border-left {
    border-radius: 0.5rem;
    border-left: 2px solid;
}
.border-right {
    border-radius: 0.5rem;
    border-right: 2px solid;
}
.border-top {
    border-radius: 0.5rem;
    border-top: 2px solid;
}

.badge {
    padding:7.5px;
    margin: 2px;
}

.bg-light {
    background: var(--card-background-disabled) !important;
}

.bg-secondary {
    background-color: var(--bg-secondary) !important;
    color: var(--placeholder)
}

.bg-success {
    background-color: var(--bg-success) !important;
    color: var(--success)
}

.bg-warning {
    background-color: var(--bg-warning) !important;
    color: var(--warning)
}

.bg-danger {
    background-color: var(--bg-danger) !important;
    color: var(--danger)
}

.bg-info {
    background-color: var(--bg-info) !important;
    color: var(--info)
}

hr {
    border: 1px solid var(--text-white) !important;
}

.header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    color: var(--text-white);
}

.header .subtitle {
    color: var(--primary-text)
}

table thead tr th {
    background: transparent !important;
    color: var(--text-white) !important;
}

table tbody tr td {
    background: transparent !important;
    color: var(--text-white) !important;
}

/* SEARCH INPUT */

  .searchable-select {
    cursor: pointer;
    background-color: transparent !important;
    color: var(--primary-text) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0.5rem;
    padding: 10px;
  }

  .searchable-select.disabled {
    opacity: 0.5;
    pointer-events: none;
  }

  .searchable-dropdown {
    position: absolute;
    width: 100%;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-top: 5px;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(99, 62, 214, 0.5);
  }

  .searchable-input {
    border: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    background: transparent !important;
    color: var(--primary-text);
    border-radius: 0 !important;
  }

  .options-container {
    max-height: 200px;
    overflow-y: auto;
  }

  .searchable-option {
    padding: 10px;
    cursor: pointer;
    color: var(--secondary-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .searchable-option.selected {
    background-color: var(--active-60);
    color: white;
    font-weight: 500;
  }

  .searchable-option:hover {
    background-color: var(--active-60);
    color: white;
  }

  .check-icon {
    color: white;
    font-weight: bold;
    margin-left: 8px;
  }

  .no-result {
    padding: 10px;
    text-align: center;
    color: var(--placeholder);
  }

/* CSS BOOTSTRAP */
/* MODAL */
.modal-content {
    border-radius: 15px;
    background: var(--card-background);
    color: var(--text-white);
}

/* ACCORDION */
.accordion {
    border: 1px solid var(--card-background-60) !important;
}

.accordion-header {
    background: var(--border-color);
    border: 1px solid var(--border-color) !important;
}

.accordion-item {
    border: 1px solid var(--border-color) !important;
    background: var(--border-color-60);
    color: var(--text-white);
}

.accordion-body {
    background: var(--card-background-60);
}

/* BOUTONS BOOTSTRAP PERSONNALISÉS */
.btn-primary {
    background: var(--btn-primary-bg) !important;
    color: var(--btn-primary-text) !important;
    border: none !important;
    font-weight: 500;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--btn-primary-hover) !important;
    color: var(--btn-primary-text) !important;
}

.btn-outline-primary {
    background: transparent !important;
    color: var(--btn-primary-bg) !important;
    border: 1px solid var(--btn-primary-bg) !important;
    font-weight: 500;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background: var(--btn-primary-bg) !important;
    color: var(--btn-primary-text) !important;
    border: 1px solid var(--btn-primary-bg) !important;
}

/* BARRES DE PROGRESSION PERSONNALISÉES */
.progress {
    background-color: var(--progress-bg) !important;
    height: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    background: var(--progress-bar) !important;
    transition: width 0.6s ease;
}


.dropdown-menu {
    background: var(--bg-secondary) !important;
}

.dropdown-item:hover {
    background: var(--border-color) !important;
    color: var(--text-white);
}

.dropdown-item {
    color: var(--text-white);
}


/* BACKUPS LISTS */ 
    .backups {
        display: flex;
        flex-direction: column;
    }

    .backup {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .backup .left {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .backup .left .infos {
        display: flex;
        flex-direction: column;
    }
    
    .backup .left .icon {
        font-size: 20px;
        padding: 10px;
        border-radius: 10px;
    }

/* SERVERS SOURCES / DEST */
    .servers {
        display: flex;
        flex-direction: column;
    }

    .servers .server {
        display: flex;
        flex-direction: column;
    }

    .server .server-header {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .server-header .server-logo {
        font-size: 20px;
        padding: 10px;
        background-color: var(--border-color);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        color: var(--primary-text);
    }

    .server-header .server-infos {
        display: flex;
        flex-direction: column;
        margin-left: 10px;
    }

    .server-infos .name {
        font-size: 18px;
        color: var(--primary-text)
    }

    .server-infos .host {
        font-size: 14px;
        color: var(--secondary-text)
    }

    .server-stats {
        display: flex;
        flex-direction: row;
    }

    .server-stats .server-stat {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px;
        background-color: var(--border-color);
        margin-left: 20px;
        border-radius: 10px;
        min-width: 200px;
    }

    .server-stat .name {
        font-size: 14px;
        color: var(--secondary-text)
    }

    .server-stat .value {
        font-size: 18px;
        margin-top: 5px;
    } 

/* PAGINATION */

.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.page-link {
    color: var(--text-white);
    background-color: var(--active-60);
    border: none;
}

.page-link:hover {
    color: var(--text-white);
    background-color: var(--active-85);
    border: none;
}

.page-link:focus {
    color: var(--text-white);
    background-color: var(--active-60);
    border: none;
}

.page-item.active .page-link {
    color: var(--text-white);
    background-color: var(--active-85);
    border: none;
}

.page-item.disabled .page-link {
    color: var(--text-white);
    background-color: var(--active-disabled);
    border: none;
}

.page-item:not(:first-child) .page-link {
    margin-left: 0;
}