/* ========================== Colors ========================== */
:root{
    --White: #FFFFFF;
    --Black: #000000;
    --Red: #FF0000;
    --RedPal: #E74C3C;
    --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: 1rem;}
#clock{font-size: 1rem;}


/* ========================== 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: 45px;   
    display: flex;
    padding-left: 15px;
    color: var(--White);
    align-items: center;
    justify-content: space-between;
    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%;
    table-layout: fixed;
    border-collapse: collapse;
    background: var(--MistGrey); 
}

.tbl tr:nth-child(even){background: var(--LightGrey); transition: all 0.3s ease-in;}

.head-tbl{
    width: 100%;
    height: 35px;
    display: flex;
    font-size: 1rem;
    text-align: center;
    color: var(--White);
    align-items: center;
    background: var(--DimGray);
    justify-content: space-between;
}

.body-tbl{
    width: 100%;
    height: calc(72vh - 35px - 36px);
    overflow: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.tbl tbody tr td{
    font-size: 0.9rem;
    letter-spacing: 0.1rem;
    font-weight: normal;
    border: 1px solid var(--CoolGray);
}

.body-box1 img{
    width: 36px;
    height: 36px;
    margin: 2px;
    border-radius: 50%;
    background: var(--White);
    border: 1px solid var(--CoolGray); 
}

.head-box1{width: 10%; text-align: center;}

.head-box1, .head-box2, .head-box3, .head-box4, .head-box5, .head-box6, .head-box7, .head-box8 {
    float: left; 
    padding: 0.8rem;
    letter-spacing: 0.1rem;
}

.body-box1{width: 10%; text-align: center;}

.body-box2, .body-box3, .body-box4, .body-box5, .body-box6, .body-box7 {
    width: 100%;
    padding: 0 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.body-operation a{margin: 0 15px;}

.body-operation img{width: 16px; height: 18px;}

.foot-tbl{
    width: 100%;
    height: 5vh;
    padding: 8px;
    display: flex;
    align-items: center;
    background: var(--DimGray);
    justify-content: space-between;
}

.foot-tbl p{
    color: var(--White);
    font-size: 0.72rem;
    letter-spacing: 0.1rem;
}

.no_data-small{font-size: 1rem;}

.no_data-big{font-size: 1.25rem;}

.no_data-small, .no_data-big{
    margin: auto;
    text-align: center;
    color: var(--White);
}


/* ========================== Dropdown ========================== */
.dropdown_div {position: relative;}
.dropdown-content p{margin: 10px; font-size: 0.9rem;}
.info{width: 320px;}
.recherche_infos_detail p{padding: 2px; font-size: 1rem;}
.dropdown-content.active {display: block;}
.value{color: #2A2A2A;}
.dropdown_div img {width: 22px; height: 22px;} 
/* .info p{display: flex; align-items: flex-start;} */
.sous_titre{color: var(--DarkBlue); font-size: 1rem;}
.dropdown-content p{display: flex; align-items: flex-start;}

.sous_titre_dropdown{
    margin: 10px;
    font-size: 0.9rem;
    text-align: center;
}

.dropdown-content {
    display: none;
    z-index: 9999;
    height: auto;
    position: absolute;
    background: var(--White);
    border-radius: 6px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
}

.titre_dropdown{
    color: var(--DarkBlue);
    text-align: center;
    font-size: 1rem;
    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;
    padding: 7.5px;
    background: var(--LightGrey);
}

.recherche_image{
    width: 40%;
    height: 250px;
    float: left;
    margin: 15px;
    margin-top: 45px;
}

.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;}



.recherche_left{
    float: left;
    margin-left: 5px;
    margin-right: 4px;
    border-right: 3px solid var(--DarkBlue);
}

.recherche_right{
    float: right;
    margin-left: 5px;
    margin-right: 1px;
}

.recherche_left, .recherche_right{width: 310px;}

.recherche_left p, .recherche_right p{padding: 4px;}



/* ========================== Autres ========================== */
.border-top, .border-bottom{
    width: 100%;
    height: 15px;
    display: flex;
    margin-left: auto;
    margin-right: auto;
    background:var(--DarkBlue);
}




/* .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: 0.95rem;}
.gestion_titre{float: left;}
.gestion_titre p{font-size: 1.12rem;}
.search_icon img{width: 20px; height: 20px;}

.search_icon_add {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-right: 20px;
}

.search_icon {margin-right: 25px;}

.add, .back{
    font-size: 0.95rem;
    padding: 5px;
    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: 2px !important;
    font-size: 0.75rem !important;
}

/* Texte */
.swal2-title {
    font-size: 1.12rem !important;
}

.swal2-html-container {
    font-size: 0.95rem !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) {
    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: 0.75rem !important;
}

.swal2-actions button {
    margin: 0 32px;
}

.swal2-actions {
    padding-bottom: 0.7rem !important;
}

/* ================= AUTRES ================= */

