/* Litrimarché — sélecteur de magasin (drawer latéral droit).
   Structure : docs/maquette-selecteur-magasin.html. Les classes du kit
   (utilitaires, boutons, modale) sont recréées ici d'après les maquettes,
   scopées sous .modal__store : quand le CSS compilé du kit sera récupéré,
   ce bloc pourra être retiré sans toucher au markup.
   Les !important servent à passer devant le CSS du thème (Astra),
   chargé avec plus de poids sur les boutons, inputs et titres. */

/* Déclencheur (header) : bouton jaune, deux variantes.
   Avec magasin : bâtiment + « Mon magasin » / nom en gras + chevron.
   Sans magasin : pastille bleue avec marker jaune + « Trouver mon magasin… ». */

.lm-store-trigger {
	display: inline-flex !important;
	align-items: center !important;
	gap: 10px !important;
	cursor: pointer !important;
	background: var(--lm-yellow) !important;
	border: 0 !important;
	border-radius: 10px !important;
	color: var(--lm-blue) !important;
	font-family: inherit !important;
	padding: 8px 16px !important;
	text-align: left !important;
	transition: background var(--lm-transition) !important;
}

.lm-store-trigger:hover,
.lm-store-trigger:focus {
	background: var(--lm-yellow-press) !important;
	color: var(--lm-blue) !important;
}

.lm-store-trigger svg {
	flex: none !important;
	fill: currentColor !important;
}

.lm-store-trigger__label {
	display: block !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
}

.lm-store-trigger__name {
	display: block !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.02em !important;
	line-height: 1.2 !important;
}

.lm-store-trigger__pin {
	flex: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 28px !important;
	height: 28px !important;
	border-radius: 50% !important;
	background: var(--lm-blue) !important;
	color: var(--lm-yellow) !important;
}

.lm-current-store a {
	text-decoration: underline;
	cursor: pointer;
}

body.lm-modal-open {
	overflow: hidden !important;
}

/* ---------- Drawer ---------- */

.modal__store {
	position: fixed !important;
	inset: 0 !important;
	z-index: 99999 !important;
	display: none !important;
	font-size: 16px !important;
	line-height: 1.45 !important;
}

.modal__store.is-open {
	display: block !important;
}

.modal__store .modal__overlay {
	position: absolute !important;
	inset: 0 !important;
	background: rgba(7, 30, 82, 0.55) !important;
}

.modal__store .modal__container {
	position: relative !important;
	width: min(430px, 100vw) !important;
	height: 100% !important;
	overflow-y: auto !important;
	background: #fff !important;
	padding: 48px 24px 32px !important;
	color: var(--lm-blue) !important;
	animation: lm-drawer-in 0.25s ease;
}

/* Ouverture automatique : même fenêtre, présentée en popup centrée plutôt
   qu'en drawer collé à droite. Le drawer reste la forme des ouvertures
   manuelles ; seule la mise en scène change, jamais le contenu. */

.modal__store.is-auto .modal__overlay {
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	padding: 20px !important;
}

.modal__store.is-auto .modal__container {
	width: min(460px, 100%) !important;
	height: auto !important;
	max-height: calc(100vh - 40px) !important;
	padding: 44px 26px 30px !important;
	border-radius: 18px !important;
	animation: lm-popup-in 0.22s ease !important;
}

