body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
}

/* Partie supérieure divisée en 2 */
#header {
    display: flex;
    height: 60px;
}

#header-gauche {
    background-color: #4CAF50; /* Vert */
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

#header-droit {
    background-color: #2196F3; /* Bleu */
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* Ajouté pour le positionnement du bouton */
}

#categories-select {
    width: 80%;
    padding: 10px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
}

/* Contenu principal */
#contenu {
    display: flex;
    flex: 1;
    flex-wrap: wrap; /* Permet aux éléments de s'adapter à la largeur */
}

#panier {
    flex: 1; /* Prend la moitié de l'espace disponible */
    min-width: 300px; /* Largeur minimale */
    max-width: 400px; /* Largeur maximale */
    background: linear-gradient(to bottom, #a2c2e8, #e6f2ff); /* Dégradé */
    padding: 20px;
    border-radius: 10px; /* Coins arrondis */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

#contenu-panier {
    background-color: #f4f4f4; /* Fond pour le contenu du panier */
    border-radius: 8px; /* Coins arrondis */
    padding: 10px;
    min-height: 100px; /* Hauteur minimale */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    text-align: center; /* Centrer le titre du panier */
    color: #333; /* Couleur du texte */
    margin-bottom: 10px; /* Espacement en bas */
}

/* Ajoutez ce style pour le div scanner */
#scanner {
    position: fixed; /* Position fixe */
    bottom: 0; /* Aligne en bas */
    left: 28%; /* Aligne à gauche */
    right: 0; /* Aligne à droite */
    background-color: white; /* Couleur de fond pour le scanner */
    padding: 10px; /* Espacement intérieur */
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); /* Ombre pour le scanner */
    z-index: 1000; /* Assure que le scanner est au-dessus des autres éléments */
}

/* Ajoutez un padding-bottom au #produits pour éviter que le contenu soit masqué par le scanner */
#produits {
    flex: 2; /* Prend le reste de l'espace disponible */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: flex-start;
    padding: 10px;
    padding-bottom: 80px; /* Ajustez cette valeur en fonction de la hauteur du #scanner */
}


.produit {
    flex: 0 0 20%; /* Chaque produit prend 30% de la largeur, adaptable */
    margin: 10px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.produit img {
    width: 30%;
    height: auto;
    border-radius: 5px;
}

button {
    background-color: #db7e0d;
    color: white;
    border: none;
    padding: 10px;
    margin-top: 10px;
    cursor: pointer;
    border-radius: 5px;
}

button:hover {
    background-color: #45a049;
}

.icon {
    font-size: 24px; /* Taille des icônes */
    margin: 10px; /* Espacement entre les icônes */
    cursor: pointer; /* Changer le curseur en main */
    transition: transform 0.2s; /* Animation de transition */
}

.icon:hover {
    transform: scale(1.2); /* Agrandir l'icône au survol */
}

/* Styles communs pour tous les modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fond transparent */
    justify-content: center;
    align-items: center;
    z-index: 1050; /* Assure que le modal est au-dessus de tout */
    transition: opacity 0.3s ease-in-out;
}


/* Lorsque le modal est visible */
.modal.show {
    display: flex;
    opacity: 1;
    transition: opacity 0.3s;
}

/* Contenu du modal */
.modal-content {
    display: flex;
    flex-direction: column; /* Assurez-vous que les éléments s'affichent en colonne */
    justify-content: center; /* Centre verticalement */
    align-items: center; /* Centre horizontalement */
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    width: 50%;
    max-height: 80%;
    overflow-y: auto;
    text-align: center;
}

/* Bouton de fermeture */
button {
    margin-top: 10px;
}

@media (max-width: 768px) {
    #panier, #produits {
        flex: 100%; /* Les éléments occupent toute la largeur en mode mobile */
        min-width: 100%; /* Largeur minimale pour mobile */
        max-width: 100%; /* Largeur maximale pour mobile */
    }

    .modal-content {
        width: 90%; /* Responsive pour mobiles */
    }

    .produit {
        flex: 0 0 100%; /* Chaque produit prend 100% de la largeur sur mobile */
    }
}

.ticket-caisse {
    width: 300px;
    margin: 20px auto;
    padding: 10px;
    border: 1px solid #000;
    border-radius: 5px;
    background-color: #fff;
    font-family: Arial, sans-serif;
}

.header-ticket {
    text-align: center;
    margin-bottom: 10px;
}

.logo-ticket {
    width: 80px;
    height: auto;
}

.contenu-ticket {
    border-top: 1px dashed #000;
    border-bottom: 1px dashed #000;
    padding: 10px 0;
}

.footer-ticket {
    text-align: center;
    margin-top: 10px;
}

.qrcode-ticket {
    width: 100px;
    height: 100px;
}
#input-qrcode {
    border: 2px solid #DB7E0D; /* Bordure verte */
    border-radius: 5px;        /* Coins arrondis */
    padding: 8px;              /* Espacement interne */
    width: 300px;              /* Largeur de l'input */
    font-size: 16px;           /* Taille du texte */
    outline: none;             /* Retirer le contour par défaut au focus */
}

/* Ajouter un effet au focus */
#input-qrcode:focus {
    border-color: #2196F3;     /* Bordure bleue au focus */
    box-shadow: 0 0 8px #2196F3;
}

@media print {
    body * {
        display: none; /* Masquer tout le contenu de la page */
    }
    .ticket-caisse, .ticket-caisse * {
        display: block; /* Afficher uniquement le ticket et son contenu */
    }
}

button[onclick="AnnulerCommande()"] {
    background-color: red;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
}

button[onclick="AnnulerCommande()"]:hover {
    background-color: darkred;
}

#modal-receipt {
    display: none; /* Cacher par défaut */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}
.table {
    width: 80%;
    margin: auto;
    background: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.form-group {
    display: flex;
    align-items: center; /* Aligner les éléments verticalement */
    gap: 10px; /* Espacement entre les éléments */
  }

  .form-control {
    flex: 1; /* Le champ de texte prend tout l’espace disponible */
    padding: 10px;
    font-size: 16px;
  }

  button {
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
  }

  .table {
    width: 100%;
    margin-top: 20px;
}
.form-control {
    margin-bottom: 10px;
}