/* ==========================================================================
   Commande Repas – Espace convive
   Mobile first, isolé dans .crp-scope pour limiter les conflits de thème.
   ========================================================================== */

.crp-scope {
	--crp-primary: #0b7a75;
	--crp-primary-contrast: #fff;
	--crp-text: #1f2933;
	--crp-muted: #616e7c;
	--crp-border: #e4e7eb;
	--crp-bg: #fff;
	--crp-bg-soft: #f5f7fa;
	--crp-success: #1f8a4c;
	--crp-success-bg: #e6f6ec;
	--crp-warning: #9a6200;
	--crp-warning-bg: #fff5e0;
	--crp-danger: #c0392b;
	--crp-danger-bg: #fdecea;
	--crp-info: #2563a8;
	--crp-info-bg: #e8f1fb;
	--crp-radius: 14px;
	--crp-radius-sm: 10px;
	--crp-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .06);
	color: var(--crp-text);
	font-size: 16px;
	line-height: 1.5;
	max-width: 1080px;
	margin: 0 auto;
	-webkit-text-size-adjust: 100%;
	container: crp / inline-size;
}

/* Thèmes blocs : utilise la largeur « large » plutôt que la largeur de contenu. */
.is-layout-constrained > .crp-scope,
.entry-content > .crp-scope {
	max-width: var(--wp--style--global--wide-size, 1080px);
	width: 100%;
}

.crp-scope *,
.crp-scope *::before,
.crp-scope *::after {
	box-sizing: border-box;
}

.crp-scope img {
	max-width: 100%;
	height: auto;
}

.crp-scope [hidden] {
	display: none !important;
}

/* Couleur principale teintée */
.crp-scope .crp-tint {
	background: color-mix(in srgb, var(--crp-primary) 10%, #fff);
}

/* ---------- Typo ---------- */
.crp-scope .crp-title {
	font-size: clamp(1.45rem, 4.5vw, 2rem);
	line-height: 1.2;
	margin: 0 0 .35em;
	font-weight: 700;
}

.crp-scope .crp-subtitle {
	font-size: 1.15rem;
	margin: 0 0 .6em;
	font-weight: 700;
}

.crp-scope .crp-intro {
	color: var(--crp-muted);
	margin: 0 0 1em;
}

.crp-scope .crp-hint {
	color: var(--crp-muted);
	font-size: .875rem;
	margin: .35em 0;
}

.crp-scope .crp-center {
	text-align: center;
}

.crp-scope .crp-mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	letter-spacing: .06em;
}

/* ---------- Navigation ---------- */
.crp-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	padding: 8px;
	margin: 0 0 20px;
	background: var(--crp-bg);
	border: 1px solid var(--crp-border);
	border-radius: var(--crp-radius);
	box-shadow: var(--crp-shadow);
}

.crp-nav__links {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	max-width: 100%;
}

.crp-nav__links::-webkit-scrollbar {
	display: none;
}

.crp-scope .crp-nav__link {
	flex: 0 0 auto;
	padding: 8px 14px;
	border-radius: 999px;
	color: var(--crp-text);
	text-decoration: none;
	font-weight: 600;
	font-size: .95rem;
	white-space: nowrap;
	transition: background .15s, color .15s;
}

.crp-scope .crp-nav__link:hover,
.crp-scope .crp-nav__link:focus-visible {
	background: var(--crp-bg-soft);
	color: var(--crp-text);
}

.crp-scope .crp-nav__link.is-active {
	background: var(--crp-primary);
	color: var(--crp-primary-contrast);
}

.crp-nav__user {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: .875rem;
	padding: 0 6px;
	flex-wrap: wrap;
}

.crp-nav__id {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: var(--crp-muted);
}

.crp-nav__id svg {
	fill: currentColor;
}

.crp-nav__balance {
	background: var(--crp-bg-soft);
	border-radius: 999px;
	padding: 2px 10px;
	font-weight: 600;
}

.crp-scope .crp-nav__logout {
	color: var(--crp-muted);
	text-decoration: underline;
}

/* ---------- Cartes, sections ---------- */
.crp-scope .crp-card {
	background: var(--crp-bg);
	border: 1px solid var(--crp-border);
	border-radius: var(--crp-radius);
	box-shadow: var(--crp-shadow);
	padding: 16px;
	margin: 0 0 16px;
}

