/*
 * Panier : tiroir, lignes d'article, totaux, confirmation, toast.
 *
 * Extrait d'index.html le 22/08/2026 avec le JavaScript correspondant. Les
 * pages produit en auront besoin le jour où elles vendront ; recopier ces
 * règles serait le meilleur moyen de les voir diverger.
 *
 * DÉPEND DE LA PAGE HÔTE — à fournir avant de charger ce fichier :
 *   - les jetons de couleur et de typographie : --ink, --panel, --panel-2,
 *     --bone, --muted, --line, --accent, --accent-soft, --f-display, --f-mono ;
 *   - la classe .btn-primary (bouton « Passer commande » et « Continuer »),
 *     qui reste avec la lightbox dans index.html ;
 *   - une règle de mouvement réduit, si la page en veut une.
 * Les trois animations dont le panier a besoin sont ici : il ne dépend plus de
 * `lbIn`, qui appartenait à la lightbox.
 */

@keyframes cartScrimIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- Panier (tiroir) ---- */
.cart-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(6,5,4,0.5); animation: cartScrimIn .2s ease both; }
.cart { position: fixed; top: 0; right: 0; bottom: 0; z-index: 71; width: min(420px, 100vw); background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; animation: drawerIn .3s cubic-bezier(0.22,0.61,0.36,1) both; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-family: var(--f-display); font-weight: 700; font-size: 20px; margin: 0; letter-spacing: 0.01em; }
.cart-close { appearance: none; background: transparent; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--bone); padding: 4px 8px; }
.cart-close:hover { color: var(--accent); }
.cart-items { flex: 1; overflow: auto; padding: 8px 22px; }
.cart-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 60px 10px; line-height: 1.7; }
.ci { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ci-thumb { width: 66px; height: 66px; flex: 0 0 66px; overflow: hidden; position: relative; background: var(--panel-2); }
.ci-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ci-thumb .ghost { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 24px; color: rgba(236,230,218,0.16); }
.ci-main { flex: 1; min-width: 0; }
.ci-title { font-family: var(--f-display); font-weight: 600; font-size: 15px; line-height: 1.1; }
.ci-cat { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.ci-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.qty button { appearance: none; background: transparent; border: 0; width: 26px; height: 26px; cursor: pointer; font-size: 15px; line-height: 1; color: var(--bone); }
.qty button:hover { background: var(--accent-soft); color: var(--accent); }
.qty span { min-width: 26px; text-align: center; font-family: var(--f-mono); font-size: 13px; }
.ci-price { font-family: var(--f-mono); font-weight: 700; font-size: 14px; }
.ci-remove { appearance: none; background: transparent; border: 0; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); cursor: pointer; padding: 0; margin-top: 6px; }
.ci-remove:hover { color: var(--accent); }
.cart-foot { padding: 18px 22px 24px; border-top: 1px solid var(--line); }
.cart-line { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; margin: 10px 0 16px; }
.cart-total .lbl { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.cart-total .val { font-family: var(--f-mono); font-weight: 700; font-size: 22px; }
.checkout-btn { width: 100%; text-align: center; justify-content: center; }

/* Confirmation */
.confirm { text-align: center; padding: 40px 10px; animation: toastIn .35s ease both; }
.confirm .tick { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; background: var(--accent); color: var(--ink); display: grid; place-items: center; font-size: 28px; }
.confirm h3 { font-family: var(--f-display); font-weight: 700; font-size: 22px; margin: 0 0 8px; }
.confirm p { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 0 auto; max-width: 34ch; }
.confirm .order { margin-top: 14px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90; background: var(--accent); color: var(--ink); padding: 12px 20px; font-family: var(--f-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; animation: toastIn .25s ease both; pointer-events: none; }
