﻿/* -------- Responsive (mobile) -------- */
@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }

        .login-card h4 {
            font-size: 1.2rem;
        }

    .btn-signin, .btn-secondary {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* -------- Body centré -------- */
body {
    font-family: 'Poppins', sans-serif !important;
}

.centered-body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f4f6f9;
}
/* -------- Login Card -------- */
.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 2rem;
    border-radius: 1.2rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    text-align: center;
}

    /* Logo agrandi */
    .login-card img {
        width: 200px;
        max-width: 100%;
        height: auto;
        margin-bottom: 1rem;
    }

    /* Title */
    .login-card h4 {
        font-weight: 600;
        margin-bottom: 2rem;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
    }

/* -------- Form Inputs -------- */
.position-relative .form-control {
    padding-left: 2.5rem; /* espace pour icône gauche */
    padding-right: 2.5rem; /* espace pour icône droite */
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #6c757d;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font-size: 1.2rem;
    cursor: pointer;
    color: #6c757d;
}

/* -------- Buttons -------- */
.btn-signin {
    background-color: #8CC63E;
    border: none;
}

    .btn-signin:hover {
        background-color: #77ad35;
    }

/* -------- Register Link -------- */
.register-link {
    margin-top: 1rem;
    font-size: 0.9rem;
}

    .register-link a {
        color: #8CC63E;
        text-decoration: none;
    }

        .register-link a:hover {
            text-decoration: underline;
        }

/* -------- Custom Focus Shadow -------- */
.form-control:focus,
.btn:focus {
    border-color: #343536 !important;
    box-shadow: 0 0 0 0.2rem rgba(52, 53, 54, 0.25) !important;
}




.bg-socota {
    background-color: #8CC63E !important;
}

.btn-socota {
    color: #fff;
    background-color: #8CC63E;
    border-color: #8CC63E;
}

/* Couleur orange */
.text-orange {
    color: orange !important;
}

/* Sidebar */
.sidebar {
    width: 240px;
    min-height: 100vh;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

    .sidebar.collapsed {
        width: 70px;
    }

        .sidebar.collapsed .menu-text {
            display: none;
        }

        .sidebar.collapsed .logo-sidebar {
            width: 40px; /* logo réduit */
            transition: width 0.3s;
        }

.logo-sidebar {
    max-width: 120px;
    transition: width 0.3s;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -240px;
        top: 0;
        height: 100%;
        z-index: 1050;
    }

        .sidebar.show-mobile {
            left: 0;
        }

    .content {
        margin-left: 0 !important;
    }
}

.selected-left-menu{
    background-color:white;
}



/* Sidebar */
.sidebar {
    width: 250px;
    min-height: 100vh;
}

.text-orange {
    color: orange !important;
}

.sidebar .nav-link {

}

    .sidebar .nav-link:hover {
        color: #ffc107 !important;
    }

/* Contenu principal */
.content {
    min-height: 100vh;
    overflow-y: auto;
}

/* NavTabs stylé */
.nav-tabs .nav-link {
    display: flex;
    align-items: center;
    color: #343a40;
}

    .nav-tabs .nav-link.active {
        color: orange;
        border-color: orange orange #fff;
    }

/* Sélection globale dans le site */
::selection {
    background: #ffc107; /* fond orange */
    color: #212529; /* text-dark */
}

/* Sélection à l'intérieur d'un input et textarea */
input::selection,
textarea::selection {
    background: #ffc107 !important; /* même fond */
    color: #212529 !important; /* text-dark */
}

/* Couleur de sélection du texte */
input::selection,
textarea::selection {
    background: #ffc107 !important; /* orange */
    color: #212529 !important; /* text-dark */
}

/* Style flatpickr cohérent avec ton thème */
.flatpickr-calendar {
    font-family: 'Poppins', sans-serif;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day:hover {
    background: #ff8800; /* ton orange */
    border-color: #ff8800;
    color: #212529; /* text-dark */
}

.flatpickr-time input {
    color: #212529; /* dark text pour l'heure */
}


/* Position de l’icône comme dans login */
.input-icon {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.2rem;
}

/* Décaler le select pour laisser place à l’icône */

.custom-select {
    padding-left: 2.5rem;
}



    /* Hover sur les options */
    .custom-select option:hover {
        background-color: #212529; /* bg-dark */
        color: #fff !important;
    }

    /* Ombre sombre quand le select est focus */
    .custom-select:focus,
    .form-select:focus
    {
        border-color: #343536;
        box-shadow: 0 0 0 0.2rem rgba(52, 53, 54, 0.5);
    }

/* Taille et centrage des icônes dans boutons ronds */
.btn-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.2rem;
}

    /* Optionnel : effet hover */
    .btn-icon:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