.crp-scope .crp-card--muted {
	background: var(--crp-bg-soft);
	box-shadow: none;
}

.crp-scope .crp-card--highlight {
	border-color: var(--crp-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--crp-primary) 18%, transparent);
}

.crp-section {
	margin: 28px 0;
}

.crp-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.crp-scope .crp-section__title {
	font-size: 1.2rem;
	margin: 0 0 12px;
	font-weight: 700;
}

.crp-section__head .crp-section__title {
	margin: 0;
}

.crp-scope .crp-empty {
	padding: 28px 16px;
	text-align: center;
	color: var(--crp-muted);
	background: var(--crp-bg-soft);
	border: 1px dashed var(--crp-border);
	border-radius: var(--crp-radius);
}

/* ---------- Alertes & badges ---------- */
.crp-scope .crp-alert {
	padding: 12px 14px;
	border-radius: var(--crp-radius-sm);
	margin: 0 0 14px;
	border-left: 4px solid currentColor;
	font-size: .95rem;
}

.crp-scope .crp-alert--success { color: var(--crp-success); background: var(--crp-success-bg); }
.crp-scope .crp-alert--error   { color: var(--crp-danger);  background: var(--crp-danger-bg); }
.crp-scope .crp-alert--info    { color: var(--crp-info);    background: var(--crp-info-bg); }

.crp-scope .crp-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: .75rem;
	font-weight: 600;
	line-height: 1.6;
	background: var(--crp-bg-soft);
	color: var(--crp-muted);
	white-space: nowrap;
}

.crp-scope .crp-badge--ok,
.crp-scope .crp-badge--confirmed { background: var(--crp-success-bg); color: var(--crp-success); }
.crp-scope .crp-badge--collected { background: var(--crp-info-bg); color: var(--crp-info); }
.crp-scope .crp-badge--cancelled,
.crp-scope .crp-badge--danger    { background: var(--crp-danger-bg); color: var(--crp-danger); }
.crp-scope .crp-badge--warning   { background: var(--crp-warning-bg); color: var(--crp-warning); }
.crp-scope .crp-badge--info      { background: var(--crp-info-bg); color: var(--crp-info); }
.crp-scope .crp-badge--primary   { background: color-mix(in srgb, var(--crp-primary) 12%, #fff); color: var(--crp-primary); }

/* ---------- Boutons ---------- */
.crp-scope .crp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid var(--crp-border);
	border-radius: var(--crp-radius-sm);
	background: var(--crp-bg);
	color: var(--crp-text);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s, transform .05s, opacity .15s;
	-webkit-tap-highlight-color: transparent;
}

.crp-scope .crp-btn:hover {
	filter: brightness(.96);
}

.crp-scope .crp-btn:active {
	transform: translateY(1px);
}

.crp-scope .crp-btn:focus-visible,
.crp-scope .crp-input:focus-visible,
.crp-scope input:focus-visible + .crp-formula__box,
.crp-scope input:focus-visible + .crp-chip__box,
.crp-scope input:focus-visible + .crp-choice__box {
	outline: 3px solid color-mix(in srgb, var(--crp-primary) 45%, transparent);
	outline-offset: 2px;
}

.crp-scope .crp-btn--primary {
	background: var(--crp-primary);
	border-color: var(--crp-primary);
	color: var(--crp-primary-contrast);
}

.crp-scope .crp-btn--primary:hover {
	color: var(--crp-primary-contrast);
	filter: brightness(1.08);
}

.crp-scope .crp-btn--danger {
	background: var(--crp-bg);
	border-color: color-mix(in srgb, var(--crp-danger) 40%, #fff);
	color: var(--crp-danger);
}

.crp-scope .crp-btn--sm {
	min-height: 36px;
	padding: 6px 12px;
	font-size: .875rem;
}

.crp-scope .crp-btn--lg {
	min-height: 50px;
	font-size: 1.05rem;
}

.crp-scope .crp-btn--block {
	width: 100%;
}

.crp-scope .crp-btn[disabled],
.crp-scope .crp-btn.is-disabled {
	opacity: .5;
	cursor: not-allowed;
}

/* ---------- Formulaires ---------- */
.crp-scope .crp-form {
	display: grid;
	gap: 14px;
}

.crp-scope .crp-field {
	display: grid;
	gap: 6px;
	min-width: 0;
}

.crp-scope .crp-field-row {
	display: grid;
	gap: 14px;
}

.crp-scope .crp-label {
	font-weight: 600;
	font-size: .9rem;
}

.crp-scope .crp-input {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid #cbd2d9;
	border-radius: var(--crp-radius-sm);
	background: #fff;
	color: var(--crp-text);
	font: inherit;
	font-size: 16px; /* évite le zoom iOS */
	box-shadow: none;
	margin: 0;
}

.crp-scope textarea.crp-input {
	resize: vertical;
}

.crp-scope .crp-input--lg {
	min-height: 50px;
	font-size: 1.1rem;
}

.crp-scope .crp-input--auto {
	width: auto;
	min-width: 90px;
}

.crp-scope .crp-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: .95rem;
}

.crp-scope .crp-check input {
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--crp-primary);
	flex: 0 0 auto;
}

