/*
 * urbexe : le tiroir du panier, sur toutes les pages du site (sauf la commande). Il s'appuie sur les couleurs, les
 * polices et le bouton (.bouton) du thème. Repris d'urbexeur : mêmes noms de variables, valeurs d'urbexe.
 */

.ua-tiroir, .ua-express-fiche-zone, .ua-ajout-erreur {
	--papier: #FFFFFF; --bloc: #FFFFFF; --9b: var(--encre, #424242); --6b: var(--encre, #424242); --4b: #555555; --2b: var(--doux, #6B6B6B);
	--hb: #CFCFCF; --2h: var(--gris, #EDEDED); --signal: var(--jaune, #FFCE73); --erreur: #C62828; --police: var(--texte, "Raleway", sans-serif);
}

.ua-tiroir {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(420px, 100vw);
	max-width: 100vw;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-left: 1px solid var(--2h, #23272B);
	background: var(--bloc, #14171A);
	color: var(--4b, #AEB5BB);
	font-family: var(--police, Arial, sans-serif);
	overflow: hidden;
}
.ua-tiroir[open] { animation: ua-entre .28s cubic-bezier(.2, .7, .3, 1); }
.ua-tiroir::backdrop { background: rgba(5, 6, 7, .66); }
@keyframes ua-entre { from { transform: translateX(32px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ua-tiroir[open] { animation: none; } }
html:has(.ua-tiroir[open]) { overflow: hidden; }

.ua-tiroir-boite { display: flex; flex-direction: column; height: 100%; outline: none; }
.ua-tiroir-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--2h, #23272B); }
.ua-tiroir-titre { margin: 0; color: var(--9b, #F3F5F6); font-size: 17px; font-weight: 600; }
.ua-tiroir-fermer { display: grid; place-items: center; width: 40px; height: 40px; margin: -8px -10px -8px 0; padding: 0; background: none; border: 0; color: var(--9b, #F3F5F6); cursor: pointer; }
.ua-tiroir-fermer:hover { color: var(--signal, #FF5900); }
.ua-tiroir .ua-icone { width: 22px; height: 22px; flex: 0 0 auto; }

.ua-tiroir-contenu { display: flex; flex-direction: column; flex: 1; min-height: 0; transition: opacity .15s; }
.ua-tiroir-contenu.ua-occupe { opacity: .5; pointer-events: none; }
.ua-tiroir-corps { flex: 1; overflow-y: auto; padding: 20px; overscroll-behavior: contain; }
.ua-tiroir-ajout { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--9b, #F3F5F6); font-size: 14px; font-weight: 500; }
.ua-tiroir-ajout .ua-icone { width: 18px; height: 18px; color: #3FB27F; }

.ua-tiroir .ua-lignes { margin: 0; padding: 0; list-style: none; }
.ua-tiroir .ua-ligne { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 0 0 18px; margin: 0 0 18px; border-bottom: 1px solid var(--2h, #23272B); }
.ua-tiroir .ua-ligne:last-child { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }
.ua-tiroir .ua-ligne-neuve { animation: ua-neuve .9s ease-out; }
@keyframes ua-neuve { from { background: rgba(255, 89, 0, .08); } }
.ua-tiroir .ua-ligne-image { display: block; width: 72px; height: 72px; overflow: hidden; background: var(--papier, #0A0B0C); border: 1px solid var(--2h, #23272B); }
.ua-tiroir .ua-ligne-image img { width: 100%; height: 100%; object-fit: cover; }
.ua-tiroir .ua-ligne-nom { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
.ua-tiroir .ua-ligne-nom a { color: var(--9b, #F3F5F6); background: none; padding: 0; }
.ua-tiroir .ua-ligne-nom a:hover { color: var(--signal, #FF5900); }
.ua-tiroir .ua-ligne-detail { margin: 4px 0 0; color: var(--2b, #858C93); font-size: 13px; }
.ua-tiroir .ua-ligne-retirer { margin: 6px 0 0; padding: 0; background: none; border: 0; color: var(--2b, #858C93); font: 400 13px/1.4 var(--police, Arial, sans-serif); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ua-tiroir .ua-ligne-retirer:hover { color: var(--9b, #F3F5F6); }
.ua-tiroir .ua-ligne-prix { margin: 0; color: var(--9b, #F3F5F6); font-size: 15px; font-weight: 600; text-align: right; white-space: nowrap; }
.ua-tiroir del { display: block; color: var(--2b, #858C93); font-size: 13px; font-weight: 400; }

.ua-tiroir-pied { padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--2h, #23272B); background: var(--bloc, #14171A); }
.ua-tiroir-total { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 16px; color: var(--9b, #F3F5F6); font-size: 16px; font-weight: 600; }
.ua-tiroir-total strong { font-size: 20px; font-weight: 700; }
.ua-tiroir-total del { display: inline; margin-right: 6px; font-size: 14px; }

.ua-tiroir .ua-express-bouton { min-height: 50px; }
.ua-tiroir .ua-express[hidden] { display: none; }
.ua-tiroir .ua-express-attente .ua-express-bouton { background: linear-gradient(90deg, #E6E9EB 0%, #F3F5F6 50%, #E6E9EB 100%) 0 0 / 200% 100%; animation: ua-lueur 1.4s linear infinite; }
@keyframes ua-lueur { to { background-position: -200% 0; } }
.ua-tiroir .ua-express-erreur { margin: 8px 0 0; color: var(--erreur, #E5484D); font-size: 14px; }
.ua-tiroir .ua-ou, .ua-express-fiche-zone .ua-ou { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--2b, #858C93); font-size: 13px; }
.ua-tiroir .ua-ou::before, .ua-tiroir .ua-ou::after, .ua-express-fiche-zone .ua-ou::before, .ua-express-fiche-zone .ua-ou::after { content: ""; flex: 1; height: 1px; background: var(--2h, #23272B); }
.ua-tiroir .ua-ou[hidden], .ua-express-fiche-zone[hidden] { display: none; }

.ua-tiroir .ua-tiroir-commander { width: 100%; height: 52px; justify-content: center; gap: 10px; }
.ua-tiroir .ua-tiroir-commander::after { display: none; }      /* la flèche du thème : le cadenas suffit */
.ua-tiroir .ua-tiroir-commander .ua-icone { width: 20px; height: 20px; }
.ua-tiroir-suite { display: block; width: 100%; margin: 10px 0 0; padding: 8px; background: none; border: 0; color: var(--2b, #858C93); font: 400 14px/1.4 var(--police, Arial, sans-serif); cursor: pointer; }
.ua-tiroir-suite:hover { color: var(--9b, #F3F5F6); }

.ua-tiroir-vide { padding: 40px 20px; text-align: center; }
.ua-tiroir-vide p { margin: 0 0 20px; color: var(--9b, #F3F5F6); }

/* La fiche d'une carte : le paiement express sous le bouton d'achat. */
.ua-express-fiche-zone { width: 100%; flex-basis: 100%; margin: 4px 0 0; }
.ua-express-fiche .ua-express-bouton { min-height: 50px; }
.ua-express-fiche.ua-express-attente .ua-express-bouton { background: linear-gradient(90deg, #E6E9EB 0%, #F3F5F6 50%, #E6E9EB 100%) 0 0 / 200% 100%; animation: ua-lueur 1.4s linear infinite; }
.ua-express-fiche .ua-express-erreur { margin: 8px 0 0; color: var(--erreur, #E5484D); font-size: 14px; }
.ua-ajout-erreur { margin: 12px 0 0; color: var(--erreur, #E5484D); font-size: 14px; }

@media (max-width: 600px) {
	.ua-tiroir { inset: auto 0 0 0; width: 100vw; height: auto; max-height: 88vh; max-height: 88dvh; border-left: 0; border-top: 1px solid var(--hb, #454B51); }
	.ua-tiroir[open] { animation-name: ua-monte; }
	@keyframes ua-monte { from { transform: translateY(40px); opacity: 0; } }
	.ua-tiroir-boite { height: auto; max-height: inherit; }
	.ua-tiroir-corps { padding: 16px; }
	.ua-tiroir-pied { padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
}

/* La vue de nuit d'un lieu, et son cadenas, comme sur la grille des pages locales. */
.ua-tiroir .ua-ligne-image { position: relative; }
.ua-visuel-cadenas { position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--signal, #FF5900); color: #0A0B0C; }
.ua-tiroir .ua-visuel-cadenas .ua-icone { width: 12px; height: 12px; stroke-width: 2.2; }

/* Sous le bouton : ce que l'on obtient, pas une sortie. */
.ua-tiroir-gages { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 0; color: var(--2b, #858C93); font-size: 13px; text-align: center; }
.ua-tiroir-gages .ua-icone { width: 16px; height: 16px; color: var(--signal, #FF5900); }


/* ───────────── urbexe : la charte du site ───────────── */
.ua-tiroir::backdrop { background: rgba(0, 0, 0, .45); }
.ua-tiroir-titre { font-family: var(--titre, sans-serif); }
.ua-tiroir-fermer:hover, .ua-tiroir .ua-ligne-nom a:hover { color: var(--9b); text-decoration: underline; }
.ua-tiroir .ua-ligne-image { border-radius: var(--rayon, 5px); }
.ua-tiroir .ua-ligne-prix, .ua-tiroir-total strong { font-family: var(--titre, sans-serif); }
.ua-tiroir .ua-ligne-neuve { animation-name: ua-neuve-urbexe; }
@keyframes ua-neuve-urbexe { from { background: #FFF3D6; } }
.ua-tiroir-ajout .ua-icone { color: #2E7D32; }
.ua-tiroir .ua-tiroir-commander { height: 54px; border-radius: var(--pilule, 30px); }
.ua-tiroir-gages .ua-icone { color: var(--9b); }
.ua-tiroir .ua-express-attente .ua-express-bouton, .ua-express-fiche.ua-express-attente .ua-express-bouton { border-radius: var(--rayon, 5px); }
.ua-palier { margin: 16px 0 0; padding: 8px 12px; background: #FFF3D6; border-radius: var(--rayon, 5px); color: var(--9b); font-size: 13px; line-height: 1.4; }

/* Le nom du lieu après « Retirer » n'est là que pour les lecteurs d'écran (la feuille de la caisse n'est pas chargée ici). */
.ua-tiroir .lecture-ecran { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Les gages : le picto reste collé au texte quand la ligne passe sur deux lignes (téléphone). */
.ua-tiroir-gages { display: block; text-wrap: balance; }
.ua-tiroir-gages .ua-icone { display: inline-block; vertical-align: -3px; margin-right: 6px; }
/* Des chiffres alignés pour les prix du tiroir (Raleway les fait descendre sous la ligne, sinon). */
.ua-tiroir, .ua-tiroir * { font-variant-numeric: lining-nums !important; }

/* ───────────── L'offre du livre (offre.php) : une ligne, un geste ───────────── */
.ua-offre { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin: 16px 0 0; padding: 10px 12px; background: var(--bloc, #F9F9F9); border: 1px dashed #CFCFCF; border-radius: var(--rayon, 5px); }
.ua-offre-image { display: block; width: 44px; height: 44px; overflow: hidden; border-radius: 4px; background: #EDEDED; }
.ua-offre-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ua-offre-texte { display: flex; flex-direction: column; gap: 2px; margin: 0; min-width: 0; }
.ua-offre-texte strong { color: var(--9b, #424242); font: 600 14px/1.3 var(--titre, sans-serif); }
.ua-offre-texte span { color: var(--2b, #6B6B6B); font-size: 13px; line-height: 1.35; }
.ua-offre-texte b { color: var(--9b, #424242); font-weight: 700; }
.ua-offre-ajouter { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px 0 10px; background: #FFCE73; border: 0; border-radius: 999px; color: #2B2B2B; font: 700 13px/1 var(--police, Raleway, sans-serif); letter-spacing: .02em; cursor: pointer; white-space: nowrap; }
.ua-offre-ajouter:hover { background: #FFC14D; }
.ua-offre-ajouter:focus-visible { outline: 2px solid var(--9b, #424242); outline-offset: 2px; }
.ua-offre-ajouter .ua-icone { width: 16px; height: 16px; stroke-width: 2; }
.ua-offre.ua-occupe { opacity: .5; pointer-events: none; }
.ua-offre-texte del { display: inline; margin-left: 2px; opacity: .8; }
.ua-offre-prix { display: inline-block; margin-left: 4px; white-space: nowrap; }      /* les deux prix ne se séparent pas ; le reste passe à la ligne s'il le faut */
.ua-tiroir .ua-ligne-prix del { display: block; color: var(--2b, #6B6B6B); font-size: 13px; font-weight: 400; }

/* ───────────── La remise par quantité, en barre de progression (panier.php) ───────────── */
.ua-paliers { margin: 16px 0 0; padding: 14px 14px 12px; background: #FFF8E6; border-radius: var(--rayon, 5px); }
.ua-paliers-texte { margin: 0 0 14px; color: var(--9b, #424242); font-size: 14px; line-height: 1.4; }
.ua-paliers-texte strong { font-weight: 700; }
.ua-paliers-texte span { display: block; margin-top: 2px; color: var(--2b, #6B6B6B); font-size: 13px; }
.ua-paliers-barre { position: relative; height: 8px; margin: 0 13px; background: #EADFC4; border-radius: 99px; overflow: hidden; }
.ua-paliers-plein { position: absolute; inset: 0 auto 0 0; width: var(--plein, 0%); background: linear-gradient(90deg, #FFCE73, #F5B13D); border-radius: 99px; animation: ua-paliers-remplir .8s cubic-bezier(.2, .8, .2, 1) both; }
.ua-paliers-plein::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%) 0 0 / 200% 100%; animation: ua-paliers-reflet 2.4s ease-in-out .8s 2; }
@keyframes ua-paliers-remplir { from { width: var(--depart, 0%); } }
@keyframes ua-paliers-reflet { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.ua-paliers-bornes { position: relative; height: 46px; margin: -17px 13px 0; padding: 0; list-style: none; }
.ua-paliers-borne { position: absolute; left: var(--x); top: 0; display: flex; flex-direction: column; align-items: center; width: 64px; margin-left: -32px; text-align: center; }
.ua-paliers-borne i { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; background: #FFFFFF; border: 1.5px solid #D9CBA6; border-radius: 50%; color: #9A8F76; }
.ua-paliers-borne i .ua-icone { width: 14px; height: 14px; stroke-width: 1.8; }
.ua-paliers-borne b { margin-top: 4px; color: var(--2b, #6B6B6B); font: 700 12px/1.2 var(--titre, sans-serif); }
.ua-paliers-borne span { color: var(--2b, #6B6B6B); font-size: 11px; line-height: 1.2; }
.ua-paliers-borne.ua-atteint i { background: var(--9b, #424242); border-color: var(--9b, #424242); color: #FFCE73; }
.ua-paliers-borne.ua-atteint b { color: var(--9b, #424242); }
.ua-paliers-borne.ua-dernier i { animation: ua-paliers-saut .6s cubic-bezier(.3, 1.6, .5, 1) .55s both; }
@keyframes ua-paliers-saut { from { transform: scale(.4); box-shadow: 0 0 0 0 rgba(255, 206, 115, .9); } 60% { box-shadow: 0 0 0 9px rgba(255, 206, 115, 0); } to { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 206, 115, 0); } }
/* Le dernier palier est au bout de la barre : sa pastille s'y cale au lieu de déborder. */
.ua-paliers-borne.ua-bout { margin-left: -51px; align-items: flex-end; text-align: right; }
.ua-paliers-borne.ua-bout b, .ua-paliers-borne.ua-bout span { align-self: flex-end; }
@media (prefers-reduced-motion: reduce) {
	.ua-paliers-plein, .ua-paliers-plein::after, .ua-paliers-borne.ua-dernier i { animation: none; }
}

/* ───────────── Passe compacte (retours de Clément sur son téléphone, 02/12/2026) ─────────────
   Le nom et la ville tiennent chacun sur une ligne (coupés par « … » s'il le faut), le prix ne bouge jamais ; la barre de
   remise est plus fine ; le bas du panier (total, paiement express, bouton) prend moins de hauteur. */
.ua-tiroir-tete { padding: 14px 16px; }
.ua-tiroir-corps { padding: 14px 16px; }
.ua-tiroir .ua-ligne { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 0 0 12px; margin: 0 0 12px; }
.ua-tiroir .ua-ligne-image { width: 56px; height: 56px; }
.ua-tiroir .ua-ligne-texte { min-width: 0; }
.ua-tiroir .ua-ligne-nom, .ua-tiroir .ua-ligne-detail { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ua-tiroir .ua-ligne-nom a { display: block; overflow: hidden; text-overflow: ellipsis; }
.ua-tiroir .ua-ligne-detail { margin-top: 2px; }
.ua-tiroir .ua-ligne-retirer { margin-top: 3px; }
.ua-tiroir .ua-ligne-prix { align-self: start; white-space: nowrap; }
.ua-tiroir-ajout { margin-bottom: 12px; }
/* La barre de remise, plus fine. */
.ua-paliers { margin-top: 4px; padding: 9px 12px 7px; }
.ua-paliers-texte { margin: 0 0 9px; font-size: 13px; line-height: 1.35; }
.ua-paliers-barre { height: 6px; margin: 0 10px; }
.ua-paliers-bornes { height: 31px; margin: -13px 10px 0; }
.ua-paliers-borne { width: 54px; margin-left: -27px; }
.ua-paliers-borne i { width: 20px; height: 20px; border-width: 1px; }
.ua-paliers-borne i .ua-icone { width: 11px; height: 11px; }
.ua-paliers-borne b { margin-top: 2px; font-size: 11px; }
.ua-paliers-borne span { display: none; }
.ua-paliers-borne.ua-bout { margin-left: -44px; }
.ua-offre { margin-top: 10px; padding: 8px 10px; }
/* Le bas du panier. */
.ua-tiroir-pied { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.ua-tiroir-total { margin: 0 0 10px; font-size: 15px; }
.ua-tiroir-total strong { font-size: 19px; }
.ua-tiroir .ua-express-bouton, .ua-express-fiche .ua-express-bouton { min-height: 44px; }
.ua-tiroir .ua-ou { margin: 8px 0; font-size: 12px; }
.ua-tiroir .ua-tiroir-commander { height: 48px; font-size: 13px; }
.ua-tiroir .ua-tiroir-commander .ua-icone { width: 18px; height: 18px; }
.ua-tiroir-gages { margin-top: 8px; font-size: 12px; }
/* L'offre du livre, dans le tiroir : deux lignes en tout (le titre coupé au besoin, puis « Le livre » et ses prix). */
.ua-tiroir .ua-offre-texte strong, .ua-tiroir .ua-offre-texte > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ua-tiroir .ua-offre { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; }
.ua-tiroir .ua-offre-image { width: 40px; height: 40px; }
.ua-tiroir .ua-offre-ajouter { min-height: 36px; padding: 0 12px 0 8px; }
