/* Sellerie50 : ajout rapide au panier depuis les cartes produits de l'accueil. Couleurs et polices du thème Kadence. */

/* Bouton sur les cartes */
.s50-ar-carte { display: flex; flex-direction: column; }
.s50-ar-carte .kwt-price-wrap { margin-bottom: 14px; }
.s50-ar-carte .s50-ar-bouton {
	position: relative; z-index: 2; margin-top: auto; width: 100%; min-height: 44px; padding: 12px;
	background: var(--global-palette1, #e2d39c); color: var(--global-palette3, #090909);
	border: 0; border-radius: 0; box-shadow: none; cursor: pointer;
	font-family: var(--global-body-font-family, Montserrat, sans-serif); font-size: 13px; font-weight: 500;
	letter-spacing: 2px; line-height: 1.3; text-transform: uppercase;
	transition: background-color .2s ease-out;
}
.s50-ar-carte .s50-ar-bouton:hover,
.s50-ar-carte .s50-ar-bouton:focus { background: #d7c584; color: var(--global-palette3, #090909); box-shadow: none; }
.s50-ar-carte .s50-ar-bouton:focus-visible { outline: 2px solid var(--global-palette2, #14163b); outline-offset: 2px; }

/* Fenêtre */
html.s50-ar-ouvert { overflow: hidden; }
.s50-ar {
	position: fixed; inset: 0; z-index: 100050; display: flex; align-items: flex-start; justify-content: center;
	padding: clamp(16px, 9vh, 110px) 16px 16px; box-sizing: border-box; overflow-y: auto;
}
.s50-ar[hidden] { display: none; }
.s50-ar__voile { position: fixed; inset: 0; background: rgba(20, 22, 59, .55); animation: s50-ar-voile .2s ease-out; }
.s50-ar__boite {
	position: relative; z-index: 1; width: 100%; max-width: 880px; background: #fff; border-radius: 10px; overflow: hidden;
	color: var(--global-palette4, #6b7280); font-family: var(--global-body-font-family, Montserrat, sans-serif);
	font-size: 15px; line-height: 1.5; text-align: left; outline: none; animation: s50-ar-monte .35s ease-out;
}
.s50-ar__boite:has(.s50-ar__ok),
.s50-ar__boite:has(.s50-ar__attente) { max-width: 560px; }
.s50-ar p { margin: 0; }
.s50-ar :focus-visible { outline: 2px solid var(--global-palette2, #14163b); outline-offset: 2px; }
.s50-ar__attente { padding: 48px 40px; font-size: 15px; }
.s50-ar__attente a { color: var(--global-palette2, #14163b); }

.s50-ar .s50-ar__fermer {
	position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; padding: 0;
	display: flex; align-items: center; justify-content: center;
	border: 0; border-radius: 50%; background: #fff; color: var(--global-palette2, #14163b); box-shadow: none; cursor: pointer;
}
.s50-ar .s50-ar__fermer:hover { background: #f3f4f6; color: var(--global-palette2, #14163b); box-shadow: none; }

/* Choix des options */
.s50-ar__choix { display: flex; flex-wrap: wrap; }
.s50-ar__photo { flex: 1 1 340px; position: relative; min-height: 440px; background: #eee; }
.s50-ar__photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover; }
.s50-ar__infos { flex: 1 1 400px; min-width: 0; box-sizing: border-box; padding: 36px 40px 32px; display: flex; flex-direction: column; gap: 20px; }
.s50-ar__entete { padding-right: 36px; }
.s50-ar__marque { margin-bottom: 4px !important; font-size: 13px; font-weight: 500; color: #4b5563; }
.s50-ar__nom {
	margin: 0; padding: 0; font-family: var(--global-heading-font-family, 'Cormorant Garamond', serif); font-style: normal;
	font-weight: 600; font-size: 28px; line-height: 1.15; color: var(--global-palette2, #14163b); outline: none;
}
.s50-ar__prix { margin-top: 10px !important; font-size: 20px; font-weight: 500; color: var(--global-palette2, #14163b); }

.s50-ar__groupe { margin: 0; padding: 0; border: 0; min-width: 0; }
.s50-ar__groupe legend { margin: 0 0 10px; padding: 0; font-size: 15px; color: var(--global-palette2, #14163b); }
.s50-ar__groupe legend strong { font-weight: 600; }
.s50-ar__options { display: flex; flex-wrap: wrap; gap: 8px; }
.s50-ar .s50-ar__opt {
	min-width: 52px; min-height: 44px; padding: 8px 14px; border: 1px solid #c9cdd3; border-radius: 4px;
	background: #fff; color: var(--global-palette2, #14163b); box-shadow: none; cursor: pointer;
	font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.2; letter-spacing: 0; text-transform: none;
	transition: border-color .15s ease-out, background-color .15s ease-out;
}
.s50-ar .s50-ar__opt:hover { background: #fff; color: var(--global-palette2, #14163b); border-color: var(--global-palette2, #14163b); box-shadow: none; }
.s50-ar .s50-ar__opt.est-autre { border-style: dashed; }
.s50-ar .s50-ar__opt.est-choisi,
.s50-ar .s50-ar__opt.est-choisi:hover { background: var(--global-palette2, #14163b); border-color: var(--global-palette2, #14163b); border-style: solid; color: #fff; }
.s50-ar .s50-ar__opt.est-epuise,
.s50-ar .s50-ar__opt.est-epuise:hover { background: #f3f4f6; border-color: #e5e7eb; color: #8b919a; text-decoration: line-through; cursor: not-allowed; }

.s50-ar__alerte { font-size: 14px; color: #b42318; }
.s50-ar__note { font-size: 14px; color: #4b5563; }

.s50-ar__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.s50-ar__qte {
	display: flex; align-items: center; height: 52px; box-sizing: border-box; border: 1px solid #c9cdd3; border-radius: 4px;
	color: var(--global-palette2, #14163b); font-size: 16px; font-weight: 500;
}
.s50-ar__qte > span { min-width: 28px; text-align: center; }
.s50-ar .s50-ar__pas {
	width: 44px; height: 50px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
	color: var(--global-palette2, #14163b); font-family: inherit; font-size: 20px; line-height: 1; cursor: pointer;
}
.s50-ar .s50-ar__pas:hover { background: none; color: var(--global-palette2, #14163b); box-shadow: none; }
.s50-ar .s50-ar__pas:disabled { color: #b8bdc4; cursor: default; }
.s50-ar__lecteur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.s50-ar .s50-ar__ajouter {
	flex: 1 1 200px; display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 16px;
	border: 0; border-radius: 0; background: var(--global-palette1, #e2d39c); color: var(--global-palette3, #090909); box-shadow: none;
	font-family: inherit; font-size: 13px; font-weight: 500; letter-spacing: 2px; line-height: 1.3; text-transform: uppercase;
	text-decoration: none; cursor: pointer; transition: background-color .2s ease-out;
}
.s50-ar .s50-ar__ajouter:hover,
.s50-ar .s50-ar__ajouter:focus { background: #d7c584; color: var(--global-palette3, #090909); box-shadow: none; }
.s50-ar .s50-ar__ajouter:disabled { opacity: .7; cursor: progress; }
.s50-ar .s50-ar__fiche { width: fit-content; font-size: 14px; color: var(--global-palette2, #14163b); text-decoration: underline; text-underline-offset: 3px; }

/* Confirmation */
.s50-ar__ok { padding: 36px 40px; display: flex; flex-direction: column; gap: 22px; }
.s50-ar__titre-ok { padding-right: 40px; font-size: 30px; }
.s50-ar__recap { display: flex; gap: 16px; align-items: center; }
.s50-ar__recap img { flex-shrink: 0; width: 88px; height: 104px; margin: 0; object-fit: cover; border-radius: 4px; background: #eee; }
.s50-ar__recap > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.s50-ar__recap-nom { font-family: var(--global-heading-font-family, 'Cormorant Garamond', serif); font-weight: 600; font-size: 19px; line-height: 1.25; color: var(--global-palette2, #14163b); }
.s50-ar__recap-prix { font-size: 16px; font-weight: 500; color: var(--global-palette2, #14163b); }
.s50-ar__total { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: 6px; background: var(--global-palette8, #f7fafc); }
.s50-ar__ligne { display: flex; justify-content: space-between; gap: 12px; color: var(--global-palette2, #14163b); }
.s50-ar__ligne strong { font-weight: 600; }
.s50-ar__barre { height: 6px; overflow: hidden; border-radius: 3px; background: #e3e6ea; }
.s50-ar__barre span { display: block; height: 100%; border-radius: 3px; background: var(--global-palette2, #14163b); }
.s50-ar__suite { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.s50-ar .s50-ar__panier { flex: 1 1 220px; }
.s50-ar .s50-ar__continuer {
	padding: 12px 4px; border: 0; background: none; box-shadow: none; cursor: pointer;
	color: var(--global-palette2, #14163b); font-family: inherit; font-size: 15px; letter-spacing: 0; text-transform: none;
	text-decoration: underline; text-underline-offset: 3px;
}
.s50-ar .s50-ar__continuer:hover { background: none; color: var(--global-palette2, #14163b); box-shadow: none; }

@keyframes s50-ar-voile { from { opacity: 0; } to { opacity: 1; } }
@keyframes s50-ar-monte { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes s50-ar-feuille { from { transform: translateY(100%); } to { transform: none; } }

/* Mobile : panneau qui monte du bas, petite photo à côté du nom */
@media (max-width: 640px) {
	.s50-ar { align-items: flex-end; padding: 0; }
	.s50-ar__boite,
	.s50-ar__boite:has(.s50-ar__ok),
	.s50-ar__boite:has(.s50-ar__attente) {
		max-width: none; max-height: 92vh; max-height: 92dvh; overflow-y: auto; border-radius: 16px 16px 0 0; animation-name: s50-ar-feuille;
	}
	.s50-ar__choix { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 18px 14px; padding: 22px 20px 24px; }
	.s50-ar__infos { display: contents; }
	.s50-ar__infos > * { grid-column: 1 / -1; }
	.s50-ar__infos > .s50-ar__entete { grid-column: 2; grid-row: 1; align-self: center; padding-right: 40px; }
	.s50-ar__photo { grid-column: 1; grid-row: 1; min-height: 0; height: 112px; border-radius: 4px; overflow: hidden; }
	.s50-ar__nom { font-size: 21px; }
	.s50-ar__prix { margin-top: 6px !important; font-size: 17px; }
	.s50-ar__actions { flex-wrap: nowrap; }
	.s50-ar .s50-ar__ajouter { font-size: 12px; letter-spacing: 1.5px; }
	.s50-ar__ok { padding: 24px 20px 28px; gap: 18px; }
	.s50-ar__titre-ok { font-size: 26px; }
	.s50-ar__suite { flex-direction: column; align-items: stretch; gap: 4px; }
	.s50-ar .s50-ar__panier { flex: none; }
	.s50-ar .s50-ar__fermer { top: 10px; right: 8px; }
	.s50-ar__attente { padding: 32px 20px; }
	.s50-ar-carte .s50-ar-bouton { padding: 8px 4px; font-size: 11px; letter-spacing: 1px; }
}

@media (prefers-reduced-motion: reduce) {
	.s50-ar__voile, .s50-ar__boite { animation: none; }
	.s50-ar-carte .s50-ar-bouton, .s50-ar .s50-ar__opt, .s50-ar .s50-ar__ajouter { transition: none; }
}
