
.tg
{
	/*border-collapse:collapse;*/
	border-spacing:0;
	/*border-color:#cbcc4f;*/
	margin: 50px auto;
/*	border-radius: 10px;
	overflow: hidden;*/
}

.tg a{
	text-decoration: underline;
	color:#cbcc4f ;
}

.tg a:hover{
	text-decoration: none;
}

.tg img{
	width: 100%;
	max-width: 100px;
	height: auto;
	display: block;
	margin: 0 auto 5px auto ;
}

.tg td
{
	font-family:'Open Sans', Arial, sans-serif;
	font-size:12px;
	padding:10px 5px;
/*	border-style:solid;
	border-width:1px;*/
	overflow:hidden;
	word-break:normal;
	/*border-color:#cbcc4f;*/
	border-left: 1px solid #cbcc4f;
	border-right: 1px solid #cbcc4f;
	color:#FFF;
	/*background-color:#fff;*/
}

.tg th
{
	font-family:'Open Sans', Arial, sans-serif;
	font-size:14px;
	font-weight:normal;
	padding:10px 5px;
	border-style:solid;
	border-width:1px;
	overflow:hidden;
	word-break:normal;
	/*border-color:#cbcc4f;*/
	color:#000;
	background-color:#cbcc4f;
}

.tg th:first-child{
	border-top-left-radius : 20px;
}

.tg th:last-child{
	border-top-right-radius : 20px;
}

.tg .tg-baqh
{
	text-align:center;
vertical-align:middle;
}

.tg .tg-yw4l
{
vertical-align:top;
}

.historic tr:last-child{
	border-bottom: 1px solid #cbcc4f;
}

.invoice tfoot td{
	border-left: none;
	border-right: none;

}

.invoice tfoot{
	border-bottom: 1px solid #cbcc4f;

}

.invoice tfoot tr:first-child td{
	padding-top: 30px;
	border-top : 5px solid #cbcc4f;
}


.invoice tfoot tr td.cellright{
	text-align: right;
	color : #cbcc4f;
	font-weight: bold;
	font-size: 1.2em;
	vertical-align: middle;
	border-left: 1px solid #cbcc4f;
}

.invoice tfoot tr.total td{
	font-size: 1.4em !important;
	padding-bottom: 30px !important;
}

.invoice tr td:last-child{
	
	border-right: 1px solid #cbcc4f;
}
.invoice tr td.rightline{
	text-align: right;
	padding-right: 5%;
	vertical-align: middle;	
}

.invoice tr td.suppr a{
	display: block;
	text-indent: -5000px;
	width: 30px;
	height: 30px;
	margin: auto;
	background-image: url(../img/trash.png);
	background-repeat: no-repeat;
	background-position: center center;
}

.ElQuantity {
	width: 100% !important;
}

.ElQuantity input[type="number"]{
	max-width:50px;
	min-width:50px;
	padding: 0 0 0 5px !important;
	height:24px !important;
	margin: auto;
}
.ElQuantity input[type="submit"]{
	padding: 0px !important;
	width: 50px;
	margin-top: 2px !important;
}

@media screen and (min-width: 768px){
	.tg{
		width:80%;
	}
}

@media screen and (max-width: 767px)
{
	.tg
	{
		width: auto !important;
	}

	.tg col
	{
		width: auto !important;
	}

	/* overflow handled by the card-layout block below */
	.tg-wrap
	{
		overflow-x: hidden;
		-webkit-overflow-scrolling: touch;
	}

	.tg th{
		font-size: 11px;
		line-height: 11px;
	}

	.tg td{
		font-size: 10px;
		line-height: 11px;
	}
}

/* ════════════════════════════════════════════════════
   Mobile cart — fully responsive card layout (≤ 767 px)
   ════════════════════════════════════════════════════ */
