/* =============================================================================
   CUSTOM CSS — Luxury Motors
   Styles complémentaires non couverts par Tailwind CDN
   ============================================================================= */

/* Header sticky — états */
#lm-header.is-scrolled {
	height: 64px !important;
	box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

#lm-header.is-scrolled #lm-header-bg {
	opacity: 1 !important;
}

/* Hamburger animé — état ouvert */
#lm-menu-toggle.is-open .lm-hamburger-line:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}
#lm-menu-toggle.is-open .lm-hamburger-line:nth-child(2) {
	opacity: 0;
	transform: scaleX(0);
}
#lm-menu-toggle.is-open .lm-hamburger-line:nth-child(3) {
	width: 24px;
	transform: translateY(-8px) rotate(-45deg);
}

/* Menu mobile — état ouvert */
#lm-mobile-menu.is-open {
	transform: translateX(0) !important;
}

/* Empêcher scroll body quand menu ouvert */
body.menu-open {
	overflow: hidden;
}

/* Aspect ratio véhicule card */
.lm-vehicle-image {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	overflow: hidden;
}
.lm-vehicle-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.lm-vehicle-card:hover .lm-vehicle-image img {
	transform: scale(1.04);
}

/* Card véhicule — lift au hover */
.lm-vehicle-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.lm-vehicle-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(218,180,85,0.3);
}

/* Galerie single véhicule */
#lm-gallery-main {
	transition: opacity 0.25s ease;
}
#lm-gallery-main.is-fading {
	opacity: 0;
}

.lm-gallery-thumb {
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.lm-gallery-thumb:hover,
.lm-gallery-thumb.active {
	opacity: 1;
	transform: scale(1.02);
}
.lm-gallery-thumb.active {
	box-shadow: 0 0 0 2px #DAB455;
}

/* Pagination stylée */
.nav-links {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}
.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	color: #B0B0B0;
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(255,255,255,0.08);
	transition: all 0.2s ease;
}
.page-numbers:hover {
	background: rgba(218,180,85,0.1);
	color: #DAB455;
	border-color: rgba(218,180,85,0.3);
}
.page-numbers.current {
	background: #DAB455;
	color: #0A0A0A;
	border-color: #DAB455;
}
.page-numbers.dots {
	background: transparent;
	border: none;
}

/* Lightbox overlay */
.lm-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(0,0,0,0.95);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}
.lm-lightbox.is-open {
	opacity: 1;
	pointer-events: all;
}
.lm-lightbox img {
	max-width: 90vw;
	max-height: 90vh;
	object-fit: contain;
}

/* Indicateur scroll */
@keyframes lm-scroll-drift {
	0%, 100% { transform: translateY(0); opacity: 0.6; }
	50%       { transform: translateY(6px); opacity: 0.3; }
}
.lm-scroll-indicator {
	animation: lm-scroll-drift 2.4s ease-in-out infinite;
	transition: opacity 0.4s ease;
}

/* Compteurs animés */
.lm-counter {
	display: inline-block;
}

/* Filtres showroom — ne pas étirer les selects en pleine largeur */
#lm-filter-form .lm-form-control {
	width: auto;
}

/* Formulaire de contact */
.lm-form-group {
	margin-bottom: 20px;
}
.lm-form-group label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #B0B0B0;
	margin-bottom: 8px;
}
.lm-form-control {
	width: 100%;
	background: rgba(255,255,255,0.04);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 4px;
	padding: 14px 16px;
	color: #F5F5F5;
	font-size: 15px;
	font-family: inherit;
	transition: border-color 0.2s ease, background 0.2s ease;
}
.lm-form-control:focus {
	outline: none;
	border-color: #DAB455;
	background: rgba(218,180,85,0.05);
}
.lm-form-control::placeholder {
	color: #666;
}
.lm-form-control.error {
	border-color: #e74c3c;
}
.lm-form-control option {
	background: #1a1a1a;
	color: #F5F5F5;
}

/* Message succès/erreur formulaire */
.lm-form-message {
	padding: 16px 20px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	margin-top: 16px;
	display: none;
}
.lm-form-message.success {
	background: rgba(218,180,85,0.1);
	border: 1px solid rgba(218,180,85,0.3);
	color: #E5C97A;
	display: block;
}
.lm-form-message.error {
	background: rgba(231,76,60,0.1);
	border: 1px solid rgba(231,76,60,0.3);
	color: #e74c3c;
	display: block;
}

/* =============================================================================
   V2.7 — MICRO-ANIMATIONS PREMIUM
   ============================================================================= */

/* Shimmer — bouton primaire */
.lm-btn-primary { position: relative; overflow: hidden; }
.lm-btn-primary::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.16) 50%, transparent 70%);
	transform: translateX(-110%);
	transition: transform 0.55s ease;
	pointer-events: none;
}
.lm-btn-primary:hover::after { transform: translateX(110%); }

/* Glow — focus inputs */
.lm-form-control:focus { box-shadow: 0 0 0 3px rgba(218,180,85,0.1); }