.crp-password {
	position: relative;
}

.crp-password .crp-input {
	padding-right: 92px;
}

.crp-scope .crp-password__toggle {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	border: 0;
	background: var(--crp-bg-soft);
	color: var(--crp-muted);
	border-radius: 8px;
	padding: 6px 10px;
	font-size: .8rem;
	font-weight: 600;
	cursor: pointer;
}

.crp-segmented {
	display: inline-flex;
	padding: 4px;
	background: var(--crp-bg-soft);
	border-radius: 999px;
	gap: 4px;
	flex-wrap: wrap;
}

.crp-segmented__option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.crp-segmented__option span {
	display: block;
	padding: 8px 16px;
	border-radius: 999px;
	cursor: pointer;
	font-weight: 600;
	font-size: .9rem;
	color: var(--crp-muted);
}

.crp-segmented__option input:checked + span {
	background: #fff;
	color: var(--crp-text);
	box-shadow: var(--crp-shadow);
}

/* ---------- Pills / tabs / pagination ---------- */
.crp-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.crp-scope .crp-pill {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid var(--crp-border);
	background: #fff;
	color: var(--crp-text);
	text-decoration: none;
	font-size: .875rem;
	font-weight: 600;
}

.crp-scope .crp-pill.is-active {
	background: var(--crp-text);
	border-color: var(--crp-text);
	color: #fff;
}

.crp-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
	margin: 20px 0 14px;
}

.crp-tabs {
	display: flex;
	gap: 4px;
	border-bottom: 2px solid var(--crp-border);
	margin: 0 0 18px;
	overflow-x: auto;
}

.crp-scope .crp-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	margin-bottom: -2px;
	border-bottom: 3px solid transparent;
	color: var(--crp-muted);
	text-decoration: none;
	font-weight: 700;
	white-space: nowrap;
}

.crp-scope .crp-tab.is-active {
	color: var(--crp-primary);
	border-bottom-color: var(--crp-primary);
}

.crp-tab__count {
	background: var(--crp-primary);
	color: #fff;
	border-radius: 999px;
	font-size: .7rem;
	padding: 0 7px;
	line-height: 1.6;
}

.crp-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 20px 0;
}

.crp-pagination__info {
	color: var(--crp-muted);
	font-size: .9rem;
}

/* ---------- Details ---------- */
.crp-scope .crp-details {
	margin: 10px 0 0;
}

.crp-scope .crp-details > summary {
	cursor: pointer;
	color: var(--crp-primary);
	font-weight: 600;
	font-size: .9rem;
	list-style: none;
}

.crp-scope .crp-details > summary::-webkit-details-marker,
.crp-scope .crp-collapsible > summary::-webkit-details-marker {
	display: none;
}

.crp-scope .crp-details > summary::before {
	content: "▸ ";
}

.crp-scope .crp-details[open] > summary::before {
	content: "▾ ";
}

.crp-scope .crp-collapsible > summary {
	cursor: pointer;
	list-style: none;
}

.crp-scope .crp-collapsible[open] > summary {
	margin-bottom: 14px;
}

.crp-scope .crp-collapsible .crp-section__title {
	margin: 0;
	display: inline;
}

/* ---------- Connexion ---------- */
.crp-login {
	display: flex;
	justify-content: center;
	padding: 12px 0 32px;
}

