:root {
    --primary-color: #eff5fa;
    --background-color: #fff;
    --background-color-menu: #fff;
    --background-color-modal: #fcfdff;
    --border-color: #31313131;
    --hover-color: #f3f6f8;
    --active-color: #eff5fa;
    --text: #333330;
    --text-opacity: rgb(168, 168, 168);
    --white: #fff;
    --black: #000;
    --green: #13aa45;
    --red: #c71313;
    --red-hover: #af0808;
    --button-dark: #1C1C1C;
    --button-light: #d2ecff;
    --button-dark-hover: #3a3a3a;
    --button-light-hover: #def1ff;
    --shadow: 0px 0px 12px rgba(0, 0, 0, 0.3);
    --filter-invert: invert(0.3);
    --table-loading-color: rgba(235, 245, 251, 0.75);
    --font-inter: 'Inter', sans-serif;
    --font-poppins: 'Poppins', sans-serif;
}

.dark-theme {
    --primary-color: #161931;
    --background-color: #24273F;
    --background-color-menu: #161931;
    --background-color-modal: #161931;
    --border-color: #373B58;
    --hover-color: #373B58;
    --active-color: #383e75;
    --text: #d1d5db;
    --text-opacity: rgb(168, 168, 168);
    --white: #191b2f;
    --black: #fff;
    --green: #13aa45;
    --red: #c71313;
    --red-hover: #af0808;
    --button-dark: #24273F;
    --button-light: #1C1C1C;
    --button-dark-hover: #2d304e;
    --button-light-hover: #3a3a3a;
    --shadow: 0px 0px 12px rgba(0, 0, 0, 0.3);
    --filter-invert: invert(0.3);
    --table-loading-color: rgba(235, 245, 251, 0.75);
    --font-inter: 'Inter', sans-serif;
    --font-poppins: 'Poppins', sans-serif;
}

h1,
h2,
h3,
h4,
h5 {
    padding: 0;
    margin: 0;
    font-family: var(--font-inter);
    color: var(--text);
}

body {
    background-color: var(--background-color);
    color: var(--text);
    height: calc(100vh - 70px);
}

.body-overlay{
    overflow-y: hidden;
}

.body-overlay .sidebar, .body-overlay header, .body-overlay main{
    filter: blur(0.8rem);
}

body,
p {
    font-family: var(--font-poppins);
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: var(--text-white);
    cursor: pointer;
}

.w-20 {
    width: 20%;
}

.w-30 {
    width: 30%;
}

.w-40 {
    width: 40%;
}

.w-60 {
    width: 60%;
}

.w-70 {
    width: 70%;
}

.w-80 {
    width: 80%;
}

.icon {
    width: 24px;
    height: 24px;
    background-color: var(--text);
    color: var(--text);
}

.z-index-1 {
    z-index: 1;
}

.fit-content {
    width: fit-content !important;
}

.cursor-pointer{
  cursor: pointer;
}

.no-hover-effect{
    transition: none;
}

.no-hover-effect:hover{
    border: none !important;
    outline: none !important;
    background-color: none !important;
}

.section {
    margin-top: 8rem;
}

.title {
    font-weight: 700;
    font-size: 28px;
    line-height: 30px;
}

.subtitle {
    font-size: 20px;
    line-height: 28px;
}

.text {
    font-size: 16px;
    line-height: 24px;
}

.transition {
    transition: all 0.3s ease-in-out;
}

*::placeholder{
    color: var(--text-opacity);
    opacity: 0.7;
}

/* Button */

.button:focus {
    outline: none;
}

.button {
    border: none;
    cursor: pointer;
    width: fit-content;
    min-height: 45px;
    padding: 0.25rem 1rem;
    align-items: center;
    display: flex;
    color: #f1f1f1;
    background-color: var(--button-dark);
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
}

.button .icon{
    background-color: var(--white);
    color: var(--white);
}

.button:hover:not(:disabled) {
    background-color: var(--button-dark-hover);
}

