/* Styles généraux */

html, body {
   /* overflow-x: hidden;*/
}
#table_details {
    overflow-x: auto !important;
}
body {
    font-family: 'Arial', sans-serif;
    background-color: #f8f8f8; /* Fond très clair */
    margin: 0;
    padding: 20px;
    color: #333; /* Texte foncé pour lisibilité */
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
}

.container {
    max-width: 96%;
    margin: auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Ombre légère */
}

.search-container {
    position: sticky;
    top: 0;
    background: #ffffff;
    padding: 10px 0;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-bottom: 20px;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;

}
	
#search {
    width: 50%;
    padding: 10px;
    font-size: 16px;
    padding-right: 30px; /* pour laisser de la place à la croix */
}

.clear-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #888;
}

p {
    margin: 3px;
    padding: 0px;
}

@keyframes blink {
    0% { color: red; font-weight: bold; }
    50% { color: black; font-weight: bold; }
    100% { color: red; font-weight: bold; }
}

tr.highlight-row {
    animation: blink 1s infinite;
}



/* Résultats de la recherche */
#search-results {
    margin-top: 20px;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    background: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none; /* Caché par défaut */
}

#search-results span {
    color: #b8860b; /* Or foncé */
    font-size: 20px;
}

/* Titre */
h1 {
    text-align: center;
    color: #ff5722; /* Or foncé */
    font-size: 28px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

H1, h2, h3, h4 {
	padding:0px;
	margin:8px;
    line-height: 1; /* Réduit l'espacement vertical */
	DISPLAY: inline-table;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
   /* margin-top: 20px;*/
    background: #fff; /* Fond blanc */
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd; /* Bordure légère */
}

/* En-tête des colonnes */
th {
    background: #ff5722; /* Or foncé */
    color: white;
    text-transform: uppercase;
	padding-left: 0px;
    font-weight: bold;
    text-align: left;

}

th, td {
   /* padding: 5px; /* Équivaut à cellpadding="5" */
    white-space: nowrap;
}

tr.game-row, .game-row {
   /* height: 50px;*/
    cursor: pointer;
	/*display: flex; */
	 flex-wrap: wrap; 
	 justify-content: space-between; 
	 align-items: center; 
	 /*width: 100%; */
	 margin: 0 auto; 
	 padding: 10px; 
	  padding: 15px;
}

/* Alternance des couleurs de ligne */
#table_details tr {
    background: #f2f2f2; /* Gris très clair */
}
/* Alternance des couleurs de ligne */
#table_details tr {
    background: #f2f2f2; /* Gris très clair */
	padding: 15px;

}

/* Ligne des clients */
.client-row,  .client-td {
    background-color: #f8e4c2; /* Beige clair */
    color: #654321; /* Marron foncé */
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
}

.client-row td {
    border-radius: 8px;
    font-size: 16px;
}
.client-row-fin {
    height: 100px;
    background: none !important;
    border-top: 2px dotted black;
    vertical-align: top;
}

/* Effet sur les lignes de jeux */
.game-row:hover {
    background: #ffe9c6; /* Beige plus clair au survol */
}

/* Message lorsqu'un client n'a pas de jeux */
.no-games {
    text-align: center;
    color: #777;
    font-style: italic;
}

/* Boutons */
.button-container {
    text-align: right;
    margin-top: 10px;
}

.btn {
    padding: 12px 18px;
    background: #b8860b; /* Or foncé */
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s ease-in-out;
}

.btn:hover {
    background: #a0700a; /* Or plus foncé */
    box-shadow: 0 0 10px rgba(184, 134, 11, 0.4);
}

/* Ombre sur hover des lignes */
tr:hover {
    box-shadow: 0 2px 10px rgba(184, 134, 11, 0.2);
    transition: 0.2s;
}


/* Modale */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
	
}

/* Contenu de la modale */
.modal-content {
    background: white;
    width: 50%;
    height: 70%;
    margin: 25% ;
    margin-top: 5%;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
}






/* Conteneur du clavier numérique */
.calculator {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-top: 20px;
    width: 90%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* Affichage de la valeur */
#display {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: white;
    margin-bottom: 10px;
}

/* Conteneur des boutons */
.buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* Boutons numériques */
.btn {
    padding: 15px;
    font-size: 20px;
    font-weight: bold;
    background: #ff5722;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.2s ease-in-out;
	display: none !important;
}