.crp-scope .crp-login__card {
	width: 100%;
	max-width: 420px;
	padding: 28px 22px;
}

.crp-login__icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	margin: 0 auto 12px;
	background: color-mix(in srgb, var(--crp-primary) 12%, #fff);
	color: var(--crp-primary);
}

.crp-login__icon svg {
	fill: currentColor;
}

.crp-login .crp-title,
.crp-login .crp-intro {
	text-align: center;
}

/* ---------- Commande : dates ---------- */
.crp-dates {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 4px 2px 10px;
	margin: 0 -2px 8px;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
}

.crp-scope .crp-date {
	flex: 0 0 auto;
	width: 78px;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 8px 4px;
	border: 1px solid var(--crp-border);
	border-radius: var(--crp-radius-sm);
	background: #fff;
	color: var(--crp-text);
	text-decoration: none;
	line-height: 1.2;
	transition: border-color .15s, box-shadow .15s;
}

.crp-date__day,
.crp-date__month {
	font-size: .72rem;
	text-transform: uppercase;
	color: var(--crp-muted);
	letter-spacing: .04em;
}

.crp-date__num {
	font-size: 1.45rem;
	font-weight: 800;
	margin: 2px 0;
}

.crp-date__status {
	margin-top: 6px;
	font-size: .66rem;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 999px;
	background: var(--crp-success-bg);
	color: var(--crp-success);
	white-space: nowrap;
}

.crp-scope .crp-date.is-ordered .crp-date__status {
	background: var(--crp-info-bg);
	color: var(--crp-info);
}

.crp-scope .crp-date.is-closed {
	background: var(--crp-bg-soft);
}

.crp-scope .crp-date.is-closed .crp-date__status {
	background: #e4e7eb;
	color: var(--crp-muted);
}

.crp-scope .crp-date.is-active {
	border-color: var(--crp-primary);
	box-shadow: 0 0 0 2px var(--crp-primary);
}

.crp-scope .crp-selected-date {
	font-size: 1.15rem;
	margin: 6px 0 12px;
}

.crp-deadline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 14px;
	background: var(--crp-bg-soft);
	border-radius: var(--crp-radius-sm);
	font-size: .9rem;
	margin-bottom: 16px;
}

/* ---------- Commande : étapes ---------- */
.crp-step {
	margin: 0 0 22px;
}

.crp-scope .crp-step__title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.1rem;
	margin: 0 0 12px;
	font-weight: 700;
}

.crp-step__num {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--crp-primary);
	color: #fff;
	font-size: .9rem;
	flex: 0 0 auto;
}

.crp-step__num:empty {
	display: none;
}

.crp-order-form:not([data-formula="salade"]) [data-show-for="salade"],
.crp-order-form:not([data-formula="panier"]) [data-show-for="panier"] {
	display: none !important;
}

.crp-order-form[data-formula=""] .crp-builder-body {
	opacity: .45;
	pointer-events: none;
	filter: grayscale(.4);
}

/* Formules */
.crp-formulas {
	display: grid;
	gap: 10px;
}

.crp-formula {
	position: relative;
	display: block;
	cursor: pointer;
}

.crp-formula input,
.crp-chip input,
.crp-choice input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

.crp-formula__box {
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-areas: "icon name price" "icon desc desc";
	align-items: center;
	gap: 2px 12px;
	padding: 14px;
	border: 2px solid var(--crp-border);
	border-radius: var(--crp-radius);
	background: #fff;
	transition: border-color .15s, background .15s;
	height: 100%;
}

.crp-formula__icon {
	grid-area: icon;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	background: var(--crp-bg-soft);
	color: var(--crp-muted);
}

.crp-formula__icon svg {
	fill: currentColor;
}

.crp-formula__name {
	grid-area: name;
	font-weight: 700;
	font-size: 1.05rem;
}

.crp-formula__price {
	grid-area: price;
	font-weight: 800;
	color: var(--crp-primary);
	white-space: nowrap;
}

.crp-formula__desc {
	grid-area: desc;
	color: var(--crp-muted);
	font-size: .85rem;
}

