/* Contrôles */
.controls {
	padding: 1em;
	background: #f8f9fa;
	border-top: 1px solid #e0e0e0;
	border-bottom: 1px solid #e0e0e0;
}
.input-group {
	display: flex;
	gap: 15px;
	align-items: center;
}
.input-field {
	flex: 1;
	position: relative;
}
label {
	display: block;
	font-weight: 600;
	color: #495057;
}
input[type="text"], input[type="number"] {
	width: calc(100% - 24px);
	padding-left: 0.5em;
	padding-right: 0.5em;
	height: 2.2em;
	border: 1px solid #1F6EBB;
	border-radius: 8px;
	font-size: 14px;
	transition: border-color 0.3s;
}
input[type="text"]:focus, input[type="number"]:focus {
	outline: none;
	border-color: #667eea;
}
input[type="number"] {
	text-align: center;
}
.autocomplete-items {
	display: none;
	position: absolute;
	border: 1px solid #dee2e6;
	border-top: none;
	z-index: 9999;
	top: 100%;
	left: 0;
	right: 0;
	max-height: 200px;
	overflow-y: auto;
	background: white;
	border-radius: 0 0 8px 8px;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.autocomplete-items.active {
	display: block;
}
.autocomplete-items div {
	padding: 12px;
	cursor: pointer;
	border-bottom: 1px solid #f1f1f1;
}
.autocomplete-items div:hover {
	background-color: #667eea;
	color: white;
}





.share-btn {
	background: transparent;
	color: white;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-size: 16px;
	height: 2.2em;
}
.share-btn:hover {
	background: #5568d3;
}
.share-btn:active {
	background: #5568d3;
}


button.primary {
	padding-right: 1em;
	padding-left: 0.5em;
	background: #1F6EBB;
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	height: 2.2em;
}
@media (max-width: 500px) { button.primary { padding-right: 0.5em; } }


button.primary:hover {
	background: #14538f;
}
button img {
	height: 1.25em;
	vertical-align: bottom;
}
.settings-panel {
	display: none;
	margin-top: 20px;
	padding: 12px;
	background: white;
	border-radius: 8px;
	border: 2px solid #dee2e6;
}
.settings-title {
	margin: 0 0 12px 0;
	color: #495057;
}
.settings-panel.active {
	display: block;
}
.settings-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
}
.setting-item {
	display: flex;
	flex-direction: column;
}
.setting-item label {
	font-size: 13px;
	margin-bottom: 5px;
}
.map-container {
	position: relative;
	flex: 1;
	background: #F8F9FA;
}
#map {
	width: 100%;
	height: 80vh;
}
.legend {
	position: absolute;
	top: 20px;
	right: 20px;
	background: white;
	padding: 0.5em;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.2);
	z-index: 1000;
	min-width: 200px;
	display: flex;
	flex-wrap: wrap;
	flex-direction: column;
}
.legend h4 {
	font-size: 14px;
	color: #667eea;
	padding: 4px;
	margin: 0;
}
.legend-item {
	display: flex;
	align-items: center;
	padding: 4px;
}
@media (max-width: 500px) {
	.legend {
		position: relative;
		flex-direction: row;
		top: auto;
		right: auto;
		width: auto;
		padding: 4px;

	}
	.legend h4 { display: none; }
}
.legend-color {
	width: 30px;
	height: 20px;
	margin-right: 10px;
	border-radius: 3px;
	border: 1px solid #dee2e6;
}

.legend-color-walk { background-color: #4CAF50; opacity: 0.5; }
.legend-color-bike { background-color: #FFEB3B; opacity: 0.5; }
.legend-color-ebike { background-color: #FF9800; opacity: 0.5; }

.share-section {
	display: none;
	margin-top: 15px;
}
.share-section.active {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.share-label {
	font-weight: 600;
	color: #495057;
	white-space: nowrap;
}
.share-url-container {
	flex: 1;
	display: flex;
	gap: 10px;
	min-width: 300px;
}
.share-url {
	flex: 1;
	font-family: monospace;
}
.legend-text {
	font-size: 12px;
	color: #495057;
}
.info {
	margin: 1em 0.5em;
	padding: 0.5em;
	background: #e7f3ff;
	border-left: 4px solid #667eea;
	border-radius: 5px;
}
.error {
	background: #ffe7e7;
	border-left-color: #dc3545;
	color: #721c24;
}
.success {
	background: #d4edda;
	border-left-color: #28a745;
	color: #155724;
}
.secondary-btn{
	background: transparent;
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	height: 2.2em;
}
.secondary-btn:hover,.secondary-btn:focus {
	background: #1F6EBB;
}

#loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(128, 128, 128, 0.7); /* Gris semi-transparent */
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

.loading-content {
	background-color: white;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
	text-align: center;
}

.loading-content p {
	margin: 10px 0 0 0;
	font-size: 16px;
	color: #333;
}

.spinner {
	border: 4px solid #f3f3f3;
	border-top: 4px solid #3498db;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
	margin: 0 auto;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}


.methodology {
	padding: 0 1em;
	margin: 0;
	font-size: 90%;
}
.methodology h2 { font-size: 1.2em; }
.methodology h3 { font-size: 1em; }
.methodology a { color:#000; }

@media print {
  .leaflet-control-zoom, #message { display: none !important; }
	#addressLabel { display: inline !important; }
	.map-container { background: none !important; }
	h1 { font-size: 1.5em !important; }
	.controls { border: 1px solid #e0e0e0; }
	.legend-color, .leaflet-marker-icon {
		-webkit-print-color-adjust: exact !important; /* Chrome, Edge, etc. */
		print-color-adjust: exact !important;        /* Spécification CSS */
	}

}
#map.print {
	height: 20.5cm !important;
	overflow: hidden !important;
	width: 19cm !important;
	page-break-after: always;
}