.btn:hover {
    background: #e64a19;
}

/* Bouton 0 qui prend plus de place */
.btn.zero {
    grid-column: span 2;
}

/* Bouton C pour effacer */
.btn.clear {
    background: #d32f2f;
}

.btn.clear:hover {
    background: #b71c1c;
}


/* Total Jeux & Clients - Style moderne */
#total-jeux, #total-clients {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    padding: 15px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    color: #333;
    width: 250px;
    transition: transform 0.2s ease-in-out;
}

#total-jeux:hover, #total-clients:hover {
    transform: scale(1.05);
}

#total-jeux span, #total-clients span {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #b8860b; /* Or foncé */
}

/* Section pour aligner les totaux */
.total-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

/* Résultats de la recherche */
#search-results {
    margin-top: 20px;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    background: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none; /* Caché par défaut */
}

#search-results span {
    color: #b8860b; /* Or foncé */
    font-size: 20px;
}


/* Bouton de déconnexion */
.logout-container {
    text-align: center;
    margin-top: 30px;
}

.logout-btn {
    display: inline-block;
    padding: 12px 20px;
    font-size: 18px;
    font-weight: bold;
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease-in-out, transform 0.2s;
    text-decoration: none;
}

.logout-btn:hover {
    background: #cc0000;
    transform: scale(1.1);
}

/* Bouton RELEVE DE CAISSE */
#releve-btn {
    background-color: #007bff;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin: auto;
}
#releve-btn-red {
    background-color: red !important;
}
#releve-btn-jeux {
    background-color: green !important;
	display: inline-block;
}
#releve-btn:hover {
    background-color: #0056b3;
}

.client-card {
    margin-bottom: 30px;
}

.releve-btn-client {
	margin-bottom:50px;
}

i.releve-btn-jeux {
    font-size: 12px;
}

.rbj_gauche {
    display:none !important;
}
.rbj_droite {
    display:block !important;
}



/* Boutons de la calculatrice */
.buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.buttons button {
    background: #28a745;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.buttons button:hover {
    background: #218838;
}

/* Bouton "C" */
.buttons button:last-child {
    background: #dc3545;
}

.buttons button:last-child:hover {
    background: #c82333;
}


/* Conteneur */
.calculator-container {
    width: 100%;
    max-width: 320px;
    margin: auto;
    text-align: center;
    background: #f8f8f8;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Écran de saisie */
.lcd-screen {
    background: black;
    color: lime;
    font-size: 28px;
    font-family: 'Courier New', monospace;
    padding: 10px;
    text-align: center;
    border: 2px solid #ccc;
    margin: 15px auto;
    height: 50px;
    border-radius: 5px;
    width: 80%;
}

#total-releve {
    font-size: 30px;
    font-weight: bolder;
    color: red;
}

/* Bouton de validation */
.validate-btn, .final-btn {
    color: white;
    text-align: center;
    padding: 10px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 15px;
    width: 80%;
}
.validate-btn:hover {
  /*  background: #0056b3;*/
}

/* Bouton final en vert */
.final-btn {
    background: #28a745;
    display: block;
    margin-top: 20px;
}

.final-btn:hover {
    background: #218838;
}


/* Bouton de fermeture */
.bouton-close, .close { 
	position:absolute; 
	top:10px; 
	right:10px; 
	background:red; 
	color:white; 
	border:none; 
	padding:10px; 
	cursor:pointer; 
	border-radius:5px;
}


/* --- STYLE DU CONTAINER LOGIN --- */
.login-container {
    width: 100%;
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* --- STYLE DES CHAMPS DE FORMULAIRE --- */
input {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    transition: border 0.3s ease-in-out;
}

input:focus {
    border-color: #007bff;
    outline: none;
}

/* --- STYLE DES BOUTONS --- */
button, select {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s ease;
    margin-bottom: 80px;
	text-align: center;
}

select {
    background-color: #000;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s ease;
    margin-bottom: 10px;
	text-align: center;
}


button:hover {
    background-color: #0056b3;
}


.releve-box {
	line-height:1.5;
}

button {
    width: initial;
}


#commission-form button {
 width: -webkit-fill-available !important;
}



form {
    margin: 0;
    padding: 0;
}

.utlisateurs {
	margin-top:100px;
	text-align:center;
}

button#releve-btn-red {
    margin-bottom: 50px;
}