.button:disabled {
    opacity: 0.8;
}

.button-light {
    color: var(--text);
    background-color: var(--button-light);
}

.button-light:hover:not(:disabled) {
    background-color: var(--button-light-hover);
}

.button-dark {
    color: var(--white);
    background-color: var(--button-dark);
}

.button-dark:hover:not(:disabled) {
    background-color: var(--button-dark-hover);
}

/* Modal confirmation */

.modal-confirmation{
    background-color: #0000005d;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, transform 0.3s ease-in-out, visibility 0.2s ease-in-out, bottom 0.3s ease-in-out;
    z-index: 100;
}

.modal-confirmation.active{
    visibility: visible;
    opacity: 1;
}

.modal-confirmation-container{
    position: absolute;
    bottom: -50px;
    background-color: var(--background-color-modal);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    width: 550px;
    transform: scale(0.9);
    transition: opacity 0.2s ease-in-out, transform 0.3s ease-in-out, visibility 0.2s ease-in-out, bottom 0.3s ease-in-out;
}

.modal-confirmation.active .modal-confirmation-container{
    bottom: 30px;
    transform: scale(1);
}

/* Custom select2 */

.select2 {
    width: 100% !important;
}

.form-control:disabled + .select2 {
    opacity: 0.6;
}

.select2-container * {
    border-color: var(--border-color) !important;
    border-width: 1px !important;
    border-radius: 0.5rem !important;
}

.select2-selection {
    height: 45px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0.25rem !important;
    padding: 0.5rem 1rem !important;
    background-color: var(--white) !important;
    display: flex !important;
    align-items: center;
    min-width: 220px;
}

.select2-selection__rendered {
    padding-left: 0px !important;
    color: var(--text) !important;
    width: 100%;
}

.select2-selection__placeholder {
    color: var(--text-opacity) !important;
}

.select2-search--dropdown .select2-search__field {
    max-width: 100% !important;
    min-width: 100% !important;
}

.select2-selection__arrow {
    width: 24px !important;
    height: 24px !important;
    top: 10px !important;
    right: 10px !important;
    background-color: var(--text);
    color: var(--text);
    mask: url(/static/images/icons/chevron-down.svg) no-repeat center;
    -webkit-mask-image: url(/static/images/icons/chevron-down.svg);
    -webkit-mask-position: center; 
    -webkit-mask-repeat: no-repeat;
}

.select2-selection__arrow b {
    display: none;
}

.select2-dropdown {
    border: 1px solid var(--border-color) !important;
    background-color: var(--white) !important;
    border-radius: 0.5rem !important;
    padding: 0.25rem;
}

.select2-search--dropdown, .select2-search__field {
    background-color: var(--white) !important;
    color: var(--text) !important;
}

.select2-search__field:focus {
    outline: none !important;
    border-color: var(--border-color) !important;
    box-shadow: none !important;
}

.select2-results__option {
    border-radius: 0.25rem;
}

.select2-results__option--highlighted {
    color: var(--acce) !important;
    background-color: var(--white) !important;
}

.select2-results__option--highlighted:hover {
    color: var(--acce) !important;
    background-color: var(--background-color-menu) !important;
    transition: all 0.3s ease-in-out;
}

/* HEADER */

header {
    position: fixed;
    top: 0;
    right: 0;
    width: calc(100% - 264px);
    height: 70px;
    background-color: var(--background-color-menu);
    box-shadow: 5px 0 5px rgba(0,0,0,.1);
    z-index: 100;
}

main {
    width: 100%;
    height: auto;
    margin-top: 70px;
    margin-left: 264px;
    overflow-x: hidden;
    overflow-y: hidden;
    margin-bottom: 6rem;
}

.burger {
    cursor: pointer;
    height: 36px;
    border-radius: 4px;
}

.burger:hover {
    background-color: var(--hover-color);
}

.burger .icon {
    width: 36px;
    height: 36px;
    margin: 0 20px;
}

/* Input */

