/**
 * Styles pour l'outil Octroi de Mer
 * 
 * Utilise UIKit comme framework CSS principal
 * 
 * @package lemahorais
 * @subpackage octroi-mer
 */

/* Conteneur principal */
.om-tool-container {
	max-width: 1200px;
	margin: 0 auto;
}

/* Section de recherche */
.om-search-section {
	background-color: #f8f9fa;
	padding: 2rem;
	border-radius: 8px;
}

.om-search-input {
	font-size: 1rem;
	padding: 12px 12px 12px 40px !important;
	border: 2px solid #e5e5e5;
	transition: border-color 0.3s ease;
}

.om-search-input:focus {
	border-color: var(--red-700);
	box-shadow: 0 0 0 3px rgba(30, 135, 240, 0.1);
}

/* Dropdown d'autocomplétion */
.om-autocomplete-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background-color: white;
	border: 1px solid #e5e5e5;
	border-top: none;
	border-radius: 0 0 8px 8px;
	max-height: 400px;
	overflow-y: auto;
	z-index: 1000;
	margin-top: -2px;
}

.om-autocomplete-item {
	color: #333;
	text-decoration: none;
	transition: background-color 0.2s ease;
	display: block;
}

.om-autocomplete-item:hover {
	background-color: #f0f0f0;
	color: var(--red-700);
}

.om-autocomplete-item strong {
	color: var(--red-700);
	font-weight: 600;
}

/* Section des résultats */
.om-results-section {
	margin-top: 2rem;
}

.om-results-section h3 {
	margin-top: 0;
	color: #333;
	font-size: 1.5rem;
	font-weight: 600;
}

/* Tableau des résultats */
.om-results-section table {
	margin-top: 1rem;
}

.om-results-section table thead {
	background-color: #f8f9fa;
	font-weight: 600;
	color: #333;
}

.om-results-section table tbody tr {
	transition: background-color 0.2s ease;
}

.om-results-section table tbody tr:hover {
	background-color: #f0f7ff;
}

.om-results-section table td {
	vertical-align: middle;
	padding: 12px;
}

/* Section de la calculatrice */
.om-calculator-section {
	margin-top: 2rem;
}

.om-calculator-section h3 {
	margin-top: 0;
	color: #333;
	font-size: 1.5rem;
	font-weight: 600;
}

.om-calculator-section .uk-card {
	border-radius: 8px;
	border: 1px solid #e5e5e5;
}

.om-calculator-section .uk-card-body {
	padding: 2rem;
}

.om-calculator-section input {
	padding: 12px;
	border: 2px solid #e5e5e5;
	border-radius: 4px;
	font-size: 1rem;
	transition: border-color 0.3s ease;
}

.om-calculator-section input:focus {
	border-color: var(--red-700);
	box-shadow: 0 0 0 3px rgba(30, 135, 240, 0.1);
}

.om-calculator-section input[readonly] {
	background-color: #f8f9fa;
	color: #666;
	cursor: not-allowed;
}

/* Résultats du calcul */
#om-calc-results {
	animation: slideIn 0.3s ease;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.om-calculator-section .uk-card-body {
	background-color: #f8f9fa;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
}

.om-calculator-section .uk-background-primary {
	/* background-color: #1e87f0 !important; */
}

.om-calculator-section .uk-background-muted {
	/* background-color: #f0f0f0 !important; */
}

.om-calculator-section .uk-text-large {
	font-size: 1.5rem;
}

.om-calculator-section .uk-text-bold {
	font-weight: 700;
	color: var(--red-700);
}

.om-calculator-section .uk-background-primary .uk-text-bold {
	color: var(--red-700);
}

/* Spinner de chargement */
#om-loading {
	text-align: center;
	padding: 2rem;
	color: #666;
}

/* Source des données */
.om-source-info {
	background-color: #f8f9fa;
	padding: 1rem;
	border-radius: 4px;
	font-size: 0.875rem;
}

.om-source-info p {
	margin: 0;
}

/* Section Informations */
.info-section {
    margin-top: 40px;
}

.info-section > h2 {
    /* border-bottom: 4px solid var(--red-700); */
    /* color: #333; */
    padding-bottom: 10px;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
	.om-search-section {
		padding: 1.5rem;
	}

	.om-calculator-section .uk-grid-small {
		gap: 1rem;
	}

	.om-calculator-section input {
		width: 100%;
	}

	.om-results-section table {
		font-size: 0.875rem;
	}

	.om-results-section table td {
		padding: 8px;
	}

	.uk-button {
		width: 100%;
		margin-bottom: 0.5rem;
	}

	.om-autocomplete-dropdown {
		max-height: 300px;
	}
}

/* Accessibilité */
.uk-form-label {
	font-weight: 600;
	color: #333;
	margin-bottom: 0.5rem;
	display: block;
}

.uk-text-muted {
	color: #999;
}

/* Animation de transition */
.om-results-section,
.om-calculator-section {
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Impression */
@media print {
	.om-search-section,
	.om-calculator-section {
		page-break-inside: avoid;
	}

	.uk-button {
		display: none;
	}
}