/* Style du tableau arrondi */
.custom-table {
    border-radius: 15px;
    overflow: hidden; /* important pour arrondir avec thead */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

    /* Ombre et style header */
    .custom-table thead {
        border-radius: 15px 15px 0 0;
    }

    .custom-table th {
    }

/* Taille et style de la checkbox */
.custom-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

    /* Couleur de la coche lorsqu'elle est cochée */
    .custom-checkbox:checked {
        background-color: #343a40; /* Bootstrap dark */
        border-color: #343a40;
    }

        /* Forcer la coche blanche visible */
        .custom-checkbox:checked[type=checkbox] {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='white' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
        }

    /* Box shadow en dark lors du focus ou checked */
    .custom-checkbox:focus,
    .custom-checkbox:checked {
        box-shadow: 0 0 0 0.25rem rgba(52, 58, 64, 0.5); /* #343a40 en transparence */
    }
/* Animations bounce-in / bounce-out */
@keyframes bounceIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
        opacity: 1;
    }

    80% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes bounceOut {
    20% {
        transform: scale(0.9);
    }

    50%, 55% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

.modal.fade .modal-dialog {
    transform: scale(0.7);
    transition: none; /* désactiver Bootstrap fade transform */
}

.modal.show .modal-dialog {
    animation: bounceIn 0.6s forwards;
}

.modal.fade-out .modal-dialog {
    animation: bounceOut 0.6s forwards;
}
.btn-cyan {
    color: white;
    background-color: #0C7882;
    border-color: #0C7882;
}
.bg-cyan {
    color: white !important;
    background-color: #0C7882 !important;
}

/* Supprime les paddings par défaut des td pour qu'ils collent à l'input */
.custom-table td {
    padding: 0 !important; /* supprime padding vertical */
    vertical-align: middle !important; /* centre le contenu verticalement */
}

/* Optionnel : supprime margin sur l'input */
.custom-table input.form-control {
    margin: 0;
    height: 2rem; /* ou ajuster selon ton design */
    padding: 0 0.5rem; /* padding horizontal uniquement */
    box-sizing: border-box; /* inclut padding et border dans la hauteur */
}

/* Supprime les paddings par défaut des td pour qu'ils collent à l'input */
.custom-table-delivery td {
    padding: 1px !important; /* supprime padding vertical */
    vertical-align: middle !important; /* centre le contenu verticalement */
}

/* Optionnel : supprime margin sur l'input */
.custom-table-delivery input.form-control {
    margin: 0;
    height: 2rem; /* ou ajuster selon ton design */
    padding: 0 0.5rem; /* padding horizontal uniquement */
    box-sizing: border-box; /* inclut padding et border dans la hauteur */
}



.readonly-select {
    pointer-events: none; /* bloque le clic */
    background-color: #e9ecef; /* style grisé comme un input readonly */
}

.th-spaced {
    padding-left: 5px !important; /* espace avant */
    padding-right: 5px !important; /* espace après */
}

/* Cible seulement les td qui contiennent input sauf checkbox, ou select */
#tblDeliveries td:has(input:not([type="checkbox"])),
#tblDeliveries td:has(select) {
    max-height: 3em; /* hauteur ~ 2 lignes */
    overflow: hidden; /* cache ce qui dépasse */
    white-space: normal; /* retour à la ligne possible */
    word-break: break-word; /* coupe les mots trop longs */
    padding: 2px 4px; /* réduit un peu l’espace interne */
    vertical-align: middle; /* centre verticalement */
}

/* Style appliqué aux champs input (hors checkbox) et select */
#tblDeliveries td input:not([type="checkbox"]),
#tblDeliveries td select {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* max 2 lignes */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    height: auto; /* s’ajuste automatiquement */
    width: 100%; /* occupe toute la largeur */
    line-height: 1.2em; /* compresse un peu la hauteur */
}

/* Applique à tous les en-têtes */
#tblNewDelivery th {
    white-space: normal; /* évite de couper le texte sur plusieurs lignes */
    text-align: center; /* centre le texte si tu veux un rendu uniforme */
}

    /* Colonne Remark (9ème colonne) → plus large */
    #tblNewDelivery th:nth-child(9),
    #tblNewDelivery td:nth-child(9) {
        min-width: 450px; /* largeur minimale */
        padding-left: 25px;
        padding-right: 25px;
    }

    /* Colonne Remark (9ème colonne) → plus large */
    #tblNewDelivery th:nth-child(4),
    #tblNewDelivery td:nth-child(4) {
        min-width: 90px; /* largeur minimale */
        max-width:90px !important;
        padding-left: 25px;
        padding-right: 25px;
    }

    #tblNewDelivery th:nth-child(5),
    #tblNewDelivery td:nth-child(5) {
        min-width: 90px; /* largeur minimale */
        max-width: 90px !important;
        padding-left: 25px;
        padding-right: 25px;
    }

    #tblNewDelivery th:nth-child(7),
    #tblNewDelivery td:nth-child(7) {
        min-width: 130px; /* largeur minimale */
        max-width: 130px !important;
        padding-left: 25px;
        padding-right: 25px;
    }

.table-fix-head {
    overflow-y: auto;
    height: 10px;
}

    .table-fix-head table {
        border-collapse: collapse;
        width: 100%;
    }

    .table-fix-head th, .table-fix-head td {
        padding: -15px 16px;
    }

    .table-fix-head th {
        position: sticky;
        top: 0;
        background-color: #343a40 !important;
    }

#deliveryDateRange {
    background: url('https://cdn-icons-png.flaticon.com/512/747/747310.png') no-repeat right 10px center;
    background-size: 18px;
}



