/* ========================== Colors ========================== */
:root{
    --White: #FFFFFF;
    --Black: #000000;
    --Red: #FF0000;
    --RedPal: #E04F4F;
    --CoralRed: #FC5954;  
    --CoralYellow: #FC7A0F;  
    --DarkBlue: #00008B;   
    --BluePal: #3535E7;
    --OceanBlue: #2B65EC; 
    --BrightBlue: #776BFF;  
    --CoralBlue: #675AFE; 
    --MistBlue: #C8DDFD; 
    --LightBlue: #96B7E9; 
    --Gray: #808080; 
    --DarkGray: #1F2633;
    --LightGray: #283041;
    --DimGray: #424949;  
    --CoolGray: #AAB7B8;  
    --MediumGray: #999999;   
    --LightGrey: #C2C7D1;
    --MistGrey: #E8DDDD;   
    --Green: #008000;
    --VividGreen: #01CC40;
    --DarkGreen: #006400;   
    --LeafGreen: #319D31;      
    --DeepNavy: #081B29;
    --DarkCerulean: #0D3A64;     
    --Purple: #800080;
    --RoyalPurple: #4C298E;     
}


/* ========================== Font & Body ========================== */
*{  font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a{text-decoration: none;}
.body{border: 8px solid var(--DarkBlue); margin: 0; overflow: hidden;}


/* ========================== Time & Date ========================== */
#date{font-size: 16px;}
#clock{font-size: 16px;}


/* ========================== Page Content ========================== */
.page-admin-wrapper{
    width: 78%;
    height: calc(88vh - 16px - 25px);
    float: right;
    background: var(--DarkGray);   
}

.page-cashier-wrapper{
    width: 75%;
    height: calc(95vh - 56px - 36px);
    float: right;
    background: var(--LightGray);
    border: 10px solid var(--DarkGray);
}

.content-wrapper{
    width: 98%;
    height: 80vh;
    margin: 1.2%;
    border: 5px solid var(--LightGray);
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.3), 0 6px 20px 0 rgba(0,0,0,0.5);
}

.title-wrapper{
    width: 100%;
    height: 50px;
    color: var(--White);
    font-size: 20px;
    padding-top: 10px;
    padding-left: 15px;
    border-bottom: 5px solid var(--LightGray);  
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.3), 0 6px 20px 0 rgba(0,0,0,0.5);
}

.box-wrapper{
    width: 100%;
    height: calc(77.5vh - 16px - 25px);
    justify-content: center;
    flex-wrap: wrap;
    overflow: hidden;
    overflow-y: auto;
}




/* ========================== Les Tableaux ========================== */
.table-board{width: 100%; height: 70vh;}

.tbl{
    width: 100%;
    background: var(--MistGrey);
    border-collapse: collapse;
}

.tbl tr:nth-child(even){background: var(--LightGrey); transition: all 0.3s ease-in;}

.head-tbl{
    width: 100%;
    height: 7vh;
    font-size: 1.2rem;
    text-align: center;
    color: var(--White);
    background: var(--DimGray);
}

.body-tbl{
    width: 100%;
    height: calc(72vh - 56px - 36px);
    overflow: hidden;
    overflow-y: auto;
}

.tbl tbody tr td{
    font-size: 0.9rem;
    letter-spacing: 0.1rem;
    font-weight: normal;
    border: 1px solid var(--CoolGray);
}

.tbody-image{width: 10.85%; text-align: center;}

.tbody-image img{
    width: 36px;
    height: 36px;
    margin: 2px;
    border-radius: 50%;
    background: var(--White);
    border: 1px solid var(--CoolGray); 
}

.tbody-operation a{margin: 0 15px;}

.tbody-operation img{width: 16px; height: 18px;}

.foot-tbl{
    width: 100%;
    height: 5.6vh;
    padding: 8px;
    background: var(--LightGray);
}

.foot-tbl p{
    color: var(--White);
    padding: 8px;
    font-size: 12px;
    letter-spacing: 0.1rem;
}

#listeVide{
    font-size: 1.5rem;
    text-align: center;
    color: var(--White);
    margin-top: 160px;
}