.crp-formula input:checked + .crp-formula__box {
	border-color: var(--crp-primary);
	background: color-mix(in srgb, var(--crp-primary) 6%, #fff);
}

.crp-formula input:checked + .crp-formula__box .crp-formula__icon {
	background: var(--crp-primary);
	color: #fff;
}

/* Catégories et denrées */
.crp-cat {
	margin: 0 0 18px;
}

.crp-cat__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.crp-scope .crp-cat__title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0;
}

.crp-cat__hint {
	display: inline-flex;
	gap: 6px;
	flex-wrap: wrap;
	font-size: .78rem;
	font-weight: 600;
	color: var(--crp-muted);
}

.crp-cat__hint > span,
.crp-cat__hint[data-salad-counter] {
	background: var(--crp-bg-soft);
	padding: 1px 8px;
	border-radius: 999px;
}

.crp-cat.is-full .crp-cat__hint {
	color: var(--crp-warning);
}

.crp-items {
	display: grid;
	gap: 8px;
}

.crp-item {
	display: grid;
	grid-template-columns: 56px 1fr auto;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border: 1px solid var(--crp-border);
	border-radius: var(--crp-radius-sm);
	background: #fff;
	transition: border-color .15s, background .15s;
}

.crp-item.is-selected {
	border-color: var(--crp-primary);
	background: color-mix(in srgb, var(--crp-primary) 5%, #fff);
}

.crp-item.is-soldout {
	opacity: .55;
}

.crp-item__media {
	width: 56px;
	height: 56px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--crp-bg-soft);
	display: grid;
	place-items: center;
}

.crp-item__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.crp-item__initial {
	font-size: 1.3rem;
	font-weight: 800;
	color: var(--crp-muted);
}

.crp-item__body {
	min-width: 0;
}

.crp-item__name {
	font-weight: 700;
	line-height: 1.25;
}

.crp-item__desc,
.crp-item__allergens {
	font-size: .8rem;
	color: var(--crp-muted);
	margin-top: 2px;
}

.crp-item__allergens {
	font-style: italic;
}

.crp-item__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 4px;
}

.crp-item__price {
	font-size: .75rem;
	font-weight: 700;
	color: var(--crp-primary);
}

.crp-item__price.is-extra {
	color: var(--crp-warning);
}

/* Stepper */
.crp-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--crp-border);
	border-radius: 999px;
	background: #fff;
	overflow: hidden;
}

.crp-scope .crp-stepper__btn {
	width: 38px;
	height: 38px;
	border: 0;
	background: transparent;
	color: var(--crp-primary);
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	display: grid;
	place-items: center;
	-webkit-tap-highlight-color: transparent;
}

.crp-scope .crp-stepper__btn:hover:not([disabled]) {
	background: var(--crp-bg-soft);
}

.crp-scope .crp-stepper__btn[disabled] {
	color: #cbd2d9;
	cursor: not-allowed;
}

.crp-scope .crp-stepper__input {
	width: 34px;
	height: 38px;
	border: 0;
	padding: 0;
	margin: 0;
	text-align: center;
	font: inherit;
	font-weight: 700;
	background: transparent;
	color: var(--crp-text);
	-moz-appearance: textfield;
	appearance: textfield;
	box-shadow: none;
}

.crp-stepper__input::-webkit-outer-spin-button,
.crp-stepper__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Salade */
.crp-scope .crp-salad-group {
	border: 0;
	padding: 0;
	margin: 0 0 16px;
	min-width: 0;
}

.crp-scope .crp-salad-group legend {
	margin-bottom: 8px;
	width: 100%;
}

.crp-salad-group.is-complete [data-salad-counter] {
	background: var(--crp-success-bg);
	color: var(--crp-success);
}

.crp-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.crp-chip {
	position: relative;
	cursor: pointer;
}

.crp-chip__box {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 6px 14px 6px 6px;
	border: 2px solid var(--crp-border);
	border-radius: 999px;
	background: #fff;
	font-weight: 600;
	font-size: .92rem;
	transition: border-color .15s, background .15s;
}

.crp-chip__box img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
}

.crp-chip__box > span:first-child:not(:only-child),
.crp-chip__box > span:only-child {
	padding-left: 8px;
}

.crp-chip__box img + span {
	padding-left: 0 !important;
}

.crp-chip__box small {
	color: var(--crp-danger);
}

