/* Boutique : s'appuie sur les variables et les polices de style.css */

.shop { max-width: 1600px; margin: 0 auto; padding: 50px 20px 0; }

.shop-title {
	margin: 0 0 36px;
	text-align: center;
	color: var(--navy);
	font-family: var(--mono);
	font-size: 36px;
	font-style: italic;
	font-weight: 700;
	line-height: 1.2;
}

/* ---------- Grille ---------- */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 36px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.card { display: block; text-decoration: none; color: #000; }
.card .thumb { position: relative; aspect-ratio: 3 / 4; background: transparent; overflow: hidden; }
.card .thumb img, .ph { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .thumb img.is-svg { object-fit: contain; padding: 8%; }
.card .thumb img.alt { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s ease; }
.card:hover .thumb img.alt, .card:focus-visible .thumb img.alt { opacity: 1; }
.ph { display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; font-family: var(--mono); font-weight: 700; font-size: 16px; color: #000; }

.card h2 { margin: 12px 0 2px; font-family: var(--mono); font-size: 15px; font-weight: 700; line-height: 1.3; }
.card .kind { margin: 0; font-family: var(--pre); font-size: 13px; color: #555; }
.card .price { margin: 6px 0 0; font-family: var(--mono); font-size: 15px; font-weight: 500; }
.card:hover h2, .card:focus-visible h2 { text-decoration: underline; }

.price del { color: #777; font-weight: 400; }
.price ins { text-decoration: none; font-weight: 700; }

.badge {
	position: absolute; top: 10px; left: 10px; z-index: 2;
	padding: 4px 9px;
	background: #000; color: #fff;
	font-family: var(--mono); font-size: 12px; font-weight: 700; line-height: 1.2;
}
.badge--promo { background: #178043; }
.is-sold-out .thumb img, .is-sold-out .thumb .ph { opacity: 0.45; }

/* ---------- Fiche produit ---------- */
.crumbs { margin: 0 0 24px; font-family: var(--pre); font-size: 13px; }
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; max-width: 1200px; margin: 0 auto; }

.gallery .main { display: block; background: transparent; aspect-ratio: 3 / 4; }
.gallery .main img, .gallery .main .ph { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery .main img.is-svg { padding: 6%; }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.thumbs button { display: block; width: 72px; height: 72px; padding: 0; border: 2px solid transparent; background: transparent; cursor: pointer; }
.thumbs button[aria-current="true"] { border-color: #000; }
.thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumbs img.is-svg { object-fit: contain; padding: 4px; }

.product h1 { margin: 0 0 4px; font-family: var(--mono); font-size: 28px; font-weight: 700; line-height: 1.2; color: var(--navy); }
.product .kind { margin: 0 0 16px; font-family: var(--pre); font-size: 14px; color: #555; }
.product .price { margin: 0 0 4px; font-family: var(--mono); font-size: 22px; }
.product .ship { margin: 0 0 20px; font-family: var(--pre); font-size: 13px; color: #333; }

.short p, .long p { margin: 0 0 14px; font-family: var(--pre); font-size: 14px; line-height: 22px; color: #111; overflow-wrap: break-word; }
.short { margin: 0 0 24px; }
.product .stock { margin: 0 0 16px; font-family: var(--mono); font-size: 14px; font-weight: 700; }

.buy { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.buy label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.buy input[type=number] { width: 72px; padding: 0 10px; border: 1px solid #000; background: #fff; font-family: var(--mono); font-size: 15px; }
.buy .btn { border: 0; cursor: pointer; padding: 14px 26px; }
.buy .btn[disabled] { background: #888; cursor: not-allowed; }

.note-sim { margin: 20px 0 0; padding: 10px 14px; border: 1px dashed #000080; color: #000080; font-family: var(--pre); font-size: 13px; line-height: 1.5; }

.product-nav { display: flex; justify-content: space-between; gap: 16px; margin: 28px 0 0; font-family: var(--mono); font-size: 14px; font-weight: 700; }
.product-nav a { text-decoration: none; }
.product-nav a:hover, .product-nav a:focus-visible { text-decoration: underline; }

.long-wrap { max-width: 850px; margin: 56px auto 0; }
.long-wrap h2 { margin: 0 0 16px; font-family: var(--mono); font-size: 18px; font-weight: 700; }

@media (max-width: 767px) {
	.shop { padding-top: 24px; }
	.shop-title { font-size: 22px; }
	.grid { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
	.card h2, .card .price { font-size: 14px; }
	.product { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.product h1 { font-size: 22px; }
	.long-wrap { margin-top: 36px; }
}

@media (prefers-reduced-motion: reduce) {
	.card .thumb img.alt { transition: none; }
}

/* ---------- Panier ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.cart { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 48px; align-items: start; max-width: 1200px; margin: 0 auto; }
.cart-lines { margin: 0 0 20px; padding: 0; list-style: none; }
.cart-lines li { display: grid; grid-template-columns: 80px minmax(0, 1fr) 72px 90px auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.2); }
.cart-img { display: block; width: 80px; aspect-ratio: 3 / 4; overflow: hidden; }
.cart-img img, .cart-img .ph { display: block; width: 100%; height: 100%; object-fit: cover; font-size: 11px; padding: 4px; }
.cart-img img.is-svg { object-fit: contain; }
.cart-info { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 14px; }
.cart-name { font-weight: 700; text-decoration: none; }
.cart-qty input { width: 64px; height: 40px; padding: 0 8px; border: 1px solid #000; background: #fff; font-family: var(--mono); font-size: 15px; }
.cart-line-total { font-family: var(--mono); font-weight: 700; text-align: right; }
.link-btn { padding: 0; border: 0; background: none; font-family: var(--pre); font-size: 13px; text-decoration: underline; cursor: pointer; color: inherit; }

.btn--light { background: transparent; color: #000; border: 1px solid #000; padding: 11px 20px; cursor: pointer; }
.btn--light:hover, .btn--light:focus-visible { background: #000; color: #fff; }

.cart-summary { padding: 20px; background: rgba(255, 255, 255, 0.6); }
.cart-total { display: flex; justify-content: space-between; margin: 0 0 6px; font-family: var(--mono); font-size: 20px; }
.cart-summary .ship { margin: 0 0 18px; font-family: var(--pre); font-size: 13px; }
.pay-msg { margin: 14px 0 0; padding: 10px 14px; border: 1px solid #b00020; color: #b00020; font-family: var(--pre); font-size: 13px; line-height: 1.5; }
.flash { margin: 0 0 20px; padding: 10px 14px; border: 1px dashed #000080; color: #000080; font-family: var(--pre); font-size: 13px; text-align: center; }
.cart-empty { text-align: center; font-family: var(--pre); font-size: 14px; }
.thanks { max-width: 700px; margin: 0 auto; font-family: var(--pre); font-size: 14px; line-height: 24px; }

@media (max-width: 767px) {
	.cart { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.cart-lines li { grid-template-columns: 64px minmax(0, 1fr) 64px; grid-template-areas: "img info qty" "img total remove"; row-gap: 6px; }
	.cart-img { grid-area: img; width: 64px; }
	.cart-info { grid-area: info; }
	.cart-qty { grid-area: qty; }
	.cart-line-total { grid-area: total; text-align: left; }
	.link-btn { grid-area: remove; justify-self: end; }
}

/* ---------- Badge promo vert ---------- */
.badge--promo { background: #178043; }

/* ---------- Lien panier ---------- */
.shopbar { margin: 0 0 12px; text-align: right; font-family: var(--mono); font-size: 14px; font-weight: 700; }
.shopbar a { text-decoration: none; }
.shopbar a:hover, .shopbar a:focus-visible { text-decoration: underline; }

/* ---------- Panier ---------- */
.cart-empty { text-align: center; font-family: var(--pre); font-size: 14px; }
.cart-lines { max-width: 900px; margin: 0 auto; padding: 0; list-style: none; }
.cart-line {
	display: grid;
	grid-template-columns: 72px 1fr auto auto;
	gap: 8px 20px;
	align-items: center;
	padding: 16px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
.cl-img { display: block; width: 72px; height: 96px; overflow: hidden; }
.cl-img img, .cl-img .ph { display: block; width: 100%; height: 100%; object-fit: cover; font-size: 11px; padding: 4px; }
.cl-img img.is-svg { object-fit: contain; }
.cl-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cl-name { font-family: var(--mono); font-size: 15px; font-weight: 700; text-decoration: none; color: #000; }
.cl-name:hover { text-decoration: underline; }
.cl-unit { font-family: var(--pre); font-size: 13px; }
.cl-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.cl-form input[type=number] { width: 60px; height: 34px; padding: 0 8px; border: 1px solid #000; background: #fff; font-family: var(--mono); font-size: 14px; }
.btn-small { height: 34px; padding: 0 12px; border: 1px solid #000; background: transparent; font-family: var(--mono); font-size: 13px; font-weight: 700; cursor: pointer; }
.btn-small:hover, .btn-small:focus-visible { background: #000; color: #fff; }
.btn-link { padding: 0; border: 0; background: none; font-family: var(--pre); font-size: 13px; text-decoration: underline; cursor: pointer; color: #000; }
.cl-total { min-width: 90px; text-align: right; font-family: var(--mono); font-size: 15px; font-weight: 700; }

.cart-sum { max-width: 900px; margin: 20px auto 0; text-align: right; }
.cart-total { margin: 0; font-family: var(--mono); font-size: 20px; }
.cart-ship { margin: 4px 0 0; font-family: var(--pre); font-size: 13px; }

#paypal-buttons { max-width: 420px; margin: 28px auto 0; }
.pay-msg { max-width: 420px; margin: 12px auto 0; font-family: var(--pre); font-size: 13px; color: #a00; text-align: center; }
.pay-msg code { color: #000; }

.thanks { max-width: 600px; margin: 0 auto; font-family: var(--pre); font-size: 14px; line-height: 24px; }
.thanks .ref { margin-top: 24px; font-size: 12px; color: #555; }

@media (max-width: 767px) {
	.cart-line { grid-template-columns: 56px 1fr; }
	.cl-img { width: 56px; height: 75px; }
	.cl-form { grid-column: 1 / -1; }
	.cl-total { grid-column: 1 / -1; text-align: left; }
	.cart-sum { text-align: left; }
}