.calculator-container h4 {
    font-size: x-large;
}

tr.game-row, .game-row {
    /* height: 50px; */
    cursor: pointer;
    /* display: flex
; */
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    /* width: 100%; */
    margin: 0 auto;
    padding: 10px;
    white-space: nowrap;
}

p.rbj_droite {
    white-space: nowrap;
	font-size: x-small;
}


button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#ligne-ticket-client {
	padding:5px;
}



.releve-deja-releve {
    background-color: #dddd; /* bleu doux */
    color: gray;
}
.releve-moins-1semaine {
    background-color: #00FF00; /* bleu doux */
    color: gray;
}
.releve-moins-2semaines {
    background-color: #009900; /* bleu doux */
    color: white;
}
.releve-moins-1mois {
    background-color: #004803; /* vert clair */
    color: white;
}
.releve-moins-2mois {
    background-color: #FFFF00; /* orange pâle */
    color: black;
}
.releve-moins-3mois {
    background-color: #FF9900; /* orange vif */
    color: black;
}
.releve-moins-6mois {
    background-color: #ff0000; /* rouge clair */
    color: white;
}
.releve-plus-6mois {
    background-color: #6d6d6d; /* rouge foncé */
    color: white;
}
	
.ligne-matching {
    background-color: #d4edda !important; /* vert clair */
    transition: background-color 0.2s;
}

#legende {
	font-size: 12px;
    position: fixed;
    bottom: 0px;
    background-color: #dfdfdf;
    width: 100%;
    left: 0;
    text-align: center;
    padding: 5px;
}

.legende-couleur {
	display: inline-block;
	width: 20px; 
	height: 20px; 
	background-color: #00FF00;
	margin-left: 30px; 
}


input[type="tel"].mdp-chiffre {
    -webkit-text-security: disc; /* pour masquer comme un mot de passe */
    text-security: disc;
}

button#utlisateurs {
    margin-left: auto;
    padding: 5px;
    margin-right: auto;
    text-align: center;
    margin: 5px;
    background-color: black;
    font-size: 12px;
}

.commission-block {
    text-align: center !important;
    font-size: x-large;
	display: block;
}

input.piece-input {
    width: 50VW;
}

/* Rendre la table responsive */
@media (max-width: 768px) {
  body {
    margin-left: 0px;
    margin-right: 0px;
	 
  }
  
  .container {
    flex-direction: column;
  }		


			.modal-content {
				background: white;
				width: 100%;
				height: 100%;
				margin: 1% auto;
				padding: 20px;
				border-radius: 10px;
				box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
				position: relative;
			}

		   table {
				width: 100%;
				display: BLOCK;
				overflow-x: auto;
			/*	white-space: nowrap;*/
			}

			th, td {
				padding: 10px;
				text-align: left;
			}

			/* Transformer la table en affichage vertical sur mobile */
			/*
			table, thead, tbody, th, td, tr {
				display: block;
			}
			*/
			thead {
				display: none; /* Cacher l'en-tête pour économiser de l'espace */
			}

			tr {
				border: 1px solid #ddd;
				margin-bottom: 10px;
				padding: 10px;
				border-radius: 8px;
				background: white;
				white-space: nowrap;
			}

			td {
				position: relative;
				/* padding-left: 50%;*/
				text-align: left;
			}

			td:before {
				content: attr(data-label); /* Ajoute une étiquette pour chaque cellule */
				position: absolute;
				left: 10px;
				font-weight: bold;
				color: #b8860b; /* Or foncé */
			}
			.calculator {
				width: 100%;
				max-width: 250px;
			}

			.btn {
				padding: 12px;
				font-size: 18px;
			}

			.validate-btn {
				padding: 12px;
				font-size: 18px;
			}
			.btn {
				display: block;
			}
			
			div#detailsModal {
				width: 90%;
			}

			.rbj_gauche {
				display:inline-block !important;
			}
			.rbj_droite {
				display:none !important;
			}
/*
    #legende {
        left: 0;
        top: unset !important;
        right: 60px !important;
        height: 30px;
        background-color: white !important;
        display: flex;
        align-items: center;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        padding: 0 10px !important;
        border-top: 1px solid #ccc !important;
        z-index: 999 !important;
    }
*/
.legende-item {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    font-size: 13px;
}

.legende-couleur {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
    border: 1px solid #333;
}



}
