/* --- Masque le lien "Voir le panier" que WooCommerce ajoute lui-même
   après un ajout réussi (à côté du bouton) : redondant avec notre propre
   panier latéral, et renvoie vers la page panier classique. --- */
.thresto-inline-panel .added_to_cart,
.thresto-cart-edit-panel .added_to_cart {
	display: none !important;
}

/* --- Barre de recherche + filtres catégorie --- */
.thresto-menu-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
}

.thresto-menu-toolbar .thresto-menu-search {
	flex: 1 1 100%;
	box-sizing: border-box;
	height: 56px;
	padding: 0 20px;
	border: 1px solid #ddd;
	border-radius: 12px;
	font-size: 17px;
	background: #fff !important;
	color: var(--thresto-search-text, #1e1e1e) !important;
	-webkit-text-fill-color: var(--thresto-search-text, #1e1e1e) !important;
	caret-color: var(--thresto-search-text, #1e1e1e);
}

.thresto-menu-cats-wrap {
	position: relative;
	flex: 1 1 100%;
	min-width: 0;
}

/* Une seule ligne défilante : les flèches (affichées seulement quand il
   reste des catégories hors champ) signalent qu'il y en a d'autres. */
.thresto-menu-cats {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding: 2px 0;
}
/* Centré quand tout tient sur la ligne, défilant sinon (les marges auto
   remplacent justify-content:center, qui rognerait le début de la liste). */
.thresto-menu-cats > :first-child {
	margin-left: auto;
}
.thresto-menu-cats > :last-child {
	margin-right: auto;
}
.thresto-menu-cats::-webkit-scrollbar {
	display: none;
}

.thresto-menu-cats-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: var(--thresto-accent, #1e1e1e);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
	padding: 0 0 3px;
}
.thresto-menu-cats-arrow[hidden] {
	display: none;
}
.thresto-menu-cats-arrow--prev {
	left: -6px;
}
.thresto-menu-cats-arrow--next {
	right: -6px;
}

.thresto-menu-toolbar .thresto-menu-cat-btn {
	box-sizing: border-box;
	height: 56px;
	background: #fff;
	color: #1e1e1e;
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	text-decoration: none;
	border: 1px solid #ddd;
	border-radius: 10px;
	padding: 0 28px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	white-space: nowrap;
	flex: 0 0 auto;
}
.thresto-menu-toolbar .thresto-menu-cat-btn:hover,
.thresto-menu-toolbar .thresto-menu-cat-btn:focus {
	background: #fff;
	color: #1e1e1e;
	border-color: var(--thresto-accent, #1e1e1e);
}
.thresto-menu-toolbar .thresto-menu-cat-btn.is-active,
.thresto-menu-toolbar .thresto-menu-cat-btn.is-active:hover,
.thresto-menu-toolbar .thresto-menu-cat-btn.is-active:focus {
	background: var(--thresto-accent, #1e1e1e);
	border-color: var(--thresto-accent, #1e1e1e);
	color: #fff;
}

.thresto-menu-empty-filtered[hidden] {
	display: none;
}

/* --- Grille de produits : deux affichages au choix (ThResto → Apparence) ---
   1. Masonry (par défaut) : colonnes CSS, chaque cartouche garde sa hauteur
      naturelle, sans trous. Un dépliant ouvert n'étire pas ses voisines.
   2. Alignée : grille avec sous-grille, les boutons sont alignés d'une
      cartouche à l'autre sur une même rangée. */
.thresto-menu-grid--masonry {
	column-count: 3;
	column-gap: 20px;
}
.thresto-menu-grid--masonry > .thresto-menu-card {
	break-inside: avoid;
	margin-bottom: 20px;
}

.thresto-menu-grid--aligned {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 20px;
	row-gap: 0;
	align-items: start;
}
.thresto-menu-grid--aligned > .thresto-menu-card {
	display: grid;
	grid-row: span 4;
	grid-template-rows: subgrid;
	margin-bottom: 20px;
	align-self: stretch;
}
/* Placement explicite des 4 lignes de la sous-grille. Sans photo, le texte
   occupe les lignes 1 et 2 (pas de vide au-dessus) et le prix reste calé
   en bas, juste au-dessus du bouton, comme sur les cartes voisines. */
.thresto-menu-grid--aligned > .thresto-menu-card > .thresto-menu-card-image { grid-row: 1; }
.thresto-menu-grid--aligned > .thresto-menu-card > .thresto-menu-card-body  { grid-row: 2; }
.thresto-menu-grid--aligned > .thresto-menu-card > .thresto-menu-card-cta   { grid-row: 3; }
.thresto-menu-grid--aligned > .thresto-menu-card > .thresto-inline-panel    { grid-row: 4; }
.thresto-menu-grid--aligned > .thresto-menu-card--sans-photo > .thresto-menu-card-body {
	grid-row: 1 / span 2;
}
.thresto-menu-grid--aligned .thresto-menu-card--sans-photo .thresto-menu-card-price {
	margin-top: auto;
}

@media (max-width: 900px) {
	.thresto-menu-grid--masonry {
		column-count: 2;
	}
	.thresto-menu-grid--aligned {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.thresto-menu-grid--masonry {
		column-count: 1;
	}
	.thresto-menu-grid--aligned {
		grid-template-columns: minmax(0, 1fr);
	}
}

.thresto-menu-card {
	border: 2px solid var(--thresto-panel-border, #eee);
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: var(--thresto-card-bg, #fff);
	color: var(--thresto-card-text, #1e1e1e);
	box-shadow: 0 2px 14px rgba(0, 0, 0, .07);
	padding: 10px;
	transition: border-color .15s ease;
}

.thresto-menu-card:hover,
.thresto-menu-card:focus-within {
	border-color: var(--thresto-accent, #1e1e1e);
}

.thresto-menu-card-image--statique {
	cursor: default;
}

.thresto-menu-card-image {
	display: block;
	background: #f2f2f2;
	cursor: pointer;
	border-radius: 10px;
	overflow: hidden;
}
.thresto-menu-card-image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}

.thresto-menu-card-body {
	padding: 14px 8px 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	text-align: center;
}

.thresto-menu-card .thresto-menu-card-title {
	color: var(--thresto-product-title, #1e1e1e);
	margin: 0;
	padding: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	text-align: center;
}

.thresto-menu-card-excerpt {
	font-size: 13px;
	color: #767676;
	line-height: 1.4;
}
.thresto-menu-card-excerpt p {
	margin: 0;
}

.thresto-menu-card-price {
	font-weight: 700;
	font-size: 20px;
	color: var(--thresto-accent, #1e1e1e);
}

/* Bouton à contour — cohérent avec "Modifier" et "Continuer ma commande",
   couleur paramétrable dans ThResto → Apparence panier. */
.thresto-menu-card-cta {
	display: block;
	width: 100%;
	font-family: inherit;
	text-transform: none;
	box-shadow: none;
	text-decoration: none;
	background: none;
	border: 2px solid var(--thresto-contour, #1e1e1e);
	border-radius: 10px;
	color: var(--thresto-contour, #1e1e1e);
	font-weight: 700;
	font-size: 15px;
	letter-spacing: .01em;
	padding: 14px 12px;
	cursor: pointer;
	text-align: center;
	transition: filter .15s ease;
}
.thresto-menu-card-cta:hover {
	filter: brightness(.9);
}
.thresto-menu-card-cta[aria-expanded="true"] {
	background: var(--thresto-contour, #1e1e1e);
	color: #fff;
}

/* --- Dépliant inline (suppléments + formulaire d'ajout) ---
   Réutilisé sur la cartouche ET dans le panier ("Modifier"). */
.thresto-inline-panel {
	border-top: 1px solid rgba(128, 128, 128, .25);
	padding: 6px 14px 8px;
	background: color-mix(in srgb, var(--thresto-card-text, #1e1e1e) 4%, var(--thresto-card-bg, #fff));
	color: var(--thresto-card-text, #1e1e1e);
}

/* Un thème qui colore lui-même p / label / input (souvent en clair sur site
   sombre) l'emporte sur la couleur héritée du dépliant : on la fixe
   explicitement sur chaque élément de texte, sinon le groupe de suppléments,
   la description ou la quantité deviennent illisibles (texte clair sur fond clair). */
.thresto-inline-panel .thresto-supplement-groupe-nom,
.thresto-inline-panel .thresto-supplement-sous-titre,
.thresto-inline-panel .thresto-supplement-option,
.thresto-inline-panel .thresto-supplement-option-libelle,
.thresto-inline-panel .woocommerce-product-details__short-description,
.thresto-inline-panel .woocommerce-product-details__short-description p,
.thresto-inline-panel .thresto-product-infos,
.thresto-inline-panel .thresto-product-infos * {
	color: var(--thresto-card-text, #1e1e1e);
}
.thresto-inline-panel .thresto-supplement-sous-titre {
	opacity: .7;
}
.thresto-inline-panel form.cart .quantity .qty {
	color: var(--thresto-card-text, #1e1e1e);
	background: var(--thresto-card-bg, #fff);
}
.thresto-inline-panel[hidden] {
	display: none;
}

.thresto-inline-panel-loading {
	text-align: center;
	color: #666;
	padding: 16px 0;
	margin: 0;
}

.thresto-product-panel-inner .summary {
	min-width: 0;
}
.thresto-product-panel-inner .summary > *:first-child {
	margin-top: 0;
}

/* Description courte + allergènes/régime : même habillage que les
   groupes de suppléments (Accompagnement), pour une présentation homogène. */
.thresto-product-panel-inner .woocommerce-product-details__short-description,
.thresto-product-panel-inner .thresto-product-infos {
	margin: 0 0 2px;
	padding: 2px 0;
}
.thresto-product-panel-inner .woocommerce-product-details__short-description > *:last-child,
.thresto-product-panel-inner .thresto-product-infos > *:last-child {
	margin-bottom: 0;
}

/* Quantité + bouton "Ajouter au panier" sur la même ligne, bouton dans le
   même style que "Voir les suppléments" (pleine largeur restante, fond
   plein). Les suppléments (avant dans le form) restent sur leur propre
   ligne via flex-basis: 100%. */
.thresto-inline-panel form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0;
}
.thresto-inline-panel form.cart > .thresto-supplements {
	flex: 1 1 100%;
	margin: 0 0 4px;
}
.thresto-inline-panel form.cart .quantity {
	flex: 0 0 auto;
	margin: 0;
}
.thresto-inline-panel form.cart .quantity .qty {
	width: 62px;
	padding: 12px 8px;
	border: 1px solid #ddd;
	border-radius: 10px;
	text-align: center;
}

.thresto-inline-panel form.cart .single_add_to_cart_button {
	flex: 1 1 auto;
	display: block;
	border: none;
	background: var( --thresto-accent, #1e1e1e );
	color: #fff;
	font-weight: 700;
	font-size: 18px;
	padding: 14px 12px;
	border-radius: 10px;
	cursor: pointer;
	text-align: center;
	transition: filter .15s ease;
}
.thresto-inline-panel form.cart .single_add_to_cart_button:hover {
	filter: brightness(1.08);
	color: #fff;
}
.thresto-inline-panel form.cart .single_add_to_cart_button:disabled,
.thresto-inline-panel form.cart .single_add_to_cart_button.disabled {
	opacity: .5;
	cursor: not-allowed;
	filter: none;
}

/* "Modifier" (reconfiguration d'un article déjà au panier) — même bouton
   que "Ajouter au panier", mais en contour pour bien le distinguer d'un
   nouvel ajout. Sélecteur renforcé (mêmes 2 classes sur le même élément +
   form.cart) pour l'emporter sur la règle plus générique ci-dessus, qui a
   sinon la même spécificité et gagne par l'ordre du fichier. */
.thresto-inline-panel.thresto-cart-edit-panel form.cart .single_add_to_cart_button {
	background: none;
	border: 2px solid var( --thresto-contour, #1e1e1e );
	color: var( --thresto-contour, #1e1e1e );
}
.thresto-inline-panel.thresto-cart-edit-panel form.cart .single_add_to_cart_button:hover {
	background: var( --thresto-contour, #1e1e1e );
	color: #fff;
}

/* --- Panier --- */
.thresto-cart-toggle {
	position: relative;
	background: none;
	border: none;
	font-size: 22px;
	cursor: pointer;
	padding: 6px 10px;
}

.thresto-cart-toggle-flottant {
	position: fixed;
	right: 32px;
	bottom: 32px;
	width: 68px;
	height: 68px;
	background: var( --thresto-accent, #1e1e1e ); /* même couleur que « Ajouter au panier » */
	color: #fff;
	border-radius: 50%;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .28);
	z-index: 9997;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 30px;
}
.thresto-cart-toggle-flottant .thresto-cart-count {
	font-size: 12px;
	padding: 4px 7px;
	background: var( --thr-accent, #d63638 ); /* accent du site (ThResto → Site) */
	color: var( --thr-ink, #fff );
}

.thresto-cart-count {
	position: absolute;
	top: -2px;
	right: -2px;
	background: #d63638;
	color: #fff;
	font-size: 11px;
	line-height: 1;
	border-radius: 50%;
	padding: 3px 6px;
	min-width: 16px;
	text-align: center;
}

.thresto-cart-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .4);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease;
	z-index: 9998;
}
.thresto-cart-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.thresto-cart-panel {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(380px, 100vw);
	background: var(--thresto-panel-bg, #fff);
	color: var(--thresto-panel-text, inherit);
	box-shadow: -4px 0 16px rgba(0, 0, 0, .15);
	transform: translateX(100%);
	transition: transform .3s ease;
	z-index: 9999;
	display: flex;
	flex-direction: column;
}
.thresto-cart-panel.is-open {
	transform: translateX(0);
}

.thresto-cart-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	border-bottom: 1px solid #eee;
}
.thresto-cart-panel-header h3 {
	margin: 0;
}
.thresto-cart-panel-header button {
	background: none;
	border: none;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
}

.thresto-cart-panel {
	font-size: 14px;
	line-height: 1.35;
}
.thresto-cart-panel-header h3 {
	font-size: 17px;
	margin: 0;
}
/* Le formulaire d'ajout/suppléments est réutilisé tel quel (mêmes classes
   que la cartouche de la grille) — on réduit polices et espaces ICI
   uniquement, pour ne pas affecter l'affichage sur la grille. */
.thresto-cart-panel .thresto-supplement-groupe-nom {
	font-size: 14px;
}
.thresto-cart-panel .thresto-supplement-options--cartes {
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 8px;
}
.thresto-cart-panel .thresto-supplement-options--cartes .thresto-supplement-option-img-wrap {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
}
.thresto-cart-panel .thresto-supplement-options--cartes .thresto-supplement-option-img {
	width: 100%;
	height: 100%;
}
.thresto-cart-panel .thresto-supplement-option {
	font-size: 12px;
}
.thresto-cart-panel .thresto-supplement-groupe {
	margin-bottom: 6px;
}
.thresto-cart-panel .thresto-product-panel-inner .woocommerce-product-details__short-description,
.thresto-cart-panel .thresto-product-panel-inner .thresto-product-infos {
	font-size: 13px;
	padding: 2px 0;
	margin-bottom: 2px;
}
.thresto-cart-panel .thresto-inline-panel form.cart {
	gap: 8px;
}
.thresto-cart-panel .thresto-inline-panel form.cart .quantity .qty {
	padding: 10px 6px;
}
.thresto-cart-panel .thresto-inline-panel form.cart .single_add_to_cart_button {
	padding: 12px 10px;
	font-size: 16px;
}
.thresto-cart-panel .thresto-supplement-total {
	background: none;
	border: 2px solid var(--thresto-accent, #1e1e1e);
	color: var(--thresto-accent, #1e1e1e);
}

.thresto-cart-panel-content {
	padding: 14px;
	overflow-y: auto;
	flex: 1;
}

.thresto-cart-items {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
}

.thresto-cart-item {
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f0;
}

.thresto-cart-item-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.thresto-cart-item.is-being-edited .thresto-cart-item-image,
.thresto-cart-item.is-being-edited .thresto-cart-item-name {
	opacity: .5;
}

.thresto-cart-item-image img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 4px;
}

.thresto-cart-item-details {
	flex: 1;
}
.thresto-cart-item-name {
	font-weight: 600;
	font-size: 14px;
}
.thresto-cart-item-qty {
	font-size: 13px;
	color: #666;
}

.thresto-cart-item-options {
	list-style: none;
	margin: 2px 0;
	padding: 0;
	font-size: 12px;
	color: #888;
}

.thresto-cart-item-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
}

.thresto-cart-item-edit {
	background: none;
	color: var(--thresto-contour, #1e1e1e); /* sans ça, le texte blanc des boutons du thème le rendait invisible */
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 11px;
	padding: 3px 8px;
	cursor: pointer;
	white-space: nowrap;
}
.thresto-cart-item-edit:hover {
	border-color: #999;
}

.thresto-cart-item-remove {
	background: none;
	border: none;
	color: #d63638;
	font-size: 18px;
	line-height: 1;
	padding: 0 4px;
	cursor: pointer;
}

.thresto-cart-edit-panel {
	margin-top: 6px;
	border-radius: 4px;
}

.thresto-cart-total {
	padding: 8px 0;
	border-top: 1px solid #eee;
	margin-bottom: 8px;
}

.thresto-cart-checkout-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
	background: var(--thresto-accent, #1e1e1e);
	color: #fff;
	padding: 12px 10px;
	font-size: 16px;
	font-weight: 700;
	border-radius: 4px;
	text-decoration: none;
}

.thresto-cart-checkout-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .25);
	font-size: 12px;
}

/* Bouton "Continuer ma commande" — ferme le panier pour reprendre la
   navigation là où on était, utile surtout sur mobile où le panier prend
   tout l'écran. Caché sur desktop (le clic hors panier ou la croix suffit). */
.thresto-cart-continue-btn {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
	background: none;
	border: 2px solid var(--thresto-contour, #1e1e1e);
	color: var(--thresto-contour, #1e1e1e);
	padding: 12px 10px;
	font-size: 16px;
	font-weight: 700;
	border-radius: 4px;
	margin-top: 8px;
	cursor: pointer;
}

.thresto-cart-empty {
	color: #666;
}

/* --- v0.14.17 : "Ajouter au panier" direct en bouton plein --- */
.thresto-menu-card-cta.thresto-direct-add {
	background: var(--thresto-contour, #1e1e1e);
	color: #fff;
}

/* --- Laptop / tablette : petit champ de recherche + catégories sur la même ligne --- */
@media (min-width: 768px) {
	.thresto-menu-toolbar {
		flex-wrap: nowrap;
		gap: 14px;
	}
	.thresto-menu-toolbar .thresto-menu-search {
		flex: 0 0 290px;
		width: 290px;
		height: 48px;
		padding: 0 16px;
		font-size: 15px;
	}
	.thresto-menu-cats-wrap {
		flex: 1 1 0;
		min-width: 0;
	}
	.thresto-menu-toolbar .thresto-menu-cat-btn {
		height: 48px;
		padding: 0 22px;
		font-size: 15px;
	}
	.thresto-menu-cats-arrow {
		width: 38px;
		height: 38px;
		font-size: 20px;
	}
}

/* --- v0.14.18 : flèches des catégories (couleurs réglables, indépendantes du thème) --- */
.thresto-menu-toolbar .thresto-menu-cats-arrow {
	display: flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 40px !important;
	height: 40px !important;
	min-width: 0;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: var(--thresto-arrow-bg, var(--thresto-accent, #1e1e1e)) !important;
	color: var(--thresto-arrow-icon, #fff) !important;
	font-size: 0 !important;
	line-height: 0;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .35) !important;
	text-indent: 0;
}
.thresto-menu-toolbar .thresto-menu-cats-arrow[hidden] {
	display: none !important;
}
.thresto-menu-toolbar .thresto-menu-cats-arrow--prev { left: 4px; }
.thresto-menu-toolbar .thresto-menu-cats-arrow--next { right: 4px; }
.thresto-menu-toolbar .thresto-chev {
	display: block;
	width: 10px;
	height: 10px;
	border-top: 3px solid var(--thresto-arrow-icon, #fff);
	border-right: 3px solid var(--thresto-arrow-icon, #fff);
	box-sizing: border-box;
}
.thresto-menu-toolbar .thresto-menu-cats-arrow--next .thresto-chev { transform: rotate(45deg); margin-right: 3px; }
.thresto-menu-toolbar .thresto-menu-cats-arrow--prev .thresto-chev { transform: rotate(-135deg); margin-left: 3px; }

/* --- v0.14.22 : sidebar panier rééquilibrée (aperçu article plus grand, total / quantité / bouton plus compacts) --- */
.thresto-cart-panel .thresto-cart-item-row {
	gap: 12px;
	align-items: center;
}
.thresto-cart-panel .thresto-cart-item-image img {
	width: 76px;
	height: 76px;
	border-radius: 8px;
}
.thresto-cart-panel .thresto-cart-item-name {
	font-size: 16px;
}
.thresto-cart-panel .thresto-cart-item-options {
	font-size: 13px;
}
.thresto-cart-panel .thresto-cart-item-qty {
	font-size: 14px;
}
.thresto-cart-panel .thresto-cart-item.is-being-edited .thresto-cart-item-image,
.thresto-cart-panel .thresto-cart-item.is-being-edited .thresto-cart-item-name {
	opacity: .8;
}

/* Total des suppléments : bandeau fin */
.thresto-cart-panel .thresto-supplement-total {
	padding: 8px 14px;
	font-size: 15px;
	border-radius: 8px;
	margin-bottom: 8px;
}
.thresto-cart-panel .thresto-supplement-total-value {
	font-size: 16px;
}

/* Quantité (− 1 +) + bouton sur UNE seule ligne, hauteur 40 px */
.thresto-cart-panel .thresto-inline-panel form.cart {
	flex-wrap: wrap;
	align-items: stretch;
}
.thresto-cart-panel .thresto-inline-panel form.cart > .thresto-supplements {
	flex: 1 1 100%;
}
.thresto-cart-panel .thresto-inline-panel form.cart .quantity {
	display: flex;
	align-items: stretch;
	flex: 0 0 auto;
	height: 40px;
	margin: 0;
}
.thresto-cart-panel .thresto-inline-panel form.cart .quantity .qty,
.thresto-cart-panel .thresto-inline-panel form.cart .quantity button,
.thresto-cart-panel .thresto-inline-panel form.cart .quantity .minus,
.thresto-cart-panel .thresto-inline-panel form.cart .quantity .plus {
	height: 40px !important;
	min-height: 0 !important;
	padding: 0 !important;
	font-size: 15px !important;
	line-height: 40px !important;
}
.thresto-cart-panel .thresto-inline-panel form.cart .quantity .qty {
	width: 44px !important;
}
.thresto-cart-panel .thresto-inline-panel form.cart .quantity button,
.thresto-cart-panel .thresto-inline-panel form.cart .quantity .minus,
.thresto-cart-panel .thresto-inline-panel form.cart .quantity .plus {
	width: 34px !important;
}
.thresto-cart-panel .thresto-inline-panel form.cart .single_add_to_cart_button {
	flex: 1 1 0;
	min-width: 0;
	height: 40px;
	min-height: 0;
	padding: 0 12px !important;
	font-size: 15px;
	line-height: 36px;
}


/* --- v0.14.23 : quantité (− 1 +) compacte partout (grille + sidebar), sur la même ligne que le bouton --- */
.thresto-inline-panel form.cart {
	flex-wrap: wrap;
	align-items: stretch;
}
.thresto-inline-panel form.cart .quantity {
	display: flex !important;
	align-items: stretch;
	flex: 0 0 auto !important;
	width: auto !important;
	height: 44px !important;
	margin: 0 !important;
}
.thresto-inline-panel form.cart .quantity > *,
.thresto-inline-panel form.cart .quantity .qty,
.thresto-inline-panel form.cart .quantity button,
.thresto-inline-panel form.cart .quantity .minus,
.thresto-inline-panel form.cart .quantity .plus {
	box-sizing: border-box !important;
	height: 44px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 16px !important;
	line-height: 44px !important;
}
.thresto-inline-panel form.cart .quantity .qty {
	width: 52px !important;
	min-width: 0 !important;
	max-width: 52px !important;
	text-align: center;
}
.thresto-inline-panel form.cart .quantity button,
.thresto-inline-panel form.cart .quantity .minus,
.thresto-inline-panel form.cart .quantity .plus {
	width: 36px !important;
	min-width: 0 !important;
}
.thresto-inline-panel form.cart .single_add_to_cart_button {
	flex: 1 1 0 !important;
	min-width: 0 !important;
	height: 44px;
	min-height: 0;
	padding: 0 14px !important;
	line-height: 40px;
	font-size: 16px;
}
/* Sidebar : un cran plus petit */
.thresto-cart-panel .thresto-inline-panel form.cart .quantity,
.thresto-cart-panel .thresto-inline-panel form.cart .quantity > *,
.thresto-cart-panel .thresto-inline-panel form.cart .quantity .qty,
.thresto-cart-panel .thresto-inline-panel form.cart .quantity button,
.thresto-cart-panel .thresto-inline-panel form.cart .quantity .minus,
.thresto-cart-panel .thresto-inline-panel form.cart .quantity .plus,
.thresto-cart-panel .thresto-inline-panel form.cart .single_add_to_cart_button {
	height: 40px !important;
	line-height: 36px !important;
}
.thresto-cart-panel .thresto-inline-panel form.cart .quantity .qty {
	width: 46px !important;
	max-width: 46px !important;
}

/* --- v0.14.24 : bandeau Total compact partout, bouton aligné sur la quantité --- */
.thresto-inline-panel .thresto-supplement-total {
	padding: 9px 16px;
	font-size: 16px;
	border-radius: 8px;
	margin-bottom: 8px;
}
.thresto-inline-panel .thresto-supplement-total-value {
	font-size: 17px;
}
.thresto-inline-panel form.cart {
	align-items: center !important;
}
.thresto-inline-panel form.cart .single_add_to_cart_button {
	margin: 0 !important;
	align-self: center;
	box-sizing: border-box;
	vertical-align: middle;
}
.thresto-inline-panel form.cart .quantity {
	align-self: center;
}

/* --- v0.14.25 : en-tête de l'article en cours de modification (sidebar) plus lisible --- */
.thresto-cart-panel .thresto-cart-item-name {
	font-size: 19px !important;
	line-height: 1.25;
}
.thresto-cart-panel .thresto-cart-item-options {
	font-size: 16px !important;
	line-height: 1.35;
	color: inherit !important;
	opacity: .8;
}
.thresto-cart-panel .thresto-cart-item-options li {
	font-size: inherit !important;
}
.thresto-cart-panel .thresto-cart-item-qty {
	font-size: 16px !important;
}
.thresto-cart-panel .thresto-cart-item-image img {
	width: 88px;
	height: 88px;
}
.thresto-cart-panel .thresto-cart-item.is-being-edited .thresto-cart-item-name,
.thresto-cart-panel .thresto-cart-item.is-being-edited .thresto-cart-item-image {
	opacity: 1;
}

/* --- v0.14.26 : total du panier lisible (libellé à gauche, montant à droite), une seule ligne de séparation --- */
.thresto-cart-panel .thresto-cart-item:last-child {
	border-bottom: 0;
}
.thresto-cart-panel .thresto-cart-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 6px 0 14px;
	padding: 14px 2px 0;
	border-top: 1px solid rgba(128, 128, 128, .35);
	font-size: 20px;
	line-height: 1.2;
}
.thresto-cart-panel .thresto-cart-total strong {
	font-weight: 700;
}
.thresto-cart-panel .thresto-cart-total .woocommerce-Price-amount,
.thresto-cart-panel .thresto-cart-total .amount,
.thresto-cart-panel .thresto-cart-total bdi {
	font-size: 22px;
	font-weight: 700;
}

/* --- v0.14.27 : boutons du bas du panier alignés sur "Modifier" (même hauteur, même arrondi) --- */
.thresto-cart-panel .thresto-cart-checkout-btn,
.thresto-cart-panel .thresto-cart-continue-btn {
	box-sizing: border-box;
	width: 100%;
	height: 46px;
	min-height: 0;
	padding: 0 14px !important;
	border-radius: 10px !important;
	border-width: 2px;
	border-style: solid;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	margin: 0;
	text-transform: none;
	letter-spacing: normal;
	text-decoration: none !important;
	box-shadow: none;
}
.thresto-cart-panel .thresto-cart-checkout-btn {
	border-color: var(--thresto-accent, #1e1e1e);
	background: var(--thresto-accent, #1e1e1e) !important;
	color: #fff !important;
}
.thresto-cart-panel .thresto-cart-continue-btn {
	margin-top: 10px;
}
.thresto-cart-panel .thresto-cart-checkout-icon {
	width: 22px;
	height: 22px;
	background: #fff;
	color: var(--thresto-accent, #1e1e1e);
	font-size: 13px;
	font-weight: 800;
}

/* --- v0.14.28 : hiérarchie du bas du panier — Total plus discret que "Je passe commande" --- */
.thresto-cart-panel .thresto-cart-total {
	font-size: 15px;
	padding-top: 10px;
	margin: 4px 0 10px;
}
.thresto-cart-panel .thresto-cart-total .woocommerce-Price-amount,
.thresto-cart-panel .thresto-cart-total .amount,
.thresto-cart-panel .thresto-cart-total bdi {
	font-size: 16px;
}
.thresto-cart-panel .thresto-cart-checkout-btn {
	height: 50px;
	font-size: 17px;
}
.thresto-cart-panel .thresto-cart-continue-btn {
	height: 44px;
	font-size: 15px;
}


/* =========================================================================
   Présentation « liste » (ThResto → Apparence panier → Présentation de la carte)
   ====================================================================== */
.thresto-carte {
	--thresto-carte-accent: var( --thr-accent, var( --thresto-accent, #c0392b ) );
	display: grid;
	grid-template-columns: minmax( 0, 1fr );
	gap: 40px;
	margin-top: 8px;
}
.thresto-carte__main { min-width: 0; display: flex; flex-direction: column; gap: 56px; }
.thresto-carte__section { scroll-margin-top: 140px; }
.thresto-carte__titre { margin: 0 0 4px; font-size: 40px; line-height: 1.1; }
.thresto-carte__intro { margin: 0 0 18px; font-size: 15px; opacity: .8; }

/* Lignes : deux colonnes nom · prix / description / bouton « + » */
.thresto-carte__liste { display: grid; grid-template-columns: repeat( auto-fill, minmax( 300px, 1fr ) ); column-gap: 40px; }
.thresto-carte__ligne {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) auto;
	column-gap: 16px;
	align-items: start;
	padding: 16px 0;
	border-bottom: 1px solid color-mix( in srgb, currentColor 15%, transparent );
}
.thresto-carte__ligne-tete { display: flex; align-items: baseline; gap: 8px; }
.thresto-carte__nom { font-size: 17px; font-weight: 600; line-height: 1.3; }
.thresto-carte__points { flex: 1; min-width: 12px; border-bottom: 2px dotted color-mix( in srgb, currentColor 30%, transparent ); transform: translateY( -4px ); }
.thresto-carte__prix { flex: none; font-size: 17px; font-weight: 700; color: var( --thresto-carte-accent ); white-space: nowrap; }
.thresto-carte__prix del { opacity: .6; font-weight: 400; margin-right: 4px; }
.thresto-carte__prix ins { text-decoration: none; }
.thresto-carte__desc { margin-top: 4px; font-size: 14px; line-height: 1.45; opacity: .8; }
.thresto-carte__desc p { margin: 0; }
.thresto-carte__rupture { display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; background: color-mix( in srgb, #d63638 25%, transparent ); }
.thresto-carte__ligne.is-rupture .thresto-carte__nom,
.thresto-carte__ligne.is-rupture .thresto-carte__prix { opacity: .6; }
.thresto-carte__plus {
	flex: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 50%;
	border: 1.5px solid var( --thresto-carte-accent ) !important;
	background: transparent !important;
	color: var( --thresto-carte-accent ) !important;
	font-size: 24px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color .15s, color .15s, transform .15s;
}
.thresto-carte__plus:hover,
.thresto-carte__plus:focus-visible { background: var( --thresto-carte-accent ) !important; color: #fff !important; }
.thresto-carte__plus.is-open { transform: rotate( 45deg ); }
.thresto-carte__plus:disabled { opacity: .35; cursor: not-allowed; background: transparent !important; color: var( --thresto-carte-accent ) !important; }
.thresto-carte__ligne > .thresto-inline-panel { grid-column: 1 / -1; margin-top: 12px; }

/* Catégories en grandes cartes avec photo */
.thresto-carte__cartes { display: grid; grid-template-columns: repeat( auto-fill, minmax( 220px, 1fr ) ); gap: 20px; align-items: start; }

/* Colonne « Votre commande » + horaires */
.thresto-carte__aside { display: none; }
.thresto-carte__bloc {
	padding: 20px;
	border-radius: 12px;
	background: color-mix( in srgb, currentColor 6%, transparent );
	border: 1px solid color-mix( in srgb, currentColor 15%, transparent );
	transition: box-shadow .3s;
}
.thresto-carte__bloc + .thresto-carte__bloc { margin-top: 16px; }
.thresto-carte__bloc-titre { margin: 0 0 14px; font-size: 24px; line-height: 1.2; }
.thresto-carte__commande.is-maj { box-shadow: 0 0 0 3px var( --thresto-carte-accent ); }
.thresto-carte__commande .thresto-cart-continue-btn { display: none; }
.thresto-carte__horaires .thr-horaires { font-size: 14px; }

@media ( min-width: 960px ) {
	.thresto-carte--colonne { grid-template-columns: minmax( 0, 1fr ) 320px; }
	.thresto-carte--colonne .thresto-carte__aside { display: block; position: sticky; top: 24px; align-self: start; max-height: calc( 100vh - 48px ); overflow-y: auto; }
	.admin-bar .thresto-carte--colonne .thresto-carte__aside { top: 56px; }
	/* La colonne remplace le bouton panier flottant sur ordinateur. */
	body:has( .thresto-carte--colonne ) .thresto-cart-toggle-flottant { display: none; }
}

@media ( max-width: 640px ) {
	.thresto-carte__main { gap: 40px; }
	.thresto-carte__titre { font-size: 28px; }
	.thresto-carte__liste { grid-template-columns: minmax( 0, 1fr ); }
}

@media ( prefers-reduced-motion: reduce ) {
	.thresto-carte__plus, .thresto-carte__bloc { transition: none; }
}

/* Mode liste : vignette photo à gauche du plat */
.thresto-carte__ligne--photo { grid-template-columns: 72px minmax( 0, 1fr ) auto; }
.thresto-carte__vignette { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: color-mix( in srgb, currentColor 8%, transparent ); }
.thresto-carte__vignette img { display: block; width: 100% !important; height: 100% !important; object-fit: cover; margin: 0; }
.thresto-carte__vignette.thresto-panel-toggle { cursor: pointer; }
.thresto-carte__vignette.thresto-panel-toggle:focus-visible { outline: 2px solid var( --thresto-carte-accent ); outline-offset: 2px; }
@media ( max-width: 640px ) {
	.thresto-carte__ligne--photo { grid-template-columns: 60px minmax( 0, 1fr ) auto; column-gap: 12px; }
	.thresto-carte__vignette { width: 60px; height: 60px; }
}

/* Modèle Torino : photo au-dessus du plat */
/* La photo s'arrête au prix (largeur du texte), le bouton « + » reste à droite du nom. */
.thresto-carte__ligne--photo-dessus > .thresto-carte__vignette { grid-column: 1; grid-row: 1; width: calc( 100% - 7em ); height: auto; aspect-ratio: 16 / 9; margin-bottom: 12px; } /* s'arrête avant la colonne des prix */
.thresto-carte__ligne--photo-dessus > .thresto-carte__ligne-texte { grid-column: 1; grid-row: 2; }
.thresto-carte__ligne--photo-dessus > .thresto-carte__plus { grid-column: 2; grid-row: 2; }
.thresto-carte__ligne--photo-dessus > .thresto-inline-panel { grid-column: 1 / -1; grid-row: 3; }

/* Modèle Torino : photo au-dessus en grande largeur (jusqu'au bouton « + ») */
.thresto-carte__ligne--photo-large > .thresto-carte__vignette { grid-column: 1 / -1; width: 100%; }

/* ==========================================================================
   0.18.5 — Torino : colonne « Votre choix » / « Horaires » en cartouche claire
   (même rendu que les cartes de plats, lisible quel que soit le fond de page)
   ========================================================================== */
.thresto-carte__bloc {
	background: var( --thresto-panel-bg, #fff );
	color: var( --thresto-panel-text, #1e1e1e );
	border: 1px solid rgba( 0, 0, 0, .08 );
	box-shadow: 0 6px 20px rgba( 0, 0, 0, .12 );
}
.thresto-carte__bloc .thresto-carte__bloc-titre { color: var( --thr-red, var( --thresto-carte-accent ) ) !important; }
.thresto-carte__bloc .thresto-cart-item-name { color: var( --thresto-panel-text, #1e1e1e ) !important; }
.thresto-carte__bloc .thresto-cart-item-qty,
.thresto-carte__bloc .thresto-cart-item-options { color: #666 !important; }
.thresto-carte__bloc .thresto-cart-item-edit { color: var( --thresto-panel-text, #1e1e1e ) !important; border-color: #ccc !important; }
.thresto-carte__bloc .thresto-cart-total,
.thresto-carte__bloc .thresto-cart-total * { color: var( --thresto-panel-text, #1e1e1e ) !important; }
.thresto-carte__bloc .thr-horaires,
.thresto-carte__bloc .thr-horaires * { color: inherit; }

/* ==========================================================================
   0.18.5 — Suppléments dans une cartouche étroite (Torino « en cartes »,
   Roma sur 3-4 colonnes) : le dépliant ne déborde plus de la carte.
   ========================================================================== */
.thresto-inline-panel { container-type: inline-size; box-sizing: border-box; max-width: 100%; }
.thresto-inline-panel form.cart > *,
.thresto-inline-panel .thresto-supplements,
.thresto-inline-panel .thresto-supplement-groupe,
.thresto-inline-panel .thresto-supplement-options,
.thresto-inline-panel .thresto-supplement-option { min-width: 0; max-width: 100%; box-sizing: border-box; }

@container ( max-width: 380px ) {
	.thresto-supplement-options--cartes.thresto-sup-h .thresto-supplement-option { gap: 10px !important; padding: 6px 10px 6px 6px !important; min-height: 64px; font-size: 15px !important; }
	.thresto-supplement-options--cartes.thresto-sup-h .thresto-supplement-option-img-wrap { flex: 0 0 56px; width: 56px !important; height: 56px !important; }
	.thresto-supplement-options--cartes.thresto-sup-h .thresto-supplement-option-img { width: 56px !important; height: 56px !important; border-radius: 8px; }
	.thresto-supplement-options--cartes.thresto-sup-h .thresto-supplement-option-libelle { flex-wrap: wrap; gap: 2px 8px; min-width: 0; }
	.thresto-supplement-options--cartes.thresto-sup-h .thresto-supplement-option:has(.thresto-supplement-option-img-wrap) .thresto-supplement-option-libelle { margin-right: 18px; }
	.thresto-supplement-options--cartes.thresto-sup-h .thresto-supplement-option:not(:has(.thresto-supplement-option-img-wrap)) { min-height: 48px; }
	.thresto-inline-panel .thresto-supplement-total-value { font-size: 18px !important; white-space: nowrap; }
	/* quantité sur une ligne, bouton « Ajouter au panier » pleine largeur dessous */
	.thresto-inline-panel form.cart .single_add_to_cart_button { flex: 1 1 100% !important; }
}

/* ==========================================================================
   0.18.6 — Torino : colonne dès 960 px (portables), barre « Votre commande »
   collée en bas en dessous ; plus de bouton panier rond avec ce modèle.
   ========================================================================== */
body:has( .thresto-carte--colonne ) .thresto-cart-toggle-flottant { display: none !important; }
.thresto-carte__barre { display: none; }
@media ( max-width: 959px ) {
	.thresto-carte__barre:not([hidden]) {
		position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9997;
		display: flex; align-items: center; gap: 12px;
		margin: 0; padding: 12px 16px !important; min-height: 56px;
		border: 0 !important; border-radius: 12px !important;
		background: var( --thresto-accent, var( --thr-red, #971C1C ) ) !important; color: #fff !important;
		font: inherit; font-size: 16px; font-weight: 700; line-height: 1.2; text-align: left;
		box-shadow: 0 8px 24px rgba( 0, 0, 0, .3 ); cursor: pointer;
		transition: transform .2s;
		padding-bottom: max( 12px, env( safe-area-inset-bottom ) ) !important;
	}
	.thresto-carte__barre-nb {
		flex: none; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px;
		display: inline-flex; align-items: center; justify-content: center;
		background: var( --thr-accent, #F2A900 ); color: var( --thr-ink, #2A1A14 ); font-size: 14px;
	}
	.thresto-carte__barre-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.thresto-carte__barre-total, .thresto-carte__barre-total * { color: #fff !important; white-space: nowrap; }
	.thresto-carte__barre-fleche { font-size: 26px; line-height: 1; }
	.thresto-carte__barre.is-maj { transform: scale( 1.03 ); }
	/* place pour que la barre ne cache pas le bas de page */
	body:has( .thresto-carte__barre:not([hidden]) ) { padding-bottom: 80px; }
}

/* Suppléments en cartouche étroite : quantité centrée au-dessus du bouton */
@container ( max-width: 380px ) {
	.thresto-inline-panel form.cart { justify-content: center; }
	.thresto-inline-panel form.cart .quantity { margin: 0 auto !important; }
}

/* ==========================================================================
   0.18.7 — Menu des catégories : boutons plus compacts, taille réglable
   (ThResto → Apparence panier → « Menu des catégories : taille du texte »)
   ========================================================================== */
.thresto-menu-toolbar .thresto-menu-cat-btn {
	height: auto !important;
	min-height: 0;
	padding: .55em .95em !important;
	font-size: var( --thresto-cats-fs, 17px ) !important;
	line-height: 1.15 !important;
}
@media ( max-width: 767px ) {
	.thresto-menu-toolbar .thresto-menu-cat-btn { font-size: var( --thresto-cats-fs-m, 15px ) !important; padding: .5em .85em !important; }
}