/* ========================== Dropdown ========================== */
.dropdown_div {cursor: pointer; position: relative;}
.dropdown-content p{margin: 10px; font-size: 16px;}
.info{width: 320px;}
.recherche_infos_detail p{padding: 2px;}
.dropdown-content.active {display: block;}
.value{ font-size: 15px; color: #2A2A2A;}
.dropdown_div img {width: 22px; height: 22px;} 
.info p{display: flex; align-items: flex-start;}
.sous_titre{color: var(--DarkBlue); font-size: 18px;}
.dropdown-content p{display: flex; align-items: flex-start;}

.sous_titre_dropdown{
    margin: 10px;
    font-size: 15px;
    text-align: center;
}

.dropdown-content {
    display: none;
    z-index: 9999;
    height: auto;
    position: absolute;
    background: #f9f9f9;
    border-radius: 6px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
}

.titre_dropdown{
    color: var(--DarkBlue);
    text-align: center;
    font-size: 18px;
    margin-top: 10px;
}

.info p .value {
    flex: 1;  
    margin-left: 5px;              
    word-break: break-word;   
    overflow-wrap: break-word;
}

.dropdown-content p .value {
    flex: 1;   
    margin-left: 5px;              
    word-break: break-word;   
    overflow-wrap: break-word;
}


/* ========================== Recherche ========================== */
.recherche{
    width: 650px;
    height: 380px;	
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    margin-top: 50px;
    background: var(--LightGrey);
}

.recherche_image{
    width: 40%;
    height: 250px;
    float: left;
    margin: 15px;
    margin-top: 50px;
}

.recherche_image img{width: 258px; height: 248px;}
.recherche_infos{height: 300px;}

.recherche_infos{
    width: 50%;
    float: right;
    margin: 15px;
}

/* Desactive flex UNIQUEMENT pour la description */
.info p.description{
    display: block !important;
    height: 56px;
    overflow-y: auto;
}

.info p.description::-webkit-scrollbar{
    width: 5px;
    height: 5px;
}

.info p.description::-webkit-scrollbar-track {
  background: var(--Black); 
}

.info p.description::-webkit-scrollbar-thumb {
  background: var(--DarkBlue);
  border-radius: 8px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.info p.description::-webkit-scrollbar-thumb:hover {
  background: var(--OceanBlue);
  box-shadow: inset 0 0 4px rgba(0,0,0,0.25);
}

/* Remet comportement texte normal */
.info p.description b,
.info p.description .value{
    display: inline;
}

.detail{margin-top: 20px;}




/* ========================== Autres ========================== */
.del_div, .prt_div{
    width: 95.5%;
    height: 30px;
    margin: 15px;
    display: flex;
    background:var(--DarkBlue);
    justify-content: center;
    align-items: center;
    text-align: center;
}

.del_btn, .prt_btn{
    width: 100px;
    height: 22px;
    padding: 1.5px;
    background: var(--White);
    margin-left: 75px;
    margin-right: 75px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    -webkit-transition-duration: 0.3s;
    transition-duration: 0.3s;
    -webkit-transition-property: box-shadow, transform;
    transition-property: box-shadow, transform;
}

.del{color: var(--White);}
.delCategorie{color: var(--DarkBlue);}
.del, .delCategorie{font-size: 15px;}
.gestion_titre{float: left;}
.search_icon img{width: 25px; height: 25px;}

.search_icon_add {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-right: 20px;
}

.search_icon {
    cursor: pointer;
    margin-right: 25px;
}

.add, .back{
    font-size: 1rem;
    padding: 5px;
    cursor: pointer;
    color: var(--White);
    border-radius: 5px;
    margin-top: -1px; 
    background: var(--OceanBlue);
}


.ellipsis {
    white-space: nowrap;        /* pa retounen a la ligne */
    overflow: hidden;           /* kache sa ki depase */
    text-overflow: ellipsis;    /* ajoute ... */
}


/* ================= SweetAlert2 GLOBAL ================= */
.swal2-popup {
    width: fit-content !important;
    min-width: 240px !important;
    max-width: 400px !important;
    padding: 0.5rem !important;
    font-size: 12px !important;
}

/* Texte */
.swal2-title {
    font-size: 18px !important;
}

.swal2-html-container {
    font-size: 15px !important;
}

/* ================= ICONS ================= */

/* Taille commune */
.swal2-icon {
    width: 42px !important;
    height: 42px !important;
}

/* Flex UNIQUEMENT pour icons texte (error, info, warning) */
.swal2-icon:not(.swal2-success) {
    /* display: flex !important; */
    align-items: center !important;
    justify-content: center !important;
}

.swal2-icon:not(.swal2-success) .swal2-icon-content {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 2rem !important;
    line-height: 1 !important;
}

/* SUCCESS -> layout natif SweetAlert (OBLIGATOIRE) */
.swal2-icon.swal2-success {
    display: block !important;
    font-size: 0.5rem !important;
}

/* ================= BUTTON ================= */

.swal2-confirm {
    font-size: 13px !important;
    padding: 6px 14px !important;
}

.swal2-actions button {
    margin: 0 32px;
}

.swal2-actions {
    padding-bottom: 0.7rem !important;
}

/* ================= AUTRES ================= */

.title_function {
    font-size: 18px;
    font-weight: normal;
}

.swal2-input {
    width: 225px !important;   /* ← redwi largeur */
    height: 25px !important;  /* ← redwi hauteur */
    font-size: 13px !important;
    padding: 4px 8px !important;
}

.swal2-confirm:hover {
    background: var(--BluePal) !important;
}

.swal2-cancel:hover {
    background: var(--RedPal) !important;
}

/* Kache karakte yo (fe li paret tankou password) */
.scan-input {
    -webkit-text-security: disc; /* Chrome/Edge/Safari */
}


/* Remove autofill background + icons */
.barcode-hidden {
    -webkit-text-security: disc;
}


/* Icon calendrier en BLANC */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* ================= Scrollbar Tauri ================= */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

/* Fond scrollbar */
::-webkit-scrollbar-track {
    background: #192133; /* background app la */
}

/* Barre scroll - etat normal (blanc) */
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 8px;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Hover : PAL / fade (liminozite ↓) */
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 0 4px rgba(0,0,0,0.25);
}

/* ========================== Footer ========================== */
.footer{
    width: 100%;
    height: 25px;  
    font-size: 13px;
    padding-top: 9px;
    color: var(--White);
    background: var(--DarkBlue);
    overflow: hidden;
}

.version{float: right;}

.footer span{margin-left: 7%; margin-right: 7%;}


/* ========================== LOADER ========================== */
#global-loader {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#global-loader p {
    margin-top: 18px;
    color: var(--White);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

#global-loader.hide {
    display: none;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 6px solid rgba(255,255,255,.15);
    border-top-color: var(--White); /* #6aa9ff */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}



/* ================= OFFLINE OVERLAY ================= */
/* #offline-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.offline-hide {
    display: none;
}

.offline-box {
    background: #111;
    border-radius: 14px;
    padding: 30px 28px;
    max-width: 420px;
    text-align: center;
    color: #fff;
    box-shadow: 0 15px 40px rgba(0,0,0,.7);
}

.offline-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.offline-box h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.offline-box p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
}

.offline-btn {
    margin-top: 18px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    background: #b00020;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
}

.offline-btn:hover {
    background: #e0002a;
} */