select{
    min-width: 180px;
}

input{
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    font-size: 16px;
    transition: all 0.3s ease-in-out;
    border-radius: 0.25rem;
    color: var(--text);
    width: 100%;
    height: 100%;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

input[type="checkbox"]:focus{
    border: 2px solid var(--border-color) !important;
    outline: none !important;
    box-shadow: none !important;
}

input[type="checkbox"] {
    appearance: none;
    background-color: var(--background-color);
    margin: 0;
    font: inherit;
    color: currentColor;
    border: 2px solid var(--border-color);
    border-radius: 0.3em;
    transform: translateY(-0.075em);
    display: grid;
    place-content: center;
}
  
input[type="checkbox"]::before {
    content: "";
    width: 0.7em;
    height: 0.7em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--white);
    border: 2px solid var(--white) !important;
    transform-origin: bottom left;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
  
input[type="checkbox"]:checked::before {
    transform: scale(1);
}
  
input[type="checkbox"]:checked {
    border: 2px solid var(--black) !important;
    background-color: var(--black);
}

input[type="checkbox"].inactive {
    border: 2px solid red !important;
    background-color: red;
}

input[type="checkbox"].inactive::before {
    transform: scale(1);
    content: "";
    width: 0.7em;
    height: 0.7em;
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--white);
    border: 2px solid var(--white) !important;
    transform-origin: bottom left;
    clip-path: polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0, 50% 30%);
}

input[type="date"]{
    min-width: 180px;
}

input[type="file"]{
    border: 2px dashed var(--border-color);
    cursor: pointer;
}

input[type=file]::file-selector-button {
    border: none;
    background: var(--button-dark);
    color: #fff;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 0.25rem;
    transition: all 0.3s ease-in-out;
}

input[type=file]:hover::file-selector-button {
    background: var(--button-dark-hover);
}

input[type="file"]:active, input[type="file"]:focus, input[type="file"]:hover{
    border: 2px dashed var(--border-color);
}

input[type="search"]{
    min-width: 220px;
    padding: 0.25rem 32px 0.25rem 0.5rem;
}

input:active, input:focus, input:hover{
    /* border: 1px solid var(--border-color); */
    outline: none;
}

/* Contextmenu & custom select */

.contextmenu{
    background-color: var(--primary-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--background-color-menu);
    z-index: 100;
    width: 200px;
    transform: scale(0.8);
    opacity: 0;
    transition: opacity 0.2s ease-in-out, transform 0.3s ease-in-out, visibility 0.2s ease-in-out;
    visibility: hidden;
}

.contextmenu.active{
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    background-color: var(--white);
}

.contextmenu.current{
    transition: all 0.2s ease-in-out;
}

.contextmenu-item {
    padding: 0.5rem 1rem;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    border-radius: 0.4rem;
    display: flex;
    gap: 0.25rem;
}

.contextmenu-item:hover {
    color: var(--text-color);
    background-color: var(--hover-color);
}

.contextmenu-list:hover .contextmenu-list-items{
    visibility: visible;
    opacity: 1;
}

.contextmenu-list-items{
    top: 0;
    left: 202px;
    background-color: var(--background-color-modal);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    z-index: 100;
    width: 200px;
    opacity: 0;
    visibility: hidden;
}

.custom-select{
    position: absolute;
    padding: 0.25rem;
    z-index: 102 !important;
}

