/* Convertisseur de monnaies d'Ancien Régime */
/* monnaie.css — Styles du convertisseur de monnaies d'Ancien Régime */
/* HGGF, 2025 */

/* 🎨 Styles de base */
label,
select,
input {
	margin-top: 10px;
	display: block;
	width: 100%;
}

/* 🎁 Conteneur principal */
.sectmoar {
	margin-bottom: 20px;
	background: #fff;
	padding: 15px;
	border-radius: 10px;
	box-shadow: 0 0 5px #ccc;
}

/* 🟦 Boutons */
button {
	margin-top: 15px;
	padding: 10px 20px;
	background-color: #0056b3;
	color: white;
	border: none;
	border-radius: 6px;
	cursor: pointer;
}
button:hover {
	background-color: #6594f0;
}

/* 🧰 Styles communs aux box */
.amount-box,
.field-box {
	padding: 0.75em 1em;
	background-color: #f9f9f9;
	border: 1px solid #ccc;
	border-left: 4px solid #3498db;
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	margin-bottom: 10px;
	font-size: 0.95rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 70px;
}

/* 🎯 Labels dans les box */
.amount-box label,
.field-box label {
	font-weight: bold;
	margin-bottom: 0.4em;
	padding: 0.3em 0.5em;
	background-color: #eef4fb;
	border-radius: 4px;
	display: inline-block;
	width: fit-content;
}

/* 🧮 Champ de montant légèrement réduit */
.amount-box input[type="number"] {
	width: 95%;
	max-width: 250px;
	padding: 0.5em 0.6em;
	background-color: #fff;
	border: 1px solid #ccc;
	border-left: 4px solid #3498db;
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	font-size: 0.95em;
}

/* 🎛️ Champs standards */
.field-box input[type="number"],
.field-box select {
	width: 95%;
	padding: 0.4em 0.6em;
	font-size: 1em;
	height: 2.2em;
	border: 1px solid #ccc;
	border-radius: 4px;
}

/* 📅 Curseur année */
.range-label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.4em;
	font-weight: bold;
}
#year {
	width: 90%;
	margin-top: 0.3em;
}

/* 🎚️ Style harmonisé du curseur "année" */
input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	width: 90%;
	height: 6px;
	background: #ccc;
	border-radius: 5px;
	outline: none;
	transition: background 0.3s;
	margin-top: 0.5em;
}

input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 14px;
	height: 14px;
	background: #3498db;
	border-radius: 50%;
	cursor: pointer;
	border: 2px solid #fff;
	box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
	transition: background 0.3s;
}

input[type="range"]::-moz-range-thumb {
	width: 14px;
	height: 14px;
	background: #3498db;
	border: 2px solid #fff;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

/* 📊 Résultat */
#result {
	font-size: 1.1em;
	color: #1a2a3a;
	background-color: #fff8e1;
	border-left: 4px solid #f39c12;
	border-radius: 6px;
	padding: 0.6em 1em;
	overflow-y: auto;
	box-shadow: 0 2px 5px rgba(243, 156, 18, 0.3);
	margin-bottom: 15px;
}

/* 🏛️ Bloc d'information historique */
.historical-info {
	margin-top: 20px;
	padding: 0.8em;
	background-color: #f0f8ff;
	border-left: 4px solid #3498db;
	border-radius: 6px;
	font-size: 0.95em;
	color: #333;
	display: block;
}

.period-image {
	max-width: 80px;
	border-radius: 6px;
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
	margin-right: 10px;
}

/* Suppression ligne vide si pas de résultat */
.result:empty,
.historical-info:empty {
	display: none;
}

/* 📖 Grille du formulaire */
.form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
	align-items: end;
}

/* 🧮 Groupe de boutons */
.button-group {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 15px;
}

/* 🧾 Bloc explicatif */
#info,
.explanation {
	max-width: 100%;
	width: 100%;
	margin-top: 1.5em;
	padding: 1em;
	background-color: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-sizing: border-box;
	overflow: hidden;
	opacity: 0;
	max-height: 0;
	transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
}

#info.show,
.explanation.show {
	opacity: 1;
	max-height: 1000px;
}

/* 📚 Style des listes d'infos */
#info h3 {
	margin-top: 1.5em;
	color: #2c3e50;
	font-size: 1.3em;
	border-bottom: 2px solid #ccc;
	padding-bottom: 5px;
}
#info ul {
	margin-top: 1em;
	padding-left: 1.2em;
	list-style-type: disc;
	line-height: 1.6;
}
#info ul li {
	margin-bottom: 0.6em;
	color: #333;
}
#info a {
	color: #2c7cbf;
	text-decoration: none;
}
#info a:hover {
	text-decoration: underline;
}

/* 🌟 Message première visite */
.first-visit {
	background-color: #eef9ff;
	border-left: 4px solid #3498db;
	padding: 10px;
	margin-bottom: 10px;
	font-style: italic;
	display: none;
}

/* 📌 Source du convertisseur */
.source-note {
	font-size: 0.9em;
	font-style: italic;
	color: #666;
	margin-top: 1em;
}
