/* FlexEv by emoteur (v0.3.0) */
:root { --fx-green: #18d551; --fx-green-dark: #10b443; --fx-navy: #1e3a54; }

/* Bouton dans la rangée d'actions */
.gallery-buttons .fx-action a.button.fx-open,
.gallery-buttons .fx-action a.button.fx-open:visited {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	background: var(--fx-green) !important; color: var(--fx-navy) !important;
	border-color: var(--fx-green) !important; font-weight: 700;
	position: relative; animation: fx-pulse 2s ease-out 1s 4;
	transition: background-color .2s, transform .2s;
}
.gallery-buttons .fx-action a.button.fx-open:hover,
.gallery-buttons .fx-action a.button.fx-open:focus-visible {
	background: var(--fx-green-dark) !important; border-color: var(--fx-green-dark) !important;
	color: var(--fx-navy) !important; transform: translateY(-1px); animation: none;
}
.gallery-buttons .fx-action .fx-bolt-svg { flex: none; color: var(--fx-navy); animation: fx-flash 2s ease-in-out 1s 4; }
@keyframes fx-pulse {
	0% { box-shadow: 0 0 0 0 rgba(24, 213, 81, .65); }
	70% { box-shadow: 0 0 0 14px rgba(24, 213, 81, 0); }
	100% { box-shadow: 0 0 0 0 rgba(24, 213, 81, 0); }
}
@keyframes fx-flash { 0%, 60%, 100% { opacity: 1; } 70%, 90% { opacity: .35; } 80% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.gallery-buttons .fx-action a.button.fx-open, .gallery-buttons .fx-action .fx-bolt-svg { animation: none; }
}

/* Fenêtre */
html.fx-lock, html.fx-lock body { overflow: hidden; }
.fx-modal[hidden] { display: none !important; }
.fx-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.fx-backdrop { position: absolute; inset: 0; background: rgba(20, 43, 65, .65); }
.fx-dialog { position: relative; background: #fff; color: #232628; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 12px; padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,.3); font-size: 14px; line-height: 1.5; }
.fx-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 28px; line-height: 1; color: #888; cursor: pointer; padding: 4px 8px; }
.fx-close:hover { color: var(--fx-navy); }
.fx-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-right: 30px; }
.fx-bolt { width: 42px; height: 42px; border-radius: 50%; background: var(--fx-green); color: var(--fx-navy); display: flex; align-items: center; justify-content: center; flex: none; }
.fx-bolt svg { width: 22px; height: 22px; }
.fx-head h3 { margin: 0; font-size: 20px; line-height: 1.2; color: var(--fx-navy); }
.fx-sub { margin: 2px 0 0; color: #666; }
.fx-badge { display: inline-block; font-size: 11px; background: #fff4d6; color: #7a5a00; border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }

/* Réponse simple */
.fx-lead { margin: 0 0 10px; color: #444; }
.fx-kpis { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; }
.fx-kpi { border: 1px solid #e3e7ea; border-radius: 10px; padding: 12px 8px; text-align: center; }
.fx-kpi strong { display: block; font-size: 20px; line-height: 1.2; color: var(--fx-navy); white-space: nowrap; }
.fx-kpi span { display: block; font-size: 12px; color: #666; margin-top: 2px; }
.fx-kpi-main { background: var(--fx-green); border-color: var(--fx-green); }
.fx-kpi-main strong { font-size: 24px; }
.fx-kpi-main span { color: var(--fx-navy); }
.fx-compare { margin: 12px 0 0; padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.fx-good { background: rgba(24, 213, 81, .1); color: #0b6e2a; }
.fx-bad { background: #fdecea; color: #8a1c14; }
.fx-hint { margin: 8px 0 0; font-size: 13px; color: #7a5a00; background: #fff8e6; border-left: 3px solid #f0b400; padding: 6px 10px; }
.fx-err { color: #b3261e; }

/* Choix de borne */
.fx-field { display: block; margin: 0 0 14px; font-weight: normal; }
.fx-field > span { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; font-size: 13px; color: var(--fx-navy); }
.fx-field b { color: #0e9f3c; }
.fx-borne-field { margin-top: 18px; }
.fx-field select { width: 100%; height: 42px; border: 1px solid #cfd6db; border-radius: 8px; padding: 0 10px; background: #fff; font-size: 14px; }
.fx-field input[type=range] { width: 100%; accent-color: var(--fx-green); }
.fx-check { display: flex; align-items: center; gap: 8px; margin: -4px 0 14px; font-weight: normal; font-size: 13px; }

/* Sections dépliables (+) */
.fx-more { border-top: 1px solid #eceff1; }
.fx-more summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 0; font-weight: 600; color: var(--fx-navy); }
.fx-more summary::-webkit-details-marker { display: none; }
.fx-plus { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--fx-green); flex: none; }
.fx-plus::before, .fx-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; background: var(--fx-navy); transform: translate(-50%, -50%); transition: transform .2s; }
.fx-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.fx-more[open] .fx-plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.fx-more-body { padding: 0 0 12px; }
.fx-specs { margin: 0 0 10px; padding: 8px 12px; background: #f5f7f8; border-radius: 6px; color: #444; font-size: 13px; }
.fx-lines { margin: 0; padding: 0 0 0 18px; font-size: 13px; color: #444; }
.fx-lines li { margin-bottom: 6px; }
.fx-notes p { margin: 8px 0 0; font-size: 13px; background: #fff8e6; border-left: 3px solid #f0b400; padding: 6px 10px; }
.fx-foot { margin: 12px 0 0; font-size: 12px; color: #777; }
@media (max-width: 480px) {
	.fx-dialog { padding: 18px 14px; }
	.fx-kpis { grid-template-columns: 1fr 1fr; }
	.fx-kpi-main { grid-column: 1 / -1; }
	.fx-kpi strong { font-size: 18px; }
}
/* v0.3.0 */
.fx-modal select { opacity: 1 !important; visibility: visible !important; position: static !important; display: block !important; }
.fx-co2 { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.fx-leaf { margin-right: 6px; }