.crp-chip input:checked + .crp-chip__box {
	border-color: var(--crp-primary);
	background: color-mix(in srgb, var(--crp-primary) 10%, #fff);
	color: var(--crp-text);
}

.crp-chip input:checked + .crp-chip__box::after {
	content: "✓";
	color: var(--crp-primary);
	font-weight: 800;
}

.crp-chip.is-disabled,
.crp-chip.is-locked {
	opacity: .45;
	cursor: not-allowed;
}

/* Récapitulatif collant */
.crp-summary {
	position: sticky;
	bottom: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 20px -4px 0;
	padding: 12px 14px;
	padding-bottom: max(12px, env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, .97);
	border: 1px solid var(--crp-border);
	border-radius: var(--crp-radius) var(--crp-radius) 0 0;
	box-shadow: 0 -6px 24px rgba(15, 23, 42, .1);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.crp-summary__info {
	min-width: 0;
}

.crp-summary__total {
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1.1;
	color: var(--crp-primary);
}

.crp-summary__detail {
	font-size: .75rem;
	color: var(--crp-muted);
}

.crp-summary__msg {
	font-size: .8rem;
	font-weight: 600;
	color: var(--crp-warning);
}

.crp-summary__msg.is-ok {
	color: var(--crp-success);
}

.crp-summary .crp-btn {
	flex: 0 0 auto;
}

/* ---------- Cartes commande ---------- */
.crp-order-list {
	display: grid;
	gap: 12px;
}

.crp-scope .crp-order-card {
	margin: 0;
}

.crp-order-card__head {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 12px;
}

.crp-order-card__number {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 72px;
	padding: 6px 10px;
	border-radius: var(--crp-radius-sm);
	background: color-mix(in srgb, var(--crp-primary) 10%, #fff);
	color: var(--crp-primary);
}

.crp-order-card__n {
	font-size: 1.4rem;
	font-weight: 800;
	line-height: 1.1;
}

.crp-order-card__ref {
	font-size: .62rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: var(--crp-muted);
}

.crp-order-card__date {
	font-weight: 700;
}

.crp-order-card__type {
	color: var(--crp-muted);
	font-size: .9rem;
}

.crp-order-card--cancelled {
	opacity: .7;
}

.crp-order-card--cancelled .crp-order-card__number {
	background: var(--crp-bg-soft);
	color: var(--crp-muted);
}

.crp-order-card__cancel {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--crp-border);
}

.crp-detail-table {
	margin-top: 10px;
	font-size: .92rem;
}

.crp-scope .crp-detail-table td,
.crp-scope .crp-detail-table th {
	border-left: 0;
	border-right: 0;
	border-top: 0;
	background: transparent;
}

/* ---------- Compte ---------- */
.crp-account__grid {
	display: grid;
	gap: 16px;
}

.crp-account__identity {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 32px;
}

.crp-kpi {
	display: flex;
	flex-direction: column;
}

.crp-kpi__label {
	font-size: .78rem;
	color: var(--crp-muted);
	text-transform: uppercase;
	letter-spacing: .04em;
}

.crp-kpi__value {
	font-size: 1.4rem;
	font-weight: 800;
}

.crp-table-wrap {
	overflow-x: auto;
}

.crp-scope .crp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .92rem;
	margin: 0;
}

.crp-scope .crp-table th,
.crp-scope .crp-table td {
	text-align: left;
	padding: 10px 8px;
	border: 0;
	border-bottom: 1px solid var(--crp-border);
	vertical-align: top;
	background: transparent;
}

.crp-scope .crp-table th {
	font-size: .78rem;
	text-transform: uppercase;
	color: var(--crp-muted);
	letter-spacing: .03em;
}

/* ---------- Suggestions ---------- */
.crp-scope .crp-collapsible__summary {
	display: flex;
}

.crp-suggestion-form {
	margin-top: 4px;
}

.crp-mini-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.crp-mini-list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.crp-message-list {
	display: grid;
	gap: 12px;
}

.crp-scope .crp-message {
	margin: 0;
}

.crp-message__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: .82rem;
	color: var(--crp-muted);
}

.crp-scope .crp-message__title {
	font-size: 1.08rem;
	margin: 8px 0 4px;
	font-weight: 700;
}

.crp-message__content p {
	margin: 0 0 .6em;
}