@keyframes lm-popup-in {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes lm-drawer-in {
	from {
		transform: translateX(48px);
		opacity: 0;
	}
	to {
		transform: none;
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.modal__store .modal__container {
		animation: none !important;
	}
}

.modal__store :focus-visible {
	outline: 3px solid rgba(12, 49, 131, 0.4) !important;
	outline-offset: 2px !important;
}

.modal__store .modal__close {
	position: absolute !important;
	top: 14px !important;
	right: 14px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 36px !important;
	height: 36px !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	color: var(--lm-blue) !important;
	cursor: pointer !important;
}

.modal__store .modal__close:hover {
	color: var(--lm-blue-deep) !important;
}

/* ---------- Utilitaires du kit (scopés) ---------- */

.modal__store .d-flex {
	display: flex !important;
}
.modal__store .d-inline-flex {
	display: inline-flex !important;
}
.modal__store .d-inline-block {
	display: inline-block !important;
}
.modal__store .justify-end {
	justify-content: flex-end !important;
}
.modal__store .justify-center {
	justify-content: center !important;
}
.modal__store .align-start {
	align-items: flex-start !important;
}
.modal__store .align-center {
	align-items: center !important;
}
.modal__store .flex-none {
	flex: none !important;
}
.modal__store .w-full {
	width: 100% !important;
}

.modal__store .mt-4 {
	margin-top: 4px !important;
}
.modal__store .mt-12 {
	margin-top: 12px !important;
}
.modal__store .mt-20 {
	margin-top: 20px !important;
}
.modal__store .mt-24 {
	margin-top: 24px !important;
}
.modal__store .mt-32 {
	margin-top: 32px !important;
}
.modal__store .mb-20 {
	margin-bottom: 20px !important;
}

.modal__store .text-14 {
	font-size: 14px !important;
}
.modal__store .text-16 {
	font-size: 16px !important;
}
.modal__store .text-20 {
	font-size: 20px !important;
}
.modal__store .text-24 {
	font-size: 24px !important;
}

.modal__store .font-normal {
	font-weight: 400 !important;
}
.modal__store .font-medium {
	font-weight: 500 !important;
}
.modal__store .font-semibold {
	font-weight: 600 !important;
}
.modal__store .font-bold {
	font-weight: 700 !important;
}

.modal__store .text-uppercase {
	text-transform: uppercase !important;
	letter-spacing: 0.02em !important;
}
.modal__store .radius-30 {
	border-radius: 30px !important;
}
.modal__store .rounded {
	border-radius: 50% !important;
}

.modal__store .c-green {
	color: var(--lm-success) !important;
}
.modal__store .c-red {
	color: var(--lm-danger) !important;
}
.modal__store .c-yellow {
	color: var(--lm-yellow) !important;
}

/* ---------- Typo & contenus ---------- */

.modal__store .store-title {
	margin: 0 !important;
	color: var(--lm-blue) !important;
	line-height: 1.25 !important;
}

.modal__store address {
	font-style: normal !important;
	margin: 0 !important;
}

.modal__store .text-editor p {
	margin: 0 0 10px !important;
}

.modal__store .text-editor p:last-child {
	margin-bottom: 0 !important;
}

/* Les paths du sprite du kit n'ont pas d'attribut fill : on les relie à
   la couleur du texte (marker jaune via .c-yellow, le reste en bleu). */
.modal__store svg {
	fill: currentColor !important;
}

/* Le sprite du kit est monochrome : le carré jaune du logo est posé
   derrière l'icône bâtiment, décalé comme sur les maquettes. */
.modal__store .store-icon {
	position: relative !important;
	padding-top: 10px !important;
}

.modal__store .store-icon::before {
	content: '' !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 48px !important;
	height: 48px !important;
	background: var(--lm-yellow) !important;
}

.modal__store .store-icon svg {
	position: relative !important;
	display: block !important;
	color: var(--lm-blue) !important;
}

/* Lien vers la fiche magasin (carte « Mon magasin » et résultats) */

/* Bouton bleu plein : le lien souligné se confondait avec le texte de la
   fiche, et le contour seul ne suffisait pas à le faire ressortir. Bleu et
   non jaune : le jaune est réservé à « Valider ce magasin », l'action
   principale — deux boutons jaunes se disputeraient le regard. */

.modal__store .store-link {
	display: inline-block !important;
	background: var(--lm-blue) !important;
	border: 2px solid var(--lm-blue) !important;
	border-radius: 30px !important;
	padding: 9px 18px !important;
	color: #fff !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.02em !important;
	text-decoration: none !important;
	cursor: pointer !important;
	transition: background var(--lm-transition), color var(--lm-transition) !important;
}

/* Survol : texte jaune sur le bleu, comme « Me géolocaliser » (button-p2). */
.modal__store .store-link:hover {
	background: var(--lm-blue) !important;
	color: var(--lm-yellow) !important;
}

/* ---------- Carte « Mon magasin » ---------- */

.modal__store .store-card {
	border: 1px solid var(--lm-line) !important;
	border-radius: var(--lm-radius) !important;
	padding: 20px !important;
}

.modal__store .store-card .store-info {
	color: var(--lm-success) !important;
}

/* ---------- Recherche CP / ville ---------- */

.modal__store .store-check {
	position: relative !important;
}

.modal__store .store-check input {
	border: 1px solid var(--lm-line-strong) !important;
	background: #fff !important;
	color: var(--lm-ink) !important;
	font-size: 15px !important;
	line-height: 1.4 !important;
	padding: 13px 56px 13px 18px !important;
}

.modal__store .store-check input::placeholder {
	color: var(--lm-muted) !important;
}

.modal__store .store-check input:focus {
	border-color: var(--lm-blue) !important;
	box-shadow: 0 0 0 3px rgba(12, 49, 131, 0.15) !important;
	outline: none !important;
}

.modal__store .store-check button {
	position: absolute !important;
	top: 50% !important;
	right: 6px !important;
	transform: translateY(-50%) !important;
	width: 38px !important;
	height: 38px !important;
	padding: 0 !important;
	border: 0 !important;
	background: var(--lm-yellow) !important;
	color: var(--lm-blue) !important;
	cursor: pointer !important;
	transition: background var(--lm-transition) !important;
}

.modal__store .store-check button:hover {
	background: var(--lm-yellow-press) !important;
	color: var(--lm-blue) !important;
}

/* ---------- Boutons du kit ---------- */

.modal__store .button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 10px !important;
	border: 0 !important;
	cursor: pointer !important;
	text-decoration: none !important;
	font-family: inherit !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	padding: 13px 26px !important;
	transition: background var(--lm-transition), color var(--lm-transition) !important;
}

/* Primaire (« Valider ce magasin », « Exclusivités web ») :
   jaune / bleu, inversé au survol. */
.modal__store .button-p1 {
	background: var(--lm-yellow) !important;
	color: var(--lm-blue) !important;
	font-size: 14px !important;
}

.modal__store .button-p1:hover {
	background: var(--lm-blue) !important;
	color: var(--lm-yellow) !important;
}

/* Secondaire (« Me géolocaliser ») : bleu / blanc, texte jaune au survol
   (le marqueur reste jaune via .c-yellow). */
.modal__store .button-p2 {
	background: var(--lm-blue) !important;
	color: #fff !important;
	font-size: 16px !important;
}

.modal__store .button-p2:hover {
	background: var(--lm-blue) !important;
	color: var(--lm-yellow) !important;
}

/* ---------- Liste des magasins ---------- */

.modal__store .store-item + .store-item {
	border-top: 1px solid var(--lm-line) !important;
	margin-top: 20px !important;
	padding-top: 20px !important;
}

.modal__store .store-item .store-info {
	color: var(--lm-muted) !important;
}

.modal__store .store-item.is-current .store-title::after {
	content: ' ✓';
}

/* Premier résultat d'une géolocalisation : le magasin le plus proche. Mise en
   avant légère — filet jaune, pastille, titre d'un cran — pour qu'il se
   détache sans écraser les deux autres, qui restent des choix valables. */

.modal__store .store-item.is-nearest {
	margin-left: -14px !important;
	padding-left: 11px !important;
	border-left: 3px solid var(--lm-yellow) !important;
}

.modal__store .store-badge {
	display: inline-block !important;
	margin-bottom: 8px !important;
	padding: 3px 10px !important;
	border-radius: 999px !important;
	background: var(--lm-yellow) !important;
	color: var(--lm-blue) !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	text-transform: uppercase !important;
}

.modal__store .store-item.is-nearest .store-title {
	font-size: 18px !important;
	font-weight: 700 !important;
}
