/**
 * Styles pour la page "Où trouver nos produits"
 */

.pharmacie-finder-page {
	padding-bottom: 0;
}

/* Message d'invitation */
.pharmacie-empty-message {
	min-height: 400px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8f9fa;
}

.pharmacie-finder-header {
	background: #fff;
	border-bottom: 1px solid #e0e0e0;
}

.pharmacie-finder-header .entry-title {
	font-size: 2rem;
	font-weight: 600;
	color: var(--santis-primary, #2d5016);
}

.pharmacie-search-bar {
	border-bottom: 2px solid var(--santis-primary, #2d5016);
}

.pharmacie-search-bar .form-label {
	font-weight: 500;
	color: #333;
	margin-bottom: 0.5rem;
}

#search_ville_container {
	transition: opacity 0.3s ease;
}

/* Texte OU */
.pharmacie-ou-text {
	color: #666;
	font-weight: 500;
	font-size: 0.9rem;
	padding: 0 0.5rem;
	display: inline-block;
	vertical-align: middle;
}

/* Bouton géolocalisation */
#btn_geolocaliser {
	background-color: var(--santis-primary);
	border-color: var(--santis-primary);
	color: #fff;
	transition: all 0.3s ease;
}

#btn_geolocaliser:hover {
	background-color: var(--santis-primary);
	border-color: var(--santis-primary);
	color: #fff;
	opacity: 0.9;
	transform: translateY(-1px);
}

#btn_geolocaliser:active {
	transform: translateY(0);
}

#btn_geolocaliser:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.pharmacie-finder-content {
	height: calc(100vh - 300px);
	min-height: 600px;
	max-height: calc(100vh - 300px);
	display: flex;
	flex-direction: column;
}

.pharmacie-finder-content > .row {
	flex: 1;
	display: flex;
	height: 100%;
}

.pharmacie-list-container {
	height: 100%;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-right: 1px solid #e0e0e0;
	overflow: hidden;
}

.pharmacie-list-wrapper {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

.pharmacie-list-header {
	flex-shrink: 0;
	padding: 1rem;
	background: #f8f9fa;
	border-bottom: 1px solid #e0e0e0;
	z-index: 10;
}

.pharmacie-list {
	flex: 1 1 auto;
	overflow-y: auto !important;
	overflow-x: hidden !important;
	padding: 0;
	min-height: 0;
	max-height: 100%;
	position: relative;
}

.pharmacie-item {
	padding: 1rem;
	border-bottom: 1px solid #f0f0f0;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.pharmacie-item:hover {
	background-color: #f8f9fa;
}

.pharmacie-item.active {
	background-color: #e8f5e9;
	border-left: 3px solid var(--santis-primary, #2d5016);
}

.pharmacie-item-content {
	padding-left: 0.5rem;
}

.pharmacie-item-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--santis-primary, #2d5016);
	margin-bottom: 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

/* Bulle numérotée avant le nom */
.pharmacie-number-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background-color: var(--santis-primary, #2d5016);
	color: #fff;
	border-radius: 50%;
	font-size: 0.875rem;
	font-weight: 600;
	flex-shrink: 0;
}

.pharmacie-item-address {
	color: #666;
	font-size: 0.9rem;
	line-height: 1.4;
}

.pharmacie-item-city {
	color: #888;
	font-size: 0.85rem;
	margin-bottom: 0.5rem;
}

.pharmacie-item-distance {
	color: var(--santis-primary);
	font-size: 0.9rem;
	font-weight: 600;
}

.pharmacie-map-container {
	height: 100%;
	position: relative;
	display: flex;
	flex-direction: column;
}

.pharmacie-map {
	width: 100%;
	height: 100%;
	min-height: 600px;
	flex: 1;
}

/* Popup personnalisée */
.pharmacie-popup {
	min-width: 200px;
}

.pharmacie-popup h4 {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--santis-primary, #2d5016);
	margin-bottom: 0.75rem;
}

.pharmacie-popup p {
	font-size: 0.9rem;
	color: #666;
	line-height: 1.5;
}

/* Marqueur utilisateur */
.user-marker {
	background: transparent;
	border: none;
}

.user-marker-icon {
	width: 20px;
	height: 20px;
	background: #2196F3;
	border: 3px solid #fff;
	border-radius: 50%;
	box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Badge (conservé pour compatibilité mais non utilisé dans la liste) */
.badge {
	font-size: 0.75rem;
	padding: 0.25rem 0.5rem;
}

/* État vide */
.pharmacie-list .text-center {
	padding: 3rem 2rem !important;
}

.pharmacie-list .text-muted {
	font-size: 1rem;
	line-height: 1.6;
}

/* Responsive */
@media (max-width: 991.98px) {
	.pharmacie-finder-content {
		height: auto;
		min-height: auto;
	}

	.pharmacie-finder-content > .row {
		flex-direction: column;
	}

	.pharmacie-list-container {
		height: 400px;
		border-right: none;
		border-bottom: 1px solid #e0e0e0;
	}

	.pharmacie-map-container {
		height: 500px;
	}
	
	/* Ajuster la hauteur de la liste sur mobile */
	.pharmacie-list {
		height: calc(400px - 60px) !important;
		max-height: calc(400px - 60px) !important;
	}
}

/* Scrollbar personnalisée pour la liste - FORCER l'affichage */
.pharmacie-list {
	scrollbar-width: thin;
	scrollbar-color: #888 #f1f1f1;
	-webkit-overflow-scrolling: touch; /* Smooth scrolling sur iOS */
}

.pharmacie-list::-webkit-scrollbar {
	width: 12px !important;
	display: block !important;
}

.pharmacie-list::-webkit-scrollbar-track {
	background: #f1f1f1 !important;
	border-left: 1px solid #e0e0e0;
}

.pharmacie-list::-webkit-scrollbar-thumb {
	background: #888 !important;
	border-radius: 6px;
	border: 2px solid #f1f1f1;
}

.pharmacie-list::-webkit-scrollbar-thumb:hover {
	background: #555 !important;
}

/* S'assurer que la scrollbar est toujours visible quand il y a du contenu */
.pharmacie-list:not(:empty) {
	overflow-y: scroll !important;
}

/* Styles Leaflet personnalisés */
.leaflet-popup-content-wrapper {
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.leaflet-popup-content {
	margin: 15px;
}

.leaflet-popup-tip {
	background: #fff;
}
