/*
 * ========================================================
 * [ÉTAT : FINAL] Date : 21-05-2026 20:15:00
 * FICHIER : ventes_du_jour.css
 * RÔLE : Feuille de style pour la page de caisse (Ventes du jour)
 * Auteurs : Yvan Dubé & Gemini (IA Collaboratrice)
 * =========================================================
 */

/* ==========================================================================
   1. BARRE DE RECHERCHE ET CONTRÔLES (HAUT DE PAGE)
   ========================================================================== */

#sticky2 {
    position: sticky;
    top: 52px; 
    background: #fff;
    z-index: 1000;
    border-bottom: 2px solid var(--couleur-primaire);
    box-shadow: 0 4px 6px -6px #222;
}

.grid_banniere_bas {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr; 
    align-items: center; 
    gap: 15px;
    padding: 10px;
    background-color: #fff;
    min-height: 75px;
}

.groupe-gauche, 
.groupe-centre, 
.groupe-droite {
    display: flex;
    flex-direction: row;
    align-items: center; 
    gap: 15px; 
}

.groupe-centre { justify-content: center; }
.groupe-droite { justify-content: flex-end; }

.groupe-gauche form, 
.form-paiement, 
.form-recherche {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.boite_diverse, p.boite_diverse {
    border: 2px solid var(--couleur-primaire);
    color: var(--couleur-primaire);
    background-color: #fdf7ff;
    padding: 6px 15px;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
    margin: 0; 
}

.total-panier {
    font-size: 1.1em;
    border-width: 3px;
}

/* ==========================================================================
   2. STRUCTURE DES GRILLES DE PRODUITS (RECHERCHE ET PANIER)
   ========================================================================== */

.grid-container-ventes, 
.grid-container-content {
    display: grid;
    grid-template-columns: 100px 100px 1fr 120px 100px 120px;
    gap: 2px;
    background-color: #ccc; 
    border: 1px solid #ccc;
    align-items: center;
}

.grid-container-ventes > div, 
.grid-container-content > div {
    background-color: #eee;
    padding: 8px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 50px;
}

.entete-mauve > div {
    background-color: var(--couleur-primaire) !important;
    color: white !important;
    font-weight: bold;
}

.ligne-panier > div {
    background-color: #f3e5f5 !important;
    color: #000 !important; 
    font-weight: 500;
}

/* ==========================================================================
   3. INTERACTIONS ET LIGNES CLIQUABLES (RÉSULTATS AJAX)
   ========================================================================== */

.ligne-caisse {
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none; 
}

.ligne-caisse:hover > div {
    background-color: #f9f0ff !important; 
}

.ligne-caisse:has(.res-checkbox:checked) > div {
    background-color: #f0e4f2 !important;
    color: #000 !important; 
    font-weight: 500; 
}

.res-checkbox {
    transform: scale(1.4);
    cursor: pointer;
    accent-color: var(--couleur-primaire);
}

/* ==========================================================================
   4. ÉLÉMENTS SPÉCIFIQUES (IMAGES & CHAMP QUANTITÉ)
   ========================================================================== */

.input-achat, 
.qty-input {
    width: 60px !important;
    text-align: center;
    font-weight: bold;
    border: 2px solid #b481bd !important;
    border-radius: 5px;
    padding: 5px;
}

.grid-container-content img, 
.ligne-panier img {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover !important; 
    border-radius: 8px; 
    border: 1px solid #ccc; 
}

.cellule-actions {
    display: flex !important;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

/* ==========================================================================
   5. BOUTON FLOTTANT (CONFIRMATION D'AJOUT AU PANIER)
   ========================================================================== */

.btn-flottant {
    position: fixed !important;
    bottom: 30px;
    /* MODIFICATION : Centrage horizontal */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999; 
    
    background-color: var(--couleur-primaire);
    color: white !important;
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(123, 28, 141, 0.4);
    
    display: block; 
    /* MODIFICATION : Translucidité */
    opacity: 0.85;
    transition: all 0.2s ease;
}

.btn-flottant:hover {
    /* MODIFICATION : On combine le centrage et le grossissement au survol, et on rend 100% opaque */
    transform: translateX(-50%) scale(1.05);
    opacity: 1;
    background-color: #6a1879;
}

/* ==========================================================================
   6. CLASSES UTILITAIRES GLOBALES
   ========================================================================== */

.align-gauche { 
    justify-content: flex-start !important; 
    padding-left: 15px !important; 
    text-align: left; 
}

.bg-white { 
    background-color: white !important; 
}