@media screen and (max-width: 767px) {

	/* ── Wrapper ── */
	.tg-wrap {
		overflow-x: hidden !important;
		padding: 0;
		width: 100%;
		box-sizing: border-box;
	}

	/* ── Table stays display:table (don't change it — breaks width).
	   We only need width:100% and no margin to fill the screen. ── */
	.invoice {
		width: 100% !important;
		margin: 8px 0 !important;
		border-spacing: 0 !important;
		box-sizing: border-box;
	}

	/* Hide the desktop header row ── */
	.invoice tr:first-child {
		display: none !important;
	}

	/* ════ ITEM CARDS ════ */
	.invoice tr {
		display: block !important;
		background: #1a1a1a;
		border: 2px solid #cbcc4f;
		border-radius: 14px;
		margin-bottom: 16px;
		overflow: hidden;
		box-shadow: 0 4px 14px rgba(0,0,0,0.5);
	}

	/* ── Photo cell — card header, stacks image + ref vertically ── */
	.invoice tr td[data-label="Photo"] {
		display: flex !important;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 16px 14px !important;
		background: #222;
		border-bottom: 2px solid #cbcc4f !important;
		border-left: none !important;
		border-right: none !important;
		border-top: none !important;
		text-align: center !important;
		width: 100% !important;
		box-sizing: border-box;
		gap: 8px;
		color: #aaa;
		font-size: 11px;
	}

	.invoice tr td[data-label="Photo"]::before {
		display: none !important; /* thumbnail speaks for itself */
	}

	.invoice tr td[data-label="Photo"] img {
		max-width: 85px !important;
		max-height: 85px;
		width: auto;
		height: auto;
		border-radius: 6px;
		border: 1px solid #444;
		margin: 0 !important;
		display: block;
	}

	/* ── Standard label ↔ value rows ── */
	.invoice tr td {
		display: flex !important;
		flex-direction: row !important;
		justify-content: space-between !important;
		align-items: center !important;
		padding: 11px 16px !important;
		border-left: none !important;
		border-right: none !important;
		border-bottom: 1px solid #2c2c2c !important;
		border-top: none !important;
		min-height: 46px;
		box-sizing: border-box;
		width: 100% !important;
		font-size: 13px;
		color: #fff;
		overflow: visible;
	}

	.invoice tr td:last-child {
		border-bottom: none !important;
	}

	/* Label injected from data-label */
	.invoice tr td::before {
		content: attr(data-label);
		color: #cbcc4f;
		font-weight: 700;
		font-size: 11px;
		text-transform: uppercase;
		letter-spacing: 0.6px;
		flex: 0 0 auto;
		margin-right: 10px;
		white-space: nowrap;
		line-height: 1;
	}

	/* ── Sous-total — highlighted gold row ── */
	.invoice tr td[data-label="Sous-total"] {
		background: rgba(203,204,79,0.09);
		font-weight: 700;
		font-size: 15px !important;
		color: #cbcc4f !important;
	}

	.invoice tr td[data-label="Sous-total"]::before {
		color: #cbcc4f;
	}

	/* ── Quantity form — inline, side by side ── */
	.invoice tr td[data-label="Qté"] {
		flex-wrap: wrap;
		gap: 6px;
	}

	.ElQuantity {
		display: inline-flex !important;
		flex-direction: row !important;
		align-items: center !important;
		gap: 6px !important;
		width: auto !important;
		flex-shrink: 0;
	}

	.ElQuantity input[type="number"] {
		max-width: 54px !important;
		min-width: 46px !important;
		height: 34px !important;
		padding: 0 4px 0 8px !important;
		font-size: 14px !important;
		border-radius: 4px;
	}

	.ElQuantity input[type="submit"] {
		width: auto !important;
		padding: 7px 14px !important;
		font-size: 12px !important;
		height: 34px !important;
		margin: 0 !important;
		border-radius: 4px !important;
	}

	/* ── Delete cell — centred pill button ── */
	.invoice tr td.suppr {
		justify-content: center !important;
		padding: 10px 16px !important;
		background: rgba(220,50,50,0.06);
		min-height: 48px;
	}

	.invoice tr td.suppr::before {
		display: none !important;
	}

	.invoice tr td.suppr a {
		display: inline-flex !important;
		align-items: center;
		gap: 6px;
		text-indent: 0 !important;
		width: auto !important;
		height: auto !important;
		background-image: none !important;
		background: rgba(220,50,50,0.14) !important;
		color: #e05a5a !important;
		font-size: 13px;
		font-weight: 700;
		text-decoration: none;
		padding: 8px 20px;
		border: 1px solid rgba(220,50,50,0.4);
		border-radius: 24px;
	}

	.invoice tr td.suppr a::before {
		content: "\f1f8";
		font-family: "Font Awesome 5 Free";
		font-weight: 900;
	}

	/* ════════════════════════════════════════
	   TOTALS CARD
	   Uses native table layout — no flex tricks.
	   colspan, rightline, and cellright all work
	   exactly as on desktop; we just restyle them.
	   ════════════════════════════════════════ */
	/* tfoot keeps its native display (table-footer-group) so colspan works
	   and amounts always align correctly next to their labels */
	.invoice tfoot {
		display: table !important;
		width: 100% !important;
		border-collapse: collapse;
		background: #1a1a1a;
		border: 2px solid #cbcc4f;
		border-radius: 14px;
		overflow: hidden;
		margin-top: 8px;
		box-shadow: 0 4px 14px rgba(0,0,0,0.5);
		box-sizing: border-box;
	}

	.invoice tfoot tr {
		display: table-row !important;
		border: none !important;
		border-radius: 0 !important;
		margin: 0 !important;
		box-shadow: none !important;
		background: transparent !important;
	}

	.invoice tfoot tr + tr td {
		border-top: 1px solid #2c2c2c !important;
	}

	.invoice tfoot tr.total {
		background: rgba(203,204,79,0.08) !important;
	}

	/* Override global tfoot td styles inside media query */
	.invoice tfoot td {
		display: table-cell !important;
		border: none !important;
		padding: 13px 16px !important;
		font-size: 13px !important;
		color: #ccc;
		vertical-align: middle !important;
	}

	/* Never inject ::before into tfoot cells */
	.invoice tfoot td::before {
		content: none !important;
	}

	/* The label cell (colspan=5) */
	.invoice tfoot td.cellright {
		text-align: left !important;
		color: #aaa !important;
		font-weight: 600 !important;
		font-size: 13px !important;
		border-left: none !important;
	}

	/* The amount cell */
	.invoice tfoot td.rightline {
		text-align: right !important;
		font-weight: 700 !important;
		color: #ffffff !important;
		font-size: 14px !important;
		white-space: nowrap;
		padding-right: 16px !important;
	}

	/* Hide the always-empty third td */
	.invoice tfoot td:not(.cellright):not(.rightline) {
		display: none !important;
		width: 0 !important;
		padding: 0 !important;
	}

	/* Grand total row */
	.invoice tfoot tr.total td.cellright {
		color: #cbcc4f !important;
		font-size: 15px !important;
		font-weight: 700 !important;
	}

	.invoice tfoot tr.total td.rightline {
		color: #cbcc4f !important;
		font-size: 18px !important;
	}

	/* Discount row */
	.invoice tfoot tr[style*="#3c2323"] {
		background: rgba(220,50,50,0.07) !important;
	}

	.invoice tfoot tr[style*="#3c2323"] td.cellright {
		color: #e05a5a !important;
	}

	.invoice tfoot tr[style*="#3c2323"] td.rightline {
		color: #e05a5a !important;
	}

	/* Override the heavy global rule that adds 30px padding-top to first tfoot row */
	.invoice tfoot tr:first-child td {
		padding-top: 13px !important;
		border-top: none !important;
	}
}