.title_function {
    font-size: 1.12rem;
    font-weight: normal;
}

.swal2-input {
    width: 225px !important;   /* ← redwi largeur */
    height: 25px !important;  /* ← redwi hauteur */
    font-size: 0.75rem !important;
    padding: 4px 8px !important;
}

.swal2-confirm:hover {
    background: var(--BluePal) !important;
}

.swal2-cancel:hover {
    background: var(--RedPal) !important;
}

.swal2-validation-message {
    padding: 0;
    font-size: 0.75rem;
    margin-top: 1px;
    color: var(--Red) !important;
    background: transparent !important;
}

.swal2-input.input-error {
    outline: none !important;
    padding: 4px 8px !important;
    box-shadow: none !important;
    border-radius: 5px !important;
    border: 2px solid var(--Red) !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);
}

/* ================= 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);
}


.box-scroll{
    overflow-y: auto;
    background: var(--MistGrey);
}

.box-scroll::-webkit-scrollbar{
    width: 6px;
}

/* Fond scrollbar */
.box-scroll::-webkit-scrollbar-track {
    background: var(--White); /* background app la */
}

/* Barre scroll - etat normal (blanc) */
.box-scroll::-webkit-scrollbar-thumb {
    background: var(--DarkBlue);
    border-radius: 8px;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Hover : PAL / fade (liminozite ↓) */
.box-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--CoralBlue);
    box-shadow: inset 0 0 4px rgba(0,0,0,0.25);
}

/* ========================== Footer ========================== */
.footer{
    width: 100%;
    height: 25px;  
    font-size: 0.75rem;
    overflow: hidden;
    padding-top: 9px;
    color: var(--White);
    letter-spacing: 0.05rem;
    background: var(--DarkBlue);  
}

.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: 1rem;
    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); }
}




/* overlay ki floute paj la */
.ui-lock-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	z-index: 99999;
	opacity: 0;
	pointer-events: none;
	transition: opacity .18s ease;
}

/* overlay aktif pou JS */
.ui-lock-overlay.active {
	opacity: 1;
	pointer-events: all;
}

/* overlay otomatik si show-message sou body */
body.show-message .ui-lock-overlay {
	opacity: 1;
	pointer-events: all;
}

/* anpeche scroll pandan lock oswa show-message */
body.ui-locked, body.show-message {
	overflow: hidden;
}



/* ================= NOT AVAILABLE ================= */
.global-not-available-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOverlay .25s ease forwards;
}

.global-not-available-box {
    background: var(--RedPal);
    color: var(--White);
    padding: 22px 28px;
    border-radius: 14px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
    text-align: center;
    min-width: 280px;
    max-width: 420px;
    animation: pop .25s ease forwards;
}



.blocked-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 99999;
}

.blocked-box {
    background: var(--White);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    width: 350px;
    display: flex;
    flex-direction: column;
}

.blocked-box h2 {
    color: var(--CoralRed);
    margin-bottom: 10px;
}

.blocked-box p {
    margin-bottom: 20px;
}

.btn-logout {
    display: inline-block;
    padding: 10px 20px;
    background: var(--CoralRed);
    color: var(--White);
    border: none;
    font-size: 1rem;
    border-radius: 5px;
    text-decoration: none;
}


.line-dotted{
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    border-top: 1px dotted var(--Black);
}

/* ======== Cursor ======== */
input[type="text"]{cursor: text;}

input[type="date"], input[type="file"], input[type="radio"],
input[type="checkbox"], input[type="date"]::-webkit-calendar-picker-indicator,
.refresh-btn-admin, .transaction, .deposite_retrait,
.btn-exit-cashier, .button_info, .refresh, .update_boutton, 
.image_box_update, .image_box, .dropdown_div, .search_icon,
.add, .back, .radio, .btn-cliquez, .button_cliquer, .btn,
.select-box select, .actions button, .button_connecter, .annuler,
.confirmer-small, .annuler-small, .confirmer-big, .annuler-big,
.print_transaction, .search_icon, .view_icon, .retour,
.boutton_principale, .btn-appuyer, .add-cart, .back-cart,
.print_button, .image-box p, .modifier p,
.update_boutton_principale, .achat, .vente,
.qt_produit_scan label, .btn-logout, .foot-tbl span,
.btn_creer_inventaire a, .btn_rapport_inventaire a, 
.btn_fermer_inventaire a{cursor: pointer;}

.drapeau, .exchange, .alert, .titre_resultat, .admin_container,
.head-tbl, .body-box2, .body-box3, .body-box4, .body-box5, 
.footer, .categorie, .page-admin-wrapper, .admin_card, label,
.swal2-title, .swal2-html-container, .head-tbl-panier, .header_menu_bar, 
.prod-cashier, .text_scan, .select_produit, .table-board-panier,
.global-not-available-box, .text_montant_remise, .montant_remise,
.montantDue, .montantPay, .blocked-box,
.dropdown-content, .table-board p, .gestion_titre p{cursor: default;}