.crp-reply {
	margin-top: 10px;
	padding: 10px 14px;
	border-radius: var(--crp-radius-sm);
	background: color-mix(in srgb, var(--crp-primary) 7%, #fff);
	border-left: 3px solid var(--crp-primary);
}

.crp-reply__label {
	font-size: .78rem;
	font-weight: 700;
	color: var(--crp-primary);
	text-transform: uppercase;
	letter-spacing: .04em;
	margin-bottom: 4px;
}

.crp-reply__content p {
	margin: 0 0 .5em;
}

.crp-message__footer {
	margin-top: 10px;
	display: flex;
	justify-content: flex-end;
}

.crp-scope .crp-like {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 38px;
	padding: 6px 14px;
	border: 1px solid var(--crp-border);
	border-radius: 999px;
	background: #fff;
	color: var(--crp-muted);
	font: inherit;
	font-size: .88rem;
	font-weight: 600;
	cursor: pointer;
	transition: all .15s;
}

.crp-scope .crp-like svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

.crp-scope .crp-like.is-liked {
	color: #d63a5c;
	border-color: #f5c2cf;
	background: #fff0f3;
}

.crp-scope .crp-like.is-liked svg {
	fill: currentColor;
}

.crp-scope .crp-like[disabled] {
	cursor: default;
	opacity: .6;
}

.crp-like.is-bump svg {
	animation: crp-bump .3s ease;
}

@keyframes crp-bump {
	50% { transform: scale(1.35); }
}

/* ---------- Sondages ---------- */
.crp-poll-grid,
.crp-ag-grid {
	display: grid;
	gap: 16px;
}

.crp-scope .crp-poll,
.crp-scope .crp-ag {
	padding: 0;
	overflow: hidden;
	margin: 0;
}

.crp-poll__cover,
.crp-ag__img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 7;
	object-fit: cover;
}

.crp-poll__body,
.crp-ag__body {
	padding: 16px;
}

.crp-poll__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: .82rem;
	color: var(--crp-muted);
}

.crp-scope .crp-poll__title {
	font-size: 1.15rem;
	margin: 8px 0;
	font-weight: 700;
}

.crp-poll__content {
	font-size: .95rem;
}

.crp-poll__content img {
	border-radius: var(--crp-radius-sm);
}

.crp-choices {
	display: grid;
	gap: 8px;
	margin: 6px 0 4px;
}

.crp-choices--images {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crp-choice {
	position: relative;
	cursor: pointer;
	display: block;
}

.crp-choice__box {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 10px 14px;
	border: 2px solid var(--crp-border);
	border-radius: var(--crp-radius-sm);
	background: #fff;
	font-weight: 600;
	transition: border-color .15s, background .15s;
	height: 100%;
}

.crp-choice__box::before {
	content: "";
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	border: 2px solid #cbd2d9;
	border-radius: 50%;
	transition: all .15s;
}

.crp-choice input[type="checkbox"] + .crp-choice__box::before {
	border-radius: 5px;
}

.crp-choice input:checked + .crp-choice__box {
	border-color: var(--crp-primary);
	background: color-mix(in srgb, var(--crp-primary) 7%, #fff);
}

.crp-choice input:checked + .crp-choice__box::before {
	border-color: var(--crp-primary);
	background: var(--crp-primary);
	box-shadow: inset 0 0 0 3px #fff;
}

.crp-choices--images .crp-choice__box {
	flex-direction: column;
	align-items: stretch;
	padding: 8px;
	position: relative;
}

.crp-choices--images .crp-choice__box::before {
	position: absolute;
	top: 14px;
	left: 14px;
	background: #fff;
	z-index: 1;
}

.crp-choice__img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 8px;
}

.crp-choices--images .crp-choice__label {
	text-align: center;
	padding: 4px 2px 2px;
}

.crp-choice.is-locked {
	opacity: .5;
	cursor: not-allowed;
}

.crp-results {
	display: grid;
	gap: 10px;
	margin-top: 12px;
}

.crp-result__head {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: .92rem;
}

.crp-result__img {
	width: 32px;
	height: 32px;
	border-radius: 6px;
	object-fit: cover;
}

.crp-result__label {
	flex: 1;
	min-width: 0;
	font-weight: 600;
}

.crp-result__mine {
	display: block;
	color: var(--crp-primary);
	font-weight: 600;
}

.crp-result__value {
	font-weight: 800;
	white-space: nowrap;
}

.crp-result__value small {
	color: var(--crp-muted);
	font-weight: 500;
}

.crp-result__bar {
	height: 10px;
	border-radius: 999px;
	background: var(--crp-bg-soft);
	overflow: hidden;
	margin-top: 4px;
}

.crp-result__bar span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: #9aa5b1;
	transition: width .6s ease;
}