.custom-select .contextmenu-item{
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

/* Search bar */

.search-bar{
    position: relative;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar input[type="search"]{
    min-height: 34px;
    border: none;
}

.search-bar-icon{
    position: absolute;
    right: 0rem;
    cursor: pointer;
    width: 34px;
    height: 34px;
}

.search-bar-icon img{
    background-color: var(--text-opacity);
    color: var(--text-opacity);
}

/* Modal */

.modal{
    visibility: hidden;
    opacity: 0;
    display: flex;
    z-index: 102;
}

.modal.active{
    visibility: visible;
    opacity: 1;
}

.modal-content{
    width: 30%;
    border: none;
    background: transparent;
    z-index: 104;
}

.modal-title{
    font-size: 36px;
}

.modal-header{
    border: none;
    justify-content: center;
}

.modal-body{
    background-color: var(--background-color-modal);
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: 0px 5px 10px var(--border-color);
}

.modal-overlay{
    position: fixed;
    inset: 0;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(180deg, rgba(215, 208, 255, 0.20) 0%, rgba(203, 221, 255, 0.50) 100%);
    z-index: 103;
    opacity: 0;
    visibility: hidden;
}

.modal-overlay.active{
    opacity: 1;
    visibility: visible;
}

.modal-close{
    position: absolute;
    border: none;
    border-radius: 0.5rem;
    right: 1rem;
    padding: 0.5rem;
    outline: 1px solid transparent;
    background-color: transparent;
}

.modal-close:hover{
    outline: 1px solid var(--border-color);
    background-color: var(--hover-color);
}

.modal-create-icon{
    width: 100px;
    height: 100px;
}

.modal-create-icon img{
    border-radius: 50%;
}

/*Bouton on off*/

.switch-on-off {
	display: inline-block;
	position: relative;
	width: 60px;
	height: 30px;
	cursor: pointer;
	overflow: hidden;
}

.switch-on-off input {
	position: absolute;
	top: -30px;
	left: -30px;
	width: 0;
	height: 0;
}

.switch-on-off input + span{
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--black);
    border-radius: 20px;
}

.switch-on-off input:checked + span{
	background: var(--green);
}

.switch-on-off input + span:before{
	content: "";
	display: inline-block;
	position: absolute;
	top: 50%;
	left: 4px;
	width: 22px;
	height: 22px;
	background: white;
	border-radius: 50%;
	transform: translateY(-50%);
	transition: all .5s;
}

.switch-on-off input:checked + span:before{
	left: 34px;
}

@media screen and (max-width: 1400px) {
    .modal-content{
        width: 50%;
    }
}

@media screen and (max-width: 1200px) {
    .opacity-xl-0 {
        opacity: 0;
    }

    .opacity-xl-1 {
        opacity: 1;
    }

    .modal-content{
        width: 65%;
    }
}


@media screen and (max-width: 992px) {
    .section {
        margin-top: 4rem;
    }

    .title {
        font-size: 26px;
    }

    .subtitle {
        font-size: 18px;
    }

    .text {
        font-size: 14px;
    }

    .modal-body{
        padding: 1.5rem;
    }

    .modal-content{
        width: 75%;
    }
}

@media screen and (max-width: 768px) {
    .container {
        padding: 8px 16px;
    }

    .modal-content{
        width: 85%;
    }

    .title {
        font-size: 24px;
    }
}

@media screen and (max-width: 576px) {
    .modal-content{
        width: 95%;
    }
}


/*Bouton on off*/
.switch-theme {
    display: flex;
    position: relative;
    width: 46px;
    height: 28px;
    cursor: pointer;
}

.switch-theme {
    transform: rotate(90deg);
}

.switch-theme input {
    position: absolute;
    top: -30px;
    left: -30px;
    width: 0;
    height: 0;
    opacity: 0;
}

.switch-theme input+span {
    border-radius: 20px;
    background: var(--primary-color);
    width: inherit;
}

.switch-theme input+span:before {
    content: "";
    display: inline-block;
    position: absolute;
    top: 50%;
    left: -4px;
    width: 32px;
    height: 32px;
    background: var(--background-color-menu);
    border-radius: 50%;
    transform: translateY(-50%) rotate(-190deg);
    transition: all .5s;
    background-image: url(/static/panel/images/icons/sun.svg);
    background-position: center;
    background-size: 70%;
    background-repeat: no-repeat;
    box-shadow: var(--shadow);
}

.switch-theme input:checked+span:before {
    left: 18px;
    background-image: url(/static/panel/images/icons/moon.svg);
}