/* Parallaxe hero */
.lm-hero-bg { will-change: transform; }

/* =============================================================================
   V2.2 — BARRE D'ANCRES INTRA-FICHE
   ============================================================================= */
#lm-anchor-nav {
	display: none;
	position: sticky;
	top: var(--lm-header-h);
	z-index: 30;
	background: var(--lm-anthracite);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-top: 1px solid rgba(255,255,255,0.06);
	border-bottom: 1px solid rgba(255,255,255,0.06);
}
@media (min-width: 640px) {
	#lm-anchor-nav { display: block; }
}
.lm-anchor-link {
	display: inline-flex;
	align-items: center;
	padding: 14px 20px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--lm-gris-texte);
	white-space: nowrap;
	transition: color 0.2s ease;
}
.lm-anchor-link:hover { color: var(--lm-blanc-casse); }
.lm-anchor-link.is-active { color: var(--lm-dore); }
#lm-anchor-indicator {
	position: absolute;
	bottom: 0; left: 0;
	height: 2px;
	background: var(--lm-dore);
	transition: left 0.3s cubic-bezier(0.4,0,0.2,1), width 0.3s cubic-bezier(0.4,0,0.2,1);
	pointer-events: none;
}

/* =============================================================================
   V2.3 — SECTION PROVENANCE & HISTOIRE
   ============================================================================= */
.lm-provenance-item {
	padding: 20px;
	border-radius: 8px;
	background: rgba(255,255,255,0.02);
	border: 1px solid rgba(255,255,255,0.06);
}
.lm-provenance-item.is-highlight {
	background: rgba(218,180,85,0.05);
	border-color: rgba(218,180,85,0.2);
}
.lm-provenance-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--lm-gris-moyen);
	margin-bottom: 6px;
}
.lm-provenance-value {
	font-size: 15px;
	font-weight: 600;
	color: var(--lm-blanc);
}
.lm-historique-block {
	border-left: 2px solid var(--lm-dore);
	padding-left: 24px;
	margin-top: 32px;
}

/* =============================================================================
   V2.1 — GALERIE FULL-SCREEN AMÉLIORÉE
   ============================================================================= */
/* Compteur lightbox */
.lm-lightbox-counter {
	position: absolute;
	top: 24px;
	left: 50%;
	transform: translateX(-50%);
	font-family: var(--lm-font-display);
	font-size: 13px;
	letter-spacing: 0.2em;
	color: rgba(255,255,255,0.45);
	user-select: none;
	pointer-events: none;
	white-space: nowrap;
}
/* Boutons navigation */
.lm-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px; height: 48px;
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	z-index: 10;
	cursor: pointer;
}
.lm-lightbox-nav:hover {
	background: rgba(218,180,85,0.15);
	border-color: rgba(218,180,85,0.5);
	color: var(--lm-dore);
}
#lm-lightbox-prev { left: 20px; }
#lm-lightbox-next { right: 20px; }
/* Fondu image lightbox */
#lm-lightbox-img { transition: opacity 0.18s ease; }
#lm-lightbox-img.is-fading { opacity: 0; }
/* Strip de miniatures en bas */
#lm-lightbox-strip {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 6px;
	max-width: 88vw;
	overflow-x: auto;
	padding: 4px;
	scrollbar-width: none;
}
#lm-lightbox-strip::-webkit-scrollbar { display: none; }
.lm-lb-thumb {
	width: 60px; height: 38px;
	flex-shrink: 0;
	border-radius: 3px;
	overflow: hidden;
	opacity: 0.45;
	border: 1px solid transparent;
	cursor: pointer;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}
.lm-lb-thumb.is-active { opacity: 1; border-color: var(--lm-dore); }
.lm-lb-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* =============================================================================
   V2.5 — FILTRES VISUELS SHOWROOM
   ============================================================================= */
.lm-type-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 4px;
	border: 1px solid rgba(255,255,255,0.1);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--lm-gris-texte);
	background: rgba(255,255,255,0.03);
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}
.lm-type-btn:hover {
	border-color: rgba(218,180,85,0.3);
	color: var(--lm-blanc);
	background: rgba(218,180,85,0.06);
}
.lm-type-btn.is-active {
	border-color: var(--lm-dore);
	color: var(--lm-dore);
	background: rgba(218,180,85,0.1);
}
/* État de chargement de la grille */
#lm-vehicle-grid {
	transition: opacity 0.25s ease;
}
#lm-vehicle-grid.lm-loading {
	opacity: 0.35;
	pointer-events: none;
}

/* Spec grid */
.lm-spec-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px;
	background: rgba(255,255,255,0.03);
	border: 1px solid rgba(255,255,255,0.06);
	border-radius: 6px;
}
.lm-spec-icon {
	color: #DAB455;
	flex-shrink: 0;
	margin-top: 2px;
}
.lm-spec-label {
	font-size: 12px;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 2px;
}
.lm-spec-value {
	font-size: 15px;
	font-weight: 600;
	color: #F5F5F5;
}