.crp-result.is-winner .crp-result__bar span {
	background: var(--crp-primary);
}

.crp-results__total {
	font-size: .82rem;
	color: var(--crp-muted);
	margin: 0;
}

/* ---------- Anti-gaspi ---------- */
.crp-ag__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.crp-scope .crp-ag__title {
	font-size: 1.1rem;
	margin: 0;
	font-weight: 700;
}

.crp-ag__price {
	font-size: 1.2rem;
	font-weight: 800;
	color: var(--crp-primary);
	white-space: nowrap;
}

.crp-ag__content {
	font-size: .92rem;
	color: var(--crp-muted);
	margin: 6px 0;
}

.crp-scope .crp-ag__facts {
	list-style: none;
	margin: 10px 0;
	padding: 0;
	display: grid;
	gap: 4px;
	font-size: .88rem;
}

.crp-scope .crp-ag__facts li {
	margin: 0;
}

.crp-ag__form {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 480px) {
	.crp-item {
		grid-template-columns: 48px 1fr;
		grid-template-areas: "media body" "stepper stepper";
	}

	.crp-item__media {
		width: 48px;
		height: 48px;
		grid-area: media;
	}

	.crp-item__body {
		grid-area: body;
	}

	.crp-item .crp-stepper {
		grid-area: stepper;
		justify-self: end;
	}

	.crp-summary {
		margin-left: -8px;
		margin-right: -8px;
		border-radius: 12px 12px 0 0;
	}

	.crp-summary .crp-btn {
		padding: 10px 14px;
		font-size: .95rem;
	}

	.crp-order-card__head {
		grid-template-columns: auto 1fr;
	}

	.crp-order-card__head .crp-badge {
		grid-column: 1 / -1;
		justify-self: start;
	}

	.crp-scope .crp-table thead {
		display: none;
	}

	.crp-scope .crp-table tr {
		display: block;
		border-bottom: 1px solid var(--crp-border);
		padding: 8px 0;
	}

	.crp-scope .crp-table td {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		border: 0;
		padding: 4px 0;
		text-align: right;
	}

	.crp-scope .crp-table td::before {
		content: attr(data-label);
		font-weight: 600;
		color: var(--crp-muted);
		text-align: left;
	}

	.crp-nav__user {
		width: 100%;
		justify-content: space-between;
		border-top: 1px solid var(--crp-border);
		padding-top: 8px;
	}
}

@media (min-width: 640px) {
	.crp-scope .crp-card {
		padding: 20px;
	}

	.crp-formulas--2 {
		grid-template-columns: 1fr 1fr;
	}

	.crp-formula__box {
		grid-template-columns: auto 1fr;
		grid-template-areas: "icon name" "icon price" "desc desc";
	}

	.crp-field-row {
		grid-template-columns: 1fr 1fr;
	}

	.crp-choices--images {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.crp-poll-grid,
	.crp-ag-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.crp-account__grid {
		grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
		align-items: start;
	}
}

@container crp (min-width: 760px) {
	.crp-items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 900px) {

	.crp-summary {
		border-radius: var(--crp-radius);
		bottom: 16px;
		margin-left: 0;
		margin-right: 0;
	}

	.crp-scope .crp-date {
		width: 86px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.crp-scope *,
	.crp-scope *::before,
	.crp-scope *::after {
		transition: none !important;
		animation: none !important;
	}
}

/* Titre masqué visuellement (le thème affiche déjà le titre de la page) */
.crp-scope .crp-screen-reader {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.crp-page__header:not(:has(.crp-intro)) {
	display: contents;
}

.crp-scope summary:focus:not(:focus-visible) {
	outline: none;
}

@media (max-width: 480px) {
	.crp-nav__links {
		flex-wrap: wrap;
		overflow: visible;
	}

	.crp-scope .crp-nav__link {
		padding: 7px 12px;
		font-size: .9rem;
	}
}
